arXiv:2610.12132cond-mat.softOct 2026

Manuscript Offprint

arXiv:2610.12132

A structure-preserving neural density functional for the ions of a polymer electrolyte

Liyao Lyu

Abstract

Predicting the structure and response of inhomogeneous polymer electrolytes requires a description of ion correlations that retains molecular-scale accuracy while remaining transferable across spatial scales and geometries. We develop a neural density functional for electrolytes that preserves spatial symmetries, thermodynamic integrability and the Noether identities, with perfect screening recovered in stable, noncritical bulk states. Its nonlinear density dependence captures the concentration-dependent correlations missed by a pair closure, including a crossover from enhanced to suppressed long-wavelength number fluctuations at strong coupling. The functional describes density profiles at an untrained salt concentration and predicts bulk structure factors and the long-wavelength number response. Trained solely on planar density and internal-force profiles from molecular dynamics, the functional predicts ionic structure in larger domains and in two-dimensional external fields. On the same ion data, it is more accurate than three other neural density-functional architectures and keeps its accuracy with a quarter of the training runs, where the errors of the best alternative grow by about two thirds. The spatial transferability provides a necessary foundation for connecting molecular correlations to continuum predictions at larger scales.

Keywords: classical density functional theory | polymer electrolytes | many-body ion correlations | machine learning | force matching

1 Introduction

Salt-doped polymers are attractive solid electrolytes for lithium batteries, offering improved safety and mechanical stability over liquid electrolytes [1, 2]. Their performance, however, is difficult to predict, because adding salt increases the number of charge carriers but also changes ion correlations [3–6]: ions pair and cluster as the concentration grows [7–9], and measured cation transference numbers can even become negative [10]. At equilibrium, these correlations shape the ion distributions and density fluctuations. Describing these correlations is challenging because they arise on two length scales: in low-permittivity polymers the Bjerrum length can span several monomer diameters, while packing and solvation introduce correlations at shorter range. A theory of these correlations must therefore go beyond the Coulomb mean field and remain applicable as concentration and external fields vary. Molecular simulations capture such correlations accurately, and data-driven coarse-graining extends their time scales [11], but they remain limited to small domains of simple geometry. This calls for a continuum theory that retains their molecular fidelity while extending to the larger scales and more complex geometries of inhomogeneous electrolytes.

Classical density functional theory provides such a framework [12, 13]. A free-energy functional determines the equilibrium ion distributions through its first functional derivative and the bulk correlations through its second. The excess part of this functional is unknown, however, and has to be approximated. For electrolytes, analytical approximations combine fundamental measure theory for ion packing [14, 15] with electrostatic correlation terms based on the mean spherical approximation or a reference fluid [16–19]. These functionals are built on charged hard-sphere reference systems and do not include the solvation of ions by polymer chains. Theories of ion-containing polymers include this solvation through Born and self-energy terms [20–22] and treat ion correlations through liquid-state closures [23], each within its own analytical approximation.

Neural approaches instead learn the excess part from simulation data, either through the one-body direct correlation functions or as the excess free energy itself [24–26]. Local learning of the one-body correlations describes inhomogeneous fluids accurately,

*Correspondence: lyuliyao@ustc.edu.cn even in planar domains far larger than those used for training [24]. With a separate treatment of the long-range electrostatics it extends to ionic mixtures [25], and with machine-learned interatomic potentials to molecular liquids from first principles [27]. The learned correlations, however, are not guaranteed to derive from a free-energy functional, and they respect no spatial symmetry beyond translations on the training grid. Both properties matter. They make the predictions satisfy exact relations of statistical mechanics: pair correlations are symmetric, free-energy differences do not depend on the integration path, and the total internal force vanishes. They also restrict the functional to a narrower set of admissible forms, so that it can be learned from less data [28] and generalizes more reliably to unseen conditions.

