In order to use KIM Portable Models (PMs), which may depend on Model Drivers (MDs), or Simulator Models (SMs) on your system, you must install the KIM application programming interface (API) along with the specific models that you are interested in using. There are two options for doing so:
The easiest option for obtaining the KIM API and KIM models is to install the
openkim-models pre-compiled binary package for your preferred operating system or package manager. When you install the
openkim-models package, the package manager will automatically install the KIM API shared library as a required dependency.
The table to the right lists the systems for which pre-compiled binaries are available. For each system, the currently available version (release date) of the
openkim-models package is listed. Green indicates the most current version available, whereas red indicates an older version. Binary packages are released on a regular basis, however if the model you require is not contained in the current version, you can install a model from source as explained below.
The commands necessary to install from binary on the various supported systems are:
$ sudo yum install openkim-models
Thanks to Christoph Junghans (LANL) for helping make Fedora binaries available.
$ brew install openkim-models
Thanks to Ryan Elliott (UMN) for helping to make macOS Homebrew binaries available.
On openSUSE, in order to have access to the
kim-api-collections-management (and other utilities), you must also explicitly install the
$ sudo zypper install kim-api openkim-models
Thanks to Christoph Junghans (LANL) for helping make openSUSE binaries available.
$ sudo add-apt-repository ppa:openkim/latest $ sudo apt-get update
On Ubuntu, in order to have access to the
kim-api-collections-management (and other utilities), you must explicitly install the
$ sudo apt-get install libkim-api-dev openkim-models
Thanks to Anton Gladky (gladky.anton at gmail.com) for helping to make Ubuntu binaries available.
$ sudo pkg install openkim-models
Thanks to email@example.com for helping make FreeBSD ports available.
On Conda-Forge, there are three packages available
openkim-models. The Python bindings to the kim-api is called
kimpy and depends on
kim-api will be installed along with
$ conda install kimpy openkim-models
Thanks to Jan Janssen (Max-Planck-Institut für Eisenforschung) for helping to make conda-forge packages available.
Spack is a package manager for supercomputers, Linux, and macOS. The below commands will get you started, but see the docs for more.
$ git clone https://github.com/spack/spack.git $ ./spack/bin/spack bootstrap $ source spack/share/spack/setup-env.sh $ spack install openkim-models $ spack activate openkim-models $ spack load kim-api
Thanks to Christoph Junghans (LANL) and Ryan Elliott (UMN) for helping make Spack support available.
If binaries are not available for your system or you wish maximum control over the installation process, you can download the source code for the KIM API and any desired PMs/MDs/SMs, compile, and install them. This will require you to have the necessary compilers and build tools available on your system. Typically, this includes the GNU C, C++, and Fortran compilers (
gfortran), as well as CMake version 3.4 or newer (
xxd (which is part of the
vim-common package depending on the system),
tar, and various standard utilities from the
NOTE: If you already have the
openkim-models package installed and are only interested in installing a version of a model not available in the current binary release, then you can skip the next step of building and installing the KIM API (since the
kim-api package is already installed as a dependency of
openkim-models) and you can proceed to installing KIM models from source.
The KIM API currently supports Unix/Linux and macOS systems. (Support for MS Windows is under development, but is not available yet.) Installation from source involves downloading the
kim-api package, unpacking it, and following instructions to compile and install the code. The process requires a Unix/Linux or macOS system with CMake and compilers and standard utilities as noted above.
To install the KIM API do the following:
Unpack the archive.
On Unix/Linux and macOS systems, type:
$ tar Jxvf kim-api-2.1.3.txz
which will expand the archive into the directory
Read the README.md file in the new directory.
Read the NEWS file to see what is new in the current release.
Install the package. (For complete instructions see INSTALL file.)
Quick start: try the following
$ cd kim-api-2.1.3 $ mkdir build $ cd build $ cmake .. -DCMAKE_BUILD_TYPE=Release $ make $ sudo make install $ sudo ldconfig
(Make sure you know what you are doing when using
sudo. Here, it should be safe.)
The KIM API supports four "collections" of PMs, MDs, and SMs. These are the "system-collection", the "user-collection", the "environment-variable-collection", and the "CWD-collection". This provides the user with a great deal of flexibility on where models will be installed on their machine. See the INSTALL file in the kim-api package root directory for more information on collections. The pre-compiled
openkim-models package installs items in the system collection. To avoid any possible clashes between the operating system's package manager and the items installed from source, it is suggested that the latter be installed to the user collection.
The KIM API comes with the
kim-api-collections-management utility (available from version 1.9.0 on) to install and manage KIM Items. Dependencies on MDs are automatically handled. For example, to install the Stillinger-Weber potential for silicon in the system collection do:
$ kim-api-collections-management install user SW_StillingerWeber_1985_Si__MO_405512056662_005
Note that this model requires a MD (SW__MD_335816936951_004), which will be automatically downloaded and installed.
To see the list of the PMs, MDs, and SMs installed on the system do:
$ kim-api-collections-management list
kim-api-collections-management with no arguments, for a full list of supported options.