bad match

User 870ab5b546

14-10-2006 22:33:57

Target:





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


<MDocument>


  <MChemicalStruct>


    <molecule title=" " molID="m1">


      <atomArray


          atomID="a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16"


          elementType="C C C C C C C C Fr Fr Fr Fr Fr Fr Fr Fr"


          x2="-13.391758257039388 -14.725491590372721 -14.725491590372721 -13.391758257039388 -12.058024923706055 -12.058024923706055 -13.790291590372721 -15.277838257039388 -16.05903825703939 -16.05903825703939 -13.391758257039388 -10.724478257039388 -10.724478257039388 -13.020291590372722 -16.765384923706055 -16.366851590372722"


          y2="14.209720381469726 13.439720381469726 11.89953371480306 11.12953371480306 11.89953371480306 13.439720381469726 15.697267048136396 15.298547048136392 14.209720381469726 11.12953371480306 9.589533714803059 11.12953371480306 14.209720381469726 17.03081371480306 14.900013714803059 16.387560381469726"


          />


      <bondArray>


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


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


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


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


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


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


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


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


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


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


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


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


        <bond atomRefs2="a7 a8" order="2" />


        <bond atomRefs2="a7 a14" order="1" />


        <bond atomRefs2="a8 a15" order="1" />


        <bond atomRefs2="a8 a16" order="1" />


      </bondArray>


    </molecule>


  </MChemicalStruct>


</MDocument>








Query:





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


<MDocument>


  <MChemicalStruct>


    <molecule title=" " molID="m1">


      <atomArray


          atomID="a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16"


          elementType="C C C C C C C C Fr Fr Fr Fr Fr Fr Fr Fr"


          x2="-5.678679847412109 -7.012413180745444 -7.012413180745444 -5.678679847412109 -4.345133180745444 -4.345133180745444 -3.01139984741211 -1.5238531807454434 -5.678679847412109 -8.346146514078777 -8.346146514078777 -5.678679847412109 -3.01139984741211 -3.21243984741211 -0.43483984741211 -1.1253198474121096"


          y2="6.063831514078778 5.293831514078777 3.75364484741211 2.9836448474121093 3.75364484741211 5.293831514078777 6.063831514078778 5.665111514078777 7.603831514078777 6.063831514078778 2.9836448474121093 1.4436448474121102 2.9836448474121093 7.590578180745444 6.754124847412111 4.1777515140787775"


          />


      <bondArray>


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


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


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


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


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


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


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


        <bond atomRefs2="a7 a8" order="2" />


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


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


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


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


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


        <bond atomRefs2="a7 a14" order="1" />


        <bond atomRefs2="a8 a15" order="1" />


        <bond atomRefs2="a8 a16" order="1" />


      </bondArray>


    </molecule>


  </MChemicalStruct>


</MDocument>








The query is not found in the target, though it should be, because they are identical. Switch the query and the target, and they match properly.





Apparently the problem has to do with the physical location of one of the Fr atoms in the target. One of the Fr atoms has an unspecifiable stereochemistry because it is linear with the C=C double bond. But the stereochemistry shouldn't matter, because the other atom attached to the double bond is also Fr.





I should also mention that the target was generated by taking the following molecule, adding H atoms, and then replacing the H atoms with Fr. The angles of the H atoms were established by your own hydrogenize function.

User 870ab5b546

16-10-2006 02:34:04

One more bit of info: Even if the Fr atoms are replaced with H atoms, the target fails to match the query.

ChemAxon a3d59b832c

16-10-2006 10:23:17

We will check it.

ChemAxon a3d59b832c

17-10-2006 12:34:05

bobgr wrote:
The query is not found in the target, though it should be, because they are identical. Switch the query and the target, and they match properly.





Apparently the problem has to do with the physical location of one of the Fr atoms in the target. One of the Fr atoms has an unspecifiable stereochemistry because it is linear with the C=C double bond.
Indeed, the molecule does not match due to the different stereochemistry at the double bonds, but only if doubleBondStereo matching is switched to DBS_ALL. (I guess you used this setting.)
bobgr wrote:
But the stereochemistry shouldn't matter, because the other atom attached to the double bond is also Fr.
On the query side it should matter, as this is only a substructure (We discussed this in this topic.) but you are right: if the target is symmetrical, then regardless of the query stereo configuration, we should accept it. In fact it is not limited to double bond stereo, but it holds for all kinds of stereochemistry as in the other post. I will put this into our todo list, and will implement it in one of the upcoming bugfix releases. (We should be careful with speed issues here, so it may not be a very easy task.)
bobgr wrote:
I should also mention that the target was generated by taking the following molecule, adding H atoms, and then replacing the H atoms with Fr. The angles of the H atoms were established by your own hydrogenize function.
As far as I can see, the weird angles originate from the distorted angle of the double bond, forcing H-s away to avoid overlap.





Best regards,


Szabolcs

User 870ab5b546

17-10-2006 14:10:07

Szabolcs wrote:
As far as I can see, the weird angles originate from the distorted angle of the double bond, forcing H-s away to avoid overlap.
Yes, but we can't insist that students always draw compounds with proper double bond angles, and doing a 2D clean on everything would take an inordinately large amount of time. Better to change the hydrogenize routine so it doesn't align a C-H bond with the C=C bond. That would solve all problems.

ChemAxon a3d59b832c

18-10-2006 08:29:37

bobgr wrote:
Better to change the hydrogenize routine so it doesn't align a C-H bond with the C=C bond. That would solve all problems.
That´s true, but for some users it is very important to get a nice layout without overlapping atoms. We will think how we can improve this part also.





Szabolcs

ChemAxon a3d59b832c

19-10-2006 09:26:23

We will add a new API method to hydrogenize without cleaning the added hydrogens.





Szabolcs

ChemAxon 25dcd765a3

13-11-2006 08:22:52

The new method is ready, you can find it in the upcoming Marvin release.


The moleculeGraph has a new method called addExplicitHydrogens(int f), where specifying f as MoleculeGraph.OMIT_POSTCLEAN the Cleaning process is omitted after the H addition.





Code:
    molecule.addExplicitHydrogens(MoleculeGraph.OMIT_POSTCLEAN)








All the bets


Andras