Introduction

The demand for efficient high-throughput ab initio computations for materials screening1,2,3 is increasing due to, among other things, the availability of more and more structural data for theoretically stable solid compounds through the work of, e.g., Merchant et al.4 and the possibility of autonomous laboratories as shown by Szymanski et al.5. Furthermore, automated workflows for methods going beyond Kohn-Sham (KS) density functional theory (DFT), used in the aforementioned and other work6,7,8,9,10,11, such as many-body perturbation theory (MBPT), are becoming increasingly more relevant12,13,14,15,16 due to the rapidly increasing computational resources and the growing demand for more accurate data. Among these approaches, GW calculations provide a state-of-the-art method for accurately predicting band structures and quasiparticle energy levels of 2D/3D materials12,14,17 for which DFT (with common approximations) often fails. GW calculations have been performed by us and others for, e.g., complex molecules18,19,20,21, solar cells22, solar water splitting23,24, batteries25, piezoelectrics26, and general high-performance electronics. In addition, GW provides a well-established starting point for the Bethe-Salpeter equation (BSE), which is necessary to accurately predict the optical properties of semiconductors and insulators27. Furthermore, quasiparticle energies obtained from GW calculations are typically used in linear-response time-dependent density functional theory (TDDFT)28,29 calculations with approximations for the exchange-correlation kernel such as the long-range contribution30 or bootstrap kernels31,32,33. These in turn are necessary ingredients for the development of optical materials tailored for, e.g., photovoltaic applications.

Multiple flavors of GW calculations exist, ranging from simple one-shot G0W034 to various self-consistent GW implementations35 going so far as to quasiparticle self-consistent frameworks36 that include static vertex corrections37,38 or even further to a self-consistent solution of Hedin’s equations that includes more advanced vertex corrections39,40. However, all of these suffer from rather poor scaling with system size as measured by the number N of included electrons. In its simplest plane-wave implementation, a G0W0 calculation has a computational complexity scaling of \({{{\mathcal{O}}}}({N}^{4})\) (cf. KS-DFT calculations, which scale with \({{{\mathcal{O}}}}({N}^{3})\) or even better) and a scaling of \({{{\mathcal{O}}}}({N}_{{{{\bf{k}}}}}^{2})\) in regards to the number of k-points Nk. Recent developments have led to better-scaling GW algorithms, see e.g. refs. 41,42,43,44,45,46,47. However, these often suffer from large prefactors in their computation time, making them more suitable for very large systems47.

The fact that GW calculations require much more computational resources, such as memory and runtime, than DFT calculations for the same system implies that the choice of computational parameters for GW calculations is a much more important decision. Moreover, GW methods have more convergence parameters (as discussed below) than DFT calculations, and—to make things worse—GW methods generally converge rather slowly.

Just recently, the reproducibility of GW calculations in solids48 has been investigated, validating the precision of different GW implementations and comparing them between various MBPT codes. Such comparative studies of different codes and the ever-increasing computational power are slowly opening up the possibility of high-throughput GW calculations. To support this progress, the present paper investigates how to converge GW calculations in a robust, simple, and efficient way, using the simplest implementation, a G0W0 calculation, as example. The corresponding workflow is presented in detail.

In many codes, quasiparticle (QP) energies \({\epsilon }_{n{{{\bf{k}}}}}^{{{{\rm{QP}}}}}\) are commonly approximated using first-order perturbation theory with respect to KS eigenvalues \({\epsilon }_{n{{{\bf{k}}}}}^{{{{\rm{KS}}}}}\) for a given k-point at band n, resulting in a linearized QP equation:

$${\epsilon }_{n{{{\bf{k}}}}}^{{{{\rm{QP}}}}}={\epsilon }_{n{{{\bf{k}}}}}^{{{{\rm{KS}}}}}+{Z}_{n{{{\bf{k}}}}}\,\left\langle n{{{\bf{k}}}}\right\vert \,\left({{\Sigma }}({\epsilon }_{n{{{\bf{k}}}}}^{{{{\rm{KS}}}}})-{V}_{xc}^{{{{\rm{KS}}}}}\right)\,\left\vert n{{{\bf{k}}}}\right\rangle$$
(1)

where \({Z}_{n{{{\bf{k}}}}}^{-1}=1-\left\langle n{{{\bf{k}}}}\right\vert \,d{{\Sigma }}/{{{\rm{d}}}}\epsilon {| }_{{\epsilon }_{n{{{\bf{k}}}}}^{{{{\rm{KS}}}}}}\,\left\vert n{{{\bf{k}}}}\right\rangle\) stands for the renormalization factor49, \({V}_{xc}^{{{{\rm{KS}}}}}\) for the KS exchange correlation potential, and \(\left\vert n{{{\bf{k}}}}\right\rangle\) for the respective KS state. The self-energy operator Σ can be split up into an exchange contribution Σx and a frequency-dependent correlation part Σc, i.e. Σ = Σx + Σc. In plane-wave codes, these are defined in terms of the unit cell volume Ω, the bare Coulomb interaction v(q), the generalized dipole matrix element \({F}_{nm{{{\bf{k}}}}}({{{\bf{q}}}})=\left\langle n{{{\bf{k}}}}\right\vert {{{{\rm{e}}}}}^{{{{\rm{i}}}}{{{\bf{q}}}}\cdot {{{\bf{r}}}}}\left\vert m({{{\bf{k}}}}-{{{\bf{q}}}})\right\rangle\), the Fermi occupation function fmk, and the number of empty states Nb to be included as:

