[Chimera-users] display atom by coordinates
pett at cgl.ucsf.edu
Tue Sep 3 15:08:24 PDT 2013
Here is the series of Python commands that would do what you want:
from chimera import runCommand as rc
from chimera.selection import currentAtoms
for a in currentAtoms():
a.display = -10 <= a.coord().z <= 35
UCSF Computer Graphics Lab
On Aug 31, 2013, at 9:34 AM, Elaine Meng <meng at cgl.ucsf.edu> wrote:
> Hi Bala,
> I can't think of a way to do it with Chimera commands only, but it could be done with Python - e.g. you could define a per-frame Python script in the MD Movie dialog as described in the "per-frame scripts" section of this page:
> ... or if you are using scripts only (not graphical interfaces like the MD Movie dialog) you could include the Chimera command "perframe open [location]yourfile.py" which would open and execute the python script yourfile.py at each display frame. Of course, you could name the python file something else.
> However, someone else would need to help with writing the actual Python (beyond my skill set, sorry). It is a long holiday weekend here, so it might be a few days before anybody else replies.
> Elaine C. Meng, Ph.D.
> UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
> Department of Pharmaceutical Chemistry
> University of California, San Francisco
> On Aug 31, 2013, at 9:15 AM, Bala subramanian wrote:
>> I am trying to visualize the md movie of a channel protein. In every frame, i want to display only those ions whose Z coord ranges from -10 to 35 (zcoor of the channel) to make the movie. Is there any simple way ?. Precisely displaying atoms with a condition.
>> Thanks in advance,
> Chimera-users mailing list
> Chimera-users at cgl.ucsf.edu
More information about the Chimera-users