Skip to content
master
Go to file
Code

Latest commit

  Deleted "garbage" files that got erroneously merged in the past.
fda8a22

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
doc
 
 
 
 
 
 
ipi
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.rst

Temporary announcement

As of July 28, 2020, the master branch of this repository has been substituted by the python3 version that we have written. The latest state of master as written in python2 until July 27, 2020 can be found in the branch legacy/python2.

We have also improved considerably the continuous integration infrastructure to ensure a more stable code in the future.

New bug fixes and implementations will go only into the new master, and i-PI has finally come into the python3 age. If you find any bugs we are happy to hear and will solve them promptly, please post them here!

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 propagates the (path integral) dynamics 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.

Quick Setup and Test

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

$ pip install git+https://github.com/i-pi/i-pi.git

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).

Source the environment settings file env.sh as $ source env.sh or $ . env.sh. 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
$ make
$ 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 with the Python package pytest from the root directory of the i-PI project.

$ pytest -v

Format Compliance

i-PI code should be compliant to a minimal subset of PEP-8 recommendations. Currently, we require the use of black as formatter and flake8 as linter. In most systems, both packages can be easily installed using pip. BEFORE proceeding to a pull request, the minimal requirement is that you run

$ make -f Makefile.style lint
$ make -f Makefile.style pretty

This will ensure the formatting and linting requirement are applied in the whole directory tree. Please resolve any warnings or errors that may appear. Your commit will not pass the CI tests otherwise.

For a more flexible setup, we also provide the script i-pi-style, for which instructions can be obtained by typing

$ i-pi-style -h
You can’t perform that action at this time.