Package org.openscience.cdk.interfaces
Interface IAtom
- All Superinterfaces:
Cloneable
,IAtomType
,ICDKObject
,IChemObject
,IElement
,IIsotope
- All Known Subinterfaces:
IFragmentAtom
,IPDBAtom
,IPseudoAtom
,IQueryAtom
- All Known Implementing Classes:
AliphaticAtom
,AliphaticSymbolAtom
,AnyAtom
,AromaticAtom
,AromaticSymbolAtom
,Atom
,Atom
,AtomicNumberAtom
,AtomRef
,ChiralityAtom
,DebugAtom
,DebugFragmentAtom
,DebugPDBAtom
,DebugPseudoAtom
,EnzymeResidueLocator
,ExplicitConnectionAtom
,FormalChargeAtom
,FragmentAtom
,FragmentAtom
,HybridizationNumberAtom
,HydrogenAtom
,ImplicitHCountAtom
,InverseSymbolSetQueryAtom
,LogicalOperatorAtom
,MassAtom
,NonCHHeavyAtom
,PDBAtom
,PDBAtom
,PeriodicGroupNumberAtom
,PharmacophoreAtom
,PharmacophoreQueryAtom
,PseudoAtom
,PseudoAtom
,QueryAtom
,ReactionRoleQueryAtom
,RecursiveSmartsAtom
,RingIdentifierAtom
,RingMembershipAtom
,SmallestRingAtom
,SMARTSAtom
,SymbolAndChargeQueryAtom
,SymbolChargeIDQueryAtom
,SymbolQueryAtom
,SymbolSetQueryAtom
,TotalConnectionAtom
,TotalHCountAtom
,TotalRingConnectionAtom
,TotalValencyAtom
Represents the idea of an chemical atom.
- Author:
- egonw
- Source code:
- main
- Belongs to CDK module:
- interfaces
- Keywords:
- atom
- Created on:
- 2005-08-24
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.openscience.cdk.interfaces.IAtomType
IAtomType.Hybridization
-
Field Summary
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
-
Method Summary
Modifier and TypeMethodDescriptionbonds()
Returns the bonds connected to this atom.clone()
Returns a deep clone of this IChemObject.Returns the bond connecting 'this' atom to the provided atom.int
Get the number of explicit bonds connected to this atom.Returns the partial charge of this atom.Access theIAtomContainer
of which this atom is a member of.javax.vecmath.Point3d
Returns a point specifying the location of this atom in a Crystal unit cell.Returns the implicit hydrogen count of this atom.int
getIndex()
Acces the index of an atom in the context of anIAtomContainer
.int
Access the map index for this atom.javax.vecmath.Point2d
Returns a point specifying the location of this atom in a 2D space.javax.vecmath.Point3d
Returns a point specifying the location of this atom in a 3D space.Deprecated.boolean
Access whether this atom has been marked as aromatic.boolean
isInRing()
Access whether this atom has been flagged as in a ring.void
Sets the partial charge of this atom.void
setFractionalPoint3d
(javax.vecmath.Point3d point3d) Sets a point specifying the location of this atom in a Crystal unit cell.void
setImplicitHydrogenCount
(Integer hydrogenCount) Sets the 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
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) Deprecated.useIStereoElement
s for storing stereochemistryMethods inherited from interface org.openscience.cdk.interfaces.IAtomType
getAtomTypeName, getBondOrderSum, getCovalentRadius, getFormalCharge, getFormalNeighbourCount, getHybridization, getMaxBondOrder, getValency, setAtomTypeName, setBondOrderSum, setCovalentRadius, setFormalCharge, setFormalNeighbourCount, setHybridization, setMaxBondOrder, setValency
Methods inherited from interface org.openscience.cdk.interfaces.ICDKObject
getBuilder
Methods inherited from interface org.openscience.cdk.interfaces.IChemObject
addListener, addProperties, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty, toString
Methods inherited from interface org.openscience.cdk.interfaces.IElement
getAtomicNumber, getSymbol, setAtomicNumber, setSymbol
Methods inherited from interface org.openscience.cdk.interfaces.IIsotope
getExactMass, getMassNumber, getNaturalAbundance, setExactMass, setMassNumber, setNaturalAbundance
-
Method Details
-
setCharge
Sets the partial charge of this atom.- Parameters:
charge
- The partial charge- See Also:
-
getCharge
Double getCharge()Returns the partial charge of this atom.- Returns:
- the charge of this atom
- See Also:
-
setImplicitHydrogenCount
Sets the implicit hydrogen count of this atom.- Parameters:
hydrogenCount
- The number of hydrogen atoms bonded to this atom.- See Also:
-
getImplicitHydrogenCount
Integer getImplicitHydrogenCount()Returns the implicit hydrogen count of this atom.- Returns:
- The hydrogen count of this atom.
- See Also:
-
setPoint2d
void setPoint2d(javax.vecmath.Point2d point2d) Sets a point specifying the location of this atom in a 2D space.- Parameters:
point2d
- A point in a 2D plane- See Also:
-
setPoint3d
void setPoint3d(javax.vecmath.Point3d point3d) Sets a point specifying the location of this atom in 3D space.- Parameters:
point3d
- A point in a 3-dimensional space- See Also:
-
setFractionalPoint3d
void setFractionalPoint3d(javax.vecmath.Point3d point3d) Sets a point specifying the location of this atom in a Crystal unit cell.- Parameters:
point3d
- A point in a 3d fractional unit cell space- See Also:
-
setStereoParity
Deprecated.useIStereoElement
s for storing stereochemistrySets the stereo parity for this atom.- Parameters:
stereoParity
- The stereo parity for this atom- See Also:
-
getPoint2d
javax.vecmath.Point2d getPoint2d()Returns a point specifying the location of this atom in a 2D space.- Returns:
- A point in a 2D plane. Null if unset.
- See Also:
-
getPoint3d
javax.vecmath.Point3d getPoint3d()Returns a point specifying the location of this atom in a 3D space.- Returns:
- A point in 3-dimensional space. Null if unset.
- See Also:
-
getFractionalPoint3d
javax.vecmath.Point3d getFractionalPoint3d()Returns a point specifying the location of this atom in a Crystal unit cell.- Returns:
- A point in 3d fractional unit cell space. Null if unset.
- See Also:
-
getStereoParity
Deprecated.useIStereoElement
s for storing stereochemistryReturns the stereo parity of this atom. It uses the predefined values found in CDKConstants.- Returns:
- The stereo parity for this atom
- See Also:
-
getContainer
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'
- Returns:
- the atom container or null if not accessed in the context of a container
-
getIndex
int getIndex()Acces the index of an atom in the context of anIAtomContainer
. If the index is not known, < 0 is returned.- Returns:
- atom index or < 0 if the index is not known
-
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 ifgetIndex()
returns < 0 orgetContainer()
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()) { }
- Returns:
- iterable of bonds
- Throws:
UnsupportedOperationException
- thrown if the bonds are not known
-
getBondCount
int getBondCount()Get the number of explicit bonds connected to this atom.- Returns:
- the total bond count
-
getBond
Returns the bond connecting 'this' atom to the provided atom. If the atoms are not bonded, null is returned.- Parameters:
atom
- the other atom- Returns:
- the bond connecting the atoms
- Throws:
UnsupportedOperationException
- thrown if the bonds are not known
-
isAromatic
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.- Returns:
- aromatic status
- See Also:
-
setIsAromatic
void setIsAromatic(boolean arom) Mark this atom as being aromatic.- Parameters:
arom
- aromatic status- See Also:
-
isInRing
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.- Returns:
- ring status
- See Also:
-
setIsInRing
void setIsInRing(boolean ring) Mark this atom as being in a ring.- Parameters:
ring
- ring status- See Also:
-
getMapIdx
int getMapIdx()Access the map index for this atom.- Returns:
- the map index (0 if not set)
-
setMapIdx
void setMapIdx(int mapidx) Set the map index for this atom.- Parameters:
mapidx
- the new map index
-
clone
Returns a deep clone of this IChemObject.- Specified by:
clone
in interfaceIChemObject
- Returns:
- Object the clone of this IChemObject.
- Throws:
CloneNotSupportedException
- if the IChemObject cannot be cloned
-
IStereoElement
s for storing stereochemistry