VMD-L Mailing List
From: jiwu liu (liujiwu_at_msu.edu)
Date: Mon Nov 05 2007 - 16:55:50 CST
- Next message: John Stone: "Re: Download vmd for 64-bit Intel Itanium"
- Previous message: Peter Freddolino: "Re: Tripos mol2 file in VMD"
- Next in thread: John Stone: "Re: vmd command delay"
- Reply: John Stone: "Re: vmd command delay"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi,
I wrote a simple interface to control vmd from a pipe. In python, it is:
p = os.popen('/usr/local/lib/vmd/vmd_LINUX', 'w')
and then I can write command string to vmd.
But I found that command can not be sent immediately after another one, I
have to insert a delay
time.sleep(0.5)
between two consecutive commands.
For examples, I had coloring selection commands like:
(1) set sel [atomselect 0 "name H"]
(2) $sel set user 1.0
(3) mol modcolor 0 0 User
I had to wait for 0.5 secs between commands sent through pipe to vmd.
Otherwise the command would not take any effect until next sending, namely,
command (2) will be run when I send command (3), so will the command 3.
Everything will be just postponed one step( And I do have "p.flush()" after
each command).
In vmd TCL scritpt , I don't see any "sleep" between two commands. Why
does it take a 'wait' when I use pipe to write to vmd program? does it have
to do with how vmd read stdin?
Thanks for any help.
jiwu
- Next message: John Stone: "Re: Download vmd for 64-bit Intel Itanium"
- Previous message: Peter Freddolino: "Re: Tripos mol2 file in VMD"
- Next in thread: John Stone: "Re: vmd command delay"
- Reply: John Stone: "Re: vmd command delay"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]