** This page includes examples that don't yet work because they use categories or attribute names from Chimera1 that are not defined in Chimera2. **


Chimera2 logo

Command-Line Target Specification

Atomic models and atoms and residues within those models can be specified in commands using:

or combinations of these. In addition, some commands accept or require specifying non-atomic models such as surfaces. Specification strings may contain embedded spaces, and a blank specification (where allowed) means “all.”

The summary of differences in command-line specification relative to Chimera1 may be useful.

Hierarchical Specifiers

Symbol Reference Level Definition
# model model number assigned to the data in Chimera
(hierarchical, with positive integers separated by dots: N, N.N, N.N.N, etc.)
/ chain chain identifier (case-insensitive unless both upper- and lowercase chain IDs are present)
: residue residue number
OR
residue name (case-insensitive)
@ atom atom name (case-insensitive)

Each set of atomic coordinates is a model with an associated model identification (ID) number. Three-dimensional datasets other than atomic coordinates are also assigned model ID numbers. Models can be opened from a file, or derived from another model or created from scratch in Chimera.

Model numbers are either assigned automatically or specified by the user. They are hierarchical, with any number of levels (positive integers N, N.N, etc.); a model at a lower level is still an entire model, but the hierarchy allows grouping. For example, #1.1, #1.2, ... #1.10 could be 10 structures in an NMR ensemble.

A molecular model contains one or more chains, each chain contains one or more residues, and each residue contains one or more atoms. Thus, an atom can be specified by model number, chain identifier (ID), residue number, and atom name. The lack of a specifier is interpreted as all units at the associated level; for example, if no chain ID is given, the specification refers to all chains.

