From 5ee2801eb14932496a74bb058c9a1db5f4b1267b Mon Sep 17 00:00:00 2001 From: Berk Hess Date: Tue, 15 Sep 2020 11:40:23 +0200 Subject: [PATCH] Only extend Ewald table when necessary The Ewald correction table for non-bonded interactions was always extended by change 24595dbb. No this is limited to free-energy runs only. --- src/gromacs/mdlib/forcerec.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gromacs/mdlib/forcerec.cpp b/src/gromacs/mdlib/forcerec.cpp index e2ce454bd2..1bd9658392 100644 --- a/src/gromacs/mdlib/forcerec.cpp +++ b/src/gromacs/mdlib/forcerec.cpp @@ -732,8 +732,10 @@ static void init_ewald_f_table(const interaction_const_t& ic, */ const real tableScale = ewald_spline3_table_scale(ic, useCoulombTable, useVdwTable); + const bool havePerturbedNonbondeds = (ic.softCoreParameters != nullptr); + real tableLen = ic.rcoulomb; - if (useCoulombTable && tableExtensionLength > 0.0) + if (useCoulombTable && havePerturbedNonbondeds && tableExtensionLength > 0.0) { /* TODO: Ideally this should also check if couple-intramol == no, but that isn't * stored in ir. Grompp puts that info into an opts structure that doesn't make it into the tpr. -- 2.22.0