Re: trajectory_path.tcl

From: Axel Kohlmeyer (
Date: Tue May 17 2011 - 09:38:19 CDT

On Tue, May 17, 2011 at 10:16 AM, Jacopo Sgrignani <> wrote:
> Dear all
> Im' using the VMD script trajectory_path.tcl and it works fine,
> however i would like to print the coordinates
> of the center of mass trajectory to a pdb (or another VMD readable
> file), could anybody help me?

the easiest way is to modify the script to write out an .xyz formatted file.

just right before the "return $gr_list" insert the following code (untested):

set fp [open w]
foreach coord $coords {
  foreach {x y z} $coord {
    puts $fp "1\nc.o.m.\n M $x $y $z"
close $fp

you may have to tweak some details, but that should
show you the principle.


each iteration in the loop print out three lines:
center of mass
M $coords

and then

> thanks
> Jacopo

Dr. Axel Kohlmeyer
Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:57:08 CST