Noel, sorry it took me so long, I got busy with other projects as well. I've compiled and tested the latest development version and I got the expected result:
# Open Babel 2.3.90 (Git) $ ./obabel -:'F[C@H](Br)Cl' -s 'F[C@@H](Br)Cl' -osmi 0 molecules converted # Open Babel 2.3.2 (Ubuntu) obabel -:'F[C@H](Br)Cl' -s 'F[C@@H](Br)Cl' -osmi F[C@H](Br)Cl 1 molecule converted I'm thinking to use this version in my code, then, unless you guys think it's not recommendable (or there's an intermediate, more tested version I should rely on...). Thanks, S On 07/09/2014 04:51 AM, Noel O'Boyle wrote: > Try the development version (bit short on time myself right now). I'm pretty > sure I > implemented this. A quick test is: > > obabel -:"'F[C@H](Br)Cl" -s "'F[C@@H](Br)Cl" -osmi > > ...should be "0 molecules converted" > > - Noel > > > On 9 July 2014 00:16, Craig James <cja...@emolecules.com > <mailto:cja...@emolecules.com>> > wrote: > > On Tue, Jul 8, 2014 at 2:05 PM, Stefano Forli <fo...@scripps.edu > <mailto:fo...@scripps.edu>> wrote: > > Hi all, > I'm having an issue with SMARTS pattern matching and chirality. > I'm trying to recognize one specific chiral configuration, but I get > unexpected > answers, > see the following example: > ------------------------------ > #!/usr/bin/env python > import pybel > ob = pybel.ob > patterns = [ ('p1' , '[$(*[C@@H])]'), > ('p2' , 'F[C@@H](Br)Cl'), > ('p3' , '[$(*[C@H])]'), > ('p4' , 'F[C@H](Br)Cl'), > ] > $ python smartest.py > Molecule F[C@H](Br)Cl ... > > PATTERN p1 : [$(*[C@@H])] => [(1,), (3,), (4,), (5,)] > PATTERN p2 : F[C@@H](Br)Cl => [(1, 2, 4, 5)] > PATTERN p3 : [$(*[C@H])] => [(1,), (3,), (4,), (5,)] > PATTERN p4 : F[C@H](Br)Cl => [(1, 2, 4, 5)] > > I would expect patterns p1 and p2 to return no matches, and p3 and p4 > to succeed. > > > p1 and p3 should match all of the hetero atoms (1,3,4,5), and it does so > correctly. > The chiral spec is incomplete, which allows it to match anything. Think > of it this way: > > p1: [$(*[C@@H](*)*)] > p3: F[C@@H](*)* > > Written this way, you can see that p1 and p3 will both match either > stereo configuration. > > > Although, even carbon chirality is clearly the opposite in the > molecule and p1, > p2, the > script finds matches. > > > It should not match p2. > > Craig > > > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community > Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > _______________________________________________ > OpenBabel-discuss mailing list > OpenBabel-discuss@lists.sourceforge.net > <mailto:OpenBabel-discuss@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss > > -- Stefano Forli, PhD Staff Scientist Molecular Graphics Laboratory Dept. of Integrative Structural and Computational Biology, MB-112F The Scripps Research Institute 10550 North Torrey Pines Road La Jolla, CA 92037-1000, USA. tel: (858) 784-2055 fax: (858) 784-2860 email: fo...@scripps.edu http://www.scripps.edu/~forli/ ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss