From: Axel Kohlmeyer (
Date: Wed Nov 17 2010 - 09:56:35 CST


On Wed, Nov 17, 2010 at 9:49 AM, Alex Liu <> wrote:
> Hi everyone,
> I am trying to understand the atomselection in vmd.I want to select thymine
> residues 5 and 7 and 10 without considering backbones.I am not sure which
> one of these is true?
> (nucleic) and (resname THY) and (resid 5 7 10) and (not backbone)
> (nucleic) and (resname THY) and (resid 5) or (resid 7) or (resid 10) and
> (not backbone)
> In fact, I am confused with the meaning of :"and" and "or". I

"and" and "or" are just logical operators that combine

> wouldappreciateif any one could tell me what these two do especially the
> second one.

the problem that makes those two examples so difficult
to understand is that you have to consider precedence,
i.e. the order in which the subexpressions are grouped.
i have made it a habit for myself to always use parentheses
to define the precedence regardless of the implicit one of the parser.

> Finally, if any one could tell me how to get more information about the atom
> selection using :"and" and "or" it would be great because in the manual I
> did not find much.

there is not much about it. they work like logical operators
in many other script languages.


> Thanks for your idea.
> Alex

Dr. Axel Kohlmeyer
Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.