VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Mon Oct 10 2005 - 10:38:37 CDT
- Next message: John Stone: "Re: overlapping two structures"
- Previous message: John Stone: "Re: getting centre of mass of contacts"
- In reply to: mashaojie163: "how can I combine several selection into one selection by TCL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
It's easy to combine selections simply by concatenating the selection
strings with " or ". I.e. if you started out with the selection strings:
set seltext1 "residue 1 to 50"
set seltext2 "residue 51 to 100"
You could generate a new string that selects the atoms from both of the
original selections with:
set newseltext [concat $seltext1 " or " $seltext2]
>From there you'd just do:
set newsel [atomselect top $newseltext]
John Stone
vmd_at_ks.uiuc.edu
On Sat, Oct 08, 2005 at 11:09:24AM +0800, mashaojie163 wrote:
>
> Dear Sir:
> I want to combine several selection into one selection by tcl ,I know we can complish it by use of Python.
> Ma shaojie
-- NIH Resource for Macromolecular Modeling and Bioinformatics Beckman Institute for Advanced Science and Technology University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801 Email: johns_at_ks.uiuc.edu Phone: 217-244-3349 WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
- Next message: John Stone: "Re: overlapping two structures"
- Previous message: John Stone: "Re: getting centre of mass of contacts"
- In reply to: mashaojie163: "how can I combine several selection into one selection by TCL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]