TMol
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.
Install
The shortest path is:
pip install tmol
TMol 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__)"
Quick start
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.
What TMol provides
- 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.
Development
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.
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 terms in LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file tmol-0.1.52.tar.gz.
File metadata
- Download URL: tmol-0.1.52.tar.gz
- Upload date:
- Size: 55.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec55e659baaba28f7329e301b7d95a46cec3f7c0e91d70e4a597a46970364a0b
|
|
| MD5 |
4ee1086a6606d0284f19cefe234e323c
|
|
| BLAKE2b-256 |
1a8deac83dc0774481a792d61eaa9d460ccc0a390537d1a27fc8da9094946365
|