ERROR: Unknown pair style kim

389 views
Skip to first unread message

Alireza Khorshidi

unread,
May 11, 2018, 10:49:25 PM5/11/18
to openkim
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

Alireza Khorshidi

unread,
May 11, 2018, 10:51:09 PM5/11/18
to openkim
Oops! Forgot to attach. Here you go ...
in.kim

Ryan S. Elliott

unread,
May 11, 2018, 10:58:23 PM5/11/18
to openkim
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
--
Ryan S. Elliott, Ph.D. and Associate Professor
Aerospace Engineering & Mechanics, University of Minnesota
(612) 624-2376 (626-1558 fax)
http://www.aem.umn.edu/~relliott/
download vCard <http://www.aem.umn.edu/~relliott/relliott.vcf>
----------
If you think you can do a thing or think you can't do a thing, you're
right.

Henry Ford
----------

Khorshidi, Alireza

unread,
May 11, 2018, 11:32:53 PM5/11/18
to ope...@googlegroups.com
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




--

--- You received this message because you are subscribed to the Google Groups "openkim" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openkim+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daniel Karls

unread,
May 11, 2018, 11:38:15 PM5/11/18
to ope...@googlegroups.com
Hi Alireza,

On Fri, May 11, 2018 at 8:32 PM, Khorshidi, Alireza <alireza_...@alumni.brown.edu> 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
--
______________________________________

Daniel S. Karls, Postdoctoral Associate

Aerospace Engineering & Mechanics
University of Minnesota
107 Akerman Hall, 110 Union St SE
Minneapolis, MN 55455
______________________________________

Khorshidi, Alireza

unread,
May 11, 2018, 11:52:17 PM5/11/18
to ope...@googlegroups.com
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

On Fri, May 11, 2018 at 11:37 PM, Daniel Karls <karl...@umn.edu> wrote:
Hi Alireza,

--

Ryan S. Elliott

unread,
May 12, 2018, 12:04:38 PM5/12/18
to ope...@googlegroups.com
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

Alireza Khorshidi

unread,
May 12, 2018, 2:20:43 PM5/12/18
to openkim
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

Ryan S. Elliott

unread,
May 12, 2018, 2:43:38 PM5/12/18
to openkim
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
--
Ryan S. Elliott, Ph.D. and Associate Professor
Aerospace Engineering & Mechanics, University of Minnesota
(612) 624-2376 (626-1558 fax)
http://www.aem.umn.edu/~relliott/
download vCard <http://www.aem.umn.edu/~relliott/relliott.vcf>
----------
The stock market goes nuts over any company that so much as mentions the
word Internet. All this proves to me is that the boneheads on Wall
Street are as dumb as they were in college when they had to switch their
majors to business to keep from flunking out.

John Dvorak
----------

Khorshidi, Alireza

unread,
May 13, 2018, 12:18:25 AM5/13/18
to ope...@googlegroups.com
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

Reply all
Reply to author
Forward
0 new messages