From: Berk Hess Date: Tue, 15 Sep 2020 09:40:23 +0000 (+0200) Subject: Only extend Ewald table when necessary X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=5ee2801eb14932496a74bb058c9a1db5f4b1267b;p=alexxy%2Fgromacs.git 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. --- 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.