ChimeraX docs icon

Tool: Command Line Interface

ChimeraX commands are entered at the Command Line Interface. This interface can be opened from the Tools menu (more...). See also: help, usage, ChimeraX window, command usage conventions

Sometimes it is necessary to click in the graphics window or command line to take back focus from some other dialog so that command keystrokes will register.

When the focus is in the command line or graphics window, Ctrl-u erases the command line contents, Ctrl-k erases from the cursor position to the end of line, and the command history can be navigated with Ctrl-p (previous command) and Ctrl-n (next command). Additionally pressing Shift indicates navigating to the next/previous occurrence of the same command name (initial set of characters) instead of to whatever command is immediately adjacent in the history. Navigation skips commands for which the entire line is identical. When the mouse focus is in the command line (not the graphics window), another way to navigate the history is with the keyboard up arrow and down arrow, alone or in combination with Shift.

Dragging and dropping the icon for a file or directory into the command line substitutes the corresponding pathname text.

The inverted triangle to the right of the command line marks a pulldown menu. The menu includes:

Command History

The Command History lists previously used commands. The commands can be re-executed and/or saved to a file. The Command History can be opened from the pulldown menu marked by a triangle or chevron to the right of the Command Line Interface. See also: Log

In the Command History, individual commands or blocks of commands may be chosen (highlighted) using the left mouse button. Ctrl-click adds to an existing choice rather than replacing it. To choose a block of commands without dragging, click on the first (or last) and then Shift-click on the last (or first) in the desired block.

Record... brings up a dialog for saving or appending commands to a text file. The chosen commands or all commands in the history can be saved. The filename suffix .cxc is recommended for ChimeraX command files.

Execute executes the chosen commands in the order shown; double-clicking an individual command executes that command. Delete removes the chosen commands from the history. Copy copies the chosen commands as plain text that can be pasted into another application window.

The history is stored in a file and carries over between different ChimeraX sessions.

UCSF Resource for Biocomputing, Visualization, and Informatics / October 2017