VMD-L Mailing List
From: KIRTANA S (skirtana4_at_gmail.com)
Date: Fri Jul 08 2011 - 15:36:50 CDT
- Next message: Ajasja LjubetiÄ: "Does this work with VMD: Nvidia 3DVision Glasses + SyncMaster 2233RZ + GTX 580 + Win7?"
- Previous message: Sara baretller: "Re: Re: Problem with for loop."
- In reply to: Axel Kohlmeyer: "Re: import selection in array for script"
- Next in thread: John Stone: "Re: import selection in array for script"
- Reply: John Stone: "Re: import selection in array for script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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.
- Next message: Ajasja LjubetiÄ: "Does this work with VMD: Nvidia 3DVision Glasses + SyncMaster 2233RZ + GTX 580 + Win7?"
- Previous message: Sara baretller: "Re: Re: Problem with for loop."
- In reply to: Axel Kohlmeyer: "Re: import selection in array for script"
- Next in thread: John Stone: "Re: import selection in array for script"
- Reply: John Stone: "Re: import selection in array for script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]