From: Ajasja Ljubetič (ajasja.ljubetic_at_gmail.com)
Date: Thu Oct 28 2010 - 17:23:16 CDT

On Thu, Oct 28, 2010 at 20:11, Axel Kohlmeyer <akohlmey_at_gmail.com> wrote:

> On Thu, Oct 28, 2010 at 2:05 PM, Ajasja Ljubetič
> <ajasja.ljubetic_at_gmail.com> wrote:
> > Dear Alex,
> > well, I can believe that (very) few people encounter this error.
> > I'm only worried about memory leaks. (But not that much, since I have at
> > most a few tens of such selections).
>
> you don't have to worry about this.
>
> Ok, then catch {$sel delete} msg it is:)

> > If the call $sel delete fails, then one would assume the selection
> remains
> > in memory. So does that mean then I could just skip the calls to $sel
>
> no, the selection will be freed. the error message
> originates from something else, that is hard to explain
> in one sentence. as i wrote before. i can give you a
> detailed explanation and even the code that should
> help to correct that, if you are curious about these things
> (or anybody else). but i need to look up the details
> to make sure i am explaining it right and extract the
> right code from my tree.
>
> No need, thank you (my supervisor would definitely not be thrilled if I
spent three days looking at esoteric TCL scope levels:)
And the VMD developer's time is probably better spent on other features
(such as real-time ambient occlusion, multiple pass anaglyph, or perhaps
just upgrading the dcd plugin, so it can append frames to existing files).

Best regards,
Ajasja

> cheers,
> axel.
>
> > delete?
> > Best regards,
> > Ajasja
> >
> > On Thu, Oct 28, 2010 at 16:22, Axel Kohlmeyer <akohlmey_at_gmail.com>
> wrote:
> >>
> >> dear ajasja,
> >>
> >> On Thu, Oct 28, 2010 at 7:56 AM, Ajasja Ljubetič
> >> <ajasja.ljubetic_at_gmail.com> wrote:
> >> > Dear all,
> >> > I believe the following script should work, but it returns "can't
> unset
> >> > "upproc_var_atomselect23903": no such variable" .
> >>
> >> you are triggering an "undocumented feature" in VMD.
> >>
> >> if you want the long explanation and the code to remove
> >> the inconsistency in this behavior, you'll have to give me
> >> some time to dig it out of my private VMD tree. i've been
> >> proposing a couple of times to have this fixed, but it has
> >> been put on the backburner, since so extremely few people
> >> run into this issue, and the changes would require extensive
> >> testing to make sure no existing script/plugin is broken by it.
> >> since atom selections are such a key feature in VMD, the
> >> reluctance to apply this kind of change is very understandable.
> >>
> >> the short explanation is: don't worry. it is a side effect of
> >> $sel global and can be ignored. try replacing:
> >>
> >> $sel delete
> >>
> >> with:
> >>
> >> catch { $sel delete } msg
> >>
> >> and your code should work fine.
> >>
> >> cheers,
> >> axel.
> >>
> >>
> >> > Best regards,
> >> > Ajasja
> >> >
> >> >
> >> > proc freesel {sel} {
> >> > $sel delete
> >> > }
> >> > proc atest {sel} {
> >> > set a [atomselect top $sel]
> >> > $a global
> >> > return $a
> >> > }
> >> > proc dotest {} {
> >> > set selx [atest "protein"]
> >> > freesel $selx
> >> > }
> >> > dotest
> >>
> >>
> >>
> >> --
> >> Dr. Axel Kohlmeyer
> >> akohlmey_at_gmail.com http://goo.gl/1wk0
> >>
> >> Institute for Computational Molecular Science
> >> Temple University, Philadelphia PA, USA.
> >
> >
>
>
>
> --
> Dr. Axel Kohlmeyer
> akohlmey_at_gmail.com http://goo.gl/1wk0
>
> Institute for Computational Molecular Science
> Temple University, Philadelphia PA, USA.
>