kim-api  2.1.4-git+v2.1.3-git-1-g7847914a.GNU
An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).
Table of Contents

The Knowledgebase of Interatomic Models (KIM) Application Programming Interface (API) defines a standard (the Portable Model Interface (PMI)) for how molecular simulators interface with interatomic models (also called potentials or force-fields). This allows a single computer implementation of a Portable Model (PM) to be used (without modification) within multiple simulator codes. A PM can include code and parameters all in one. Or, a PM can include just parameters and use a separate Model Driver (MD) library containing the code. See to find many PM implementations, to learn which simulators support the KIM API/PMI, and to learn how to use KIM PMs with those simulators. The KIM API also defines a standard (the Simulator Model Interface (SMI)) that allows for the creation and curation of Simulator Models (SMs), which are packages containing the metadata necessary to set up and run a model that is implemented as an integrated part of a simulation code (simulator). A KIM SM includes all of the necessary parameter files, simulator input commands, and metadata (supported species, units, etc.) needed to run the model in its native simulator. See to find many SM packages, to learn which simulators support the KIM API/SMI, and to learn how to use KIM SMs with those simulators.

This documentation describes the specifications and official implementation of the KIM API as a system-level software library that gives computer programmers the ability to write PM, SM, and/or Simulators in supported programming language (C, C++, Fortran).

Table of Contents:

  1. Features of the KIM API package
  2. Theory for the Portable Model Interface
  3. Implementation
  4. Example Portable Models (PMs) written in C++ (LennardJones_Ar.cpp), C (ex_model_Ar_P_Morse_07C.c, ex_model_Ar_P_Morse_MultiCutoff.c, ex_model_Ar_P_Morse_07C_w_Extensions.c) and Fortran (ex_model_Ar_P_MLJ_Fortran.f90, ex_model_Ar_SLJ_MultiCutoff.f90)
  5. Example Model Drivers (MDs) written in C++ (LennardJones612Implementation.hpp), C (ex_model_driver_P_Morse.c), and Fortran (ex_model_driver_P_LJ.f90).
  6. Example PMs using MDs (ex_model_Ar_P_LJ.params, ex_model_Ar_P_Morse.params, LennardJones612_UniversalShifted.params)
  7. An Example SM (Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu, with specification file smspec.edn and parameter file
  8. Example Simulators written in C++ (ex_test_Ar_fcc_cluster_cpp.cpp, collections-example.cpp, simulator-model-example.cpp), C (ex_test_Ar_fcc_cluster.c, collections-example-c.cpp, simulator-model-example-c.cpp), and Fortran ( ex_test_Ar_fcc_cluster_fortran.f90, collections-example-fortran.f90, simulator-model-example-fortran.f90).
  9. A utility for checking the consistency between a PM's energy function and its forces function (utility_forces_numer_deriv.f90). This performs a numerical differentiation of the PM's energy, using Ridder's method, and compares the result with the PM's forces.
  10. Summary of Differences Between kim-api-v1 and kim-api-v2
  11. The NEWS file.

In addition, all public header files and included example codes are available for browsing.