Hello KIM developers,
I guess I now have an open-kim version installed. At least I can run tests like this by simply
$ printf “EAM_CubicNaturalSpline_Ercolessi_Adams_Al__MO_800509458712_000” | ./ex_test_Al_FCCcohesive_MI_OPBC
Moreover I have an installed LAMMPS on my ubuntu virtual machine, and I can do simple tests like
$ lammps-daily < in.lj
Now, I want to call open-kim from LAMMPS by running this command:
$ lammps-daily < in.kim
with the attached in.kim file (it is basically a copy of in.lj but the two lines changed to
pair_style kim KIMvirial Three_Body_Stillinger_Weber_Si__MO_405512056662_003
pair_coeff * * Si
)
Running this command throws the error “ERROR: Unknown pair style kim (…/force.cpp:262)
Last command: pair_style kim KIMvirial Three_Body_Stillinger_Weber_Si__MO_405512056662_003”
Please note that I have already installed this specific model in my Lammps src directory by
$ make lib-kim args="-n -a Three_Body_Stillinger_Weber_Si__MO_405512056662_003"
I appreciate your help how I should fix this error. Thanks!
Regards,
Alireza
Oops! Forgot to attach. Here you go …
in.kim (516 Bytes)
Hi Alireza,
It looks like you need to do the "make yes-kim" comand as part of the lammps build.
http://lammps.sandia.gov/doc/Section_packages.html#kim
So, the lammps sequence for your situation (as I understand it) would be:
make lib-kim args="-p /path/to/installed/kim-api"
make yes-kim
make serial #(or make mpi, etc.)
Ryan
I have done that before. Just to make sure I repeated these three commands, but nothing changed and I still get the same error.
$ make lib-kim args="-p /usr/local/lib/"
make yes-kim
make serial
ERROR: Unknown pair style kim (…/force.cpp:262)
Last command: pair_style kim KIMvirial Three_Body_Stillinger_Weber_Si__MO_405512056662_003
Hi Alireza,
On Fri, May 11, 2018 at 8:32 PM, Khorshidi, Alireza [email protected] wrote:
I have done that before. Just to make sure I repeated these three
commands, but nothing changed and I still get the same error.
$ make lib-kim args="-p /usr/local/lib/"
$ make yes-kim
$ make serial
ERROR: Unknown pair style kim (…/force.cpp:262)
Last command: pair_style kim KIMvirial Three_Body_Stillinger_Weber_
Si__MO_405512056662_003
From the examples given in the LAMMPS docs Ryan mentions, it looks like you
need to use make lib-kim args="-p /usr/local/lib/kim-api"
rather than
just /usr/local/lib.
Dan
Thanks Ryan and Dan for the quick responses! Just replaced the find command with
$ make lib-kim args="-p /usr/local/lib/kim-api-v1/"
but did not work out!
Cheers,
Alireza
Alireza,
The "ERROR: Unknown pair style kim (../force.cpp:262)" error is indicative of the "make yes-kim" step having been missed. You need to get lammps to recognize the "pair_style kim" command before we worry too much about the actual connection to the kim-api library...
Ryan
Thanks Ryan! I cannot see it working unfortunately. I attached the command lines and outputs of the terminal.
Maybe it is a version issue either from open-kim or from lammps side? Has anyone tried this before for kim-api-v1.9.4 and lammps-8Mar18? I am installing it on a guest vagrant-ubuntu-trusty-64 on my host macOS high sierra.
Cheers,
Alireza
terminal.txt (9.39 KB)
Hi Alireza,
Ah, I think I see it now.
You are executing "lammps-daily" which is an old version (20 Apr 2018) that must be on your path somewhere.
To execute the serial version you compiled, you would need to do this:
...
cd \.\./bench/
../src/lmp_serial < in.kim
Cheers,
Ryan
Hi Ryan,
Yes! That was the trick. It works fine that way. Too bad I cannot understand what I am doing!
Thanks a lot Ryan,
Regards,
Alireza