Skip to main content

TMol

Rosetta molecular modeling at PyTorch speed.

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

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:

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.

Metadata

Release files for tmol 0.1.55

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 0.1.55
File Size Uploaded
tmol-0.1.55.tar.gz 56.0 MB Details

Release files / tmol-0.1.55.tar.gz

Download URL tmol-0.1.55.tar.gz
Size 56.0 MB
Tags Source
SHA-256 checksum
How to use checksums
05f33390a1e714f30d04e2b816b1baf0fd4d705671acbb7f8c2af07538cc9756
BLAKE2b-256 checksum
How to use checksums
1070583ff458614ca8da4047b1689171a3869af1e0b86d40cfd7b4e1ec6a867b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release history Release notifications | RSS feed

0.1.59

1 release file

This release

0.1.55 This release

1 release file

0.1.54

1 release file

0.1.53

1 release file

0.1.52

1 release file

0.1.51

1 release file

0.1.50

1 release file

0.1.49

1 release file

0.1.48

1 release file

0.1.47

1 release file

0.1.46

1 release file

0.1.45

1 release file

0.1.42

1 release file

0.1.40

1 release file

0.1.36

1 release file

0.1.35

1 release file

0.1.34

1 release file

0.1.33

1 release file

0.1.30

1 release file

0.1.29

1 release file

0.1.22

1 release file

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