This leads to divide-by-zero errors, and since it just turns off
electrostatics it will be faster to use a plain cutoff, which we
now recommend instead.
Fixes #1297.
Change-Id: Ia5eba7a1d4bd3b387174c9cb4878a2d65ead2c6c
ir->epsilon_r = 1.0;
}
+ if (ir->epsilon_r == 0)
+ {
+ sprintf(err_buf,
+ "It is pointless to use long-range or Generalized Born electrostatics with infinite relative permittivity."
+ "Since you are effectively turning of electrostatics, a plain cutoff will be much faster.");
+ CHECK(EEL_FULL(ir->coulombtype) || ir->implicit_solvent == eisGBSA);
+ }
+
if (getenv("GMX_DO_GALACTIC_DYNAMICS") == NULL)
{
sprintf(err_buf, "epsilon-r must be >= 0 instead of %g\n", ir->epsilon_r);