xnn.ffnn.models.amoeba_ewald.mesh_self_moments#
- xnn.ffnn.models.amoeba_ewald.mesh_self_moments(cell, alpha, mesh, order, kind, max_rank=4)[source]#
Moments of the spurious, position-averaged mesh self-interaction.
A multipole spread on the mesh interacts with itself through the mesh sum; the spline interpolation makes that interaction differ from the exact reciprocal-space self term by an amount that, averaged over the position of the atom within a mesh cell, is
S0 q^2 - 2 q Q:S2 + d.S2.d + Q:S4:Qwith the moments returned here (the alias sums of the squared spline transform minus the exact term). They vanish as the mesh is refined. Subtracting the spurious part removes the mean discretisation error of the self-interaction from the energy, the field and the dispersion sum (Ballenegger, Cerda and Holm, Comput. Phys. Commun. 182, 1919, 2011).- Parameters:
- Returns:
S0(scalar),S2(3, 3)andS4(3, 3, 3, 3)in Cartesian components (Nonebeyondmax_rank), in the units of the energy per squared multipole.- Return type:
tuple of Tensor