skillfed

tmtools

Python bindings around the TM-align code for structural alignment of proteins

tmtools v0.3.0 151.9K downloads/30d#10,917 on PyPI66
Copyleft license GPLv3 AGING released

What it is and what it does

tmtools wraps the TM-align algorithm—a widely-used structural biology tool for aligning protein coordinates—into a Python interface. It takes two sets of 3D atomic coordinates and amino acid sequences, computes the optimal structural alignment, and returns the rotation matrix, translation vector, and TM-score (a normalized similarity metric). The package ships with pre-built wheels for modern Python versions and common platforms, minimizing compilation friction.

The core use case is comparing protein structures to assess similarity or find conserved folds. It supports both automatic alignment discovery and user-supplied alignment strings with gaps, making it useful for hypothesis testing or domain-guided comparisons. Optional integration with BioPython allows direct parsing of PDB files. The package is in alpha status and has not seen a release in several months, though the underlying TM-align algorithm is mature and well-cited in structural biology.

Use it for:

  • Compare two protein structures to compute their TM-score and optimal superposition for structural similarity assessment.
  • Validate a hypothesized protein alignment by supplying a custom alignment string and checking the resulting TM-score.
  • Parse PDB files with BioPython and extract coordinates and sequences for downstream structural comparison workflows.
  • Batch-compare a query protein structure against a library of known folds to identify homologous structures.
  • Integrate structural alignment into a protein design or validation pipeline that requires quantitative similarity metrics.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides Python bindings to the TM-align algorithm for comparing protein structures by computing optimal alignment, rotation, translation, and similarity scores.

Yes, if you need to compute protein structural alignments and TM-scores in Python. The pre-built wheels make installation straightforward, numpy is a common dependency, and the underlying algorithm is well-established. However, the GPLv3 license requires your project to be open-source; the aging maintenance status (no release in 278 days) suggests limited active development, so evaluate whether you need ongoing support or bug fixes. No known security vulnerabilities.

Install

tmtools on PyPI

pip

pip install tmtools

uv

uv add tmtools

poetry

poetry add tmtools

Installing tmtools

Before you install

Medium install friction due to compiled C++ components; wheels are pre-built for Python 3.10–3.14 on Linux, macOS (x86_64 and ARM64), and Windows, reducing compilation burden. Package is aging (278 days since last release) but repository remains active with recent commits.

License in practice

Licensed under GPLv3 (copyleft), which requires derivative works and distributions to also be open-source under GPLv3. The bundled TM-align code is MIT-licensed but the wrapper is GPLv3, so any project using tmtools must comply with GPLv3 terms.

Quickstart

pip install tmtools
import numpy as np
from tmtools import tm_align
coords1 = np.array([[1.2, 3.4, 1.5], [4.0, 2.8, 3.7]])
coords2 = np.array([[2.3, 7.4, 1.5], [4.0, 2.9, -1.7]])
res = tm_align(coords1, coords2, "AY", "AR")
print(res.tm_norm_chain1, res.rmsd)

Requires numpy arrays with shape (N, 3) for coordinates; optional BioPython dependency for PDB file parsing must be installed separately.

Verify before relying

  • Whether BioPython integration (optional, for PDB file I/O) is tested or maintained alongside the core library.
  • Performance characteristics or scalability limits for large protein structures or batch alignments.
  • Whether custom alignment feature is actively used or tested in production workflows.

Package facts

License GPLv3 (copyleft)
Python support not specified
Install friction medium — platform-specific wheel
Runtime dependencies 1 — numpy
Maintenance aging — 278 days since the last release
Last repo commit
First released
Downloads 151,910/month — #10,917 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: tmtools-0.3.0-cp310-cp310-macosx_10_9_x86_64.whl; tmtools-0.3.0-cp310-cp310-macosx_11_0_arm64.whl; tmtools-0.3.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl; tmtools-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; tmtools-0.3.0-cp310-cp310-musllinux_1_1_i686.whl; tmtools-0.3.0-cp310-cp310-musllinux_1_1_x86_64.whl; tmtools-0.3.0-cp310-cp310-win32.whl; tmtools-0.3.0-cp310-cp310-win_amd64.whl; tmtools-0.3.0-cp311-cp311-macosx_10_9_x86_64.whl; tmtools-0.3.0-cp311-cp311-macosx_11_0_arm64.whl; tmtools-0.3.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl; tmtools-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; tmtools-0.3.0-cp311-cp311-musllinux_1_1_i686.whl; tmtools-0.3.0-cp311-cp311-musllinux_1_1_x86_64.whl; tmtools-0.3.0-cp311-cp311-win32.whl; tmtools-0.3.0-cp311-cp311-win_amd64.whl; tmtools-0.3.0-cp312-cp312-macosx_10_9_x86_64.whl; tmtools-0.3.0-cp312-cp312-macosx_11_0_arm64.whl; tmtools-0.3.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl; tmtools-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Development Status :: 3 - AlphaIntended Audience :: Science/ResearchLicense :: OSI Approved :: GNU General Public License v3 (GPLv3)Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering

Tags

protein structure alignmentTM-align python bindingsprotein structure comparisonstructural similarity scoringprotein coordinate alignmentTM-score calculationprotein structure matching
structural-biologybioinformaticsprotein-alignment

More Scientific/Engineering packages