Table of Contents
Fetching ...

Determining the chemical potential via universal density functional learning

Florian Sammüller, Matthias Schmidt

TL;DR

The paper tackles determining equilibrium chemical potentials across datasets of inhomogeneous classical fluids by learning a neural representation of the universal one-body direct correlation functional $c_1(\mathbf{r}; [\rho], T)$ while concurrently estimating system-specific chemical potentials $\mu_k$. It introduces an augmented density-functional learning framework where the loss $\mathcal{L}_{\mathrm{EL}} = \sum_k \| \ln \rho_k(\mathbf{r}) + \beta_k V_{\mathrm{ext}}^{(k)}(\mathbf{r}) - \beta_k \mu_k - c_1(\mathbf{r}; [\rho_k], T_k) \|_2^2$ drives simultaneous optimization of the neural $c_1$ and the $\mu_k$, exploiting the fact that $\beta\mu$ acts as an additive offset to $c_1$. This enables recovering unknown chemical potentials solely from canonical data $(T_k, V_{\mathrm{ext}}^{(k)}, \rho_k)$ without resorting to grand-canonical simulations, yielding neural functionals applicable to both canonical and grand-canonical contexts. Demonstrations on 1D hard rods and 3D truncated Lennard-Jones fluids show accurate recovery of $\beta\mu_k$ and faithful predictions of density profiles, including interfacial coexistence, with results comparable to training on grand-canonical data. The approach broadens the use of neural density functionals for efficient, high-throughput chemical-potential measurements and multiscale predictions in soft matter and solvation problems, using canonical simulation data to build robust density-function mappings.

Abstract

We demonstrate that the machine learning of density functionals allows one to determine simultaneously the equilibrium chemical potential across simulation datasets of inhomogeneous classical fluids. Minimization of a loss function based on an Euler-Lagrange equation yields both the universal one-body direct correlation functional, which is represented locally by a neural network, as well as the system-specific unknown chemical potential values. The method can serve as an efficient alternative to conventional computational techniques of measuring the chemical potential. It also facilitates using canonical data from Brownian dynamics, molecular dynamics, or Monte Carlo simulations as a basis for constructing neural density functionals, which are fit for accurate multiscale prediction of soft matter systems in equilibrium.

Determining the chemical potential via universal density functional learning

TL;DR

The paper tackles determining equilibrium chemical potentials across datasets of inhomogeneous classical fluids by learning a neural representation of the universal one-body direct correlation functional while concurrently estimating system-specific chemical potentials . It introduces an augmented density-functional learning framework where the loss drives simultaneous optimization of the neural and the , exploiting the fact that acts as an additive offset to . This enables recovering unknown chemical potentials solely from canonical data without resorting to grand-canonical simulations, yielding neural functionals applicable to both canonical and grand-canonical contexts. Demonstrations on 1D hard rods and 3D truncated Lennard-Jones fluids show accurate recovery of and faithful predictions of density profiles, including interfacial coexistence, with results comparable to training on grand-canonical data. The approach broadens the use of neural density functionals for efficient, high-throughput chemical-potential measurements and multiscale predictions in soft matter and solvation problems, using canonical simulation data to build robust density-function mappings.

Abstract

We demonstrate that the machine learning of density functionals allows one to determine simultaneously the equilibrium chemical potential across simulation datasets of inhomogeneous classical fluids. Minimization of a loss function based on an Euler-Lagrange equation yields both the universal one-body direct correlation functional, which is represented locally by a neural network, as well as the system-specific unknown chemical potential values. The method can serve as an efficient alternative to conventional computational techniques of measuring the chemical potential. It also facilitates using canonical data from Brownian dynamics, molecular dynamics, or Monte Carlo simulations as a basis for constructing neural density functionals, which are fit for accurate multiscale prediction of soft matter systems in equilibrium.

Paper Structure

This paper contains 1 section, 4 equations, 5 figures.

Table of Contents

  1. End matter

