[Chimera-users] Displaying surface residues...

Thomas Goddard goddard at cgl.ucsf.edu
Thu Jun 4 11:38:50 PDT 2009

Hi Yasser,

   You could run Chimera from a terminal

	chimera --nogui somemodel.pdb surfres.cmd

where the --nogui tells Chimera not to display any windows, the first 
file is the PDB file you want to analyze and surfres.cmd is a script of 
Chimera commands as follows (from Elaine Meng)

surf main
#  the following to ignore any interior bubbles and enclosed cavities
setattr s allComponents false
#  the following could use a different cutoff, or areaSES instead of areaSAS
show :/areaSAS>10
# then do whatever the person wanted, save image or save file of those 

If you need Python code for then analysis part of the script you can 
instead use a script file surfres.py that would look like:

from chimera import runCommand as r
r('surf main')
r('setattr s allComponents false')
r('show :/areaSAS>10')
... additional Python code to do analysis.

Some things like saving images don't work with the --nogui option. 
Chimera needs to make windows for some things to work.

Your concept of having a Python script that imports Chimera is a nice 
idea but unfortunately you are stuck using the Python that is included 
with Chimera.  Even the slightest different version of Chimera tends to 
have some problems with the 40 third-party Python packages that Chimera 
makes use of.  The above instructions are the simple way to go.


Yasser Almeida Hernandez wrote:
> Hi all...
> I want to know if its possible display surface residues via python  
> script. The idea is import the chimera module inside the script, and  
> it receive (the script), the pdb file to analyze. The script is to run  
> in a classical bash terminal...
> Thanks..
> ----------------------------------------------------------------
> Correo FENHI
> _______________________________________________
> Chimera-users mailing list
> Chimera-users at cgl.ucsf.edu
> http://www.cgl.ucsf.edu/mailman/listinfo/chimera-users

More information about the Chimera-users mailing list