[Chimera-users] Help in writing python code

Elaine Meng meng at cgl.ucsf.edu
Fri Feb 6 08:17:06 PST 2015


Hi Ankit,
You would just use the “close” Chimera command to close the new axes model each time, e.g. “close #2” if the axes model is #2.  You can see which one it is in the Model Panel (under Favorites in the menu).  I would expect it to be the next unused number. 

Before actually running a script for a whole trajectory you should generally work out the necessary commands “by hand” (interactively) for one or two frames first.

I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.                       
UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
Department of Pharmaceutical Chemistry
University of California, San Francisco

On Feb 5, 2015, at 8:53 PM, Ankit Agrawal <aka895 at gmail.com> wrote:

> Hi
> I am doing trajectory analysis which has 40000 frames. So for all frames I wanted to calculate the all three inertia axes. That I did. But problem is that when I run the python code it starts making all the three axes for each frames that becomes messy. So I want a little change in my code so that during trajectory analysis it should create axes but should delete or hide the previous axes also. So during run I will see only the axes which are related to that frame.
> 
> Here is the python code in per-frame analysis.
> 
> from chimera import runCommand
> frame = mdInfo['frame']
> runCommand("measure inertia #1:0-120 color yellow")
> runCommand("measure inertia #1:120-237 color green")
> 
> Thanks.
> Ankit




More information about the Chimera-users mailing list