<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On May 15, 2010, at 2:29 PM, Miguel Ortiz Lombardia wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><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="font-family: monospace; ">I'm afraid I don't clearly understand the concept of "active torsion" in the context of the script. What I do is to read the first torsion and assume it is the root of all the torsions to be rotated about so it can be used to select the atoms that will move in the way you showed. Then I create my 'torsionlist' as before. It seems to work.</span></span></blockquote><br></div><div>You can't increment or otherwise work with a torsion after you've destroyed it -- that's why you got an error. I assumed you would use the torsion just to determine the atom list, not try to continue to use it after the destroy() call. Therefore, in the context of your script it is correct not to call destroy, as you found out through experimentation.</div><div><br></div><div>All the torsions you've created and not yet called destroy() on are "active". That means that each one is a "break point" as far as graph traversal is concerned. Therefore the way you went about it -- activating only one torsion, getting the atom list, then activating the other torsions -- gives you the right list of atoms. If you had activated all the torsions before asking for the list of atoms you would have had trouble.</div><div><br></div><div>--Eric</div><div><br></div><br></body></html>