$${\Sigma}^{\mathrm{x}}_{n{\mathbf{k}}} = - \sum\limits_m^{{\mathrm{occ}}} \int_{\mathrm{BZ}} \frac{d{\mathbf{q}}}{(2\pi)^3} \sum\limits_{\mathbf{G}}^{G_{\mathrm{cut}}} \,v({\mathbf{q}}+{\mathbf{G}}) \,\vert F_{nm{\mathbf{k}}}({\mathbf{q}}+{\mathbf{G}}) \vert^2 \, f_{m({\mathbf{k}}-{\mathbf{q}})}$$
(2)
$$\begin{array}{ll}{{{\Sigma }}}_{n{{{\bf{k}}}}}^{{{{\rm{c}}}}}\,=\,{{{\rm{i}}}}\sum\limits_{m}^{{N}_{{{{\rm{b}}}}}}\displaystyle{\int}_{{{{\rm{BZ}}}}}\frac{d{{{\bf{q}}}}}{{(2\pi )}^{3}}\sum\limits_{{{{\bf{G}}}}{{{\bf{G}}}}{^\prime} }^{{G}_{{{{\rm{cut}}}}}}{F}_{nm{{{\bf{k}}}}}({{{\bf{q}}}}+{{{\bf{G}}}}){F}_{nm{{{\bf{k}}}}}^{* }({{{\bf{q}}}}+{{{\bf{G}}}}{^\prime} )\\\qquad\quad \times\, \displaystyle\int\frac{d\omega {^\prime} }{2\pi }{G}_{m({{{\bf{k}}}}-{{{\bf{q}}}})}^{0}(\omega -\omega {^\prime} ){W}_{{{{\bf{G}}}}{{{\bf{G}}}}{^\prime} }({{{\bf{q}}}},\omega {^\prime} ).\end{array}$$
(3)

Here, G0 is the non-interacting Green’s function

$${G}_{m{{{\bf{k}}}}}^{0}(\omega )=\frac{{f}_{m{{{\bf{k}}}}}}{\omega -{\epsilon }_{m{{{\bf{k}}}}}-{{{\rm{i}}}}\eta }+\frac{1-{f}_{m{{{\bf{k}}}}}}{\omega -{\epsilon }_{m{{{\bf{k}}}}}+{{{\rm{i}}}}\eta }$$
(4)

involving the KS bandstructure ϵmk and an infinitesimal complex shift iη (η > 0). The sums over reciprocal lattice vectors G are usually defined through an energy cutoff Gcut, which restricts the summations in Eqs. (2) and (3) to G with kinetic energy 2G∣/(2m0) ≤ Gcut.

It is known that the sum over states in Eq. (3) converges extremely slowly with respect to the number of included empty states Nb. This can be mended through the technique introduced by Bruneval and Gonze50 and is by and large not an obstacle when converging GW calculations.

The screened Coulomb interaction is usually expressed in terms of the dielectric matrix ε and polarizability χ through \({W}_{{{{\bf{G}}}}{{{\bf{G}}}}{\prime} }({{{\bf{q}}}},\omega )=v({{{\bf{q}}}}+{{{\bf{G}}}})\ {\varepsilon }_{{{{\bf{G}}}}{{{\bf{G}}}}{\prime} }^{-1}({{{\bf{q}}}},\omega )\) and \({\varepsilon }_{{{{\bf{G}}}}{{{\bf{G}}}}{\prime} }^{-1}({{{\bf{q}}}},\omega )={\delta }_{{{{\bf{G}}}}{{{\bf{G}}}}{\prime} }+v({{{\bf{q}}}}+{{{\bf{G}}}}){\chi }_{{{{\bf{G}}}}{{{\bf{G}}}}{\prime} }({{{\bf{q}}}},\omega )\). The polarizability χ is then evaluated within the random phase approximation (RPA) as solution of a Dyson equation27

$${\chi }_{{{{\bf{G}}}}{{{\bf{G}}}}{\prime} }({{{\bf{q}}}},\omega )=\sum\limits_{{{{\bf{G}}}}{''} }^{{G}_{{{{\rm{cut}}}}}}{[{\delta }_{{{{\bf{G}}}}{{{\bf{G}}}}{''} }-v({{{\bf{q}}}}+{{{\bf{G}}}}{''} ){\chi }_{{{{\bf{G}}}}{{{\bf{G}}}}{''} }^{0}({{{\bf{q}}}},\omega )]}^{-1}{\chi }_{{{{\bf{G}}}}{''} {{{\bf{G}}}}{\prime} }^{0}({{{\bf{q}}}},\omega )$$
(5)

involving the independent-(quasi-)particle approximation to the polarizability:

$$\begin{array}{ll}{\chi }_{{{{\bf{G}}}}{{{\bf{G}}}}{\prime} }^{0}({{{\bf{q}}}},\omega )\,=\,\displaystyle\frac{2}{{{\Omega }}}\sum\limits_{{{{\bf{k}}}}}\sum\limits_{nm}^{{N}_{{{{\rm{b}}}}}}{f}_{n,{{{\bf{k}}}}-{{{\bf{q}}}}}\,(1-{f}_{m{{{\bf{k}}}}})\,{F}_{nm{{{\bf{k}}}}}^{* }({{{\bf{q}}}}+{{{\bf{G}}}}){F}_{mn{{{\bf{k}}}}}({{{\bf{q}}}}+{{{\bf{G}}}}{\prime} )\\ \qquad\qquad\qquad\times\, \left[\,\sum\limits_{\beta =\pm 1}\,\frac{\beta }{\omega +\beta ({\epsilon }_{n,{{{\bf{k}}}}-{{{\bf{q}}}}}-{\epsilon }_{m{{{\bf{k}}}}}+{{{\rm{i}}}}\eta )}\,\right].\end{array}$$
(6)

The evaluation of Eqs. (3), (5) and (6) is usually the most time-consuming part of a GW calculation51, since they involve multiple large sums, matrix multiplications and inversions as well as a frequency integration52. A significant reduction in computational effort is often achieved by replacing the frequency integration in Eq. (3) with the plasmon-pole model (PPM)53. We note that the PPM is known to be problematic for at least some materials54. A further development of this approach is the multipole model, which however is not yet widely adopted55,56.

