Class QueryAtom
- java.lang.Object
-
- org.openscience.cdk.isomorphism.matchers.QueryChemObject
-
- org.openscience.cdk.isomorphism.matchers.QueryAtom
-
- All Implemented Interfaces:
Cloneable
,IAtom
,IAtomType
,ICDKObject
,IChemObject
,IElement
,IIsotope
,IQueryAtom
- Direct Known Subclasses:
InverseSymbolSetQueryAtom
,SMARTSAtom
,SymbolAndChargeQueryAtom
,SymbolChargeIDQueryAtom
,SymbolQueryAtom
,SymbolSetQueryAtom
public class QueryAtom extends QueryChemObject implements IQueryAtom
- Source code:
- main
- Belongs to CDK module:
- isomorphism
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.openscience.cdk.interfaces.IAtomType
IAtomType.Hybridization
-
-
Field Summary
Fields Modifier and Type Field 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.-
Fields inherited from interface org.openscience.cdk.interfaces.IChemObject
ALIPHATIC, AROMATIC, CONJUGATED, HYDROGEN_BOND_ACCEPTOR, HYDROGEN_BOND_DONOR, IN_RING, MAPPED, NOT_IN_RING, PLACED, REACTIVE_CENTER, SINGLE_OR_DOUBLE, TYPEABLE, VISITED
-
Fields inherited from interface org.openscience.cdk.interfaces.IElement
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 Summary
Constructors Constructor Description QueryAtom(String symbol, IChemObjectBuilder builder)
QueryAtom(IChemObjectBuilder builder)
QueryAtom(Expr expr)
Create a new query atom with the given an expression.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 theIAtomContainer
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 anIAtomContainer
.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 givenatom
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.-
Methods inherited from class org.openscience.cdk.isomorphism.matchers.QueryChemObject
addListener, addProperties, clear, flags, getBuilder, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, is, notifyChanged, notifyChanged, removeListener, removeProperty, set, setFlag, setFlags, setID, setNotification, setProperties, setProperty
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openscience.cdk.interfaces.IAtom
getTotalHydrogenCount, neighbors
-
Methods inherited from interface org.openscience.cdk.interfaces.ICDKObject
getBuilder
-
Methods inherited from interface org.openscience.cdk.interfaces.IChemObject
addListener, addProperties, clear, flags, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, is, notifyChanged, notifyChanged, removeListener, removeProperty, set, setFlag, setFlags, setID, setNotification, setProperties, setProperty, toString
-
-
-
-
Field Detail
-
charge
protected Double charge
The partial charge of the atom.The default value is
CDKConstants.UNSET
and serves to provide a check whether the charge has been set or not
-
point2d
protected javax.vecmath.Point2d point2d
A 2D point specifying the location of this atom in a 2D coordinate space.
-
point3d
protected javax.vecmath.Point3d point3d
A 3 point specifying the location of this atom in a 3D coordinate space.
-
fractionalPoint3d
protected javax.vecmath.Point3d fractionalPoint3d
A 3 point specifying the location of this atom in a crystal unit cell.
-
hydrogenCount
protected Integer hydrogenCount
The number of implicitly bound hydrogen atoms for this atom.
-
stereoParity
protected Integer stereoParity
A stereo parity descriptor for the stereochemistry of this atom.
-
formalCharge
protected Integer formalCharge
The formal charge of the atom with CDKConstants.UNSET as default. Implements RFC #6.Note that some constructors e.g. (
AtomType(String)
andAtomType(String, String)
) will explicitly set this field to 0
-
hybridization
protected IAtomType.Hybridization hybridization
The hybridization state of this atom with CDKConstants.HYBRIDIZATION_UNSET as default.
-
electronValency
protected Integer electronValency
The electron Valency of this atom with CDKConstants.UNSET as default.
-
formalNeighbourCount
protected Integer formalNeighbourCount
The formal number of neighbours this atom type can have with CDKConstants_UNSET as default. This includes explicitely and implicitely connected atoms, including implicit hydrogens.
-
exactMass
public Double exactMass
Exact mass of this isotope.
-
naturalAbundance
public Double naturalAbundance
Natural abundance of this isotope.
-
symbol
protected String symbol
The element symbol for this element as listed in the periodic table.
-
atomicNumber
protected Integer atomicNumber
The atomic number for this element giving their position in the periodic table.
-
-
Constructor Detail
-
QueryAtom
public QueryAtom(String symbol, IChemObjectBuilder builder)
-
QueryAtom
public QueryAtom(IChemObjectBuilder builder)
-
QueryAtom
public QueryAtom(Expr expr)
Create a new query atom with the given an expression.// oxygen in a ring Expr expr = new Expr(IS_IN_RING); expr.and(new Expr(ELEMENT, 8)); new QueryAtom(expr);
- Parameters:
expr
- the expr
-
QueryAtom
public QueryAtom(Expr.Type type)
Create a new query atom with the given an predicate expression type.new QueryAtom(IS_IN_RING);
- Parameters:
type
- the expr type
-
QueryAtom
public QueryAtom(Expr.Type type, int val)
Create a new query atom with the given an value expression type.// oxygen new QueryAtom(ELEMENT, 8);
- Parameters:
type
- the expr typeval
- the expr value
-
-
Method Detail
-
getIndex
public int getIndex()
Acces the index of an atom in the context of anIAtomContainer
. If the index is not known, < 0 is returned.
-
getContainer
public IAtomContainer getContainer()
Access theIAtomContainer
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 anIAtomContainer
, 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'
- Specified by:
getContainer
in interfaceIAtom
- Returns:
- the atom container or null if not accessed in the context of a container
-
bonds
public Iterable<IBond> bonds()
Returns the bonds connected to this atom. If the bonds are not known an exception is thrown. This method will only throw an exception ifIAtom.getIndex()
returns < 0 orIAtom.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()) { }
-
getBondCount
public int getBondCount()
Get the number of explicit bonds connected to this atom.- Specified by:
getBondCount
in interfaceIAtom
- Returns:
- the total bond count
-
getBond
public IBond getBond(IAtom atom)
Returns the bond connecting 'this' atom to the provided atom. If the atoms are not bonded, null is returned.
-
setCharge
public void setCharge(Double charge)
Sets the partial charge of this atom.- Specified by:
setCharge
in interfaceIAtom
- Parameters:
charge
- The partial charge- See Also:
getCharge()
-
getCharge
public Double getCharge()
Returns the partial charge of this atom.If the charge has not been set the return value is Double.NaN
- Specified by:
getCharge
in interfaceIAtom
- Returns:
- the charge of this atom
- See Also:
setCharge(java.lang.Double)
-
setImplicitHydrogenCount
public void setImplicitHydrogenCount(Integer hydrogenCount)
Sets the number of implicit hydrogen count of this atom.- Specified by:
setImplicitHydrogenCount
in interfaceIAtom
- Parameters:
hydrogenCount
- The number of hydrogen atoms bonded to this atom.- See Also:
getImplicitHydrogenCount()
-
getImplicitHydrogenCount
public Integer getImplicitHydrogenCount()
Returns the hydrogen count of this atom.- Specified by:
getImplicitHydrogenCount
in interfaceIAtom
- Returns:
- The hydrogen count of this atom.
- See Also:
setImplicitHydrogenCount(java.lang.Integer)
-
setPoint2d
public void setPoint2d(javax.vecmath.Point2d point2d)
Sets a point specifying the location of this atom in a 2D space.- Specified by:
setPoint2d
in interfaceIAtom
- Parameters:
point2d
- A point in a 2D plane- See Also:
getPoint2d()
-
setPoint3d
public void setPoint3d(javax.vecmath.Point3d point3d)
Sets a point specifying the location of this atom in 3D space.- Specified by:
setPoint3d
in interfaceIAtom
- Parameters:
point3d
- A point in a 3-dimensional space- See Also:
getPoint3d()
-
setFractionalPoint3d
public void setFractionalPoint3d(javax.vecmath.Point3d point3d)
Sets a point specifying the location of this atom in a Crystal unit cell.- Specified by:
setFractionalPoint3d
in interfaceIAtom
- Parameters:
point3d
- A point in a 3d fractional unit cell space- See Also:
getFractionalPoint3d()
,Crystal
-
setStereoParity
public void setStereoParity(Integer stereoParity)
Sets the stereo parity for this atom.- Specified by:
setStereoParity
in interfaceIAtom
- Parameters:
stereoParity
- The stereo parity for this atom- See Also:
for predefined values.
,getStereoParity()
-
getPoint2d
public javax.vecmath.Point2d getPoint2d()
Returns a point specifying the location of this atom in a 2D space.- Specified by:
getPoint2d
in interfaceIAtom
- Returns:
- A point in a 2D plane. Null if unset.
- See Also:
setPoint2d(javax.vecmath.Point2d)
-
getPoint3d
public javax.vecmath.Point3d getPoint3d()
Returns a point specifying the location of this atom in a 3D space.- Specified by:
getPoint3d
in interfaceIAtom
- Returns:
- A point in 3-dimensional space. Null if unset.
- See Also:
setPoint3d(javax.vecmath.Point3d)
-
getFractionalPoint3d
public javax.vecmath.Point3d getFractionalPoint3d()
Returns a point specifying the location of this atom in a Crystal unit cell.- Specified by:
getFractionalPoint3d
in interfaceIAtom
- Returns:
- A point in 3d fractional unit cell space. Null if unset.
- See Also:
setFractionalPoint3d(javax.vecmath.Point3d)
,for predefined values.
-
getStereoParity
public Integer getStereoParity()
Returns the stereo parity of this atom. It uses the predefined values found in CDKConstants.- Specified by:
getStereoParity
in interfaceIAtom
- Returns:
- The stereo parity for this atom
- See Also:
CDKConstants
,setStereoParity(java.lang.Integer)
-
setAtomTypeName
public void setAtomTypeName(String identifier)
Sets the if attribute of the AtomType object.- Specified by:
setAtomTypeName
in interfaceIAtomType
- Parameters:
identifier
- The new AtomTypeID value. Null if unset.- See Also:
getAtomTypeName()
-
setMaxBondOrder
public void setMaxBondOrder(IBond.Order maxBondOrder)
Sets the MaxBondOrder attribute of the AtomType object.- Specified by:
setMaxBondOrder
in interfaceIAtomType
- Parameters:
maxBondOrder
- The new MaxBondOrder value- See Also:
getMaxBondOrder()
-
setBondOrderSum
public void setBondOrderSum(Double bondOrderSum)
Sets the the exact bond order sum attribute of the AtomType object.- Specified by:
setBondOrderSum
in interfaceIAtomType
- Parameters:
bondOrderSum
- The new bondOrderSum value- See Also:
getBondOrderSum()
-
getAtomTypeName
public String getAtomTypeName()
Gets the id attribute of the AtomType object.- Specified by:
getAtomTypeName
in interfaceIAtomType
- Returns:
- The id value
- See Also:
setAtomTypeName(java.lang.String)
-
getMaxBondOrder
public IBond.Order getMaxBondOrder()
Gets the MaxBondOrder attribute of the AtomType object.- Specified by:
getMaxBondOrder
in interfaceIAtomType
- Returns:
- The MaxBondOrder value
- See Also:
setMaxBondOrder(org.openscience.cdk.interfaces.IBond.Order)
-
getBondOrderSum
public Double getBondOrderSum()
Gets the bondOrderSum attribute of the AtomType object.- Specified by:
getBondOrderSum
in interfaceIAtomType
- Returns:
- The bondOrderSum value
- See Also:
setBondOrderSum(java.lang.Double)
-
setFormalCharge
public void setFormalCharge(Integer charge)
Sets the formal charge of this atom.- Specified by:
setFormalCharge
in interfaceIAtomType
- Parameters:
charge
- The formal charge- See Also:
getFormalCharge()
-
getFormalCharge
public Integer getFormalCharge()
Returns the formal charge of this atom.- Specified by:
getFormalCharge
in interfaceIAtomType
- Returns:
- the formal charge of this atom
- See Also:
setFormalCharge(java.lang.Integer)
-
setFormalNeighbourCount
public void setFormalNeighbourCount(Integer count)
Sets the formal neighbour count of this atom.- Specified by:
setFormalNeighbourCount
in interfaceIAtomType
- Parameters:
count
- The neighbour count- See Also:
getFormalNeighbourCount()
-
getFormalNeighbourCount
public Integer getFormalNeighbourCount()
Returns the formal neighbour count of this atom.- Specified by:
getFormalNeighbourCount
in interfaceIAtomType
- Returns:
- the formal neighbour count of this atom
- See Also:
setFormalNeighbourCount(java.lang.Integer)
-
setHybridization
public void setHybridization(IAtomType.Hybridization hybridization)
Sets the hybridization of this atom.- Specified by:
setHybridization
in interfaceIAtomType
- Parameters:
hybridization
- The hybridization- See Also:
getHybridization()
-
getHybridization
public IAtomType.Hybridization getHybridization()
Returns the hybridization of this atom.- Specified by:
getHybridization
in interfaceIAtomType
- Returns:
- the hybridization of this atom
- See Also:
setHybridization(org.openscience.cdk.interfaces.IAtomType.Hybridization)
-
setNaturalAbundance
public void setNaturalAbundance(Double naturalAbundance)
Sets the NaturalAbundance attribute of the Isotope object.- Specified by:
setNaturalAbundance
in interfaceIIsotope
- Parameters:
naturalAbundance
- The new NaturalAbundance value- See Also:
getNaturalAbundance()
-
setExactMass
public void setExactMass(Double exactMass)
Sets the ExactMass attribute of the Isotope object.- Specified by:
setExactMass
in interfaceIIsotope
- Parameters:
exactMass
- The new ExactMass value- See Also:
getExactMass()
-
getNaturalAbundance
public Double getNaturalAbundance()
Gets the NaturalAbundance attribute of the Isotope object.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);
- Specified by:
getNaturalAbundance
in interfaceIIsotope
- Returns:
- The NaturalAbundance value
- See Also:
setNaturalAbundance(java.lang.Double)
-
getExactMass
public Double getExactMass()
Gets the ExactMass attribute of the Isotope object.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);
- Specified by:
getExactMass
in interfaceIIsotope
- Returns:
- The ExactMass value
- See Also:
setExactMass(java.lang.Double)
-
getMassNumber
public Integer getMassNumber()
Returns the atomic mass of this element.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);
- Specified by:
getMassNumber
in interfaceIIsotope
- Returns:
- The atomic mass of this element
- See Also:
setMassNumber(Integer)
-
setMassNumber
public void setMassNumber(Integer massNumber)
Sets the atomic mass of this element.- Specified by:
setMassNumber
in interfaceIIsotope
- Parameters:
massNumber
- The atomic mass to be assigned to this element- See Also:
getMassNumber()
-
getAtomicNumber
public Integer getAtomicNumber()
Returns the atomic number of this element.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);
- Specified by:
getAtomicNumber
in interfaceIElement
- Returns:
- The atomic number of this element
- See Also:
setAtomicNumber(java.lang.Integer)
-
setAtomicNumber
public void setAtomicNumber(Integer atomicNumber)
Sets the atomic number of this element.- Specified by:
setAtomicNumber
in interfaceIElement
- Parameters:
atomicNumber
- The atomic mass to be assigned to this element- See Also:
getAtomicNumber()
-
getSymbol
public String getSymbol()
Returns the element symbol of this element.- Specified by:
getSymbol
in interfaceIElement
- Returns:
- The element symbol of this element. Null if unset.
- See Also:
setSymbol(java.lang.String)
-
setSymbol
public void setSymbol(String symbol)
Sets the element symbol of this element.- Specified by:
setSymbol
in interfaceIElement
- Parameters:
symbol
- The element symbol to be assigned to this atom- See Also:
getSymbol()
-
setCovalentRadius
public void setCovalentRadius(Double radius)
Sets the covalent radius for this AtomType.- Specified by:
setCovalentRadius
in interfaceIAtomType
- Parameters:
radius
- The covalent radius for this AtomType- See Also:
getCovalentRadius()
-
getCovalentRadius
public Double getCovalentRadius()
Returns the covalent radius for this AtomType.- Specified by:
getCovalentRadius
in interfaceIAtomType
- Returns:
- The covalent radius for this AtomType
- See Also:
setCovalentRadius(java.lang.Double)
-
setValency
public void setValency(Integer valency)
Sets the the exact electron valency of the AtomType object.- Specified by:
setValency
in interfaceIAtomType
- Parameters:
valency
- The new valency value- See Also:
getValency()
-
getValency
public Integer getValency()
Gets the the exact electron valency of the AtomType object.- Specified by:
getValency
in interfaceIAtomType
- Returns:
- The valency value
- See Also:
setValency(java.lang.Integer)
-
isAromatic
public boolean isAromatic()
Access whether this atom has been marked as aromatic. The default value is false and you must explicitly perceive aromaticity with one of the available models.- Specified by:
isAromatic
in interfaceIAtom
- Returns:
- aromatic status
- See Also:
IChemObject.getFlag(int)
,Aromaticity
-
setIsAromatic
public void setIsAromatic(boolean arom)
Mark this atom as being aromatic.- Specified by:
setIsAromatic
in interfaceIAtom
- Parameters:
arom
- aromatic status- See Also:
IChemObject.setFlag(int, boolean)
-
isInRing
public boolean isInRing()
Access whether this atom has been flagged as in a ring. The default value is false and you must explicitly find rings first.- Specified by:
isInRing
in interfaceIAtom
- Returns:
- ring status
- See Also:
IChemObject.getFlag(int)
,RingSearch
-
setIsInRing
public void setIsInRing(boolean ring)
Mark this atom as being in a ring.- Specified by:
setIsInRing
in interfaceIAtom
- Parameters:
ring
- ring status- See Also:
IChemObject.setFlag(int, boolean)
-
getMapIdx
public int getMapIdx()
Access the map index for this atom.
-
setMapIdx
public void setMapIdx(int mapidx)
Set the map index for this atom.
-
setExpression
public void setExpression(Expr expr)
Set the atom-expression predicate for this query atom.- Parameters:
expr
- the expression
-
getExpression
public Expr getExpression()
Get the atom-expression predicate for this query atom.- Returns:
- the expression
-
matches
public boolean matches(IAtom atom)
Returns true of the givenatom
matches this IQueryAtom.- Specified by:
matches
in interfaceIQueryAtom
- Overrides:
matches
in classQueryChemObject
- Parameters:
atom
- IAtom to match against- Returns:
- true, if this IQueryAtom matches the given IAtom
-
clone
public IAtom clone() throws CloneNotSupportedException
Description copied from interface:IChemObject
Returns a deep clone of this IChemObject.- Specified by:
clone
in interfaceIAtom
- Specified by:
clone
in interfaceIChemObject
- Overrides:
clone
in classQueryChemObject
- Returns:
- Object the clone of this IChemObject.
- Throws:
CloneNotSupportedException
- if the IChemObject cannot be cloned
-
-