Menu

#110 SMARTS support for cis/trans

2.3
open
API (57)
7
2012-10-23
2007-02-19
Craig
No

SMARTS match is wrong for SMARTS containing cis/trans double bonds. Examples:

$ echo 'C\C=C/C' | obgrep 'C\C=C/C'
C\C=C/C
$ echo 'C/C=C\C' | obgrep 'C\C=C/C'
C/C=C\C
$ echo 'C/C=C/C' | obgrep 'C/C=C/C'
C/C=C/C
$ echo 'C\C=C\C' | obgrep 'C/C=C/C'
(no output)

The last example "C\C=C\C" is the exact same trans configuration as the second-to-last one, so it should match "C/C=C/C", but it doesn't.

You simply can't use SMARTS if it contains '/' or '\' because it frequently gives the wrong answer.

Discussion

  • Geoff Hutchison

    Geoff Hutchison - 2007-03-01

    Logged In: YES
    user_id=21420
    Originator: NO

    Considering today's change (to disable / or \ recognition, I think this becomes a feature request, rather than a bug report.

    So I'm going to move this to "Feature requests." (i.e., need cis/trans support back). I'll also make a note on the wiki.

    -Geoff

     
  • Geoff Hutchison

    Geoff Hutchison - 2010-04-10

    Noel, I can work with you to re-implement the SMARTS -- if you can help me learn the double-bond stereo code in the trunk.