<div dir="ltr">Thank you very much Eric. I will try this out.<div><br></div><div><br><div class="gmail_quote">On Tue, Jul 10, 2012 at 7:22 PM, Eric Pettersen <span dir="ltr"><<a href="mailto:pett@cgl.ucsf.edu" target="_blank">pett@cgl.ucsf.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Raju,<div><span style="white-space:pre-wrap"> </span>During the execution of a Python script, Chimera does not redraw the graphics screen until explicitly requested or when the script ends. The simplest way to ask for a redraw is to execute the "wait 1" Chimera command, which you can do from Python with:</div>
<div><br></div><div>from chimera import runCommand</div><div>runCommand("wait 1")</div><div><br></div><div>So if you embed that in your loop you should be able to see your atom move. Frames are redrawn at a rate of 25 per second (though future versions of Chimera may allow faster redraw rates), so you may want to wait more than 1 frame if the atoms moves too fast.</div>
<div><span style="white-space:pre-wrap"> </span>Alternatively, there is also a direct Python call to wait():</div><div><br></div><div>from Midas import wait</div><div>wait(1)</div><div><br></div><div><span style="white-space:pre-wrap"> </span>FYI, there is another mailing list, chimera-dev, where programming-intensive questions like this one are more appropriate, so that the regular user's eyes don't glaze over. :-)</div>
<div><br></div><div>--Eric</div><span class="HOEnZb"><font color="#888888"><div><br></div></font></span><div><span class="HOEnZb"><font color="#888888"><div><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:16px;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
<font face="Helvetica" size="5" style="font:normal normal normal 16px/normal Helvetica"> Eric Pettersen</font></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><font face="Helvetica" size="5" style="font:normal normal normal 16px/normal Helvetica"> UCSF Computer Graphics Lab</font></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><font face="Helvetica" size="5" style="font:normal normal normal 16px/normal Helvetica"> <a href="http://www.cgl.ucsf.edu" target="_blank">http://www.cgl.ucsf.edu</a></font></div>
<br></span></div></font></span><div><div class="im"><div>On Jul 10, 2012, at 9:07 AM, Raju Purohit wrote:</div><br></div><blockquote type="cite"><div><div class="h5"><div dir="ltr">Hello friends,<div><br></div><div>I need some help here.</div>
<div><br></div><div>I created a basic model having just an atom and set its coordinates as (0,0,0). Now I want to make it move along a certain path defined mathematically (say, along x axis) and I need to see it move. So I used a <b>for</b> loop. But I couldn't see and motion and soon realised that the loop is very quick in executing and thus I could see the atom at its last coordinates. So I tried to add delay of 0.5 seconds for each loop by importing <b>time</b> module and useing <b>time.sleep</b>. But still I couldn't see any motion and the coordinates of the atom is set only at the end of the <b>for</b> loop. I could not see the intermediate path. I am sure you people must have tried this earlier and this problem has a solution but I just couldn't figure it out. </div>
<div><br></div><div>Can you please help me out?</div><div><br></div><div>Thank you in advance.<br clear="all"><div><br></div>-- <br><div dir="ltr"><div>Raju R.N.</div><div>Third Year, B.Tech</div><div>Mechanical Engineering</div>
<div>National Institute of Technology Karnataka, Surathkal</div></div><br>
</div></div></div></div><div class="im">
_______________________________________________<br>Chimera-users mailing list<br><a href="mailto:Chimera-users@cgl.ucsf.edu" target="_blank">Chimera-users@cgl.ucsf.edu</a><br><a href="http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users" target="_blank">http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users</a><br>
</div></blockquote></div><br></div><br><br></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div>Raju R.N.</div><div>Third Year, B.Tech</div><div>Mechanical Engineering</div><div>National Institute of Technology Karnataka, Surathkal</div>
</div><br>
</div></div>