Christoph Steinbeck <[EMAIL PROTECTED]> wrote:
> I wonder if we should simply write the original bond orders to CML > instead of aromatic ones. > Not sure how this is handled anyway? Does the CML written by this test > have both (aromaticity flag as well as bond orders?) Did not have time > to run it. No, CMLWriter writes only bond orders, no aromaticity flags. Below is the CML output (first one is without running aromaticity detection, next one with aromaticity detection on). 8<--- Perceiving aromaticity= false <?xml version="1.0" encoding="ISO-8859-1"?> <molecule id="m1" xmlns="http://www.xml-cml.org/schema"> <atomArray> <atom id="a1" elementType="C" formalCharge="0" hydrogenCount="1"/> <atom id="a2" elementType="C" formalCharge="0" hydrogenCount="1"/> <atom id="a3" elementType="C" formalCharge="0" hydrogenCount="1"/> <atom id="a4" elementType="C" formalCharge="0" hydrogenCount="1"/> <atom id="a5" elementType="C" formalCharge="0" hydrogenCount="1"/> <atom id="a6" elementType="C" formalCharge="0" hydrogenCount="1"/> <atom id="a7" elementType="H" formalCharge="0" hydrogenCount="1"/> <atom id="a8" elementType="H" formalCharge="0" hydrogenCount="1"/> <atom id="a9" elementType="H" formalCharge="0" hydrogenCount="1"/> <atom id="a10" elementType="H" formalCharge="0" hydrogenCount="1"/> <atom id="a11" elementType="H" formalCharge="0" hydrogenCount="1"/> <atom id="a12" elementType="H" formalCharge="0" hydrogenCount="1"/> </atomArray> <bondArray> <bond id="b1" atomRefs2="a1 a2" order="D"/> <bond id="b2" atomRefs2="a2 a3" order="S"/> <bond id="b3" atomRefs2="a3 a4" order="D"/> <bond id="b4" atomRefs2="a4 a5" order="S"/> <bond id="b5" atomRefs2="a5 a6" order="D"/> <bond id="b6" atomRefs2="a6 a1" order="S"/> <bond id="b7" atomRefs2="a1 a7" order="S"/> <bond id="b8" atomRefs2="a2 a8" order="S"/> <bond id="b9" atomRefs2="a6 a9" order="S"/> <bond id="b10" atomRefs2="a3 a10" order="S"/> <bond id="b11" atomRefs2="a5 a11" order="S"/> <bond id="b12" atomRefs2="a4 a12" order="S"/> </bondArray> </molecule> Atom types from original molecule {H=6, C.sp2=6} Atom types from molecule read from CML {H=6, C.sp2=6} Perceiving aromaticity= true <?xml version="1.0" encoding="ISO-8859-1"?> <molecule id="m1" xmlns="http://www.xml-cml.org/schema"> <atomArray> <atom id="a1" elementType="C" formalCharge="0" hydrogenCount="1"/> <atom id="a2" elementType="C" formalCharge="0" hydrogenCount="1"/> <atom id="a3" elementType="C" formalCharge="0" hydrogenCount="1"/> <atom id="a4" elementType="C" formalCharge="0" hydrogenCount="1"/> <atom id="a5" elementType="C" formalCharge="0" hydrogenCount="1"/> <atom id="a6" elementType="C" formalCharge="0" hydrogenCount="1"/> <atom id="a7" elementType="H" formalCharge="0" hydrogenCount="1"/> <atom id="a8" elementType="H" formalCharge="0" hydrogenCount="1"/> <atom id="a9" elementType="H" formalCharge="0" hydrogenCount="1"/> <atom id="a10" elementType="H" formalCharge="0" hydrogenCount="1"/> <atom id="a11" elementType="H" formalCharge="0" hydrogenCount="1"/> <atom id="a12" elementType="H" formalCharge="0" hydrogenCount="1"/> </atomArray> <bondArray> <bond id="b1" atomRefs2="a1 a2" order="A"/> <bond id="b2" atomRefs2="a2 a3" order="A"/> <bond id="b3" atomRefs2="a3 a4" order="A"/> <bond id="b4" atomRefs2="a4 a5" order="A"/> <bond id="b5" atomRefs2="a5 a6" order="A"/> <bond id="b6" atomRefs2="a6 a1" order="A"/> <bond id="b7" atomRefs2="a1 a7" order="S"/> <bond id="b8" atomRefs2="a2 a8" order="S"/> <bond id="b9" atomRefs2="a6 a9" order="S"/> <bond id="b10" atomRefs2="a3 a10" order="S"/> <bond id="b11" atomRefs2="a5 a11" order="S"/> <bond id="b12" atomRefs2="a4 a12" order="S"/> </bondArray> </molecule> Atom types from original molecule {H=6, C.sp2=6} Atom types from molecule read from CML {H=6, Caromatic.sp2=6} 8<--- Best regards, Nina > > Cheers, > > Chris > > Egon Willighagen wrote: > > On Friday 27 April 2007, Nina Jeliazkova wrote: > >> Here is the story. > >> 1) Create (somehow) a structure as IMolecule (e.g. benzene with > >> alternating single/double bonds) > >> 2) Run HueckelAromaticityDetector to perceive aromaticity > >> 3) Write the structure into CML > >> 4) Read the structure back from CML into a new IMolecule > >> 5) Now the new IMolecule has bond orders 1.5 , while the origin one as in > >> 1) has bond orders 1.0 and 2.0 > > > > Ah... that sounds like a bug. CDK in the early days used 1.5 bond order == an > > > aromatic bond, but drop that in favour of > > IBond.setFlag(CDKConstancs.ISAROMATIC). Seems that the CMLReader has not been > > > updated. > > > >> This doesn't break isomorphism test and fingerprints, but does break atom > >> types recognition as per HybridizationStateATMatcher. In this example, > >> atom types of the original molecule will be C.sp2, while in the new > >> molecule will be Caromatic.sp2. > > > > Atom type perception is a tricky thing indeed. What suprises me that the > first > > type is not aromatic too! Because you did do atomiticity detection. Actually, > > > since the atom type list contains the the concept of aromaticity, it must be > > > done prior to calling the perception tool. Maybe a second bug? > > > >> Not sure this breaks anything else than my atom environments code, but I am > >> wondering what's the best way to handle the issue. > >> > >> Attached is JUnit test. > > > > Thanx! I have filed it in the bug track system, so that it can soon be fixed > > > (by the first who has time for it). > > > > Egon > > > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Cdk-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cdk-user

