Package org.openscience.cdk.interfaces
Interface IRing
-
- All Superinterfaces:
Cloneable
,IAtomContainer
,ICDKObject
,IChemObject
,IChemObjectListener
public interface IRing extends IAtomContainer
Class representing a ring structure in a molecule. A ring is a linear sequence of N atoms interconnected to each other by covalent bonds, such that atom i (1 < i < N) is bonded to atom i-1 and atom i + 1 and atom 1 is bonded to atom N and atom 2.- Source code:
- main
- Belongs to CDK module:
- interfaces
- Keywords:
- ring
-
-
Field Summary
-
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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IRing
clone()
Returns a deep clone of this IChemObject.int
getBondOrderSum()
Returns the sum of all bond orders in the ring.IBond
getNextBond(IBond bond, IAtom atom)
Returns the next bond in order, relative to a given bond and atom.int
getRingSize()
Returns the number of atoms/bonds in this ring.-
Methods inherited from interface org.openscience.cdk.interfaces.IAtomContainer
add, addAtom, addBond, addBond, addBond, addElectronContainer, addLonePair, addLonePair, addSingleElectron, addSingleElectron, addStereoElement, atoms, bonds, contains, contains, contains, contains, contains, electronContainers, getAtom, getAtomCount, getAtomNumber, getBond, getBond, getBondCount, getBondNumber, getBondNumber, getBondOrderSum, getConnectedAtomsCount, getConnectedAtomsList, getConnectedBondsCount, getConnectedBondsCount, getConnectedBondsList, getConnectedElectronContainersList, getConnectedLonePairsCount, getConnectedLonePairsList, getConnectedSingleElectronsCount, getConnectedSingleElectronsList, getElectronContainer, getElectronContainerCount, getFirstAtom, getLastAtom, getLonePair, getLonePairCount, getLonePairNumber, getMaximumBondOrder, getMinimumBondOrder, getSingleElectron, getSingleElectronCount, getSingleElectronNumber, getTitle, indexOf, indexOf, indexOf, indexOf, isEmpty, lonePairs, newAtom, newAtom, newAtom, newAtom, newBond, newBond, remove, removeAllBonds, removeAllElectronContainers, removeAllElements, removeAtom, removeAtom, removeAtomAndConnectedElectronContainers, removeAtomOnly, removeAtomOnly, removeBond, removeBond, removeBond, removeElectronContainer, removeElectronContainer, removeLonePair, removeLonePair, removeSingleElectron, removeSingleElectron, setAtom, setAtoms, setBonds, setStereoElements, setTitle, singleElectrons, stereoElements
-
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
-
Methods inherited from interface org.openscience.cdk.interfaces.IChemObjectListener
stateChanged
-
-
-
-
Method Detail
-
getRingSize
int getRingSize()
Returns the number of atoms/bonds in this ring.- Returns:
- The number of atoms/bonds in this ring
-
getNextBond
IBond getNextBond(IBond bond, IAtom atom)
Returns the next bond in order, relative to a given bond and atom. Example: Let the ring be composed of 0-1, 1-2, 2-3 and 3-0. A request getNextBond(1-2, 2) will return Bond 2-3.- Parameters:
bond
- A bond for which an atom from a consecutive bond is soughtatom
- A atom from the bond above to assign a search direction- Returns:
- The next bond in the order given by the above assignment
-
getBondOrderSum
int getBondOrderSum()
Returns the sum of all bond orders in the ring.- Returns:
- the sum of all bond orders in the ring
-
clone
IRing clone() throws CloneNotSupportedException
Returns a deep clone of this IChemObject.- Specified by:
clone
in interfaceIAtomContainer
- Specified by:
clone
in interfaceIChemObject
- Returns:
- Object the clone of this IChemObject.
- Throws:
CloneNotSupportedException
- if the IChemObject cannot be cloned
-
-