From: Axel Kohlmeyer (
Date: Thu May 17 2007 - 16:32:05 CDT

On Thu, 17 May 2007, Mark Zottola wrote:

hi mark,

MZ> I am new to VMD and would like to be able to do some things which do not
MZ> (apparently) exist in the manual.

well, there are a lot of things in the manual, that are not
always that obvious. sometimes you have to know what to look for. ;-)

MZ> 1) I would like to be able to take and generate pdb files from a select
MZ> number of frames from and MD simulation.

yes. this can be done. you can use the script interface (via animate
write or via selections) or the save coordinates GUI.

MZ> 2) I would like to be able to monitor the number of water molecules near an
MZ> active site residue over the course of a simulation as well as calculate
MZ> distances of these waters from a particular atom in the active site..

this can be done with selections. have a look at the vmd script library
and the various scripting tutorial sites linked from the VMD homepage.

MZ> 3) I would like to monitor the distance between two atoms in 2 different
MZ> residues over the course of a simulation.

this can be scripted or done via the GUI (Mouse->Label->Distance, click
on the two atoms and then open the Graphics->Labels dialog)

MZ> Are these best done by writing a Tcl script? Are there built in functions
MZ> to do this?

you may have to play around a little bit, and few of it is automated,
but the scripting interface is very flexible and it is pretty
straightforward to write what you are asking for.

be warned, though. VMD scripting can become addictive and you may
end up using VMD for tasks you never imagined. ;^)


MZ> Thanks for any help you can send my way!
MZ> Mark

Axel Kohlmeyer
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
If you make something idiot-proof, the universe creates a better idiot.