Analysis and manipulation

This chapter describes operations that are used to analyze molecular systems and to apply specific manipulations.


Properties of chemical objects and collections

Many operations access and modify various properties of an object. They are defined for the most general type of object: anything that can be broken down to atoms, i.e. atoms, molecules, collections, universes, etc. All operations are methods to be called on an object. Only operations not already treated in the section "Analyzing and modifying coordinates" are described here.

Some additional operations are available only for all chemical objects (atoms, molecules, etc.):

Other operations are defined only for collections and universes:

Collections and universes can also be used as sequence objects, i.e. len() returns the number of chemical objects they contain, indexing extracts individual chemical objects, and for-loops can be used to iterate over the objects.


Operations on peptide chains and proteins

A number of operations defined on proteins or peptide chains make use of the special structure of these objects. Of course, peptide chains are special molecules, and proteins are special complexes; therefore, all the operations on the basic types are also available for peptide chains and proteins.

The following methods are defined on peptide chains and proteins:

Peptide chains have three additional methods:

Proteins offer the method setConfiguration(configuration), which sets the current configuration of the protein. The parameter must be either a PDB configuration read from a PDB file, or a filename indicating a PDB file from which the configuration is to be read.

Both proteins and peptide chains are sequence objects, i.e. they can be asked for their length, asked for a specific element, and iterated over with a for-loop. The items of a protein are its chains; the items of a peptide chain are the residues, starting at the C terminus.


Surfaces and volumes

Surfaces and volumes can be analyzed for any collection of atoms. Both quantities are defined by assigning a radius to each atom; the surface of the resulting conglomerate of overlapping spheres is taken to be the surface of the atom group. Atom radii for surface determination are usually called "van der Waals radii", but there is no unique method for determining them. MMTK uses the values from A. Bondi, van der Waals Volumes and Radii, J. Phys. Chem. 68 (1964), p. 441-451. However, users can change these values for each individual atom by assigning a new value to the attribute "vdW_radius".

The method surfaceAndVolume() returns the surface and its enclosed volume as a tuple. An optional argument specifies a probe radius, i.e. a radius added to each atom radius before the calculation. Its default value is zero. The method surfaceAtoms() (also with an optional probe radius argument) returns a dictionary whose keys are the surface atoms and whose values are the exposed surface areas of the individual atoms.

A related operation is the determination of contacts between two groups of atoms. The method findContacts(other_group) returns a list of contacts. Two optional arguments determine which distances are counted as contacts: a factor f (default 1) and an offset o (default 0). Two atoms are considered to form a contact if their distance is less than f*(r1+r2+o), with r1 and r2 being the van der Waals radii of the two atoms. Each contact is described by a special two-element sequence object (containing the two atoms) that defines an order relation between contacts based on the interatomic distance.


Energy evaluation

Energy evaluation requires a force field, and therefore all the methods in this section are defined only for universe objects. However, they all take optional arguments (anything that can be broken down into atoms) that indicate which subset of the energy terms is to be evaluated. No arguments means all terms, one argument means all terms within the group specified by it, and two arguments mean all terms between the two groups specified.


Operations on universes

Geometrical calculations. Note that these must be defined as methods on universes to take account of periodic systems correctly. Configurations and velocities.
Table of contents