As mentioned above, high-throughput calculations using the described G0W0 framework or any other GW variant are still challenging even with modern resources. The main reason for this is that the sums over the bands and the G-vectors in Eqs. (2), (5), and (6) converge slowly when the parameters Nb and Gcut are increased. In addition, the number of k-points also needs to be converged. This is further complicated by the interdependence of both Nb and Gcut, which requires a simultaneous convergence of both parameters57,58. Rewriting this as a standard optimization problem with the gap convergence as the target function and an estimation of the computational time as the penalty is not as straightforward and recommendable as it seems because standard derivative-based optimization methods tend to perform poorly on integer variables, such as Nb and the number of G-vectors.

It is heuristically known that the number of k-points and the parameters (Nb, Gcut) used to compute the dynamical screening W are somewhat decoupled, i.e. their convergence can be studied more or less independently. This was investigated to some extent by van Setten et al.13 by converging Nb and Gcut via fitting functions with a predefined asymptotic behavior to data for the band gap obtained through G0W0 calculations on a low-density Γ-centered 2 × 2 × 2 k-point grid for 80 semiconducting or insulating solids. They then compared the derivative of the band gap with respect to Nb and Gcut calculated through finite differences on the low-density grid (LDG) with those obtained on a converged high-density grid (HDG). The results show that for about 90% of materials, the derivative of the gap energy with respect to the convergence parameters on the HDG is lower than on the LDG13. Their results suggest that it is in principle efficient to converge (Nb, Gcut) on a LDG, but a more thorough investigation is warranted to study this behavior more closely, for example by investigating this relation on more extreme, i.e. a Γ-only calculation, or denser intermediate k-point grids than van Setten et al.13 considered.

The main question investigated in the present paper, namely ’How to best converge GW calculations for high-throughput applications?’ can be reduced to two sub-problems using the knowledge described above: (1) find a robust, simple, and effective way to converge the interdependent parameters (Nb, Gcut). (2) Check to what extent the practical independence of the choice of the k-point grid when converging (Nb, Gcut) and the inverse, i.e. the choice of (Nb, Gcut) when investigating the k-point grid convergence can be used to create an efficient convergence scheme for all three parameters.

Recently, automated MBPT workflows including the GW method have been proposed and tested for the G0W0 case13,16, focusing on the convergence of the parameters Nb and Gcut, i.e. subproblem (1). Current state-of-the-art (SOTA) methods13,16 rely on the extrapolation of functions with a predefined asymptotic behavior fitted to the band gap calculated at the Γ-point \({{{{\rm{E}}}}}_{{{{\rm{gap}}}}}^{{{{\bf{\Gamma }}}}-{{{\bf{\Gamma }}}}}\) using multiple G0W0 calculations at different (Nb, Gcut)-points in the parameter space to find suitable parameters Nb and Gcut to be used in the actual production runs. One problem with these methods lies in the fact that the exponents α and β in the trial function

$$F({N}_{{{{\rm{b}}}}},{G}_{{{{\rm{cut}}}}})=\left(\frac{A}{{N}_{{{{\rm{b}}}}}^{\alpha }}+B\right)\left(\frac{C}{{G}_{{{{\rm{cut}}}}}^{\beta }}+D\right)$$
(7)

commonly used for the asymptotic fit to the 2D convergence surface are not known and also seem to be material-dependent. Furthermore, in most applications, e.g.13,16, the exponents are not fitted, but instead are limited to very few integers, e.g., α, β ∈ {1, 2}16, in order to reduce the number of initial GW calculations required for the fit and to improve the stability of the fit. We observed that this can then lead to errors in the extrapolation and suboptimal parameter choices for (Nb, Gcut). In addition, the initial GW calculations for the fitting procedure are mostly done in a grid-like fashion13,16, which automatically implies many, as we shall see, unnecessary GW calculations. To obtain accurate fit results, a grid spanning points with small and large parameters, i.e. inexpensive and expensive GW calculations, is commonly used. However, the expensive grid points can represent over-converged points in the parameter space, while the computationally optimal point may be at a lower (Nb, Gcut)-point, thereby increasing the computation time unnecessarily.

To overcome the described difficulty of the convergence of the two integer-valued parameters Nb and Gcut, we propose and benchmark a simpler, more robust and time-saving Coordinate Search (CS) algorithm to converge (Nb, Gcut). It follows the heuristic ‘cheap first, expensive later’ and reduces the total computational effort needed.

We note that the proposed CS algorithm is similar to most straightforward convergence routines, which many practitioners have long since settled on for pragmatic reasons. This makes the systematic comparison with more sophisticated convergence workflows13,16 particularly relevant. Furthermore, the CS algorithm is easy to implement manually or automatically, without having to rely on an estimated extrapolation of the convergence surface.

Our coordinate search algorithm can be summarized in four steps, as described in Algorithm 1.

Algorithm 1

Coordinate Search

1: Calculate a reference \({{{{\rm{E}}}}}_{{{{\rm{gap}}}}}^{{{{\bf{\Gamma }}}}-{{{\bf{\Gamma }}}}}({N}_{{{{\rm{b}}}}},{G}_{{{{\rm{cut}}}}})\) at a starting point (Nb, Gcut).

2: Take steps of length ΔNb until the band gap converges for an a-priori fixed δ, i.e. 

$$| {{{{\rm{E}}}}}_{{{{\rm{gap}}}}}^{{{{\bf{\Gamma }}}}-{{{\bf{\Gamma }}}}}({N}_{{{{\rm{b}}}}}+(i+1){{\Delta }}{N}_{{{{\rm{b}}}}},{G}_{{{{\rm{cut}}}}})-{{{{\rm{E}}}}}_{{{{\rm{gap}}}}}^{{{{\bf{\Gamma }}}}-{{{\bf{\Gamma }}}}}({N}_{{{{\rm{b}}}}}+i{{\Delta }}{N}_{{{{\rm{b}}}}},{G}_{{{{\rm{cut}}}}})| \le \delta$$

 with i ∈ {0, 1, 2, 3, . . . }.

3: Take steps of length ΔGcut until the band gap converges, i.e. 

