public interface IBond extends IElectronContainer
Modifier and Type | Interface and Description |
---|---|
static class |
IBond.Display
Bond display style, controlling how bonds appear in a 2D depiction.
|
static class |
IBond.Order
A list of permissible bond orders.
|
static class |
IBond.Stereo
Enumeration of possible stereo types of two-atom bonds.
|
Modifier and Type | Method and Description |
---|---|
Iterable<IAtom> |
atoms()
Returns the Iterable to atoms making up this bond.
|
IBond |
clone()
Returns a deep clone of this IChemObject.
|
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 |
getBegin()
Access the begin (or first) atom of the bond.
|
IAtom |
getConnectedAtom(IAtom atom)
Deprecated.
use the method
getOther(IAtom) |
IAtom[] |
getConnectedAtoms(IAtom atom)
Returns all the atoms in the bond connected to the given atom.
|
IAtomContainer |
getContainer() |
IBond.Display |
getDisplay()
Access the bond display style.
|
IAtom |
getEnd()
Access the end (or second) atom of the bond.
|
int |
getIndex() |
IBond.Order |
getOrder()
Returns the bond order of this bond.
|
IAtom |
getOther(IAtom atom)
Returns the other atom in the bond, the atom is connected to the given atom.This
method is only correct for two-centre bonds, for n-centre bonds the behaviour is undefined
and the more correct
getConnectedAtoms(IAtom) should be used. |
IBond.Stereo |
getStereo()
Returns the stereo descriptor for this bond.
|
boolean |
isAromatic()
Access whether this bond has been marked as aromatic.
|
boolean |
isConnectedTo(IBond bond)
Checks whether a bond is connected to another one.
|
boolean |
isInRing()
Access whether this bond has been flagged as in a ring.
|
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 |
setDisplay(IBond.Display display)
Set the bond display style.
|
void |
setIsAromatic(boolean arom)
Mark this bond as being aromatic.
|
void |
setIsInRing(boolean ring)
Mark this bond as being in a ring.
|
void |
setOrder(IBond.Order order)
Sets the bond order of this bond.
|
void |
setStereo(IBond.Stereo stereo)
Sets the stereo descriptor for this bond.
|
getElectronCount, setElectronCount
addListener, addProperties, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty, toString
getBuilder
Iterable<IAtom> atoms()
setAtoms(org.openscience.cdk.interfaces.IAtom[])
void setAtoms(IAtom[] atoms)
atoms
- An array of atoms that forms this bondatoms()
IAtom getBegin()
IAtom getEnd()
int getIndex()
IAtomContainer getContainer()
int getAtomCount()
IAtom getAtom(int position)
position
- The position in this bond where the atom issetAtom(org.openscience.cdk.interfaces.IAtom, int)
@Deprecated IAtom getConnectedAtom(IAtom atom)
getOther(IAtom)
getConnectedAtoms(IAtom)
should be used.
IAtom beg = bond.getBegin();
IAtom end = bond.getEnd();
// bond.getConnectedAtom(beg) == end
// bond.getConnectedAtom(end) == beg
atom
- The atom the bond partner is searched ofIAtom getOther(IAtom atom)
getConnectedAtoms(IAtom)
should be used.
IAtom beg = bond.getBegin();
IAtom end = bond.getEnd();
// bond.getOther(beg) == end
// bond.getOther(end) == beg
atom
- The atom the bond partner is searched ofIAtom[] getConnectedAtoms(IAtom atom)
atom
- The atoms the bond partner is searched ofboolean contains(IAtom atom)
atom
- The atom to be tested if it participates in this bondvoid setAtom(IAtom atom, int position)
atom
- The atom to be setposition
- The position in this bond where the atom is to be insertedgetAtom(int)
IBond.Order getOrder()
org.openscience.cdk.CDKConstants
for predefined values.
,
setOrder(org.openscience.cdk.interfaces.IBond.Order)
void setOrder(IBond.Order order)
order
- The bond order to be assigned to this bondfor predefined values.
,
getOrder()
IBond.Stereo getStereo()
setStereo(org.openscience.cdk.interfaces.IBond.Stereo)
void setStereo(IBond.Stereo stereo)
stereo
- The stereo descriptor to be assigned to this bond.getStereo()
,
setDisplay(Display)
IBond.Display getDisplay()
void setDisplay(IBond.Display display)
display
- the displayjavax.vecmath.Point2d get2DCenter()
javax.vecmath.Point3d get3DCenter()
boolean compare(Object object)
object
- Object of type Bondboolean isConnectedTo(IBond bond)
bond
- The bond which is checked to be connect with this oneboolean isAromatic()
IChemObject.getFlag(int)
,
Aromaticity
void setIsAromatic(boolean arom)
arom
- aromatic statusIChemObject.setFlag(int, boolean)
boolean isInRing()
IChemObject.getFlag(int)
,
RingSearch
void setIsInRing(boolean ring)
ring
- ring statusIChemObject.setFlag(int, boolean)
IBond clone() throws CloneNotSupportedException
clone
in interface IChemObject
CloneNotSupportedException
- if the IChemObject cannot be clonedCopyright © 2021. All rights reserved.