In the development code, -v now can take a file name. For -v and -s 
the files can contain multiple pattern molecules (which are OR-ed).

Chris

On 08/09/2010 17:32, Douglas Houston wrote:
> Thanks Chris,
>
> The line you gave seemed to do the trick - after I escaped out the
> tilde. Is the usage of the tilde to reverse the sense of the filter
> documented? I would have thought the -v option would be logical.
>
> Sieve seems to do what I want - almost. It looks like it filters using
> SMARTS - but all my undesirable groups are in SDF format. How do I
> convert to SMARTS? OpenBabel doesn't seem to do it (although it can
> filter using them, strangely).
>
> I realise I could potentially use SMILES as input but this doesn't
> work in some cases, e.g. 'C1=CC=CC=C1' is a benzene ring in SMILES
> format but according to the following link will not match benzene if
> it's used as a SMARTS string.
>
> http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html
>
> cheers,
>
> Doug
>
>
>
> Quoting Chris Morley<c.mor...@gaseq.co.uk>:
>
>> On 08/09/2010 13:17, Douglas Houston wrote:
>>> Hi,
>>>
>>> According to this page:
>>>
>>> http://baoilleach.webfactional.com/site_media/ob-docs/Features/Fingerprints.html#fingerprints
>>>
>>> I can use the -s option with the name of a file, e.g.:
>>>
>>> babel mymols.sdf -sSubstructure.sdf mymols_filtered.sdf
>>>
>>> will write out all the compounds in mymols.sdf that contain the group
>>> in Substructure.sdf. However, what I'd like is the opposite, i.e. to
>>> write out everything that doesn't match. I tried using -v instead of
>>> -s but this didn't work.
>>
>> I think the following will do what you want
>> babel mymols.sdf -s ~Substructure.sdf mymols_filtered.sdf
>>>
>>> It would also be nice if I could use a file that contained more than
>>> one entry, i.e. the file Substructure.sdf could define multiple
>>> fragments that I don't want  in my molecules, rather than having to
>>> run Babel on each one separately.
>>
>> It would have to be decided whether the combination was AND or OR.
>> What you want is NOT(frag1 OR frag2 OR...)
>> In the related --filter option there is an implicit AND between tests,
>> but I think for both the -s filter and its inverse the OR behaviour is
>> more intuitive.
>>>
>>> Would this be doable before the final release?
>>
>> It may be, but I am about to go on holiday, so don't hold your breath.
>>
>> Thanks for this suggestion. Other suggestions for useful features are
>> very welcome.
>>
>> You could look at the Sieve program, http://www.silicos.be/sieve.html
>> which is an industrial-strength filtering program, now using OpenBabel.
>>
>> Chris
>>
>> ------------------------------------------------------------------------------
>> This SF.net Dev2Dev email is sponsored by:
>>
>> Show off your parallel programming skills.
>> Enter the Intel(R) Threading Challenge 2010.
>> http://p.sf.net/sfu/intel-thread-sfd
>> _______________________________________________
>> OpenBabel-discuss mailing list
>> OpenBabel-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>>
>>
>
>
>
>
> _____________________________________________________
> Dr. Douglas R. Houston
> Scientific Programme Coordinator / Research Associate
> Room 3.23
> Institute of Structural and Molecular Biology
> Michael Swann Building
> King's Buildings
> University of Edinburgh
> Edinburgh, EH9 3JR, UK
> Tel. 0131 650 7358
>
>
>
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.851 / Virus Database: 271.1.1/3121 - Release Date: 09/08/10 
> 07:07:00
>


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to