Dear JP, On Mon, May 16, 2011 at 7:56 PM, JP <[email protected]> wrote: > 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).
At the moment this is not possible. SDWriters can only write to named files. It would be a useful feature and I think it should be possible, but I'm going to have to do some research. > Do I just need to get the MolBlock and interleave the varies entries with > $$$$ ? That will definitely work. -greg ------------------------------------------------------------------------------ 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

