
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

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 ~surf # 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 residues 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('~surf') 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. Tom 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@cgl.ucsf.edu http://www.cgl.ucsf.edu/mailman/listinfo/chimera-users

Hi Yasser, Forgot to mention that setting surface attributes ("setattr s ...") is in Chimera 1.4 but not 1.3. If you want to use that you need to get a Chimera 1.4 daily build: http://www.cgl.ucsf.edu/chimera/alpha-downloads.html Tom -------- Original Message -------- Subject: Re: [Chimera-users] Displaying surface residues... From: Yasser Almeida Hernandez <pedro.al@fenhi.uh.cu> To: Thomas Goddard <goddard@cgl.ucsf.edu> Date: 6/5/09 7:46 AM
Hi... When i run the commands in terminal, graphical and python ways i get the same error: "Attribute level must be [a]tom, [r]esidue, [m]olecule, [p]seudobond, or [g]roup"
What that's mean...?
I get this massage when i run the "setattr s allComponents false" command...
Thanks
participants (3)
-
Thomas Goddard
-
Tom Goddard
-
Yasser Almeida Hernandez