It appears there is a bug where numeric titles do not work with string
comparisons. Leave out the single quotes and it works (on my machine).
obabel ../input/in-3D.sdf -O 9782.sdf --filter "title=9782"
> On Nov 5, 2017, at 8:17 PM, Sundar <[email protected]> wrote:
>
> Hi David,
>
> 9782 is not the 9782th molecule in the file.
> I also will have to loop through sdf for various other numbers. I asked this
> as an example.
>
> Thanks,
> Sundar
>
> On Sun, Nov 5, 2017 at 7:13 PM, David Hall <[email protected]
> <mailto:[email protected]>> wrote:
> Assuming you want the 9782’th molecule in the file, using the -f and -l
> options to obabel is what you are looking for.
>
> obabel ../input/in-3D.sdf -O 9782.sdf -f 9782 -l 9782
>
>
> > On Nov 5, 2017, at 7:49 PM, Sundar <[email protected]
> > <mailto:[email protected]>> wrote:
> >
> > Hi,
> >
> > I was trying to extract a single molecule from a multimolecular sdf.
> > I used the following but it didn't work.
> >
> > obabel ../input/in-3D.sdf -O 9782.sdf --filter "title='9782'"
> >
> > Let me how can I do this.
> >
> > Thanks,
> > Jubilant
> > ------------------------------------------------------------------------------
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org!
> > http://sdm.link/slashdot_______________________________________________
> > <http://sdm.link/slashdot_______________________________________________>
> > OpenBabel-discuss mailing list
> > [email protected]
> > <mailto:[email protected]>
> > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
> > <https://lists.sourceforge.net/lists/listinfo/openbabel-discuss>
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss