From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Aug 08 2012 - 16:43:00 CDT

Hi,
  You can do various things like this with a simple VMD script that
is triggered on frame update callbacks. The example below is trivial,
but you can change the text thickness and other parameters as needed to
make it look nice.

##
## 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 Wed, Aug 08, 2012 at 12:04:58PM -0500, Bryan Roessler wrote:
> Hello,
> I was wondering if it would be possible to have the option to superimpose
> the current frame number on the display? This would be really helpful for
> making movies that loop so the audience could follow the movement. Also,
> if you are still looking for a free BMP movie encoder, mencoder works
> great.
> For example: "C:\Program Files (x86)\Mencoder\mencoder.exe"
> mf://yourname*.bmp -mf fps=15:type=bmp -ovc lavc -lavcopts
> vcodec=wmv2:vbitrate=10000 -o yourname.wmv
> Thanks,
> Bryan

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