ChimeraX docs icon

Command: md

Usage:
md cluster  atom-spec  center  point-spec  [ start  N ] [ step  n ] [ end  M ] [ excludeSolvent  true | false ] [ excludeHydrogens  true | false ] [ excludeLigands  true | false ] [ excludeMetals  alkali | true | false ] [ saveFile  file ] [ showTool  true | false ]

The md cluster command clusters the frames in a trajectory based on pairwise best-fit root-mean-square deviations (RMSDs). A representative frame will be identified for each cluster. This command can be invoked from the context menu of the coordset slider graphical interface for trajectory playback.

Clustering Options

start  N
The number of the first frame to include in the calculation; must be within the range originally loaded. The default is the first frame loaded.
step  n
The level of sampling within the indicated range; every nth frame will be used. The default n = 1 + (number of frames loaded)/300, rounded down to an integer.
end  M
The number of the last frame to possibly include (if not skipped by sampling); must be within the range originally loaded. The default is the last frame loaded.
excludeSolvent  true | false
Whether to exclude solvent residues and non-metal monatomic ions (Cl, Br, etc.; default true).
excludeHydrogens  true | false
Whether to exclude hydrogens from the calculation (default true).
excludeLigands  true | false
Whether to exclude ligand residues (default false).
excludeMetals  alkali | true | false
Whether to ignore alkali metal ions (default, meaning to exclude Li+, Na+, K+, etc.), or all metal ions (if true), or none (if false, thus including any metal ions).
saveFile  file
Save clustering information (membership and representatives) to a text file, where file is the output file pathname, enclosed in quotation marks if it includes spaces, or the word browse to specify it interactively in a file browser window.
showTool  true | false
Whether to show the clustering results dialog. The default is true (show the tool) unless the md cluster command is executed from a script or in nogui mode.

UCSF Resource for Biocomputing, Visualization, and Informatics / March 2026