From: Josh Vermaas (vermaas2_at_illinois.edu)
Date: Thu Jun 27 2013 - 14:29:11 CDT

The easiest thing to do would probably be to use the measure command to
get both of the center of masses, and then use vecsub to get the vector
between the two points, and use veclength to get the distance (matrix
and vector operations are specified in the manual:
http://www.ks.uiuc.edu/Research/vmd/current/ug/node190.html).
Conceptually, it'd be:

set dist [veclength [vecsub [measure center $sel1] [measure center $sel2]]]
-Josh Vermaas

On 06/27/2013 01:06 PM, Peterson J wrote:
> Hi all VMD users,
>
> I'm about to analyze my simulations. I would like to calculate the
> distance between the center of mass (COM) of two set of residues. What
> is the command to do this? 'measure bond' command needs specific atom
> ids to calculate the distance not the COM.
>
> Help me with this.
>
> -Peterson