ChimeraX docs icon

Command: select

A selection specifies items (models or their parts) for subsequent operations; the selected items are highlighted with green outlines in the graphics window. The select command can:

For click-to-select, see mousemode. See also: selection vs. specification, the Select menu

New Selection

Usage: select  spec  [ minimumLength  min ] [ maximumLength  max ]
Usage: select  spec  [ residues  true | false ] [ sequence  pattern ] [ polymer  chain-spec ]

The top-level select command replaces any previous selection with a new one containing the specified items (spec). A blank specification means all applicable items.

The minimumLength and/or maximumLength options indicate selecting only pseudobonds by length. Atomic structures and other types of models are automatically excluded when either of these options is used.

The residues option (default false) promotes any specified atoms to whole residues.

The sequence option restricts the selection to biopolymer sequence segments that match the specified pattern, which can be an exact sequence of one-letter codes, or contain ambiguity codes or regular expressions (details...). Case is not important, as lowercase letters will be uppercased automatically for comparison. If the sequence option is used, other keyword options are ignored.

The polymer option restricts the result to only the biopolymer chains with the same sequences as the chains in chain-spec (the same macromolecular entities). Example:

select #2 polymer #1/a
– select biopolymer chains in model 2 that have the same sequence as chain A of model 1

Modify Selection

Usage: selectadd | subtract | intersect )  spec  [ residues  true | false ]
Usage: selectup | down | clear )
Usage: ~select  spec  [ residues  true | false ]

Subcommands of select can be used to:

The ~select command can be used to deselect specified items (like select subtract) or with a blank specification to deselect everything (like select clear).

Zone Selection

Usage: select zone  ref-spec  cutoff  [ other-spec ] [ extend  true | false ] [ residues  true | false ]

The command select zone selects atoms and/or surfaces in other-spec that are within the cutoff distance of the atoms and/or surfaces in ref-spec. A blank (omitted) other-spec indicates “all.” Although molecular surfaces can be included in the reference items (ref-spec), their membership in the resulting zone is not evaluated directly because their selection is tied to that of the corresponding atoms. The extend option (default false) indicates whether the reference items should also be selected. The residues option (default false) indicates whether to select all atoms of a residue if any atom in the residue is within the zone.

Select... Zone in the menu selects a zone based on the current selection, and further allows specifying both upper and lower distance bounds. See also: surface zone, volume zone, zone

Examples:

select zone ligand 4.5 protein res t
sel zone #1.2 8
sel zone sel 5 extend t

Alternatively, the top-level select command can be used with zone specifications to give the same results as the examples above:

select ligand :<4.5 & protein
sel #1.2 @<8 & ~ #1.2
sel sel @<5

One advantage of select zone, however, is that it works with non-atomic model types.


UCSF Resource for Biocomputing, Visualization, and Informatics / January 2019