$$\begin{array}{l}|{{{{\rm{E}}}}}_{{{{\rm{gap}}}}}^{{{{\bf{\Gamma }}}}-{{{\bf{\Gamma }}}}}({N}_{{{{\rm{b}}}}}+(i+1){{\Delta }}{N}_{{{{\rm{b}}}}},{G}_{{{{\rm{cut}}}}}+(j+1){{\Delta }}{G}_{{{{\rm{cut}}}}})\\\;\; -{{{{\rm{E}}}}}_{{{{\rm{gap}}}}}^{{{{\bf{\Gamma }}}}-{{{\bf{\Gamma }}}}}({N}_{{{{\rm{b}}}}}+(i+1){{\Delta }}{N}_{{{{\rm{b}}}}},{G}_{{{{\rm{cut}}}}}+j{{\Delta }}{G}_{{{{\rm{cut}}}}})| \le \delta \end{array}$$

 with fixed i obtained from step 2 and j ∈ {0, 1, 2, 3 . . . }.

4: Check if 

$$| {{{{\rm{E}}}}}_{{{{\rm{gap}}}}}^{{{{\bf{\Gamma }}}}-{{{\bf{\Gamma }}}}}({N}_{{{{\rm{b}}}}}+(i+1){{\Delta }}{N}_{{{{\rm{b}}}}},{G}_{{{{\rm{cut}}}}}+(j+1){{\Delta }}{G}_{{{{\rm{cut}}}}})-{{{{\rm{E}}}}}_{{{{\rm{gap}}}}}^{{{{\bf{\Gamma }}}}-{{{\bf{\Gamma }}}}}({N}_{{{{\rm{b}}}}},{G}_{{{{\rm{cut}}}}})| \le \delta$$

holds, i.e. the convergence surface is sufficiently flat along the diagonal direction to minimize the parameter interdependence. If this is not the case, go back to step 2 and use the already calculated \({{{{\rm{E}}}}}_{{{{\rm{gap}}}}}^{{{{\bf{\Gamma }}}}-{{{\bf{\Gamma }}}}}({N}_{{{{\rm{b}}}}}+(i+1){{\Delta }}{N}_{{{{\rm{b}}}}},{G}_{{{{\rm{cut}}}}}+(j+1){{\Delta }}{G}_{{{{\rm{cut}}}}})\) as a reference/starting point.

In the formulation chosen for illustration and presented in Algorithm 1, the direct band gap \({{{{\rm{E}}}}}_{{{{\rm{gap}}}}}^{{{{\bf{\Gamma }}}}-{{{\bf{\Gamma }}}}}({N}_{{{{\rm{b}}}}},{G}_{{{{\rm{cut}}}}})={{{{\rm{E}}}}}_{{{{\rm{CBM}}}}}^{{{{\bf{\Gamma }}}}}({N}_{{{{\rm{b}}}}},{G}_{{{{\rm{cut}}}}})-{{{{\rm{E}}}}}_{{{{\rm{VBM}}}}}^{{{{\bf{\Gamma }}}}}({N}_{{{{\rm{b}}}}},{G}_{{{{\rm{cut}}}}})\) is defined as the difference between the conduction band minimum (CBM) and the valence band maximum (VBM) at the Γ point. Instead of converging the direct band gap, which is the quantity of primary interest for predicting optical properties of semiconductors and insulators, one could in principle also converge the absolute energies of the band edges simultaneously, i.e. using the criterion \(| {{\Delta }}{{{{\rm{E}}}}}_{{{{\rm{VBM}}}}}^{{{{\bf{\Gamma }}}}}({N}_{{{{\rm{b}}}}},{G}_{{{{\rm{cut}}}}})| < \delta\) and \(| {{\Delta }}{{{{\rm{E}}}}}_{{{{\rm{CBM}}}}}^{{{{\bf{\Gamma }}}}}({N}_{{{{\rm{b}}}}},{G}_{{{{\rm{cut}}}}})| < \delta\), where ΔE represents the difference conditions formulated in steps 2-4 of Algorithm 1. This can be relevant, e.g., for catalytic applications24 and is furthermore a sound way to address the convergence of metals48. In that case, it is important to emphasize that both conditions must be satisfied simultaneously, since convergence can occur at very different parameter values. A notorious example of such a system is ZnO, where the very different nature of the VBM being derived from the localized O 2p state and the CBM being derived from the delocalized Zn 4s state leads to a drastically different convergence behavior of the two57.

As a test for our CS workflow algorithm and for comparison with a SOTA workflow, we present results for 60 bulk solids and 10 2D materials. A complete material list can be found in the Supplementary Information, i.e. Supplementary Note 1. To investigate the subproblems (1) and (2), we analyze the convergence behavior of the SOTA and CS algorithms on five Γ-centered k-point grids of increasing density, starting with a Γ-only calculation. As SOTA algorithm, we implemented the method introduced by Bonacci et al.16 in our in-house workflow package and tested it by reproducing their results using the provided DFT input files, see Supplementary Notes 2 and 3. On each k-point grid, convergence in (Nb, Gcut) is obtained using both algorithms with a convergence threshold δ = 25 meV for the bulk and δ = 50 meV for the 2D materials. The convergence criterion for the SOTA algorithm involving δ can be found in Ref. 16, where it is written as ΔΓ. The chosen convergence thresholds are a good compromise between speed and accuracy and are appropriate to mimic a high-throughput environment. The starting grid and step size for the SOTA algorithm are set to the values used in Ref. 16. As the starting point for our CS algorithm, we use the smallest grid point from the SOTA algorithm, i.e. (Nb = 200, Gcut = 4 Ry). Preliminary analysis shows that a higher starting point does not significantly affect the band gaps obtained by the CS algorithm, see Supplementary Note 4. The step sizes ΔNb = 100 and ΔGcut = 4 Ry are based on experience. An optimization of these hyperparameters can be considered in future. In order to assess how well converged the CS and SOTA results are, an expensive, high-quality reference G0W0 calculation with Nb = 1200 and Gcut = 46 Ry is carried out for all k-point grids of each material.

Results

