User 036058eabf
17-03-2008 19:48:27
Hi,
I think I've found a bug in pattern matching using SMARTS.
With certain molecules, the pattern "[A;R0]" matches atoms that are in a ring.
This is an example molecule that generates the error:
[H]N1C(=O)C(=C([H])c2c([H])c(Cl)c([H])c([H])c12)N1C(=O)c2c([H])c([H])c([H])c([H])c2C1=O
(This SMILES code is generated thru a Molecule.toFormat("smiles") call)
I used this pattern:
[A,a][A;R0]
It should match all couples of atoms in which one atom is not in a ring; however, it matches couples with both atoms in rings.
The Daylight SMARTS matching tool ( http://www.daylight.com/daycgi_tutorials/depictmatch.cgi ) gives different results: there is only one match, C-Cl, which is missed in JChem searching.
Using the pattern "[A,a][A;!R]" is a possible workaround. Both patterns give the same matches using the Daylight tool.
I've attached an image with highlighted, in blue, the matches and a short program to generate that image.
Thank you!
Simone
I think I've found a bug in pattern matching using SMARTS.
With certain molecules, the pattern "[A;R0]" matches atoms that are in a ring.
This is an example molecule that generates the error:
[H]N1C(=O)C(=C([H])c2c([H])c(Cl)c([H])c([H])c12)N1C(=O)c2c([H])c([H])c([H])c([H])c2C1=O
(This SMILES code is generated thru a Molecule.toFormat("smiles") call)
I used this pattern:
[A,a][A;R0]
It should match all couples of atoms in which one atom is not in a ring; however, it matches couples with both atoms in rings.
The Daylight SMARTS matching tool ( http://www.daylight.com/daycgi_tutorials/depictmatch.cgi ) gives different results: there is only one match, C-Cl, which is missed in JChem searching.
Using the pattern "[A,a][A;!R]" is a possible workaround. Both patterns give the same matches using the Daylight tool.
I've attached an image with highlighted, in blue, the matches and a short program to generate that image.
Thank you!
Simone