Skip to content

mogura-rs/mmterm-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mmterm (Rust)

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.

Features

  • 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 .pdb and .mmcif (and .cif) files.
  • Filtering: Select specific chains or models to view.
  • Performance: Written in Rust for efficiency.

Installation

From Source

Ensure you have Rust and Cargo installed.

cargo install --git https://github.com/mogura-rs/mmterm-rs

This will install the mmterm binary to your Cargo bin directory (usually ~/.cargo/bin).

Usage

mmterm <pdb_file> [options]

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

Examples

View a file:

mmterm 1CRN.pdb

View only chain A:

mmterm 1CRN.pdb -c A

Force mmCIF format:

mmterm structure.cif -f mmcif

Controls

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

References & Credits

  • Original Implementation: mmterm by Joe Greener.
  • PDB Parsing: Uses the pdbtbx crate.
  • TUI/Input: Uses crossterm.
  • Math: Uses glam for 3D transformations.

License

MIT

Releases

No releases published

Packages

 
 
 

Contributors

Languages