<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">body { font-family:'Times New Roman'; font-size:13px}</style>
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div>Thank you, Eric! </div><div>I am still downloading PDB files through Bio.python. I am just interested in the overall distance distribution of residues, say Lys alpha carbon. NMR entries might end up over-representing due to their multiple models. Thank you for pointing it out. Is there a quick way to distinguish crystal structures from NMR structures?</div><div><br></div><div>Best,</div><div>Feixia</div><div><br></div><div>On Wed, 19 Aug 2015 14:17:35 -0400, Eric Pettersen <pett@cgl.ucsf.edu> wrote:<br></div><br><blockquote style="margin: 0 0 0.80ex; border-left: #0000FF 2px solid; padding-left: 1ex">Hi Feixia,<div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>You could certainly use Chimera to do that. You need to know some Python. Take a look at the Programmer’s Guide:</div><div class=""><br class=""></div><div class=""><a href="http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/index.html" class="">http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/index.html</a></div><div class=""><br class=""></div><div class="">In particular, the “basic primer” discusses how to loop over files in a directory and do things to them one by one.</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Here’s some example code for printing the lysine CA-CA distances for a single open file. You could take that and move it into the loop described in the basic primer — customizing it as you wish…</div><div class=""><br class=""></div><div class="">from chimera import openModels, Molecule</div># opening NMR files can produce multiple models, so use a loop...<br class=""><div class="">for mol in openModels.list(modelTypes=[Molecule]):</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>lysCas = [a for a in mol.atoms if a.name == “CA” and a.residue.type == “LYS”]</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>for i, ca1 in enumerate(lysCas):</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>for ca2 in lysCas[i+1:]:</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>print mol.name, ca1, ca2, ca1.coord().distance(ca2.coord())</div><div class=""><br class=""></div><div class="">—Eric</div><div class=""><br class=""></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Eric Pettersen</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>UCSF Computer Graphics Lab</div><div class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">On Aug 18, 2015, at 8:36 AM, Feixia <<a href="mailto:feixia.chu@unh.edu" class="">feixia.chu@unh.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">Hi there,<br class=""><br class="">I am interested in retrieving distance information from large dataset in an automatic fashion. For instance, can we use Chimera to get the distances between lysine alpha-carbons of current PDB entries. Presumably, we can download all PDB structures on our local desktop, and just call functions one structure at a time. I wonder if we can do that with Chimera. Your advice will be highly appreciated.<br class=""><br class="">Best,<br class="">Feixia<br class=""><br class=""> </div></blockquote></div></div></blockquote></body></html>