Learning Electron Densities in the Condensed Phase

Alan M. Lewis, Andrea Grisafi, Michele Ceriotti, Mariana RossiJournal of Chemical Theory and Computation 2021 · DOI

TL;DR

This paper introduces SALTED, a machine learning method that accurately predicts electron densities for condensed-phase materials, including metals, semiconductors, and molecular crystals. This approach allows for efficient calculation of electronic properties with errors comparable to traditional DFT methods, even for systems significantly larger than those used for training.

What Problem Does This Paper Address?

Accurately calculating the electron density of materials is fundamental to understanding their properties using methods like Density Functional Theory (DFT). However, DFT calculations scale poorly with system size, limiting their application to relatively small systems (a few thousand atoms). This bottleneck is particularly acute for simulations of dynamic processes like molecular dynamics, where many successive calculations are needed. While machine learning offers a path to bypass DFT's computational cost, existing methods often struggle with periodic systems or require computationally expensive representations. This paper aims to develop a machine learning method that can efficiently and accurately predict electron densities for periodic condensed-phase systems, overcoming the limitations of traditional DFT and previous ML approaches.

Methods

The core of this work is the Symmetry-Adapted Learning of Three-Dimensional Electron Densities (SALTED) method. SALTED leverages a numerical, atom-centered auxiliary basis to represent the electron density. This basis allows for an accurate expansion of the all-electron density in a form suitable for learning, bridging the gap between isolated and periodic systems. The method employs symmetry-adapted Gaussian process regression (SA-GPR), which is designed to handle the rotational covariance of the density coefficients. Crucially, SALTED is adapted to handle the non-orthogonal nature of the auxiliary basis inherent in periodic systems. The learning problem is framed as predicting expansion coefficients of the density in this auxiliary basis, rather than directly predicting the density on a grid.

Datasets

The authors used three homogeneous datasets for training and evaluation:

  1. Aluminium dataset: 50 1-atom and 50 4-atom unit cells with randomly varied atomic positions and lattice vectors.
  2. Silicon dataset: 50 2-atom and 50 16-atom unit cells, taken from a previous study and including deformations and atomic position variations.
  3. Ice dataset: 100 structures of ice containing four water molecules, generated from NPT molecular dynamics trajectories.

Additionally, they created heterogeneous datasets by:

  • Amalgamating the Al, Si, and ice datasets into a "mixed" dataset.
  • Using a dataset of hybrid organic-inorganic perovskites (HOIPs), each containing Sn, F, and organic molecules.

Key Insights and Ideas

  • Bridging the gap between isolated and periodic systems: The use of a numerical, atom-centered auxiliary basis is key to making machine learning of electron densities applicable to both finite and periodic systems seamlessly.
  • Leveraging symmetry for efficiency: SA-GPR ensures that the learning process respects the inherent symmetries of the electron density, leading to more efficient and transferable models.
  • Extrapolation power: The most striking insight is the ability to train on small systems (e.g., 4-molecule ice cells) and accurately predict properties of much larger systems (up to 512 molecules) without a significant increase in error. This demonstrates a powerful capability for simulating large-scale phenomena.
  • Indirect vs. Direct Prediction: Predicting electron densities indirectly (via SALTED) and then deriving properties can be more accurate than training a direct machine learning model for each property, especially for extrapolated systems.

Key Results

  • High accuracy for homogeneous systems: SALTED achieved root-mean-square errors (RMSE) below 0.15% for the RI density on the homogeneous datasets.
  • Accurate property prediction: Derived electronic properties (exchange-correlation and electrostatic energies) showed errors on the order of tens of meV/atom, comparable to ab initio DFT.
  • Scalability to large systems: Models trained on small ice unit cells (4 molecules) could accurately predict densities and derived energies for supercells containing up to 512 molecules, with no increase in error.
  • Improved accuracy for extrapolated systems: Energies derived from SALTED-predicted densities for large ice systems were more accurate than those predicted by a direct machine learning model.
  • Heterogeneous dataset performance: SALTED achieved errors below 4% for mixed datasets and below 2% for HOIP datasets, demonstrating its applicability to complex chemical environments.

Limitations and Future Work

  • Computational cost for heterogeneous systems: Training SALTED models for highly heterogeneous datasets requires a larger number of sparse environments (M), leading to potentially large matrices that are computationally expensive to invert. The authors suggest exploring direct minimization of the loss function as a solution.
  • Charge conservation in heterogeneous systems: For highly heterogeneous datasets, particularly those with heavy atoms like Sn, charge conservation can be an issue. Future work could involve fine-tuning the SOAP descriptor's spatial resolution to better capture different density components.
  • Non-local effects: The current method is local and may struggle with systems dominated by non-local physical effects (e.g., highly polarizable surfaces, ionic systems). Integrating long-range representations of atomic structure is proposed as a future direction.
  • Density gradients: Incorporating the prediction of density gradients alongside electron densities is suggested for indirect prediction of properties using generalized-gradient approximation functionals.

Summary updated

Abstract

We introduce a local machine-learning method for predicting the electron densities of periodic systems. The framework is based on a numerical, atom-centered auxiliary basis, which enables an accurate expansion of the all-electron density in a form suitable for learning isolated and periodic systems alike. We show that, using this formulation, the electron densities of metals, semiconductors, and molecular crystals can all be accurately predicted using symmetry-adapted Gaussian process regression models, properly adjusted for the nonorthogonal nature of the basis. These predicted densities enable the efficient calculation of electronic properties, which present errors on the order of tens of meV/atom when compared to <i>ab initio</i> density-functional calculations. We demonstrate the key power of this approach by using a model trained on ice unit cells containing only 4 water molecules to predict the electron densities of cells containing up to 512 molecules and see no increase in the magnitude of the errors of derived electronic properties when increasing the system size. Indeed, we find that these extrapolated derived energies are more accurate than those predicted using a direct machine-learning model. Finally, on heterogeneous data sets SALTED can predict electron densities with errors below 4%.
BibTeX
@article{lewis2021learning,
  author = {Alan M. Lewis and Andrea Grisafi and Michele Ceriotti and Mariana Rossi},
  title = {{Learning Electron Densities in the Condensed Phase}},
  journal = {Journal of Chemical Theory and Computation},
  year = {2021},
  doi = {10.1021/acs.jctc.1c00576},
}
Figure