Error compiling gromacs 2020.5 patched with Colvar module

Hi, this last question is more dependent on your specific system. I can only clarify that distanceXY is always computed between two points, so if you want to restrain a group near a specific absolute position, you can make one of the two groups a dummyAtom. For GROMACS specifically, you would need to use the coordinates (Lx/2, Ly/2, Lz/2) to express the center of the box.

If you have further questions about Colvars that aren’t specific to GROMACS, those may go beyond this specific forum category. We’ll discuss between developers of both codes what would be the best place for this type of question.

To summarize this conversation: your initial compilation error with GCC 11 is unrelated to Colvars, and it is instead an issue of the standard GROMACS 2020 release series, which will eventually be addressed in a GROMACS patch release (probably 2020.7?).

Giacomo