Table of Contents
Fetching ...

Metadensity functional learning for classical fluids: Regularizing with pair correlations

Stefanie M. Kampa, Florian Sammüller, Matthias Schmidt

Abstract

We investigate and exploit consequences of the recent neural metadensity functional theory [Kampa et al., Phys. Rev. Lett. 134, 107301 (2025), 10.1103/PhysRevLett.134.107301] for describing the physics of inhomogeneous fluids. The metadensity dependence on the pair potential is relevant for soft matter design and Henderson inversion and it allows one to change the pair potential on the fly at prediction stage. Here we consider one-dimensional systems with short-ranged (truncated) interparticle forces and draw on the functional pair potential dependence to investigate 'metadirect' routes towards the bulk fluid pair correlation structure. Classical density functional theory provides the required functional relationships. Efficient variational calculus is implemented by neural functional line integration and automatic differentiation. We regularize local learning of neural functionals by comparing the pair structure from different routes. Thereby results from metadirect functional differentiation are matched against accurate test particle data from an initial locally trained metadensity functional. Accessing the pair structure via the metadensity functional dependence circumvents Ornstein-Zernike inversion and it is based on first principles.

Metadensity functional learning for classical fluids: Regularizing with pair correlations

Abstract

We investigate and exploit consequences of the recent neural metadensity functional theory [Kampa et al., Phys. Rev. Lett. 134, 107301 (2025), 10.1103/PhysRevLett.134.107301] for describing the physics of inhomogeneous fluids. The metadensity dependence on the pair potential is relevant for soft matter design and Henderson inversion and it allows one to change the pair potential on the fly at prediction stage. Here we consider one-dimensional systems with short-ranged (truncated) interparticle forces and draw on the functional pair potential dependence to investigate 'metadirect' routes towards the bulk fluid pair correlation structure. Classical density functional theory provides the required functional relationships. Efficient variational calculus is implemented by neural functional line integration and automatic differentiation. We regularize local learning of neural functionals by comparing the pair structure from different routes. Thereby results from metadirect functional differentiation are matched against accurate test particle data from an initial locally trained metadensity functional. Accessing the pair structure via the metadensity functional dependence circumvents Ornstein-Zernike inversion and it is based on first principles.
Paper Structure (12 sections, 35 equations, 5 figures)

This paper contains 12 sections, 35 equations, 5 figures.

