Skip to content

Command reference

openmm-cli

OpenMM command line interface.

Usage:

console $ openmm-cli [OPTIONS] COMMAND [ARGS]...

Options:

  • --install-completion: Install completion for the current shell.
  • --show-completion: Show completion for the current shell, to copy it or customize the installation.
  • --help: Show this message and exit.

Commands:

  • dashboard: Launch a web dashboard that plots CSV...
  • run: Run an MD simulation from a YAML config file.
  • prepare: System preparation commands.
  • trajectory: Trajectory analysis and processing.

openmm-cli dashboard

Launch a web dashboard that plots CSV output files

Usage:

console $ openmm-cli dashboard [OPTIONS] [DIRECTORY]

Arguments:

  • [DIRECTORY]: Directory to display. Defaults to the current directory. [default: .]

Options:

  • --port INTEGER: Port to serve on. [default: 8501]
  • --help: Show this message and exit.

openmm-cli run

Run an MD simulation from a YAML config file.

Usage:

console $ openmm-cli run [OPTIONS] CONFIG

Arguments:

  • CONFIG: Path to yaml configuration file. [required]

Options:

  • --help: Show this message and exit.

openmm-cli prepare

System preparation commands.

Usage:

console $ openmm-cli prepare [OPTIONS] COMMAND [ARGS]...

Options:

  • --help: Show this message and exit.

Commands:

  • clean: Clean a PDB file with pdbfixer: fix...
  • solvate: Add a water box and counterions to bring...

openmm-cli prepare clean

Clean a PDB file with pdbfixer: fix structure, add hydrogens, optionally strip extras.

Usage:

console $ openmm-cli prepare clean [OPTIONS] PDB

Arguments:

  • PDB: Input PDB file. [required]

Options:

  • --out PATH: Output PDB file. [default: cleaned.pdb]
  • --ph FLOAT: pH used to assign protonation states. [default: 7.4]
  • --keep-water / --strip-water: Keep crystallographic water molecules (only applies when stripping heteroatoms). [default: strip-water]
  • --keep-hetero / --strip-hetero: Keep ligands, cofactors, and ions. Off by default for protein-only output. [default: strip-hetero]
  • --add-residues / --no-add-residues: Build in missing residues (gaps/loops). Off by default to avoid silent insertions. [default: no-add-residues]
  • --replace-nonstandard / --keep-nonstandard: Replace nonstandard residues (e.g. MSE -> MET) with their standard equivalents. [default: replace-nonstandard]
  • --help: Show this message and exit.

openmm-cli prepare solvate

Add a water box and counterions to bring the system to the target ionic strength.

Usage:

console $ openmm-cli prepare solvate [OPTIONS] PDB

Arguments:

  • PDB: Input PDB file (typically already cleaned). [required]

Options:

  • --out PATH: Output solvated PDB file. [default: solvated.pdb]
  • --padding FLOAT: Minimum distance (nm) from solute to box edge. [default: 1.0]
  • --box-shape [cube|dodecahedron|octahedron]: Shape of the periodic box. [default: cube]
  • --ionic-strength FLOAT: Ionic strength in mol/L (physiological ~0.15). [default: 0.15]
  • --positive-ion TEXT: Cation species (Na+, K+, Li+, Rb+, Cs+). [default: Na+]
  • --negative-ion TEXT: Anion species (Cl-, Br-, F-, I-). [default: Cl-]
  • --help: Show this message and exit.

openmm-cli trajectory

Trajectory analysis and processing.

Usage:

console $ openmm-cli trajectory [OPTIONS] COMMAND [ARGS]...

Options:

  • --help: Show this message and exit.

Commands:

  • align: Align each frame to a reference by RMSD...
  • angle: Angle A-B-C over time, using the center of...
  • average: Average a trajectory's coordinates into a...
  • center: Translate each frame so the selection's...
  • convert: Convert a trajectory between formats.
  • dihedral: Dihedral angle A-B-C-D over time, using...
  • distance: Distance (nm) between two atom selections...
  • extract: Extract a frame range ...
  • hbonds: List hydrogen bonds present in at least...
  • image: Image molecules into the primary unit...
  • info: Print frames, atoms, residues, chains, and...
  • rmsd: RMSD (nm) of each frame versus a...
  • rmsf: Per-atom RMSF (nm) of the selected atoms...
  • strip: Keep only the selected atoms; write a...

openmm-cli trajectory align

Align each frame to a reference by RMSD fit on the selected atoms.

Usage:

console $ openmm-cli trajectory align [OPTIONS] TRAJECTORY

Arguments:

  • TRAJECTORY: Input trajectory file. [required]

Options:

  • --top PATH: Topology file (parm7, pdb, ...). [required]
  • --out PATH: Output trajectory. [default: aligned.dcd]
  • --ref PATH: Reference structure (default: first frame of trajectory).
  • --sel TEXT: Atoms to use for the fit (mdtraj selection syntax). [default: name CA]
  • --help: Show this message and exit.

openmm-cli trajectory angle

Angle A-B-C over time, using the center of mass of each selection (B is the vertex).

Usage:

console $ openmm-cli trajectory angle [OPTIONS] TRAJECTORY

Arguments:

  • TRAJECTORY: [required]

Options:

  • --top PATH: [required]
  • --a TEXT: First selection. [required]
  • --b TEXT: Second selection (the vertex). [required]
  • --c TEXT: Third selection. [required]
  • --out PATH: [default: angle.csv]
  • --degrees / --radians: [default: degrees]
  • --help: Show this message and exit.

openmm-cli trajectory average

Average a trajectory's coordinates into a single structure.

Usage:

console $ openmm-cli trajectory average [OPTIONS] TRAJECTORY

Arguments:

  • TRAJECTORY: Input trajectory. [required]