To explain the data analysis in a simple but well-defined manner, we first define the quantities \({{{{\mathcal{G}}}}}_{{{{\mathcal{M}}}},{{{\bf{k}}}}}^{A}\) and \({{{{\mathcal{P}}}}}_{{{{\mathcal{M}}}},{{{\bf{k}}}}}^{A}\) which represent the calculated final band gap \({{{{\rm{E}}}}}_{{{{\rm{gap}}}}}^{{{{\bf{\Gamma }}}}-{{{\bf{\Gamma }}}}}({N}_{{{{\rm{b}}}}},{G}_{{{{\rm{cut}}}}})\) and final parameter vector (Nb, Gcut) for each material \({{{\mathcal{M}}}}\) using algorithm A ∈ {S for ’starting point’, CS, SOTA, R for ’reference’} on k-point grid k, respectively. The collected data for all k-point grids and all materials is visualized in Supplementary Notes 7 and 8.

In the following, we provide a detailed statistical analysis of the accuracy and performance of both convergence algorithms and an investigation of the parameter independence of the k-point grid and two interdependent parameters (Nb, Gcut) in the numerical implementation of the dynamically screened Coulomb interaction W using the data obtained for the 60 bulk materials. We will then briefly discuss how the results of the 2D materials compare to their bulk counterparts.

Convergence benchmark

To address subproblem (1), as defined above, we compare both algorithms with respect to how close the converged gaps are to those of the reference calculations and how fast each algorithm obtains its results. The accuracy is evaluated by calculating the absolute deviation of the band gap at the convergence point to the reference value for each k-point grid of every material \({{{\mathcal{M}}}}\), i.e. \(| {{{\Delta }}}_{{{{\rm{R}}}}}{{{{\rm{E}}}}}_{{{{\rm{gap}}}}}^{{{{\bf{\Gamma }}}}-{{{\bf{\Gamma }}}}}| =| {{{{\mathcal{G}}}}}_{{{{\mathcal{M}}}},{{{\bf{k}}}}}^{X}-{{{{\mathcal{G}}}}}_{{{{\mathcal{M}}}},{{{\bf{k}}}}}^{{{{\rm{R}}}}}|\) where X ∈ {CS, SOTA}, while the computation speed is analyzed through the number of GW calculations NGW needed to find \({{{{\mathcal{P}}}}}_{{{{\mathcal{M}}}},{{{\bf{k}}}}}^{X}\).

Figure 1 a,b show a comparison of the accuracy of the two algorithms. The mean accuracy for both algorithms, considering all materials and k-point grids, is approximately 25 meV, in line with the set convergence threshold δ = 25 meV. The SOTA algorithm demonstrates slightly better performance compared to the CS algorithm in terms of the median (16 meV vs. 20 meV). A few outliers with deviations larger than 100 meV exist for both algorithms. Interestingly, these are not always the same for both cases. In some cases, outliers are calculations on an LDG, or even a Γ-only calculation, as is the case for BaF2 highlighted in Fig. 1a and ZnO in Fig. 1b. This may indicate that the gap is more sensitive to the choice of (Nb, Gcut) on low-density k-point grids. Materials like KF, AgI and As2Os cause problems for both algorithms, independent of the k-point grid. It is worth noting that KF does not appear in Fig. 1b because the SOTA algorithm was only able to converge for two of the five k-grids and failed in the other cases. These outliers raise interesting questions and provide possible avenues for improvement in the algorithms. Some outliers for the SOTA algorithm require an inordinate amount of calculations before reaching a (Nb, Gcut)-grid with an adequate fit. On the other hand, some outliers for the CS algorithm terminate unusually early. If such a case is detected in real-world applications, a calculation with increased parameters could be automatically performed to ensure convergence. Finally, the source of such outliers may not be related specifically to the convergence algorithms, but to interesting physical properties arising from special aspects of their band structures.

Fig. 1: Benchmark results visualized by histograms.
figure 1

Some notable outliers, such as large deviations from the reference gap or high number of GW calculations, are annotated with arrows. The corresponding crystal structures for each material can be found in Supplementary Note 1 through their Materials Project ID. The dashed magenta (green) lines indicate the mean (median). a, b Evaluation of the accuracy using the absolute deviation between the band gap at the convergence point and the reference value for each k-point grid of each material, i.e. \(| {{{\Delta }}}_{{{{\rm{R}}}}}{{{{\rm{E}}}}}_{{{{\rm{gap}}}}}^{{{{\bf{\Gamma }}}}-{{{\bf{\Gamma }}}}}|\), for the CS and SOTA algorithms, respectively. The vertical black lines represent the convergence threshold δ = 25 meV. c, d Number of GW calculations NGW needed to find the convergence point, for the CS and SOTA algorithms, respectively. The inset in c shows the shaded area in more detail.

Figure 1 c,d provides a comprehensive comparison of the performance of the algorithms. One striking difference is that the CS algorithm reaches convergence with a maximum of 12 GW computations, whereas the SOTA algorithm can require up to 70. Specifically, both the mean and median number of GW calculations required for the CS algorithm are around 7, while the mean and median for the SOTA algorithm are around 14 and 8, respectively. We note in passing that for the aforementioned ‘problematic’ compound As2Os the CS algorithm converged extremely quickly, using only three GW calculations, see Fig. 1c. Possibly, the convergence surface of the W parameters is already flat enough at low parameter values for the convergence algorithms to stop, but it does not become flatter with increasing parameters and the second derivative of the convergence surface with respect to the parameters Nb and Gcut remains small. This explains the large discrepancy with the reference calculation and illustrates the somewhat pathological behavior of the sums in Eqs. (2) and (3) with respect to Nb and Gcut in materials such as As2Os.

We observe that the CS algorithm has a broader distribution of \(| {{{\Delta }}}_{{{{\rm{R}}}}}{{{{\rm{E}}}}}_{{{{\rm{gap}}}}}^{{{{\bf{\Gamma }}}}-{{{\bf{\Gamma }}}}}|\) around δ (black line) in Fig. 1a compared to the SOTA algorithm in Fig. 1b. The opposite is true for the number of GW calculations needed to find the convergence point, as shown in Fig. 1c,d. This trade-off between accuracy and computation time can be understood in the sense that there is “no free lunch”. However, we want to emphasize that reducing the number of GW calculations by about 50% on average by far outweighs the minor loss in accuracy for most applications.

