A terminal-based viewer for PDB protein structures, implemented in Rust. This is a port of the original mmterm Python tool by jgreener64.
It uses Braille characters to render 3D protein structures directly in your terminal.
- Terminal Rendering: View protein structures in any terminal that supports Unicode (Braille patterns).
- Interactive Controls: Rotate, translate, and zoom the structure using keyboard shortcuts.
- Multiple Formats: Supports
.pdband.mmcif(and.cif) files. - Filtering: Select specific chains or models to view.
- Performance: Written in Rust for efficiency.
Ensure you have Rust and Cargo installed.
cargo install --git https://github.com/mogura-rs/mmterm-rsThis will install the mmterm binary to your Cargo bin directory (usually ~/.cargo/bin).
mmterm <pdb_file> [options]| Option | Short | Description | Default |
|---|---|---|---|
--size |
-s |
Size of the viewing box (10-400) | 100.0 |
--model |
-m |
Initial model to show (1-based) | 1 |
--chain |
-c |
Filter to show only a specific chain ID | (All) |
--format |
-f |
Force input format (pdb, mmcif) |
(Auto) |
--help |
-h |
Show help message |
View a file:
mmterm 1CRN.pdbView only chain A:
mmterm 1CRN.pdb -c AForce mmCIF format:
mmterm structure.cif -f mmcif| Key | Action |
|---|---|
| W / A / S / D | Rotate the structure |
| T / F / G / H | Translate (move) the view |
| I / O | Zoom In / Out |
| U | Toggle Auto-Spin |
| P | Cycle through Models (if multiple exist) |
| Q / Esc | Quit |
- Original Implementation: mmterm by Joe Greener.
- PDB Parsing: Uses the pdbtbx crate.
- TUI/Input: Uses crossterm.
- Math: Uses glam for 3D transformations.
MIT