From: Mark Abraham Date: Mon, 29 Sep 2014 15:31:09 +0000 (+0200) Subject: Merge "Merge release-4-6 into release-5-0" into release-5-0 X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=4e26aee50b6476a4c01c0eaf3650b1766e9b1659;hp=3cf05dfc83395c34cdbcfed4ceed2ddb16330f08;p=alexxy%2Fgromacs.git Merge "Merge release-4-6 into release-5-0" into release-5-0 --- diff --git a/src/programs/mdrun/pme_loadbal.c b/src/programs/mdrun/pme_loadbal.c index 1c12f86435..d6fd68f372 100644 --- a/src/programs/mdrun/pme_loadbal.c +++ b/src/programs/mdrun/pme_loadbal.c @@ -261,6 +261,15 @@ static gmx_bool pme_loadbal_increase_cutoff(pme_load_balancing_t pme_lb, while (sp <= 1.001*pme_lb->setup[pme_lb->cur].spacing || !grid_ok); set->rcut_coulomb = pme_lb->cut_spacing*sp; + if (set->rcut_coulomb < pme_lb->rcut_coulomb_start) + { + /* This is unlikely, but can happen when e.g. continuing from + * a checkpoint after equilibration where the box shrank a lot. + * We want to avoid rcoulomb getting smaller than rvdw + * and there might be more issues with decreasing rcoulomb. + */ + set->rcut_coulomb = pme_lb->rcut_coulomb_start; + } if (pme_lb->cutoff_scheme == ecutsVERLET) {