VMD-L Mailing List
From: Josh Vermaas (vermaas2_at_illinois.edu)
Date: Mon Apr 27 2015 - 10:58:33 CDT
- Next message: Miguel Caro: "Setting up a truncation cutoff fro volumetric data"
- Previous message: Vlad Cojocaru: "Re: using the colvar module in VMD within a tcl loop through trajectory frames"
- In reply to: Vlad Cojocaru: "using the colvar module in VMD within a tcl loop through trajectory frames"
- Next in thread: Vlad Cojocaru: "Re: using the colvar module in VMD within a tcl loop through trajectory frames"
- Reply: Vlad Cojocaru: "Re: using the colvar module in VMD within a tcl loop through trajectory frames"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi Vlad,
Here is the body of the loop I tend to use:
colvars frame $i
colvars update
puts [colvars colvar "name" value]
-Josh Vermaas
On 04/27/2015 09:27 AM, Vlad Cojocaru wrote:
> Dear all,
>
> I am trying to use the cv command to output the value of a colvar for
> each frame of a trajectory (example script below). However, the
> script prints only the value corresponding to the last frame (e.g. if
> I load 50 frames it writes 50 times "Frame: 49; Colvar: 2.567"). Am I
> doing something wrong or missing something in the script ?
>
> I am using VMD compiled from CVS on 7th of April 2015
>
> Thanks for any advice
> Vlad
>
> --- example script ---
>
> mol new "topology"
> mol addfile "trajectory" waitfor all
>
> cv molid 0
> cv configfile "configfile"
>
> set numFrames [ molinfo 0 get numframes ]
>
> for { set frame 0 } { $frame < $numFrames } { incr frame } {
> animate goto $frame
> cv colvar "name" update
> set colvarValue [ cv colvar "name" value ]
> puts "Frame: $frame; Colvar: $colvarValue"
> }
>
>
>
- Next message: Miguel Caro: "Setting up a truncation cutoff fro volumetric data"
- Previous message: Vlad Cojocaru: "Re: using the colvar module in VMD within a tcl loop through trajectory frames"
- In reply to: Vlad Cojocaru: "using the colvar module in VMD within a tcl loop through trajectory frames"
- Next in thread: Vlad Cojocaru: "Re: using the colvar module in VMD within a tcl loop through trajectory frames"
- Reply: Vlad Cojocaru: "Re: using the colvar module in VMD within a tcl loop through trajectory frames"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]