[Open Babel] obgrep

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Open Babel] obgrep

drc-2
I've just installed the latest snapshot under MacOSX 10.4.2 and noticed a couple of things,

obtanimotto whilst mentioned in the tools readme is absent

I tried using the command below which should give me a count of matching molecules, but got only a question mark.

user1$ /usr/local/bin/obgrep -c "c" '/Users/user1/Desktop/acetophenones.sdf'
?
user1$

user1$ /usr/local/bin/obgrep -n "c" '/Users/user1/Desktop/acetophenones.sdf'

worked fine

Chris



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Open Babel] obgrep

Geoffrey Hutchison

On Sep 10, 2005, at 3:31 PM, [hidden email] wrote:

> obtanimotto whilst mentioned in the tools readme is absent

I'll try to fix the documentation. It's been replaced -- if you want  
that functionality, Chris merged it into babel with the new  
"fastsearch" format.

Prepare an index:
   babel datafile.xxx index.fs
or
   babel datafile.xxx -ofs namedindex
With options you can specify:
which type of fingerprint to be used, e.g. -xfFP2,
whether it is folded to a specified number of bits, e.g. -xn128  
(which should be a power of2)

Then:
Similarity search in a previously prepared index file
This rather done (rather than a substructure search) if the -at  
option is used,

   babel datafile.xxx outfile.yyy -sSMILES -ifs -at0.7
for instance
-at0.7 will recover all molecules with Tanimoto greater than 0.7
-at15 (no decimal point) will recover the 15 molecules with largest  
coefficients.
-aa will add the Tanimoto coefficient to the titles of the output  
molecules.


> I tried using the command below which should give me a count of  
> matching molecules, but got only a question mark.

Could you file a bug report? I'll make sure to take a look at that.

Thanks,
-Geoff


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Open Babel] obgrep

Chris Morley-3


Geoffrey Hutchison wrote:

>
> On Sep 10, 2005, at 3:31 PM, [hidden email] wrote:
>
>> obtanimotto whilst mentioned in the tools readme is absent
>
>
> I'll try to fix the documentation. It's been replaced -- if you want  
> that functionality, Chris merged it into babel with the new  
> "fastsearch" format.
>
> Prepare an index:
>   babel datafile.xxx index.fs
> or
>   babel datafile.xxx -ofs namedindex
> With options you can specify:
> which type of fingerprint to be used, e.g. -xfFP2,
> whether it is folded to a specified number of bits, e.g. -xn128  (which
> should be a power of2)
>
> Then:
> Similarity search in a previously prepared index file
> This rather done (rather than a substructure search) if the -at  option
> is used,
>
>   babel datafile.xxx outfile.yyy -sSMILES -ifs -at0.7
> for instance
> -at0.7 will recover all molecules with Tanimoto greater than 0.7
> -at15 (no decimal point) will recover the 15 molecules with largest  
> coefficients.
> -aa will add the Tanimoto coefficient to the titles of the output  
> molecules.
>

The FingerprintFormat fpt will also give you Tanimoto coefficients
in a rather easier way.
    babel infile.xxx -ofpt
will give you the Tanimoto coefficient between the first molecule
in infile.xxx and each of the subsequent ones. If the molecules
are in different files just specify these
    babel firstmol.xxx secondmol.xxx -ofpt
The files can be different formats( e.g. .smi and .mol) or can
have any name if you use -ixxx. Of course you can also specify
them using wildcards.

The fingerprint type can be changed with an option like -xfFP2,
but currently this is the only type viable.  It is based on
molecular fragments like the Daylight system and may not be the
best for molecular similarity because it doesn't count multiple
occurrences of a structural fragment. Ones based on matches to
range of structural patterns would be near instantly available if
somebody could provide a list of SMARTS patterns. The framework is
there to include some more innovative fingerprint types if there
were some generous contributors.

On the absence of the obtanimoto program: I prefer tools like this
to be accessible from the main OpenBabel interface rather than
being separate programmes because I usually work from a GUI which
is a front end to the main program. The full range of file
handling capabilities and options are also available without
having to be tediously programmed into a separate program. For
example if you were only interested in Tanimoto coeffs to the
phenols in your multiple molecule file, you would use
    babel target.xxx bigfile.yyy -ofpt -sc1ccccc1O
(or something like it).
But I realize tastes on this differ.

Chris



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Loading...