Express your substructure as SMARTS and use: obabel dbase.sdf -s "SMARTS" -O results.sdf
If you are doing multiple searches (i.e. different SMARTS each time) you can do it in one go (I think) as SMARTS has an OR syntax. - Noel On 20 November 2012 08:03, Visvaldas K. <coyote_v2...@yahoo.com> wrote: > Dear all, > > I am trying to look for certain molecules in the sdf/fs database containing > certain fragments as substructure. The problem is my fragments can be small > (I am running a script to do multiple searches), so I can get "too many > candidates in the fingerprint search phase". The simple solution is to > filter out the big molecules before doing substructure search, but openbabel > does the substructure search first, i.e. > > obabel dbase.sdf -d --filter "atoms < 20" -O results.sdf -s trial.smi -al > 9000 -ifs > > gives the identical "too many candidates" message. Of course, I can keep > increasing "-al 9000" but that's a workaround and not the real solution. > > For some reason, piping > > obabel dbase.fs -d --filter "atoms < 20" -ocopy | obabel -ifs -O results.sdf > -s trial.smi -al 9000 > > stalls even at the first step --- it seems that one cannot filter "fs" > database, but I am not sure if I am using the correct syntax. > > > Best regards, > > Vis > > > > ------------------------------------------------------------------------------ > Monitor your physical, virtual and cloud infrastructure from a single > web console. Get in-depth insight into apps, servers, databases, vmware, > SAP, cloud infrastructure, etc. Download 30-day Free Trial. > Pricing starts from $795 for 25 servers or applications! > http://p.sf.net/sfu/zoho_dev2dev_nov > _______________________________________________ > OpenBabel-discuss mailing list > OpenBabel-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss > ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss