VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Jul 12 2011 - 13:04:43 CDT
- Next message: John Stone: "Re: A patch for OFF import and a question about representation of surfaces"
- Previous message: John Stone: "Re: qpt_conv command of Hole is interactive, how to automate it for multiple frames?"
- In reply to: KIRTANA S: "Re: import selection in array for script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Do you actually have a question about the script below?
That code should indeed create a couple of lists containing
all of the unique residue indices for two selections.
Once they are in lists, you can use lindex on the lists as usual.
Cheers,
John Stone
vmd_at_ks.uiuc.edu
On Fri, Jul 08, 2011 at 04:36:50PM -0400, KIRTANA S wrote:
> 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.
-- NIH Resource for Macromolecular Modeling and Bioinformatics Beckman Institute for Advanced Science and Technology University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801 http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349 http://www.ks.uiuc.edu/Research/vmd/ Fax: 217-244-6078
- Next message: John Stone: "Re: A patch for OFF import and a question about representation of surfaces"
- Previous message: John Stone: "Re: qpt_conv command of Hole is interactive, how to automate it for multiple frames?"
- In reply to: KIRTANA S: "Re: import selection in array for script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]