Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

i-PI: a Universal Force Engine

A Python interface for ab initio path integral molecular dynamics simulations. i-PI is composed of a Python server (i-pi itself, that does not need to be compiled but only requires a relatively recent version of Python and Numpy) that apply an algorithm that updates the positions of the nuclei, and of an external code that acts as a client and computes the electronic energy and forces.

This is typically a patched version of an electronic structure code, but a simple self-contained Fortran driver that implements Lennard-Jones and Silvera-Goldman potentials is included for test purposes.

i-PI was originally developed to simulate the quantum mechanical nature of light nuclei by performing path integral molecular dynamics simulations, and it implements most of the state-of-the-art methods to accelerate this kind of calculations. It has since grown to also provide all sorts of simulation strategies, from replica exchange to geometry optimization.

Quick Setup and Test

To use i-PI with already existing drivers, install and update using Pip:

Last version::

python -m pip install git+

Last Release::

pip install -U i-PI

Test with Pytest::

pip install pytest
pytest --pyargs ipi.tests

Full installation

To develop i-PI or test it with the self-contained driver, follow these instructions. It is assumed that i-PI will be run from a Linux environment, with a recent version of Python, Numpy and gfortran, and that the terminal is initially in the i-pi package directory (the directory containing this file), which you can obtain by cloning the repository

git clone

Source the environment settings file as source or . It is useful to put this in your .bashrc or other settings file if you always want to have i-PI available.

Compile the driver code

cd drivers/f90
cd ../..

Run one of the examples

This will first start the wrapper in the background, redirecting the output to a log file, and then run a couple of instances of the driver code. The progress of the wrapper is followed by monitoring the log file with the tail Linux command.

Optionally, you can make a copy of the directory with the example somewhere else if you want to keep the i-PI directory clean.

cd examples/tutorial/tutorial-1/
i-pi tutorial-1.xml > log &
i-pi-driver -h localhost -p 31415 -m sg -o 15 &
i-pi-driver -h localhost -p 31415 -m sg -o 15 &
tail -f log

The monitoring can be interrupted with CTRL+C when the run has finished (5000 steps).

Run the automatic test suite

The automatic test suite can be run by calling the i-pi-test script. You need to have the pytest package installed


See more details in the README file inside the ipi_tests folder.


If you have new features you want to implement into i-PI, your contributions are much welcome. See for a brief set of style guidelines and best practices. Before embarking into a substantial project, it might be good to get in touch with the developers, e.g. by opening a wishlist issue.