And there's no other way to generate a SDF from Java?
e.g. can each ROMol be converted to text in SD format and then that text written to the Java OutputStream?

Tim

On 30/03/2016 13:31, Greg Landrum wrote:
Hi Tim,

That constructor is expecting a C++ stream pointer. The takeOwnership flag tells it to take assume ownership of the pointer (i.e. to free up the memory being used by the stream when the SDWriter itself is free'd). I am guessing that this will not be useable from Java (and should probably be disabled).

There is likely a way to set up the wrappers so that Java streams are properly handled, but it's difficult to assess how much work that would be.

-greg


On Wed, Mar 30, 2016 at 2:00 PM, Tim Dudgeon <tdudgeon...@gmail.com <mailto:tdudgeon...@gmail.com>> wrote:

    Hi All,

    this probably a pretty basic question, but I'm struggling to work out
    how to use the SDWriter from Java.
    The class that SWIG has generated for SDWriter has a constructor
    of type:
    SDWriter(SWIGTYPE_p_std__ostream outstream)
    which looks like its the one I need (I need to write to a Java
    OutputStream, not a file).
    But I can't would out how to generate an instance of
    SWIGTYPE_p_std__ostream from my Java OutputStream.
    Any pointers?

    (Also, what does the boolean takeownership param of the similar
    constructor do?)


    Tim



    
------------------------------------------------------------------------------
    Transform Data into Opportunity.
    Accelerate data analysis in your applications with
    Intel Data Analytics Acceleration Library.
    Click to learn more.
    http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
    _______________________________________________
    Rdkit-discuss mailing list
    Rdkit-discuss@lists.sourceforge.net
    <mailto:Rdkit-discuss@lists.sourceforge.net>
    https://lists.sourceforge.net/lists/listinfo/rdkit-discuss



------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to