Expand description
The Ewald sum: real-space part, reciprocal-space part and self term.
Upstream: lsum*, realsum* and recsum* of lattice/_esum.pyx. The reduction
into a cell, the exact zeros by symmetry, the checks at small splits and the
spectral series of 1D spherical sums are treams-rs extensions.
ModulesΒ§
- probes π
- The reads of the test probes in builds without tests: constants that fold away.
StructsΒ§
- Automatic
Split π - The same sum at the automatic split, against which sums below every automatic split
fail early (
SmallSplitMonitor::hopeless) or verify their settled shells (verify_settled). - Cell
Reduction π - The shift and the Bloch vector of one sum, each reduced into a cell of its reduced basis.
- Real
Summands π - What the real-space terms of one sum read.
- Reciprocal
Summands π - What the reciprocal-space terms of one sum read.
- Small
Split πMonitor - The real-space terms below every automatic split: the Kambe integrals that keep their
rounding below that of the largest term so far, and the early failure of complete
sums (
EARLY_FAILURE_LOSS). - Spherical
Cache π - Ewald samples of one spherical degree, shared by its orders. Each order still follows its own shell convergence test; the shell iterator visits the same prefix of lattice points, so later orders reuse the samples already visited and append only the farther points they need. Each slot also records its lattice point: a different visit order evaluates mismatched slots afresh, never reusing another pointβs sample. The cache lives for one degree evaluation with fixed inputs.
- Spherical
Real πSample - Spherical
Reciprocal πSample - Symmetry π
- A sum that vanishes by symmetry (
vanishes) is exactly zero, as are its derivatives that movekalone; jets keep the other derivatives and their check of the cancellation.
ConstantsΒ§
- SHARED_
REAL_ πPOINTS - A bounded prefix covers ordinary Ewald sums without retaining a large 3D cube at the shell limit: at most 1.4 MiB per degree for the largest (16-slot) jets. Farther samples stream through the scalar arithmetic instead.
FunctionsΒ§
- ewald π
- The Ewald parts selected by
evaluationwith spliteta. Both sums run over shells of reduced bases, and the reciprocal sum over the Bloch vector reduced into a cell of the reduced reciprocal basis, so their results do not depend on the given basis or on the Bloch vectorβs cell. - reduce_
to_ πcell - Reduces the shift of
inputsinto a cell of the reduced direct basis, in place, and the Bloch vector into a cell of the reduced reciprocal basis. - vanishes π
- Whether the sum vanishes by symmetry.
- verify_
settled π sum, whose real-space shells settled at their limit (Shells::settled), if it agrees with the sum at the automatic split within the roundingpredictedthat its parts predict for the value (without the truncation that the comparison verifies) plus twice the convergence tolerance of each shell sum.