Obviously, besides the number of GW calculations, one also has to take the runtime of each calculation into account, as calculations with increased parameters can often take significantly longer to run. For example, a Γ-only GW calculation for AgI with Nb = 200 and Gcut = 4 Ry takes around 20 s, whereas the Γ-only reference calculation with Nb = 1200 and Gcut = 46 Ry took 30 min, both using 8 cores of an Intel® Xeon® Processor E5-2650. For this reason, we analyzed the ratio of the computation times T for the CS and SOTA algorithms, i.e. the convergence speedup achieved by the CS algorithm for each material and k-point grid individually, shown in Fig. 2. Values greater than one indicate that the CS algorithm is faster, while values less than one indicate that the SOTA algorithm is faster. The average speedup achieved by the CS algorithm is 4.5, while the median speedup is about 2.4. Note that the large discrepancy between mean and median is caused by cases where the CS algorithm is more than ten times faster than the SOTA algorithm (not shown in Fig. 2 due to axis truncation for better visibility). In these extreme cases, the CS algorithm requires up to two orders of magnitude less computational time and thus resources, while maintaining a similar level of accuracy. The SOTA algorithm performs better only in very few cases, one of which is AgI, where the SOTA algorithm required fewer GW calculations to reach a convergence point than the CS algorithm. However, for AgI, neither algorithm found adequate convergence parameters due to the aforementioned pathologies. This highlights the challenges that both simple and more complex convergence algorithms face when dealing with certain materials. At this point, we recognize that computation times may not be directly comparable, as it is possible that some computations may be performed on slower nodes than others due to varying loads, but overall this effect should average out.

Fig. 2: CS Speedup visualized through a histogram.
figure 2

Histogram showing the speedup achieved by the CS algorithm compared to the SOTA algorithm. The black line indicates TSOTA/TCS = 1, i.e. no speedup. The dashed magenta (green) line indicates the mean (median). We note that there are materials where the speedup is much greater than ten, but we have truncated the x-axis for better visibility.

To show how the two algorithms work in practice and to explain the considerable difference in computation time, we have visualized the convergence paths of each algorithm for two materials in Fig. 3, inspired by the presentation shown in Ref. 16. In the case of Si (Fig. 3a), both algorithms require a similar number of GW calculations to converge. While the SOTA algorithm finds a cheaper convergence point with Nb = 200 and Gcut = 12 Ry compared to the CS algorithm with Nb = 400 and Gcut = 16 Ry, the CS algorithm used 35% less computation time to reach convergence. This can be easily explained by the required grid calculation for the SOTA fit of the convergence surface, as points with higher parameters are needed for a good fit, which in turn takes significantly longer to run. For LiF, shown in Fig. 3b, the reason for the performance difference is obvious: SOTA had to compute multiple grids to get an adequate fit of the convergence surface, while the CS algorithm simply “just walks” to the convergence point.

Fig. 3: Convergence path visualization.
figure 3

Visualization of the convergence paths taken by both algorithms to converge Si (a) and LiF (b) on the k-point grid with the highest density. CS: The red path indicates the convergence path. Each cross represents a GW calculation. The end point is indicated by a larger cross. SOTA: The black circles show the calculations performed for each six-point grid (shaded areas) to fit Eq. (7). The colored circles are the suggested convergence points. The circle of the final point is marked with an additional red dot. The colors of the squares in the background indicate the deviation of the final fit function F to the gap from the reference calculation, i.e. ∣ΔRF(Nb, Gcut)∣.

Independence of the k-point grid and W

This section deals with subproblem (2), i.e. the practical independence of the choice of the k-point grid from the choice of (Nb, Gcut) and vice versa.

First, we investigate how the convergence properties of the interdependent parameters (Nb, Gcut) in W depend on the k-point grid. For this, we calculate the parameter change \({C}_{{{{\mathcal{P}}}}}^{{{{\bf{\Gamma }}}}}\,=\,({{{{\mathcal{P}}}}}_{{{{\mathcal{M}}}},{{{\bf{\Gamma }}}}}^{X}\,-\,{{{{\mathcal{P}}}}}_{{{{\mathcal{M}}}},{{{{\bf{k}}}}}_{f}}^{X})/{{\Delta }}{{{\mathcal{P}}}}\) (\({{{\mathcal{P}}}}\in \{{N}_{{{{\rm{b}}}}},{G}_{{{{\rm{cut}}}}}\}\)) for all materials \({{{\mathcal{M}}}}\) and X ∈ {CS, SOTA}. This quantity compares converged parameters for the coarsest possible grid, i.e. a Γ-only calculation, and for the finest considered k-point grid kf with the highest density. The algorithm-specific parameter step sizes \({{\Delta }}{{{\mathcal{P}}}}\) were already defined above. \({C}_{{{{\mathcal{P}}}}}^{{{{\bf{\Gamma }}}}}\,\) values of order 1, i.e. { − 1, 0, 1}, imply that the converged parameters \({{{\mathcal{P}}}}\) are more or less independent of the k-point grid. Figure 4 visualizes \({C}_{{{{\mathcal{P}}}}}^{{{{\bf{\Gamma }}}}}\) for both algorithms and both convergence parameters in W. In all cases, the mean and median are small positive values or very close to zero. Evidently, \({{{\mathcal{P}}}}\) and k are in general more or less independent, but a few outliers exist outside of { − 1, 0, 1}. It is worthwhile to have a more detailed look from the point of view of convergence algorithms for high-throughput calculations. The sign of \({C}_{{{{\mathcal{P}}}}}^{{{{\bf{\Gamma }}}}}\) distinguishes between two different cases: If \({C}_{{{{\mathcal{P}}}}}^{{{{\bf{\Gamma }}}}}\ge 0\), the convergence for the Γ-only grid is as flat or flatter than for the HDG. If \({C}_{{{{\mathcal{P}}}}}^{{{{\bf{\Gamma }}}}} < 0\) the opposite is true, meaning that the convergence algorithm would underconverge W on the Γ-only grid compared to the HDG. So in general, positive \({C}_{{{{\mathcal{P}}}}}^{{{{\bf{\Gamma }}}}}\) values indicate “overconvergence”, i.e. “being on the safe side” when using a LDG, in this case a Γ-only calculation. Therefore, we calculate the percentage of materials where \({C}_{{{{\mathcal{P}}}}}^{{{{\bf{\Gamma }}}}}\ge 0\) for both Nb and Gcut, and get a value of 92% (85%) for the CS (SOTA) algorithm. We also compute the \({C}_{{{{\mathcal{P}}}}}^{{{{{\bf{k}}}}}_{2}}\), where k2 represents a Γ-centered 2 × 2 × 2 k-point grid. Using the same analysis as in the Γ-only case, we observe that the convergence surface is as flat or flatter than on the HDG for 92% (89%) of the computed materials for the CS (SOTA) algorithm. This result is in agreement with a previous study by van Setten et al.13. The corresponding figure for \({C}_{{{{\mathcal{P}}}}}^{{{{{\bf{k}}}}}_{2}}\) and an analysis of \({C}_{{{{\mathcal{P}}}}}^{{{{{\bf{k}}}}}_{3}}\) and \({C}_{{{{\mathcal{P}}}}}^{{{{{\bf{k}}}}}_{4}}\) are shown in Supplementary Note 5.