Options:

  • --top PATH: Topology file. [required]
  • --sel TEXT: Atoms to superpose on before averaging. [default: name CA]
  • --out PATH: Output structure file (format by extension). [default: average.pdb]
  • --iterations INTEGER: Re-superpose onto the running average N times. [default: 2]
  • --help: Show this message and exit.

openmm-cli trajectory center

Translate each frame so the selection's COM sits at the target, then by default image molecules.

Usage:

console $ openmm-cli trajectory center [OPTIONS] TRAJECTORY

Arguments:

  • TRAJECTORY: [required]

Options:

  • --top PATH: [required]
  • --out PATH: [default: centered.dcd]
  • --sel TEXT: Selection whose center of mass should be moved. [default: protein]
  • --target [box|origin]: Where to place the COM. [default: box]
  • --image / --no-image: Image molecules into the unit cell after centering. [default: image]
  • --help: Show this message and exit.

openmm-cli trajectory convert

Convert a trajectory between formats. Output format is inferred from the extension.

Usage:

console $ openmm-cli trajectory convert [OPTIONS] TRAJECTORY

Arguments:

  • TRAJECTORY: Input trajectory. [required]

Options:

  • --top PATH: [required]
  • --out PATH: Output trajectory; format inferred from extension (.dcd, .xtc, .trr, .nc, .h5). [default: converted.xtc]
  • --help: Show this message and exit.

openmm-cli trajectory dihedral

Dihedral angle A-B-C-D over time, using the center of mass of each selection.

Usage:

console $ openmm-cli trajectory dihedral [OPTIONS] TRAJECTORY

Arguments:

  • TRAJECTORY: [required]

Options:

  • --top PATH: [required]
  • --a TEXT: [required]
  • --b TEXT: [required]
  • --c TEXT: [required]
  • --d TEXT: [required]
  • --out PATH: [default: dihedral.csv]
  • --degrees / --radians: [default: degrees]
  • --help: Show this message and exit.

openmm-cli trajectory distance

Distance (nm) between two atom selections over time.

Usage:

console $ openmm-cli trajectory distance [OPTIONS] TRAJECTORY

Arguments:

  • TRAJECTORY: [required]

Options:

  • --top PATH: [required]
  • --a TEXT: First atom selection. [required]
  • --b TEXT: Second atom selection. [required]
  • --out PATH: [default: distance.csv]
  • --help: Show this message and exit.

openmm-cli trajectory extract

Extract a frame range from a trajectory.

Usage:

console $ openmm-cli trajectory extract [OPTIONS] TRAJECTORY

Arguments:

  • TRAJECTORY: [required]

Options:

  • --top PATH: [required]
  • --out PATH: [default: extracted.dcd]
  • --start INTEGER: First frame (0-indexed). [default: 0]
  • --stop INTEGER: Stop frame (exclusive). Default: end.
  • --stride INTEGER: Take every Nth frame. [default: 1]
  • --help: Show this message and exit.

openmm-cli trajectory hbonds

List hydrogen bonds present in at least freq of frames, with their per-bond occupancy.

Usage:

console $ openmm-cli trajectory hbonds [OPTIONS] TRAJECTORY

Arguments:

  • TRAJECTORY: [required]

Options:

  • --top PATH: [required]
  • --out PATH: [default: hbonds.csv]
  • --freq FLOAT: Minimum fraction of frames an H-bond must be present (0-1). [default: 0.1]
  • --sel TEXT: Restrict to H-bonds where both donor and acceptor are in this selection.
  • --help: Show this message and exit.

openmm-cli trajectory image

Image molecules into the primary unit cell, keeping them whole across boundaries.

Usage:

console $ openmm-cli trajectory image [OPTIONS] TRAJECTORY

Arguments:

  • TRAJECTORY: [required]

Options:

  • --top PATH: [required]
  • --out PATH: [default: imaged.dcd]
  • --help: Show this message and exit.

openmm-cli trajectory info

Print frames, atoms, residues, chains, and box information.

Usage:

console $ openmm-cli trajectory info [OPTIONS] TRAJECTORY

Arguments:

  • TRAJECTORY: [required]

Options:

  • --top PATH: [required]
  • --help: Show this message and exit.

openmm-cli trajectory rmsd

RMSD (nm) of each frame versus a reference, after optimal alignment.

Usage:

console $ openmm-cli trajectory rmsd [OPTIONS] TRAJECTORY

Arguments:

  • TRAJECTORY: [required]

Options:

  • --top PATH: [required]
  • --out PATH: [default: rmsd.csv]
  • --ref PATH: Reference structure (default: first frame).
  • --sel TEXT: Atoms for the fit and RMSD calculation. [default: name CA]
  • --help: Show this message and exit.

openmm-cli trajectory rmsf

Per-atom RMSF (nm) of the selected atoms over the trajectory.

Usage:

console $ openmm-cli trajectory rmsf [OPTIONS] TRAJECTORY

Arguments:

  • TRAJECTORY: [required]

Options:

  • --top PATH: [required]
  • --out PATH: [default: rmsf.csv]
  • --sel TEXT: [default: name CA]
  • --align / --no-align: RMSD-fit trajectory to frame 0 before computing RMSF. [default: align]
  • --help: Show this message and exit.

openmm-cli trajectory strip

Keep only the selected atoms; write a stripped trajectory and matching topology.

Usage:

console $ openmm-cli trajectory strip [OPTIONS] TRAJECTORY

Arguments:

  • TRAJECTORY: [required]

Options:

  • --top PATH: [required]
  • --out PATH: [default: stripped.dcd]
  • --keep TEXT: Atoms to keep (mdtraj selection). [default: not water]
  • --top-out PATH: Where to write the stripped topology (PDB). [default: stripped.pdb]
  • --help: Show this message and exit.