The GROMACS version check:
grompp -h 2>&1 | sed -n '/^.*VERSION/{s///p;q;}'
works only for GROMACS versions < 2016.x. As a consquence, the if statement which changes the default cutoff scheme to "group" is not executed, and backward crashes because of the error:
ERROR 1 [file 1-EM.mdp]:
Energy group exclusions are not (yet) implemented for the Verlet scheme
Indeed, the line of $GROMPP -h which contains the GROMACS version keeps changing, as shown below.
GMX 4.6.7:
:-) VERSION 4.6.7 (-:
GMX 5.1.5:
GROMACS: gmx grompp, VERSION 5.1.5
GMX 2016.5:
GROMACS: gmx grompp, version 2016.5
GMX 2018.1:
GROMACS: gmx grompp, version 2018.1
The proposed code works in all these cases thus fixing this issue.
The GROMACS version check:
grompp -h 2>&1 | sed -n '/^.*VERSION/{s///p;q;}'
works only for GROMACS versions < 2016.x. As a consquence, the if statement which changes the default cutoff scheme to "group" is not executed, and backward crashes because of the error:Indeed, the line of $GROMPP -h which contains the GROMACS version keeps changing, as shown below. GMX 4.6.7:
:-) VERSION 4.6.7 (-:
GMX 5.1.5:GROMACS: gmx grompp, VERSION 5.1.5
GMX 2016.5:GROMACS: gmx grompp, version 2016.5
GMX 2018.1:GROMACS: gmx grompp, version 2018.1
The proposed code works in all these cases thus fixing this issue.