From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Fri Jul 08 2011 - 15:04:46 CDT

On Fri, Jul 8, 2011 at 3:37 PM, KIRTANA S <skirtana4_at_gmail.com> wrote:
> Can I import one selection before loading the script.
> I want to have all my residue in a list  So I can later access the residue
> list with foreach command in tcl.
> I tried as one reply in the VMD list
> for {set i 1} {$i <10 } {incr i} {
> set sel1($i) [atomselect top "resid $i"]
> }
> then call the loop for frames
>
> This sends me an error sel1(10) no such element.

and rightfully so. the $i < 10
condition only initializes the array
indices from 1 to 9.

axel.

>
> Where I need to make the change.
>
> Regards
> kirtana
>

-- 
Dr. Axel Kohlmeyer
akohlmey_at_gmail.com  http://goo.gl/1wk0
Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.