[Chimera-users] display atom by coordinates

Eric Pettersen pett at cgl.ucsf.edu
Tue Sep 3 15:08:24 PDT 2013

Hi Bala,
	Here is the series of Python commands that would do what you want:

from chimera import runCommand as rc
rc("sel ions")
from chimera.selection import currentAtoms
for a in currentAtoms():
        a.display = -10 <= a.coord().z <= 35


                        Eric Pettersen
                        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:
> <http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/movie/framemovie.html>
> ... 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.
> <http://www.rbvi.ucsf.edu/home/meng/docs/UsersGuide/midas/perframe.html>
> 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.
> Best,
> 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 Aug 31, 2013, at 9:15 AM, Bala subramanian wrote:
>> Friends,
>> 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,
>> Bala
> _______________________________________________
> Chimera-users mailing list
> Chimera-users at cgl.ucsf.edu
> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

More information about the Chimera-users mailing list