Copyright © 1996 by the Regents of the University of California.
Bond Interface
The Bond interface provides the base level functionality
for the Bond class.
It also extends the Atom class to keep track of bonds.
The Bond interface depends on the
Molecule and
Atom interfaces.
Bond Member Functions
-
Bond(Atom *atom0, Atom *atom1)
Bond(Atom *atom0, Atom *atom1, float order)
Bond(Atom *a[2])
Bond(Atom *a[2], float order)
-
Constructors.
The bond order defaults to 1.0.
The end points of the bond can be given separately or as a pair.
-
float order()
-
Return the bond order.
-
void setOrder(float o)
-
Set the bond order.
-
Atom *otherAtom(Atom *a)
-
Returns a pointer to the atom at the other end of the bond
or NULL if the given atom isn't part of the bond.
(And
genlib generated functions: atoms(), findAtom(), etc.)
Atom Member Functions
-
Bond *isConnectedTo(Atom *a)
-
Returns the bond that connects this atom to the given atom
or NULL if they aren't connected.
(And
genlib generated functions: bonds(), findBond(), etc.)
Implementations
- Bond_default
-
The Bond_default implementation uses
a array of length 2 to hold the Atom pointers in a Bond,
a vector to hold the Bond pointers in an Atom,
and a set to hold the Bond pointers in a Molecule.
Greg Couch, UCSF Computer Graphics Laboratory