Chain IDs, residue names and numbers, and atom names are read from the input file. In PDB format, a standard nomenclature is used for standard amino acid and nucleic acid residues. Asterisks (*) in PDB input atom names will be translated to prime symbols (').

Capitalization
In the command line, capitalization of chain IDs, residue names, and atom names is not important, with one exception: when a model contains both uppercase and lowercase chain identifiers, case matters for chain specification in that model only.

Lists and ranges
Model and residue numbers are integers, although a residue number may have an insertion code directly appended. Multiple model numbers or residue numbers can be indicated by comma-separated lists of individual numbers and/or one or more ranges of the form start-end. Not yet implemented: An asterisk * can be substituted for start or end to extend the range to the first or last number possible, respectively. Chain IDs, residue names, and atom names can also be entered as comma-separated lists. Ranges of chain IDs are also allowed; in that case, ordering is alphabetical, and neither start nor end can be omitted.

Examples:

#1
- all atoms in model 1, including any models lower in the hierarchy (1.N, 1.N.N, etc.)
#1/B-D,F
- chains B, C, D, and F in model 1
#1,2:50-*@CA
- atoms named CA in residues 50-end in models 1 and 2 (not yet implemented)
#3/A:*-83,90-*
- residues start-83 and 90-end in chain A of model 3 (not yet implemented)
/A,D-F:43-256
- residues 43-256 in chains A, D, E, and F
:12-25,48@ca,n
- atoms named CA and N in residues 12-25 and 48
/:12-15
- residues 12-15 in no-ID chains only (not yet implemented)
:lys,arg
- lysine and arginine residues
:lys,arg@cb
- atoms named CB in lysine and arginine residues
/A@n,ca,c,o
- atoms named N, CA, C, O in chain A
/A:195,221@n,ca,c,o
- atoms named N, CA, C, O in residues 195 and 221 of chain A

In model lists, commas are used only to separate values at the main model level, not the sublevels. For example, (neither of the following works yet)

#2.1-3,5
is interpreted as submodels 1-3 of model 2 and all of model 5, while
#2.1-3,.5
indicates submodels 1-3 of model 2 and submodel 5 of all models.

Implicit Operations

In the examples above, the hierarchical symbols were used only in descending order (# / : @), with each successive level applying to the levels that came before it. However, the hierarchy can be “reset” by repeating a level or returning to a higher level. Examples:

:12,14@CA
- atoms named CA in residues 12 and 14 (successive narrowing, as in previous examples)
:12:14@CA
- all atoms of residue 12, CA atom of residue 14
/A/B:12-20@CA:14@N
- or -
/B:12-20@CA:14@N/A
- all atoms of chain A, CA atoms of residues 12-20 and N atom of residue 14 in chain B
/a:50-60,66/b:52-62,69@n,ca,c,o
- all atoms of chain A residues 50-60 and 66, plus atoms named N, CA, C, O in chain B residues 52-62 and 69
/a:50-60,66/b:52-62,69 & @n,ca,c,o
- atoms named N, CA, C, O in chain A residues 50-60, 66 and in chain B residues 52-62, 69; intersection & (see combinations) is needed to specify only the named atoms in both chains

Wild Cards (not yet implemented)

The global wild card * matches all atoms in a residue or all residues in a model. It stands alone as a symbol, that is, it cannot be used to match parts of names, such as G* or *A. The partial wild card = matches parts of atom or residue names but not parts of residue sequence numbers; similarly, the single-character wild card ? matches single characters within residue or atom names but not single digits within residue sequence numbers. Examples:

/A:12@*
- or -
/A:12
- all atoms in residue 12 of chain A
#2:G??
- residues in model 2 with three-letter names starting with G
:fmn@?1
- atoms in residue FMN with two-letter names ending with 1
@S=
- atoms with names starting with S
@h,h?,h??
- atoms with one-, two-, or three-letter names starting with H


Zones (not yet implemented)

Atoms, residues or atomic models within or beyond some distance of a reference set of atoms can be specified as a zone. (These zones are based on atom centers only, but the the command zonesel allows basing zones on surfaces and including surfaces in zones.)

A zone specification has the following parts:

  1. reference-atom specification
  2. zone operator, comprising both:
  3. distance cutoff
Examples:
@nz  @<=  3.8
- atoms within 3.8 Å of atoms named NZ
#1:gtp  :<  10.5
- residues with any atom less than 10.5 Å from any atom in GTP residue(s) of model 1
#1:gtp  :>=  10.5
- residues without any atom less than 10.5 Å from any atom in GTP residue(s) of model 1


Built-in Classifications and User-Defined Targets (not yet implemented)

Built-in classifications include any of the terminal entries in the following sections of the Select menu:

For example, Structure includes ... whereas Chemistry includes all of the element symbols (C, Fe, etc.) and many functional groups (disulfide, phosphate, ether O, etc.). The same pattern of capitalization and spaces, if any, as shown in the Select menu should be used. Where there is ambiguity, the parent menu should be included in the specification, for example, “IDATM type.H” or “element.H” instead of “H” alone. The parent menu can be included in this manner even when not necessary.
User-defined targets include: Built-in classifications cannot be redefined by the user.

Some examples:

side chain/base.without CA/C1'
- or -
without CA/C1'
- atoms in amino acid side chains (not including CA) and atoms in nucleic acid bases (not including C1'); using “with” instead of “without” would include CA/C1'
Mg
- magnesium atoms/ions
helix & positive
- residues in protein α-helices that are also in the positive amino acid category (using & for intersection, see combinations)
carboxylate
- atoms in carboxylate groups
solvent
- atoms automatically categorized as solvent

Attributes (not yet implemented)

Attributes are properties of atoms, residues and models, specified by attribute name and value and indicated with symbols: @@ for atom attributes, :: for residue attributes, and ## for atomic-model attributes.

Attribute names are case-sensitive, attribute values are not. Attribute values containing spaces (some color names, for example) must be enclosed in double quote marks.

Besides = (equals), attributes with numerical values can also be used with > (greater than), < (less than), >= (greater than or equal to), and <= (less than or equal to).

For negation, ~ can be used outside of the attribute specification (see combinations and examples).

When placed before an attribute name, the caret ^ indicates that the atoms, residues, or models have not been assigned any value for the attribute. For example, :/^kdHydrophobicity designates residues (such as water or nucleic acids) that lack a Kyte-Doolittle hydrophobicity assignment.

Color values can be specified:

SELECTED ATOM ATTRIBUTES **
Atomspec Usage Explanation
areaSAS=sasa sasa is the solvent-accessible surface area of the atom (available when a molecular surface has been computed)
areaSES=sesa sesa is the solvent-excluded surface area of the atom (available when a molecular surface has been computed)
bfactor=bfactor bfactor is the B-factor value of the atom (see also Thermal Ellipsoids)
color=color color is the color of the atom (assigned on a per-atom basis; see coloring hierarchy)
defaultRadius=rad rad is the default VDW radius of the atom in Å
display whether display is enabled at the atom level (see display hierarchy)
drawMode=mode mode can be 0 (synonyms: dot, wire, wireframe), 1 (sphere, cpk, space-filling), 2 (endcap, stick), or 3 (ball, ball and stick, ball-and-stick, ball+stick, bs, b+s); see draw mode
element=atno atno is the atomic number or the element symbol
idatmType=type type is the atom type
label whether the atom is labeled
label=label label is the text of the atom label
labelColor=labcolor labcolor is the color of the atom label
name=name name is the atom name
occupancy=occupancy occupancy is the occupancy value of the atom
pdbSegment=segid segid is the segment identifier of the atom
radius=radius radius is the current VDW radius of the atom in Å (may have been changed by the user from the default VDW radius)
serialNumber=n n is the atom serial number in the input file
surfaceCategory=category category is the name of the surface calculation category to which the atom has been assigned automatically or manually using surfcat
surfaceDisplay whether molecular surface display is turned on for the atom (however, this can be true even for atoms that do not contribute to the molecular surface)

Examples (with & for intersection and ~ for negation, see combinations):

@ca & @@bfactor>40
- atoms named CA with B-factor values over 40
:asn & @@bfactor>40
- atoms with B-factor values over 40 in asparagine residues
@@bfactor>=20 & @@bfactor<=40
- atoms with B-factor values ranging from 20 to 40
C & ~ @@idatmType=Car
- non-aromatic carbon atoms (see atom types)
N & @@drawMode=1 & @@label
- nitrogen atoms that are drawn as spheres and labeled
N & (@@drawMode=1 | @@label)
- nitrogen atoms that are drawn as spheres and/or labeled
@ca & ~ (@@label | @@color=green | @@color=red)
- atoms named CA that are not labeled, and are not green or red
~ @@color=yellow | ~ @@color=blue
- all atoms, because if an atom is yellow it fulfills the criterion of not being blue, and vice versa

SELECTED RESIDUE ATTRIBUTES **
Atomspec Usage Explanation
areaSAS=sasa sasa is the solvent-accessible surface area of the residue (available when a molecular surface has been computed)
areaSES=sesa sesa is the solvent-excluded surface area of the residue (available when a molecular surface has been computed)
isHelix whether the residue is in a helix (true is only possible for amino acids)
isHet whether the residue is in PDB HETATM records (or the mmCIF equivalent)
isSheet
OR
isStrand
whether the residue is in a beta strand (true is only possible for amino acids)
kdHydrophobicity=value value is the Kyte-Doolittle hydrophobicity of the amino acid residue
numAtoms=N N is the total number of atoms in the residue
phi=angle angle is the protein/peptide backbone φ dihedral angle (Ci-1-N-CA-C)
psi=angle angle is the protein/peptide backbone ψ dihedral angle (N-CA-C-Ni+1)
ribbonColor=ribcolor ribcolor is the color of the residue's ribbon segment (see coloring hierarchy)
ribbonDisplay whether ribbon display is turned on for the residue (however, this can be true even when the residue is a type that does not have any ribbon, such as water)
ssId=N N is the secondary structure element identifier, for example, 1 for residues in the first helix and first strand (starting from the N-terminus)
type=resname resname is the residue name
uniprotIndex=N N is the residue number in the corresponding UniProt sequence (discerned from HEADER and SEQRES information in the structure PDB file using a web service provided by the RCSB PDB)

Helix and strand assignments are taken from the input structure file. When the input file lacks secondary structure information, ksdssp is called automatically to generate helix and strand assignments. The ksdssp command (or compute SS in the Model Panel) can also be used to recompute assignments.

Examples:

::numAtoms>=10
- residues with 10 or more atoms

SELECTED ATOMIC-MODEL ATTRIBUTES **
Atomspec Usage Explanation
ballScale=factor factor is ball radius relative to VDW radius
color=color color is the color assigned on a per-model basis (see coloring hierarchy)
display whether display is enabled at the model level (see display hierarchy)
lineWidth=width width is the linewidth of bonds in the model in the wire representation
name=name name is the name of the model
numAtoms=N N is the total number of atoms in the model
numResidues=M M is the total number of residues in the model
ribbonInsideColor=color color is the color used for the insides of peptide/protein helix ribbon segments
stickScale=factor factor is stick radius relative to bond radius (the default bond radius is 0.2 Å)

**Additional attributes can be created:

Attribute Names

The preceding tables [atoms] [residues] [atomic models] include the names of some commonly used attributes. Additional attributes are listed in attribute inspector dialogs, and yet others may be generated only when a particular tool is used, or created arbitrarily by the user.

Attribute name lookup in Chimera:


Combinations

Atom specifications can be combined with the operators:

Parentheses can be used to indicate the desired order of multiple operations. Thus, at least one parenthesis of each set should be adjacent to or separated by space only from a combination operator or zone operator. When & and | occur in the same list, & has higher priority (&-separated lists can be considered as grouped within parentheses).

Examples:

/A & protein
- chain A protein residues only
/A & ~ :hem
- chain A residues other than HEM
@ca & #1/B,E#2/A,D
- atoms named CA in chains B, E of model 1 and chains A, D of model 2
#1:asp,glu & (#2 :<= 10)
- aspartate and glutamate residues in model 1 that are within 10 Å of model 2
:phe,tyr & with CA/C1'
- sidechain and CA atoms of phenylalanine and tyrosine
(ligand | protein) @<= 4.8
- atoms within 4.8 Å of ligand or protein
ligand | (protein @<= 4.8)
- ligand plus atoms within 4.8 Å of protein
Ng+ | N3+
- guanidinium nitrogens and sp3-hybridized, formally positive nitrogens (see atom types)
:cys@sg & ~disulfide
- or -
:cys & S & ~disulfide
- cysteine sulfur atoms not participating in a disulfide bond
(ions @<= 4) & ~ions
- atoms within 4 Å of ions, excluding the ions themselves


Surfaces and Other Model Types

Some commands can apply to things other than atomic models (atomic coordinates) and molecular surfaces. To handle such cases, “atom specification” has been extended as follows:

Which of these can be used and whether they can be combined with atom specifications depends on the command.


UCSF Resource for Biocomputing, Visualization, and Informatics / September 2015