Figures (5)

  • Figure 1: Workflow for determining chemical potential values across a dataset of $n$ inhomogeneous systems via density functional learning. Data from one simulation run $k$ consists of the temperature value $T_k$, the external potential $V_\mathrm{ext}^{(k)}(\mathbf{r})$ (gray lines), and the density profile $\rho_k(\mathbf{r})$ (blue lines); in one spatial dimension or for planar symmetry $\mathbf{r} = x$. Supervised training based on the loss function \ref{['eq:EL_loss']} determines both the universal one-body direct correlation functional $c_1(\mathbf{r}; [\rho], T)$, which is represented locally as a neural network (see Appendix A), as well as the system-specific chemical potential values $\mu_k$.
  • Figure 2: Predictions for the scaled chemical potential values $\beta \mu_\mathrm{fit}$ (top row) for datasets of hard rods in $d = 1$ dimension (a) and the truncated Lennard-Jones fluid in $d = 3$ dimensions and planar symmetry (b). The Lennard-Jones fluid is addressed via thermal training SammullerNeuralDensityFunctional2025 in the temperature range $1.0 < k_B T / \varepsilon < 2.0$. The results show excellent agreement with the simulation reference $\beta \mu_\mathrm{sim}$, see the consistently small difference $\beta \Delta \mu = \beta \mu_\mathrm{fit} - \beta \mu_\mathrm{sim}$ (middle row). The trained neural correlation functionals $c_1(x; [\rho])$ (a) and $c_1(x; [\rho], T)$ (b) are directly applicable for the calculation of density profiles (bottom row, solid blue lines). We consider hard-wall confinement in a planar slit of length $10 \sigma$ for hard rods (a) and compare the prediction to Percus' exact density functional result PercusEquilibriumStateClassical1976 (dotted black line). For the thermally trained functional of the Lennard-Jones fluid (b), we predict phase coexistence and show an exemplary density profile of the liquid-gas interface, which is compared to the neural result of Ref. SammullerNeuralDensityFunctional2025 (dotted black line).
  • Figure 3: Results for the density profile (solid blue line) of the truncated Lennard-Jones fluid in planar hard wall confinement obtained from training a neural functional with data from canonical Monte Carlo simulations with unknown chemical potential values. For comparison, we have also performed training with grand canonical data (dashed orange line, see also Appendix B and Fig. \ref{['fig:3D-hard-spheres_3D-LJ-T1.5']}) and take as ultimate reference the density profile from a grand canonical Monte Carlo simulation (dotted black line). The agreement of all three routes confirms the accuracy of the prediction and the feasibility of neural density functional construction based on canonical data.
  • Figure 4: Results for the hard sphere fluid (a) and the truncated Lennard-Jones fluid at temperature $k_B T = 1.5 \varepsilon$ (b) analogously to Fig. \ref{['fig:1D-hard-rods_3D-LJ-Tvar']}. The values $\beta \mu_\mathrm{fit}$ recovered via the present procedure agree with the simulation reference $\beta \mu_\mathrm{sim}$ (top row), as confirmed by the small values of the scaled potential difference $\beta \Delta \mu = \beta \mu_\mathrm{fit} - \beta \mu_\mathrm{sim}$ (middle row). The density profiles (bottom row, solid blue lines) correspond to confinement between hard walls of separation distance $10 \sigma$ and are obtained via self-consistent solution of Eq. \ref{['eq:EL']} with the neural functional $c_1(x; [\rho])$ resulting from the minimization of the loss function \ref{['eq:EL_loss']}. For comparison, we show results of neural functionals that have been trained directly with grand canonical data using known values of $\mu$ (dashed orange lines) as well as density profiles from grand canonical Monte Carlo simulations (dotted black lines).
  • Figure 5: Comparison of results for training with reduced dataset sizes $n = 100$, 50, and 20, as indicated. Scaled chemical potential values $\beta \mu_\mathrm{fit}$ are recovered reliably for the case $n = 100$. Deviations to the reference data $\beta \mu_\mathrm{sim}$ become noticeable for $n = 50$. For $n = 20$, the procedure only yields correct results for small chemical potentials, while larger values are underestimated.