From: DimitryASuplatov (genesup_at_gmail.com)
Date: Sat May 23 2009 - 09:21:49 CDT

Thank you for quick reply.

Unfortunately this is not actually what I want:

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

since $i - is not time but framenumber. What I want is to be able to
acquire time information directly from the trajectory (dcd in this case)
being loaded to vmd without the need to specify any extra information to
my script (like timestep and dcdfrequency).

I other words - is time information stored in dcd file (it should be)?
If so, how can I get it out with vmd?

Thanks

On Sat, 2009-05-23 at 09:09 -0500, Peter Freddolino wrote:
> 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