Makes sense, but I guess the documentation needs to be updated, both in the -H 
cli help 
and online because in the current form it's a bit misleading.

Anyway, this means that fastsearch index can't be used for PAINS filtering, for 
example, 
which was what I was trying to do.

I'm not sure it would make sense trying to generate 450+ SMILES substructures 
of the PAINS 
patterns, then use them in the first filtering step. Plus, chances are that 
'borderline' 
conditions would let to many false positive and negatives.

Thanks for the support,


S


On 03/23/2015 03:38 AM, Chris Morley wrote:
> The -s option is more restricted when used with the fs format. If you type
>
> obabel -L fs
>
> the documentation says:
>
> The search target is the parameter of the ``-s`` option and can be
> slightly extended SMILES (with ``[#n]`` atoms and ``~`` bonds) or
> the name of a file containing a molecule.
>
> This is because fastsearch uses fingerprints the target as well as the
> searched molecules, so the content of the s option has to be a molecule.
>
> You could do the search in two parts - a rough fastsearch using SMILES
> which is then refined using SMARTS:
>
> obabel index.fs -omol2 -sSMILES -an |
>     obabel -imol2 -O first.smi -sSMARTS
>
> Chris
>
> On 21/03/2015 21:52, Stefano Forli wrote:
>> I think there's an error either in the documentation or in the 
>> implementation of the
>> filter by pattern in obabel (v2.3.2). The online help says:
>>
>>     $ obabel -H
>>     ...
>>     -s"smarts" Convert only if match SMARTS or mols in file:
>>     ...
>>
>> as well as the documentation page here:
>>      
>> http://openbabel.org/docs/dev/Fingerprints/fingerprints.html#substructure-searching
>>
>> Although, when trying the following example, I get an error message that 
>> implies the code
>> is expecting a SMILES string:
>>
>> --------------------
>> $ obabel -ifs mol2_files_top50K.fs
>> -s'[#6]-1(=[#6](-[$([#1]),$([#6](-[#1])-[#1]),$([#6]=[#8])])-[#16]-[#6](-[#7]-1-[$([#1]),$([#6]-[#1]),$([#6]:[#6])])=[#7;\!R])-[$([#6](-[#1])-[#1]),$([#6]:[#6])]'
>> -osmi -O first.smi
>> ==============================
>> *** Open Babel Error  in ReadMolecule
>>      C-1(=C(-[$(H),$(C(-H)-H),$(C=O)])-S contained a character ',' which is 
>> invalid in SMILES
>> ==============================
>> *** Open Babel Error  in ObtainTarget
>>      Cannot read the SMILES string
>> 0 molecules converted
>> ----------------------
>>
>> (note: I've escaped some characters in the pattern to avoid shell errors).
>>
>> Thanks,
>>
>> S
>>
>>
>>
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> OpenBabel-discuss mailing list
> 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: +1 (858)784-2055
     fax: +1 (858)784-2860
     email: fo...@scripps.edu
     http://www.scripps.edu/~forli/

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to