KLIFF requires:

  • Python 3.6 or newer.

  • A C++ compiler that supports C++11.


The easiest way to install KLIFF is using a package manager, do either

$ conda intall -c conda-forge kliff


$ pip install kliff

Alternatively, you can install from source:

$ git clone
$ pip install ./kliff


KLIFF is built on top of KIM to fit physics-motivated potentials archived on OpenKIM. To get KLIFF work with OpenKIM potential models, two other packages — kim-api and kimpy — are needed.


kim-api can be installed via conda:

$ conda install -c conda-forge kim-api

Other installation methods are provided at kim-api; refer to the instructions there for more information.


After installation, you can do $ kim-api-collections-management list. If you see a list of directories where the KIM model drivers and models are placed, then you are good to go. Otherwise, you may forget to set up the PATH and bash completions, which can be achieved by (assuming you are using Bash): $ source path/to/the/kim/library/bin/kim-api-activate. See the kim-api documentation for more information.


$ conda-install -c conda-forge kimpy


$ pip install kimpy


For machine learning potentials, KLIFF takes advantage of PyTorch to build neural network models and conduct the training. So if you want to train neural network potentials, PyTorch needs to be installed. Please follow the instructions given on the official PyTorch website to install it.