Efficient mapping of phase diagrams with conditional Boltzmann Generators

Maximilian Schebek, Michele Invernizzi, Frank Noé, Jutta Rogal

TL;DR

This paper introduces a novel deep learning approach using conditional Boltzmann Generators (BGs) to efficiently map out entire phase diagrams. By training a single model to transform samples from one reference thermodynamic state to many others, it significantly reduces the computational cost of predicting phase stability, achieving state-of-the-art accuracy for a Lennard-Jones system.

What Problem Does This Paper Address?

Predicting phase diagrams, which describe the stable phases of a material as a function of temperature and pressure, is crucial for materials science. However, computationally determining the relative stability of different phases (e.g., solid vs. liquid) is extremely challenging. Traditional methods rely on free energy calculations, which typically require a vast number of simulations across a grid of thermodynamic states to obtain statistically independent samples. This process is computationally expensive, time-consuming, and often requires significant trial-and-error to define an appropriate simulation grid. Existing methods like Targeted Free Energy Perturbation (TFEP) offer improvements but still require training separate models for each thermodynamic state, making them inefficient for mapping entire phase diagrams.

Methods

The authors generalize the concept of learned free energy perturbation (LFEP) and Boltzmann Generators (BGs) by introducing conditional normalizing flows. These are deep generative models that learn to transform samples from a prior distribution (obtained from a single reference thermodynamic state via molecular dynamics) to approximate target equilibrium distributions at various thermodynamic states (temperature and pressure). The key innovation is conditioning the normalizing flow on the target thermodynamic state (T, P). This allows a single trained model to generate samples across a wide range of conditions.

The training is performed using an energy-based approach, minimizing the conditional Kullback-Leibler divergence between the generated and target distributions. A permutation-equivariant architecture is employed to treat solid and liquid phases symmetrically. The volume transformation is handled by an affine transformation, and the atomic configurations are scaled to fractional coordinates before being transformed by a conditional coupling flow.

Datasets

The paper uses a 180-particle Lennard-Jones (LJ) system as a benchmark. The prior equilibrium distribution at a reference state (T = 1.0, P = 14.0) is sampled using Molecular Dynamics (MD). The conditional flow is trained to generate samples for a range of thermodynamic states: T ∈ [0.6, 1.6] and P ∈ [1, 20]. The performance is evaluated against results obtained from traditional MD simulations combined with the MBAR (Multistate Bennet Acceptance Ratio) method.

Key Insights and Ideas

  • Conditional Flows for Phase Diagrams: The core idea is that a single deep learning model, conditioned on thermodynamic variables (T, P), can learn to map samples from one state to many others, drastically reducing the need for simulations at every point on the phase diagram.
  • Efficiency Through Generative Models: By leveraging normalizing flows, the model can generate uncorrelated equilibrium samples "in one go," bypassing the slow sampling process of traditional MD/MC.
  • Symmetry for Solid/Liquid: Using a permutation-equivariant architecture allows the model to treat ordered (solid) and disordered (liquid) phases on an equal footing, simplifying the analysis of phase transitions.
  • Amortized Cost: While training a conditional flow takes longer than a single-point flow, the computational cost is amortized over the entire phase diagram, making it significantly more efficient for mapping.
  • Minimal Prior Knowledge: The approach requires only minimal prior knowledge of the system and the approximate location of the coexistence region, making it more accessible than methods requiring precise initial guesses.

Key Results

  • The conditional BG approach accurately predicts the solid-liquid coexistence line for the Lennard-Jones system, showing excellent agreement with high-accuracy MD+MBAR results.
  • The method achieves a significant reduction in computational cost, estimated to be a factor of 5 fewer energy evaluations compared to traditional MBAR for mapping the phase diagram.
  • The conditional flow demonstrates high sampling efficiency (over 60%) across a wide range of thermodynamic states, even far from the prior state.
  • Radial distribution functions (RDFs) generated by the conditional flow are nearly indistinguishable from MD results, indicating accurate capture of pairwise correlations.
  • The error in melting temperature prediction is within 0.01 T* compared to reference calculations.

Limitations and Future Work

  • System Size Scaling: The authors acknowledge that sampling efficiency decreases significantly with increasing system sizes. Applying this method to realistic systems with thousands of atoms remains a challenge. Future work might involve training transferable models on small systems that can be applied to larger ones.
  • Reference Systems: The connection to tractable reference systems for calculating absolute free energies is still computationally expensive. The authors suggest developing a flow-based framework to directly compute free energy differences between phases, ideally utilizing prior samples from both phases.
  • Potential Accuracy: The current work uses a Lennard-Jones potential. Future work aims to extend the approach to more accurate potentials and molecular crystals.
  • Inclusion of Molecular Crystals: The authors plan to include molecular crystals in future work.

Summary updated

Abstract

The accurate prediction of phase diagrams is of central importance for both the fundamental understanding of materials as well as for technological applications in material sciences. However, the computational prediction of the relative stability between phases based on their free energy is a daunting task, as traditional free energy estimators require a large amount of simulation data to obtain uncorrelated equilibrium samples over a grid of thermodynamic states. In this work, we develop deep generative machine learning models based on the Boltzmann Generator approach for entire phase diagrams, employing normalizing flows conditioned on the thermodynamic states, e.g., temperature and pressure, that they map to. By training a single normalizing flow to transform the equilibrium distribution sampled at only one reference thermodynamic state to a wide range of target temperatures and pressures, we can efficiently generate equilibrium samples across the entire phase diagram. Using a permutation-equivariant architecture allows us, thereby, to treat solid and liquid phases on the same footing. We demonstrate our approach by predicting the solid-liquid coexistence line for a Lennard-Jones system in excellent agreement with state-of-the-art free energy methods while significantly reducing the number of energy evaluations needed.
BibTeX
@article{schebek2024efficient,
  author = {Maximilian Schebek and Michele Invernizzi and Frank Noé and Jutta Rogal},
  title = {{Efficient mapping of phase diagrams with conditional Boltzmann Generators}},
  journal = {Mach. Learn. Sci. Technol},
  year = {2024},
  doi = {10.1088/2632-2153/ad849d},
}

Loading related content...

Figure