gmx_bool bUseGPU,
gmx_bool *bPrinting)
{
+ GMX_RELEASE_ASSERT(ir->cutoff_scheme != ecutsGROUP, "PME tuning is not supported with cutoff-scheme=group (because it contains bugs)");
+
pme_load_balancing_t *pme_lb;
real spm, sp;
int d;
}
else
{
+ /* TODO Remove these lines and pme_lb->cutoff_scheme */
tmpr_coulomb = set->rcut_coulomb + pme_lb->rbufOuter_coulomb;
tmpr_vdw = pme_lb->rcut_vdw + pme_lb->rbufOuter_vdw;
+ /* Two (known) bugs with cutoff-scheme=group here:
+ * - This modification of rlist results in incorrect DD comunication.
+ * - We should set fr->bTwinRange = (fr->rlistlong > fr->rlist).
+ */
set->rlistOuter = std::min(tmpr_coulomb, tmpr_vdw);
set->rlistInner = set->rlistOuter;
}
/* TODO: centralize the code that sets the potentials shifts */
if (ic->coulomb_modifier == eintmodPOTSHIFT)
{
- ic->sh_ewald = std::erfc(ic->ewaldcoeff_q*ic->rcoulomb);
+ GMX_RELEASE_ASSERT(ic->rcoulomb != 0, "Cutoff radius cannot be zero");
+ ic->sh_ewald = std::erfc(ic->ewaldcoeff_q*ic->rcoulomb) / ic->rcoulomb;
}
if (EVDW_PME(ic->vdwtype))
{