As noted in #2105, QMCPACK's periodic Coulomb energy calculation has huge errors for quasi-2D systems with large enough vacuum.
In #2125, a reference Ewald implementation was added to safeguard all runs against errors of this type via a reference check followed by an abort in the event of large errors.
The checking code was slow, requiring further optimization to be usable for large scale production runs. The code was brought to an acceptable speed across efforts contained in #2169, #2172, and #2176. The largest increases in speed were found by optimizing the gaussian exponents in the Ewald breakup, which minimized the number of points in the isotropic (cubic) sums.
While developing #2125, it became clear that many points within the cubic grids were contributing little for anisotropic quasi-2D systems. Efforts begun on adaptive anisotropic grids revealed that the number of anisotropic grid points required to sum the Ewald energy to high accuracy is on the order of the number of points already used by QMCPACK in production (which currently has a low accuracy), see #2182.
This raises the prospect that the main QMCPACK implementation of Ewald sums could be replaced with an adapted version of the anisotropic code. The resulting code would be much higher accuracy (resolving #2105) while likely remaining similar in speed (needs investigation).
The work plan here is to explore this possibility.
As noted in #2105, QMCPACK's periodic Coulomb energy calculation has huge errors for quasi-2D systems with large enough vacuum.
In #2125, a reference Ewald implementation was added to safeguard all runs against errors of this type via a reference check followed by an abort in the event of large errors.
The checking code was slow, requiring further optimization to be usable for large scale production runs. The code was brought to an acceptable speed across efforts contained in #2169, #2172, and #2176. The largest increases in speed were found by optimizing the gaussian exponents in the Ewald breakup, which minimized the number of points in the isotropic (cubic) sums.
While developing #2125, it became clear that many points within the cubic grids were contributing little for anisotropic quasi-2D systems. Efforts begun on adaptive anisotropic grids revealed that the number of anisotropic grid points required to sum the Ewald energy to high accuracy is on the order of the number of points already used by QMCPACK in production (which currently has a low accuracy), see #2182.
This raises the prospect that the main QMCPACK implementation of Ewald sums could be replaced with an adapted version of the anisotropic code. The resulting code would be much higher accuracy (resolving #2105) while likely remaining similar in speed (needs investigation).
The work plan here is to explore this possibility.