(on list) Hi Zheng,
Aromaticity is stored as a flag on atoms and bonds (CDKConstants.ISAROMATIC). When given an aromatic compound one needs to kekulise or dearomatise the structure. There are multiple ways of doing this (see the API) the most recent is the ‘Kekulise’ class. However one problem here is you have information loss. The aromatic bonds are a query feature of the ctfile and are not good to represent non-query structures. It’s a bit long to explain but basically aromaticity in a mol files is ambiguous. Note that SMILES and InChI automatically have single/double bond orders assigned on input because they are unambiguous*. ChemAxon have added an extension to the molfile allow this (see here) but that is specific to them and to my knowledge not widely used. As such, the molfile reader(s) will set the bond order to single and the aromatic flag. Out of interest, which mdl reader are you using? The MDLV2000Reader should actually be setting bond order = Unset? Some links that would be of use http://tech.knime.org/forum/cdk/aromaticity-in-cdk http://chem-bla-ics.blogspot.com.es/2011/10/cdk-file-formats-1-mdl-molfiles-and.html http://blueobelisk.shapado.com/questions/detect-aromatic-rings-using-bond-order-4-in-a-sdf-file-with-cdk <— shows example of getting bond orders from a molfile Hope that helps, John *well not always true but that throws an error On Aug 8, 2014, at 9:28 PM, Zheng Shi <[email protected]> wrote: > Hi, > > I just wonder how I can get the bond type for benzene in cdk. I can't find > function to get bond type, but have function to get the bond order, so I just > wonder whether bond order is equivalent to bond type. And for the bond order > types, it seems have four types:single, double. triple and quadruple. Then > how about the aromatic bond in benzene? It seems you will get different > results for different representations for benzene. If you represent benzene > as single, double bonds as the picture, it will return single ,double for the > bond order. But if you represent as aromatic form, it will only return single > as the bond order, not aromatic bond. I don't know why. I just wonder how to > get bond type, is it equivalent to bond order? And what about the aromatic > bond? Why does cdk return single, not aromatic bond? How to get a aromatic > bond type? Thanks. > <Capture1.JPG><Capture2.JPG>------------------------------------------------------------------------------ > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds_______________________________________________ > Cdk-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/cdk-user
------------------------------------------------------------------------------
_______________________________________________ Cdk-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cdk-user

