That is what I was thinking. If OK for you, I'll try make a ForwardMolSupplier class that does not store does these values, as for the application I have in mind I don't need it.
Hans On 21 Jul 2011, at 05:42, Greg Landrum wrote: > Dear Hans, > > On Wed, Jul 20, 2011 at 10:50 PM, Hans De Winter <[email protected]> wrote: >> >> Hi Eddie, >> your kindfull suggestions do not work neither. I browsed through the code, >> and - if I'm not mistaken, I think that the SmilesMolSupplier class does not >> correctly free the memory of previous read molecules. I'll look at this >> further, because it could well be that I am wrong! Maybe I should write my >> own reader class to make sure this is the case. >> > > As Eddie said: the SmilesMolSupplier itself does not cache > molecules.Using valgrind and running your example code for 10K > molecules or so (add a break at the end of your loop after 10K) makes > it look like it's not leaking any memory either. The only problems > that points out have to do with the singleton PeriodicTable class. > > The SmilesMolSupplier does, however, cache two values per molecule: > the line number and the position in the file. These allow efficient > random-access useage of the supplier and more accurate error > reporting. They will result in a small increase in memory useage as > you run through a smiles file. I've got one running now that has made > it through 1.5million molecules and is currently occupying 72MB of > RAM. If this small memory increase is something that concerns you, it > would be reasonably easy to construct a ForwardSmilesMolSupplier (one > that does not support random access) that does not store these values. > > -greg
<<inline: Logo SilicosIT Email2.jpg>>
Silicos-IT is a division of Imacosi bvba De Roskam 35 2970 Schilde Belgium
------------------------------------------------------------------------------ 5 Ways to Improve & Secure Unified Communications Unified Communications promises greater efficiencies for business. UC can improve internal communications as well as offer faster, more efficient ways to interact with customers and streamline customer service. Learn more! http://www.accelacomm.com/jaw/sfnl/114/51426253/
_______________________________________________ Rdkit-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

