public class QueryAtom extends QueryChemObject implements IQueryAtom
IAtomType.Hybridization
Modifier and Type | Field and Description |
---|---|
protected Integer |
atomicNumber
The atomic number for this element giving their position in the periodic table.
|
protected Double |
charge
The partial charge of the atom.
|
protected Integer |
electronValency
The electron Valency of this atom with CDKConstants.UNSET as default.
|
Double |
exactMass
Exact mass of this isotope.
|
protected Integer |
formalCharge
The formal charge of the atom with CDKConstants.UNSET as default.
|
protected Integer |
formalNeighbourCount
The formal number of neighbours this atom type can have with CDKConstants_UNSET
as default.
|
protected javax.vecmath.Point3d |
fractionalPoint3d
A 3 point specifying the location of this atom in a crystal unit cell.
|
protected IAtomType.Hybridization |
hybridization
The hybridization state of this atom with CDKConstants.HYBRIDIZATION_UNSET
as default.
|
protected Integer |
hydrogenCount
The number of implicitly bound hydrogen atoms for this atom.
|
Double |
naturalAbundance
Natural abundance of this isotope.
|
protected javax.vecmath.Point2d |
point2d
A 2D point specifying the location of this atom in a 2D coordinate
space.
|
protected javax.vecmath.Point3d |
point3d
A 3 point specifying the location of this atom in a 3D coordinate
space.
|
protected Integer |
stereoParity
A stereo parity descriptor for the stereochemistry of this atom.
|
protected String |
symbol
The element symbol for this element as listed in the periodic table.
|
Ac, Ag, Al, Am, Ar, As, At, Au, B, Ba, Be, Bh, Bi, Bk, Br, C, Ca, Cd, Ce, Cf, Cl, Cm, Cn, Co, Cr, Cs, Cu, Db, Ds, Dy, Er, Es, Eu, F, Fe, Fl, Fm, Fr, Ga, Gd, Ge, H, He, Hf, Hg, Ho, Hs, I, In, Ir, K, Kr, La, Li, Lr, Lu, Lv, Mc, Md, Mg, Mn, Mo, Mt, N, Na, Nb, Nd, Ne, Nh, Ni, No, Np, O, Og, Os, P, Pa, Pb, Pd, Pm, Po, Pr, Pt, Pu, Ra, Rb, Re, Rf, Rg, Rh, Rn, Ru, S, Sb, Sc, Se, Sg, Si, Sm, Sn, Sr, Ta, Tb, Tc, Te, Th, Ti, Tl, Tm, Ts, U, V, W, Wildcard, Xe, Y, Yb, Zn, Zr
Constructor and Description |
---|
QueryAtom(Expr.Type type)
Create a new query atom with the given an predicate expression type.
|
QueryAtom(Expr.Type type,
int val)
Create a new query atom with the given an value expression type.
|
QueryAtom(Expr expr)
Create a new query atom with the given an expression.
|
QueryAtom(IChemObjectBuilder builder) |
QueryAtom(String symbol,
IChemObjectBuilder builder) |
Modifier and Type | Method and Description |
---|---|
Iterable<IBond> |
bonds()
Returns the bonds connected to this atom.
|
IAtom |
clone()
Returns a deep clone of this IChemObject.
|
boolean |
equals(Object obj) |
Integer |
getAtomicNumber()
Returns the atomic number of this element.
|
String |
getAtomTypeName()
Gets the id attribute of the AtomType object.
|
IBond |
getBond(IAtom atom)
Returns the bond connecting 'this' atom to the provided atom.
|
int |
getBondCount()
Get the number of explicit bonds connected to this atom.
|
Double |
getBondOrderSum()
Gets the bondOrderSum attribute of the AtomType object.
|
Double |
getCharge()
Returns the partial charge of this atom.
|
IAtomContainer |
getContainer()
Access the
IAtomContainer of which this atom is a member of. |
Double |
getCovalentRadius()
Returns the covalent radius for this AtomType.
|
Double |
getExactMass()
Gets the ExactMass attribute of the Isotope object.
|
Expr |
getExpression()
Get the atom-expression predicate for this query atom.
|
Integer |
getFormalCharge()
Returns the formal charge of this atom.
|
Integer |
getFormalNeighbourCount()
Returns the formal neighbour count of this atom.
|
javax.vecmath.Point3d |
getFractionalPoint3d()
Returns a point specifying the location of this
atom in a Crystal unit cell.
|
IAtomType.Hybridization |
getHybridization()
Returns the hybridization of this atom.
|
Integer |
getImplicitHydrogenCount()
Returns the hydrogen count of this atom.
|
int |
getIndex()
Acces the index of an atom in the context of an
IAtomContainer . |
int |
getMapIdx()
Access the map index for this atom.
|
Integer |
getMassNumber()
Returns the atomic mass of this element.
|
IBond.Order |
getMaxBondOrder()
Gets the MaxBondOrder attribute of the AtomType object.
|
Double |
getNaturalAbundance()
Gets the NaturalAbundance attribute of the Isotope object.
|
javax.vecmath.Point2d |
getPoint2d()
Returns a point specifying the location of this
atom in a 2D space.
|
javax.vecmath.Point3d |
getPoint3d()
Returns a point specifying the location of this
atom in a 3D space.
|
Integer |
getStereoParity()
Returns the stereo parity of this atom.
|
String |
getSymbol()
Returns the element symbol of this element.
|
Integer |
getValency()
Gets the the exact electron valency of the AtomType object.
|
int |
hashCode() |
boolean |
isAromatic()
Access whether this atom has been marked as aromatic.
|
boolean |
isInRing()
Access whether this atom has been flagged as in a ring.
|
boolean |
matches(IAtom atom)
Returns true of the given
atom matches this IQueryAtom. |
void |
setAtomicNumber(Integer atomicNumber)
Sets the atomic number of this element.
|
void |
setAtomTypeName(String identifier)
Sets the if attribute of the AtomType object.
|
void |
setBondOrderSum(Double bondOrderSum)
Sets the the exact bond order sum attribute of the AtomType object.
|
void |
setCharge(Double charge)
Sets the partial charge of this atom.
|
void |
setCovalentRadius(Double radius)
Sets the covalent radius for this AtomType.
|
void |
setExactMass(Double exactMass)
Sets the ExactMass attribute of the Isotope object.
|
void |
setExpression(Expr expr)
Set the atom-expression predicate for this query atom.
|
void |
setFormalCharge(Integer charge)
Sets the formal charge of this atom.
|
void |
setFormalNeighbourCount(Integer count)
Sets the formal neighbour count of this atom.
|
void |
setFractionalPoint3d(javax.vecmath.Point3d point3d)
Sets a point specifying the location of this
atom in a Crystal unit cell.
|
void |
setHybridization(IAtomType.Hybridization hybridization)
Sets the hybridization of this atom.
|
void |
setImplicitHydrogenCount(Integer hydrogenCount)
Sets the number of implicit hydrogen count of this atom.
|
void |
setIsAromatic(boolean arom)
Mark this atom as being aromatic.
|
void |
setIsInRing(boolean ring)
Mark this atom as being in a ring.
|
void |
setMapIdx(int mapidx)
Set the map index for this atom.
|
void |
setMassNumber(Integer massNumber)
Sets the atomic mass of this element.
|
void |
setMaxBondOrder(IBond.Order maxBondOrder)
Sets the MaxBondOrder attribute of the AtomType object.
|
void |
setNaturalAbundance(Double naturalAbundance)
Sets the NaturalAbundance attribute of the Isotope object.
|
void |
setPoint2d(javax.vecmath.Point2d point2d)
Sets a point specifying the location of this
atom in a 2D space.
|
void |
setPoint3d(javax.vecmath.Point3d point3d)
Sets a point specifying the location of this
atom in 3D space.
|
void |
setStereoParity(Integer stereoParity)
Sets the stereo parity for this atom.
|
void |
setSymbol(String symbol)
Sets the element symbol of this element.
|
void |
setValency(Integer valency)
Sets the the exact electron valency of the AtomType object.
|
addListener, addProperties, getBuilder, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addListener, addProperties, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty, toString
getBuilder
protected Double charge
The default value is CDKConstants.UNSET
and serves to provide a check whether the charge has been
set or not
protected javax.vecmath.Point2d point2d
protected javax.vecmath.Point3d point3d
protected javax.vecmath.Point3d fractionalPoint3d
protected Integer hydrogenCount
protected Integer stereoParity
protected Integer formalCharge
Note that some constructors e.g. (AtomType(String)
and
AtomType(String, String)
) will explicitly set this field to 0
protected IAtomType.Hybridization hybridization
protected Integer electronValency
protected Integer formalNeighbourCount
public Double exactMass
public Double naturalAbundance
protected String symbol
protected Integer atomicNumber
public QueryAtom(String symbol, IChemObjectBuilder builder)
public QueryAtom(IChemObjectBuilder builder)
public QueryAtom(Expr expr)
// oxygen in a ring
Expr expr = new Expr(IS_IN_RING);
expr.and(new Expr(ELEMENT, 8));
new QueryAtom(expr);
expr
- the exprpublic QueryAtom(Expr.Type type)
new QueryAtom(IS_IN_RING);
type
- the expr typepublic QueryAtom(Expr.Type type, int val)
// oxygen
new QueryAtom(ELEMENT, 8);
type
- the expr typeval
- the expr valuepublic int getIndex()
IAtomContainer
. If the
index is not known, < 0 is returned.public IAtomContainer getContainer()
IAtomContainer
of which this atom is a member of. Because atoms
can be in multiple molecules this method will only work if the atom has been accessed
in the context of an IAtomContainer
, for example:
IAtomContainer mol = new AtomContainer();
IAtom atom = new Atom(6);
atom.getContainer(); // null
mol.add(atom);
atom.getContainer(); // still null
mol.getAtom(0).getContainer(); // not-null, returns 'mol'
getContainer
in interface IAtom
public Iterable<IBond> bonds()
IAtom.getIndex()
returns < 0 or IAtom.getContainer()
returns null.
IAtom atom = ...;
if (atom.getIndex() >= 0) {
for (IBond bond : atom.bonds()) {
}
}
if (atom.getContainer() != null) {
for (IBond bond : atom.bonds()) {
}
}
IAtomContainer mol = ...;
// guaranteed not throw an exception
for (IBond bond : mol.getAtom(i).bonds()) {
}
public int getBondCount()
getBondCount
in interface IAtom
public IBond getBond(IAtom atom)
public void setCharge(Double charge)
setCharge
in interface IAtom
charge
- The partial chargegetCharge()
public Double getCharge()
If the charge has not been set the return value is Double.NaN
getCharge
in interface IAtom
setCharge(java.lang.Double)
public void setImplicitHydrogenCount(Integer hydrogenCount)
setImplicitHydrogenCount
in interface IAtom
hydrogenCount
- The number of hydrogen atoms bonded to this atom.getImplicitHydrogenCount()
public Integer getImplicitHydrogenCount()
getImplicitHydrogenCount
in interface IAtom
setImplicitHydrogenCount(java.lang.Integer)
public void setPoint2d(javax.vecmath.Point2d point2d)
setPoint2d
in interface IAtom
point2d
- A point in a 2D planegetPoint2d()
public void setPoint3d(javax.vecmath.Point3d point3d)
setPoint3d
in interface IAtom
point3d
- A point in a 3-dimensional spacegetPoint3d()
public void setFractionalPoint3d(javax.vecmath.Point3d point3d)
setFractionalPoint3d
in interface IAtom
point3d
- A point in a 3d fractional unit cell spacegetFractionalPoint3d()
,
Crystal
public void setStereoParity(Integer stereoParity)
setStereoParity
in interface IAtom
stereoParity
- The stereo parity for this atomfor predefined values.
,
getStereoParity()
public javax.vecmath.Point2d getPoint2d()
getPoint2d
in interface IAtom
setPoint2d(javax.vecmath.Point2d)
public javax.vecmath.Point3d getPoint3d()
getPoint3d
in interface IAtom
setPoint3d(javax.vecmath.Point3d)
public javax.vecmath.Point3d getFractionalPoint3d()
getFractionalPoint3d
in interface IAtom
setFractionalPoint3d(javax.vecmath.Point3d)
,
for predefined values.
public Integer getStereoParity()
getStereoParity
in interface IAtom
CDKConstants
,
setStereoParity(java.lang.Integer)
public void setAtomTypeName(String identifier)
setAtomTypeName
in interface IAtomType
identifier
- The new AtomTypeID value. Null if unset.getAtomTypeName()
public void setMaxBondOrder(IBond.Order maxBondOrder)
setMaxBondOrder
in interface IAtomType
maxBondOrder
- The new MaxBondOrder valuegetMaxBondOrder()
public void setBondOrderSum(Double bondOrderSum)
setBondOrderSum
in interface IAtomType
bondOrderSum
- The new bondOrderSum valuegetBondOrderSum()
public String getAtomTypeName()
getAtomTypeName
in interface IAtomType
setAtomTypeName(java.lang.String)
public IBond.Order getMaxBondOrder()
getMaxBondOrder
in interface IAtomType
setMaxBondOrder(org.openscience.cdk.interfaces.IBond.Order)
public Double getBondOrderSum()
getBondOrderSum
in interface IAtomType
setBondOrderSum(java.lang.Double)
public void setFormalCharge(Integer charge)
setFormalCharge
in interface IAtomType
charge
- The formal chargegetFormalCharge()
public Integer getFormalCharge()
getFormalCharge
in interface IAtomType
setFormalCharge(java.lang.Integer)
public void setFormalNeighbourCount(Integer count)
setFormalNeighbourCount
in interface IAtomType
count
- The neighbour countgetFormalNeighbourCount()
public Integer getFormalNeighbourCount()
getFormalNeighbourCount
in interface IAtomType
setFormalNeighbourCount(java.lang.Integer)
public void setHybridization(IAtomType.Hybridization hybridization)
setHybridization
in interface IAtomType
hybridization
- The hybridizationgetHybridization()
public IAtomType.Hybridization getHybridization()
getHybridization
in interface IAtomType
setHybridization(org.openscience.cdk.interfaces.IAtomType.Hybridization)
public void setNaturalAbundance(Double naturalAbundance)
setNaturalAbundance
in interface IIsotope
naturalAbundance
- The new NaturalAbundance valuegetNaturalAbundance()
public void setExactMass(Double exactMass)
setExactMass
in interface IIsotope
exactMass
- The new ExactMass valuegetExactMass()
public Double getNaturalAbundance()
Once instantiated all field not filled by passing parameters to the constructor are null. Isotopes can be configured by using the IsotopeFactory.configure() method:
Isotope isotope = new Isotope("C", 13); IsotopeFactory if = IsotopeFactory.getInstance(isotope.getNewBuilder()); if.configure(isotope);
getNaturalAbundance
in interface IIsotope
setNaturalAbundance(java.lang.Double)
public Double getExactMass()
Once instantiated all field not filled by passing parameters to the constructor are null. Isotopes can be configured by using the IsotopeFactory.configure() method:
Isotope isotope = new Isotope("C", 13); IsotopeFactory if = IsotopeFactory.getInstance(isotope.getNewBuilder()); if.configure(isotope);
getExactMass
in interface IIsotope
setExactMass(java.lang.Double)
public Integer getMassNumber()
Once instantiated all field not filled by passing parameters to the constructor are null. Isotopes can be configured by using the IsotopeFactory.configure() method:
Isotope isotope = new Isotope("C", 13); IsotopeFactory if = IsotopeFactory.getInstance(isotope.getNewBuilder()); if.configure(isotope);
getMassNumber
in interface IIsotope
setMassNumber(Integer)
public void setMassNumber(Integer massNumber)
setMassNumber
in interface IIsotope
massNumber
- The atomic mass to be assigned to this elementgetMassNumber()
public Integer getAtomicNumber()
Once instantiated all field not filled by passing parameters to the constructor are null. Elements can be configured by using the IsotopeFactory.configure() method:
Element element = new Element("C"); IsotopeFactory if = IsotopeFactory.getInstance(element.getNewBuilder()); if.configure(element);
getAtomicNumber
in interface IElement
setAtomicNumber(java.lang.Integer)
public void setAtomicNumber(Integer atomicNumber)
setAtomicNumber
in interface IElement
atomicNumber
- The atomic mass to be assigned to this elementgetAtomicNumber()
public String getSymbol()
getSymbol
in interface IElement
setSymbol(java.lang.String)
public void setSymbol(String symbol)
setSymbol
in interface IElement
symbol
- The element symbol to be assigned to this atomgetSymbol()
public void setCovalentRadius(Double radius)
setCovalentRadius
in interface IAtomType
radius
- The covalent radius for this AtomTypegetCovalentRadius()
public Double getCovalentRadius()
getCovalentRadius
in interface IAtomType
setCovalentRadius(java.lang.Double)
public void setValency(Integer valency)
setValency
in interface IAtomType
valency
- The new valency valuegetValency()
public Integer getValency()
getValency
in interface IAtomType
setValency(java.lang.Integer)
public boolean isAromatic()
isAromatic
in interface IAtom
IChemObject.getFlag(int)
,
Aromaticity
public void setIsAromatic(boolean arom)
setIsAromatic
in interface IAtom
arom
- aromatic statusIChemObject.setFlag(int, boolean)
public boolean isInRing()
isInRing
in interface IAtom
IChemObject.getFlag(int)
,
RingSearch
public void setIsInRing(boolean ring)
setIsInRing
in interface IAtom
ring
- ring statusIChemObject.setFlag(int, boolean)
public int getMapIdx()
public void setMapIdx(int mapidx)
public void setExpression(Expr expr)
expr
- the expressionpublic Expr getExpression()
public boolean matches(IAtom atom)
atom
matches this IQueryAtom.matches
in interface IQueryAtom
matches
in class QueryChemObject
atom
- IAtom to match againstpublic IAtom clone() throws CloneNotSupportedException
IChemObject
clone
in interface IAtom
clone
in interface IChemObject
clone
in class QueryChemObject
CloneNotSupportedException
- if the IChemObject cannot be clonedCopyright © 2021. All rights reserved.