Fig. 4: Histograms showing that the convergence of the parameters of W is practically independent of the k-point grid.
figure 4

a, c \({C}_{{{{\mathcal{P}}}}}^{{{{\bf{\Gamma }}}}}\) calculated for the CS algorithm convergence parameters Nb and Gcut, respectively. b, d \({C}_{{{{\mathcal{P}}}}}^{{{{\bf{\Gamma }}}}}\) calculated for the SOTA algorithm convergence parameters Nb and Gcut, respectively. Materials where \({C}_{{{{\mathcal{P}}}}}^{{{{\bf{\Gamma }}}}} < 0\) are annotated with arrows. The dashed magenta (green) lines indicate the mean (median). If the mean and median overlap, only a dashed green line will be visible in the plot.

Now that is has been established that Nb and Gcut as converged on a LDG are in all but a few cases well-converged parameters on a HDG, we check whether a similar conclusion can be reached for the necessary density of the k-point grid for low and high values of Nb and Gcut.

To analyze the convergence surface with respect to the k-point grid, we check for all materials \({{{\mathcal{M}}}}\) for which index iY the band gap converges with respect to the k-point grid, i.e. \(| {{{{\mathcal{G}}}}}_{{{{\mathcal{M}}}},{{{{\bf{k}}}}}_{i}}^{Y}-{{{{\mathcal{G}}}}}_{{{{\mathcal{M}}}},{{{{\bf{k}}}}}_{i-1}}^{Y}| \le \delta\). Here Y represents the starting point calculation S (Nb = 200, Gcut = 4 Ry) or the reference calculation R (Nb = 1200, Gcut = 46 Ry). Then, we evaluated \({{{\mathcal{K}}}}={i}_{{{{\rm{S}}}}}-{i}_{{{{\rm{R}}}}}\) for all materials \({{{\mathcal{M}}}}\) where the band gap converged with respect to the k-point grid within the five increasingly dense k-point grids used. Similar to \({C}_{{{{\mathcal{P}}}}}^{{{{\bf{\Gamma }}}}}\), if \({{{\mathcal{K}}}}\ge 0\) than the k-point grid convergence surface is as flat or flatter for small parameters in W as it is for larger parameters in W. On the other hand, if \({{{\mathcal{K}}}} < 0\) holds, the k-point grid would be underconverged at small parameters in W. In total, only six materials do not converge on the same k-point grid, and only two of them have \({{{\mathcal{K}}}}=-1\). Thus, only 4% of the time the k-point grid would be underconverged if a convergence were performed with small parameters (Nb, Gcut) in dynamically screened Coulomb interaction W.

2D materials

For the ten 2D materials studied, we repeated all the analyses shown above. All corresponding figures can be found in Supplementary Note 8.

Both the CS and SOTA convergence algorithms achieve a similar average (median) distance to reference band gaps of 26 meV (15 meV) and 28 meV (25 meV), respectively, while requiring on average (median) 6 (6) and 7 (7) GW calculations, respectively, to converge the band gap. Looking at these results, both algorithms seem surprisingly equal in performance, but the CS algorithm is on average (median) more than 3 (2) times faster than the SOTA algorithm. The reason for this is simply that the initial computation of a grid in the (Nb, Gcut) parameter space requires GW calculation with high parameters. Therefore, the average number of GW calculations required to converge the band gap can be similar, while the associated cost of each GW calculation can be drastically different.

To analyze how the band gap convergence with respect to (Nb, Gcut) depends on the choice of k-point grid, we again evaluated \({C}_{{{{\mathcal{P}}}}}^{{{{\bf{\Gamma }}}}}\) as defined above. For 9 (7) of the 10 2D materials, \({C}_{{{{\mathcal{P}}}}}^{{{{\bf{\Gamma }}}}}\ge 0\) holds for both Nb and Gcut for the CS (SOTA) algorithm. To analyze how the band gap convergence with respect to the k-point grid depends on the choice of (Nb, Gcut), we evaluated \({{{\mathcal{K}}}}\) as defined above. Leaving out 2D-hBN, since here no k-point convergence was achieved on the last k-point grid, we find that for 7 of the 9 2D materials \({{{\mathcal{K}}}}=0\) holds. The other materials (CdI2 and MoSe2) had \({{{\mathcal{K}}}} < 0\), i.e. the k-point grid would be underconverged when using small parameters in W. These results indicate that, similar to the bulk materials, the convergence of the band gap with respect to the parameters (Nb, Gcut) is practically independent of the k-point grid and vice versa.