Recent work has begun to build some of these properties in. Learning the free energy directly ensures integrability [26], and an equivariant formulation developed concurrently with the present work extends this approach by incorporating the spatial symmetries of a cubic grid [29]. The parameters of both are defined on a fixed grid, and both were developed for simple fluids without long-range electrostatics. Closest in form to the present work are learned functionals of weighted densities [30–32]. In particular, Kelley et al. [31] formulate a rotationally invariant scalar functional with smooth reciprocal-space kernels. It is trained on free energies and their functional derivatives, which for a molecular fluid require thermodynamic integration, and has been demonstrated for one-dimensional inhomogeneities. Thus, none of these approaches combines integrability, continuous spatial symmetry and long-range electrostatics in a functional that is learned from canonical simulations without free-energy or chemical-potential labels and transfers to other geometries independently of its training grid (Table 1).

In this paper, we construct a neural functional for the ions of a coarse-grained salt-doped polymer melt [6] (Fig. 1). The Coulomb interaction is kept analytically, and the remaining correlations are represented by a scalar functional of the cation and anion densities alone. This learned part is built from radial convolution kernels and a pointwise neural network, both defined in continuous space rather than on a grid. The chemical potentials are functional derivatives of the same scalar free-energy functional, so free-energy differences between density profiles do not depend on the integration path. The functional is invariant under all translations, rotations, and reflections. Therefore, the total internal force and torque vanish, as the Noether identities require [33]. Because the Coulomb term is explicit and the learned kernels are short ranged, the small-wavenumber charge correlations satisfy the perfect-screening sum rules [34] in stable, noncritical bulk states. Since no parameter refers to a grid or a box size, the trained functional can be evaluated in domains of other sizes and geometries.

We train this functional by matching species-resolved internal force densities measured in canonical molecular dynamics under static planar external potentials. The first Yvon–Born–Green equation connects these force densities to gradients of the interaction chemical potentials generated by the functional. This force-based supervision differs from fitting bulk pair correlations [26], fitting free energies obtained by thermodynamic integration [31], enforcing local chemical-potential balance [29, 35], matching the time evolution of density fields [36], or fitting measure-dependent forces to particle trajectories [37]. The spatially constant chemical potentials drop out on taking the gradient, so the loss constrains the functional across inhomogeneous ionic environments without chemical-potential labels. Neither bulk structure factors nor the associated number susceptibility enters the force-matching loss, making them tests of the learned free-energy curvature beyond the fitted forces.

We study two electrostatic coupling strengths, with Bjerrum lengths of about 8 and 30 monomer diameters. At both, the functional trained on planar profiles predicts ionic structure in larger boxes and under external potentials that vary in two directions. The same functional describes density profiles at an untrained salt concentration and predicts bulk structure factors and the long-wavelength number response. Its nonlinear density dependence captures concentration-dependent effective ion correlations missed by a fixed quadratic pair closure, including the crossover from enhanced to suppressed long-wavelength number fluctuations at strong coupling. Trained on the same ion data, it is more accurate than three other neural architectures and keeps its accuracy

Table 1. Structural guarantees and transferability of the learned functionals compared in this work, in their original formulations. √, guaranteed by construction (first four rows) or demonstrated without retraining (last three rows); N, verified numerically but not built in; G, holds only for the symmetry operations of the grid; X, neither built in nor reported.

PropertyLearned c(1)c^{(1)}Learned FexF_{\text{ex}}This work
Sammüller et al. [24]Bui-Cox [25]Dijkman et al. [26]Cheng [29]
IntegrabilityNX✓✓✓
Spatial symmetriesGGXG✓
Noether force/torque identitiesNXXX✓
Long-range electrostaticsX✓XX✓
Larger domains✓✓X✓✓
Nonplanar geometriesXXX✓✓
Grid-independent parametersXXXX✓

A Simulation data

Figure

B Functional and training

Figure

C Predictions

Density profiles from V(z)V(z)

Figure

Structure and number response

Figure

Figure 1. A learned density functional for the ions of a salt-doped polymer melt. (A) Molecular dynamics under a planar external potential provides ion densities n±(z)n_{\pm}(z) and internal force densities f±int(z)f_{\pm}^{\mathrm{int}}(z). (B) The excess free energy is parameterized by radial kernels and a pointwise neural network and trained by matching internal force densities to MD; the ideal-gas and Coulomb contributions are included analytically. (C) Predicted density profiles for a held-out run, bulk charge structure, and number response at the smallest nonzero wavenumber, compared with MD.

with a quarter of the training runs, where the errors of the best alternative grow by about two thirds, while retaining its built-in structural identities.

References (37)