<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Miguel,<div><span class="Apple-tab-span" style="white-space:pre"> </span>For finding clashes you would use the detectClash() method in the DetectClash module. It has a pretty long doc string so I think it will be clear how to call/use it.</div><div><br></div><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Also, just a question: is there a way to access bonds as part of a tree? I would like to select the atoms implicitly from the list of bonds to be rotated.</div></div></blockquote><div><br></div><span class="Apple-tab-span" style="white-space:pre"> </span>I'm reading this as: for a given torsion, what are the atoms that will be rotated? There is a function of Molecule (m.traverseAtoms()) that returns atoms in traversal order. Furthermore, that function can ignore (i.e. cross) "break points" (active torsions) or not cross them. That is the function you would use, but you would need to restructure your code so that you only have one torsion active at a time rather than all of them. Here's a loose outline:</div><div><br></div><div># activate torsion</div><div>br = bondRotMgr.rotationForBond(b)</div><div><br></div><div># which atom is opposite the "anchor" side of the torsion (anchor == unmoving side)</div><div>ma = b.otherAtom(br.anchorSide)</div><div><br></div><div># what is the "root" for graph-traversal purposes on that side</div><div>root = ma.molecule.rootForAtom(ma, False) # the "False" means don't ignore active torsions</div><div><br></div><div># list of atoms on that side</div><div>myatomlist = ma.molecule.traverseAtoms(root)</div><div><br></div><div>...do the stuff that drives the torsion...</div><div><br></div><div># deactivate torsion</div><div>br.destroy()</div><div><br></div><div>--Eric</div><div><br><div><div>On May 13, 2010, at 4:13 AM, Miguel Ortiz Lombardia wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Eric and Tom,<div><br></div><div>Thank you! Yes, I would like to improve the script so, it would be great if you can give me pointers about clashes and filling the VDW space!</div><div><br></div><div>Also, just a question: is there a way to access bonds as part of a tree? I would like to select the atoms implicitly from the list of bonds to be rotated.</div><div><br></div><div>Best regards,</div><div><br></div><div><br></div><div>Miguel</div><div><br><div><div><div>Le 13 mai 2010 à 02:15, Eric Pettersen a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Miguel,<div><span class="Apple-tab-span" style="white-space:pre"> </span>The script still is pretty useful! I've added it to the "Python Scripts" page on our wiki (<a href="http://socrates2.cgl.ucsf.edu/trac/chimera/wiki/Scripts">Scripts – Chimera</a>). You are right that improvements could be made, but it's a nice starting point. If you ever decide to refine the script, I could probably provide pointers on finding clashes, whereas Tom Goddard (whom I've cc'ed) would probably have to be the one to assist in filling a grid based on the atom's VDW radius (presumably scaling a three-dimensional gaussian or some such).</div><div><br></div><div>--Eric</div><div><br></div><div><div><div>On May 12, 2010, at 1:46 PM, Miguel Ortiz Lombardia wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Le 12 mai 2010 à 19:00, Eric Pettersen a écrit :<br><br><blockquote type="cite">Hi Miguel,<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span>I'm glad you got everything sorted out. Good luck. Feel free to shoot me any further questions you might have.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">--Eric<br></blockquote><blockquote type="cite"><br></blockquote><br>Hi Eric,<br><br>Thanks! I managed to make it work. I'm attaching the script in case you or someone may find it useful. There is only a point I haven't managed to solve: as it is, the script creates a grid point at the atom center positions, while I would be more interested in the van der Waals volume. Nevertheless, since this is a very naive approach (it would be more interesting, for example, to avoid any clashes) I'm using an external set of programs (mapman and mama from the "Uppsala Software Factory") to extend this volume by a couple of grid points.<br><br>I'm attaching as well a figure so you see how it looks like (after expansion with mapman/mama).<br><br>Thanks for your advice, I have learnt a lot from this exercise.<br><br>Best regards,<br><br><br>-- Miguel<br><br>Architecture et Fonction des Macromolécules Biologiques (UMR6098)<br>CNRS, Universités d'Aix-Marseille I & II<br>Case 932, 163 Avenue de Luminy, 13288 Marseille cedex 9, France<br>Tel: +33(0) 491 82 55 93<br>Fax: +33(0) 491 26 67 20<br>e-mail: <a href="mailto:miguel.ortiz-lombardia@afmb.univ-mrs.fr">miguel.ortiz-lombardia@afmb.univ-mrs.fr</a><br>Web: <a href="http://www.pangea.org/mol/spip.php?rubrique2">http://www.pangea.org/mol/spip.php?rubrique2</a><br><br><br><span><C3vol.png></span><span><torspace.py></span><br><br><br></div></blockquote></div><br></div><br>-- <br>This message has been scanned for viruses and <br>dangerous content by <a href="http://www.mailscanner.info/"><b>MailScanner</b></a>, and is <br>believed to be clean. </div> </blockquote></div><br><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); 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: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; 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; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; 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; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; 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; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; 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; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; 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; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div>-- Miguel</div><div><div><br></div><div><div>Architecture et Fonction des Macromolécules Biologiques (UMR6098)</div><div>CNRS, Universités d'Aix-Marseille I & II</div><div>Case 932, 163 Avenue de Luminy, 13288 Marseille cedex 9, France</div><div>Tel: +33(0) 491 82 55 93</div><div>Fax: +33(0) 491 26 67 20</div><div>e-mail: <a href="mailto:miguel.ortiz-lombardia@afmb.univ-mrs.fr">miguel.ortiz-lombardia@afmb.univ-mrs.fr</a></div><div>Web: <a href="http://www.pangea.org/mol/spip.php?rubrique2">http://www.pangea.org/mol/spip.php?rubrique2</a></div></div><div><br></div></div></span></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline"> </div> <br></div></div></div></blockquote></div><br></div></body></html>