Skip to main content

ProteinView

License: MIT Rust Build PRs Welcome

╔════════════════════════════════════════════════════════════════╗
║                                                                ║
║    ██████╗ ██████╗  ██████╗ ████████╗███████╗██╗███╗   ██╗     ║
║    ██╔══██╗██╔══██╗██╔═══██╗╚══██╔══╝██╔════╝██║████╗  ██║     ║
║    ██████╔╝██████╔╝██║   ██║   ██║   █████╗  ██║██╔██╗ ██║     ║
║    ██╔═══╝ ██╔══██╗██║   ██║   ██║   ██╔══╝  ██║██║╚██╗██║     ║
║    ██║     ██║  ██║╚██████╔╝   ██║   ███████╗██║██║ ╚████║     ║
║    ╚═╝     ╚═╝  ╚═╝ ╚═════╝    ╚═╝   ╚══════╝╚═╝╚═╝  ╚═══╝     ║
║                 ██╗   ██╗██╗███████╗██╗    ██╗                 ║
║                 ██║   ██║██║██╔════╝██║    ██║                 ║
║                 ██║   ██║██║█████╗  ██║ █╗ ██║                 ║
║                 ╚██╗ ██╔╝██║██╔══╝  ██║███╗██║                 ║
║                  ╚████╔╝ ██║███████╗╚███╔███╔╝                 ║
║                   ╚═══╝  ╚═╝╚══════╝ ╚══╝╚══╝                  ║
║                                                                ║
║   (=(    )=)~~(=(    )=)~~(=(    )=)~~(=(    )=)~~(=(    )=)   ║
║                                                                ║
╚════════════════════════════════════════════════════════════════╝

Terminal protein structure viewer -- load, rotate, and explore PDB/CIF structures right in your terminal.

Demo

Cartoon ribbon rendering of antibody-antigen complex (1ZVH)

Features

  • Braille character rendering -- high-resolution colored Unicode braille (2x4 dots per cell), works everywhere including SSH
  • HD pixel rendering -- Sixel/Kitty/iTerm2 graphics protocol support via ratatui-image for pixel-perfect display (--hd)
  • Cartoon ribbon visualization -- smooth ribbon/tube rendering with depth fog and Lambert shading for helices, beta-sheets, and coils
  • 3 visualization modes -- Cartoon (ribbon), Backbone (CA trace), Wireframe (all-atom bonds)
  • 6 color schemes -- secondary structure, pLDDT (when available), chain, element, B-factor, rainbow
  • Interactive rotation, zoom, pan -- vim-style keybindings with auto-rotation
  • Protein-protein interface analysis -- detect and highlight inter-chain contacts
  • PDB and mmCIF format support -- including secondary structure parsing from both formats
  • Fetch from RCSB PDB -- download structures by ID with --fetch (optional feature)
  • Single static binary, zero runtime dependencies

Installation

Easy install via pip for x86 (for arm, it will try to build it on your machine using maturin)

pip install proteinview

or build it here from source

# Basic install
cargo install --path .

# With RCSB PDB fetch support
cargo install --path . --features fetch

This builds the binary and places it in ~/.cargo/bin/, which is already on your PATH if you installed Rust via rustup. Then run proteinview from anywhere.

Usage

# View a local PDB file
proteinview examples/1UBQ.pdb

# HD pixel mode (Sixel/Kitty/iTerm2 terminals)
proteinview examples/4HHB.pdb --hd

# Choose color scheme
proteinview examples/1UBQ.pdb --color rainbow

# Color AlphaFold / ModelCIF structures by pLDDT
proteinview examples/AF3_TNFa.pdb --color plddt

# Choose visualization mode
proteinview examples/4HHB.pdb --mode wireframe

# Fetch from RCSB PDB (requires --features fetch)
proteinview --fetch 1UBQ

Keybindings

Key Action
h / l Rotate Y-axis
j / k Rotate X-axis
u / i Rotate Z-axis (roll)
+ / - Zoom in / out
w/a/s/d Pan
r Reset view
c Cycle color scheme
v Cycle visualization mode
f Toggle interface analysis
m Toggle braille / HD
[ / ] Previous / next chain
Space Toggle auto-rotation
? Help overlay
q Quit

Visualization Modes

Mode Description
Cartoon Ribbon rendering with smooth helices, beta-sheet arrows, and coil tubes. Default.
Backbone CA-trace with spheres at alpha-carbon positions connected by thick lines.
Wireframe All-atom display showing every bond in the structure.

Wireframe view of hemoglobin (4HHB) with chain coloring

Color Schemes

Scheme Description
Secondary Structure Helix (red), sheet (yellow), coil (green), turn (blue). Default.
pLDDT AlphaFold confidence colors when the file stores pLDDT scores.
Chain Each chain gets a distinct color from a curated palette.
Element (CPK) Atoms colored by element: C gray, N blue, O red, S yellow.
B-factor Blue (low mobility) to red (high mobility) gradient.
Rainbow N-terminus (blue) to C-terminus (red) by residue position.

Example PDB Files

File Description
examples/1UBQ.pdb Ubiquitin -- 76 residues, single chain, classic test protein
examples/4HHB.pdb Hemoglobin -- 4 chains, 574 residues, good for multi-chain viewing
examples/1ZVH.cif Antibody-antigen complex -- mmCIF format, good for interface analysis
examples/AF3_TNFa.pdb AlphaFold-style PDB with pLDDT confidence values
examples/OBP5_model_0.cif ModelCIF example with pLDDT-style confidence values

Interface Analysis

Press f to toggle the protein-protein interface panel, which detects inter-chain contacts and highlights interface residues.

Interface analysis panel showing chain contacts

Terminal Support

  • Works in any terminal with Unicode support (braille mode).
  • For best quality, use a terminal with Sixel or Kitty graphics protocol support (e.g., WezTerm, Kitty, foot, iTerm2) and pass --hd.
  • The --hd flag auto-detects the best graphics protocol; falls back to colored braille if none available.

Building

cargo build --release

# With RCSB fetch support:
cargo build --release --features fetch

Contributing

Contributions welcome! Please open an issue or PR on GitHub.

License

MIT

Metadata

Release files for proteinview 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for proteinview 0.1.4
File Size Uploaded
proteinview-0.1.4.tar.gz 5.9 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for proteinview 0.1.4
File Interpreter ABI Platform
proteinview-0.1.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details

Total release size: 6.9 MB

Release files / proteinview-0.1.4.tar.gz

Download URL proteinview-0.1.4.tar.gz
Size 5.9 MB
Tags Source
SHA-256 checksum
How to use checksums
6c26fc13c07b78a5d1cbdd1831379a4fed3952c59aacf39c27b4feb0e59eb320
BLAKE2b-256 checksum
How to use checksums
65beecd71d3862cf35e74533b90d45ef82593c243a95176748a6386a6c23acb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 10, 2026.

Transparency log

Release files / proteinview-0.1.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL proteinview-0.1.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.0 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
25ecab63140ebb4229a736d30c252cfce19117b319c9017458e39310ae05507a
BLAKE2b-256 checksum
How to use checksums
1f6c8f005c1b2cac5bfa2f2e41c29003a7a5e722c05cade3a91f10207d11d068
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page