X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=blobdiff_plain;f=src%2Fprograms%2Fmdrun%2Fpme_loadbal.c;h=dd2cd1a2e9f049b01ff6de90078d249f925c0cf7;hb=19d3c2e5d0c401eb59010960d11a18b6ba2c54c6;hp=5ba76e63e0edab5bba4a85a415fce497367b0386;hpb=fe90f1c1c71a3a43a27ec9ba76e772ae54786c7f;p=alexxy%2Fgromacs.git diff --git a/src/programs/mdrun/pme_loadbal.c b/src/programs/mdrun/pme_loadbal.c index 5ba76e63e0..dd2cd1a2e9 100644 --- a/src/programs/mdrun/pme_loadbal.c +++ b/src/programs/mdrun/pme_loadbal.c @@ -265,6 +265,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) {