matching problem in exclude rule

User 870ab5b546

02-10-2007 20:03:59

The reaction definition:





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


<MDocument>


  <MChemicalStruct>


    <reaction x1="1.0445367650349073" y1="0.06144778459879451" x2="3.474588352204565" y2="0.0961363041963788">


      <propertyList>


        <property dictRef="NAME" title="NAME">


          <scalar><![CDATA[reductive amination]]></scalar>


        </property>


        <property dictRef="EXCLUDE" title="EXCLUDE">


          <scalar><![CDATA[match(ratom(3), "CC(C)[N:1]C(C)C", 1)]]></scalar>


        </property>


        <property dictRef="Stop after one reaction" title="Stop after one reaction">


          <scalar>true</scalar>


        </property>


      </propertyList>


      <reactantList>


        <molecule molID="m1">


          <atomArray


              atomID="a1 a2 a3 a4"


              elementType="C O H H"


              mrvMap="1 2 0 0"


              mrvQueryProps="0 0 L,H,C: L,H,C:"


              x2="-3.6599674224853516 -2.326288300657316 -4.993646544313387 -3.6599674224853516"


              y2="0.027313189581036568 0.7973131895810365 0.7973131895810371 -1.5126868104189635"


              />


          <bondArray>


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


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


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


          </bondArray>


        </molecule>


        <molecule molID="m2">


          <atomArray


              atomID="a1 a2"


              elementType="N H"


              mrvMap="3 0"


              x2="-0.18053583800792694 -0.18053583800792683"


              y2="-0.7920824885368347 0.7479175114631653"


              />


          <bondArray>


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


          </bondArray>


        </molecule>


      </reactantList>


      <productList>


        <molecule molID="m3">


          <atomArray


              atomID="a1 a2 a3 a4 a5"


              elementType="C H H N H"


              mrvMap="1 0 0 3 4"


              mrvQueryProps="0 L,H,C: L,H,C: 0 0"


              x2="6.012143149971962 4.678464028143926 6.012143149971962 7.437296360731125 4.678464028143926"


              y2="0.12458513103425495 0.8945851310342555 -1.4154148689657449 0.9269880278408527 -0.6454148689657456"


              />


          <bondArray>


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


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


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


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


          </bondArray>


        </molecule>


      </productList>


    </reaction>


  </MChemicalStruct>


</MDocument>






With substrates CC(=O)c1ccccc1.[H][C@](C)(N[C@]([H])(C)c2ccccc2)c3ccccc3, the exclude rule should cause no products to be obtained, but I am getting products regardless. Why?

ChemAxon e08c317633

04-10-2007 14:42:31

Your query in exclude rule does not match the second reactant, that's why it is not excluded. See the attached image.





Zsolt

ChemAxon d76e6e95eb

04-10-2007 14:47:42

Capital C in SMARTS means aliphatic carbon. You might modify the SMARTS in your exclude rule to accept aromatic carbons as well. It is marked with the atomic number: [#6]





For example:


[#6]C(C)[N:1]C(C)[#6]





or if you would like to extend it:


[#6]C([#6])[N:1]C([#6])[#6]

User 870ab5b546

04-10-2007 14:53:31

Ah, that makes more sense than Zsolt's response. Thanks.

ChemAxon d76e6e95eb

04-10-2007 15:13:52

I could not find out the problem without Zsolt's great explanation image.

User 870ab5b546

05-10-2007 21:20:39

Gyuri wrote:
Capital C in SMARTS means aliphatic carbon. You might modify the SMARTS in your exclude rule to accept aromatic carbons as well. It is marked with the atomic number: [#6]





For example:


[#6]C(C)[N:1]C(C)[#6]





or if you would like to extend it:


[#6]C([#6])[N:1]C([#6])[#6]
As you redesign Chemical Terms Language, you might want to reconsider that C means aliphatic C only. It is incredibly counterintuitive. I suppose that the people who designed SMARTS made that decision, and you're just maintaining consistency, but good grief!





I've been using SMILES in my exclude rules, not SMARTS. Now I guess I need to go back and rewrite all my rules. Sigh....

ChemAxon d76e6e95eb

05-10-2007 23:37:19

SMARTS is a standard for queries, it is not something that Chemical Terms should overdefine. However, I understand your complain, I think, that we should emphasize that anything in the match() function is a query, so the query structures should be specified as SMARTS, not as SMILES.

User 870ab5b546

06-10-2007 01:48:20

Gyuri wrote:
SMARTS is a standard for queries, it is not something that Chemical Terms should overdefine. However, I understand your complain, I think, that we should emphasize that anything in the match() function is a query, so the query structures should be specified as SMARTS, not as SMILES.
Yes, and if you want chemists-not-programmers to be able to use Chemical Terms, you ought to note specifically some of the counterintuitive conventions of SMARTS, such as that C means nonaromatic C only. (I repeat: Good grief! what a counterintuitive convention.)