Updated lib/kim/README file to go along with new install.py
This commit is contained in:
@ -11,66 +11,64 @@ kim command.
|
||||
To download, build, and install the KIM API on your system, follow
|
||||
these steps. You can use the install.py script to automate these steps.
|
||||
|
||||
**Note** The process described below will compile the kim-api using absolute
|
||||
paths names. This means that if you move your lammps directory to a new
|
||||
location after compilation the kim-api library will not be able to find some of
|
||||
its components. It is best to recompile after moving the lammps directory.
|
||||
-----------------
|
||||
|
||||
The KIM API is available for download from "this site"_https://openkim.org,
|
||||
namely https://openkim.org. The tarball you download is "kim-api-vX.Y.Z.tgz",
|
||||
which can be unpacked in this directory or whereever you wish:
|
||||
Instructions:
|
||||
|
||||
tar xvfz kim*tgz
|
||||
|
||||
Note that if you unpack and build KIM in this directory, when you
|
||||
download a new LAMMPS tarball, the files you have added here will be
|
||||
lost. So you likely want to build it somewhere else.
|
||||
1. Configure lammps for use with the kim-api library installed in this directory
|
||||
|
||||
The kim-api-vX.Y.Z/docs/ directory has further documentation for the
|
||||
KIM API. In order to compile and install the KIM API follow the
|
||||
instructions found in the file kim-api-vX.Y.Z/INSTALL. (Don't forget
|
||||
to download and compile any Model Drivers and Models that you want to
|
||||
use.)
|
||||
$ printf "KIM_INSTALL_DIR=${PWD}\n" > ./Makefile.KIM_DIR
|
||||
$ printf "include ${PWD}/lib/kim-api/Makefile.KIM_Config\n" > ./Makefile.KIM_Config
|
||||
|
||||
Once you have successfully compiled and installed the KIM API, you
|
||||
need to make sure the utility kim-api-build-config is in your PATH so
|
||||
that the LAMMPS build system can properly work with the KIM API.
|
||||
|
||||
The following are example commands that perform these steps:
|
||||
2. Download and unpack the kim-api
|
||||
|
||||
# replace X.Y.Z as appropriate here and below
|
||||
$ wget http://s3.openkim.org/kim-api/kim-api-vX.Y.Z.tgz
|
||||
$ tar zxvf kim-api-vX.Y.Z.tgz
|
||||
|
||||
# get OpenKIM models, setup and compile
|
||||
# configure the kim-api
|
||||
$ cd kim-api-vX.Y.Z
|
||||
$ ./configure --prefix=??????
|
||||
$ ./configure --prefix=${PWD}/../
|
||||
|
||||
# setup the desired kim item
|
||||
$ make add-Pair_Johnson_Fe__MO_857282754307_002
|
||||
|
||||
3. Build and install the kim-api and model
|
||||
|
||||
$ make add-EAM_Dynamo_Angelo_Moody_NiAlH__MO_418978237058_001
|
||||
$ make
|
||||
$ make install
|
||||
|
||||
# replace X with the KIM API major version number
|
||||
$ make install-set-default-to-vX
|
||||
$ cd ../
|
||||
|
||||
# In order to permanently add the kim-api-build-config utility to your
|
||||
# PATH variable, perform the following:
|
||||
#
|
||||
# For the bash shell:
|
||||
$ printf "export PATH=${PATH}:${HOME}/local/bin\n" >> ${HOME}/.bashrc
|
||||
$ source ${HOME}/.bashrc
|
||||
#
|
||||
# For the csh shell:
|
||||
% printf "setenv PATH ${PATH}:${HOME}/local/bin\b" >> ${HOME}/.cshrc
|
||||
% source ${HOME}/.cshrc
|
||||
4. Remove source and build files
|
||||
|
||||
$ rm -rf kim-api-vX.Y.Z
|
||||
$ rm -rf kim-api-vX.Y.Z.tgz
|
||||
|
||||
5. To add additional items do the following (replace the kim item name with your
|
||||
desired value)
|
||||
|
||||
$ wget https://openkim.org/download/EAM_Johnson_NearestNeighbor_Cu__MO_887933271505_001.tgz
|
||||
$ tar zxvf EAM_Johnson_NearestNeighbor_Cu__MO_887933271505_001.tgz
|
||||
$ cd EAM_Johnson_NearestNeighbor_Cu__MO_887933271505_001
|
||||
$ make
|
||||
$ make install
|
||||
$ cd ..
|
||||
$ rm -rf EAM_Johnson_NearestNeighbor_Cu__MO_887933271505_001
|
||||
$ rm -rf EAM_Johnson_NearestNeighbor_Cu__MO_887933271505_001.tgz
|
||||
|
||||
-----------------
|
||||
|
||||
When these steps are complete you can build LAMMPS with the KIM
|
||||
package installed:
|
||||
|
||||
$ cd lammps/src
|
||||
$ cd ../../src
|
||||
$ make yes-kim
|
||||
$ make g++ (or whatever target you wish)
|
||||
|
||||
Note that the Makefile.lammps file in this directory is required
|
||||
to allow the LAMMPS build to find the necessary KIM files. You
|
||||
should not normally need to edit this file.
|
||||
Note that the Makefile.lammps and Makefile.KIM_DIR files in this directory
|
||||
are required to allow the LAMMPS build to find the necessary KIM files.
|
||||
You should not normally need to edit this file.
|
||||
|
||||
Reference in New Issue
Block a user