VMD-L Mailing List
From: maria goranovic (mariagoranovic_at_gmail.com)
Date: Mon Sep 28 2009 - 10:53:04 CDT
- Next message: Katherine Parra: "H_Bonds"
- Previous message: Axel Kohlmeyer: "Re: text timer in vmd animations"
- In reply to: John Stone: "Re: text timer in vmd animations"
- Next in thread: John Stone: "Re: text timer in vmd animations"
- Reply: John Stone: "Re: text timer in vmd animations"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi John
I tried using the script as is. Loaded my trajectory, sourced the script,
enabletrace, and played the movie in the GUI. nothing appeared as text. If I
just type the contents of the drawcounter procedure, I do get text (of
course, for a single frame). Am i doing something wrong in the "do your
thing" section?
thanks a lot
-maria
On Mon, Sep 28, 2009 at 5:07 PM, John Stone <johns_at_ks.uiuc.edu> wrote:
>
> Hi,
> If you use a Tcl trajectory frame callback, it should work regardless
> how you make the movie and you should be able to use it interactively
> as well as during movie rendering. Here's a crude example script.
>
> ##
> ## 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 ll
> # 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"
> }
>
> Cheers,
> John Stone
> vmd_at_ks.uiuc.edu
>
> On Mon, Sep 28, 2009 at 04:55:02PM +0200, maria goranovic wrote:
> > What if I make a movie out of the trajectory using default options
> > (snapshot as renderer). Will the time show in that case?
> >
> > Thank you for helping
> >
> > On Mon, Sep 28, 2009 at 4:30 PM, Axel Kohlmeyer <akohlmey_at_gmail.com>
> > wrote:
> >
> > On Mon, Sep 28, 2009 at 5:57 AM, maria goranovic
> > <mariagoranovic_at_gmail.com> wrote:
> > > Hi
> > >
> > > Is it possible to get a timer in vmd animations ? The earlier
> > reference in
> > > the list is to a dial, which might be too big to accommodate.
> >
> > yes, it is possible. you have to use the same mechanism as it is
> used
> > by other graphical options, i.e. put a trace on the vmd_frame
> variable.
> >
> > there are a number of examples around, all you have to do is to
> replace
> > the script code that draws the graphics with script code that draws
> the
> > text you would like to see. please note, that text output is
> currently
> > not
> > exported to external renderes, for technical reasons.
> >
> > cheers,
> > axel.
> > > Thanking you
> > >
> > > -maria
> > >
> > > --
> > > Maria G.
> > > Technical University of Denmark
> > > Copenhagen
> > >
> >
> > --
> > Dr. Axel Kohlmeyer akohlmey_at_gmail.com
> > Institute for Computational Molecular Science
> > College of Science and Technology
> > Temple University, Philadelphia PA, USA.
> >
> > --
> > Maria G.
> > Technical University of Denmark
> > Copenhagen
>
> --
> 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/ <http://www.ks.uiuc.edu/%7Ejohns/>
> Fax: 217-244-6078
>
-- Maria G. Technical University of Denmark Copenhagen
- Next message: Katherine Parra: "H_Bonds"
- Previous message: Axel Kohlmeyer: "Re: text timer in vmd animations"
- In reply to: John Stone: "Re: text timer in vmd animations"
- Next in thread: John Stone: "Re: text timer in vmd animations"
- Reply: John Stone: "Re: text timer in vmd animations"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]