From: Justin Gullingsrud (
Date: Fri Mar 16 2001 - 12:23:18 CST


You need to insert a display.update() command into your loop, after
label.add and before raw_input. VMD tries to update the screen only
when necessary so that scripts run faster and so that it doesn't
hog the CPU all the time.



On Fri, Mar 16, 2001 at 11:40:38AM +0100, Aitor Gonzalez wrote:
> Dear VMD-L,
> I have written a python script , where you find the following loop,
> import label
> atom_index=1
> atom_number=30
> while atom_index<atom_number:
> label.add(ATOM,(0,),(atom_index,))
> atom_index=atom_index+1
> raw_input('-->')
> Every time I run the loop, I want it to show the label in the display.
> Depending on what I see in the label, I want to make the input.
> When I run the program It shows me the labels, only when I finish the loop
> and all of them together. THis doesn't help me very much, because I cannot
> make the decision depending on what I see.
> I have tried also with for- and if-loops and it happens the same. I have
> also tried writing 'show(ATOM,{'molid':(0,),'atomid':(atom_index,)})',
> after the 'add' command.
> Has already someone tried something similar? Is it posible?
> Thanks in advance,
> Aitor Gonzalez
> Tef: +49-(0)6221-452012
> Heidelberg, Germany

Justin Gullingsrud      3111 Beckman Institute
H: (217) 384-4220       I got a million ideas that I ain't even rocked yet...
W: (217) 244-8946       -- Mike D