Latent-charge potentials get exact periodic electrostatics: projection recovers the 1.8 charge an unconstrained NaCl model loses
Synopsis
Latent-charge machine-learning potentials learn atomic charges as hidden variables from energies and forces, but their long-range electrostatic term had no exact periodic form, leaving net charge mixed with self-energy. Writing that term as a smeared Epstein–Hurwitz lattice sum separates the net-charge artefact from the local self-energy and yields a sphere-average theorem for cells of any shape, plus forces and virial. Projecting the latent charges onto fixed total charge gives projected latent Ewald summation (pLES); on charged NaCl clusters it recovers the total charge an unconstrained model misses by up to 1.8 and cuts a short-range model's test errors from 1.44 to 0.42 meV/atom and from 37 to 13 meV/Å.
Interpretation
The long-range electrostatic term of latent-charge potentials now has an exact periodic decomposition, splitting the net-charge artefact, the Gaussian self-energy, the forces and the virial out of one lattice-sum expression. Periodic finite-size electrostatics was well understood for fixed-charge force fields, but latent charges are emergent: their total is not conserved and their dielectric response is set by training, so which part of the energy is a cell artefact was unclear. In numerical checks the simple-cubic lattice constant is reproduced across smoothing parameters, the sphere average agrees with the exact value in cubic and triclinic cells, and the reciprocal-space energy converges to the real-space route; for random fixed charges the virial agrees with automatic differentiation and the forces with central finite differences.
Projecting the latent charges onto fixed total charge with species weights gives pLES, which costs one global reduction and no linear solve at each step. Full charge equilibration requires solving a linear system every step, and this projection is exactly the diagonal-hardness limit of the same variational problem. On charged NaCl clusters the unconstrained model's total charge departs from the physical value for Na9Cl and Na8Cl, while pLES keeps every structure's total charge to machine precision; on the test set pLES reaches mean absolute errors of 0.42 meV/atom and 13 meV/Å, against 1.44 meV/atom and 37 meV/Å for the short-range ACE model.
Energies and forces fix the latent charges only up to a gauge: in neutral systems the overall sign is set by initialization, the scale and atomic partition are set jointly with the local energy, and the net charge is not determined at all without the projection. On two water datasets, independently trained constrained and unconstrained models learn the same latent charges up to a global sign and scale, so the projection removes exactly the part energies and forces cannot fix. On the liquid-water and water-phase data the two models give the same latent charges after aligning sign and scale, and pLES keeps every cell exactly neutral; on charged clusters the two models' charge redistributions agree only partially, showing the intra-cluster partition is not fixed by the data.
Perspective
The demonstrated scope is the implementation in the atomic cluster expansion and LAMMPS, charged NaCl clusters and two water datasets, with exact identities checked numerically in cubic and triclinic cells; the reciprocal-space sum is evaluated directly, its cost grows with system size, and a particle-mesh evaluation is left for future work.
The finite latent dielectric constant in water (19 to 71) comes from an extrapolation within an assumed crossover form, the crossover wavevector lies below the smallest sampled wavevector, and it rests mainly on the smallest wavevectors of the larger cell; the roughly 1 nm training cells do not probe this regime, so the value is a property of this trained model rather than a consequence of the charge model.
