Hi all!

I'm having some problems with SMART matching that I don't really know if they 
are due to my not complete understanding of SMARTS or if there is some kind of 
bug within Open Babel. I'm using Open Babel 2.3.0, the prebuilt Mac version on 
a MacBook running OS X 10.6.5. I was playing around with the PAINS SMARTS, 
inspired by the recent blogpost of Rajarshi. Those SMARTS often have explicit 
hydrogens, stated as "...-[#1]" and in those cases my molecules wouldn't hit 
unless I entered the molecule with explicit hydrogens. Example commands 
follow...

# This is the query I would like to have worked, without modifications on 
either molecule or SMARTS
$ echo "OCCOc1ccccc1C=C1C(=O)NC(=S)NC1=O" | obabel -ismi -ocan 
-s'[#6]-1(-[#6](~[!#6&!#1]~[#6]-[!#6&!#1]-[#6]-1=[!#6&!#1])~[!#6&!#1])=[#6;!R]-[#1]'
0 molecules converted

# Here the explicit hydrogen is removed from the query
$ echo "OCCOc1ccccc1C=C1C(=O)NC(=S)NC1=O" | obabel -ismi -ocan 
-s'[#6]-1(-[#6](~[!#6&!#1]~[#6]-[!#6&!#1]-[#6]-1=[!#6&!#1])~[!#6&!#1])=[#6;!R]'
OCCOc1ccccc1C=C1C(=O)NC(=S)NC1=O        
1 molecule converted

# Here the hydrogen is required, but implicit are allowed
$ echo "OCCOc1ccccc1C=C1C(=O)NC(=S)NC1=O" | obabel -ismi -ocan 
-s'[#6]-1(-[#6](~[!#6&!#1]~[#6]-[!#6&!#1]-[#6]-1=[!#6&!#1])~[!#6&!#1])=[#6;!R;H]'
OCCOc1ccccc1C=C1C(=O)NC(=S)NC1=O        
1 molecule converted

# Here the molecule to be tested has had an added hydrogen
$ echo "OCCOc1ccccc1[CH]=C1C(=O)NC(=S)NC1=O" | obabel -ismi -ocan 
-s'[#6]-1(-[#6](~[!#6&!#1]~[#6]-[!#6&!#1]-[#6]-1=[!#6&!#1])~[!#6&!#1])=[#6;!R]-[#1]'
OCCOc1ccccc1C=C1C(=O)NC(=S)NC1=O        
1 molecule converted

# I also tried with the -h switch to add hydrogens to the molecule with no luck 
(does it add the hydrogens before or after the SMARTS matching?
$ echo "OCCOc1ccccc1C=C1C(=O)NC(=S)NC1=O" | obabel -ismi -ocan -h 
-s'[#6]-1(-[#6](~[!#6&!#1]~[#6]-[!#6&!#1]-[#6]-1=[!#6&!#1])~[!#6&!#1])=[#6;!R]-[#1]'
0 molecules converted

I find it kind of unintuitive that query no 1 and 3 gives different results and 
I would have thought that all should match.

Have I missed something or do anyone among you have an idea how to solve my 
problem without rewriting every SMART...

Kind regards,
Fredrik
------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to