mysterious failure to match

User 870ab5b546

06-12-2006 14:10:13

Consider this query:





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


<MDocument>


  <MChemicalStruct>


    <molecule molID="m1">


      <atomArray>


        <atom id="a1" elementType="C"


              x2="-3.558333396911621" y2="1.0150339049599388" />


        <atom id="a2" elementType="C"


              x2="-4.89200273795988" y2="0.24501696440089837" />


        <atom id="a3" elementType="C"


              x2="-4.89200273795988" y2="-1.2950169167171826" />


        <atom id="a4" elementType="C"


              x2="-3.558333396911621" y2="-2.065033857276223" />


        <atom id="a5" elementType="C"


              x2="-2.2246640558633626" y2="-1.2950169167171826" />


        <atom id="a6" elementType="C"


              x2="-2.2246640558633626" y2="0.24501696440089837" />


        <atom id="a7" elementType="C"


              x2="-3.558333396911621" y2="2.555033904959939" />


        <atom id="a8" elementType="C"


              x2="-3.558333396911621" y2="-3.605033857276223" />


        <atom id="a9" elementType="R" sgroupRef="sg1"


              x2="-0.8909849340353269" y2="1.0150169644008984" />


        <atom id="a10" elementType="R" sgroupRef="sg2"


              x2="-0.8909849340353269" y2="-2.0650169167171826" />


      </atomArray>


      <bondArray>


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


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


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


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


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


        <bond atomRefs2="a5 a6" order="1" />


        <bond atomRefs2="a1 a7" order="1">


          <bondStereo>H</bondStereo>


        </bond>


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


          <bondStereo>H</bondStereo>


        </bond>


        <bond atomRefs2="a5 a10" order="1">


          <bondStereo>H</bondStereo>


        </bond>


        <bond atomRefs2="a6 a9" order="1">


          <bondStereo>H</bondStereo>


        </bond>


      </bondArray>


      <molecule id="sg1" role="SuperatomSgroup" title="CN" leftName="NC" molID="m2">


        <atomArray


            atomID="a11 a12"


            elementType="C N"


            attachmentPoint="1 0"


            x2="-1.5050000953674316 0.03499990463256841"


            y2="0.46666666865348816 0.46666666865348816"


            />


        <bondArray>


          <bond atomRefs2="a11 a12" order="3" />


        </bondArray>


      </molecule>


      <molecule id="sg2" role="SuperatomSgroup" title="CN" leftName="NC" molID="m3">


        <atomArray


            atomID="a13 a14"


            elementType="C N"


            attachmentPoint="1 0"


            x2="-1.5050000953674316 0.03499990463256841"


            y2="-1.2833333015441895 -1.2833333015441895"


            />


        <bondArray>


          <bond atomRefs2="a13 a14" order="3" />


        </bondArray>


      </molecule>


    </molecule>


  </MChemicalStruct>


</MDocument>








This target correctly matches the query:





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


<MDocument>


  <MChemicalStruct>


    <molecule molID="m1">


      <atomArray>


        <atom id="a1" elementType="C"


              x2="-1.106874942779541" y2="1.6844088775418022" />


        <atom id="a2" elementType="C"


              x2="-2.4405442838277995" y2="0.9143919369827618" />


        <atom id="a3" elementType="C"


              x2="-2.4405442838277995" y2="-0.6256419441353192" />


        <atom id="a4" elementType="C"


              x2="-1.106874942779541" y2="-1.3956588846943596" />


        <atom id="a5" elementType="C"


              x2="0.2267943982687175" y2="-0.6256419441353192" />


        <atom id="a6" elementType="C"


              x2="0.2267943982687175" y2="0.9143919369827618" />


        <atom id="a7" elementType="C"


              x2="-1.106874942779541" y2="3.2244088775418023" />


        <atom id="a8" elementType="C"


              x2="-1.106874942779541" y2="-2.9356588846943596" />


        <atom id="a9" elementType="R" sgroupRef="sg1"


              x2="1.5604735200967532" y2="1.6843919369827618" />


        <atom id="a10" elementType="R" sgroupRef="sg2"


              x2="1.5604735200967532" y2="-1.3956419441353192" />


      </atomArray>


      <bondArray>


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


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


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


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


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


        <bond atomRefs2="a5 a6" order="1" />


        <bond atomRefs2="a1 a7" order="1">


          <bondStereo>W</bondStereo>


        </bond>


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


          <bondStereo>W</bondStereo>


        </bond>


        <bond atomRefs2="a5 a10" order="1">


          <bondStereo>W</bondStereo>


        </bond>


        <bond atomRefs2="a6 a9" order="1">


          <bondStereo>W</bondStereo>


        </bond>


      </bondArray>


      <molecule id="sg1" role="SuperatomSgroup" title="CN" leftName="NC" molID="m2">


        <atomArray


            atomID="a11 a12"


            elementType="C N"


            attachmentPoint="1 0"


            x2="1.203124989271164 2.7431249892711644"


            y2="1.058750033378601 1.058750033378601"


            />


        <bondArray>


          <bond atomRefs2="a11 a12" order="3" />


        </bondArray>


      </molecule>


      <molecule id="sg2" role="SuperatomSgroup" title="CN" leftName="NC" molID="m3">


        <atomArray


            atomID="a13 a14"


            elementType="C N"


            attachmentPoint="1 0"


            x2="1.0587499928474426 2.598749992847443"


            y2="-0.5293750166893005 -0.5293750166893005"


            />


        <bondArray>


          <bond atomRefs2="a13 a14" order="3" />


        </bondArray>


      </molecule>


    </molecule>


  </MChemicalStruct>


