From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Wed Mar 25 2009 - 17:20:45 CDT

On Wed, 2009-03-25 at 14:54 -0700, Goutham wrote:
> Hey,
> Is there a way to merge two atom-selections into one.
> Say for a protein:
>
> set sel1 [atomselect top "resid 1 to 5" ]
> set sel2 [atomselect top "resid 10 to 15"]
>
> Is there a way to merge both selections sel1 and sel2 into newsel.
> This merged selection I want to write into a new pdbfile. Is there a
> way to do this?

please try this (untested):
set sel3 [atomselect [$sel1 molid] "([$sel1 text]) or ([$sel2 text])"]

you have to make sure that sel1 and sel2 are referring to the same
'molecule' (in VMD-speak).

cheers,
   axel.

>
>
> Thanks
> Goutham
>

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.