GROMACS version:2026
GROMACS modification: CP2k interface
Good evening,
I am attempting to compile CP2K 2026.1 on an HPC cluster. While I am familiar with compiling older versions of the code, the newer versions now require CMake. I managed to compile CP2K 2026.1 using the ./make_cp2k.sh script.
Nevertheless, I have not been able to replicate the behavior of the old make -j 128 ARCH=local VERSION=“psmp” libcp2k command, which was necessary for the GROMACS/CP2K interface. Moreover, the libcp2k.a file is not produced by the current CP2K compilation—only libcp2k.so is generated.
Maybe the guide on how to compile the GROMACS/CP2K interface might be updated?
Hi, have you been able to build GROMACS with CP2K in that case?
I checked, it actually works completely fine for GROMACS, you should just change CP2K_DIR in GROMACS CMake command to: -DCP2K_DIR=”<your CP2K installation directory>/lib"
P.S. will update installation instructions for CP2K>=2026.1
Actually, since you are using make_cp2k.sh, which builds CP2K using spack. Then I suggest you to try installing everything with spack install gromacs+cp2k it should build the whole toolchain for the latest GROMACS and CP2K versions
Thanks for the kind reply. I actually attempted to compile GROMACS, but it didn’t work; the build process complained that it couldn’t find libcp2k.h.
Could you please share your compilation procedure for both CP2K and GROMACS so that I can try to replicate it? I’m especially interested in how you compiled CP2K (using the toolchain or make_cp2k.sh) and your cmake flags for GROMACS. I will try the suggestion to use -DCP2K_DIR=“/lib”.
After toolchain script, you compiled CP2K with cmake (as suggested by cp2k website)?
In case I’ll try a “custom” version to fit my setup of already installed packages