Co-author Kieran Didi detailed TMol in a November 18 thread, explaining how the library brings Rosetta-style molecular energy scoring, GPU batching and coordinate gradients into PyTorch. Compatible models can use energy-based feedback on the structures they produce. Looking convincing doesn’t excuse atoms bumping into each other. Source Source Source
The explanation follows a preprint submitted to arXiv on November 16. This isn’t the library’s first appearance: the captured repository page lists version 1.0.0 dated November 11. Source Source
An energy score that can feed back
A molecular structure can look plausible while containing clashes, strained bonds or poorly arranged interactions, Didi writes. TMol addresses two questions: “what does this geometry score, and how does that score change when the atoms move?” Source
Coordinate gradients describe how the energy score changes as atoms move. If a model produces coordinates differentiably, Didi explains, those gradients can flow back through it. The energy can sit inside the model’s computation graph—the connected operations used to calculate outputs and derivatives. Source
The preprint describes TMol as a GPU-native PyTorch implementation of the RosettaGenFF force field. Its ingredients include hydrogen bonding and electrostatics. Didi explicitly says those concepts aren’t new; the change is making them usable through batched tensors, CPU/CUDA kernels and PyTorch’s automatic differentiation. No replacement laws of physics required. Source Source
According to the thread, TMol splits structures into chemical blocks, finds neighboring block pairs and evaluates their interactions in parallel. Project materials describe batched calculations on CPU or CUDA, with the repository listing support for proteins, nucleic acids, ligands and complexes. Source Source Source
What to know before trying TMol
TMol isn’t a bit-for-bit reproduction of Rosetta’s results. Didi says its absolute scores differ because of implementation changes, including smoother interpolation and the removal of double-counted terms. Source
The preprint abstract also reports that using TMol as a reward in generative protein design increases hydrogen bonds and water bridges at designed interfaces. The abstract doesn’t report whether those changes improve binding in lab experiments. Source
For developers who want to try it, the repository’s installation instructions list Python 3.12+ and PyTorch 2.11+ for TMol 1.0. The CPU command is python -m pip install tmol; CUDA options are python -m pip install "tmol[cu12]" and python -m pip install "tmol[cu13]". GPU use also requires matching CUDA-enabled PyTorch and a compatible NVIDIA driver. Pip installs the packages; it doesn’t play CUDA matchmaker. Source
Comments