From: Vlad Cojocaru (
Date: Mon Apr 27 2015 - 09:27:02 CDT

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

--- 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"

Dr. Vlad Cojocaru
Computational Structural Biology Laboratory
Department of Cell and Developmental Biology
Max Planck Institute for Molecular Biomedicine
Röntgenstrasse 20, 48149 Münster, Germany
Tel: +49-251-70365-324; Fax: +49-251-70365-399
Email: vlad.cojocaru[at]