pair_style kim command
pair_style kim virialmode model printflag
- virialmode = KIMvirial or LAMMPSvirial
- model = name of KIM model (potential)
- printflag = 1/0 do or do not print KIM descriptor file, optional
pair_style kim KIMvirial model_Ar_P_Morse pair_coeff * * Ar Ar pair_style kim KIMvirial model_Ar_P_Morse 1 pair_coeff * * Ar Ar
This pair style is a wrapper on the Knowledge Base for Interatomic Models (OpenKIM) repository of interatomic potentials, so that they can be used by LAMMPS scripts.
Note that in LAMMPS lingo, a KIM model driver is a pair style (e.g. EAM or Tersoff). A KIM model is a pair style for a particular element or alloy and set of parameters, e.g. EAM for Cu with a specific EAM potential file.
See the current list of KIM model drivers.
See the current list of all KIM models
See the list of example KIM models which are included in the KIM library by default, in the “What is in the KIM API source package?” section.
To use this pair style, you must first download and install the KIM API library from the OpenKIM website. The KIM section of Section packages has instructions on how to do this with a simple make command, when building LAMMPS.
See the examples/kim dir for an input script that uses a KIM model (potential) for Lennard-Jones.
The argument virialmode determines how the global virial is calculated. If KIMvirial is specified, the KIM model performs the global virial calculation (if it knows how). If LAMMPSvirial is specified, LAMMPS computes the global virial using its fdotr mechanism.
The argument model is the name of the KIM model for a specific potential as KIM defines it. In principle, LAMMPS can invoke any KIM model. You should get an error or warning message from either LAMMPS or KIM if there is an incompatibility.
The argument printflag is optional. If it is set to a non-zero value then a KIM descriptor file is printed when KIM is invoked. This can be useful for debugging. The default is to not print this file.
Only a single pair_coeff command is used with the kim style which specifies the mapping of LAMMPS atom types to KIM elements. This is done by specifying N additional arguments after the * * in the pair_coeff command, where N is the number of LAMMPS atom types:
- N element names = mapping of KIM elements to atom types
As an example, imagine the KIM model supports Si and C atoms. If your LAMMPS simulation has 4 atom types and you want the 1st 3 to be Si, and the 4th to be C, you would use the following pair_coeff command:
pair_coeff * * Si Si Si C
The 1st 2 arguments must be * * so as to span all LAMMPS atom types. The first three Si arguments map LAMMPS atom types 1,2,3 to Si as defined within KIM. The final C argument maps LAMMPS atom type 4 to C as defined within KIM. If a mapping value is specified as NULL, the mapping is not performed. This can only be used when a kim potential is used as part of the hybrid pair style. The NULL values are placeholders for atom types that will be used with other potentials.
In addition to the usual LAMMPS error messages, the KIM library itself may generate errors, which should be printed to the screen. In this case it is also useful to check the kim.log file for additional error information. This file kim.log should be generated in the same directory where LAMMPS is running.
To download, build, and install the KIM library on your system, see the lib/kim/README file. Once you have done this and built LAMMPS with the KIM package installed you can run the example input scripts in examples/kim.
Mixing, shift, table, tail correction, restart, rRESPA info:
This pair style does not support the pair_modify mix, shift, table, and tail options.
This pair style does not write its information to binary restart files, since KIM stores the potential parameters. Thus, you need to re-specify the pair_style and pair_coeff commands in an input script that reads a restart file.
This pair style can only be used via the pair keyword of the run_style respa command. It does not support the inner, middle, outer keywords.
This pair style is part of the KIM package. It is only enabled if LAMMPS was built with that package. See the Making LAMMPS section for more info.
This current version of pair_style kim is compatible with the kim-api package version 1.6.0 and higher.