Quick one.

I have the following which writes to an .sdf file:

w = AllChem.SDWriter(output_file)
    for mol in molecules:
        confIds = [c.GetId() for c in mol.GetConformers()]
        for cid in confIds:
            w.write(mol, confId=cid)
w.close()

Now, what I would like is instead of writing to a file - I would like
to "write" to a string (so I can zip the output using the zlib
library).

Do I just need to get the MolBlock and interleave the varies entries with $$$$ ?

Many Thanks
JP

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to