VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Mon Sep 28 2009 - 10:07:31 CDT
- Next message: Axel Kohlmeyer: "Re: text timer in vmd animations"
- Previous message: maria goranovic: "Re: text timer in vmd animations"
- In reply to: maria goranovic: "Re: text timer in vmd animations"
- Next in thread: maria goranovic: "Re: text timer in vmd animations"
- Reply: maria goranovic: "Re: text timer in vmd animations"
- Reply: maria goranovic: "Re: text timer in vmd animations"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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/ Fax: 217-244-6078
- Next message: Axel Kohlmeyer: "Re: text timer in vmd animations"
- Previous message: maria goranovic: "Re: text timer in vmd animations"
- In reply to: maria goranovic: "Re: text timer in vmd animations"
- Next in thread: maria goranovic: "Re: text timer in vmd animations"
- Reply: maria goranovic: "Re: text timer in vmd animations"
- Reply: maria goranovic: "Re: text timer in vmd animations"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]