From: Daniel Terry (dat2007_at_med.cornell.edu)
Date: Wed Feb 10 2010 - 12:30:21 CST

Hello,

I am trying to use VMD with the Python interpreter. I have VMD setup
to use the Python libraries compiled for VMD my current version of
VMD. In older versions, I could combine selection objects created with
the AtomSel class using boolean operators. With the most recent
version and the new atomsel type, this doesn't appear to work. Here is
some example code:

>>> sel1 = atomsel('resname DC')
>>> sel2 = atomsel('name C5')
>>> both = sel1 & sel2

This produces the following error:
Traceback (most recent call last):
  File "VMD", line 1, in <module>
TypeError: unsupported operand type(s) for &: 'atomsel.atomsel' and
'atomsel.atomsel'

Are boolean operators not supported? Is there another way to
accomplish this task?

Thanks for your help,

--
Info) VMD for LINUXAMD64, version 1.8.7 (August 1, 2009)
>>> sys.version
'2.5.1 (r251:54863, Sep  7 2007, 15:42:54)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-8)]'