From: John Stone (
Date: Wed Mar 28 2012 - 11:40:54 CDT

  Your script looks generally correct to me just reading it in the email
you sent. What is your reason for doubting the correctness of your script?

  John Stone

On Tue, Mar 27, 2012 at 08:37:23AM +0200, wrote:
> Hi,
> I want, for each molecule's center of mass, to extract its coordinates
> into some file for every frame of simulation.
> first,I load my_molecule_file.psf and my_molecule_file.dcd in VMD and then
> I use my Tk console script:
> set frm [molinfo top get numframes]
> set atom [atomselect top "segid GLUB and resid 20"]
> set fout [open Coords_CNTmas_GLUB_20.dat w]
> for {set i 0} {$i<$frm} {incr i} {
> $atom frame $i
> set cntmas [measure center $atom weight mass]
> puts $fout [format "%8.3f%8.3f%8.3f" [lindex $cntmas 0] [lindex $cntmas 1]
> [lindex $cntmas 2]]
> }
> $atom delete
> close $fout
> I have got the results- the coordinates for each molecule but,I'm not sure
> that everything is ok.
> So, I will need a second hand opinion about my script, and is there
> another way to get the coordinates of center of mass for each simulation's
> frame for one or for whole group of molecules.
> Thanks,
> Vlada

NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801           Phone: 217-244-3349       Fax: 217-244-6078