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.
Documentation · Tutorials · API reference
For GPU scoring on Linux with PyTorch 2.14 and CUDA 13.2:
python -m pip install "torch==2.14.*" --only-binary=:all: --index-url https://download.pytorch.org/whl/cu132
python -m pip install "tmol==0.1.62+cu132torch2.14" --only-binary=:all: \
--find-links https://uw-ipd.github.io/tmol/wheels/v0.1.62/cu132torch2.14/For CPU scoring:
python -m pip install "tmol==0.1.62" --only-binary=:all:PyPI provides CPU wheels; GitHub hosts CUDA variants. Both include AtomWorks 3 and ligand preparation with RDKit and OpenBabel. See the installation guide for other CUDA/PyTorch combinations, platform support, and source builds.
Verify the installation:
python -c "import tmol; print(tmol.__version__)"Score a structure on CPU. With a CUDA TMol wheel, use torch.device("cuda"):
import torch
import tmol
device = torch.device("cpu")
pose = tmol.pose_stack_from_pdb("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 minimization and ligand preparation. The guides cover batching, packing, score analysis, and model inputs; the task index links individual operations to examples and APIs.
git clone https://github.com/uw-ipd/tmol.git
cd tmol
python -m pip install "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.
If you use TMol in your work, please cite:
Andrew Leaver-Fay, Jeff Flatten, Alex Ford, Joseph Kleinhenz, Henry Solberg, David Baker, Andrew M. Watkins, Brian Kuhlman, Frank DiMaio, tmol: a GPU-accelerated, PyTorch implementation of Rosetta's relax protocol (manuscript in preparation).
TMol is available under the terms in LICENSE.