Hi JP, On Tue, Jan 3, 2012 at 1:27 PM, JP <[email protected]> wrote: > Happy new year Greg... > > I have checked out the trunk and tested Chem.ForwardSDMolSupplier on my huge > file and it worked fine (on my previously failing 7GB file).
great. > It might be a good idea to update the class documentation > at http://www.rdkit.org/new_docs/api/rdkit.Chem.rdmolfiles.ForwardSDMolSupplier-class.html > Say usage examples and a note or two about using this class when handling > large files. I haven't updated the docs on the website (which are more-or-less in sync with the current release), but you do have at least some of this information available to you from within Python: >>> help(Chem.ForwardSDMolSupplier) Help on class ForwardSDMolSupplier in module rdkit.Chem.rdmolfiles: class ForwardSDMolSupplier(Boost.Python.instance) | A class which supplies molecules from file-like object containing SD data. | | Usage examples: | | 1) Lazy evaluation: the molecules are not constructed until we ask for them: | >>> suppl = ForwardSDMolSupplier(file('in.sdf')) | >>> for mol in suppl: | ... if mol is not None: mol.GetNumAtoms() | | 2) we can also read from compressed files: | >>> import gzip | >>> suppl = ForwardSDMolSupplier(gzip.open('in.sdf.gz')) | >>> for mol in suppl: | ... if mol is not None: print mol.GetNumAtoms() | | Properties in the SD file are used to set properties on each molecule. | The properties are accessible using the mol.GetProp(propName) method. > I want to test the zip/gzip/bzip functionality (passing a compressed > "file-like" object to SDMolSupplier, SDWriter, etc) - but I cannot find the > documentation in /trunk/Docs/code/C++ or Python. This was > the intuitive place to look for it - where is it, please? With the ForwardSDMolSupplier it's in the class docstring (show above). SDWriter doesn't have this yet. That's a good todo for me. > Many thanks for your work on RDKit in 2011, you don't need to be told but > you did a fantastic job. Thanks! -greg ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ Rdkit-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

