From: Axel Kohlmeyer (
Date: Tue Oct 14 2008 - 11:13:11 CDT

On Tue, 14 Oct 2008, Benjamin Bouvier wrote:

BB> Hi all,

hi benjamin,

BB> set startlist [ lsort [ glob *.coor ] ]
BB> foreach start $startlist {
BB> cd $coordir
BB> set mnum [ mol load pdb $start ]

please use "mol new" the "mol load" syntax is deprecated
and will be removed at some point.

BB> cd $trajdir
BB> set traj [ join "[ lindex [ split $start . ] 0 ] dcd" . ]
BB> mol addfile $traj first $startframe last $endframe step
BB> $stepframe waitfor all molid mnum
BB> 2. Then comes some analysis (irrelevant to my problem)...

i disagree. the vast majority of memory leak problems so far
could be traced back to calls to atomselect without the
proper deletions.

BB> 3. Before going on to the next trajectory, I try to free up memory:
BB> puts "Done with window $start..."
BB> animate delete all
BB> mol delete $mnum
BB> }
BB> The whole thing seems to work, but memory usage keeps climbing and the
BB> script runs out of memory after 4-5 trajectories... So it seems the "mol
BB> delete" and "animate delete" commands do not release the memory, as I

just "mol delete $mnum" should suffice.

BB> thought they would.
BB> Any clues ?

do you see the same problem _without_ the analysis?

if yes, does it still happen with the latest alpha build?


BB> BTW: This is VMD 1.8.6 on 64-bit Linux.
BB> Cheers,
BB> ----
BB> Benjamin

Axel Kohlmeyer
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
If you make something idiot-proof, the universe creates a better idiot.