next up previous contents
Next: Constructors Up: BaseMolecule Previous: BaseMolecule

Description

BaseMolecule is the second-highest level in the class hierarchy for Molecule objects; it is derived from Animation, and is used to store the static information for the molecule, which is the basic information about the structure and contents of the system which do not change with time. BaseMolecule has no ability to read in this information itself, instead it provides routines which derived classes call in order to add new molecules, bonds, etc. to the molecule. BaseMolecule has no responsibility for graphically displaying the molecule, either; that is left to the DrawMolecule class, which is derived from BaseMolecule and Displayable.

You do not ever create a BaseMolecule instance directly, instead you create an instance of a class derived from Molecule, for which BaseMolecule is a base class (among others). When initially created, a new BaseMolecule is empty, with zero atoms and zero bonds. The derived classes contain the actual code to read in the molecular structure from a file or from a network connection, and they add the components to the internal storage via routines in BaseMolecule. When all the structure is completely read in, then routine are called in BaseMolecule to analyze the structure, and calculate such things as what atoms are in what residues, how many residues there are, what are the backbone bonds, etc. In fact, a molecule contains these structural features which are either directly added to BaseMolecule, or calculated by BaseMolecule after the basic structure is read in:

After the atoms and bonds are added to the BaseMolecule, then the connectivity is analyzed and the names of the atoms are used to find the backbone bonds, the residues in the system, and the fragments. Atoms, bonds, residues, and other components are numbered 0 ... N-1 in their respective lists.

One other item which BaseMolecule stores is the unique molecule ID number, which is assigned when the molecule is created. Each new molecule in VMD gets assigned an integer ID. The assigned ID values increase by one as each new system is loaded. The commands used to affect the molecules use these ID numbers to determine which molecule the command should affect. The name of the molecule displayed in the Molecule on-screen menu form has this ID number appended to the end of it.


next up previous contents
Next: Constructors Up: BaseMolecule Previous: BaseMolecule

Justin Gullingsrud
Tue Apr 6 09:26:48 CDT 1999