</MDocument>








This target does not:





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


<MDocument>


  <MChemicalStruct>


    <molecule molID="m1">


      <atomArray


          atomID="a1 a2 a3 a4 a5 a6 a7 a8 a9 a10"


          elementType="C C C C C C C R R C"


          sgroupRef="0 0 0 0 0 0 0 sg1 sg2 0"


          x3="-7.5075 -8.8412 -8.8412 -7.5075 -6.1738 -6.1738 -7.5075 -4.6863 -4.8402 -7.5075"


          y3="0.4813 -0.2887 -1.8288 -2.5988 -1.8288 -0.2887 -4.1388 0.10980000000000001 -2.5988 2.0213"


          z3="0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0"


          />


      <bondArray>


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


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


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


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


        <bond atomRefs2="a5 a6" order="1" />


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


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


          <bondStereo>W</bondStereo>


        </bond>


        <bond atomRefs2="a1 a10" order="1">


          <bondStereo>W</bondStereo>


        </bond>


        <bond atomRefs2="a5 a9" order="1">


          <bondStereo>W</bondStereo>


        </bond>


        <bond atomRefs2="a6 a8" order="1">


          <bondStereo>W</bondStereo>


        </bond>


      </bondArray>


      <molecule id="sg1" role="SuperatomSgroup" title="CN" molID="m2">


        <atomArray


            atomID="a11 a12"


            elementType="C N"


            attachmentPoint="1 0"


            x3="-4.6863 -3.5774000000000004"


            y3="0.10980000000000001 0.40690000000000004"


            z3="0.0 0.0"


            />


        <bondArray>


          <bond atomRefs2="a11 a12" order="3" />


        </bondArray>


      </molecule>


      <molecule id="sg2" role="SuperatomSgroup" title="CN" molID="m3">


        <atomArray


            atomID="a13 a14"


            elementType="C N"


            attachmentPoint="1 0"


            x3="-4.8402 -3.846"


            y3="-2.5988 -3.1728"


            z3="0.0 0.0"


            />


        <bondArray>


          <bond atomRefs2="a13 a14" order="3" />


        </bondArray>


      </molecule>


    </molecule>


  </MChemicalStruct>


</MDocument>








When I first found that target 2 did not match the query, I thought it was another manifestation of the parity bug we have been discussing. But the fact that target 1 matches the query throws this theory out the window. For the life of me, I can't figure out what is the difference between the first and second targets. Any ideas?





P.S. We ungroup the shortcut groups before doing the JChem comparison, and we obtain the same results.

ChemAxon a3d59b832c

06-12-2006 14:25:20

Hi Bob,





For some reason, your second target is in 3 dimensions, although with all 0 z coordinates.





In 3D the stereo properties are calculated from the coordinates only, wedges are ignored. Therefore these planar atoms have no stereo information at all.





Our development version MarvinSketch already has a status bar which always shows the dimension of the molecule being edited. (And the background changed to black as soon as I pasted the 3D molecule into MSketch.) So in the future it will be easier to see what is wrong with the molecule.





Szabolcs

User 870ab5b546

06-12-2006 17:44:48

Ahhhhh....! Good catch.





But our confusion highlights a current deficiency of Marvin. I appreciate that you will be showing 3D mode or 2D mode in the status bar, but I am afraid that many users (certainly, most of our users) will not understand the implications for stereo bonds. In fact, many will assume that they want to use 3D mode to show stereochemistry.





I suggest that if a user is in 3D mode, you remove (gray out) the option to draw stereo bonds, and you show a note to the user, "Choose Edit -> Clean -> Clean in 2D to access stereo bonds." Alternatively, if a user is in 3D mode, and he or she draws a stereobond, have an alert pop up: "Warning: Stereo bonds are ignored in 3D mode. Choose Edit -> Clean -> Clean in 2D to enter 2D mode, in which stereo bonds can be used to indicate stereochemistry."

ChemAxon a3d59b832c

07-12-2006 08:30:45

bobgr wrote:
I suggest that if a user is in 3D mode, you remove (gray out) the option to draw stereo bonds, and you show a note to the user, "Choose Edit -> Clean -> Clean in 2D to access stereo bonds." Alternatively, if a user is in 3D mode, and he or she draws a stereobond, have an alert pop up: "Warning: Stereo bonds are ignored in 3D mode. Choose Edit -> Clean -> Clean in 2D to enter 2D mode, in which stereo bonds can be used to indicate stereochemistry."
OK, I have added this to our task list.