VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Feb 14 2006 - 10:32:20 CST
- Next message: lily jin: "moving an atom in VMD"
- Previous message: Martinek Tamas: "Installation of VMD-1.8.4b11 binary + IED-2.02 on RH9"
- In reply to: Axel Kohlmeyer: "Re: Problem with VMD 'animate' command"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi,
Axel's suggestion to use the molinfo command to set the frame
is definitely the way to go if you're not interested in watching
the trajectory while a script runs. I should really take a few minutes
and update the docs to make this more obvious, as even I have forgotten
and used the old 'animate goto' stuff at times when it would have been
better to use the molinfo method of setting the frame.
John
On Sun, Feb 12, 2006 at 09:00:46PM -0500, Axel Kohlmeyer wrote:
> On Sun, 12 Feb 2006, John Stone wrote:
>
> JS> Hi,
> JS> Try adding "display update ui" right after the "animate goto" command.
> JS> Let me know if that cures your problem.
>
> hi,
>
> isn't there a 'molinfo $mol set frame $val' command?
> i just made a minimal test and it worked fine and
> seems generally more logical and 'orthogonal' to me.
> should be much faster, too. as it does not advance
> the visualization...
>
> regards,
> axel.
>
> JS>
> JS> John Stone
> JS> vmd_at_ks.uiuc.edu
> JS>
> JS>
> JS> On Sun, Feb 12, 2006 at 08:12:36AM -0800, Chandra Ramananjara wrote:
> JS> > Hi Everyone,
> JS> > I am having problems using the 'animate' command in VMD and I was wondering if anyone has encountered this problem as well.
> JS> > 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:
> JS> >
> JS> > for { set i $startnum } { $i < $endnum } { incr i $skipnum } {
> JS> >
> JS> > animate goto $i
> JS> > set ucl [molinfo top get a]
> JS> > puts $ucl
> JS> >
> JS> > }
> JS> >
> JS> > The output I get seems to suggest that the 'animate goto' command doesn't actually change the frame.
> JS> >
> JS> > 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:
> JS> >
> JS> > animate goto 8
> JS> > puts [molinfo top get frame]
> JS> >
> JS> > 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):
> JS> >
> JS> > animate goto 22
> JS> > puts [molinfo top get frame]
> JS> >
> JS> > 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:
> JS> >
> JS> > animate goto 14
> JS> > puts [molinfo top get frame]
> JS> >
> JS> > And of course, the output is 22 as expected, not 14.
> JS> >
> JS> > 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 ?
> JS> >
> JS> > Thanks,
> JS> > Chandra Ramananjara, PhD.
> JS> >
> JS> >
> JS> > ---------------------------------
> JS> > Yahoo! Autos. Looking for a sweet ride? Get pricing, reviews, & more on new and used cars.
> JS>
>
> --
> =======================================================================
> Axel Kohlmeyer akohlmey_at_cmm.chem.upenn.edu http://www.cmm.upenn.edu
> Center for Molecular Modeling -- University of Pennsylvania
> Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
> tel: 1-215-898-1582, fax: 1-215-573-6233, office-tel: 1-215-898-5425
> =======================================================================
> If you make something idiot-proof, the universe creates a better idiot.
-- 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: lily jin: "moving an atom in VMD"
- Previous message: Martinek Tamas: "Installation of VMD-1.8.4b11 binary + IED-2.02 on RH9"
- In reply to: Axel Kohlmeyer: "Re: Problem with VMD 'animate' command"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]