Next: Constructors
Up: BaseMolecule
Previous: BaseMolecule
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:
- N atoms, which are added to the system as they are read in from some source. Each atom has associated with it several names, which help to
distinguish the atoms and make it possible for the VMD atom selection
mechanism to choose subsets of atoms. These names are:
- The atom name, which is usually a standard chemical
nomenclature name. For example, alpha carbons in proteins have the name
CA.
- The atom type, which for some molecular data files is a
name from a much smaller set of total names, used to classify atoms into
small sets which are more manageable. For example, PSF files use atom types
to simplify the parameterization of the atoms for molecular dynamics
simulations. If the atom type is not known from the input files, it is just
set to be the same as the atom name.
- The residue name, a three-letter code which is usually
quite standard. All glycine amino acids, for example, are in residues with
the name GLY.
- The residue ID, a numeric value assigned to the residues in
a molecule, quite often in increasing order from one end of a linear chain
to another. Particular useful in proteins, which are unbranched polymers.
- The chain ID, a single-letter code used to distinguish atoms
among different subcomponents of a molecule. If it is unknown for an atom,
it is given a default value of `X'.
- The segment name, similar to the chain ID but allowed to be
up to four characters. This is not as standard as the chain ID, and if it
is unknown it will be given a default value of MAIN.
- N bonds, which are added to the system as they are read in or
calculated by a derived class. The bonds are not stored directly in a list,
however; instead, each atom stores a list of the bonds it participates in,
which makes it much faster to display the molecule.
- N protein backbone bonds, and N nucleic-acid backbone bonds,
which are determined by BaseMolecule after the atoms and bonds are
added.
- N residues, where each residue is a collection of atoms and bonds
which form some subunit.
- N segments, which each consist of a collection of atoms in a
functional substructure within the molecule. For example, quite often a
protein is a segment, and surrounding water molecules are another segment.
- N fragments, where each fragment is a collection of connected
residues. If a system consists of three disconnected alpha helices, for
example, then each helix would be a separate fragment. There are lists of
protein fragments as well as nucleic acid fragments.
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: Constructors
Up: BaseMolecule
Previous: BaseMolecule
Justin Gullingsrud
Tue Apr 6 09:26:48 CDT 1999