next up previous contents index
Next: Using molinfo to access Up: molinfo Previous: molinfo

Using molinfo to access the molecule list

The molecule list contains information about all the loaded molecules, including those which are not properly called molecules, such as a Raster3D file or ``graphics'' molecule (see section §). Each molecule has a unique id, which is assigned to it when it is first loaded. These start at zero and increase by 1 for each new molecule. When a molecule is deleted, the number is not used again. There is one unique molecule, called the top molecule top molecule, which is used to determine some parameters, such as the center of view, the data in the animation form, etc.  

The list of available molecule ids  is available with the command   molinfo list, and the number of loaded molecules is found with molinfo num. The command molinfo top returns the id of the top molecule. One other command, molinfo <num> get index, returns the num'th molecule index  on the list, starting from 0. (See section §). In all cases, a molecule id of -1 is returned when no other valid id exists.

Examples:
vmd > molinfo list
Info) 0 1 2
vmd > molinfo top
Info) 2
vmd > mol top 1
vmd > molinfo top
Info) 1
vmd > molinfo num
Info) 3
vmd > mol delete 1
Info) Deleted 1 molecules.
vmd > molinfo list
Info) 0 2
vmd > molinfo top
Info) 2
vmd > molinfo index 1
Info) 2



Justin Gullingsrud
Tue Apr 6 09:22:39 CDT 1999