[Dock-fans] Does dock6.1 have a memory leak

Scott Brozell sbrozell at scripps.edu
Thu Feb 14 15:29:53 PST 2008


On Thu, 14 Feb 2008, Sam Kaye wrote:

> I recently noticed that when I run amber scoring in Dock6.1 on a 
> large-ish number of molecules (anything over ~1000) I eventually run out 
> of memory and swap space. The progression of the memory usage is an 
> almost perfect 45 degree plot (I got my sys admin to check). I've tried 
> this on several machines now with the same result with the exception 
> that on the linux cluster I tried, once it had reached the memory limit, 
> it bobbed along the top rather than the job hanging the whole machine 
> (which then led to a reboot).
> I check the mail archive but nobody else seems to mention this problem. 
> Has anyone else encountered this?

Yes and it is patched in 6.2 which will be released very soon.
So there won't be a bugfix.  It's an easy patch; add to
Amber_Score::compute_score(DOCKMol & mol)
the four lines below:
diff -c -r1.70 -r1.72
*** score_amber.cpp  4 Apr 2007 20:19:47 -0000  1.70
--- score_amber.cpp  10 Oct 2007 21:33:31 -0000 1.72
*** 430,435 ****
--- 430,439 ----
          mol.setxyz( &complex_xyz[ 3 * num_receptor_atoms ] );
          // send dock the ligand charges from the NAB ligand molecule.
          mol.setcharges( ligand->m_prm->Charges, 1.0/AMBER_ELECTROSTATIC );
+         freemolecule( ligand );
+         ligand = NULL;
+         freemolecule( complex );
+         complex = NULL;

      return true;

Here's what I wrote:
Added freeing of nab molecules at the end of every score computation.
A memory leak still exists, but this is a big improvement.  On oscbw
before 839 nothing-scores in 1062.111u 1.903s 17:45.05 99.9%
now 6184 nothing-scores in 7894.729u 13.475s 2:12:16.04 99.6%
for RNA test set 1NYI:
Number of receptor strands is 2
Number of receptor residues is 40
Number of receptor atoms is 1287
Number of ligand strands is 1
Number of ligand residues is 1
Number of ligand atoms is 33


More information about the Dock-fans mailing list