<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Aug 30, 2014, at 4:00 AM, Aswani Kumar Kancherla <<a href="mailto:ashwin2952@gmail.com">ashwin2952@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_default" style="font-family: Helvetica; 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; font-size: small; ">@Eric:</div><div class="gmail_default" style="font-family: Helvetica; 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; font-size: small; ">Many thanks for the code that you gave for extracting disulfide bonds and measuring the chiSS. I incorporated it in the code from the link sent by Elaine and executed it on a list of pdb ids. It worked fine on most of pdb files. However, for a few pdb files, some of the disulfide bonds are not recognized. Could it be due to the bad geometry in those structures?<br><br></div><div class="gmail_default" style="font-family: Helvetica; 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; font-size: small; ">If I understand the code right, it extracts pairs of SG atoms that are bonded together in each model "m" by looking in "m.bonds". Then it goes on to identify the attached beta carbons and then finally calculates the chiSS.<span class="Apple-converted-space"> </span><br></div></blockquote><div><br></div>Yep.</div><div><br><blockquote type="cite"><div class="gmail_default" style="font-family: Helvetica; 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; font-size: small; ">My suspicion is that, in some of the NMR structures (the pdb ids on which the script failed to identify all the disulfide bonds), the disulfide bond geometry is not good and hence SS bond is not listed in "m.bonds". </div></blockquote><div><br></div>Chimera relies on information inside the PDB file itself to "identify" SS bonds. In particular, LINK and/or CONECT records must be present that identify the SS linkage.</div><div><br><blockquote type="cite"><div class="gmail_default" style="font-family: Helvetica; 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; font-size: small; ">How do I go about, if I want to identify all the pairs of Cysteine SG atoms which are closer than say 2.5A and then calculate the appropriate dihedral angle about CB-SG-SG'-CB'? I will first need to calculate pairwise distances for SG atoms of all cysteines, select those pairs which are much nearer than allowed by their non-bonded distance (sum of van der waal radii) and then calculate the dihedral angle. This exercise will be useful for me to identify pairs of those Cysteines whose SG atoms have optimal geometry for formation of disulfide bond.<br></div><div class="gmail_default" style="font-family: Helvetica; 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; font-size: small; "><br></div><div class="gmail_default" style="font-family: Helvetica; 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; font-size: small; "></div><div class="gmail_default" style="font-family: Helvetica; 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; font-size: small; ">Once again many thanks for your valuable time and prompt help. I am pasting the script that I have used below. It worked fine and hence the indentation must be fine.</div></blockquote><br></div><div>Well, if there are only a few of these "misses" (and you're certain you've caught all the misses), it might just be easier to add appropriate LINK/CONECT records to the files, or use Chimera's "bond" command to form the missing SS bond. Code to do what you suggested above would be something like this:</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>from chimera import openModels, Molecule<br><span class="Apple-tab-span" style="white-space:pre"> </span>for m in openModels.list(modelTypes=[Molecule]):</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>sgs = [a for a in m.atoms if a.name == "SG"]</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>for i, sg1 in enumerate(sgs):</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>for sg2 in sgs[i+1:]:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>if sg1.coord().distance(sg2.coord()) > 2.5:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>continue</div><div><span class="Apple-tab-span" style="white-space:pre"> </span># the code below should look familiar :-)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>cbs = []</div><span class="Apple-tab-span" style="white-space: pre; "> </span>for sg in [sg1, sg2]:<br><span class="Apple-tab-span" style="white-space: pre; "> </span>if len(sg.neighbors) > 2:<br><span class="Apple-tab-span" style="white-space: pre; "> </span>break<br><span class="Apple-tab-span" style="white-space: pre; "> </span>for nb in sg.neighbors:<br><span class="Apple-tab-span" style="white-space: pre; "> </span>if nb.name == "CB":<br><span class="Apple-tab-span" style="white-space: pre; "> </span>cbs.append(nb)<br><span class="Apple-tab-span" style="white-space: pre; "> </span>break<br><span class="Apple-tab-span" style="white-space: pre; "> </span>else:<br><span class="Apple-tab-span" style="white-space: pre; "> </span># not bonded to a CB<br><span class="Apple-tab-span" style="white-space: pre; "> </span>break<br><span class="Apple-tab-span" style="white-space: pre; "> </span>if len(cbs) != 2:<br><span class="Apple-tab-span" style="white-space: pre; "> </span>continue<br><span class="Apple-tab-span" style="white-space: pre; "> </span>cb1, cb2 = cbs<br><span class="Apple-tab-span" style="white-space: pre; "> </span>from chimera import dihedral<br><span class="Apple-tab-span" style="white-space: pre; "> </span>print cb1, sg1, sg2, cb2, dihedral(cb1.coord(), sg1.coord(), sg2.coord(), cb2.coord())<br><div><br></div><div>--Eric</div><br><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><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>