FOCUS

Machine Learning Predicts Liquid–Gas Transition

Physics 18, 17
Conventional theory has trouble predicting the conditions that will cause a liquid to boil, but a neural-network-based approach performs better.
Serg Zastavkin/stock.adobe.com
Transitions. Water is one of many substances whose phase—liquid, solid, or gas—depends on the temperature and pressure. A machine-learning technique improves scientists’ ability to predict which form a substance will take under specific conditions.

It’s surprisingly difficult to predict whether a substance will be a liquid or a gas under given conditions. Now researchers have demonstrated improved phase-transition predictions by applying a recently developed technique that combines a standard theoretical approach with a neural network [1]. Their results for a model substance agree with simulations even for regimes that were not included in the neural network’s training set. The researchers expect the new technique to find wide use by scientists trying to understand the behavior of liquids and gases.

In applied chemistry and materials science, a mathematical approach called classical density-functional theory (DFT) allows researchers to predict the behavior of a system of interacting particles. The particles are stand-ins for atoms or molecules that could collectively form a liquid or a gas, for example. The theory asserts that the lowest-energy state of a system at equilibrium can be calculated by finding the 3D distribution of particles that minimizes a quantity called the free-energy functional. This functional reflects the various ways the particles can interact.

But creating a functional that gives accurate predictions for a large number of particles—even if the interaction is assumed to be as simple as that of billiard balls—is a major challenge, says Florian Sammüller of the University of Bayreuth in Germany. Given those difficulties, predictions for real atoms are even harder. “Classical DFT is conceptually powerful,” he says, “yet we require approximations to make actual predictions, and finding good approximations turns out to be very difficult for realistic materials. So progress in the field has been slow.”

One approach to this problem is to simulate the interactions of a system of particles and then to use those results to construct a free-energy functional. But such efforts, Sammüller says, require large amounts of computing resources and often give only hints of the overall behavior. Moreover, there are no shortcuts that allow you to predict how a fluid will change as the temperature changes. “You usually have to run another simulation” at each temperature, he says.

F. Sammüller et al. [1]
Just a phase. A plot of the inverse of the isothermal compressibility of the truncated Lennard-Jones fluid, calculated using the machine-learning-assisted DFT method. Values range from large and positive (dark red) through 0 (white) to large and negative (dark blue). This quantity reflects changes in the fluid properties with varying temperature (increasing upward) and density (increasing to the right). In the red area, the fluid is either a liquid or a gas, depending on the conditions. In the blue area, the fluid spontaneously separates into liquid and gaseous regions. The technique correctly predicts the shape of the white line even when trained only on data corresponding to temperatures above the parabolic peak (pink dots).

In previous work, Sammüller and colleagues have given a proof of principle of a more powerful way to use computer simulations to improve the reliability of DFT. Rather than using simulations as a source of insight to help refine their choice of the free-energy functional, they used simulations to train a neural network to estimate this functional directly. Importantly, in the training data, they included results from simulations run at a range of temperatures and other conditions. They then used this trained network as a replacement for the free-energy functional in the DFT calculation.

The researchers have already demonstrated the efficacy of this approach for a simple model system—a gas of hard sphere particles that interact only when they collide [2]. But this simple system cannot exhibit both liquid and gas phases. The team has now applied the method to a more realistic model fluid, called the truncated Lennard-Jones fluid. In this model, particles interact in pairs, repelling at short distances, attracting at somewhat larger distances, and having zero interaction at the largest distances. Based on extensive simulations, physicists already understand the behavior of this more complex model in detail.

To apply their machine-learning technique, the researchers first conducted nearly 900 distinct simulations of the model fluid under different physical conditions, including a wide range of temperatures, and used these data to train their neural network. They then used this network in a DFT calculation to estimate a variety of fluid properties. They found that the new approach gave results agreeing closely with prior simulations, including capturing the precise details of the liquid-to-gas transition and its dependence on temperature and other conditions.

In some ways, the success was even better than expected. For example, the team was initially concerned about applying the neural network to conditions for which there is no stable liquid or gas. “In the simulations, the network never saw such cases, so why should its prediction make any sense?” Sammüller says. “But these concerns turned out to be unfounded.”

The accuracy of the technique is “nothing short of astounding,” says theoretical physicist Andrew Parry of Imperial College London. “The combination of machine learning and classical DFT described in this paper is eye-opening,” he says, “and there is no reason to think the approach can't be used for more complex fluids. I'm sure the technique will quickly be adopted by the community.”

An obvious next step, Sammüller says, is to apply the method to more realistic and complicated fluids, such as water or molecular mixtures. “A nice thing about classical DFT is that it is quite general,” he adds, “so we expect very similar techniques to work for these more sophisticated cases.”

–Mark Buchanan

Mark Buchanan is a freelance science writer who splits his time between Abergavenny, UK, and Notre Dame de Courson, France.

References

  1. F. Sammüller et al., “Neural density functional theory of liquid-gas phase coexistence,” Phys. Rev. X 15, 011013 (2025).
  2. F. Sammüller et al., “Neural functional theory for inhomogeneous fluids: Fundamentals and applications,” Proc. Natl. Acad. Sci. U.S.A. 120, e2312484120 (2023).

Subject Areas

Condensed Matter Physics

Related Articles

A New Path to Superconductivity
Condensed Matter Physics

A New Path to Superconductivity

Theorists propose that repulsive interactions between electrons in a two-dimensional lattice can lead to an exotic form of superconductivity. Read More »

Tailored Superconducting Circuit for Quantum Technologies
Superconductivity

Tailored Superconducting Circuit for Quantum Technologies

A circuit containing four superconducting devices called Josephson junctions can be finely tuned for various technological applications. Read More »

Oscillating Magnetoresistance
Materials Science

Oscillating Magnetoresistance

At low temperatures the resistance of a layered magnetic semiconductor shoots up and down in response to an increasing magnetic field. Read More »

More Articles