potfit supports the OpenKIM framework for defining atomic interactions. It is possible to use any OpenKIM model which publishes its parameters. Unfortunately it is currently not possible to check if a model does this on the web interface. potfit provides a small utility called kim_read_model_props which probes a model for supported features.
The potfit build system should be able to pick up the location of the OpenKIM libraries on your system and use them automatically. Just use kim
for the model switch in the configure command:
./waf configure -m kim
The interaction switch is disabled for OpenKIM.
Enabling support for OpenKIM also requires additional settings in the parameter file. The most important one is the model name in “kim_model_name”. This corresponds to the Extended KIM ID from the OpenKIM website, e.g. “EAM_CubicNaturalSpline_AngeloMoody_1995_Ni__MO_800536961967_002”.
To provide some assistance in creating a potential file for an unknown OpenKIM model there is the “kim_model_param” setting. It can be used to get a potential file template. The possible values are:
Using “dump_file” will create a potfit potential for the selected “kim_model_name”. “dump” will output a potfit potential to standard output. And using “use_default” will use the default values for all parameters as provided by the OpenKIM model.
Some OpenKIM models also support writing a new parameter file to a specified location, which can then be used to compile a new OpenKIM model directly. The directory can be specified with the “kim_model_output_directory” and the model name with “kim_model_output_name”. If a model does support this feature can be checked with the kim_read_model_props utiliy.
Here is a short example of the additional OpenKIM parameters in the parameter file:
kim_model_name ex_model_Ar_P_LJ kim_model_params use_default kim_model_output_directory kim_output kim_model_output_name ex_model_Ar_P_LJ_potfit