Installation#
KLIFF requires:
Python 3.6 or newer.
A C++ compiler that supports C++11.
KLIFF#
The easiest way to install KLIFF is using a package manager, do either
$ conda intall -c conda-forge kliff
or
$ pip install kliff
Alternatively, you can install from source:
$ git clone https://github.com/openkim/kliff
$ pip install ./kliff
Other dependencies#
KIM Models#
KLIFF is built on top of KIM to fit physics-motivated potentials archived on OpenKIM. To get KLIFF work with OpenKIM models, kim-api and kimpy, and openkim-models are needed.
The easiest way to install them is via conda:
$ conda install -c conda-forge kim-api kimpy openkim-models
Note
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.
Warning
The conda approach should work for most systems, but not all (e.g. Mac with Apple Chip). Refer to https://openkim.org/doc/usage/obtaining-models for other installing instructions (e.g. from source).
PyTorch#
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.