From: Nicholas Musolino (musolino_at_mit.edu)
Date: Sat May 08 2010 - 20:10:24 CDT

If you mean the "union" of sel1 and sel2, you could try
set sel3 [ atomselect top "( [$sel1 text] ) or ( [$sel2 text] )" ]

For the intersection of sel1 and sel2:
set sel3 [ atomselect top "( [$sel1 text] ) and ( [$sel2 text] )" ]

This uses the text that was originally used to create sel1 and sel2.

If that isn't sufficient for you, because the properties (e.g. position) by which you selected them are now out of date, you could also try examining the two lists obtained when you use
$sel1 list
and
$sel2 list
with some TCL list processing commands.

For more details, see the atomselect documentation: http://www.ks.uiuc.edu/Research/vmd/current/ug/node118.html

Hope this helps!

Nicholas

---------------------------------------------------------------------------
Nicholas Musolino
Ph.D. candidate, Department of Chemical Engineering, MIT
musolino_at_mit.edu | 617-253-6675 | Room E19-528

On May 8, 2010, at 7:28 PM, Fatemesadat Emami wrote:

>
> Dear vmd users,
> Is is possible to add two atomselections, say we have sel1 and sel2 and make sel3 which includes sel1 and sel2?
> Thanks
> Fatima
> --
> Yours Sincerely,
> Fateme Sadat Emami
> Nano Scale Laboratory
> Polymer Engineering Department
> The University of Akron