<!--
--- UCSF Chimera Copyright ---
Copyright (c) 2000-2005 Regents of the University of California.
All rights reserved. This software provided pursuant to a
license agreement containing restrictions on its disclosure,
duplication and use. This notice must be embedded in or
attached to all copies, including partial copies, of the
software or any revisions or derivations thereof.
--- UCSF Chimera Copyright ---
-->
<html><head>
<title>Selection</title>
</head><body>
<h2>Selection</h2>
<p>
In Chimera, <b><i>selection</i></b> is used to specify items
(atoms, residues, <i>etc.</i>) for subsequent actions or operations.
Items that are selected can be acted upon with
the <a href="menu.html#menuactions"><b>Actions</b> menu</a>,
the <a href="inspection.html"><b>Selection Inspector</b></a>, or
<a href="framecommand.html" target="_top">commands</a>.
With commands typed into the
<a href="chimerawindow.html#emulator"><b>Command Line</b></a>,
selections are indicated by using the word
<b>selected</b>, <b>sel</b>, or <b>picked</b> as the atom specification.
Selections previously named and saved with <a href="#savesel">
<b>Select... Name Selection...</b></a> can also
be specified, using <b>sel=<i>selection_name</i></b>.
</p><p>
There are several ways to make selections, including:
<ul>
<li><a href="#pickselect">picking</a> from the graphics window
<li><a href="#menuselect">using the menu</a>
<li>issuing the command <a href="midas/select.html#newer"><b>select</b></a>
<li><a href="#panelselect">using certain tools</a>
</ul>
The <a href="chimerawindow.html#statusline">status line</a> includes
a <a href="chimerawindow.html#selstat">button</a>
that reports what is selected; clicking the button opens the
<a href="inspection.html"><b>Selection Inspector</b></a>.
<a name="selectmode">
Whether a new selection is added to, subtracted from, intersected with,
or used to replace the existing selection can be set with
<b>Select... Selection Mode (<i>current_mode</i>)</b>;
<b><i>current_mode</i></b> shows the current setting.
</a>
Selection mode does not apply to <a href="#pickselect">picking
from the graphics window</a>.
</p><p>
Selections can be <a href="#expandselect">inverted, broadened, and
narrowed</a> with the arrow keys or the command
<a href="midas/select.html#newer"><b>select</b></a>.
The most recent selection operation can be undone with <b>Select... Undo</b>
(or by pressing the <b>left arrow</b> key).
</p><p>
There are several ways to clear the selection:
<ul>
<li>choosing <b>Select... Clear Selection</b> from the menu
<li><a href="#pickselect">picking</a> in empty space
<li>pressing <b>Shift-left arrow</b>
<li>issuing the command <a href="midas/select.html#newer"><b>~select</b></a>
</ul>
</p>
<a name="pickselect">
<h3>Picking from the Graphics Window</h3></a>
<p>
During <b><i>picking</i></b> from the graphics window, the cursor looks
like a pointing hand. By default, an atom or bond is selected by
clicking on it with the left mouse button while holding down
the <b>Ctrl</b> key.
The assignment of buttons to this function can be changed in the
<a href="preferences.html#Mouse"><b>Mouse</b> preferences</a>.
If the <b>Shift</b> key is held down
at the same time, the selection is added to the previous selection rather
than replacing it (or if the atom or bond is already selected, it becomes
deselected without changing the rest of the selection).
Another way to select more than one atom or bond is
to hold the mouse button down rather than clicking it;
a rectangle shows the area swept out, and all enclosed atoms
and bonds will be selected. The selection will be highlighted.
The color and type of highlighting are controlled in the
<a href="preferences.html#Background"><b>Background</b> preferences</a>.
</p><p>
When a plus sign (<b>+</b>) has been typed into the
<a href="chimerawindow.html#emulator"><b>Command Line</b></a>,
it will be replaced by the <a href="midas/atom_spec.html#basic">
atom specification string</a> of the next picked atom.
Each plus sign must be preceded and followed by a space
(or the end of the line).
</p><p>
Double-picking a bond (that is, doubleclicking it with the button
assigned to picking) elicits a menu:
<ul>
<li><b>Rotate Bond</b> - make the bond
<a href="../ContributedSoftware/structuremeas/structuremeas.html#adjust">
rotatable</a>
<li><b>Select Bonded</b> - operate on the selection states of the flanking
atoms according to the current <a href="#selectmode"><b>Selection Mode</b></a>
</ul>
Double-picking a <a href="pbpanel.html#pbdef">pseudobond</a> elicits
just the <b>Select Bonded</b> option.
</p>
<a name="menuselect">
<h3>Selection using the Menu</h3></a>
<p>
The top part of the <a href="menu.html#menuselect"><b>Select</b> menu</a>
allows selection according to:
<ul>
<li><b>Chain</b> - chain ID
<li><b>Chemistry</b> - element, functional group, or
<a href="idatm.html">IDATM atom type</a>
<li><b>Residue</b> - <a href="aacat.html">amino acid category</a>
or residue name
<li><b>Structure</b> - portions
<a href="midas/surface.html#surfcats">categorized</a>
as ions, ligand, main, or solvent;
amino acid and nucleic acid backbone or sidechain
portions; peptide secondary structure type (helix, sheet, or turn)
</ul>
Selection by element or atom type only selects atoms; however,
selection by functional group, chain, residue,
or structure selects both atoms and bonds.
</p><p>
<a href="menu.html#selectseq"><b>Select... Sequence...</b></a> selects
atoms and bonds within specified sequences.
Atoms (and optionally, bonds with selected atoms at both
ends) can also be selected with an
<a href="midas/atom_spec.html#basic"><b>Atom Specifier</b></a>.
Atoms, residues, and models can be selected
<a href="../ContributedSoftware/render/render.html#select">
<b>By Attribute Value</b></a>.
<a name="selectzone">
Finally, atoms and bonds within (or further than) a specified distance
from the currently selected atoms can be selected on a per-atom
or whole-residue basis with the <b>Select... Zone...</b> option.
</a>
</p><p>
There are several other features within the <b>Select</b> menu.
A selection can be inverted so that the selected atoms become
deselected and <i>vice versa</i>. With <b>Invert (all models)</b>,
all unselected atoms will be selected, whereas with
<b>Invert (selected models)</b>, only the unselected atoms in
models currently containing selections will be selected.
The current selection can be deselected with <b>Clear Selection</b>.
<b>Selection Mode</b> controls whether a new selection
(except those made by <a href="#pickselect">picking</a>)
will be added to, subtracted from, intersected with,
or used to replace the existing selection.
<b>Select All</b> may be useful in combination with the subtractive mode.
The most recent selection operation can be undone with <b>Undo</b>.
<a name="savesel">
The current selection can be named and saved with
<b>Name Selection...</b> and later reinvoked with <b>Named Selections</b>.
</a>
The saved selection consists of the items actually
selected rather than the rules used to select them, and will only
apply to the same model(s) that they were defined upon (and the models
cannot have been closed and reopened).
</p><p>
Whereas the selected items form a
<b><i>selection</i></b>, the set of rules used to select them
form a <b><i>selector</i></b>.
Selectors that are boolean combinations
of the various selection options can be created
with the <a href="selectionGUI.html"><b>Selector Construction Panel</b></a>
(<b>Select... Construct Selector...</b>).
This is especially helpful if the same complicated set of rules
is to be used repeatedly. When saved, a
user-defined selector becomes an additional listing under <b>Select</b>.
</p>
<a name="panelselect">
<h3>Selection using the Model Panel and Other Tools</h3></a>
<p>
The <a href="modelpanel.html"><b>Model Panel</b></a> provides an easy
route to selecting models, submodels, chains, or sequence segments.
Once models and/or submodels have been chosen within the left side of
the <a href="modelpanel.html"><b>Model Panel</b></a>, any of several functions
listed on the right side of the panel may be executed. These functions
include <b>select</b> (select chosen models/submodels), <b>select all</b>
(select chosen models/submodels as well as their constituent atoms, bonds,
and residues), <b>select chain(s)...</b> (select chains within the
chosen models/submodels), and <b>sequence...</b> (open
<a href="seqpanel.html">sequence panel</a> listing chain sequences
and allowing sequence segments to be selected).
</p><p>
Analogously, once one or more <a href="pbpanel.html#pbdef">
pseudobond</a> groups have been chosen within
the left side of the <a href="pbpanel.html"> <b>PseudoBond Panel</b></a>,
the <b>select</b> button in the right side of the panel
can be used to select them.
</p><p>
Only the more general approaches to selection are described here;
several other tools
provide ways to make selections in more specific contexts.
</p>
<a name="expandselect">
<h3>Inverting, Broadening, and Narrowing Selections</h3></a>
<p>
A selection can be inverted so that the selected atoms become
deselected and <i>vice versa</i>:
<ul>
<li>pressing <b>Shift-right arrow</b> selects all of the unselected atoms
(equivalent to <b>Select... Invert (all models)</b> or the command
<a href="midas/select.html#newer"><b>select</b></a> <b>invert</b>)
<li>pressing the <b>right arrow</b> key selects all of the unselected atoms
in models currently containing selections; models not containing
selected atoms remain unselected
(equivalent to <b>Select... Invert (selected models)</b> or the command
<a href="midas/select.html#newer"><b>select</b></a> <b>invert sel</b>)
</ul>
A selection can be broadened and narrowed using:
<ul>
<li> the <b>up arrow</b> and <b>down arrow</b> keys, respectively
(the main Chimera window must have keyboard focus; it may be necessary to
click in the window to restore this focus)
<li>the command <a href="midas/select.html#newer"><b>select</b></a>
with the keywords <b>up</b> and <b>down</b>, respectively
</ul>
Selection-level cascades are:
<ul>
<li>atom/bond - residue - chain - <a href="midas/atom_spec.html#subcats">
submodel</a> - molecule model - all molecule models
<li><a href="pbpanel.html#pbdef">pseudobond</a>
(except in a <a href="menu.html#tracedef">chain trace</a>)
- pseudobond group - all pseudobond groups
<li>molecular surface model (only one level)
</ul>
Although implemented as <a href="pbpanel.html#pbdef">pseudobonds</a>,
<a href="menu.html#tracedef">chain trace</a> bonds are treated like
regular bonds between residues for
the purposes of broadening and narrowing selections.
</p><p>
The original selection is remembered during broadening so that it can
be regenerated by narrowing the selection.
A selection cannot be broadened beyond the top level or narrowed
beyond the original level.
</p><p>
In some cases, multiple levels collapse into one level;
for example, if a model has only one chain and
no submodels, pressing the up arrow key just twice will
broaden a selection from one atom to the entire molecule model.
If the original selection includes both atom(s) and pseudobond(s),
the selection will broaden to pseudobond group in the same step as it
broadens to chain, and to all pseudobond groups in the same step as
it broadens to all molecule models.
</p><p>
An alternative way of making <a href="menu.html#menuactions">
<b>Actions</b></a> in the menu apply more broadly than
to an initial selection is to broaden the setting of
<a href="menu.html#acttarget"><b>Actions... Target</b></a>.
</p>
</body></html>