gmx check reads TPR files differently if it was compiled with/without COLVARS support
Summary
TPRs that were written with COLVARS support cannot be read when GROMACS was compiled without COLVARS.
GROMACS version
GROMACS main at 2024-04-03.
Steps to reproduce
This was exposed when testing !4105 (merged) against re-generated regression tests: https://gitlab.com/gromacs/gromacs/-/jobs/6538982042. The reference TPRs were re-generated in gromacs-regressiontests!64 (merged) with a GROMACS version that supported COLVARS. The tests fail only on gromacs:clang-9:regressiontest which is set-up without COLVARS support since c6b2c30b. The mdp settings (or TPR files) do not use colvars.
What is the current bug behavior?
gmx check
should not fail because there is an empty colvars block in a TPR file.
What did you expect the correct behavior to be?
The regression tests should pass regardless if they are run using a binary with or without COLVARS support.
For now, I might re-generate the TPR files using a GROMACS version that is compiled without COLVARS support. That will not fix the issue, but at least make the regression tests pass.
Possible fixes