From: KIRTANA S (skirtana4_at_gmail.com)
Date: Fri Jul 08 2011 - 15:36:50 CDT

How can I store the residues in a list ,

 Something similar to the difference_matrix.tcl

 set reslist1 [lsort -integer -unique [$sel1 get residue]]
  set num_reslist1 [llength $reslist1]
  set reslist2 [lsort -integer -unique [$sel2 get residue]]
  set num_reslist2 [llength $reslist2]

On Fri, Jul 8, 2011 at 4:04 PM, Axel Kohlmeyer <akohlmey_at_gmail.com> wrote:
>
> 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.