Welcome to the documentation of n2p2!

This repository (obtain source code here) provides ready-to-use software for high-dimensional neural network potentials in computational physics and chemistry. The methodology behind the Behler-Parinello neural network potentials was first described here:

J. Behler and M. Parrinello, Phys. Rev. Lett. 98, 146401 (2007)

This package contains software that will allow you to use existing neural network potential parameterizations to predict energies and forces (with standalone tools but also in conjunction with the MD software LAMMPS). In addition it is possible to train new neural network potentials with the provided training tools.



Unfortunately many parts of the documentation are still unfinished and will be completed little by little. If you have specific questions, consider to ask on GitHub (file an issue) and I will update the corresponding docs as quickly as possible.

This package uses automatic documentation generation via Doxygen, Sphinx and Breathe. An online version of the documentation which is automatically updated with the main repository can be found here.


The online documentation describes the master branch of the n2p2 repository and not the release versions.

API documentation

Most parts of the C++ code are documented in the header files via Doxygen annotations. The information written in the source files is automatically extracted by Doxygen and presented in a separate API documentation page available here.


This repository provides applications for multiple purposes. Depending on your task at hand you may only need individual parts and do not need to compile all components (see components table below). As a new user you may find yourself in one of these three possible scenarios:

Prediction with existing neural network potential

If you have a working neural network potential setup (i.e. a settings file with network and symmetry function parameters, weight files and a scaling file) ready and want to predict energies and forces for a single structure you only need these components:

Molecular dynamics simulation

Similarly, if you have a working neural network potential setup and would like to run an MD simulation with an external MD software (LAMMPS or CabanaMD), these components are required:

Training a new neural network potential

To train a completely new neural network potential the following parts are required:

Additional, though not strictly required tools, are also quite useful:

Rough guidelines for NNP training are provided here.



Minimal working examples for each application can be found in the corresponding subdirectory in examples, e.g. examples/nnp-train.

Training data sets and single configurations (for testing)

Small data sets for testing purposes can be found in examples/configuration-sets and single configurations are provided in configuration-single.

Training data sets (full size)

Actual full size data sets may be rather large and are therefore hosted elsewhere:



H2O 1


Cu2S 2


NNP potentials ready for use

Working pre-trained NNP potentials are located in examples/potentials.


The setup of a neural network potential (network topology, symmetry function parameters,…) is stored in a simple text file with keyword-argument pairs. A list of keywords is provided here.


Morawietz, T.; Singraber, A.; Dellago, C.; Behler, J. How van Der Waals Interactions Determine the Unique Properties of Water. Proc. Natl. Acad. Sci. U. S. A. 2016, 113 (30), 8368–8373. https://doi.org/10.1073/pnas.1602375113


Singraber, A.; Morawietz, T.; Behler, J.; Dellago, C. Parallel Multistream Training of High-Dimensional Neural Network Potentials. J. Chem. Theory Comput. 2019, 15 (5), 3075–3092. https://doi.org/10.1021/acs.jctc.8b01092