ChimeraX docs icon

Command Usage Conventions

Command help pages have Usage lines that show syntax and options using various fonts and symbols:

These brackets, vertical bars, and parentheses in Usage lines are merely symbolic and should not be included in the typed command.

In addition to the detailed help, the usage command can be used to show a brief description of any command in the Log. See also: help, color specification, target specification, sequence specification, specifying points and vectors, ChimeraX command files

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. As mentioned below, multiple commands can be combined into a single line with semicolon separators.

Command names and keywords can be truncated to unique strings, with rare exceptions specifically noted. However, the entire command name may be needed as the “unique string” if the name of another command (including those in bundles installed from the ChimeraX Toolshed) starts with the same string. If a truncation matches multiple keywords but one is a simpler compound word, the simpler one 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.

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.

Quotation Marks
Pathnames and string values should be enclosed in quotation marks if they contain spaces or characters with special meanings in the command line (#, :, and others). In unquoted pathnames and strings, * (wild card), ? (single-character wild card), and square brackets [ ] enclosing alternative single-character matches can be used, as described here for atom and residue names.

Space-containing target specifications and multiword color names do not need to be enclosed in quotation marks, except that a palette argument containing a multiword color name does need to be enclosed in quotation marks.

Input from File Browser
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.

ChimeraX Command Files

ChimeraX command files (scripts) are plain text files containing the same commands as could be entered into the Command Line Interface. The filename suffix .cxc is used for this type of file. Opening a ChimeraX command file in ChimeraX executes the commands (and echoes them to the Log unless the script was opened with log false). To process multiple data files iteratively with the same command file, see the open command option forEachFile.

For command file examples, see the ChimeraX feature highlights and example images. See also: Startup preferences, making movies

Rules and tips:
UCSF Resource for Biocomputing, Visualization, and Informatics / April 2021