User Tools

Site Tools


concept:selection_expression

Selection Expressions

A selection-expression represents an arbitrary collection of atoms over which some operation is typically applied. It is one of the two types of open-ended arguments many PyMOL commands accept. The other is a name pattern.

For example, one might wish to uniformly color all carbons in all molecular objects uniformly using a single command:

color white, (symbol C)

In the above example “(symbol C)” is a selection expression, constructed using PyMOL's atom selection language.

The parentheses are optional, but they help to distinguish selection expressions from name patterns. When PyMOL accepts either a selection expression or a name pattern as an argument to a given command, the input will be treated as a selection expression if the argument contains parentheses or a recognized selection keyword.

Since non-molecular objects do not contain atoms, they cannot be specified using selection expressions. Thus, selection expressions only apply to molecular objects.

See Also

concept/selection_expression.txt · Last modified: 2013/08/19 21:00 (external edit)