TorchANI

The PyTorch implementation of the ANI potentials for organic molecules.

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

TorchANI, open-source tool for machine-learned interatomic potentials: The PyTorch implementation of the ANI potentials for organic molecules.

What TorchANI is

TorchANI is the PyTorch implementation of the ANI family of neural-network potentials for organic molecules. Each atom is described by an atomic environment vector, a fixed set of radial and angular functions of its neighbours, which feeds an element-specific network; the atomic energies are summed. Pre-trained models are supplied: ANI-1x and ANI-2x trained on density functional theory, and ANI-1ccx trained on coupled-cluster quality energies. ANI-2x covers hydrogen, carbon, nitrogen, oxygen, fluorine, sulfur and chlorine.

The library takes tensors of element indices and coordinates and returns energies, with forces by automatic differentiation; periodic cells are supported. An ASE calculator wraps any model for optimisation and dynamics, and the OpenMM-ML project uses TorchANI to run ANI inside OpenMM, including mixed schemes where a ligand is treated with ANI and the rest with a classical force field. Training utilities load the public ANI data sets and allow new models to be trained on custom data.

The pre-trained models are built for neutral, closed-shell organic molecules in their covered elements; charged species, radicals, metals and most inorganic systems fall outside their scope.

Features

What it is for

Verified facts

FamilyMachine-learned interatomic potentials
Language or basisANI networks
Repositoryhttps://github.com/aiqm/torchani (GitHub)
LicenceMIT (SPDX identifier as declared in the repository)
Main language on GitHubPython
Last commit2026-11-27
Latest release2.15.1 (2026-11-27)
Stars568 on 2026-11-28
Open issues and pull requests1 on 2026-11-28
Repository created2018-04-02
Verified2026-11-28 by MolForge's checking script, against the host's API

Where TorchANI fits

Learn quantum-accurate potentials that run at near-classical cost, from quantum-chemistry data.

Our comments on TorchANI

MolForge does not run TorchANI 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 TorchANI 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 TorchANI 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

Which elements do the ANI models cover?
ANI-1x and ANI-1ccx handle hydrogen, carbon, nitrogen and oxygen. ANI-2x adds fluorine, sulfur and chlorine. A molecule containing any other element cannot be evaluated by these models, and the library raises an error rather than guessing. Metals, phosphorus, bromine and iodine are outside all current pre-trained models.
Can TorchANI handle charged molecules or radicals?
Not reliably. The pre-trained models were trained on neutral, closed-shell molecules and take no total charge or spin as input, so an anion and its neutral parent produce the same prediction. For ionic species, a quantum-chemistry method or a model trained with charge information is needed.
Does TorchANI support periodic boundary conditions?
Yes. The model accepts a cell and periodicity flags and builds neighbour lists accordingly, so molecular liquids or crystals of covered elements can be simulated. The pre-trained models were trained on isolated molecules, however, so condensed-phase results should be checked against reference calculations.
How is TorchANI different from a semi-empirical method like GFN2-xTB?
GFN2-xTB is a parametrised quantum method that solves for electrons and covers most of the periodic table, including charged systems. TorchANI is a learned regression from geometry to energy, restricted to its training elements and neutral molecules. It needs no self-consistent iterations, which suits large numbers of conformer evaluations.
Is TorchANI 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 TorchANI source code?
At https://github.com/aiqm/torchani (GitHub). This is the address the host reported on the day of verification; renamed repositories are followed to their new home.
Is TorchANI still maintained?
The last commit was pushed on 2026-11-27 and the latest tagged release is 2.15.1 from 2026-11-27; the repository had 1 open issues and pull requests on 2026-11-28.
Does MolForge use TorchANI?
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); TorchANI is listed because of its place in machine-learned interatomic potentials, not because we run it.

Guides that explain the methods

Other tools in machine-learned interatomic potentials