<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div class="gmail_default" style="font-size:small">Hello Chimera Users,</div><div class="gmail_default" style="font-size:small"></div></div>
<div class="gmail_extra"><div class="gmail_default" style="font-size:small">I have recently installed chimera version 1.9 in Linux OpenSuSe 11.4 and am trying to get acquainted with its features.</div><div class="gmail_default" style="font-size:small">
<br></div><div class="gmail_default" style="font-size:small">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. </div>
</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_default" style="font-size:small">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:</div>
<div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">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. </div>
<br></div><div class="gmail_extra"><div class="gmail_default" style="font-size:small">I have found from Chimera User group archives that reply log can be saved using a function.</div><div class="gmail_default" style="font-size:small">
<a href="http://plato.cgl.ucsf.edu/pipermail/chimera-users/2008-October/003184.html" target="_blank">http://plato.cgl.ucsf.edu/pipermail/chimera-users/2008-October/003184.html</a></div><div class="gmail_default" style="font-size:small">
So that should solve one issue. I can save the reply log and parse it later.</div>
<br></div><div class="gmail_extra">What is the best way to <div class="gmail_default" style="font-size:small;display:inline">measure specific dihedral angles from multiple pdb files</div>? Is it possible to invoke <div class="gmail_default" style="font-size:small;display:inline">
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.</div> <br>
</div><div class="gmail_extra"><br></div>
<div class="gmail_extra"><div class="gmail_default" style="font-size:small;display:inline">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.</div>
</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_default" style="font-size:small">with regards,</div><div class="gmail_default" style="font-size:small">Aswani</div><div class="gmail_default" style="font-size:small">
<br></div><div class="gmail_default" style="font-size:small"></div><div class="gmail_default" style="font-size:small"><br></div><br></div><div class="gmail_extra"><div class="gmail_default" style="font-size:small"><b><font color="#000000">script:</font></b></div>
<div class="gmail_default" style="font-size:small"><b><font color="#000000">================================================================</font></b></div>
<b><font color="#000000"><br></font></b></div><div class="gmail_extra"><div class="gmail_extra"><b><font color="#000000">import os</font></b></div><div class="gmail_extra"><b><font color="#000000">import Matrix</font></b></div>
<div class="gmail_extra"><b><font color="#000000">from chimera import openModels, selection, runCommand</font></b></div><div class="gmail_extra"><b><font color="#000000"><br></font></b></div><div class="gmail_extra"><b><font color="#000000">#angle #0:resno@CB :resno@SG :resno@SG :resno@CB 34.6289</font></b></div>
<div class="gmail_extra"><b><font color="#000000"><br></font></b></div><div class="gmail_extra"><b><font color="#000000"><br></font></b></div><div class="gmail_extra"><b><font color="#000000"># Directory containing PDB files</font></b></div>
<div class="gmail_extra"><b><font color="#000000">directory = 'pdb_files'</font></b></div><div class="gmail_extra"><b><font color="#000000"><br></font></b></div><div class="gmail_extra"><b><font color="#000000"># Get paths to all files in the specfied directory </font></b></div>
<div class="gmail_extra"><b><font color="#000000">paths = [os.path.join(directory,f) for f in os.listdir(directory) if f.endswith('.pdb')]</font></b></div><div class="gmail_extra"><b><font color="#000000"><br></font></b></div>
<div class="gmail_extra"><b><font color="#000000">for pdbfilename in paths:</font></b></div><div class="gmail_extra"><b><font color="#000000"> filename = pdbfilename.split("/")[1]</font></b></div><div class="gmail_extra">
<b><font color="#000000"> openModels.open(pdbfilename, baseId = 0) # Open as model #2</font></b></div><div class="gmail_extra"><b><font color="#000000"> runCommand('angle #0:863@CB :980@SG :1130@SG :1235@CB') # calculate torsion angle</font></b></div>
<div class="gmail_extra"><b><font color="#000000"><br></font></b></div><div class="gmail_extra"><b><font color="#000000"> runCommand('close #0') # close molecule and map<br></font></b></div></div>
<div class="gmail_extra"><div class="gmail_default" style="font-size:small"><b><font color="#000000">=================================================================</font></b></div><b><font color="#000000"><br></font></b></div>
<div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div>-- <br><div dir="ltr">K.Aswani Kumar<br><div class="gmail_default" style="font-size:small">Graduate Student</div></div>
<div dir="ltr">Molecular Biophysics Unit<br>Indian Institute of Science<br>Bangalore-560012<br>Karnataka, India.</div>
</div></div>