<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi JD,<div><span class="Apple-tab-span" style="white-space:pre"> </span>I think there are two member functions of Molecule that you are interested in here:</div><div><br></div><div><div> minimumRings(crossResidues = False)</div><div> allRings(bool crossResidues, int allSizeThreshold)</div><div><br></div><div>They both return a list of Rings. 'crossResidues' controls whether rings are allowed to cross residue boundaries (usually you would want False, but if you're studying cycles formed by disulphide bonds...). 'allSizeThreshold' is the maximum size ring that will be returned (zero = no limit). For highly fused ring systems like nanotubes you would want to limit the ring size or else the ring-finding algorithm will not return in your lifetime. 'minimumRings' only returns rings that can't be decomposed into multiple subrings. So for anthracene, for example, 'minimumRings' would return 3 six-member rings whereas 'allRings' would return 3 six-member rings, 2 ten-member rings, and 1 fourteen-member ring.</div><div><br></div><div>Atoms and Bonds have similar functions if you are interested in the rings that a particular atom or bond participates in.</div><div><br></div><div>Rings have 'atoms' and 'bonds' attributes as well as 'orderedAtoms' and 'orderedBonds' attributes. The latter two return the atoms/bonds in ring order. There is also an 'aromatic()' member function.</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 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; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><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"></div></span> </div><br><div><div>On Feb 13, 2010, at 6:25 AM, Jean Didier Pie Marechal wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Dear all,<br><br>I'd like to add an atom at the mass center of each aromatic fragment of my ligand (I always want to add an atom don't I?). <br><br>I know how to calculate cm, put an atom or point, select aromatic ring BUT I am banging my head against the wall to define one entity of each ring separately.<br><br>Would it be a lot more complicate to do so for any cyclic moeity.<br><br>Thanks for any help!<br><br>best,<br><br>JD</div></blockquote></div></div></body></html>