- Editors' Suggestion
- Open Access
Determining the Chemical Potential via Universal Density Functional Learning
Phys. Rev. Lett. 136, 068202 – Published 10 February, 2026
DOI: https://doi.org/10.1103/7bqn-y2d7
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.
Physics Subject Headings (PhySH)
Article Text
References (87)
- G. Cook and R. H. Dickerson, Understanding the chemical potential, Am. J. Phys. 63, 737 (1995).
- R. Baierlein, The elusive chemical potential, Am. J. Phys. 69, 423 (2001).
- G. Job and F. Herrmann, Chemical potential—A quantity in search of recognition, Eur. J. Phys. 27, 353 (2006).
- J.-P. Hansen and I. R. McDonald, Theory of Simple Liquids: With Applications to Soft Matter, 4th ed. (Academic Press, Amstersdam, 2013).
- B. Widom, Some topics in the theory of fluids, J. Chem. Phys. 39, 2808 (1963).
- J. L. Jackson and L. S. Klein, Potential distribution method in equilibrium statistical mechanics, Phys. Fluids 7, 228 (1964).
- I. Nezbeda and J. Kolafa, A new version of the insertion particle method for determining the chemical potential by Monte Carlo simulation, Mol. Simul. 5, 391 (1991).
- J. Powles, W. Evans, and N. Quirke, Non-destructive molecular-dynamics simulation of the chemical potential of a fluid, Mol. Phys. 46, 1347 (1982).
- K. Shing and K. Gubbins, The chemical potential from computer simulation: Test particle method with umbrella sampling, Mol. Phys. 43, 717 (1981).
- K. Shing and K. Gubbins, The chemical potential in non-ideal liquid mixtures: Computer simulation and theory, Mol. Phys. 49, 1121 (1983).
- B. Smit and D. Frenkel, Calculation of the chemical potential in the Gibbs ensemble, Mol. Phys. 68, 951 (1989).
- D. A. Kofke and P. T. Cummings, Quantitative comparison and optimization of methods for evaluating the chemical potential by molecular simulation, Mol. Phys. 92, 973 (1997).
- N. Lu, J. K. Singh, and D. A. Kofke, Appropriate methods to combine forward and reverse free-energy perturbation averages, J. Chem. Phys. 118, 2977 (2003).
- D. Frenkel and B. Smit, Understanding Molecular Simulation: From Algorithms to Applications, 3rd ed. (Academic Press, Amsterdam, 2023).
- A. Santos, S. B. Yuste, and M. López De Haro, Structural and thermodynamic properties of hard-sphere fluids, J. Chem. Phys. 153, 120901 (2020).
- C. P. Royall, P. Charbonneau, M. Dijkstra, J. Russo, F. Smallenburg, T. Speck, and C. Valeriani, Colloidal hard spheres: Triumphs, challenges, and mysteries, Rev. Mod. Phys. 96, 045003 (2024).
- P. Attard, Simulation of the chemical potential and the cavity free energy of dense hard-sphere fluids, J. Chem. Phys. 98, 2225 (1993).
- D. M. Heyes and A. Santos, Chemical potential of a test hard sphere of variable size in a hard-sphere fluid, J. Chem. Phys. 145, 214504 (2016).
- D. M. Heyes and A. Santos, Chemical potential of a test hard sphere of variable size in hard-sphere fluid mixtures, J. Chem. Phys. 148, 214503 (2018).
- R. L. Davidchack and B. B. Laird, Chemical potential and surface free energy of a hard spherical particle in hard-sphere fluid over the full range of particle diameters, J. Chem. Phys. 157, 074701 (2022).
- R. P. A. Dullens, D. G. A. L. Aarts, and W. K. Kegel, Direct measurement of the free energy by optical microscopy, Proc. Natl. Acad. Sci. U.S.A. 103, 529 (2006).
- L. Belloni, Non-equilibrium hybrid insertion/extraction through the 4th dimension in grand-canonical simulation, J. Chem. Phys. 151, 021101 (2019).
- N. B. Wilding and M. Müller, Accurate measurements of the chemical potential of polymeric systems by Monte Carlo simulation, J. Chem. Phys. 101, 4324 (1994).
- H. Wang, C. Hartmann, C. Schütte, and L. Delle Site, Grand-canonical-like molecular-dynamics simulations by using an adaptive-resolution technique, Phys. Rev. X 3, 011018 (2013).
- A. Agarwal, H. Wang, C. Schütte, and L. D. Site, Chemical potential of liquids and mixtures via adaptive resolution simulation, J. Chem. Phys. 141, 034102 (2014).
- L. Delle Site, C. Krekeler, J. Whittaker, A. Agarwal, R. Klein, and F. Höfling, Molecular dynamics of open systems: Construction of a mean-field particle reservoir, Adv. Theory Simul. 2, 1900014 (2019).
- A. Gholami, F. Höfling, R. Klein, and L. Delle Site, Thermodynamic relations at the coupling boundary in adaptive resolution simulations for open systems, Adv. Theory Simul. 4, 2000303 (2021).
- K. B. Daly, J. B. Benziger, P. G. Debenedetti, and A. Z. Panagiotopoulos, Massively parallel chemical potential calculation on graphics processing units, Comput. Phys. Commun. 183, 2054 (2012).
- M. Zhao, A. A. Kognole, S. Jo, A. Tao, A. Hazel, and A. D. MacKerell, GPU-specific algorithms for improved solute sampling in grand canonical Monte Carlo simulations, J. Comput. Chem. 44, 1719 (2023).
- K. Binder, B. J. Block, P. Virnau, and A. Tröster, Beyond the van der Waals loop: What can be learned from simulating Lennard-Jones fluids inside the region of phase coexistence, Am. J. Phys. 80, 1099 (2012).
- J. I. Siepmann, I. R. McDonald, and D. Frenkel, Finite-size corrections to the chemical potential, J. Phys. Condens. Matter 4, 679 (1992).
- U. Heinbuch and J. Fischer, On the application of Widom’s test particle method to homogeneous and inhomogeneous fluids, Mol. Simul. 1, 109 (1987).
- C. Perego, F. Giberti, and M. Parrinello, Chemical potential calculations in dense liquids using metadynamics, Eur. Phys. J. Spec. Top. 225, 1621 (2016).
- C. Perego, O. Valsson, and M. Parrinello, Chemical potential calculations in non-homogeneous liquids, J. Chem. Phys. 149, 072305 (2018).
- M. Heidari, K. Kremer, R. Cortes-Huerto, and R. Potestio, Spatially resolved thermodynamic integration: An efficient method to compute chemical potentials of dense fluids, J. Chem. Theory Comput. 14, 3409 (2018).
- E. A. Ustinov, Efficient chemical potential evaluation with kinetic Monte Carlo method and non-uniform external potential: Lennard-Jones fluid, liquid, and solid, J. Chem. Phys. 147, 014105 (2017).
- P. S. Clegg, Characterising soft matter using machine learning, Soft Matter 17, 3991 (2021).
- M. Dijkstra and E. Luijten, From predictive modelling to machine learning and reverse engineering of colloidal self-assembly, Nat. Mater. 20, 762 (2021).
- E. Boattini, M. Dijkstra, and L. Filion, Unsupervised learning for local structure detection in colloidal systems, J. Chem. Phys. 151, 154901 (2019).
- G. Campos-Villalobos, E. Boattini, L. Filion, and M. Dijkstra, Machine learning many-body potentials for colloidal systems, J. Chem. Phys. 155, 174902 (2021).
- G. Campos-Villalobos, G. Giunta, S. Marín-Aguilar, and M. Dijkstra, Machine-learning effective many-body potentials for anisotropic particles using orientation-dependent symmetry functions, J. Chem. Phys. 157, 024902 (2022).
- T. Santos-Silva, P. I. C. Teixeira, C. Anquetil-Deck, and D. J. Cleaver, Neural-network approach to modeling liquid crystals in complex confinement, Phys. Rev. E 89, 053316 (2014).
- S.-C. Lin and M. Oettel, A classical density functional from machine learning and a convolutional neural network, SciPost Phys. 6, 025 (2019).
- S.-C. Lin, G. Martius, and M. Oettel, Analytical classical density functionals from an equation learning network, J. Chem. Phys. 152, 021102 (2020).
- P. Cats, S. Kuipers, S. De Wind, R. Van Damme, G. M. Coli, M. Dijkstra, and R. Van Roij, Machine-learning free-energy functionals using density profiles from simulations, APL Mater. 9, 031109 (2021).
- C. Qiao, X. Yu, X. Song, T. Zhao, X. Xu, S. Zhao, and K. E. Gubbins, Enhancing gas solubility in nanopores: A combined study using classical density functional theory and machine learning, Langmuir 36, 8527 (2020).
- P. Yatsyshin, S. Kalliadasis, and A. B. Duncan, Physics-constrained Bayesian inference of state functions in classical density-functional theory, J. Chem. Phys. 156, 074105 (2022).
- A. Malpica-Morales, P. Yatsyshin, M. A. Durán-Olivencia, and S. Kalliadasis, Physics-informed Bayesian inference of external potentials in classical density-functional theory, J. Chem. Phys. 159, 104109 (2023).
- X. Fang, M. Gu, and J. Wu, Reliable emulation of complex functionals by active learning with error control, J. Chem. Phys. 157, 214109 (2022).
- A. Simon, J. Weimar, G. Martius, and M. Oettel, Machine learning of a density functional for anisotropic patchy particles, J. Chem. Theory Comput. 20, 1062 (2024).
- A. Simon, L. Belloni, D. Borgis, and M. Oettel, The orientational structure of a model patchy particle fluid: Simulations, integral equations, density functional theory, and machine learning, J. Chem. Phys. 162, 034503 (2025).
- D. de las Heras, T. Zimmermann, F. Sammüller, S. Hermann, and M. Schmidt, Perspective: How to overcome dynamical density functional theory, J. Phys. Condens. Matter 35, 271501 (2023).
- T. Zimmermann, F. Sammüller, S. Hermann, M. Schmidt, and D. de las Heras, Neural force functional for non-equilibrium many-body colloidal systems, Mach. Learn.: Sci. Technol. 5, 035062 (2024).
- F. Sammüller, S. Hermann, D. de las Heras, and M. Schmidt, Neural functional theory for inhomogeneous fluids: Fundamentals and applications, Proc. Natl. Acad. Sci. U.S.A. 120, e2312484120 (2023).
- F. Sammüller, Neural functional theory for inhomogeneous fluids—Tutorial (2023), https://github.com/sfalmo/NeuralDFT-Tutorial.
- F. Sammüller, S. Hermann, and M. Schmidt, Why neural functionals suit statistical mechanics, J. Phys. Condens. Matter 36, 243002 (2024).
- F. Sammüller and M. Schmidt, Neural density functionals: Local learning and pair-correlation matching, Phys. Rev. E 110, L032601 (2024).
- F. Sammüller, S. Robitschko, S. Hermann, and M. Schmidt, Hyperdensity functional theory of soft matter, Phys. Rev. Lett. 133, 098201 (2024).
- F. Sammüller and M. Schmidt, Why hyperdensity functionals describe any equilibrium observable, J. Phys. Condens. Matter 37, 083001 (2025).
- S. M. Kampa, F. Sammüller, M. Schmidt, and R. Evans, Metadensity functional theory for classical fluids: Extracting the pair potential, Phys. Rev. Lett. 134, 107301 (2025).
- F. Sammüller, M. Schmidt, and R. Evans, Neural density functional theory of liquid-gas phase coexistence, Phys. Rev. X 15, 011013 (2025).
- M. Buchanan, Machine learning predicts liquid-gas transition, Physics 18, 17 (2025).
- J. Yang, R. Pan, J. Sun, and J. Wu, High-dimensional operator learning for molecular density functional theory, J. Chem. Theory Comput. 21, 5905 (2025).
- A. T. Bui and S. J. Cox, Learning classical density functionals for ionic fluids, Phys. Rev. Lett. 134, 148001 (2025).
- A. T. Bui and S. J. Cox, A first-principles approach to electromechanics in liquids, J. Phys. Condens. Matter 37, 285101 (2025).
- A. T. Bui and S. J. Cox, Dielectrocapillarity for exquisite control of fluids, arXiv:2503.09855.
- F. Glitsch, J. Weimar, and M. Oettel, Neural density functional theory in higher dimensions with convolutional layers, Phys. Rev. E 111, 055305 (2025).
- J. Dijkman, M. Dijkstra, R. Van Roij, M. Welling, J.-W. Van De Meent, and B. Ensing, Learning neural free-energy functionals with pair-correlation matching, Phys. Rev. Lett. 134, 056103 (2025).
- M. M. Kelley, J. Quinton, K. Fazel, N. Karimitari, C. Sutton, and R. Sundararaman, Bridging electronic and classical density-functional theory using universal machine-learned functional approximations, J. Chem. Phys. 161, 144101 (2024).
- R. Pan, X. Fang, K. Azizzadenesheli, M. Liu-Schiaffini, M. Gu, and J. Wu, Neural operators for forward and inverse potential–density mappings in classical density functional theory, J. Chem. Phys. 163, 164120 (2025).
- R. Evans, The nature of the liquid-vapour interface and other topics in the statistical mechanics of non-uniform, classical fluids, Adv. Phys. 28, 143 (1979).
- P. Hohenberg and W. Kohn, Inhomogeneous electron gas, Phys. Rev. 136, B864 (1964).
- R. Pederson, B. Kalita, and K. Burke, Machine learning and density functional theory, Nat. Rev. Phys. 4, 357 (2022).
- R. Stierle, G. Bauer, N. Thiele, B. Bursik, P. Rehner, and J. Gross, Classical density functional theory in three dimensions with GPU-accelerated automatic differentiation: Computational performance analysis using the example of adsorption in covalent-organic frameworks, Chem. Eng. Sci. 298, 120380 (2024).
The existence of universal density functionals has originally been demonstrated in seminal work for ground states of quantum many-body systems [72]. This formal structure holds analogously for the case of classical fluids [71].
- D. Borgis, R. Assaraf, B. Rotenberg, and R. Vuilleumier, Computation of pair distribution functions and three-dimensional densities with a reduced variance principle, Mol. Phys. 111, 3486 (2013).
- D. de las Heras and M. Schmidt, Better than counting: Density profiles from force sampling, Phys. Rev. Lett. 120, 218001 (2018).
- B. Rotenberg, Use the force! Reduced variance estimators for densities, radial distribution functions, and local mobilities in molecular simulations, J. Chem. Phys. 153, 150902 (2020).
- Code, data, and models available at https://github.com/sfalmo/neural-mu.
- J. K. Percus, Equilibrium state of a classical fluid of hard rods in an external field, J. Stat. Phys. 15, 505 (1976).
- D. L. Mobley and J. P. Guthrie, FreeSolv: A database of experimental and calculated hydration free energies, with input files, J. Comput. Aided Mol. Des. 28, 711 (2014).
- S. Luukkonen, L. Belloni, D. Borgis, and M. Levesque, Predicting hydration free energies of the FreeSolv database of drug-like molecules with molecular density functional theory, J. Chem. Inf. Model. 60, 3558 (2020).
- V. P. Sergiievskyi, G. Jeanmairet, M. Levesque, and D. Borgis, Fast computation of solvation free energies with molecular density functional theory: Thermodynamic-ensemble partial molar volume corrections, J. Phys. Chem. Lett. 5, 1935 (2014).
- E. L. Ratkova, D. S. Palmer, and M. V. Fedorov, Solvation thermodynamics of organic molecules by the molecular integral equation theory: Approaching chemical accuracy, Chem. Rev. 115, 6312 (2015).
- K. Binder, J. Horbach, W. Kob, W. Paul, and F. Varnik, Molecular dynamics simulations, J. Phys. Condens. Matter 16, S429 (2004).
- D. de las Heras and M. Schmidt, Full canonical information from grand-potential density-functional theory, Phys. Rev. Lett. 113, 238304 (2014).
- H. Hansen-Goos and R. Roth, Density functional theory for hard-sphere mixtures: The White Bear version mark II, J. Phys. Condens. Matter 18, 8413 (2006).