From: Ravinder Abrol (abrol_at_wag.caltech.edu)
Date: Mon Oct 10 2005 - 16:12:52 CDT

Thanks John,
Your script works like a charm. I observed one thing that when I do
"disabletrace" the label stops changing, but stays on the frame. Is
there a way to compleltely make it disappear after disabletrace?
Thanks,
Ravi

-----------------------------------------------------------
On Mon, Oct 10, 2005 at 02:54:18PM -0500, John Stone wrote:
>
> 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

-- 
__________________________________
 Ravinder Abrol
 139-74, Beckman Institute
 Department of Chemistry, Caltech
 Pasadena, CA 91125
 Phone: (626)-395-8143
 Email: abrol_at_caltech.edu
__________________________________