Hi Aswani, I can answer only part of the question. For writing scripts to loop through multiple PDBs please see: <http://www.rbvi.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html> The script that you included gives specific residue numbers for the four atoms. You would need to know the residue numbers for the CB-SG-SG-CB in each structure. I’m not sure how you would get that or pass it in. (also: the script has four different residue numbers, which doesn’t really make sense to me; if it’s really a disulfide dihedral you would just have two residue numbers, one cysteine CB,SG and the other cysteine SG,CB). 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 28, 2014, at 10:13 PM, Aswani Kumar Kancherla <ashwin2952@gmail.com> wrote:
Hello Chimera Users, I have recently installed chimera version 1.9 in Linux OpenSuSe 11.4 and am trying to get acquainted with its features.
I am trying to measure dihedral angles (specifically the angle chiSS defined by Cb-Sg-Sg'-Cb' about disulfide bonds) for a list of pdb files containing NMR structure ensembles. I was trying to do this using a script (kindly given by a friend and pasted below) to which I can pass the coordinates of the four atoms and get the measured values for the "reply log" information.
I need to put the files in a directory called pdb_files, open chimera and call the script and retrieve information from the "reply log". However, there is a problem:
Since the coordinates of (Cb,Sg, etc ) will be different for each of the ensemble (since each ensemble is structure of a different molecule), I need to pass the coordinates dynamically for each pdbid.
I have found from Chimera User group archives that reply log can be saved using a function. http://plato.cgl.ucsf.edu/pipermail/chimera-users/2008-October/003184.html So that should solve one issue. I can save the reply log and parse it later.
What is the best way to measure specific dihedral angles from multiple pdb files? Is it possible to invoke chimera in tty mode and make it execute functions? In that case, I could probably write a shell script to invoke chimera once for each pdb and ask it to execute python script having appropriate atom coordinates.
I apologize for slightly long an e-mail. Any hints or directions to enable me figure out how to get this done efficiently in chimera will be of great help to me.
with regards, Aswani
script: ================================================================
import os import Matrix from chimera import openModels, selection, runCommand
#angle #0:resno@CB :resno@SG :resno@SG :resno@CB 34.6289
# Directory containing PDB files directory = 'pdb_files'
# Get paths to all files in the specfied directory paths = [os.path.join(directory,f) for f in os.listdir(directory) if f.endswith('.pdb')]
for pdbfilename in paths: filename = pdbfilename.split("/")[1] openModels.open(pdbfilename, baseId = 0) # Open as model #2 runCommand('angle #0:863@CB :980@SG :1130@SG :1235@CB') # calculate torsion angle
runCommand('close #0') # close molecule and map =================================================================
-- K.Aswani Kumar Graduate Student Molecular Biophysics Unit Indian Institute of Science Bangalore-560012 Karnataka, India. _______________________________________________ Chimera-users mailing list Chimera-users@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users