SMARTS parsing error

41 views
Skip to first unread message

oleg.ursu

unread,
Dec 15, 2013, 5:05:42 AM12/15/13
to indigo-...@googlegroups.com
There appears to be an error when parsing SMARTS query strings with Indigo toolkit 1.1.11

when trying to parse '[!#1!#6]' - "not a C and not a hydrogen atom" Indigo throws out an exception:
>>>query=indigo.loadSmarts('[!#1!#6]')
IndigoException: 'SMILES loader: two element labels for one atom'

however reformatting the query to contain explicit high precedence "&"
>>>query=indigo.loadSmarts('[!#1&!#6]')
works ok, Daylight specifications for SMARTS logical operators "The default operation is & (high precedence "and"), i.e., two adjacent primitives without an intervening logical operator must both be true for the expression (or subexpression) to be true".

Oleg.

Mikhail Rybalkin

unread,
Dec 16, 2013, 8:12:30 AM12/16/13
to indigo-...@googlegroups.com
Hello Oleg,

Thank you for this bug report. We didn't consider adding "and" operator with "not" operations. We are adding implicit "and" operator in SMARTS like [nH1], but not in your case. We will fix it soon and I will post a message here about it.

Best regards,
Mikhail

Mikhail Rybalkin

unread,
Dec 25, 2013, 1:42:18 AM12/25/13
to indigo-...@googlegroups.com
We've fixed it in Indigo 1.1.12. Thank you for bug report!

Mikhail
Reply all
Reply to author
Forward
0 new messages