SMARTS oddity (Fe-N bond)

10 views
Skip to first unread message

Colin Batchelor

unread,
Apr 5, 2012, 8:55:11 AM4/5/12
to indigo-bugs
Hello,

Here is a big molecule:
--8<--

ACD/Labs02031210532D

37 44 0 0 1 0 0 0 0 0 2 V2000
1.0267 -5.6315 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1.0978 -4.4218 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
2.2770 -4.1270 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
3.0394 -2.7547 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
4.0864 -2.1448 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
5.0114 -2.9174 0.0000 N 0 3 0 0 0 0 0 0 0 0 0 0
6.0381 -2.2770 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
5.7433 -1.0978 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
4.5336 -1.0267 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
7.4104 -3.0394 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
8.0203 -4.0864 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
9.1384 -4.5336 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
9.0673 -5.7433 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
7.8881 -6.0381 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
7.1257 -7.4104 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
6.0787 -8.0203 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
5.6315 -9.1384 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
4.4218 -9.0673 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
4.1270 -7.8881 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
5.1537 -7.2477 0.0000 N 0 3 0 0 0 0 0 0 0 0 0 0
5.0826 -5.0826 0.0000 Fe 0 1 0 0 0 0 0 0 0 0 0 0
2.9174 -5.1537 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
2.1448 -6.0787 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
2.7547 -7.1257 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
7.2477 -5.0114 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
0.0000 -6.2820 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
0.1728 -3.6493 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
2.1753 -1.9009 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
6.5158 -0.1728 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
3.8831 0.0000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
8.2642 -2.1753 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
10.1651 -3.8831 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
9.9923 -6.5158 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
7.9898 -8.2642 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
6.2820 -10.1651 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
3.6493 -9.9923 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
1.9009 -7.9898 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
1 2 2 0 0 0 0
1 23 1 0 0 0 0
1 26 1 0 0 0 0
2 3 1 0 0 0 0
2 27 1 0 0 0 0
3 4 2 0 0 0 0
3 22 1 0 0 0 0
4 5 1 0 0 0 0
4 28 1 0 0 0 0
5 6 2 0 0 0 0
5 9 1 0 0 0 0
6 7 1 0 0 0 0
6 21 1 0 0 0 0
7 8 1 0 0 0 0
7 10 2 0 0 0 0
8 9 2 0 0 0 0
8 29 1 0 0 0 0
9 30 1 0 0 0 0
10 11 1 0 0 0 0
10 31 1 0 0 0 0
11 12 2 0 0 0 0
11 25 1 0 0 0 0
12 13 1 0 0 0 0
12 32 1 0 0 0 0
13 14 2 0 0 0 0
13 33 1 0 0 0 0
14 15 1 0 0 0 0
14 25 1 0 0 0 0
15 16 2 0 0 0 0
15 34 1 0 0 0 0
16 17 1 0 0 0 0
16 20 1 0 0 0 0
17 18 2 0 0 0 0
17 35 1 0 0 0 0
18 19 1 0 0 0 0
18 36 1 0 0 0 0
19 20 2 0 0 0 0
19 24 1 0 0 0 0
21 20 1 6 0 0 0
21 22 1 0 0 0 0
21 25 1 0 0 0 0
22 23 1 0 0 0 0
23 24 2 0 0 0 0
24 37 1 0 0 0 0
M CHG 3 6 1 20 1 21 3
M END
--8<--
Now, if I use this code:
IndigoObject im = indigo.loadMolecule(m_ct);
try
{
IndigoObject iq = indigo.loadSmarts(SMARTS);
return indigo.substructureMatcher(im).match(iq);
}
catch (Exception e)
{
throw new Exception(String.Format("Problem with SMARTS
string {0}: {1}",
SMARTS, e.ToString()));
}
and pass it a SMARTS string that looks like any of the following:
[Fe]~N
[Fe]~[N]
[Fe]N
[Fe]-N
then it returns null. Seems to work fine for most other SMARTS
strings.

Am I doing something wrong here, or is it genuinely a bug? I'm using
1.1.7beta.

Best wishes,
Colin.
--
Dr Colin Batchelor MChem CChem CSci,
Senior Informatics Analyst,
Royal Society of Chemistry, Thomas Graham House, Cambridge, UK CB4
0WF.
t: +44 1223 432280 e: batch...@rsc.org skype: batchelorc_rsc.org

Mikhail Rybalkin

unread,
Apr 9, 2012, 5:49:47 PM4/9/12
to indigo-bugs
Dear Colin,

I reproduced this issue. Thank you for the bug report!

Best regards,
Mikhail

> t: +44 1223 432280 e: batchel...@rsc.org skype: batchelorc_rsc.org

Mikhail Rybalkin

unread,
Apr 9, 2012, 5:58:41 PM4/9/12
to indigo-bugs
Hello Colin,

After trying to resolve to issue I found that the biggest cycle in
this molecule is aromatic.

To match both aromatic and non-aromatic atoms you can you use [#7].
So, [Fe]-[#7] query works. SMARTS notation is strict and you can use
ordinary SMILES in this case. But if you need all the SMARTS features
and do not want to care about aromaticity, you can remove aromaticity
constraint on all the query atoms automatically by calling
atom.removeConstraints("aromaticity") for all the atoms in the query.

Best,
Mikhail
Reply all
Reply to author
Forward
0 new messages