Rosetta molecular modeling at PyTorch speed.
TMol scores, packs, minimizes, and relaxes all-atom molecular structures as batched PyTorch tensors—on CPU or GPU, with gradients. It provides fast C++/CUDA kernels and modeling primitives for proteins, nucleic acids, ligands, and their complexes.
Explore the TMol documentation for complete installation guidance, executable tutorials, workflows, and the API reference.
Three ways in:
- 🚀 Start scoring → quick start, then the full Quickstart.
- 🧬 Build a workflow → scoring, packing, minimization, FastRelax, and ligand recipes.
- 🛠️ Develop TMol → contributor guide.
The shortest path is:
pip install tmolTMol first looks for a matching prebuilt wheel and otherwise builds locally. For a deterministic CPU/GPU binary install, supported Python/PyTorch/CUDA combinations, Colab, macOS, and HPC troubleshooting, see the installation guide and GitHub Releases.
Verify the installation:
python -c "import tmol; print(tmol.__version__)"Score a structure on GPU when CUDA is available, otherwise on CPU:
import torch
import tmol
device = torch.device("cuda" if torch.cuda.is_available() else "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))From here, use the interactive examples to pack side chains, analyze score terms, minimize coordinates, run FastRelax, prepare ligands, or model nucleic acids.
- Batched, differentiable all-atom structures backed by PyTorch tensors.
- Rosetta-inspired score terms with CPU and CUDA implementations.
- Side-chain packing and design, Cartesian and kinematic minimization, and FastRelax.
- Protein, ligand, RNA, and DNA structure preparation and analysis.
- RoseTTAFold2, OpenFold, Biotite, PDB, and canonical tensor integrations.
- Ahead-of-time compiled wheels plus source and just-in-time build paths.
See the task index to jump from a modeling task to its maintained tutorial, workflow, and API.
git clone https://github.com/uw-ipd/tmol.git
cd tmol
TMOL_DISABLE_WHEEL_FETCH=1 pip install -e ".[dev]"The development guide covers CMake/CUDA builds, tests, benchmarks, containers, CI, and releases.
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.