From: Egon W. <e.w...@sc...> - 2006-05-17 11:24:22
|
On Monday 15 May 2006 23:00, Mar...@ep... wrote: > In the HueckelAromaticityDetector's detectAromaticity(IAtomContainer > atomContainer, IRingSet ringSet, boolean removeAromaticityFlags) method > it seems to me that the routine should test if all the atoms in a ring > are aromatic prior to calculating the ecount: > > boolean AllAromatic=true; > for (int g = 0; g < ring.getAtomCount(); g++) > { > if (!ring.getAtomAt(g).getFlag(CDKConstants.ISAROMATIC)) { > AllAromatic=false; > break; > } > } Ummm... maybe I don't understand your question, but I thought the idea was to use the HueckelAromaticityDetector, when aromaticity was yet unknown, in which case I would expect the ISAROMATIC to be unset... Is there a step earlier in the method that is supposed to set this prior to counting? > if (AromaticityCalculator.isAromatic(ring, atomContainer) || > AllAromatic) { > ring.setFlag(CDKConstants.ISAROMATIC, true); > > ..... > > } > > > For compounds like CAS#206-44-0 smiles: c(c(ccc1)ccc2)(c1c(c3ccc4)c4)c23 > the five member center ring will never be aromatic since the ecount will > be 5. If you add this test for the aromaticity detector, please do not use the SMILES parser, but hard code the structure, so that the test example does not rely on other algorithms. JChemPaint has a 'CDK source code' export format, which creates, well, CDK source code, or at least, a reasonable step towards it... it is likely a bit out of sync with the current interfaces... but the idea is that you just draw your test structure, save it as 'CDK source code' and paste that into the JUnit test... Egon -- Egon Willighagen http://chem-bla-ics.blogspot.com/ |