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