|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IAtomContainer
Base class for all chemical objects that maintain a list of Atoms and ElectronContainers.
Looping over all IBonds in the IAtomContainer
is typically done like:
for (IBond bond : atomContainer.bonds()) {
// do something
}
If you do need an explicit Iterator then use
IteratorbondIter = atomContainer.bonds().iterator();
| Method Summary | |
|---|---|
void |
add(IAtomContainer atomContainer)
Adds all atoms and electronContainers of a given atomcontainer to this container. |
void |
addAtom(IAtom atom)
Adds an atom to this container. |
void |
addBond(IBond bond)
Adds a Bond to this AtomContainer. |
void |
addBond(int atom1,
int atom2,
IBond.Order order)
Adds a bond to this container. |
void |
addBond(int atom1,
int atom2,
IBond.Order order,
IBond.Stereo stereo)
Adds a bond to this container. |
void |
addElectronContainer(IElectronContainer electronContainer)
Adds a ElectronContainer to this AtomContainer. |
void |
addLonePair(ILonePair lonePair)
Adds a lone pair to this AtomContainer. |
void |
addLonePair(int atomID)
Adds a LonePair to this Atom. |
void |
addSingleElectron(int atomID)
Adds a SingleElectron to this Atom. |
void |
addSingleElectron(ISingleElectron singleElectron)
Adds a single electron to this AtomContainer. |
void |
addStereoElement(IStereoElement element)
Adds a stereo element to this container. |
Iterable<IAtom> |
atoms()
Returns an Iterable for looping over all atoms in this container. |
Iterable<IBond> |
bonds()
Returns an Iterable for looping over all bonds in this container. |
boolean |
contains(IAtom atom)
True, if the AtomContainer contains the given atom object. |
boolean |
contains(IBond bond)
True, if the AtomContainer contains the given bond object. |
boolean |
contains(IElectronContainer electronContainer)
True, if the AtomContainer contains the given ElectronContainer object. |
boolean |
contains(ILonePair lonePair)
True, if the AtomContainer contains the given LonePair object. |
boolean |
contains(ISingleElectron singleElectron)
True, if the AtomContainer contains the given SingleElectron object. |
Iterable<IElectronContainer> |
electronContainers()
Returns an Iterable for looping over all electron containers in this container. |
IAtom |
getAtom(int number)
Get the atom at position number in [0,..]. |
int |
getAtomCount()
Returns the number of Atoms in this Container. |
int |
getAtomNumber(IAtom atom)
Returns the position of a given atom in the atoms array. |
IBond |
getBond(IAtom atom1,
IAtom atom2)
Returns the bond that connectes the two given atoms. |
IBond |
getBond(int number)
Get the bond at position number in [0,..]. |
int |
getBondCount()
Returns the number of Bonds in this Container. |
int |
getBondNumber(IAtom atom1,
IAtom atom2)
Returns the position of the bond between two given atoms in the electronContainers array. |
int |
getBondNumber(IBond bond)
Returns the position of a given bond in the electronContainers array. |
double |
getBondOrderSum(IAtom atom)
Returns the sum of the bond orders for a given Atom. |
int |
getConnectedAtomsCount(IAtom atom)
Returns the number of atoms connected to the given atom. |
List<IAtom> |
getConnectedAtomsList(IAtom atom)
Returns an ArrayList of all atoms connected to the given atom. |
int |
getConnectedBondsCount(IAtom atom)
Returns the number of Bonds for a given Atom. |
int |
getConnectedBondsCount(int atomnumber)
Returns the number of connected atoms (degree) to the given atom. |
List<IBond> |
getConnectedBondsList(IAtom atom)
Returns an ArrayList of all Bonds connected to the given atom. |
List<IElectronContainer> |
getConnectedElectronContainersList(IAtom atom)
Returns an ArrayList of all electronContainers connected to the given atom. |
int |
getConnectedLonePairsCount(IAtom atom)
Returns the number of LonePairs for a given Atom. |
List<ILonePair> |
getConnectedLonePairsList(IAtom atom)
Returns the array of lone pairs connected to an atom. |
int |
getConnectedSingleElectronsCount(IAtom atom)
Returns the sum of the SingleElectron for a given Atom. |
List<ISingleElectron> |
getConnectedSingleElectronsList(IAtom atom)
Returns an array of all SingleElectron connected to the given atom. |
IElectronContainer |
getElectronContainer(int number)
Returns the ElectronContainer at position number in the
container. |
int |
getElectronContainerCount()
Returns the number of ElectronContainers in this Container. |
IAtom |
getFirstAtom()
Returns the atom at position 0 in the container. |
IAtom |
getLastAtom()
Returns the atom at the last position in the container. |
ILonePair |
getLonePair(int number)
Get the lone pair at position number in [0,..]. |
int |
getLonePairCount()
Returns the number of LonePairs in this Container. |
int |
getLonePairNumber(ILonePair lonePair)
Returns the position of a given lone pair in the lone pair array. |
IBond.Order |
getMaximumBondOrder(IAtom atom)
Returns the maximum bond order that this atom currently has in the context of this AtomContainer. |
IBond.Order |
getMinimumBondOrder(IAtom atom)
Returns the minimum bond order that this atom currently has in the context of this AtomContainer. |
ISingleElectron |
getSingleElectron(int number)
Get the single electron at position number in [0,..]. |
int |
getSingleElectronCount()
Returns the number of the single electrons in this container. |
int |
getSingleElectronNumber(ISingleElectron singleElectron)
Returns the position of a given single electron in the single electron array. |
Iterable<ILonePair> |
lonePairs()
Returns an Iterable for looping over all lone pairs in this container. |
void |
remove(IAtomContainer atomContainer)
Removes all atoms and electronContainers of a given atomcontainer from this container. |
void |
removeAllBonds()
Removes all Bonds from this container. |
void |
removeAllElectronContainers()
Removes electronContainers from this container. |
void |
removeAllElements()
Removes all atoms and bond from this container. |
void |
removeAtom(IAtom atom)
Removes the given atom from the AtomContainer. |
void |
removeAtom(int position)
Removes the atom at the given position from the AtomContainer. |
void |
removeAtomAndConnectedElectronContainers(IAtom atom)
Removes the given atom and all connected electronContainers from the AtomContainer. |
IBond |
removeBond(IAtom atom1,
IAtom atom2)
Removes the bond that connects the two given atoms. |
void |
removeBond(IBond bond)
Removes the bond from this container. |
IBond |
removeBond(int position)
Removes the bond at the given position from the AtomContainer. |
void |
removeElectronContainer(IElectronContainer electronContainer)
Removes this ElectronContainer from this container. |
IElectronContainer |
removeElectronContainer(int position)
Removes the bond at the given position from this container. |
void |
removeLonePair(ILonePair lonePair)
Removes the lone pair from the AtomContainer. |
ILonePair |
removeLonePair(int position)
Removes the lone pair at the given position from the AtomContainer. |
ISingleElectron |
removeSingleElectron(int position)
Removes the single electron at the given position from the AtomContainer. |
void |
removeSingleElectron(ISingleElectron singleElectron)
Removes the single electron from the AtomContainer. |
void |
setAtom(int number,
IAtom atom)
Set the atom at position number in [0,..]. |
void |
setAtoms(IAtom[] atoms)
Sets the array of atoms of this AtomContainer. |
void |
setBonds(IBond[] bonds)
Sets the array of bonds of this AtomContainer. |
Iterable<ISingleElectron> |
singleElectrons()
Returns an Iterable for looping over all single electrons in this container. |
Iterable<IStereoElement> |
stereoElements()
Returns the stereo elements defined for this atom container. |
| Methods inherited from interface org.openscience.cdk.interfaces.IChemObject |
|---|
addListener, clone, getFlag, getFlags, getID, getListenerCount, getNotification, getProperties, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty, toString |
| Methods inherited from interface org.openscience.cdk.interfaces.ICDKObject |
|---|
getBuilder |
| Methods inherited from interface org.openscience.cdk.interfaces.IChemObjectListener |
|---|
stateChanged |
| Method Detail |
|---|
void addStereoElement(IStereoElement element)
element - The new IStereoElement for this containerstereoElements()Iterable<IStereoElement> stereoElements()
Iterable of IStereoElements.addStereoElement(IStereoElement)void setAtoms(IAtom[] atoms)
atoms - The array of atoms to be assigned to this AtomContaineratoms()void setBonds(IBond[] bonds)
bonds - The array of bonds to be assigned to
this AtomContainerbonds()
void setAtom(int number,
IAtom atom)
number in [0,..].
number - The position of the atom to be set.atom - The atom to be stored at position numbergetAtom(int)IAtom getAtom(int number)
number in [0,..].
number - The position of the atom to be retrieved.
setAtom(int, org.openscience.cdk.interfaces.IAtom)IBond getBond(int number)
number in [0,..].
number - The position of the bond to be retrieved.
ILonePair getLonePair(int number)
number in [0,..].
number - The position of the LonePair to be retrieved.
ISingleElectron getSingleElectron(int number)
number in [0,..].
number - The position of the SingleElectron to be retrieved.
Iterable<IAtom> atoms()
Iterable<IBond> bonds()
Iterable<ILonePair> lonePairs()
Iterable<ISingleElectron> singleElectrons()
Iterable<IElectronContainer> electronContainers()
IAtom getFirstAtom()
IAtom getLastAtom()
int getAtomNumber(IAtom atom)
atom - The atom to be sought
int getBondNumber(IAtom atom1,
IAtom atom2)
atom1 - The first atomatom2 - The second atom
int getBondNumber(IBond bond)
bond - The bond to be sought
int getLonePairNumber(ILonePair lonePair)
lonePair - The lone pair to be sought
int getSingleElectronNumber(ISingleElectron singleElectron)
singleElectron - The single electron to be sought
IElectronContainer getElectronContainer(int number)
number in the
container.
number - The position of the ElectronContainer to be returned.
number.addElectronContainer(IElectronContainer)
IBond getBond(IAtom atom1,
IAtom atom2)
atom1 - The first atomatom2 - The second atom
int getAtomCount()
int getBondCount()
int getLonePairCount()
int getSingleElectronCount()
int getElectronContainerCount()
List<IAtom> getConnectedAtomsList(IAtom atom)
atom - The atom the bond partners are searched of.
List<IBond> getConnectedBondsList(IAtom atom)
atom - The atom the connected bonds are searched of
List<ILonePair> getConnectedLonePairsList(IAtom atom)
atom - The atom for which to get lone pairs
List<ISingleElectron> getConnectedSingleElectronsList(IAtom atom)
atom - The atom on which the single electron is located
List<IElectronContainer> getConnectedElectronContainersList(IAtom atom)
atom - The atom the connected electronContainers are searched of
int getConnectedAtomsCount(IAtom atom)
atom - The atom the number of bond partners are searched of.
int getConnectedBondsCount(IAtom atom)
atom - The atom
int getConnectedBondsCount(int atomnumber)
atomnumber - The atomnumber the degree is searched for
int getConnectedLonePairsCount(IAtom atom)
atom - The atom
int getConnectedSingleElectronsCount(IAtom atom)
atom - The atom on which the single electron is located
double getBondOrderSum(IAtom atom)
atom - The atom
IBond.Order getMaximumBondOrder(IAtom atom)
atom - The atom
IBond.Order getMinimumBondOrder(IAtom atom)
atom - The atom
void add(IAtomContainer atomContainer)
atomContainer - The atomcontainer to be addedvoid addAtom(IAtom atom)
atom - The atom to be added to this containervoid addBond(IBond bond)
bond - The bond to added to this containervoid addLonePair(ILonePair lonePair)
lonePair - The LonePair to added to this containervoid addSingleElectron(ISingleElectron singleElectron)
singleElectron - The SingleElectron to added to this containervoid addElectronContainer(IElectronContainer electronContainer)
electronContainer - The ElectronContainer to added to this containervoid remove(IAtomContainer atomContainer)
atomContainer - The atomcontainer to be removedvoid removeAtom(int position)
position - The position of the atom to be removed.void removeAtom(IAtom atom)
atom - The atom to be removedIBond removeBond(int position)
position - The position of the bond to be removed.
IBond removeBond(IAtom atom1,
IAtom atom2)
atom1 - The first atomatom2 - The second atom
void removeBond(IBond bond)
bond - The bond to be removed.ILonePair removeLonePair(int position)
position - The position of the LonePair to be removed.
void removeLonePair(ILonePair lonePair)
lonePair - The LonePair to be removed.ISingleElectron removeSingleElectron(int position)
position - The position of the SingleElectron to be removed.
void removeSingleElectron(ISingleElectron singleElectron)
singleElectron - The SingleElectron to be removed.IElectronContainer removeElectronContainer(int position)
position - The position of the bond in the electronContainers array
void removeElectronContainer(IElectronContainer electronContainer)
electronContainer - The electronContainer to be removedvoid removeAtomAndConnectedElectronContainers(IAtom atom)
atom - The atom to be removedvoid removeAllElements()
void removeAllElectronContainers()
void removeAllBonds()
void addBond(int atom1,
int atom2,
IBond.Order order,
IBond.Stereo stereo)
atom1 - Id of the first atom of the Bond in [0,..]atom2 - Id of the second atom of the Bond in [0,..]order - Bondorderstereo - Stereochemical orientation
void addBond(int atom1,
int atom2,
IBond.Order order)
atom1 - Id of the first atom of the Bond in [0,..]atom2 - Id of the second atom of the Bond in [0,..]order - Bondordervoid addLonePair(int atomID)
atomID - The atom number to which the LonePair is added in [0,..]void addSingleElectron(int atomID)
atomID - The atom number to which the SingleElectron is added in [0,..]boolean contains(IAtom atom)
atom - the atom this AtomContainer is searched for
boolean contains(IBond bond)
bond - the bond this AtomContainer is searched for
boolean contains(ILonePair lonePair)
lonePair - the LonePair this AtomContainer is searched for
boolean contains(ISingleElectron singleElectron)
singleElectron - the SingleElectron this AtomContainer is searched for
boolean contains(IElectronContainer electronContainer)
electronContainer - ElectronContainer that is searched for
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||