From: Peter Freddolino (petefred_at_ks.uiuc.edu)
Date: Sat May 23 2009 - 09:09:49 CDT

Hi Dimitry,
since you're constructing the loop over frames anyway, you could just
print the information yourself, eg.,

puts $outfile "$i [measure rmsd $sel $frame0]"

but the specific information that you're after is available from the
atom selection with
$sel frame

Best,
Peter

DimitryASuplatov wrote:
> Hello,
>
> I am trying to write a tcl script to calculate rmsd of my MD simulation.
> I`ve used the example from namd tutorial:
>
> set outfile [open rmsd.dat w]
> set nf [ molinfo top get numframes]
> set frame0 [atomselect top "protein and backbone and noh" frame 0]
> set sel [atomselect top "protein and backbine and noh"]
> set sel [atomselect top "protein and backbone and noh"]
> #rmsd calculation loop
> for { set i 1 } { $i <= $nf } {incr i 1} {
> $sel frame $i
> $sel move [measure fit $sel $frame0 ]
> puts $outfile "[measure rmsd $sel $frame0]"
> }
> close $outfile
>
> The problem with it is that it shows only the rmsd for each frame - that
> means no time present. This is sometimes a problem. What is the command
> to take info (like current time of the frame) from a frame selection.
>
> I guess it should be something like
> set frame0time [get time frame0]
> (this does not work unfortunately).
>
> Thank you for your help.
>
> SDA