"Every valid SMILES is also a valid SMARTS": I think this is one of John May's lines, which I was never keen on as it makes people think that if you treat a SMILES as a SMARTS that it will match the original SMILES. It mostly will, but I think you have found the difference between the SMILES and SMARTS treatment of "[2H]" - one means deuterium, the other means an isotope of mass 2 with a single implicit hydrogen attached. It doesn't match because the deuterium doesn't have another hydrogen attached. [I think??]
Regards, Noel On Thu, 27 Jun 2024 at 10:05, Wim Dehaen <wimdeh...@gmail.com> wrote: > I would expect the problem here is kekulization. The SMARTS is pattern > matching using the kekule structure (i.e. double and single bonds, non > aromatic atoms) and is not sanitized whereas the SMILES after parsing and > sanitization has aromatic bonds and aromatic atoms. Try what happens when > you do a SMARTS match with the SMILES with aromatic atoms: > `[2H]c1cc([3H])cc(C2=N[C@](C)([37Cl])CC2)c1` > > best wishes > wim > > On Thu, Jun 27, 2024 at 10:56 AM pgchem pgchem <pgc...@tuschehund.de> > wrote: > >> Hello all, >> >> if every valid SMILES is also a valid SMARTS, why does: >> >> select substruct('[2H]C1=CC([3H])=CC(=C1)C1=N[C@](C)([37Cl])CC1'::mol, >> '[2H]C1=CC([3H])=CC(=C1)C1=N[C@](C)([37Cl])CC1'::mol) >> >> yield "True", but: >> >> select substruct('[2H]C1=CC([3H])=CC(=C1)C1=N[C@](C)([37Cl])CC1'::mol, >> '[2H]C1=CC([3H])=CC(=C1)C1=N[C@](C)([37Cl])CC1'::qmol) >> >> is "False"? The same is observed when using the @> operator. >> >> RDKit 2024.03.3 built from source + PostgreSQL 16.3. >> >> best regards >> >> Ernst-Georg >> >> >> _______________________________________________ >> Rdkit-discuss mailing list >> Rdkit-discuss@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >> > _______________________________________________ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss