VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Mon Feb 23 2004 - 13:18:57 CST
- Next message: Eamon Caddigan: "APBS Plugin for VMD"
- Previous message: John Stone: "Re: add a new color"
- In reply to: Hoch,Jeffrey: "Stationary labels; delays ("wait") in scripts"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Jeff,
Thanks for the note about the incorrect logging of 'mol new' on empty
molecules, I'll have to fix that. Regarding the "wait" command, 'wait' only
causes a delay when it is read on the console or from a "play" command which
executes Tcl scripts one line at a time. If you "source" the script, then
VMD loads the entire script all at once, and so the 'wait' command has
no effect. Does that make sense? Depending on what you want VMD to do
while it idles, you can write a little delay loop that does something
similar to wait like this:
proc mywait { waittime } {
set starttime [clock seconds]
while {[expr [clock seconds] - $starttime < $waittime]} {
}
}
Let us know if you need more help with these items.
Thanks,
John Stone
vmd_at_ks.uiuc.edu
On Thu, Feb 19, 2004 at 07:40:59AM -0500, Hoch,Jeffrey wrote:
> Colleagues:
>
> I created a "blank" molecule and fixed it, to serve as a canvas for drawing fixed labels.
> However when I try to script the process I encounter errors creating the blank molecule.
> Curiously, when I "log" the process, the "mol new" command gets translated to "mol rename",
> and the log file doesn't "play" properly:
>
> # VMD for MACOSX, version 1.8.2 (December 4, 2003)
> # Log file 'junk.log', created by user jeffhoch
> menu files off
> menu files on
> animate style Loop
> display resetview
> mol new {/Users/jeffhoch/mosart/ls3-1.pdb} type {pdb} first 0 last -1 step 1 waitfor 1
> animate style Loop
> menu files off
> menu graphics off
> menu graphics on
> mol modstyle 0 0 Cartoon 2.100000 12.000000 5.000000
> menu graphics off
> animate style Loop
> mol rename 1 {molecule1}
> mol fix 1
> # VMD for MACOSX, version 1.8.2 (December 4, 2003)
> # end of log file.
>
> I've also encountered difficulty scripting the "wait" command: it works fine when entered
> into the terminal window interactively, but gets ignored when included in a script.
>
> As is obvious from the log file, I am using version 1.8.2 on Mac OSX (10.2.8).
>
> Suggestions?
>
>
> Yours,
>
> Jeff Hoch
> University of Connecticut Health Center
>
>
-- 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: Eamon Caddigan: "APBS Plugin for VMD"
- Previous message: John Stone: "Re: add a new color"
- In reply to: Hoch,Jeffrey: "Stationary labels; delays ("wait") in scripts"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]