# Use ANI potentials **You will learn:** how to run an NNP/MM simulation using the ANI family of neural-network potentials [^smith2020] [^devereux2020] instead of AceFF. **Prerequisites:** - ACEMD installed with NNP support. - A classically built system (see [Run an NNP/MM simulation](run-an-nnp-mm-simulation.md) for the setup). ANI is one of the earliest publicly available NNP families and is still used as a benchmark. The `torchani` package downloads the weights on first use and caches them; no checkpoint file management is needed — set `nnp.name` to an ANI variant and ACEMD does the rest. ```{warning} ANI models cannot correctly describe molecules with a total charge different from zero. For charged species, use [AceFF](obtain-aceff-models.md) instead. ``` ## Setup ```{code-block} yaml :caption: input.yaml barostat: true thermostat: true thermostattemperature: 300 velocities: 300 structure: structure.prmtop coordinates: structure.pdb boxsize: [22.66, 25.397, 25.982] minimize: 500 timestep: 2 run: 2ns nnp: name: ANI-2x sel: "resname BEN" type: torch ``` Note that **`file` is omitted** — ANI models are auto-downloaded. The only thing that selects between variants is `name`. ## Available ANI variants - `ANI-2x` — most general, recommended starting point. - `ANI-1x` — older variant; H, C, N, O only. - `ANI-1ccx` — coupled-cluster reference data; H, C, N, O only. - `ANI-2xr`, `ANI-2dr`, `snnANI-2xr` — ANI-2x-derived variants with repulsion (`r`) / dispersion+repulsion (`dr`) corrections for a smoother potential-energy surface. These are still bonded-only (non-reactive) models trained on the ANI-2x element set. Unlike `ANI-2x`, they do not benefit from NNPOps acceleration and run on the slower pure-PyTorch path. Model names are case-insensitive and dashes are ignored, so `ANI-2x`, `ani2x`, and `ANI2X` all select the same model. ## Run ```bash acemd ``` The first run downloads the ANI weights; subsequent runs reuse the cached copy. ## Gotchas - **Zero total charge only.** If your `sel` covers atoms whose total charge isn't zero, switch to AceFF. - **`timestep: 2`.** Same stability constraint as AceFF — see [Run an NNP/MM simulation](run-an-nnp-mm-simulation.md). ## See also - [Run an NNP/MM simulation](run-an-nnp-mm-simulation.md) - [NNP options reference](../reference/nnp-options.md) - [NNP and NNP/MM concepts](../explanation/nnp-and-nnp-mm.md) [^smith2020]: J. S. Smith et al., *Sci. Data* **7**, 134 (2020). [doi:10.1038/s41597-020-0473-z](https://doi.org/10.1038/s41597-020-0473-z) [^devereux2020]: C. Devereux et al., *J. Chem. Theory Comput.* **16**(7), 4192–4202 (2020). [doi:10.1021/acs.jctc.0c00121](https://doi.org/10.1021/acs.jctc.0c00121)