From: Mark R. <ma...@eb...> - 2010-08-12 16:07:21
|
I have a question regarding the CDK SmilesParser and aromaticity. Example below: input is a Smiles structure with 3 aromatic rings, 15 aromatic bonds in total. The CDK parses into an atom container with only 11 aromatic bonds. I was wondering: if the structure has explicit aromaticity bonds, would it not be better to preserve this in the container? Rather than overruling it with the CDK's aromaticity detection. As it is, one of the rings has it bonds converted into single bonds, that doesn't seem right. cheers, Mark ------ package org.openscience.cdk; import org.openscience.cdk.interfaces.IAtomContainer; import org.openscience.cdk.interfaces.IBond; import org.openscience.cdk.smiles.SmilesParser; public class SmilesAromaticity { public static void main(String[] args) throws Exception { SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance()); IAtomContainer atc = sp.parseSmiles("Oc1ccc(Cl)c2C(=O)c3c(sc4nccn34)C(=O)c12"); int aromCount=0; for (IBond bond : atc.bonds()) if(bond.getFlag(CDKConstants.ISAROMATIC)) aromCount++; System.out.println("# aromatic bonds = "+aromCount); } } |