From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Wed Feb 10 2010 - 14:35:37 CST

On Wed, Feb 10, 2010 at 1:30 PM, Daniel Terry <dat2007_at_med.cornell.edu> wrote:
> Hello,

daniel,

> 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?

this is a known problem. for a long time, actually. unfortunately, the
python interface is effectively unmaintained at the moment. ...and
it seems to be impossible to motivate users of the python interface
in VMD to spend some effort into improving it and fixing known
problems.

cheers,
   axel.

>
>
> 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)]'
>

-- 
Dr. Axel Kohlmeyer    akohlmey_at_gmail.com
http://sites.google.com/site/akohlmey/
Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.