# constant-pH gromacs: Installation error

**URL:** <https://gromacs.bioexcel.eu/t/constant-ph-gromacs-installation-error/11887>\
**Category:** User discussions\
**Tags:** installation-guide, installation, installation-error\
**Created:** [April 8, 2025, 10:00am UTC](https://gromacs.bioexcel.eu/t/constant-ph-gromacs-installation-error/11887 "2025-04-08T10:00:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rube23](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@rube23](https://gromacs.bioexcel.eu/u/rube23)\
**Post date:** [April 8, 2025, 10:00am UTC](https://gromacs.bioexcel.eu/t/constant-ph-gromacs-installation-error/11887/1 "2025-04-08T10:00:33Z")

</div>

GROMACS version: 2021  
GROMACS modification: Yes  
I am trying to install constant-pH fork of gromacs. During installation I am encountering this error.

```auto
[77%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/applied_forces/densityfitting/densityfitting.cpp.o
In file included from /usr/include/c++/12/bits/stl_pair.h:60,
                 from /usr/include/c++/12/bits/stl_algobase.h:64,
                 from /usr/include/c++/12/memory:63,
                 from /home/russellb/extpacks/constantph-main/gromacs-constantph/src/gromacs/applied_forces/densityfitting/densityfitting.h:38,
                 from /home/russellb/extpacks/constantph-main/gromacs-constantph/src/gromacs/applied_forces/densityfitting/densityfitting.cpp:44:
/usr/include/c++/12/type_traits: In instantiation of ‘struct std::is_invocable_r<void, gmx::{anonymous}::DensityFitting::subscribeToPreProcessingNotifications(gmx::MdModulesNotifier*)::<lambda(const gmx::IndexGroupsAndNames&)>&, gmx::IndexGroupsAndNames>’:
/usr/include/c++/12/type_traits:3292:44: required from ‘constexpr const bool std::is_invocable_r_v<void, gmx::{anonymous}::DensityFitting::subscribeToPreProcessingNotifications(gmx::MdModulesNotifier*)::<lambda(const gmx::IndexGroupsAndNames&)>&, gmx::IndexGroupsAndNames>’
/usr/include/c++/12/bits/invoke.h:103:27: required by substitution of ‘template<class _Res, class _Callable, class ... _Args> constexpr std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = void; _Callable = gmx::{anonymous}::DensityFitting::subscribeToPreProcessingNotifications(gmx::MdModulesNotifier*)::<lambda(const gmx::IndexGroupsAndNames&)>&; _Args = {gmx::IndexGroupsAndNames}]’
/usr/include/c++/12/bits/std_function.h:290:30: required from ‘static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = void; _Functor = gmx::{anonymous}::DensityFitting::subscribeToPreProcessingNotifications(gmx::MdModulesNotifier*)::<lambda(const gmx::IndexGroupsAndNames&)>; _ArgTypes = {gmx::IndexGroupsAndNames}]’
/usr/include/c++/12/bits/std_function.h:451:21: required from ‘std::function<_Res(_ArgTypes ...)>::function(_Functor&&) [with _Functor = const gmx::{anonymous}::DensityFitting::subscribeToPreProcessingNotifications(gmx::MdModulesNotifier*)::<lambda(const gmx::IndexGroupsAndNames&)>&; _Constraints = void; _Res = void; _ArgTypes = {gmx::IndexGroupsAndNames}]’
/home/russellb/extpacks/constantph-main/gromacs-constantph/src/gromacs/applied_forces/densityfitting/densityfitting.cpp:257:56: required from here
/usr/include/c++/12/type_traits:3055:53: error: static assertion failed: each argument type must be a complete class or an unbounded array
 3055 | static_assert((std::__is_complete_or_unbounded(
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
 3056 | __type_identity<_ArgTypes>{}) && ...),
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                
/usr/include/c++/12/type_traits:3055:53: note: ‘std:: __is_complete_or_unbounded<__ type_identity<gmx::IndexGroupsAndNames> >((std::__type_identity<gmx::IndexGroupsAndNames>(), std::__type_identity<gmx::IndexGroupsAndNames>()))’ evaluates to false
make[2]: *** [src/gromacs/CMakeFiles/libgromacs.dir/build.make:8693: src/gromacs/CMakeFiles/libgromacs.dir/applied_forces/densityfitting/densityfitting.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:4506: src/gromacs/CMakeFiles/libgromacs.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

```

I repeated twice with fresh `config` and `make`. However the error pops at this particular point. Is there any specific sequence of steps that should be followed to get constant-pH gromacs to be installed? Any insights would be much appreciated.

Many thanks,

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [April 9, 2025, 1:39pm UTC](https://gromacs.bioexcel.eu/t/constant-ph-gromacs-installation-error/11887/2 "2025-04-09T13:39:16Z")

</div>

I had add the following to make it compile. We will push these fixes to the repository.

```auto
diff --git a/gromacs-constantph/src/gromacs/analysisdata/dataframe.h b/gromacs-constantph/src/gromacs/analysisdata/dataframe.h
index c034fd8..5220e86 100644
--- a/gromacs-constantph/src/gromacs/analysisdata/dataframe.h
+++ b/gromacs-constantph/src/gromacs/analysisdata/dataframe.h
@@ -43,6 +43,8 @@
 #ifndef GMX_ANALYSISDATA_DATAFRAME_H
 #define GMX_ANALYSISDATA_DATAFRAME_H
 
+#include <cstdint>
+
 #include <vector>
 
 #include "gromacs/utility/arrayref.h"
diff --git a/gromacs-constantph/src/gromacs/applied_forces/densityfitting/densityfitting.cpp b/gromacs-constantph/src/gromacs/applied_forces/densityfitting/densityfitting.cpp
index 8199038..1fb759f 100644
--- a/gromacs-constantph/src/gromacs/applied_forces/densityfitting/densityfitting.cpp
+++ b/gromacs-constantph/src/gromacs/applied_forces/densityfitting/densityfitting.cpp
@@ -53,6 +53,7 @@
 #include "gromacs/math/coordinatetransformation.h"
 #include "gromacs/math/multidimarray.h"
 #include "gromacs/mdtypes/imdmodule.h"
+#include "gromacs/selection/indexutil.h"
 #include "gromacs/utility/classhelpers.h"
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/keyvaluetreebuilder.h"

```

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [April 9, 2025, 1:42pm UTC](https://gromacs.bioexcel.eu/t/constant-ph-gromacs-installation-error/11887/3 "2025-04-09T13:42:08Z")

</div>

I now pushed the fixes to the repository, so git pull should get them for you.

---

<div class="post-metadata">

**Author:** ![rube23](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@rube23](https://gromacs.bioexcel.eu/u/rube23)\
**Post date:** [April 9, 2025, 4:36pm UTC](https://gromacs.bioexcel.eu/t/constant-ph-gromacs-installation-error/11887/4 "2025-04-09T16:36:42Z")

</div>

Thanks @hess . It compiled now after pulling from the repository. However, `make check` failed with the following message.

```auto
[71%] Building CXX object src/gromacs/mdlib/tests/CMakeFiles/mdlib-test.dir/energyoutput.cpp.o
/home/russellb/extpacks/constantph-main/gromacs-constantph/src/gromacs/mdlib/tests/energyoutput.cpp:646:68: error: too few arguments to function call, expected 11, have 9
                                            time_, nullptr, nullptr);
                                                                   ^
/home/russellb/extpacks/constantph-main/gromacs-constantph/src/gromacs/mdlib/energyoutput.h:223:10: note: 'printStepToEnergyFile' declared here
    void printStepToEnergyFile(ener_file* fp_ene,
         ^
1 error generated.
make[3]: *** [src/gromacs/mdlib/tests/CMakeFiles/mdlib-test.dir/build.make:146: src/gromacs/mdlib/tests/CMakeFiles/mdlib-test.dir/energyoutput.cpp.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:4633: src/gromacs/mdlib/tests/CMakeFiles/mdlib-test.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
[71%] Building CXX object src/gromacs/utility/tests/CMakeFiles/utility-test.dir/bitmask32.cpp.o
[71%] Building CXX object src/gromacs/utility/tests/CMakeFiles/utility-test.dir/bitmask64.cpp.o
[71%] Building CXX object src/gromacs/utility/tests/CMakeFiles/utility-test.dir/bitmask128.cpp.o
[71%] Building CXX object src/gromacs/utility/tests/CMakeFiles/utility-test.dir/cstringutil.cpp.o
[71%] Building CXX object src/gromacs/utility/tests/CMakeFiles/utility-test.dir/defaultinitializationallocator.cpp.o
[72%] Building CXX object src/gromacs/utility/tests/CMakeFiles/utility-test.dir/enumerationhelpers.cpp.o
[72%] Building CXX object src/gromacs/utility/tests/CMakeFiles/utility-test.dir/fixedcapacityvector.cpp.o
[72%] Building CXX object src/gromacs/utility/tests/CMakeFiles/utility-test.dir/inmemoryserializer.cpp.o
[72%] Building CXX object src/gromacs/utility/tests/CMakeFiles/utility-test.dir/keyvaluetreeserializer.cpp.o
[72%] Building CXX object src/gromacs/utility/tests/CMakeFiles/utility-test.dir/keyvaluetreetransform.cpp.o
[72%] Building CXX object src/gromacs/utility/tests/CMakeFiles/utility-test.dir/listoflists.cpp.o
[72%] Building CXX object src/gromacs/utility/tests/CMakeFiles/utility-test.dir/logger.cpp.o
[72%] Building CXX object src/gromacs/utility/tests/CMakeFiles/utility-test.dir/mdmodulenotification-impl.cpp.o
[72%] Building CXX object src/gromacs/utility/tests/CMakeFiles/utility-test.dir/mutex.cpp.o
[72%] Building CXX object src/gromacs/utility/tests/CMakeFiles/utility-test.dir/path.cpp.o
[72%] Building CXX object src/gromacs/utility/tests/CMakeFiles/utility-test.dir/physicalnodecommunicator.cpp.o
[72%] Building CXX object src/gromacs/utility/tests/CMakeFiles/utility-test.dir/range.cpp.o
[72%] Building CXX object src/gromacs/utility/tests/CMakeFiles/utility-test.dir/strconvert.cpp.o
[72%] Building CXX object src/gromacs/utility/tests/CMakeFiles/utility-test.dir/stringutil.cpp.o
[73%] Building CXX object src/gromacs/utility/tests/CMakeFiles/utility-test.dir/template_mp.cpp.o
[73%] Building CXX object src/gromacs/utility/tests/CMakeFiles/utility-test.dir/textreader.cpp.o
[73%] Building CXX object src/gromacs/utility/tests/CMakeFiles/utility-test.dir/textwriter.cpp.o
[73%] Building CXX object src/gromacs/utility/tests/CMakeFiles/utility-test.dir/typetraits.cpp.o
[73%] Building CXX object src/gromacs/utility/tests/CMakeFiles/utility-test.dir/ __/__ /__/testutils/unittest_main.cpp.o
[73%] Linking CXX executable ../../../../bin/utility-test
[73%] Built target utility-test
make[1]: *** [CMakeFiles/Makefile2:3224: CMakeFiles/check.dir/rule] Error 2
make: *** [Makefile:641: check] Error 2

```

Can I ignore this and proceed with `make install`? I am standing by for your inputs. Many thanks in advance.

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [April 10, 2025, 8:23am UTC](https://gromacs.bioexcel.eu/t/constant-ph-gromacs-installation-error/11887/5 "2025-04-10T08:23:38Z")

</div>

These is the building of the tests failing. I managed to fix the compilation, but now the reference data needs to be updated for added constant-pH parameters. I might fix this, but this is not high priority, as we do not plan to continue working on this branch, but rather want to rewrite the code for integration into the main code base.

---

<div class="post-metadata">

**Author:** ![rube23](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@rube23](https://gromacs.bioexcel.eu/u/rube23)\
**Post date:** [April 10, 2025, 4:32pm UTC](https://gromacs.bioexcel.eu/t/constant-ph-gromacs-installation-error/11887/6 "2025-04-10T16:32:04Z")

</div>

Thanks @hess for the update.
