Installing KIM with GULP

Dear Prof. Julian,

I was trying to install KIM with GULP. The GULP documentation under “kim_model” says
“Note that the code must have been compiled with the -DKIM option in DEFS.”

I tried to change the “getmachine” and “mkgulp” files by pasting the appropriate directory of my “lib” and “mod” files.


In “getmachine” file I do the changes here:

# If OpenKIM is needed then set -DKIM or -DKIM_F03 and KFLAGS
# Current version of OpenKIM

  •       echo 'DEFS=-DFLUSH -DKIM_F03' >> makefile*
    

# echo “KFLAGS=-I/usr/local/lib/kim-api-v1/include/” >> makefile
# echo “KLIBS=-lkim-api-v1 -lstdc++” >> makefile

  •       echo "KFLAGS=-I/home/abhikeern/Desktop/aditya_KIM/Kuar/lammps-Jul2021/lib/kim/installed-2.2.1/include/" >> makefile*
    
  •       echo "KLIBS=-lkim-api -lstdc++" >> makefile*
    

# Older versions of OpenKIM
# echo ‘DEFS=-DFLUSH -DKIM’ >> makefile
# echo “KFLAGS=-I’${KIM_DIR}/KIM_API’” >> makefile
# echo “KLIBS=-lkim -lstdc++” >> makefile
# If no OpenKIM

  •       echo "KFLAGS=" >> makefile*
    
  •       echo 'KLIBS=' >> makefile*
    

And in “mkgulp” I tried do to change in the following place:

# For current version of OpenKIM use the following
#
#–USER–Start

  • echo ‘KDEFS=-DKIM’ >> makefile*
    # echo “KFLAGS=-I/usr/local/lib/kim-api/mod/” >> makefile
    # echo "KLIBS=-L/usr/local/lib/ -lkim-api " >> makefile
  • echo “KFLAGS=-I/home/abhikeern/Desktop/aditya_KIM/Kuar/lammps-2Jul2021/lib/kim/installed-2.2.1/lib/kim-api/mod/” >> makefile*
  • echo "KLIBS=-L/home/abhikeern/Desktop/aditya_KIM/Kuar/lammps-2Jul2021/lib/kim/installed-2.2.1/lib/ -lkim-api " >> makefile*

#–USER–End


Then I compiled GULP with “./mkgulp -k”. It compiled without any error.
But as soon as I try to use a KIM model after installing the model as in the given example (https://openkim.org/doc/usage/using-models/#GULP)

grad conv
cell
5.26 5.26 5.26 90 90 90
frac
Ar   0.0  0.0  0.0
Ar   0.0  0.5  0.5
Ar   0.5  0.0  0.5
Ar   0.5  0.5  0.0

kim_model
ex_model_Ar_P_LJ

dump every kim1.res

The output I get is

“!! ERROR : error in KIM get neighbor list call” at the last.


Could you please help me as to where I am making a mistake?

Thanks and regards.
Abhikeern

Hi Abhikeern

It’s tricky to know what’s happening without being on your computer. I’ve just tested
the installation on my system and everything worked fine & your input file ran without
any problem.

Here is exactly what I did that worked on a Mac:

  1. Download the latest version of OpenKIM which is 2.2.1 (I’ve checked also with 2.0.2 there were no issues with this version either)
  2. Install as per the quick start guide in the INSTALL file
  3. Get the latest version of GULP 6.0
  4. I compiled with:

./mkgulp -d -k -j 4

I ran with -d just to make sure that any errors were flagged, but it shouldn’t be needed.
Similarly I used -j 4 as I have a quadcore & I was in a hurry.

Then everything worked fine and I got the (partial) output:

OpenKIM model :


Model : name / configurations successfully coupled with

 1 : ex_model_Ar_P_LJ                                                        
   : 1    


  • Output for configuration 1 *

Components of energy :


Interatomic potentials = 0.00000000 eV
OpenKIM potentials = -0.30407481 eV
Monopole - monopole (real) = 0.00000000 eV
Monopole - monopole (recip)= 0.00000000 eV
Monopole - monopole (total)= 0.00000000 eV

Total lattice energy = -0.30407481 eV

Total lattice energy = -29.3386 kJ/(mole unit cells)

Hope that’s some help,

Julian

1 Like

Thank you Prof. Julian for expeditious reply.

As I was trying to get the latest version of Gulp, I was not able to get the email back to my institute mail-id. I even cross-checked with my friend’s mail-id but he has also not been able to recieve back the the mail.(It never happened earlier).
Please if you could look into it.

PS: My institute mail-id is [email protected],in case that is needed.

Thanks and regards.
Abhikeern

I’ve checked and your email is registered with an allowed domain. I did a quick test and the system worked for me & so I don’t know why you wouldn’t receive the download link unless it is being blocked by your institution. Sometimes the server drops out for a while, but it’s certainly working at the moment.

Thank you Prof. Julian for your time and patience.

It might be the server problem Would try to check with my institute regarding the same.

Anyways, I had a Gulp 5.2 tar file with me and after I followed your steps for the fresh installation. KIM + GULP works fine now.

Thanks once again.
With regards
Abhikeern.

Glad that it all has worked now with a clean install.
Regards,
Julian

1 Like