Skip to main content

TMol

PyPI version Python versions PyPI downloads CI status Documentation Code coverage License

TMol provides all-atom scoring, packing, minimization, and FastRelax in PyTorch. It batches proteins, nucleic acids, ligands, and complexes on CPU or CUDA, with gradients through coordinate scoring. On Apple silicon, CPU runs move their heaviest work onto the GPU automatically.

Documentation · Tutorials · API reference

Install

TMol 1.0 requires Python 3.12+ and PyTorch 2.11+. Install from PyPI. For GPU use, first install PyTorch with the matching CUDA major, then choose one command:

python -m pip install tmol          # CPU, including Apple Silicon
python -m pip install "tmol[cu12]"   # CUDA 12-enabled PyTorch
python -m pip install "tmol[cu13]"   # CUDA 13-enabled PyTorch

The base package contains the Python API, data, and CPU kernels. GPU extras add tmol-ops-cu12 or tmol-ops-cu13 at the same version. GPU use also needs a compatible NVIDIA driver; pip does not detect GPUs or select a PyTorch CUDA build. The installation guide covers requirements, verification, upgrades, and source builds. TMol wheels work across supported PyTorch minor versions; no per-Torch wheel selection is needed.

import torch, tmol
print(tmol.__version__, tmol.has_cuda(), torch.cuda.is_available())

Quick start

Score a structure on CPU. With matching CUDA-enabled PyTorch and TMol operators, use torch.device("cuda"):

import torch
import tmol

device = torch.device("cpu")
pose = tmol.pose_stack_from_file("input.pdb", device)

score_function = tmol.beta2016_score_function(device)
score = score_function.render_whole_pose_scoring_module(pose)
print(score(pose.coords))

See the quickstart for scoring, minimization, repacking, FastRelax, batching, and ligand preparation. The visual glossary explains the concepts, and the score playground lets you rotate a side chain and inspect TMol scores in the browser. The tutorials are runnable notebooks, each also available in Colab.

Development

git clone https://github.com/RosettaCommons/tmol.git
cd tmol
python -m pip install "torch>=2.14" "scikit-build-core>=0.10" "cmake>=3.24,<4" "pybind11>=2.12" ninja packaging
python -m pip install --no-build-isolation -e ".[dev]"

The development guide covers builds, tests, benchmarks, and releases. See the contributor guide for code and documentation conventions, or agent skills for reusable coding-agent instructions.

Citation

If you use TMol in your work, please cite:

Andrew Leaver-Fay*, Kieran Didi*, Jeff Flatten*, Alex Ford, Guangfeng Zhou, Nathaniel Corley, Hahnbeom Park, Maxwell W. Kazman, Rafael I. Brent, Joseph Kleinhenz, Henry Solberg, Andrew M. Watkins, Brian Kuhlman, David Baker, Frank DiMaio, tmol: a GPU-accelerated implementation of the Rosetta energy function for machine learning (manuscript in preparation).

* Core contributor.

TMol is available under the terms in LICENSE.

Metadata

Release files for tmol 1.0.0

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

Source distribution (sdist)

Source distribution for tmol 1.0.0
File Size Uploaded Provenance Actions
tmol-1.0.0.tar.gz 64.1 MB Without provenance Details for tmol-1.0.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for tmol 1.0.0
File Actions
tmol-1.0.0-cp314-cp314-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64 Details for tmol-1.0.0-cp314-cp314-manylinux_2_28_x86_64.whl
tmol-1.0.0-cp314-cp314-manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ ARM64 Details for tmol-1.0.0-cp314-cp314-manylinux_2_28_aarch64.whl
tmol-1.0.0-cp314-cp314-macosx_14_0_arm64.whl CPython 3.14 CPython 3.14 macOS 14.0+ ARM64 Details for tmol-1.0.0-cp314-cp314-macosx_14_0_arm64.whl
tmol-1.0.0-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details for tmol-1.0.0-cp313-cp313-manylinux_2_28_x86_64.whl
tmol-1.0.0-cp313-cp313-manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ ARM64 Details for tmol-1.0.0-cp313-cp313-manylinux_2_28_aarch64.whl
tmol-1.0.0-cp313-cp313-macosx_14_0_arm64.whl CPython 3.13 CPython 3.13 macOS 14.0+ ARM64 Details for tmol-1.0.0-cp313-cp313-macosx_14_0_arm64.whl
tmol-1.0.0-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details for tmol-1.0.0-cp312-cp312-manylinux_2_28_x86_64.whl
tmol-1.0.0-cp312-cp312-manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ ARM64 Details for tmol-1.0.0-cp312-cp312-manylinux_2_28_aarch64.whl
tmol-1.0.0-cp312-cp312-macosx_14_0_arm64.whl CPython 3.12 CPython 3.12 macOS 14.0+ ARM64 Details for tmol-1.0.0-cp312-cp312-macosx_14_0_arm64.whl

