TorchMD

A molecular-dynamics engine written in PyTorch, for coupling simulation with machine learning.

Tool 034 of 100 in the MolForge directory of open-source tools. Every fact below was read from the repository's host on 2026-11-28.

TorchMD, open-source tool for classical molecular dynamics: A molecular-dynamics engine written in PyTorch, for coupling simulation with machine learning.

What TorchMD is

TorchMD is a molecular dynamics engine written entirely in PyTorch, the deep-learning framework. Every quantity, from bonded energies to the Langevin integrator, is a tensor operation. This makes the simulation differentiable: gradients of a trajectory or an energy with respect to force-field parameters can be computed by automatic differentiation, so parameters can be fitted by the same optimisation used to train neural networks. It is a research tool for coupling simulation and machine learning rather than a production code.

A simulation is configured in a YAML file or Python code. Topologies and parameters come from AMBER prmtop or CHARMM psf files read through moleculekit and parmed, and the classical terms (bonds, angles, dihedrals, Lennard-Jones, electrostatics) are evaluated in PyTorch. External forces can be added, which is how neural network potentials from torchmd-net are plugged in, either alone or on top of a classical prior. Trajectories are written in XTC or NumPy format. Sister projects torchmd-net, torchmd-cg and torchmd-protein-thermodynamics cover model training and coarse-grained protein studies.

TorchMD is not meant for long all-atom simulations of large systems; OpenMM or GROMACS remain the engines for that.

Features

What it is for

Verified facts

FamilyClassical molecular dynamics
Language or basisDifferentiable
Repositoryhttps://github.com/torchmd/torchmd (GitHub)
LicenceMIT (SPDX identifier as declared in the repository)
Main language on GitHubPython
Last commit2026-04-21
Latest releasev1.1.2 (2026-01-07)
Stars724 on 2026-11-28
Open issues and pull requests10 on 2026-11-28
Repository created2020-02-12
Verified2026-11-28 by MolForge's checking script, against the host's API

Where TorchMD fits

Force-field simulation engines for biomolecules, materials and soft matter. AMBER is commercial (AmberTools is free) and NAMD is free under its own licence.

Our comments on TorchMD

MolForge does not run TorchMD in production. This page is a verified pointer, not a review: the facts above come from the repository on the date shown, the description is ours, and we make no claim about accuracy or speed that we have not measured. If you maintain TorchMD and something here is wrong or out of date, write to hello@molforge.ai and we will correct the source file.

Test status

Not tested by MolForge. To check TorchMD yourself: clone the repository, follow the installation section of its README, and run the test suite the project ships before trusting a result; the last-commit date and the open issue count above tell you how alive the project is.

Questions people ask

How is TorchMD different from OpenMM?
OpenMM is a mature engine with compiled kernels, many integrators and broad file support. TorchMD is a compact engine in pure PyTorch whose point is differentiability and tight coupling with neural networks. Researchers use TorchMD to develop and train models, and often move finished potentials into OpenMM through OpenMM-Torch for production runs.
What is torchmd-net and how does it relate to TorchMD?
torchmd-net is a separate package from the same group for training neural network potentials such as TorchMD-Net equivariant transformer and tensor-network models. TorchMD is the dynamics engine that can call those trained models as external forces. The two are installed independently and are frequently used together.
What input does TorchMD need?
A topology with parameters in AMBER prmtop or CHARMM psf format, a coordinate file, and a YAML or Python configuration giving temperature, time step, number of steps, cut-offs and output settings. Coarse-grained systems can be set up directly from the bead definitions and a trained potential.
Is TorchMD open source?
Yes. The repository declares the MIT licence (SPDX identifier read from the host on 2026-11-28). Read the licence text in the repository before redistributing or embedding it.
Where is the TorchMD source code?
At https://github.com/torchmd/torchmd (GitHub). This is the address the host reported on the day of verification; renamed repositories are followed to their new home.
Is TorchMD still maintained?
The last commit was pushed on 2026-04-21 and the latest tagged release is v1.1.2 from 2026-01-07; the repository had 10 open issues and pull requests on 2026-11-28.
Does MolForge use TorchMD?
No. MolForge runs nine of the hundred tools in this directory (RDKit, OpenMM, AutoDock Vina, Open Babel, MDTraj, pymbar and NGL, plus PySCF and xTB in MFsig); TorchMD is listed because of its place in classical molecular dynamics, not because we run it.

Guides that explain the methods

Other tools in classical molecular dynamics