mmtf-python
A decoding libary for the PDB mmtf format
What it is and what it does
mmtf-python is a library for working with the macromolecular transmission format (MMTF), a binary encoding standard for biological structures maintained by the Protein Data Bank (PDB). It provides both encoding and decoding capabilities, plus a convenience API to fetch structure data directly from PDB by structure ID.
The package lets you load PDB structures into Python as decoded objects with properties like structure_id, num_chains, group_list (atomic information), and bio_assembly data. It depends only on msgpack for binary serialization. The library is stable and production-ready according to its classifier, but development has stalled since mid-2022 with no recent commits or releases.
Use it for:
- Fetch and analyze PDB protein structures programmatically by structure ID
- Extract atomic charge information and group properties from biological structures
- Count chains and bioassemblies in a protein structure for structural analysis
- Decode MMTF binary files into Python objects for computational biology workflows
- Build bioinformatics pipelines that need lightweight, standardized structure data access
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Decodes and encodes the macromolecular transmission format (MMTF), a binary encoding for biological structures, and provides a Python API to fetch and inspect PDB structure data.
Yes, if you need to work with PDB structures in Python and can tolerate an unmaintained package. The library is stable, has no known vulnerabilities, and a single lightweight dependency. However, be aware that it will not receive updates for Python version incompatibilities or format changes. Suitable for read-only structure analysis in established workflows, but risky for new projects expecting long-term support.
Install
mmtf-python on PyPI
pip
pip install mmtf-pythonuv
uv add mmtf-pythonpoetry
poetry add mmtf-pythonInstalling mmtf-python
Before you install
Low install friction with a single lightweight dependency (msgpack). However, the package is abandoned—last release was 2022-07-06 and no commits since then. Not actively maintained, so security updates and compatibility fixes are unlikely.
License in practice
Licensed under Apache 2.0, a permissive license that allows commercial and private use with minimal restrictions, making it safe to use in most projects.
Quickstart
pip install mmtf-python
from mmtf import fetch
decoded_data = fetch("4CUP")
print("PDB Code: " + str(decoded_data.structure_id) + " has " + str(decoded_data.num_chains) + " chains")
Verify before relying
- Whether msgpack dependency has known vulnerabilities or maintenance issues
- Compatibility with Python versions beyond 3.9 (classifiers list only up to 3.9)
- Whether the MMTF format specification itself has evolved since 2022
Package facts
| License | Apache 2.0 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — msgpack |
| Maintenance | abandoned — 1,500 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 290,159/month — #7,993 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: mmtf_python-1.1.3-py2.py3-none-any.whl
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
gemmiGemmi is a C++ library with Python bindings for…
copyleft · top 5,000 on PyPI
mmcifProvides native Python and C++ bindings to…
permissive · top 5,000 on PyPI
biotiteBiotite provides a unified Python library for…
permissive · top 5,000 on PyPI
pdb2pqrPDB2PQR prepares protein structures from PDB…
permissive · top 15,000 on PyPI
python-libsbmlProvides Python bindings to read, write, and…
copyleft · top 15,000 on PyPI
py3DmolEmbeds an interactive 3D molecular viewer in…
permissive · top 15,000 on PyPI
fastpdbfastpdb is a Rust-based drop-in replacement for…
permissive · top 15,000 on PyPI
bech32mEncodes and decodes Bech32 and Bech32m strings,…
permissive · top 15,000 on PyPI
pinderPinder provides access to a large…
permissive · top 15,000 on PyPI
databento-dbndatabento-dbn provides Python bindings for…
permissive · top 5,000 on PyPI