Next: Usage
Up: Module group_module
Previous: Module group_module
Contents
Index
A Group is a collection of atoms, with an optional list of objects. These
objects can be anything, e.g. rigid bodies, constraints, residues... etc.
The idea is that different groups of atoms will require their equations of
motion integrating in different ways, so currently AdvanceVerlet loops over all
groups, checks the type of the group and integrates the equations of motion
for the atoms in that group in the appropriate way.
Two examples:
- A methane molecule with all C-H bonds fixed would have all 5 of its atoms in one
group, which would also contain (the indices of) four constraints. During
AdvanceVerlet the RATTLE algorithm can find the correct constraint objects to
enforce the fixed bond lengths
- A rigid ammonia molecule could be treated as a rigid body, in which case the
group would contain the indices of all 4 of the atoms, and the index of 1 rigid body
in the objects array. Then, during AdvanceVerlet, the NO_SQUISH algorithm would
propagate these atoms rigidly all at the same time.
Initially, when a DynamicalSystem is initialised each atom is put into its own
group. As constraints and rigid bodies are added the number of groups remains
the same but some of them become empty. These empty groups can be used if extra
atoms are added to the system, or they can be left without a problem. If more
memory is needed then DS_Free_Groups can be called, which deletes all the empty groups
and recreates the group_lookup array inside DynamicalSystem. This is most useful
if all the constraints/rigid bodies are set up before a simulation and are known
to never change.
A few notes:
- Groups aren't necessarily limited to the usage described here
- The atom and object arrays are self extensible, but are always exactly
the right size (unlike a Table). This is based on the assumption that they will
not change much (if at all) after they have been initially set up.
- Each group has a type, which defines how its atoms are integrated. Currently
the types are TYPE_IGNORE (numerically zero, and atoms in it are not integrated,
which could replace the move_mask variable(?)), TYPE_ATOM (a normal atom),
TYPE_CONSTRAINED and TYPE_RIGID. The idea is that if other ways of integrating
atoms is required (e.g. linear molecules, positional restraints, belly atoms, etc.)
then an new type will be defined and the new will be added to the select case
constructs in AdvanceVerlet.
Next: Usage
Up: Module group_module
Previous: Module group_module
Contents
Index
gabor
2009-06-30