CHAP installation error

GROMACS version: 2024.1
GROMACS modification: Yes/No
Here post your question

I am compiling the CHAP program on WSL2 (Ubuntu). It requires gromcs to be installed. I have gromacs installed and available in the terminal. However, when executing make command, I encountered the following error-

In file included from /mnt/d/Simulation/chap-version_0_9_1/src/aggregation/boltzmann_energy_calculator.cpp:25:
/mnt/d/Simulation/chap-version_0_9_1/include/aggregation/boltzmann_energy_calculator.hpp:30:10: fatal error: gromacs/utility/real.h: No such file or directory
30 | #include “gromacs/utility/real.h”
| ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/chap.dir/build.make:76: CMakeFiles/chap.dir/src/aggregation/boltzmann_energy_calculator.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:157: CMakeFiles/chap.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

I can not find the real.h file. how can specify this file to make command.

Thank you

Hi!

This missing header problem can be solved by adding -DGMX_INSTALL_LEGACY_API=ON to GROMACS’s cmake call and then reinstalling GROMACS.

However, it looks like CHAP only supports GROMACS up to 2018: Issue with "Make" command · Issue #34 · channotation/chap · GitHub, so just installing the missing real.h header is apparently not enough.