Total release size: 220.3 MB

Release files / tmol-1.0.0.tar.gz

Download URL tmol-1.0.0.tar.gz
Size 64.1 MB
Tags Source
SHA-256 checksum
How to use checksums
81c9945a0e391b1d714104e529b7f45d9a61cca155873cb8da2a6ec21f065521
BLAKE2b-256 checksum
How to use checksums
d036c63bb8ff96d46a7ed4e7bdd4615f68e6b3ee05e8207bad9388e0183a1dc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / tmol-1.0.0-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL tmol-1.0.0-cp314-cp314-manylinux_2_28_x86_64.whl
Size 17.4 MB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
bb2f8b55cffee217243a396bb33dde7ffae1a2efd4f0f29c0cfdc3ff87c73d2e
BLAKE2b-256 checksum
How to use checksums
48128ceb2c01c45d391f39ba455ecbdb8030290887c9be4289f2d0fa98dcbe39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / tmol-1.0.0-cp314-cp314-manylinux_2_28_aarch64.whl

Download URL tmol-1.0.0-cp314-cp314-manylinux_2_28_aarch64.whl
Size 17.3 MB
Tags CPython 3.14 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
072a887143e619c8ff030ab1eccd8f6da9aabb926d6d45a320cac4ecdb9305d0
BLAKE2b-256 checksum
How to use checksums
42455631198a63d57a1fdefab96fe3bcc857d82d60cd2121dcaab3d158158683
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / tmol-1.0.0-cp314-cp314-macosx_14_0_arm64.whl

Download URL tmol-1.0.0-cp314-cp314-macosx_14_0_arm64.whl
Size 17.5 MB
Tags CPython 3.14 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
8d02cc294dd688fe575073c2f7c0c169ed10f7515eabc12c063ce289c82cd053
BLAKE2b-256 checksum
How to use checksums
f2b8a7df57d1adddbdf7c7e66fbc1bfd430fdc94b377e9b5872810338eb1ad9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / tmol-1.0.0-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL tmol-1.0.0-cp313-cp313-manylinux_2_28_x86_64.whl
Size 17.4 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
97374d64db53c3ea45326a013390f0c396fbd446d68ea7fd4e57cd6e4c1fcfa6
BLAKE2b-256 checksum
How to use checksums
9124f1b313a69bd116f7bc7b0169fb41a7f95b09241aa214a1c06ad5d2a9c65b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / tmol-1.0.0-cp313-cp313-manylinux_2_28_aarch64.whl

Download URL tmol-1.0.0-cp313-cp313-manylinux_2_28_aarch64.whl
Size 17.3 MB
Tags CPython 3.13 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
787460d76e839da10f2712386410a533a36411ef1228584c91faca896893f159
BLAKE2b-256 checksum
How to use checksums
099d91d0921c57d2538d674e7d377dd25defd0c83a11db29e7b7fcbf5843a9d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / tmol-1.0.0-cp313-cp313-macosx_14_0_arm64.whl

Download URL tmol-1.0.0-cp313-cp313-macosx_14_0_arm64.whl
Size 17.5 MB
Tags CPython 3.13 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
3bdd7a187e537b07c654d42cc0b04812af03b3d0bd8944102332490ec8f69148
BLAKE2b-256 checksum
How to use checksums
9c31728924ee0122f0f52122a3d91aafa7a77922ecdc4acbe0b272e8a37a1bb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / tmol-1.0.0-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL tmol-1.0.0-cp312-cp312-manylinux_2_28_x86_64.whl
Size 17.4 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
7928e3949daf32a3db7f4904bd647e21a3a1c8256efc0e403bcec5e072cc29ee
BLAKE2b-256 checksum
How to use checksums
4e958da02e5269c2edadbd6f03007e7f0e033f55a44807e7cb54928423a1b067
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / tmol-1.0.0-cp312-cp312-manylinux_2_28_aarch64.whl

Download URL tmol-1.0.0-cp312-cp312-manylinux_2_28_aarch64.whl
Size 17.3 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
c902b3e96653f29f5a14afc3f23869987b9d8df1a820ad3325d84bb15a1a105f
BLAKE2b-256 checksum
How to use checksums
d12b53ba1a640ffd8a93585bb575bec5e5f951f38ae6cbe4025947953e4618e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / tmol-1.0.0-cp312-cp312-macosx_14_0_arm64.whl

Download URL tmol-1.0.0-cp312-cp312-macosx_14_0_arm64.whl
Size 17.5 MB
Tags CPython 3.12 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
ff7d6d7109ec58bc7e3915fd32426d635c8bd2f8a397188377297918259d6a4d
BLAKE2b-256 checksum
How to use checksums
a7be2001a8b5b65afb1c3bf13d070366088421efe989e6b5bc4b3ad837d23495
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for tmol 1.0.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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