Installation#

KLIFF can be installed via package managers (conda or pip) or from source.

Installing KLIFF#

This recommended way to install KLIFF is via conda. You can install it by:

$ conda create --name kliff_env
$ conda activate kliff_env
$ conda install -c conda-forge kliff

Alternatively, you can install using pip:

$ pip install kliff

or from source:

$ git clone https://github.com/openkim/kliff
$ pip install ./kliff

Other dependencies#

KIM API and kimpy#

KLIFF requires kim-api and kimpy to be installed. If you install KLIFF via conda as described above, these two packages are installed automatically, and you are good to go. Otherwise, you will need to install kim-api and kimpy before installing KLIFF. Of course, you can first install them using conda $ conda install -c conda-forge kim-api kimpy and then install KLIFF using pip or from source. Alternatively, you can install them from source as well, and see their documentation for more information.

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.

KIM Models#

If you are interested in training physics-based models that are avaialbe from OpenKIM, you will need to install the KIM models that you want to use. After kim-api is installed, you can do $ kim-api-collections-management list to see the list of installed KIM models. You can also install the models you want by $ kim-api-collections-management install <model-name>. See the kim-api documentation for more information.

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.