Figures (5)

  • Figure 1: Overview of the two-stage neural functional learning (Sec. \ref{['SECmetapairLearning']}). From left to right: Training data consists of simulation results for inhomogeneous systems with density profiles $\rho(x)$ and interacting via short-ranged repulsive interparticle potentials $\phi(r)$ (Sec. \ref{['SECoverviewLearning']}). The corresponding one-body direct correlation functions $c_1(x)$ constitute the training target (Sec. \ref{['SECmetapairStageOneLearning']}). The initially trained neural functional $c_1(x;[\rho,\beta\phi])$ (top) is used in test particle setups for given forms of $\phi(r)$ to generate pair distribution functions $g(r)$ (Sec. \ref{['SECmetapairLearningWithRegularization']}). The corresponding bulk metafluctuation profile $\chi_\phi^b(r) = -L^{-1}\partial G(r)/\partial \beta\mu$ follows efficiently via considering finite differences $\mu\pm d\mu$. For the second training stage, the corresponding results for the bulk metadirect correlation function $c_\phi^b(r) = [\rho_b^{-1}-\tilde{c}_2^b(0)]\chi_\phi^b(r)$, see Eq. \ref{['EQmetapairCphiBulk']} are obtained. These are matched against those obtained via metadensity functional differentiation to regularize the second neural functional (bottom, highlighted), $c_\phi(x,r;[\rho_b,\beta\phi])=\delta c_1(x;[\rho_b,\beta\phi])/\delta\beta \phi(r)$, see Eq. \ref{['EQmetapairDefinitionCPhi']}, where $c_\phi(x,r;[\rho_b,\beta\phi]) = c_\phi^b(r)$ is the matching condition \ref{['EQmetapairMatchingcphi']} that is independent of $x$ due to the constant density profile. The second, regularized training stage thereby remains based also on local learning of the one-body direct correlation functional, as indicated. The background panels illustrate further representative training systems (not to scale).
  • Figure 2: Neural functional results for the bulk pair distribution function $g(r)$ from different theoretical routes and from both unregularized and regularized metadensity functionals. The generality of both metadensity functionals is exemplified by their application to three different types of pair potentials (insets): truncated Lennard-Jones-like pair interaction (left column), repulsive Gaussian pair potential (middle column), and a penetrable-ramp potential (right column). The results for $g(r)$ are shown for scaled distances $r/\sigma$ inside the pair potential window $r\leq r_c = 1.5\sigma$; the scaled chemical potential is $\beta\mu = 1$. In each panel the result from Percus' test particle minimization (solid line) serves as the reference; this route was found previously to yield excellent agreement with simulation data kampa2024meta. The results in the first row stem from a locally-trained unregularized neural metadensity functional using either the meta-Ornstein-Zernike route [Eqs. \ref{['EQmetapiarGofrViaThermodynamicIntegration']}, \ref{['EQmetaOrnsteinZernikeBulk']}, and \ref{['EQmetapairSmallBigG']}] or functional differentiation according to Eqs. \ref{['EQGfunctionalViaFormalIntegral']} and \ref{['EQmetapairSmallBigG']}: $(\rho_b^2 L)^{-1}\delta \beta F_{\rm exc}[\rho,\beta\phi]/\delta\beta\phi(r)$ performed numerically with stepwidth $d(\beta\phi) = 0.1$. For each system both unregularized metadirect results exhibit irregular deviations from the (test particle) reference for $g(r)$, in particular for distances close to $r_c$ and at the maximum of $g(r)$. The results in the second row are obtained using the pair-regularized neural metadensity functional following the same (metadirect) routes. Noise artifacts are eliminated and the agreement with the (test particle) reference is excellent. The results in the third row follow from using the standard density functional dependence instead of the metadensity channel of the neural functional. Numerical solution of the standard Ornstein-Zernike equation \ref{['EQmetapairOrnsteinZernikeInhomogeneous']}, using as input the bulk limit of Eq. \ref{['EQctwoFunctional']}, is performed either via solution of the corresponding set of linear equations, which arises upon spatial discretization of Eq. \ref{['EQmetapairOrnsteinZernikeInhomogeneous']}, or via spatial Fourier transform. While both routes predict qualitatively correct behaviour, each one is prone to artificial numerical oscillation in regions of large scaled pair potential $\beta\phi(r)$ and to deviations near the first peak of $g(r)$.
  • Figure 3: Illustration of the relationship of the bulk metacompressibility and the pair distribution function. a) Scaled bulk meta-compressibility, $-\chi_\phi^b(r)\sigma^2$, of a one-dimensional Lennard-Jones-like fluid at scaled chemical potential $\beta\mu = -1$ and pair distribution function $g(r)$ (inset). Results for $-\chi_\phi^b (r)\sigma^2$ are shown as a function of the scaled distance $r/\sigma$, obtained by solving the bulk meta-Ornstein-Zernike equation \ref{['EQmetaOrnsteinZernikeBulk']} using either the neural metadensity functional without or with regularization. Reference simulation data for system size $L=5\sigma$ are obtained consistently by alternative methods: $-L^{-1}\partial G/\partial \beta \mu$ obtained from numerical differentiation of simulation results for $G(r)$ and spatial integration over sampled density covariance data according to $\chi_\phi^b(r) = -\int dx{\rm cov}(\hat{\rho}(x),\hat{G}(r))/L$, which is identical to sampling the covariance $-{\rm cov}(N, \hat{G}(r))/L$. The expected equivalence of the results is reflected by their numerical agreement. b) Variation of the scaled metafluctuation profile $-\chi_\phi^b(r) \sigma^2$, shown as a function of scaled interparticle distance $r/\sigma$, over a range of different values of the scaled chemical potential $\beta\mu$ (colour bar). c) Corresponding sequence of results for the pair distribution function $g(r)$, obtained via the test particle method. The inset shows the scaled bulk density $\rho_b\sigma$ as a function of $\beta\mu$ (inset). d) Scaled ratio $\chi_\phi^b(r)/(2\rho_b^2g(r))$ shown for distances outside the core, $1<r/\sigma<1.5$, and for $\beta\mu>-2.5$ (indicated by the vertical arrow at the colourbar). The low density limit of unity can be identified despite some noise artifacts and the thus scaled fluctuations are suppressed upon increasing bulk density.
  • Figure 4: Illustration of the metadensity functional dependence in an inhomogeneous fluid with local chemical potential $\beta\mu_{\rm loc}(x)=\beta\mu-\beta V_{\rm ext}(x)$ and highly structured density profile $\rho(x)\sigma$ (top panel). The particles interact mutually with a repulsive penetrable pair potential (inset). The corresponding (scaled) metadirect correlation function $c_\phi(x,r)\sigma$, see Eq. \ref{['EQmetapairDefinitionCPhi']}, is shown as a function of (scaled) position $x/\sigma$ and (scaled) interparticle distance $r/\sigma$. Three different functionals are used to generate results: the analytic mean-field approximation $\int dx'\rho(x')\delta(|x'-x|-r)\sigma$ (second panel), as well as the unregularized (third panel) and regularized (bottom panel) neural one-body direct correlation functionals, which yield $c_\phi(x,r)$ via automatic differentiation according to Eq. \ref{['EQmetapairDefinitionCPhi']}.
  • Figure 5: Demonstration of metadensity functional application in an inhomogeneous system. The particles interact via a repulsive Gaussian pair potential. The (scaled) one-body density profile $\rho(x)\sigma$ is sinusoidal (top left panel). Results for the scaled two-particle density $\rho_2(x,x')\sigma^2$ are shown as a function of $x/\sigma$ and $x'/\sigma$ and indicate structure formation (lower left panel). Simulation data is shown in the upper left triangle; the results in the lower right triangle are obtained from solving the inhomogeneous Ornstein-Zernike equation \ref{['EQmetapairOrnsteinZernikeInhomogeneous']}, using neural input for $c_2(x,x')$, and the consistency is reflected by the mirror symmetry around the counter-diagonal, $\rho_2(x,x')=\rho_2(x',x)$. The simulation results for $G(r)$ (right panel) are obtained either from sampling the interparticle distance histogram or, equivalently, by spatial integration $\bar{\rho}_2(r) = \int dx\rho_2(x-r,x)$ with implied periodic continuation. The corresponding neural results are obtained via Eq. \ref{['EQGfunctionalViaFormalIntegral']} using the unregularized or the regularized density functional.