The results of the 2D materials presented here are analogous to those of the bulk materials, but two important points need to be addressed. First, ten materials is a small sample to study the convergence properties of G0W0 calculations. Therefore, we suggest to treat the results of the 2D materials with care and note that a follow-up work with a larger dataset is warranted. Second, we strongly recommend using the technique introduced by Guandalini et al.59 to improve the convergence properties of 2D materials with respect to the k-point grid, since e.g. a Γ-only convergence of the band gap with respect to (Nb, Gcut) is otherwise unstable and extremely slow.

Discussion

The presented results show that the interdependent parameters Nb and Gcut in the dynamically screened Coulomb interaction W can be converged on a Γ-only k-point grid, where the convergence should be performed using the more efficient CS algorithm. Additionally, the band gap can be converged with respect to the k-point grid while using low values of (Nb, Gcut) in W. Taking all of this into account, we recommend the following strategy for converging high-throughput GW calculations:

(i) Converge the interdependent parameters Nb and Gcut in W using the presented ‘cheap first, expensive later’ CS algorithm on a Γ-only k-point grid.

(ii) In parallel, the band gap can be converged with respect to the k-point grid using low values for the parameters in W, e.g., Nb = 200 and Gcut = 4 Ry.

(iii) A final GW calculation is then performed on the converged k-point grid using the converged Nb and Gcut.

For the bulk materials, we roughly estimate that the suggested Γ-only convergence of Nb and Gcut speeds up the convergence on average (median) by a factor of 2.3 (1.7) when compared to the suggestion of van Setten et al.13, i.e. performing a convergence on a Γ-centered 2 × 2 × 2 k-point grid. In addition, we observed that the convergence of the k-point grid with low Nb and Gcut in W further speeds up the convergence on average (median) by 9.8 (5.8), when compared to a k-point grid convergence with converged W parameters. Details concerning the speedup estimates and analogous results for the 2D materials can be found in Supplementary Notes 6 and 8, respectively.

The presented workflow is therefore highly effective for future high-throughput GW material screening projects where a speed reduction is more important than absolute convergence. The CS-based workflow is readily available in the provided code base. We would also like to point out that for projects requiring very accurate GW calculations, e.g., for high-precision single-system studies for catalysis, the convergence parameters obtained using our workflow can be used as good starting point for further convergence investigations on denser k-point grids, again saving valuable computational time. The basic principle of ‘cheap first, expensive later’ can also be applied to these more complex MBPT calculations, although the interdependence between different convergence parameters would likely have to be verified again for non-GW approaches. Furthermore, based on the results of Zein et al.60, we believe that the proposed workflow can also be applied to vertex-corrected GW variants, as vertex functions tend to be more localized in real space and therefore can be converged with smaller k-point grids.

As a final note, we would like to emphasize that the convergence workflow described here has been tested using an implementation of the G0W0 method in a plane-wave basis set. We suppose that a similar convergence workflow is practical for GW implementations utilizing alternative basis sets, such as linearized augmented-plane-waves (LAPW)61,62,63,64,65 or linear muffin-tin-orbitals (LMTO)66. Since for these basis sets parameters similar to Gcut exist which control the basis set size, it is expected that similar conclusions as for Gcut hold.

In summary, a robust, simple, and efficient convergence workflow for GW calculations is presented, based on the results of more than 7000 GW calculations on a diverse dataset of 70 semiconducting and insulating materials divided into 60 bulk and 10 2D materials. The workflow is based on two main results: Firstly, we showed that a ‘cheap first, expensive later’ coordinate search algorithm is able to converge the two interdependent parameters in the dynamically screened Coulomb interaction W with the same accuracy as the current state-of-the-art method of Bonacci et al.16, while being more than twice as fast. Secondly, we empirically demonstrated the practical independence of the parameters in W and the density of the k-point grid. These two insights have been integrated into our workflow, dramatically improving computational efficiency. The final convergence workflow is extremely efficient and well suited for high-throughput GW calculations, paving the way for the use of many-body perturbation theory in large-scale materials screening projects to discover materials for various applications with high technological impact. Furthermore, it can also be used to accelerate high-precision single-system GW calculations.

Methods

Ab initio calculations

Computationally relaxed structure files were obtained from the Materials Project67,68 for all bulk materials and from the Materials Cloud two-dimensional crystals database (MC2D)69,70 for the 2D materials. For 2D-MoS2 and 2D-hBN, we used the structures provided by Bonacci et al.16. All structures were reduced to their primitive standard structure using pymatgen71,72 to mimic real high-throughput calculations. The corresponding material identifiers, determined convergence parameters, direct gaps at the Γ-point, and other associated metadata can be found in Supplementary Note 1. The DFT calculations were performed with the plane-wave code Quantum ESPRESSO73,74 with PBE75 as exchange-correlation functional and optimized norm-conserving Vanderbilt pseudopotentials from the SG15 library (version 1.2)76. Γ-centered k-point grids with an even number of subdivisions defined by a structure-independent reciprocal density ρk as defined in pymatgen77 were used. All DFT calculations were converged with respect to the k-point grid and plane-wave cutoff until a convergence threshold of 1 kcal mol−1 was reached. The GW corrections were calculated using the YAMBO code51,78 on the G0W0 level. The frequency dependence of the dynamical screening W was approximated through the Godby-Needs plasmon-pole approximation53. To accelerate the convergence of the correlation self-energy Σc with respect to the number of empty bands Nb, the Bruneval-Gonze technique50 was used. The q → 0 divergence of the Coulomb potential v(q) was treated with the random integration method51 as implemented in YAMBO. The same number of G-vectors as used for the converged DFT energies was used to expand the KS wavefunctions in the transition matrix elements and the plane-wave expansion. To improve the convergence properties of the 2D materials with respect to the k-point grid, we used the technique introduced by Guandalini et al.59 based on a stochastic averaging and interpolation of the screened potential.