<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Nov 20, 2014, at 7:25 AM, Korbin West <<a href="mailto:khwest16@wabash.edu">khwest16@wabash.edu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div fpstyle="1" ocsi="0" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="direction: ltr; font-family: Arial; font-size: 10pt; ">Hi,<div><br></div><div>I'm trying to find missing atoms in certain residues. I know they are in the pdb header information, but is there a way I can use Chimera or python script to access this using the command line only? I have a large number of proteins to go through, so checking them all individually is not really efficient.</div></div></div></blockquote><br></div><div>Every Molecule model has a pdbHeaders attribute that is a dictionary whose keys are PDB records types (<i>e.g.</i> "REMARK", "HETNAM") and whose values are lists of text lines for that record type. Here's some sample code that would print out all the REMARK records of each model, prefixed by the model name:</div><div><br></div><div>from chimera import openModels, Molecule</div><div>for m in openModels.list(modelTypes=[Molecule]):</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>try:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>for rec in m.pdbHeaders["REMARK"]:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>print m.name, rec</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>except KeyError:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>print m.name, "has no REMARK records"</div><div><br></div><div>Maybe you can adapt the above into a script that does what you need.</div><div><br></div><div>--Eric</div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; font-size: 16px; "><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="5" style="font: 16.0px Helvetica"><span class="Apple-converted-space"> <span class="Apple-converted-space"> </span></span>Eric Pettersen</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="5" style="font: 16.0px Helvetica"><span class="Apple-converted-space"> <span class="Apple-converted-space"> </span></span>UCSF Computer Graphics Lab</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="5" style="font: 16.0px Helvetica"><span class="Apple-converted-space"> </span><a href="http://www.cgl.ucsf.edu">http://www.cgl.ucsf.edu</a></font></p><br class="Apple-interchange-newline"></span>
</div>
<br></body></html>