Copyright © 1996 by the Regents of the University of California.

Residue Interface

The Residue interface provides the base level functionality for the Residue class. The Residue class maintains the residue type and residue sequence number information. The Residue interface depends on the Molecule and Atom interfaces. And it uses the MolResId class from the Molecule Toolkit support library.

Residue Member Functions

Residue(Symbol type, MolResId id)
Residue(Symbol type, Symbol chain, int pos, char insert)
Constructors. The type argument should be a one to four letter code (although there is no limit) that identifies what kind of residue it is (e.g., ALA, GLY, TRP, A, C, T, G, etc.). The residue identifier given, either as a MolResId or as the (chain, position, insertion code) triple, should be unique within a molecule.
Symbol type() const
Return the residue type.
void setType(Symbol t)
Set the residue type.
const MolResId &id() const
Return the residue identifier.
int operator==(const Residue &r) const
Equality is based on the residue sequence number numbers being the same.
int operator<(const Residue &r) const
Less than is based on the residue sequence numbers.

Implementations

Residue_default
The Residue_default implementation uses a vector to hold Atom pointers in a Residue, and a set to hold Residue pointers in a Molecule.

Greg Couch, UCSF Computer Graphics Laboratory