Hi RDKitters
I am experiencing a slightly strange issue when doing a large number of
SMARTS reactions.
If I do the reaction inside a loop, as the index of the loop gets larger, I
see python grabbing more and more memory from the OS
Min Example:
rxn = ReactionFromSmarts(""[*:1][Cl:3].[*:2][Cl:4]>>[*:1][*:2]") # This
links two molecules together at the position marked with Cl atoms
#Assuming I have a function that returns two random relevant smiles,
gen_random_smiles()
for i in range(0, 1000):
smiles1, smiles2 = gen_random_smiles()
mol1 = MolFromSmiles(smiles1)
mol2 = MolFromSmiles(smiles2)
prods = rxn.RunReactants((mol1, mol2))
yield prods
Will result in a steadily climbing memory usage. This persists if I alter
the code to force garbage collection. I do not remember this happening in
earlier versions of RDKit, has anything changed that would alter this
behaviour? Or do I perhaps have some rose tinted specs on and this is just
python memory fragmentation?
Ed Pyzer-Knapp
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss