Re: trajectory_path.tcl

From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Tue May 17 2011 - 09:38:19 CDT

On Tue, May 17, 2011 at 10:16 AM, Jacopo Sgrignani <sgrigna_at_sissa.it> 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 comtraj.xyz 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.

cheers,
   axel.

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

and then

>
>
> thanks
>
> Jacopo
>
>

-- 
Dr. Axel Kohlmeyer
akohlmey_at_gmail.com  http://goo.gl/1wk0
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