org.openscience.cdk.interfaces
Interface IBond

All Superinterfaces:
Cloneable, ICDKObject, IChemObject, IElectronContainer
All Known Subinterfaces:
IQueryBond
All Known Implementing Classes:
AnyOrderQueryBond, AromaticOrSingleQueryBond, AromaticQueryBond, Bond, Bond, CTFileQueryBond, DebugBond, LogicalOperatorBond, OrderQueryBond, OrderQueryBond, OrderQueryBondOrderOnly, PharmacophoreAngleBond, PharmacophoreBond, PharmacophoreQueryAngleBond, PharmacophoreQueryBond, QueryBond, RingBond, SMARTSBond, StereoBond

public interface IBond
extends IElectronContainer

Implements the concept of a covalent bond between two or more atoms. A bond is considered to be a number of electrons connecting two ore more atoms. type filter text

Author:
egonw
Keywords:
bond, atom, electron
Created on:
2005-08-24
Belongs to CDK module:
interfaces
Source code:
cdk-1.4.x

Nested Class Summary
static class IBond.Order
          A list of permissible bond orders.
static class IBond.Stereo
          Enumeration of possible stereo types of two-atom bonds.
 
Method Summary
 Iterable<IAtom> atoms()
          Returns the Iterable to atoms making up this bond.
 boolean compare(Object object)
          Compares a bond with this bond.
 boolean contains(IAtom atom)
          Returns true if the given atom participates in this bond.
 javax.vecmath.Point2d get2DCenter()
          Returns the geometric 2D center of the bond.
 javax.vecmath.Point3d get3DCenter()
          Returns the geometric 3D center of the bond.
 IAtom getAtom(int position)
          Returns an Atom from this bond.
 int getAtomCount()
          Returns the number of Atoms in this Bond.
 IAtom getConnectedAtom(IAtom atom)
          Returns the atom connected to the given atom.
 IAtom[] getConnectedAtoms(IAtom atom)
          Returns all the atoms in the bond connected to the given atom.
 IBond.Order getOrder()
          Returns the bond order of this bond.
 IBond.Stereo getStereo()
          Returns the stereo descriptor for this bond.
 boolean isConnectedTo(IBond bond)
          Checks whether a bond is connected to another one.
 void setAtom(IAtom atom, int position)
          Sets an Atom in this bond.
 void setAtoms(IAtom[] atoms)
          Sets the array of atoms making up this bond.
 void setOrder(IBond.Order order)
          Sets the bond order of this bond.
 void setStereo(IBond.Stereo stereo)
          Sets the stereo descriptor for this bond.
 
Methods inherited from interface org.openscience.cdk.interfaces.IElectronContainer
getElectronCount, setElectronCount
 
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
 

Method Detail

atoms

Iterable<IAtom> atoms()
Returns the Iterable to atoms making up this bond.

Returns:
An Iterable to atoms participating in this bond
See Also:
setAtoms(org.openscience.cdk.interfaces.IAtom[])

setAtoms

void setAtoms(IAtom[] atoms)
Sets the array of atoms making up this bond.

Parameters:
atoms - An array of atoms that forms this bond
See Also:
atoms()

getAtomCount

int getAtomCount()
Returns the number of Atoms in this Bond.

Returns:
The number of Atoms in this Bond

getAtom

IAtom getAtom(int position)
Returns an Atom from this bond.

Parameters:
position - The position in this bond where the atom is
Returns:
The atom at the specified position
See Also:
setAtom(org.openscience.cdk.interfaces.IAtom, int)

getConnectedAtom

IAtom getConnectedAtom(IAtom atom)
Returns the atom connected to the given atom.

Parameters:
atom - The atom the bond partner is searched of
Returns:
the connected atom or null if the given atom is not part of the bond

getConnectedAtoms

IAtom[] getConnectedAtoms(IAtom atom)
Returns all the atoms in the bond connected to the given atom.

Parameters:
atom - The atoms the bond partner is searched of
Returns:
the connected atoms or null if the given atom is not part of the bond

contains

boolean contains(IAtom atom)
Returns true if the given atom participates in this bond.

Parameters:
atom - The atom to be tested if it participates in this bond
Returns:
true if the atom participates in this bond

setAtom

void setAtom(IAtom atom,
             int position)
Sets an Atom in this bond.

Parameters:
atom - The atom to be set
position - The position in this bond where the atom is to be inserted
See Also:
getAtom(int)

getOrder

IBond.Order getOrder()
Returns the bond order of this bond.

Returns:
The bond order of this bond
See Also:
org.openscience.cdk.CDKConstants for predefined values., setOrder(org.openscience.cdk.interfaces.IBond.Order)

setOrder

void setOrder(IBond.Order order)
Sets the bond order of this bond.

Parameters:
order - The bond order to be assigned to this bond
See Also:
for predefined values., getOrder()

getStereo

IBond.Stereo getStereo()
Returns the stereo descriptor for this bond.

Returns:
The stereo descriptor for this bond
See Also:
setStereo(org.openscience.cdk.interfaces.IBond.Stereo)

setStereo

void setStereo(IBond.Stereo stereo)
Sets the stereo descriptor for this bond.

Parameters:
stereo - The stereo descriptor to be assigned to this bond.
See Also:
getStereo()

get2DCenter

javax.vecmath.Point2d get2DCenter()
Returns the geometric 2D center of the bond.

Returns:
The geometric 2D center of the bond

get3DCenter

javax.vecmath.Point3d get3DCenter()
Returns the geometric 3D center of the bond.

Returns:
The geometric 3D center of the bond

compare

boolean compare(Object object)
Compares a bond with this bond.

Parameters:
object - Object of type Bond
Returns:
Return true, if the bond is equal to this bond

isConnectedTo

boolean isConnectedTo(IBond bond)
Checks whether a bond is connected to another one. This can only be true if the bonds have an Atom in common.

Parameters:
bond - The bond which is checked to be connect with this one
Returns:
True, if the bonds share an atom, otherwise false