VMD-L Mailing List
From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Wed Mar 10 2010 - 17:23:04 CST
- Next message: Axel Kohlmeyer: "Re: water molecules around proteins"
- Previous message: nicholas lee: "Problems with "animate next" inside for-loops"
- In reply to: nicholas lee: "Problems with "animate next" inside for-loops"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
On Wed, Mar 10, 2010 at 5:41 PM, nicholas lee <nicholjl_at_usc.edu> wrote:
> Hello,
>
> I would like to use scripts to record snap shots of a system as it evolves and rotates. I am having problems however with the "animate next" command. It works fine when I execute it manually at the Tkconsole command prompt, but it does not have the same effect when placed in a for-loop as shown below.
>
> for {set i 0} {$i < 30} {incr i 1} {
> set filename snap.[format "%04d" $frame].rgb
> render snapshot $filename
> incr frame
> rotate x by 1
> animate next
please try inserting a "display update" here.
for efficiency reasons, tcl loops don't automatically
call the event handler for the GUI and thus the OpenGL
window will not get updated.
cheers,
axel.
> }
>
> When I run the script above, "animate next" only advances the system once (as if it were outside of the loop), as opposed to 30 times (in accordance with the loop variable, i).
>
> How could I resolve this? Thanks in advance,
>
> Nicholas Jabari Lee
>
-- Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://sites.google.com/site/akohlmey/ Institute for Computational Molecular Science Temple University, Philadelphia PA, USA.
- Next message: Axel Kohlmeyer: "Re: water molecules around proteins"
- Previous message: nicholas lee: "Problems with "animate next" inside for-loops"
- In reply to: nicholas lee: "Problems with "animate next" inside for-loops"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]