- The paper introduces Equi-cDFT, a symmetry-preserving and variationally consistent neural functional that learns the extensive excess free energy from 10,957 canonical MD density fields using only local chemical-potential balance, with 1,762 trainable parameters.
- The learned functional transfers across temperatures, ensembles, system sizes, and unseen geometries, recovering structure factors, equations of state, liquid–vapor coexistence, interfacial profiles, and a critical point of approximately $T_c=1.09$ and $\rho_c=0.31\,\sigma^{-3}$.
- The framework predicts solvent-mediated colloid forces and adsorption in a curved gyroid pore without direct supervision, while remaining limited by its LJ-specific training, finite receptive field, fixed grid resolution, and temperature-dependent chemical-potential gauge calibration.
Equi-cDFT is a framework for learning the excess free-energy functional Fexc[ρ,T] of classical density functional theory (cDFT) directly from fully three-dimensional equilibrium density fields, while preserving spatial symmetry and variational consistency (2608.13506). The work addresses a persistent gap in machine-learned cDFT: most neural functionals to date have been restricted to planar or two-dimensional inhomogeneities, limiting their use for solvation, nucleation, demixing and fluids near nonplanar surfaces. The paper demonstrates that a single learned functional, trained only on canonical molecular dynamics (MD) density fields without free-energy or chemical-potential labels, transfers across temperatures, system sizes and ensembles, and recovers structure factors, the equation of state (EOS), liquid–vapor coexistence and interfacial structure — none of which appear as training targets.
Motivation and relation to prior work
In cDFT the equilibrium one-body density minimizes the grand-potential functional, with the ideal-gas term known analytically but the excess term Fexc unknown for realistic three-dimensional fluids. Fundamental measure theory handles hard spheres accurately, while attractive interactions are typically treated perturbatively with state-dependent accuracy. Neural approaches have progressed from fitting nonlocal corrections to planar profiles, to neural functional theory that learns c(1)(r;[ρ])=−βδFexc/δρ(r) directly from GCMC data under randomized one-dimensional external fields, with extensions to temperature dependence, mixtures, latent chemical potentials, two-dimensional convolutional representations and spherical symmetry. Equi-cDFT differs in three respects: it learns an explicit extensive scalar functional rather than a direct potential–density map or an independent c(1) approximation; it enforces invariance under the cubic point group Oh; and it trains on canonical MD fields via local chemical-potential balance, eliminating the unknown Lagrange multiplier μ analytically.
Architecture and training signal
The excess functional is decomposed into local contributions,
Fexc[ρ,T]=ΔVg∑ρgaexc(χg,T),
with a shared free-energy map applied at every grid point, making the functional extensive and transferable across system sizes. Local environments are encoded by adapting the Cartesian atomic cluster expansion (CACE) to density grids: Cartesian moments Aℓ=∣q∣≤qcut∑ρg+qqxℓxqyℓyqzℓz transform covariantly under the 48 signed axis permutations of Oh, and symmetrized products yield invariant features BK(ν). A small multilayer perceptron readout produces Fexc0; the production model uses 15 invariant CACE features plus center density and temperature, totaling 1,762 trainable parameters.
Training exploits the equilibrium condition that the dimensionless local chemical potential Fexc1 is spatially constant. For canonical fields, where Fexc2 is an unknown constant, it is eliminated as the spatial mean of the predicted local chemical potential, giving a per-field loss that penalizes spatial imbalance. This leaves an unavoidable gauge freedom Fexc3, which does not affect fixed-Fexc4 predictions or the two-body direct correlation Fexc5, but requires one additive calibration per temperature whenever an absolute reservoir chemical potential is needed — a limitation the author states plainly rather than resolving.
The training corpus comprises 10,957 complete canonical density fields of the Lennard–Jones truncated-and-shifted (LJTS) fluid at Fexc6–Fexc7 in Fexc8 cells on Fexc9 grids, generated under randomized superpositions of periodic Gaussian external potentials spanning densities c(1)(r;[ρ])=−βδFexc/δρ(r)0–c(1)(r;[ρ])=−βδFexc/δρ(r)1. Fields at c(1)(r;[ρ])=−βδFexc/δρ(r)2, 1.1 and 1.5 are held out entirely. Training takes roughly 100 minutes on a single GPU.
Emergent thermodynamics without supervision
Because c(1)(r;[ρ])=−βδFexc/δρ(r)3 is the Hessian of the learned scalar, reciprocity holds automatically, and the Ornstein–Zernike relation yields static structure factors from its Fourier transform. Across held-out homogeneous states, the functional reproduces both magnitude and wavevector dependence of c(1)(r;[ρ])=−βδFexc/δρ(r)4 relative to direct MD. Integrating the compressibility route reconstructs the full EOS: at subcritical temperatures the homogeneous isotherms develop a van der Waals loop including a mechanically unstable region with c(1)(r;[ρ])=−βδFexc/δρ(r)5, despite no pressure or pair-response supervision. This emergence demonstrates that the learned functional captures the nonconvex thermodynamics underlying liquid–vapor separation.
Fixed-c(1)(r;[ρ])=−βδFexc/δρ(r)6 slab solutions recover coexistence densities up to c(1)(r;[ρ])=−βδFexc/δρ(r)7, and a mean-field continuation gives c(1)(r;[ρ])=−βδFexc/δρ(r)8, agreeing well with the direct-simulation estimate c(1)(r;[ρ])=−βδFexc/δρ(r)9. The author notes this critical point is a continuation, not an independently solved state, and does not resolve critical fluctuations. Planar interface calculations capture progressive interfacial broadening across four temperatures, though these test relaxation of MD-initialized slabs rather than spontaneous slab formation.
Held-out benchmarks confirm transfer beyond interpolation: forward recovery of external fields from densities and inverse reconstruction of densities by fixed-c(1)0 minimization at temperatures excluded from training; transfer to boxes with 3.375 times the training volume at unchanged grid spacing; and inference of grand-canonical chemical-potential differences from NVT-trained weights, with one gauge alignment per temperature and no statewise fitting. The larger-cell test directly probes the locality assumption inherent in the finite receptive field.
Two soft colloidal cores with attractive shells but no direct mutual interaction are immersed in LJ solvent at c(1)1. As their separation changes, solvent-depleted regions merge into a bridge, rupture, and recover independent solvation shells. The mean force follows from the classical Feynman–Hellmann identity evaluated on the minimized cDFT density alone:
c(1)2
Equi-cDFT reproduces strong attraction at c(1)3, the sign reversal and repulsive maximum near c(1)4, and decay to zero by c(1)5–10, on a denser separation grid than sampled by MD. Applying the same quadrature to gridded MD densities reproduces the direct ensemble average, isolating discretization effects and confirming that the force curve is an emergent prediction of the learned free-energy landscape rather than a fitted observable. Because the force integrates the entire density field, it is more demanding than pointwise density agreement.
Adsorption in a gyroid pore
The gyroid test is geometrically stringent: its continuously curved, interconnected pore has no wall-normal coordinate and is topologically unlike any training field. At matched loading, the functional reproduces the full three-dimensional morphology, including the curved depletion layer and spatially varying accumulation, with agreement extending from strongly perturbed interfacial regions into the pore interior when colored by distance from the wall. For adsorption, only the particle number is supplied; the functional must predict both pore density and the sustaining chemical potential. After the single bulk gauge calibration, matching independently computed bulk and confined branches at equal chemical potential yields the adsorption isotherm without a separate adsorption model. At c(1)6, above the bulk critical point, filling is continuous but strongly nonlinear — weak population in dilute reservoirs followed by rapid filling in the dense-fluid regime — showing transfer from local packing to reservoir-scale partitioning.
Limitations and open questions
Several constraints bound these results. The functional is specific to the LJTS interaction; extension to mixtures, ionic and polar fluids requires species-resolved channels and long-ranged branches such as local molecular field theory or reciprocal-space Coulomb features. The finite receptive field is a modeling approximation whose adequacy is tested empirically rather than guaranteed. Sensitivities remain in long-wavelength finite-cell response and near criticality, where the reported critical point relies on mean-field continuation. The model uses fixed real-space discretization: transfer across spatial resolution and multiscale representations remain open. Interfacial tests initialize from MD profiles rather than testing spontaneous slab formation from uniform density. Whether the locality-based construction suffices for fluids with longer-ranged correlations, and whether the canonical-gauge calibration can be eliminated, are questions left unresolved.
Conclusion
Equi-cDFT shows that equilibrium one-body density fields, obtainable routinely from canonical MD, can be converted into a symmetry-preserving, variational thermodynamic generator. Once trained, the same scalar functional supports minimization, differentiation and cross-ensemble transfer, yielding equilibrium structure, response functions, phase coexistence, generalized forces and adsorption in geometries absent from training. Combined with machine-learning interatomic potentials as reference-data sources, the framework offers a practical route toward data-driven classical density functionals of increasingly realistic fluids.