Command Usage Conventions
Command help pages have Usage lines
that show syntax and options using various fonts and symbols:
See also: help,
- keywords to be taken literally are not italicized
- parameters that should be replaced with
an appropriate value (such as a number or word) are italicized
- atom-spec, model-spec, spec,
and similar terms indicate target specification
strings, which generally mean “all” when left blank
- optional keywords and parameters are referred to as
options or are enclosed in square brackets: [ ]
- mutually exclusive choices are separated by a vertical bar: |
- mutually exclusive choices of a required item are grouped with
parentheses: ( )
The brackets, vertical bars, and parentheses in the Usage lines are
merely symbolic and should not be included in the typed command.
Command names and keywords can be truncated to unique strings,
with rare exceptions specifically noted.
Command names should be entered as lowercase letters, whereas keywords can be
completely lowercase or capitalized as shown in the documentation,
typically camelCase for compound words.
If a truncation matches multiple keywords but one is a simpler compound
(for example, silhouettes rather than
silhouetteWidth in the set command),
the simpler compound is used; otherwise, an ambiguity error is raised.
Boolean (truth) values can also be truncated, with
synonyms for true: True, 1, and
synonyms for false: False, 0.
Substituting the word browse for a file or directory pathname brings up
a file browser window for specifying the name and location interactively.
Alternatively, dragging and dropping the icon for a file or directory into the
Command Line Interface
substitutes the corresponding pathname text.
The display is updated as needed when a user presses return after entering
a command, or when a wait
command is executed within a script.
ChimeraX Command Files
ChimeraX command files (scripts) are plain text files
containing the same commands as entered into the
Command Line Interface.
The filename suffix .cxc is recommended.
Opening a ChimeraX command file in ChimeraX executes the commands.
For example command files, see
the ChimeraX feature highlights and
See also: open,
Rules and tips:
Lines with # as the first nonspace character and in-line text
with # as the first nonspace character following a semicolon (;)
are interpreted as comments and ignored.
Blank lines are also allowed.
- Combining commands:
Multiple commands can be combined into a single line with
This is done to make multi-frame actions start simultaneously and/or
to suppress the display of intermediate states, usually within a script.
Semicolon separators are also needed to define composite (multi-command)
actions with alias
whether interactively or in a script.
- Order of execution:
Even when multiple actions occur within a single image update frame,
their order is important, and one command may need to precede or follow
another to give the desired result. In general, the order of execution
is the order in which the commands are given.
For example, if a script plays a molecular dynamics trajectory and at each
frame shows a molecular surface and colors it by electrostatic potential,
the coloring should come after the surface calculation.
- Concurrent vs. serial execution:
The wait command is used to enforce
completion of a multi-frame action before initiation of the next command in
a script; omitting it or waiting for fewer frames allows successive actions
to overlap or run concurrently.
UCSF Resource for Biocomputing, Visualization, and Informatics /