Hello, all
I encountered the following problem when using the EDIP potential,
I first successfully installed the EDIP model driver and portable model,
but I also encountered this problem when running lammps scripts.
I have tried various methods, but still can’t solve it. Please help me.
Hello,
How have you installed the kim-api? How have you built LAMMPS?
It is relatively easy to end up with two separate kim-api installations. I suspect your “system level” kim-api installation has EDIP installed, but the installation LAMMPS is using does not. If that is the case, then you either need to install EDIP in the LAMMPS kim-api installation or you need to rebuild LAMMPS so it uses your system level kim-api installation.
Ryan
1 Like
Hi, Ryan.
I will attach my installation process, please check if there are any mistakes.
- lammps installation
#Download lammps-stable.tar.gz
wget https://lammps.sandia.gov/tars/lammps-stable.tar.gz
lammps-23June2022 is decompressed
tar -xvf lammps-stable.tar.gz
Open folder
cd lammps-23Jun2022
#Create a new build folder
mkdir build
Go to folder
cd build
cmake … /cmake
make
sudo make install
Returns to the previous directory
cd …
The lammps has been installed
- KIM installs
#Install libcurl
sudo apt-get install libcurl4-openssl-dev
Install openkim
sudo add-apt-repository ppa:openkim/latest
Update
sudo apt-get update
#install the libkim-api-dev package
sudo apt-get install libkim-api-dev openkim-models
#enable KIM package
#Go to the /lammps/build path
#enable KIM package
cmake -C … /cmake/presets/basic. cmake -D PKG_KIM=on … /cmake
sudo make install
#Test
Go to examples/kim
cd examples/kim/
Test
mpirun -n 2 lmp < in.kim-sm.melt
That’s all. Please point out any mistakes.
Hi, Let’s try to ensure that it is finding the system level kim-api and not downloading it’s own. Instead of
Let’s try
cmake -C … /cmake/presets/basic. cmake -D PKG_KIM=on -D DOWNLOAD_KIM=no … /cmake
This might lead to an error saying lammps cannot find the kim-api; but that would be progress.
Hi, Ryan.
I found that some kim scripts ran smoothly when I was running them, and when I looked at the potential function I was using, I found that the potential function was included in the relevant models,
However, for some scripts, the display failed to find the model.
When I downloaded the corresponding model using,
kim-api-collections-management install user
the display interface was successful, but it still failed to find the model when re-run.
By the way, I ran the command on your advice,
cmake -C … /cmake/presets/basic.cmake -D PKG_KIM=on -D DOWNLOAD_KIM=no … /cmake
The error is:
I don’t know what this mistake means, and please help me.
YM Li
Hi, Ryan.
I seem to have noticed the problem by looking at the model list using the kim-api-collections-management list.
I noticed that my newly installed model was in the user collection, not in the collection in the current working directory,
May I ask if this is the reason why I cannot find the model when running the lammps script?
As the error message indicates, you have not installed the pkg-config
package which is required for cmake to detect the location of your kim-api installation.
This is OK, you want it in the User collection not the Current Working Directory Collection.
Hi, Ryan,
I am very happy to report that I have found the problem. As I said in my last reply, I needed to specify the collection file before running the lammps script.
I found the answer in another post, where I first type two commands before running the lammps script each time:
export LD_LIBRARY_PATH=/lib/x86_64-linux-gnu
export LD_LIBRARY_PATH=~/download/lammps-23Jun2022/build/kim_build-prefix/lib
Then you run the script file, which is a bit of a hassle, but it’s finally ready to run.
Thank you so much for your help, Ryan. If you hadn’t kept replying to me, I would have given up looking for a solution.
YM Li
HI,
I’m glad you found a solution that is working for you. Enjoy
Ryan