From: Maxim Belkin (mbelkin_at_ks.uiuc.edu)
Date: Mon Apr 06 2015 - 15:49:59 CDT

Call "$sel update" after "$sel frame $framenumber"

Maxim

> On Apr 6, 2015, at 1:34 PM, Aryan Vahedi <arvah1_at_morgan.edu> wrote:
>
> Hi John,
>
> Very nice to be talking to the lead developer of VMD! To answer your question, my intention is to use a script to identify residues that fall within the specified range and then conduct further analysis on them. I have created the following script but suspect there is an issue with it (numbers in red are specific to my loaded trajectory).
>
> >set sel [atomselect top "protein and within 3 of resname CNT"]
> >set completelist {}
> >for {set framenumber 0} {$framenumber < 1656} {incr framenumber} {
> > $sel frame $framenumber
> > set list1 [$sel get resid]
> > set completelist [concat $completelist $list1]
> }
> After sourcing the script, I use the following to pull up the residues:
>
> >lsort -unique $completelist
>
> And this gives me a list of residues. My issue is that this list matches the same exact residues that would come up if I just did the $sel get resid commandin the Tkconsole after skipping to the last frame in the trajectory I have loaded. As a result, I suspect that I am not properly using the loop (for) command properly. Indeed it seems like there are many more residues involved in the interaction over the entire course of the trajectory when I use the appropriate visualization and same selection (including update selection for each frame) under Graphical Representations.
>
> Am I correct, is the for loop command not being properly used in this case?
>
> Best,
> Aryan
> Morgan State University
>
>