3
* $Date: 2007-02-16 13:56:34 +0100 (Fri, 16 Feb 2007) $
6
* Copyright (C) 2006-2007 Egon Willighagen <egonw@users.sf.net>
8
* Contact: cdk-devel@lists.sourceforge.net
10
* This program is free software; you can redistribute it and/or
11
* modify it under the terms of the GNU Lesser General Public License
12
* as published by the Free Software Foundation; either version 2.1
13
* of the License, or (at your option) any later version.
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU Lesser General Public License for more details.
20
* You should have received a copy of the GNU Lesser General Public License
21
* along with this program; if not, write to the Free Software
22
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
24
package org.openscience.cdk.interfaces;
26
import javax.vecmath.Point2d;
27
import javax.vecmath.Point3d;
30
* Implements the concept of a covalent bond between two or more atoms. A bond is
31
* considered to be a number of electrons connecting two ore more atoms.
33
* @cdk.module interfaces
36
* @cdk.created 2005-08-24
39
* @cdk.keyword electron
41
public interface IBond extends IElectronContainer {
44
* Returns the Iterator to atoms making up this bond.
46
*@return An Iterator to atoms participating in this bond
49
public java.util.Iterator atoms();
52
* Sets the array of atoms making up this bond.
54
* @param atoms An array of atoms that forms this bond
57
public void setAtoms(IAtom[] atoms);
60
* Returns the number of Atoms in this Bond.
62
* @return The number of Atoms in this Bond
64
public int getAtomCount();
67
* Returns an Atom from this bond.
69
* @param position The position in this bond where the atom is
70
* @return The atom at the specified position
73
public IAtom getAtom(int position);
77
* Returns the atom connected to the given atom.
79
* @param atom The atom the bond partner is searched of
80
* @return the connected atom or null
82
public IAtom getConnectedAtom(IAtom atom);
85
* Returns true if the given atom participates in this bond.
87
* @param atom The atom to be tested if it participates in this bond
88
* @return true if the atom participates in this bond
90
public boolean contains(IAtom atom);
93
* Sets an Atom in this bond.
95
* @param atom The atom to be set
96
* @param position The position in this bond where the atom is to be inserted
99
public void setAtom(IAtom atom, int position);
102
* Returns the bond order of this bond.
104
* @return The bond order of this bond
105
* @see org.openscience.cdk.CDKConstants org.openscience.cdk.CDKConstants
106
* for predefined values.
109
public double getOrder();
112
* Sets the bond order of this bond.
114
* @param order The bond order to be assigned to this bond
115
* @see org.openscience.cdk.CDKConstants for predefined values.
118
public void setOrder(double order);
121
* Returns the stereo descriptor for this bond.
123
* @return The stereo descriptor for this bond
125
* @see org.openscience.cdk.CDKConstants for predefined values.
127
public int getStereo();
130
* Sets the stereo descriptor for this bond.
132
* @param stereo The stereo descriptor to be assigned to this bond.
134
* @see org.openscience.cdk.CDKConstants for predefined values.
136
public void setStereo(int stereo);
139
* Returns the geometric 2D center of the bond.
141
* @return The geometric 2D center of the bond
143
public Point2d get2DCenter();
146
* Returns the geometric 3D center of the bond.
148
* @return The geometric 3D center of the bond
150
public Point3d get3DCenter();
153
* Compares a bond with this bond.
155
* @param object Object of type Bond
156
* @return Return true, if the bond is equal to this bond
158
public boolean compare(Object object);
161
* Checks wether a bond is connected to another one.
162
* This can only be true if the bonds have an Atom in common.
164
* @param bond The bond which is checked to be connect with this one
165
* @return True, if the bonds share an atom, otherwise false
167
public boolean isConnectedTo(IBond bond);