Copyright © 1996 by the Regents of the University of California.
CoordSet Interface
The CoordSet interface provides the base level functionality
having multiple coordinate sets in a molecule.
The interface provides a CoordSet class
and modifies the Molecule and Atom classes.
The CoordSet interface depends on the
Molecule,
Coord, and
Atom interfaces.
CoordSet Member Functions
-
CoordSet(int id)
-
Constructor.
-
int id()
-
Return coordinate set identifier.
Atom Member Functions
-
int coordIndex() const
-
Return the coordinate list index. -1 if the index has not been set yet.
-
Coord *getCoord() const
-
Return a pointer to the Coord coordinate class instance for this atom
in the molecule's active coordinate set.
The coordinate list index is set if it hasn't been assigned yet.
-
Coord *getCoord(CoordSet *cs) const
-
Return a pointer to the Coord coordinate class instance for this atom
in the given coordinate set.
The coordinate list index is set if it hasn't been assigned yet.
Molecule Member Functions
-
CoordSet *activeCoordSet() const
-
Return the active coordinate set.
-
void setActiveCoordSet(CoordSet *a)
-
Set the active coordinate set.
(And
genlib generated functions: coordSets(), findCoordSet(), etc.)
Implementations
- CoordSet_default
-
The CoordSet_default implementation uses
a vector to hold Coord's by value in a CoordSet,
a map indexed by integers to hold CoordSet pointers in a Molecule,
and adds a back pointer from Atom to Molecule;
Greg Couch, UCSF Computer Graphics Laboratory