I was assuming the issue is the string overload for filename versus string data
which causes the need for the SetData function.
What I meant by not re-constructing the class is:
nsuppl = Chem.SDMolSupplier()
nsuppl.SetData(mb)
mol = nsuppl.next()
nsuppl.SetData(mb2)
mol = nsuppl.next()
A minor optimization which isn't as easily possible with the StringIO
implementation.
----
Brian Kelley
> On Oct 3, 2016, at 9:04 AM, Greg Landrum <[email protected]> wrote:
>
>
>
>> On Mon, Oct 3, 2016 at 2:53 PM, Brian Kelley <[email protected]> wrote:
>> I'll admit that using StringIO here feels more pythonic, although SetData
>> can be reused without a reconstructing the class.
>
> I guess pythonic is in the eyes of the beholder, but I don't understand that
> at all...
>
>> I suppose I would prefer having something like
>>
>> MolToSDDataBlock
>>
>> Which can be used in conjunction with MolToMolBlock. I have often found
>> that many times data changes without molecule change so perhaps both could
>> be useful.
>
> But then that's a different problem entirely. :-)
>
> -greg
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss