From: Daniel Han (dsh2002_at_med.cornell.edu)
Date: Wed Jan 26 2005 - 18:53:55 CST

Hello VMDers,
I am running a script that counts the number of contacts a residue has.
I wanted to limit the contacts, to only those that were near the
sidechain and not the backbone.

While the two commands below, produce the same results:
set nearby [atomselect $mol "$seltext2 and within $dist of ((resid
$residue and not hydrogen) and (not backbone))" frame $i]
set nearby [atomselect $mol "$seltext2 and within $dist of ((resid
$residue and not hydrogen) and (sidechain))" frame $i]
  
The second command uses up a large amount of memory, and the memory
usage will stay high even after the script is complete.
On the other hand, the first command uses a small to no amount of memory
at all, but takes much longer for the script to complete.

I imagine it has to do something with short circuiting of commands ...
any ideas?

Danny.