From: Axel Kohlmeyer (
Date: Mon Oct 05 2009 - 06:04:33 CDT

On Mon, 2009-10-05 at 11:36 +0200, Nicola Giacche' wrote:
> Hi VMD users,
> i am looking for a VMD 1.8.7 script able to calculate the distance
> between two center of mass during the whole trajectory... i did not
> found the old "distance.tcl" script, do you know where can i find
> something like that? and also where can i find a guide to define the
> center of mass of a residue or a ligand selection?

how about having a look at the VMD user's guide?
there is for example the "measure" command which has
a "center" options and with "weight mass" it will
compute the center of mass (provided your input data
allows VMD to determine the mass of each atom correctly).

then all you need to do is the compute the distance from
two C.O.M.s via "vecdist" and you are good to go. to
process a whole trajectory there are templates of how to
script this.

one word of caution: make sure that coordinate wrapping
does not affect your data.


> thank you in advance
> Nicola

Dr. Axel Kohlmeyer 
Institute for Computational Molecular Science
College of Science and Technology
Temple University, Philadelphia PA, USA.