[gmx-users] center of mass motion

Erik Lindahl erik at theophys.kth.se
Fri Nov 9 12:14:08 CET 2001


On Fri, 2001-11-09 at 11:38, Luca Monticelli wrote:
> 
> Dear all,
> 
> is there an EASY way to calculate the center of mass of a group of atoms
> as a function of time (and possibly print it out as a whatever.xvg file)?
> I found that the g_dist program calculates the distance between the
> centers of mass of two groups of atoms as a function of time, which is
> different from what I need. Anybody has suggestions?
> 
> Thanks a lot
> Luca

Hi Luca,

The g_traj program does this for you - just provide an index file with
the group(s) you want to calculate c.o.m. for and use the -com option.
There are a couple of other options too, you can e.g. choose to remove
jumps across the box due to pbc and have an index with molecule instead
of atom numbers.

Regards,

Erik





More information about the gromacs.org_gmx-users mailing list