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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tmol-0.1.51.tar.gz (55.8 MB view details)

Uploaded Source

File details

Details for the file tmol-0.1.51.tar.gz.

File metadata

  • Download URL: tmol-0.1.51.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

Hashes for tmol-0.1.51.tar.gz
Algorithm Hash digest
SHA256 136ee6440614a996648a8530d10f920f2dca93d095808d063f9c22126ae63b81
MD5 497c845fcc8915b337a0259e200fcb60
BLAKE2b-256 e6cd074c68f2b424f3e06e4d42ff98ec6987974bb73ab2f82edcdfdc4ef0438c

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.54

1 file

0.1.53

1 file

0.1.52

1 file

This release

0.1.51 This release

1 file

0.1.50

1 file

0.1.49

1 file

0.1.48

1 file

0.1.47

1 file

0.1.46

1 file

0.1.45

1 file

0.1.42

1 file

0.1.40

1 file

0.1.36

1 file

0.1.35

1 file

0.1.34

1 file

0.1.33

1 file

0.1.30

1 file

0.1.29

1 file

0.1.22

1 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