Skip to content
RosettaCommonsPublic

About

TMol - Rosetta on the GPU

Resources

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

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.

Documentation · Tutorials · API reference

Install

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_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 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 task index links individual operations to examples and APIs.

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, 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 BSD-3-Clause license in LICENSE.

About

TMol - Rosetta on the GPU

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages