next up previous contents
Next: Atom Up: Molecule objects Previous: Molecule objects   Contents

Subsections


Animation

Files: Animation.h, Animation.C
Derived from: none
Global instance (if any): none
Used in optional component: Part of main VMD code

Description

Animation is a base class for all Molecule objects in VMD. It is responsible for storing the dynamic data for molecule - those items which vary with time, instead of remaining constant. Animation stores an animation list, and has controls to add new data to the end of the list, as well as to position a current frame pointer in the list. Each time a Molecule is prepared (by calling it's virtual prepare routine since Molecule is derived from Displayable), the current position in the animation list is updated.

The Animation consists of basically an array of Timestep objects. Each Timestep contains the data for the molecule for a single step in the trajectory of the system.

Constructors

Enumerations, lists or character name arrays

The AnimDir enumeration lists the different directions in which the animation can be moving:

The AnimPos enumeration lists different positions in the list to which the animation position can jump, or can have new elements inserted or deleted:

The AnimFrames enumeration lists the different ways in which frames can be added or deleted. It is either ALL, or SELECTION.

The AnimStyle enumeration lists the different ways in which animation can be done:

Internal data structures

Nonvirtual member functions

Method of use

Adding new frames:

To add new frames, do the following:
  1. Set the method for appending, either at the end, or beginning, or before or after some current frame.
  2. Call the append routine.

Updating the current position:

The anim_update routine changes the current position based on the current animation direction and style. It also sets flags indicating whether the current frame was changed any. It will return the index of the new current frame, which can be used to get the actual Timestep object for that frame.

Suggestions for future changes/additions

Right now, this is very top-level base class for Molecule, even higher than the BaseMolecule level. The functionality here could probably be rolled into BaseMolecule, so that a single class would have info about the structure and size of the molecule is was storing dynamic data for. Basically, it's backwards to have Animate above BaseMolecule.


next up previous contents
Next: Atom Up: Molecule objects Previous: Molecule objects   Contents
vmd@ks.uiuc.edu