pairlist prunes very long exclusions for the free energy kernel when using the GPU
Summary
When using the free energy kernel and the GPU, very long excluded pair interactions get pruned by make_fep_list()
and are not marked as exclusions for the FE kernel. This bypasses the intentional fatal error when excluded pairs are beyond rlist from issue #3809 (closed). Because of that, interactions between such pairs are not corrected for the long range Ewald component from issue #3403 (closed).
GROMACS version
Tested on 2021.5, current master branch
Steps to reproduce
Minimal example: stick_2a.tar.gz. There are two bonded atoms 3 nm apart, which is more than the rlist of 1.1 nm and also more than the 1.9 nm pruning radius in make_fep_list() for this box. Free energy code is on.
What is the current bug behavior?
GPU version of make_fep_list()
prunes excluded pairs beyond nbl->rlist + effective_buffer_1x1_vs_MxN(iGrid, jGrid)
, marking them as not excluded for the FE kernel. This causes long range Ewald corrections to not be applied for these pairs in the FE kernel.
CPU version works correctly and causes an informative fatal error in nb_free_energy_kernel()
.
What did you expect the correct behavior to be?
Excluded interactions beyond rlist should make it to the FE kernel still marked as excluded, where they will raise a fatal error informing the user that they need a larger rlist.
Possible fixes
Remove pruning of the excluded pairs by the GPU version of make_fep_list()