major bug: alkene stereomatching

User 870ab5b546

16-06-2006 17:38:21

This query:





Code:
<?xml version="1.0" ?>


<MDocument>


  <MChemicalStruct>


    <molecule molID="m1">


      <atomArray


          atomID="a1 a2 a3 a4"


          elementType="C C C C"


          x2="-4.0170666666666675 -2.6833333333333336 -1.3496000000000001 0.11498666666666668"


          y2="1.096666666666667 0.3266666666666667 1.096666666666667 0.6208533333333335"


          />


      <bondArray>


        <bond atomRefs2="a1 a2" order="1" />


        <bond atomRefs2="a2 a3" order="2" />


        <bond atomRefs2="a3 a4" order="1">


          <bondStereo convention="MDL" conventionValue="4" />


        </bond>


      </bondArray>


    </molecule>


  </MChemicalStruct>


</MDocument>








matches this target:





Code:
<?xml version="1.0" ?>


<MDocument>


  <MChemicalStruct>


    <molecule molID="m1">


      <atomArray


          atomID="a1 a2 a3 a4"


          elementType="C C C C"


          x2="-4.258240000000001 -2.924693333333334 -1.5909600000000002 -1.5988000000000002"


          y2="-0.2915733333333334 0.47842666666666667 -0.2915733333333334 -1.9715733333333336"


          />


      <bondArray>


        <bond atomRefs2="a1 a2" order="1" />


        <bond atomRefs2="a2 a3" order="2" />


        <bond atomRefs2="a3 a4" order="1" />


      </bondArray>


    </molecule>


  </MChemicalStruct>


</MDocument>








but not this one:





Code:
<?xml version="1.0" ?>


<MDocument>


  <MChemicalStruct>


    <molecule molID="m1">


      <atomArray


          atomID="a1 a2 a3 a4"


          elementType="C C C C"


          x2="-4.258240000000001 -2.924693333333334 -1.5909600000000002 0.09277333333333335"


          y2="-0.2915733333333334 0.47842666666666667 -0.2915733333333334 0.5950933333333334"


          />


      <bondArray>


        <bond atomRefs2="a1 a2" order="1" />


        <bond atomRefs2="a2 a3" order="2" />


        <bond atomRefs2="a3 a4" order="1" />


      </bondArray>


    </molecule>


  </MChemicalStruct>


</MDocument>








But both targets match this query:





Code:
<?xml version="1.0" ?>


<MDocument>


  <MChemicalStruct>


    <molecule molID="m1">


      <atomArray


          atomID="a1 a2 a3 a4"


          elementType="C C C C"


          x2="-4.0170666666666675 -2.6833333333333336 -1.3496000000000001 0.11498666666666668"


          y2="1.096666666666667 0.3266666666666667 1.096666666666667 0.6208533333333335"


          />


      <bondArray>


        <bond atomRefs2="a1 a2" order="1" />


        <bond atomRefs2="a2 a3" order="2">


          <bondStereo convention="MDL" conventionValue="3" />


        </bond>


        <bond atomRefs2="a3 a4" order="1" />


      </bondArray>


    </molecule>


  </MChemicalStruct>


</MDocument>








I thought the two queries were supposed to be treated exactly identical!? Are you able to reproduce this behavior? Are we somehow processing the queries incorrectly?





We're using JChem 3.1.6 and Marvin 4.0.5.

User 870ab5b546

16-06-2006 18:28:44

P.S. Here is the code we use to invoke JChem:





Code:
         MolSearch s1 = new MolSearch();


         s1.setSearchType(SearchConstants.EXACT);


         if ( ignoreStereo ) {


            s1.setStereoSearch(false);


         } else {


            // System.out.println(" stereo is significant.  Comparing " +


            // resp_struct + " to " + ans_struct);


            System.out.println("isTargetAbsoluteStereo: " +


               s1.isTargetAbsoluteStereo());


            System.out.println("isQueryAbsoluteStereo: " +


               s1.isQueryAbsoluteStereo());


            s1.setStereoSearch(true);


            s1.setDoubleBondStereoMatchingMode(StereoConstants.DBS_ALL);


            /* the following is deprecated in JChem 2.2 */


            // s1.setStereoCareChecking(false);


         }


         // additonal flags for matching isotopes, radical and charge


         s1.setExactChargeMatching(true);


         s1.setExactIsotopeMatching(true);


         s1.setExactRadicalMatching(true);


         MolHandler target1 = new MolHandler(resp_struct);


         MolHandler qry1 = new MolHandler(ans_struct);


         s1.setTarget(target1.getMolecule());


         s1.setQuery(qry1.getMolecule());


         //System.out.println("Match exact resp " + resp_struct);


         //System.out.println("Match exact struct " + ans_struct);


         boolean res1 = s1.isMatching();


         return res1;


ChemAxon a3d59b832c

19-06-2006 21:46:36

(I moved this topic over into the search forum.)





Hi Bob,





Yes, the two queries should behave similarly. We will check this.





Szabolcs

User 870ab5b546

19-06-2006 23:21:03

I think this bug was ours. We have a workaround for dealing with the fact that we use different conventions for the meaning of wavy bonds. The workaround was developed before you introduced the concept of wavy bonds to sp2-hybridized stereocenters. Our workaround was causing the failure to match. Now we have our workaround check for whether wavy bonds are attached to sp3-hybridized stereocenters before we consider them.

ChemAxon a3d59b832c

20-06-2006 06:28:36

OK. I am glad it is working for you now.





Best regards,


Szabolcs