/* Fix for PME and Ewald error tolerance
*
- * OpenMM uses approximate formulas to calculate the Ewald parameter:
- * alpha = (1.0/cutoff)*sqrt(-log(2.0*tolerlance));
- * and the grid spacing for PME:
- * gridX = ceil(2*alpha*box[0][0]/3*(pow(tol, 0.2)));
- * gridY = ceil(2*alpha*box[1][1]/3*(pow(tol, 0.2)));
- * gridZ = ceil(2*alpha*box[2][2]/3*(pow(tol, 0.2)));
- *
- * It overestimates the precision and setting it to
- * (100 x ewald_rtol) seems to give a reasonable match to the GROMACS settings
- *
- * If the default ewald_rtol=1e-5 is used we silently adjust the value,
- * otherwise a warning is issued about the action taken.
- */
- double corr_ewald_rtol = 100.0 * ir->ewald_rtol;
+ * OpenMM uses approximate formulas to calculate the Ewald parameter:
+ * alpha = (1.0/cutoff)*sqrt(-log(2.0*tolerlance));
+ * and the grid spacing for PME:
+ * gridX = ceil(2*alpha*box[0][0]/3*(pow(tol, 0.2)))
+ * gridY = ceil(2*alpha*box[1][1]/3*(pow(tol, 0.2)));
+ * gridZ = ceil(2*alpha*box[2][2]/3*(pow(tol, 0.2)));
+ *
+ *
+ * If the default ewald_rtol=1e-5 is used we silently adjust the value to the
+ * OpenMM default of 5e-4 otherwise a warning is issued about the action taken.
+ *
+ */
+ double corr_ewald_rtol = 50.0 * ir->ewald_rtol;
if ((ir->ePBC == epbcXYZ) &&
(ir->coulombtype == eelEWALD || ir->coulombtype == eelPME))
{