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.
|
| 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. |
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 |
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, setPropertyfinalize, getClass, notify, notifyAll, toString, wait, wait, waitaddListener, addProperties, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty, toStringgetBuilderprotected Double charge
CDKConstants.UNSET and serves to provide a check whether the charge has been
set or notprotected javax.vecmath.Point2d point2d
protected javax.vecmath.Point3d point3d
protected javax.vecmath.Point3d fractionalPoint3d
protected Integer hydrogenCount
protected Integer stereoParity
protected Integer formalCharge
AtomType.AtomType(String) and
AtomType.AtomType(String, String) ) will explicitly set this field to 0protected 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 IAtompublic 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 IAtompublic IBond getBond(IAtom atom)
public void setCharge(Double charge)
setCharge in interface IAtomcharge - The partial chargegetCharge()public Double getCharge()
getCharge in interface IAtomsetCharge(java.lang.Double)public void setImplicitHydrogenCount(Integer hydrogenCount)
setImplicitHydrogenCount in interface IAtomhydrogenCount - The number of hydrogen atoms bonded to this atom.getImplicitHydrogenCount()public Integer getImplicitHydrogenCount()
getImplicitHydrogenCount in interface IAtomsetImplicitHydrogenCount(java.lang.Integer)public void setPoint2d(javax.vecmath.Point2d point2d)
setPoint2d in interface IAtompoint2d - A point in a 2D planegetPoint2d()public void setPoint3d(javax.vecmath.Point3d point3d)
setPoint3d in interface IAtompoint3d - A point in a 3-dimensional spacegetPoint3d()public void setFractionalPoint3d(javax.vecmath.Point3d point3d)
setFractionalPoint3d in interface IAtompoint3d - A point in a 3d fractional unit cell spacegetFractionalPoint3d(),
Crystalpublic void setStereoParity(Integer stereoParity)
setStereoParity in interface IAtomstereoParity - The stereo parity for this atomfor predefined values.,
getStereoParity()public javax.vecmath.Point2d getPoint2d()
getPoint2d in interface IAtomsetPoint2d(javax.vecmath.Point2d)public javax.vecmath.Point3d getPoint3d()
getPoint3d in interface IAtomsetPoint3d(javax.vecmath.Point3d)public javax.vecmath.Point3d getFractionalPoint3d()
getFractionalPoint3d in interface IAtomsetFractionalPoint3d(javax.vecmath.Point3d),
for predefined values.public Integer getStereoParity()
getStereoParity in interface IAtomCDKConstants,
setStereoParity(java.lang.Integer)public void setAtomTypeName(String identifier)
setAtomTypeName in interface IAtomTypeidentifier - The new AtomTypeID value. Null if unset.getAtomTypeName()public void setMaxBondOrder(IBond.Order maxBondOrder)
setMaxBondOrder in interface IAtomTypemaxBondOrder - The new MaxBondOrder valuegetMaxBondOrder()public void setBondOrderSum(Double bondOrderSum)
setBondOrderSum in interface IAtomTypebondOrderSum - The new bondOrderSum valuegetBondOrderSum()public String getAtomTypeName()
getAtomTypeName in interface IAtomTypesetAtomTypeName(java.lang.String)public IBond.Order getMaxBondOrder()
getMaxBondOrder in interface IAtomTypesetMaxBondOrder(org.openscience.cdk.interfaces.IBond.Order)public Double getBondOrderSum()
getBondOrderSum in interface IAtomTypesetBondOrderSum(java.lang.Double)public void setFormalCharge(Integer charge)
setFormalCharge in interface IAtomTypecharge - The formal chargegetFormalCharge()public Integer getFormalCharge()
getFormalCharge in interface IAtomTypesetFormalCharge(java.lang.Integer)public void setFormalNeighbourCount(Integer count)
setFormalNeighbourCount in interface IAtomTypecount - The neighbour countgetFormalNeighbourCount()public Integer getFormalNeighbourCount()
getFormalNeighbourCount in interface IAtomTypesetFormalNeighbourCount(java.lang.Integer)public void setHybridization(IAtomType.Hybridization hybridization)
setHybridization in interface IAtomTypehybridization - The hybridizationgetHybridization()public IAtomType.Hybridization getHybridization()
getHybridization in interface IAtomTypesetHybridization(org.openscience.cdk.interfaces.IAtomType.Hybridization)public void setNaturalAbundance(Double naturalAbundance)
setNaturalAbundance in interface IIsotopenaturalAbundance - The new NaturalAbundance valuegetNaturalAbundance()public void setExactMass(Double exactMass)
setExactMass in interface IIsotopeexactMass - 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 IIsotopesetNaturalAbundance(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 IIsotopesetExactMass(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 IIsotopesetMassNumber(Integer)public void setMassNumber(Integer massNumber)
setMassNumber in interface IIsotopemassNumber - 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 IElementsetAtomicNumber(java.lang.Integer)public void setAtomicNumber(Integer atomicNumber)
setAtomicNumber in interface IElementatomicNumber - The atomic mass to be assigned to this elementgetAtomicNumber()public String getSymbol()
getSymbol in interface IElementsetSymbol(java.lang.String)public void setSymbol(String symbol)
setSymbol in interface IElementsymbol - The element symbol to be assigned to this atomgetSymbol()public void setCovalentRadius(Double radius)
setCovalentRadius in interface IAtomTyperadius - The covalent radius for this AtomTypegetCovalentRadius()public Double getCovalentRadius()
getCovalentRadius in interface IAtomTypesetCovalentRadius(java.lang.Double)public void setValency(Integer valency)
setValency in interface IAtomTypevalency - The new valency valuegetValency()public Integer getValency()
getValency in interface IAtomTypesetValency(java.lang.Integer)public boolean isAromatic()
isAromatic in interface IAtomIChemObject.getFlag(int),
Aromaticitypublic void setIsAromatic(boolean arom)
setIsAromatic in interface IAtomarom - aromatic statusIChemObject.setFlag(int, boolean)public boolean isInRing()
isInRing in interface IAtomIChemObject.getFlag(int),
RingSearchpublic void setIsInRing(boolean ring)
setIsInRing in interface IAtomring - ring statusIChemObject.setFlag(int, boolean)public void setExpression(Expr expr)
expr - the expressionpublic Expr getExpression()
public boolean matches(IAtom atom)
atom matches this IQueryAtom.matches in interface IQueryAtommatches in class QueryChemObjectatom - IAtom to match againstpublic IAtom clone() throws CloneNotSupportedException
IChemObjectclone in interface IAtomclone in interface IChemObjectclone in class QueryChemObjectCloneNotSupportedException - if the IChemObject cannot be clonedCopyright © 2018. All Rights Reserved.