Re: vmd-l: Problem with VMD 'animate' command

From: John Stone (johns_at_ks.uiuc.edu)
Date: Sun Feb 12 2006 - 16:02:36 CST

Hi,
  Try adding "display update ui" right after the "animate goto" command.
Let me know if that cures your problem.

  John Stone
  vmd_at_ks.uiuc.edu

On Sun, Feb 12, 2006 at 08:12:36AM -0800, Chandra Ramananjara wrote:
> Hi Everyone,
> I am having problems using the 'animate' command in VMD and I was wondering if anyone has encountered this problem as well.
> I am writing a small & simple Tcl script that steps through the frames of my .dcd trajectory file and prints out the unit cell length of the ensemble in each frame. Something like this:
>
> for { set i $startnum } { $i < $endnum } { incr i $skipnum } {
>
> animate goto $i
> set ucl [molinfo top get a]
> puts $ucl
>
> }
>
> The output I get seems to suggest that the 'animate goto' command doesn't actually change the frame.
>
> I experimented a bit and here's what I found out. Starting from scratch, if I load my pdb/dcd file in VMD, and manually set the frame to 0 (using the slide tool on the VMD Main window), then run a simple tcl script (in the VMD TkConsole) to attempt to switch to some random frame, say frame 8:
>
> animate goto 8
> puts [molinfo top get frame]
>
> I get 0 as the output, instead of 8. Which means the 'animate goto 8' command in the script I ran doesn't actually change the frame while the program is running. Then if I immediately run another tcl script (trying to switch to some other random frame):
>
> animate goto 22
> puts [molinfo top get frame]
>
> I get 8 as the output, instead of 22. This means that the 'animate goto' command only goes into effect after the program finishes running, not while it's running. So the first script I ran (using 'animate goto 8') did work, it just didn't switch to frame 8 until after the program finished running, which isn't very useful. To verify this, I immediately tried the following script:
>
> animate goto 14
> puts [molinfo top get frame]
>
> And of course, the output is 22 as expected, not 14.
>
> Any suggestions as to how to get the 'animate' command to switch frames dynamically or on the fly ? This is a really odd bug. Does it have anything to do with the fact that I am compiling/running the script using the VMD TkConsole window provided in the graphics version of VMD ?
>
> Thanks,
> Chandra Ramananjara, PhD.
>
>
> ---------------------------------
> Yahoo! Autos. Looking for a sweet ride? Get pricing, reviews, & more on new and used cars.

-- 
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

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:43:18 CST