I think, I've pin-pointed the issue in the source - OBConversion class. The
first and last molecule is set by SetStartAndEnd method. It's being called
only by Convert method, not by Read nor ReadFile, hence the binding dont
use -f and -l. I figure if i't called SetStartAndEnd in Read or ReadFile,
then it should work. Unfortunately I struggle to find the spot. Tried to
add it to ReadFile, but it does not work.
Any better ideas?
----
Pozdrawiam, | Best regards,
Maciek Wójcikowski
mac...@wojcikowski.pl
2013/12/5 Geoffrey Hutchison <geoff.hutchi...@gmail.com>
> This only proves, that I really want to use it. Is the proof.py script
> working correctly for anybody (attached in previous mail)? It should ouptut
> molecules no. 5-10 out of 100 in proof.sdf
>
>
> No, it doesn't work.
>
> % python proof.py | wc
> 100 100 1300
>
> Hmm. Chris, any idea why this wouldn't work from Python?
>
> obconversion = OBConversion()
> obconversion.SetInFormat("sdf")
> obconversion.AddOption('f', obconversion.GENOPTIONS, "5")
> obconversion.AddOption('l', obconversion.GENOPTIONS, "10")
> obmol = OBMol()
>
> notatend = obconversion.ReadFile(obmol,"proof.sdf")
> while notatend:
> print obmol.GetTitle()
> obmol = OBMol()
> notatend = obconversion.Read(obmol)
>
>
>
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss