Problem while running pair style kim

Hi,
I have install kim api by giving following command

$ cd “${HOME}”

$ wget https://s3.openkim.org/kim-api/kim-api-vX.Y.Z.txz # replace X.Y.Z with the current version number

$ tar Jxvf kim-api-vX.Y.Z.txz

$ cd kim-api-vX.Y.Z

$ ./configure

$ make

$ sudo make install

$ sudo ldconfig # on Redhat-like systems you may need to first add /usr/local/lib to /etc/ld.so.conf

$ cp -r ./examples/openkim_tests/utility_forces_numer_deriv “${HOME}/”

$ cd “${HOME}”

$ rm -r kim-api-vX.Y.Z kim-api-vX.Y.Z.txz # replace X.Y.Z with the current version number

$ kim-api-vX-collections-management install system --sudo EDIP_BOP_Bazant_Kaxiras_Si__MO_958932894036_001

$ cd utility_forces_numer_deriv

$ make

$ printf "EDIP_BOP_Bazant_Kaxiras_Si__MO_958932894036_001
$ cd “${HOME}”

also I had installed model MEAM_2NN_Fe_to_Ga__MO_145522277939_001
then I had installed lammps with it by giving following commands
lammps/lib/kim
$ printf “export PATH=${PATH}:${HOME}/local/bin\n” >> ${HOME}/.bashrc
$ source ${HOME}/.bashrc
then
$ cd lammps/src
$ make yes-kim
$ make lmp_mpi

then I was trying to run example file by giving command

narsimha@narsimha-desktop:~/Packages/lammps-31Mar17/examples/kim$ mpirun -np 8 ./lmp_mpi -in in.kim.lj

LAMMPS (31 Mar 2017)
Lattice spacing in x,y,z = 4.43 4.43 4.43
Created orthogonal box = (0 0 0) to (88.6 88.6 88.6)
2 by 2 by 2 MPI processor grid
Created 32000 atoms
ERROR: Unknown pair style kim (…/force.cpp:244)
Last command: pair_style kim KIMvirial MEAM_2NN_Fe_to_Ga__MO_145522277939_001

please help to sort these error
Regards,
Digvijay

Hi Digvijay,

Sorry for the delay in response.

(1) What specific version of the KIM API are you using (the “X”, “Y”, and
“Z” in what you write above)? Version 1.9.5?

(2) The fact that LAMMPS can’t detect ‘kim’ as a valid pair_style means
that something went wrong during the compilation/linking. My best guess
without seeing the make log is that you haven’t specified an existing KIM
API installation for LAMMPS to link to. If this is not done, it will
attempt to download and install the KIM API to /usr/local/lib on its own,
which could be failing because you’re not running make lmp_mpi as root.
Anyway, I think what you want to do is to issue

make yes-kim
make lib-kim args="-p /usr/local/kim-api"

make lmp_mpi

so that LAMMPS will link against the KIM API installation you already
have. This is explained in the LAMMPS docs for the ‘kim’ package (see
http://lammps.sandia.gov/doc/Section_packages.html#kim). Can you try doing
this and attach a log of the output?

Dan

Hi Daniel,
I tried what you mentioned

make yes-kim

make lib-kim args="-p /usr/local/kim-api"

make lmp_mpi
but I am getting error as

narsimha@narsimha-desktop:~/Packages/lammps-31Mar17$ cd src
narsimha@narsimha-desktop:~/Packages/lammps-31Mar17/src$ make yes-kim
Installing package kim
narsimha@narsimha-desktop:~/Packages/lammps-31Mar17/src$ make lib-kim args="-p /usr/local/kim-api"
Makefile:132: recipe for target ‘lib-kim’ failed
make: *** [lib-kim] Error 1

How I can fix it ?
Regards,
Digvijay

Sorry, I had some typos. I meant to write

make yes-kim
make lib-kim args="-p /usr/local/lib/kim-api-v1"

make mpi

Let me know if this works.

Dan

Still getting error

makefile:132: recipe for target ‘lib-kim’ failed
make: *** [lib-kim] Error 1

for second command

Regards,
Digvijay

Is there no additional output printed describing the source of the error?
This doesn't really give me enough information to go off of. I would
suggest performing a clean installation of the KIM API if you haven't tried
that already.

Actually, it looks like MEAM_2NN_Fe_to_Ga__MO_145522277939_001 can't
currently be used with LAMMPS because it only implements a simple form of
neighborlist generation: only the 'MI_OPBC_F' (minimum image periodic
boundary conditions) NBC mode is listed in the KIM descriptor file of the
Model Driver (https://openkim.org/files/MD_111291751625_001/MEAM_2NN.kim.tpl).
Because LAMMPS uses ghost atoms rather than the minimum image convention,
it currently only supports the 'NEIGH_PURE_F', 'NEIGH_PURE_H',
'NEIGH_RVEC_H' and 'NEIGH_RVEC_F' KIM API neighborlist modes. In fact, KIM
API version 2.0 will give rise to a number of simplifications, among them
being that the only neighborlisting method in it will be 'NEIGH_PURE_F'
and, accordingly, this Model will need to have support for this added to
its source code in order to work. If you're motivated to add it yourself,
I can try to help walk you through it. You could also try making a request
to Prof. Byeong-Joo Lee's group yourself to let them know you're interested
in using their KIM Model with LAMMPS. I'll try to see if I can make time
to do it myself but it may be a several weeks before I can get to it.

Dan