From: John Stone (johns_at_ks.uiuc.edu)
Date: Sat Feb 03 2007 - 00:45:58 CST

Arneh,
  Can you show me the precise selections you're doing
in your script? Yes, I would expect that if your script
was broken, it would probably leak the same amount irrespective
of the selection text if it was the atom selections that were
leaking. On the other hand, if you're storing data resulting
from the calculation in lists, arrays, or something else,
that might also be a possible source of memory use. If you show
me the precise atom selections you're doing, I can see if I
find anything unusual looking through the code and/or by
testing with valgrind or Purify.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Fri, Feb 02, 2007 at 06:04:29PM -0800, Arneh Babakhani wrote:
> Hi John, thanks for the suggestion. I am aware of this problem. I've
> made the correction.
>
> But, I'm still getting the error. I'm just trying to plot out some
> RMSDs. Everything works fine when I run the script to calculate the RMSD
> of the entire peptide (that is when I set the selection to be the entire
> peptide). But then I get the error when I try to do the same analysis
> for one sidechain (in other words, just changing the selection). Rather
> bizarre . . .
>
> If there was something wrong with my script, it should fail always,
> irrespective of the selection, no???
>
> Thanks,
>
> Arneh
>
>
>
> John Stone wrote:
> >Arneh,
> > This is typically caused by an improperly written script that
> >creates atom selections in a loop but does not delete them. You should
> >check and make sure that within all loops in your code, any place
> >you have a:
> ># inside loop
> > set sel [atomselect $foo $bar]
> >
> >You should also have a matching:
> ># inside loop
> > $sel delete
> >
> >Cheers,
> > John Stone
> > vmd_at_ks.uiuc.edu
> >
> >On Fri, Feb 02, 2007 at 02:16:04PM -0800, Arneh Babakhani wrote:
> >
> >>Hi,
> >>
> >>I'm trying a run a script in vmd, in which I load up some trajectories
> >>and then calculate an RMSD. It worked just fine the first few times, but
> >>now it's crashing out on me, giving an error:
> >>
> >>terminate called after throwing an instance of 'std::bad_alloc'
> >>what(): St9bad_alloc
> >>Abort
> >>
> >>
> >>Any ideas what's causing this? I doubt its a VMD issue or a problem with
> >>my script, b/c it ran fine before. A computer issue? Need to reboot?
> >>(would rather not).
> >>
> >>Thanks,
> >>
> >>Arneh
> >>
> >
> >

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078