From: Axel Kohlmeyer (axel.kohlmeyer_at_theochem.ruhr-uni-bochum.de)
Date: Tue Jan 04 2005 - 01:25:10 CST

hi,

in case you are within a script and have the two selections
but not the original text, you can use the 'text' attribute
to retrieve the selection text. for example:

vmd > set sel1 [atomselect 0 {name O}]
atomselect0
vmd > set sel2 [atomselect 0 {name S}]
atomselect1
vmd > set sel3 [atomselect 0 "([$sel1 text]) or ([$sel2 text])"]
atomselect2
vmd > $sel3 text
(name O) or (name S)

axel.

On Mon, 3 Jan 2005, John Stone wrote:

>
> Hi,
> If you just want to combine two existing selections, taking all
> atoms from both selections, you can just manipulate the selection
> string text like this to create a new selection:
> "(selection text A) or (selection text B)"
>
> That'll take all selected atoms from both A and B.
>
> John Stone
> vmd_at_ks.uiuc.edu
>
> On Mon, Jan 03, 2005 at 03:33:55PM -0500, dtp3+@pitt.edu wrote:
> > Hi VMD users!
> >
> > Anybody knows how can I create an atom selection out of existing atom selections (in other words, how can I combine two or more atom selections from the same molecule)?
> >
> > Thank you,
> > Dora
>
>

-- 
=======================================================================
Dr. Axel Kohlmeyer   e-mail: axel.kohlmeyer_at_theochem.ruhr-uni-bochum.de
Lehrstuhl fuer Theoretische Chemie          Phone: ++49 (0)234/32-26673
Ruhr-Universitaet Bochum - NC 03/53         Fax:   ++49 (0)234/32-14045
D-44780 Bochum  http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.