grompp does not correctly check nstexpanded nstcalcenergy compatibility
nstexpanded was checking conditionally on ir->efep instead of ir->bExpanded. This might have led to incorrect energies being used for expanded ensemble sampling with free-energy=on and nstexpanded not a multiple of nstcalcenergy. I have not checked if results would actually be wrong in this case.
Correct grompp nstexpanded/nstcalcenergy check
With expanded ensemble, but without free-energy perturbation, grompp
would not check if nstexpanded was a multiple of nstcalcenergy.
If the latter was not the case, results might have been incorrect.
Also added a check in mdrun to catch old, incorrect tpr files.
Work around expanded ensemble issues
Two bugs could cause expanded ensemble sampling to use
outdated or zero energies. In these cases mdrun now modifies
nstcalcenergy to 1 to avoid these bugs.
Note: This change should not be merged upstream, since there
is a proper fix for release-2019.