Technology
The technology behind Advance/OF-DFT
To make DFT without orbitals practical, AdvanceSoft developed two technologies of its own: the Graphical, a deep-learning algorithm for continuous fields, and AOF-DFT, a new DFT framework that makes norm-conserving pseudopotentials usable.
Orbital-free DFT: density functional theory at O(N)
Density functional theory (DFT) rests on the Hohenberg-Kohn theorems: the energy of a system is given as a functional of the electron density , and minimizing it yields the ground state [1]. The standard method, Kohn-Sham DFT (KS-DFT), uses the Kohn-Sham orbitals to compute the kinetic energy [2].
Obtaining the KS orbitals requires solving an eigenvalue problem numerically, and the computational cost grows with the number of atoms as . This is why first-principles calculations are said to be expensive.
Orbital-free DFT (OF-DFT), in contrast, also expresses the kinetic energy as a functional of the electron density, , and optimizes the electron density directly without orbitals. The computational cost is . When the number of atoms increases tenfold, the computation time of KS-DFT grows about 1000-fold, whereas that of OF-DFT grows only about tenfold.
| KS-DFT | OF-DFT | ML interatomic potentials | |
|---|---|---|---|
| Electron density | Yes | Yes | No |
| Orbitals | Yes | No | No |
| Accuracy | High | Depends on the functional | Depends on the potential |
| Computational cost | O(N³) | O(N) | O(N) |
| Generality | Applicable to all elements | Limited by pseudopotentials | Depends on the potential |
OF-DFT has long faced two challenges.
- Accuracy of the kinetic energy functional: The exact form is not known. Approximate expressions and machine-learning approaches have been studied, but none achieved the accuracy and generality required for practical use [3, 4].
- Pseudopotentials: Because orbital-dependent nonlocal operators cannot be used, only local pseudopotentials were available, which limited the elements that could be treated [5].
Advance/OF-DFT solves the first with a deep-learned kinetic energy functional built on the Graphical and the second with AOF-DFT.
A deep-learned kinetic energy functional built on the Graphical
When a kinetic energy functional is built by machine learning, the question is how to extract features from the electron density, which is a continuous field. In earlier work, the features at a coordinate (the gradient and Laplacian of the density, convolutions with nonlocal kernels, and so on) were defined by hand in advance, but they lacked the expressive power needed to learn a wide range of materials at once.
In the field of machine-learning interatomic potentials, meanwhile, graph neural networks have been successful: on a graph whose nodes are atoms and whose edges are the relationships between atoms, they learn the features themselves. AdvanceSoft extended this idea to continuous fields and named it the Graphical. The name follows an analogy: as a functional is to a function, the Graphical is to a graph.
| Graph | Graphical |
|---|---|
| Node | Coordinate |
| Edge | Pair of coordinates |
| Feature vector | Field |
| Adjacency matrix | Adjacency correlation |
| Aggregation (sum) of the features of neighboring nodes | Convolution integral with the adjacency correlation as its kernel |
For the adjacency correlation, multiple spherical-shell Gaussian functions with radius and width , denoted , are used as channels that together cover all of space. With the cutoff function , the activation function , and the learnable weights , the update of layer of the Graphical is written as follows.
The key point is that the coordinate remains continuous. Numerical calculations use a mesh, but the parameters of the Graphical do not depend on the fineness or shape of the mesh. The meshes used for training and inference may differ, which yields high transferability.
In the deep-learned kinetic energy functional AdvanceSoft26 (AS26), features built from the gradient and Laplacian of the electron density are fed into the Graphical. For the kinetic energy densities of the Thomas-Fermi (TF) and von Weizsäcker (vW) models, the Graphical then outputs the enhancement factors .
The model for molecular systems adds a term based on the nonlocal Wang-Teter model. The training data are kinetic energies computed with Kohn-Sham DFT and their functional derivatives. Accuracy and speed benchmarks are published in the case studies.
Localized Density Matrix Functional Theory (L-DMFT)
Even with the kinetic energy functional problem solved, the pseudopotential problem remains. Computing the nonlocal term of a norm-conserving pseudopotential requires orbital information, but only in the immediate vicinity of each nucleus. AdvanceSoft therefore developed Localized Density Matrix Functional Theory (L-DMFT), in which the local density matrix of each atom is treated exactly and everything else is computed with functionals of the electron density.
In L-DMFT, the ground-state energy is a functional of the electron density and the one-electron reduced density matrix .
Here is the local potential, is the nonlocal energy of the pseudopotential, and is the Hartree and exchange-correlation energy. Because the density matrix is used only to compute the nonlocal energy, it is sufficient to define it inside the cutoff radius of each atom. The additional information and operations scale only linearly with the number of atoms, so the computational cost remains .
Because the per-atom density matrix corresponds to orbital information near the nucleus, it enables Mulliken charge analysis, which was difficult in pure OF-DFT, and opens the way to implementing local physics such as DFT+U and spin-orbit coupling.
Atomic Orbital Facilitated DFT (AOF-DFT)
Atomic Orbital Facilitated DFT (AOF-DFT) is a method that solves L-DMFT efficiently using pseudo-atomic orbitals. For atom , let the -th pseudo-atomic orbital be , and let be a block-diagonal density matrix that has only intra-atomic components. The electron density is then expressed as follows.
This representation contains no information about wavefunctions extending over the entire system (molecular orbitals or bands), and it has no density matrix elements between different atoms. Taking the variation of the energy functional leads not to a system-wide eigenvalue problem like the Kohn-Sham equations but to a small eigenvalue problem for each atom.
The Hamiltonian includes the functional derivative of the kinetic energy functional, the Hartree and exchange-correlation potentials, the local potential, and the nonlocal term of the pseudopotential. While the eigenvalue equation of each atom is solved, the orbital occupations of all atoms are determined so that the number of electrons is conserved, and the electron density is optimized by SCF calculation.
Advance/OF-DFT adopts the pseudo-atomic orbitals and norm-conserving pseudopotentials used in OpenMX. By reusing pseudopotentials with a proven record in Kohn-Sham DFT, electronic structure analysis as fast as OF-DFT can now be applied to a wide range of elements across the periodic table.
Spatial partitioning of the kinetic energy
Near the nucleus, the valence orbitals have large amplitudes and the kinetic energy becomes very large, so representing it accurately with a functional alone is not easy. AOF-DFT places a weight function near each nucleus and computes the kinetic energy in that region exactly, using the atomic orbitals and the kinetic energy operator.
Here is the kinetic energy near the nuclei (computed from the orbitals) and is the kinetic energy from the functional. The weight function is a smooth function that equals 1 near the nucleus and 0 far from it, and its radius is set to 1.2 times the covalent radius of each atom.
Preconditioning operators
The functional derivative of a machine-learned kinetic energy functional is known to contain noise in the high-frequency region [6]. Because this functional derivative acts as the potential that updates the electron density in the SCF calculation, the SCF calculation becomes unstable if it is used as is. Advance/OF-DFT introduces preconditioning operators that remove the high-frequency components and thereby stabilize the SCF calculation. Five types are available: Gaussian, Lorentz, Teter [7], Damping [8], and Two-Thirds [9].
Forces and stress by automatic differentiation
In AOF-DFT, the variational search space does not depend on the atomic positions or the lattice, so no Pulay force correction is needed and the Hellmann-Feynman theorem applies directly. Advance/OF-DFT is implemented in PyTorch and computes the atomic forces and the stress tensor by automatic differentiation of the total energy with respect to the atomic positions and lattice vectors. Another advantage is that new features can be added quickly, because the derivatives follow automatically once the energy expression is implemented.
References
- P. Hohenberg and W. Kohn, Phys. Rev. 136, B864 (1964)
- W. Kohn and L. J. Sham, Phys. Rev. 140, A1133 (1965)
- Q. Xu et al., WIREs Comput. Mol. Sci. 14, e1724 (2024)
- L. Sun and M. Chen, Electron. Struct. 6, 045006 (2024)
- W. Mi et al., J. Chem. Phys. 144, 134108 (2016)
- R. Meyer et al., J. Chem. Theory Comput. 16, 5685 (2020)
- M. P. Teter et al., Phys. Rev. B 40, 12255 (1989)
- S. Hagiwara et al., Phys. Rev. Materials 6, 093802 (2022)
- S. A. Orszag, J. Atmos. Sci. 28, 1074 (1971)
For a more detailed formulation, see the theory section of the online documentation (Japanese).