From: John Stone (johns_at_ks.uiuc.edu)
Date: Mon Oct 10 2005 - 14:54:18 CDT

Hi,
  I've written a simple example script that does precisely what you're
asking about, have a look at this example:

##
## Example script showing a way to add user-drawn geometry that updates
## as a trajectory is animated.
##
## To use this script:
## 1) load your trajectory
## 2) source frameupdate.vmd
## 3) enabletrace
## 4) do your thing :-)
## 5) disabletrace

proc enabletrace {} {
  global vmd_frame;
  trace variable vmd_frame([molinfo top]) w drawcounter
}

proc disabletrace {} {
  global vmd_frame;
  trace vdelete vmd_frame([molinfo top]) w drawcounter
}

proc drawcounter { name element op } {
  global vmd_frame;

  draw delete all
  # puts "callback!"
  draw color white
  set psperframe 1.03
  set time [format "%8.3f ps" [expr $vmd_frame([molinfo top]) * $psperframe]]
  draw text {10 10 0} "$time"
}

On Thu, Oct 06, 2005 at 12:27:26AM -0700, Ravinder Abrol wrote:
> Hi all,
>
> I am viewing a dcd file from NAMD and want to
> create a movie where each frame contains a label
> that reflects the time of the frame snapshot.
> How can I achieve this?
>
> Thanks very much,
> Ravi

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078