Introduction

Maximally localized Wannier functions (MLWFs)1,2,3,4 are accurate reduced-order models5 for the electronic structures of periodic crystals. The generation of MLWFs from Bloch wavefunctions typically requires a choice of initial guesses, which are often conjectured from chemical intuition with trial and error. For metals, or when considering both the valence and conduction bands (VCB) of insulators and semiconductors, one typically deals with bands that overlap with higher-energy bands, i.e., the so-called entangled bands in the literature2. In such cases, since the low-energy electronic structure can often be well described by a tight-binding model of atomic-like orbitals, the initial guesses are usually chosen from the hydrogenic s,p,d,f orbitals. However, when it comes to the cases of valence bands (VB) alone, or especially conduction bands (CB) which are mixed with higher-energy bands, it might become difficult to identify good initial guesses. Indeed, the VB/CB often consists of bonding/anti-bonding orbitals, or combination of atomic orbitals which are more challenging to guess or to describe, unless the crystal offers a very simple chemical picture. Achieving separate Wannierization of target manifolds is also advantageous for many applications. Some physical properties (such as the electric polarization) depend only on the Wannier functions (WFs) of the occupied manifold (sum of Wannier centers of all the valence WFs). Moreover, using dedicated MLWFs means that one can obtain smaller tight-binding models that are thus more efficient when computing, e.g., transport properties of large systems. Koopmans spectral functionals also require separate occupied and unoccupied manifolds6. Last, low-energy models, such as those used in correlated-electrons calculations7,8,9,10, require a description of the correlated manifold.

Several approaches have been developed in the past few years to simplify the construction of MLWFs. The selected columns of the density matrix (SCDM) algorithm11 uses QR decomposition with column pivoting on the density matrix to automatically generate initial projection orbitals, and a sensible choice of the density matrix can be obtained from the projectability of Bloch states onto pseudo-atomic orbitals from pseudopotentials12. The optimal projection functions method13 starts with a larger manifold and generates the MLWFs of the valence manifold by a single rotation matrix, which is computed by a product of a series of Givens rotations. The dually localized Wannier functions method14 adds an additional term to spread functional, to localize the WFs in both space and energy, achieving a separation of VB and CB.

Here, we propose a different approach to automatically mix optimal MLWFs spanning valence and conduction into several submanifolds, provided that these submanifolds are gapped in their energy spectrum. This naturally applies to the case of separate Wannierizations of valence and conduction manifolds, but more generally extends to arbitrary groups of bands separated in energy. We start from the Wannierization of a larger manifold (e.g., the VCB manifold), that we do not discuss here since robust methods already exist: in addition to hydrogenic s,p,d,f initial projections, partly occupied WF method15,16, the fully automated SCDM method11,12, or the projectability-disentangled Wannier function (PDWF) that we recently introduced are available (in particular, the latter appears as a very general and remarkably robust approach allowing, e.g., to construct ~ 1.3 million PDWFs for ~ 22 thousands materials17). Once these MLWFs are obtained, we then diagonalize the Wannier Hamiltonian at every k-point and partition the states into submanifolds (e.g., valence, conduction): they are grouped together if they fall inside the desired energy interval. Next, we fix the gauge randomness of the submanifolds using parallel transport18. Finally, the MLWFs for each submanifold are generated by maximally localizing their spread functionals, independently. Since the submanifolds are already isolated in energy (i.e., disentanglement2 is not needed), and parallel transport provides a continuous gauge, the final maximal localization converges effortlessly. In the case of separating VB and CB, the final two groups of MLWFs span the fully occupied valence and the fully unoccupied conduction manifolds, and their shapes closely resemble bonding and anti-bonding orbitals, respectively. Compared with SCDM, the present method works fully in reciprocal space, reducing the computer memory requirements and also being computationally faster. Compared with the optimal projection functions method13 or the dually localized Wannier functions method14, we do not change the spread functional but use the original one in Ref. 1, thus the resulting WFs are maximally-localized in their original definition; moreover, the parallel transport step is non-iterative and always quickly provides a good starting point for the final maximally-localization step, avoiding potential convergence issues that might occur in an iterative method.

In the following, we first discuss and validate the present method, which we name manifold-remixed Wannier function (MRWF), on the VCB of a 3D material (silicon), the VCB of a 2D material (MoS2), the top VB of MoS2, and the 3d manifold of SrVO3. We also discuss the bonding/anti-bonding character of the resulting MLWFs, as well as band interpolation accuracy. To analyze statistics of band interpolation quality and demonstrate the robustness of the present approach, we Wannierize the VB and CB of a diverse set of 77 insulators, with the number of atoms between 1 and 45.

Results

The manifold separation algorithm

While obtaining the starting WFs is not the focus of this paper, we remind here that the standard Wannierization algorithm1,2 requires initial projection orbitals \(\left\vert {g}_{n}\right\rangle\) to guide the spread minimization and find the most meaningful minimum and the related unitary transformation matrices Uk at each k-point k. The initial guesses (also called initial projection orbitals) \(\left\vert {g}_{n}\right\rangle\) are used to rotate the original Bloch wavefunctions \(\left\vert {\psi }_{m{{{\bf{k}}}}}\right\rangle\) into

$$\left\vert {\tilde{\psi }}_{n{{{\bf{k}}}}}\right\rangle =\mathop{\sum }\limits_{m=1}^{M}\left\vert {\psi }_{m{{{\bf{k}}}}}\right\rangle \langle {\psi }_{m{{{\bf{k}}}}}| {g}_{n}\rangle ,$$
(1)

where n and m are the indices for WFs and Bloch bands, respectively; M is the total number of Bloch bands; and k is the Bloch quasi-momentum. Note that \(\left\vert \tilde{\psi }\right\rangle\) are independent of any arbitrary rotation gauge for the \(\left\vert {\psi }_{n{{{\bf{k}}}}}\right\rangle\). For metals or for VCB of insulators, one typically starts with hydrogenic s,p,d,f orbitals1 as the initial guesses for all the corresponding valence electrons. Then, the MLWFs can be generated using either the standard disentanglement2 and maximal localization algorithms1 or minimizing directly the total spread, such as the partly occupied WF method15 or a variational formulation19. Instead of hydrogenic orbitals, one can use SCDM11 or the recently introduced projectability disentanglement17 for a fully automated Wannierization. Irrespective of the approach taken to obtain MLWFs describing the VCB, these MLWFs will be the starting point of the present algorithm, with the next step to separate e.g., the VB and CB manifolds from the disentangled MLWFs that span both simultaneously. Note that while in the following we use the separation of VB and CB as an example to illustrate the method for clarity and simplicity, the present approach is not limited to the case of two submanifolds, but can be applied to any groups of bands separated in energy.

Since the disentanglement procedure aims at obtaining the lowest-possible spreads, it typically achieves this goal by mixing states originating from all the submanifolds (e.g., VB and CB) of interest. To decompose the manifold into two orthogonal submanifolds, we diagonalize the Wannier-gauge Hamiltonian \({H}_{{{{\bf{k}}}}}^{W}\) (the superscript W indicates the Wannier gauge),

$${H}_{{{{\bf{k}}}}}^{W}={V}_{{{{\bf{k}}}}}{{{{\mathcal{E}}}}}_{{{{\bf{k}}}}}{V}_{{{{\bf{k}}}}}^{* },$$
(2)

where \({{{{\mathcal{E}}}}}_{{{{\bf{k}}}}}\) and Vk are the eigenvalues and the eigenvectors, respectively; * denotes conjugate transpose (note in physics, † is often used for conjugate transpose, however, when deriving complex differentials in mathematics, * is more widely used. To be consistent with the notations in Supplementary Sections 1.1 and 1.3, we choose to use * in the main text as well). Usually the eigenvalues and eigenvectors returned from linear algebra computer programs are already sorted in ascending order of eigenvalues; if not, we sort them in ascending order, so that the matrices are partitioned into two blocks,

$$\begin{array}{rcl}{{{{\mathcal{E}}}}}_{{{{\bf{k}}}}}&=&\left[\begin{array}{cc}{{{{\mathcal{E}}}}}_{{{{\bf{k}}}}}^{1}&0\\ 0&{{{{\mathcal{E}}}}}_{{{{\bf{k}}}}}^{2}\end{array}\right],\\ {V}_{{{{\bf{k}}}}}&=&\left[\begin{array}{cc}{V}_{{{{\bf{k}}}}}^{1}&{V}_{{{{\bf{k}}}}}^{2}\end{array}\right],\\ \end{array}$$
(3)

where \({V}_{{{{\bf{k}}}}}^{1}\in {{\mathbb{C}}}^{N\times P}\) (\({V}_{{{{\bf{k}}}}}^{2}\in {{\mathbb{C}}}^{N\times Q}\)) corresponds to states whose eigenvalues \({{{{\mathcal{E}}}}}_{{{{\bf{k}}}}}^{1}\) (\({{{{\mathcal{E}}}}}_{{{{\bf{k}}}}}^{2}\)) are below (above) the band gap, and 0 represents a zero matrix. Here, N is the number of WFs of the VCB manifold, P and Q are the number of WFs in the valence (below band gap) and the conduction (above band gap) submanifolds, respectively, such that N = P + Q. Next, all the Wannier-gauge operators are rotated according to \({V}_{{{{\bf{k}}}}}^{1}\) for the valence submanifold: for instance, the overlap matrices \({M}_{{{{\bf{k}}}},{{{\bf{b}}}}}^{W}\) (for computing the spread functional) is rotated by

$${M}_{{{{\bf{k}}}},{{{\bf{b}}}}}^{W,1}={V}_{{{{\bf{k}}}}}^{1* }{M}_{{{{\bf{k}}}},{{{\bf{b}}}}}^{W}{V}_{{{{\bf{k+b}}}}}^{1},$$
(4)

where

$$\begin{array}{rcl}{M}_{{{{\bf{k}}}},{{{\bf{b}}}}}^{W}&=&{U}_{{{{\bf{k}}}}}^{* }{M}_{{{{\bf{k}}}},{{{\bf{b}}}}}{U}_{{{{\bf{k}}}}+{{{\bf{b}}}}},\\ {M}_{{{{\bf{k}}}},{{{\bf{b}}}}}&=&\langle {u}_{m,{{{\bf{k}}}}}| {u}_{n,{{{\bf{k+b}}}}}\rangle ,\end{array}$$
(5)

Uk are the unitary transformations from the VCB manifold Wannierization, and \(\left\vert {u}_{m,{{{\bf{k}}}}}\right\rangle\) is the periodic part of Bloch wavefunction \(\left\vert {\psi }_{m,{{{\bf{k}}}}}\right\rangle =\exp (i{{{\bf{k}}}}{{{\bf{r}}}})\left\vert {u}_{m,{{{\bf{k}}}}}\right\rangle\). For more details on the notations of Mk,b and b-vectors, see Ref. 1. Consistently, the \({{{{\mathcal{E}}}}}_{{{{\bf{k}}}}}^{1}\) is used as the new eigenvalues. Now the problem is reformulated into a Wannierization of an isolated submanifold with P WFs for VB. Similarly, the conduction manifold operators are rotated by \({V}_{{{{\bf{k}}}}}^{2}\), and an analogous Wannierization of an isolated submanifold with Q WFs. Indeed, the first-step Wannierization of VCB has already disentangled the MLWFs from all the remaining higher-energy bands, so that these MLWFs span all the target submanifolds we are interested in. To achieve our goal, we are left with Wannierizations of two isolated submanifolds and thus the subsequent steps do not need any disentanglement. Such a two-step procedure makes the whole algorithm quite robust, especially when Wannierizing the CB, for which it is difficult to provide good initial projections of the corresponding anti-bonding orbitals.

The remaining difficulty of the Wannierization of the two isolated submanifolds is caused by the diagonalization in Eq. (2). Indeed, since the Hamiltonians \({H}_{{{{\bf{k}}}}}^{W}\) are independently diagonalized at each k, the resulting eigenvectors will have different gauges at different k-points, requiring additional Wannierizations in each submanifold. Since these Wannierizations are carried out on submanifolds that have isolated bands, the minimization algorithm is typically more robust to the choice of initial projections compared to the case of disentanglement. One could simply resort to random Gaussian initial projections followed by maximal localization to reach the MLWFs for the two submanifolds, respectively; or even brute-force maximal localization starting from the random gauge after the Wannier Hamiltonian diagonalization. However, a direct maximal localization starting from a random gauge is not robust—we observe that, in many cases, the maximal localization fails due to zeros in the diagonal of the overlap matrices Mk,b; and, even if it converges, it displays the same issues of random Gaussian projections: a large number of iterations, and oscillatory evolution of spread and the sum of MLWF centers during the minimization process (see Supplementary Fig. 1 for discussions on the convergences of these choices). Moreover, when the number of k-points Nk is large, the maximal localization is much harder to converge. A better solution is finding good starting gauges for the two submanifolds in an automated fashion.

To tackle this challenge, we adopt the parallel transport algorithm18 to construct smooth gauges for the two submanifolds. For an isolated manifold, the existence of a smooth gauge is determined by its topological obstructions, which are characterized by the Chern numbers (one in 2D and three in 3D). If the Chern numbers are 0 (as it is the case for systems with time-reversal symmetry), then it can be proven20 that it is possible to construct a continuous gauge explicitly by the following procedure18: (a) Suppose ki [0, 1] (in fractional coordinates) for i = x, y, z: propagate (using singular value decomposition of overlap matrices \({M}_{{{{\bf{k}}}},{{{\bf{b}}}}}^{W}\) to maximally align the gauge between neighboring k-points) the Bloch wavefunctions \(\left\vert {u}_{n{{{\bf{0}}}}}\right\rangle\) at Γ along kx from k-point 0 = (0, 0, 0) to 1 = (1, 0, 0), to construct a continuous gauge across these k-points. The new gauge is not necessarily quasi-periodic, i.e., satisfying the Bloch theorem imposed on \(\left\vert {u}_{n{{{\bf{k}}}}}\right\rangle\) by \(\left\vert {u}_{n{{{\bf{k+K}}}}}\right\rangle ={\tau }_{{{{\bf{K}}}}}\left\vert {u}_{n{{{\bf{k}}}}}\right\rangle\) where \({\tau }_{{{{\bf{K}}}}}=\exp (-i{{{\bf{K}}}}{{{\bf{r}}}})\) is the translation operator in reciprocal space, and K is a reciprocal lattice vector. In general, instead, the two states are related by \(\left\vert {u}_{n{{{\bf{1}}}}}\right\rangle =({\tau }_{{{{\bf{1}}}}}\left\vert {u}_{n{{{\bf{0}}}}}\right\rangle ){V}_{{{{\rm{obs}}}}}\), where this expression defines the obstruction matrix Vobs quantifying the misalignment of the propagated gauge and the gauge required by Bloch theorem at (1, 0, 0). To fulfill the quasi-periodic boundary condition, we can therefore multiply each \(\left\vert {u}_{n{{{\bf{k}}}}}\right\rangle\) by \(\exp (-{k}_{x}L)\) (note kx [0, 1]), where \({V}_{{{{\rm{obs}}}}}=\exp (L)\): in this way, we obtain a continuous gauge that also satisfies Bloch theorem, i.e., the obstruction matrix in this modified gauge becomes the identity matrix. (b) For each kx, propagate along ky from (kx, 0, 0) to (kx, 1, 0). Now we obtain a series of obstruction matrices Vobs(kx) along kx. If the winding number18,21,22 of the determinants of Vobs(kx) vanishes (i.e., the Chern number is 0), then there is a continuous function that maps Vobs(kx) to identity18. We then multiply the gauge by this mapping, so that the new gauge satisfies the quasi-periodic boundary condition in the kx − ky plane. Ref. 18 explicitly constructs the continuous mapping by their column interpolation method for the Kane-Mele model, which is a 2D fermionic time-reversal-symmetric model (i.e., having a vanishing Chern number) but can present a non-zero \({{\mathbb{Z}}}_{2}\) number; as a comparison, previous methods had difficulties in handling \({{\mathbb{Z}}}_{2}\) systems18,23,24, sometimes requiring model-specific information25,26. (c) For each (kx, ky), propagate along kz from (kx, ky, 0) to (kx, ky, 1). Now the obstruction matrices Vobs(kx, ky) depend on both kx and ky. Similar to point (b), if the two winding numbers of the determinants of Vobs(kx, 0) and Vobs(0, ky) vanish, then there is a continuous function that maps Vobs(kx, ky) to identity. We then multiply the gauge with this mapping and obtain the final gauge satisfying the quasi-periodic boundary condition in 3D. Ref. 18 demonstrates this constructive algorithm to obtain a continuous gauge for a 3D system (silicon). The results also show that the continuous gauge can be further smoothened by the standard maximal localization procedure1 to construct MLWFs. We stress that the algorithm is non-iterative and fast, thus solving the problem of finding good initial WFs for isolated manifolds in an efficient and robust way.

As shown in Supplementary Fig. 1, parallel transport generates a much better starting point than random Gaussian projections or random gauges: the convergence of maximal localization is much faster, and the spread and the sum of MLWF centers smoothly evolve during minimization. We note that since the propagation of gauge requires overlap matrices between a particular set of nearest-neighboring k-points, in the Supplementary Section 1.2 we present a procedure so that parallel transport can be applied to any arbitrary crystal structure.

In summary, the sequential parallel transports move the obstructions to the Brillouin zone edges, and the column interpolation method fixes the quasi-periodicity. Our tests on a set of 77 insulators (see discussion later in Section Results on 77 insulators) show that this algorithm is able to construct a good initial gauge, and maximal localization is able to construct MLWFs without issue.

We now mention that since we propagate the gauge starting from the first k-point (0, 0, 0), there is still one gauge arbitrariness at this Γ point. Here, we suggest to insert an additional step that first minimizes the spread functional w.r.t. a single rotation matrix W for the first k-point, before performing the standard maximal localization w.r.t. all k-points to obtain MLWFs. Indeed, thanks to the small size of W, this first preliminary step is computationally efficient, and can help in further improving the overall robustness of the full algorithm that we are presenting here. To achieve this, we derive the expression of the gradient of the spread Ω w.r.t. the rotation matrix W in Supplementary Section 1.1. We then use this gradient with a manifold optimization algorithm27 to minimize Ω w.r.t. W, where W is constrained on the unitary matrix manifold \(\left\{W\in {{\mathbb{C}}}^{K\times K}| {W}^{* }W=I\right\}\), where K = P for the valence manifold, or K = Q for the conduction manifold. This minimization provides us with a single rotation matrix W that further improves the localization, while still preserving the parallel transport gauge: we stress that, in addition to increasing the robustness of the algorithm as mentioned earlier, this additional step can thus be beneficial for cases where the parallel transport gauge is implicitly assumed during the derivation of equations (for instance, Wannier interpolation of Berry curvature28, or Wannier interpolation of nonlinear optical responses29,30).

After the parallel transport and the single rotation, the resulting WFs are close to the ideal MLWFs. However, since parallel transport only generates a continuous quasi-periodic gauge, it typically does not provide the smallest possible spread. It is therefore helpful to perform a final smoothing of the gauge18 by running a final maximal localization step (see examples in Sections Silicon and Valence and conduction bands of MoS2). This can be achieved using either the original Marzari-Vanderbilt localization1 or a matrix manifold optimization w.r.t. gauge matrices at all the k-points, i.e., optimization on a product manifold of a series of unitary matrices \({\prod }_{{{{\bf{k}}}}}\left\{{U}_{{{{\bf{k}}}}}\in {{\mathbb{C}}}^{K\times K}| {U}_{{{{\bf{k}}}}}^{* }{U}_{{{{\bf{k}}}}}=I\right\}\), where K = P for valence and K = Q for conduction manifolds. As already mentioned, the multi-step procedure that we propose here aims at making the whole algorithm more robust, since every step produce a better starting point for the final iterative localization algorithm.

In summary, we start from an initial manifold that has been already singled out from the remaining high-energy states using standard procedure such as disentanglement and maximal localization (e.g., very accurately using projectability disentanglement17 to extract as much as possible the bonding and anti-bonding characters from all the bands). The subsequent diagonalizations of Wannier-gauge Hamiltonians separate the manifold into (two) orthogonal submanifolds (for VB & CB, respectively). The (two) parallel-transport steps (for the relevant submanifolds) construct continuous gauges, fixing the randomness caused by the independent Hamiltonian diagonalization at each k-point. The rotation w.r.t. a single unitary matrix removes the gauge arbitrariness of parallel transport at the first k-point. The final maximal localizations ultimately smoothen the gauge, leading to two sets of MLWFs, each of which spans the submanifold for VB or CB. In Supplementary Section 1.3, we prove that the final gauge transformation has block diagonal structure, i.e., the MRWFs are transformed according to

$$U({{{\bf{k}}}})=\left[\begin{array}{cc}{U}_{{{{\rm{VB}}}}}({{{\bf{k}}}})&0\\ 0&{U}_{{{{\rm{CB}}}}}({{{\bf{k}}}})\end{array}\right],$$
(6)

where UVB(k) and UCB(k) are unitary matrices for VB and semi-unitary matrices for CB, respectively.

Silicon

To test the validity of the present method, we first disentangle and maximally localize the VCB of silicon into 8 WFs, using the standard hydrogenic s and p projections with energy window disentanglement (we use hydrogenic initial guesses and energy window disentanglement here to demonstrate that the present approach works well as long as the entire VCB are accurately described; one can also use PDWF to construct MLWFs spanning the entire VCB). The resulting WFs, two of which have s-character and six of which have p-character, are shown in the VCB column of Fig. 1a.

Fig. 1: WF shapes and band interpolation of silicon.
figure 1

a WF shape of various Wannierization methods. In the header, the left, center, and right columns correspond to the valence plus conduction bands (VCB), valence bands (VB), and conduction bands (CB), respectively. The PT column shows WFs after running parallel transport (PT); The PT+SR column shows WFs after running PT and single rotation (SR) of W matrix; the PT(+SR)+ML column shows WFs after running PT (and optionally SR) and maximal localization (ML), since PT+SR+ML and PT+ML fall to the same minimum. The numbers under each WF are the spread and its multiplicity: e.g., 1.668 (2) means there are two WFs having spread 1.668 Å2. The last row ∑ΩWF is the total spread of each calculation. The blue spheres are the silicon atoms. b Band structure comparison of DFT, VCB, VB, and CB. The horizontal dashed blue line is the upper limit of the frozen window for disentanglement (DIS). The VCB are computed by Wannier interpolation from DIS+ML; the VB and CB are computed by Wannier interpolation from PT+ML.

For the valence manifold, after running the Hamiltonian diagonalization and parallel transport, we obtain four WFs with spreads around 4 Å2, but their shapes do not have clear physical meaning, since the gauge of the first k-point is still arbitrary (see PT column inside the VB column of Fig. 1a); after running the single rotation (SR) of the W matrix, their spreads are further minimized to around 3 Å2, and the shapes now resemble the bonding orbitals between neighboring silicon atoms (PT+SR column inside the VB column of Fig. 1a); a final maximal localization (ML) further reduces the spreads to around 2 Å2 and the four spreads end up becoming identical (PT(+SR)+ML column inside the VB column of Fig. 1a) thus respecting the symmetry of the full system. For the conduction manifold (CB columns of Fig. 1a), again the shapes of WFs after parallel transport have no clear meaning. However, even after the single rotation, the shapes of WFs still do not resemble the expected anti-bonding orbitals, and only after the final maximal localization the anti-bonding shape is recovered. Note that, in this simple case of silicon, for both valence and conduction manifolds we reach the same set of WFs whether we run a maximal localization directly after parallel transport, or a maximal localization after parallel transport + single rotation, so the two cases are merged into one column in Fig. 1a under the header PT(+SR)+ML. The total spreads for the VB and the CB manifolds after parallel transport + maximal localization are 8.584 Å2 and 31.899 Å2, respectively. As expected, their sum is larger than the value for the VCB manifold (29.619 Å2) after disentanglement and maximal localization, since in the VCB case there is additional freedom to further minimize the spread by remixing bonding and anti-bonding WFs into pure s and p orbitals (we highlight that using atom-centered s,p projections does not lead to the most localized orbitals for VCB in silicon; with a choice of atom-centered sp3 projections, the total spreads can further decrease to 26.761 Å2, where four WFs have spreads 3.522 Å2 and another four 3.168 Å2). In addition, we note that since the Hamiltonian diagonalization returns a random gauge, the spreads for parallel transport and parallel transport + single rotation are different in each run, but the spreads of PT(+SR)+ML should always be the same, since the algorithm should always manage to find the maximally-localized gauge in this simple case. To quantify how our multi-step procedure increases the overall robustness of the algorithm while at the same time reducing its computational cost, we show in Supplementary Fig. 1 the evolution of WF spreads and centers during maximal localizations. Starting from the random gauge directly after Hamiltonian diagonalization (Supplementary Fig. 1a), it takes 28,430 iterations to converge; using random Gaussians as initial guesses (Supplementary Fig. 1b), the number of iterations decreases significantly to 812; with the parallel transport gauge (Supplementary Fig. 1c), the number of iterations further decreases to 228, and the evolution of spreads and centers is much smoother; the best starting gauge is the one after single rotation (Supplementary Fig. 1d), which only takes 40 iterations to converge, without any oscillations in the evolution of spreads and centers. Note that the spreads of valence MRWFs from PT(+SR)+ML are the same as MLWFs obtained from a direct Wannierization of the valence bands, i.e., the valence MRWFs after separation span the original DFT valence manifold, thus the initial VCB Wannierization does not cause any delocalization of the valence MRWFs (see Supplementary Section 1.3 for a proof).

We now discuss the quality of the band interpolation. The WFs for VB & CB are constructed from the initial VCB manifold obtained from a preliminary disentanglement and maximal localization. Therefore, if VB/CB are properly Wannierized, their band interpolation quality should be similar to that of VCB MLWFs. Thus, in the following paragraphs, we compare the band interpolations of VB/CB MLWFs, VCB MLWFs, and DFT bands. Once the starting VCB manifold was properly disentangled and could well reproduce the DFT band structure, as shown in Fig. 1b, the WFs after parallel transport + maximal localization for the VB and the CB manifolds can reproduce the corresponding part of the VCB Wannier-interpolated bands with high accuracy, being visually indistinguishable. To quantitatively evaluate the band interpolation quality, we compute the average band distance, ηisolated, between the VCB and VB/CB bands12,17,31. The ηisolated is defined as

$${\eta }_{{{{\rm{isolated}}}}}^{{{{\rm{A-B}}}}}=\sqrt{\frac{\mathop{\sum}\limits_{n{{{\bf{k}}}}}{({\varepsilon }_{n{{{\bf{k}}}}}^{{{{\rm{A}}}}}-{\varepsilon }_{n{{{\bf{k}}}}}^{{{{\rm{B}}}}})}^{2}}{{N}_{b}{N}_{{{{\bf{k}}}}}}},$$
(7)

where εnk are the eigenvalues of a band structure, and its superscript A or B refers to the eigenvalues of two different bands, A or B, which can be DFT bands, or Wannier-interpolated bands of VCB, VB, or CB; Nb and Nk are the number of bands and k-points, respectively. For silicon, we obtain: \({\eta }_{{{{\rm{isolated}}}}}^{{{{\rm{VCB-VB}}}}}=\) 6.6 meV and \({\eta }_{{{{\rm{isolated}}}}}^{{{{\rm{VCB-CB}}}}}=\) 15.5 meV. In general, the VB interpolation is more accurate than CB since the VB MLWFs usually have smaller spreads. To improve the CB interpolation quality, one might need to increase k-point sampling, as we discuss in Section Single top valence band of MoS2.

Valence and conduction bands of MoS2

Next, we test the method on a two-dimensional (2D) MoS2 monolayer. For VCB Wannierization, we use the standard hydrogenic Mo d and S s,p projections (the semicore states are excluded, so in total 9 VBs and the lowest 4 CBs are Wannierized). Since the VB and the lowest four CBs of MoS2 are isolated, 13 WFs are maximally localized from 13 bands without disentanglement. The 13 MLWFs can be well characterized into 4 groups by their angular momentum: as shown in the VCB column of Fig. 2b, from top to bottom, 3 resemble \({d}_{{z}^{2}}\), 2 resemble dxy, and the remaining 8 resembles sp3 hybridized orbitals.

Fig. 2: WF shapes and band interpolation of MoS2.
figure 2

a WF shape of various Wannierization methods. The notations are the same as Fig. 1a, except that in some cases the additional star sign (*) indicates that the WFs are grouped together if their spreads are roughly similar, and only one of the shapes is shown: e.g., 4.560 (3)* means there are three WFs having similar spreads, and their average spread is 4.560 Å2. The yellow and the silver spheres are the S and Mo atoms, respectively. b Band structure comparison of DFT, VCB, VB, and CB. The VCB are computed by Wannier interpolation after maximal localization (ML); the VB and CB are computed by Wannier interpolation from PT+ML. The DFT bands are almost indistinguishable since the VCB, VB, and CB Wannier-interpolated bands overlap essentially exactly with the DFT bands.

For the valence manifold, both after PT and after PT+SR, the WFs still do not have a clear resemblance to bonding orbitals; after PT+ML or PT+SR+ML, the WFs can be well grouped into six hybrids of Mo \({d}_{{z}^{2}}\) + S p, two s-like WFs near sulfur atoms, and one WF floating inside the hexagonal cage and having C3h symmetry, originating from the hybridization of three properly oriented Mo \({d}_{{z}^{2}}\) orbitals from the three nearest Mo atom. For the conduction manifold, WFs after PT are already close to the anti-bonding hybrid orbitals, and the further SR or ML steps help to slightly reduce the spreads and result in more symmetrized WF shapes. We notice that in contrast to intuition, in this case it took more iterations to converge starting from PT+SR gauge than directly from the PT gauge, as shown in the Supplementary Fig. 2. Although the PT+SR cases start from a smaller total spread, the maximal localizations got stuck longer in plateaus in the final stages, leading to longer iterations. However, in all cases, the evolutions are smooth and converge in <500 iterations, since both valence and conduction are isolated manifolds themselves, and PT is able to construct good starting gauges.

In terms of band interpolation, again the Wannier interpolated VB and CB overlap essentially exactly with the DFT bands as well as the Wannier interpolated VCB, as shown in Fig. 2b, and demonstrated quantitatively by the excellent band-distance values: \({\eta }_{{{{\rm{isolated}}}}}^{{{{\rm{VCB-VB}}}}}=\) 0.19 meV and \({\eta }_{{{{\rm{isolated}}}}}^{{{{\rm{VCB-CB}}}}}=\) 0.51 meV.

Single top valence band of MoS2

In practical applications, the highest valence and lowest conduction bands are of high interest since they are critical for electronic transport properties. However, the Wannierization of a single band remains elusive since it is difficult to write down a proper initial projection, resulting from a complete hybridization of many different atomic orbitals. However, in the MoS2 case, since the top valence band is isolated with respect to all other bands, we can use our algorithm to construct a smooth gauge for that single band, demonstrating the more general applicability of our method, beyond the separation of VB & CB. Note that if one is only interested in Wannierizing an isolated group of bands, the parallel transport itself is sufficient to construct a good gauge as the starting point, followed by maximal localization to construct well-localized MLWFs. However, when one is interested in separating two submanifolds, or Wannierizing a submanifold that is entangled with other bands (e.g., the conduction bands of an insulator), the VCB Wannierization is necessary to construct a good starting manifold for the subsequent separation.

Figure 3 a shows the band interpolation of this single-band WF, and the inset shows the shape of this highly symmetric WF in real space. As usual, since the separate Wannierizations in each submanifold have less degrees of freedom compared with the Wannierization of the initial manifold, the WF spreads for separate Wannierization are usually larger. Indeed, the single WF has a relatively large spread (9.288 Å2). For such a large spread, artificial interactions between periodic copies of the same WF in different supercells (where the supercell size is determined by the k-point sampling) may start to become non-negligible. Indeed, we observe some small oscillations at the minimum of the band along Γ to M and along M to K, whose zoom-ins are shown in Fig. 3b and c. By increasing the k-point sampling from the 12 × 12 × 1 (0.2 Å−1 density, same as the VCB Wannierization) to 18 × 18 × 1, the interpolation quality improves significantly (see Fig. 3b and c). This means that the band interpolation error is not caused by our separation method, but by the insufficient k-point sampling. Therefore, if one targets a very high band interpolation quality, the k-point sampling might need to be increased when considering a submanifold only.

Fig. 3: Band structure comparison of the single MoS2 top valence band.
figure 3

a Comparison of DFT and Wannier-interpolated top VB. The bottom-left inset shows the shape of the resulting single MLWF. b and c Zoom-in comparisons of the Wannier-interpolated bands using different k-point samplings: red dashed line for 12 × 12 × 1, blue dotted dashed line for 14 × 14 × 1, and green dotted line for 18 × 18 × 1. The 16 × 16 × 1 is not shown since it has similar quality to the 14 × 14 × 1.

SrVO3

Here we test the present method on the metallic perovskite SrVO3, which is a correlated material on the t2g Hubbard manifold. At the DFT level, the 3d manifold overlaps with other conduction bands in energy, but still at each k-point the 3d manifold has a finite gap w.r.t. others: the minimum gap (37.8 meV) occurs at R point separating the 3d manifold from bands above, thus satisfying the requirement of isolated manifold for the present method. Starting from 24 MLWFs for VCB, we generate two sets of MLWFs: 5 for 3d and 19 for the remaining manifold. For brevity, we only show the comparison of DFT and Wannier-interpolated bands in Fig. 4a, while the respective WF shapes and spreads are shown in Supplementary Figs. 3 and 4. For the 3d manifold, the PT gauge is already quite close to the maximally localized gauge: maximal localization only slightly decreases the total spread from 9.815 Å2 of PT to 9.629 Å2, and symmetrizes the shapes of WFs (the 3d columns of Supplementary Fig. 3). For the remaining manifold, it is quite hard to converge: only after 13,027 iterations (Supplementary Fig. 4) the maximal localization can converge to real-valued, spatially-symmetrized MLWFs (Supplementary Fig. 3). In this case, the single rotation greatly helps in improving the convergence: only 1544 iterations are needed to converge to the same MLWFs starting from PT+SR gauge, also removing the oscillations in spreads and centers during maximal localization (Supplementary Fig. 4). For the band interpolation, again the respective manifolds are accurately reproduced, as demonstrated by the bands in Fig. 4 and the band distances: \({\eta }_{{{{\rm{isolated}}}}}^{{{{\rm{VCB-3d}}}}}=\) 6.74 meV and \({\eta }_{{{{\rm{isolated}}}}}^{{{{\rm{VCB-others}}}}}=\) 3.00 meV. Furthermore, since the t2g and eg manifolds are gapped in energy, we can also separate them into two submanifolds. As shown in Fig. 4b, the t2g and eg bands are again reproduced very well.

Fig. 4: Comparison of DFT and Wannier-interpolated bands for SrVO3.
figure 4

a The VCB are computed by Wannier interpolation using PDWF; the 3d bands (3d) and the remaining bands (others) are computed by Wannier interpolations from PT+ML. At DFT level, the 3d bands have a small gap (37.8 meV at R point) separated from the bands above; the present algorithm successfully separates the 3d submanifold from the remaining manifold. b The t2g and eg bands are further separated starting from the 3d bands of (a).

Results on 77 insulators

Finally, we test our method on a set of 77 insulators with number of atoms in the unit cell ranging from 1 to 45. This is the same as the insulator set of Ref. 12, except that 4 (He, Ne, Ar2, Kr2) of the 81 materials are excluded since they consist of closed-shell noble-gas atoms, where the valence electrons are fully occupied (and there is thus no need for separate Wannierizations). This comprehensive test set not only validates the correctness of the present method, but also helps improve its generality to cover edge cases (e.g., the additional treatment of b-vectors in the Supplementary Section 1.2) that would be difficult to discover with only a few test cases. The separate Wannierization is implemented as a fully automated AiiDA32,33,34 workflow, which first runs the Wannierization of VCB using PDWF17, then splits the VCB manifold with the method discussed here (see Section CODE AVAILABILITY for the Wannier.jl code implementation), and then runs two separate maximal localizations using Wannier90 for the VB and the CB manifolds, respectively.

All the Wannierizations finish successfully and have excellent band interpolation quality, which we measure by the band distance12,17,31 ηisolated for comparisons between isolated bands (VB of separate Wannierization w.r.t. VB of DFT, VB of separate Wannierization w.r.t. VB of VCB Wannierization, CB of separate Wannierization w.r.t. CB of VCB Wannierization), and η2 for comparisons involving CB of DFT (VCB Wannierization w.r.t. VCB of DFT, CB of separate Wannierization w.r.t. CB of DFT),

$${\eta }_{2}^{{{{\rm{A-B}}}}}=\sqrt{\frac{\mathop{\sum}\limits_{n{{{\bf{k}}}}}{\tilde{f}}_{n{{{\bf{k}}}}}{({\varepsilon }_{n{{{\bf{k}}}}}^{{{{\rm{A}}}}}-{\varepsilon }_{n{{{\bf{k}}}}}^{{{{\rm{B}}}}})}^{2}}{\mathop{\sum}\limits_{n{{{\bf{k}}}}}{\tilde{f}}_{n{{{\bf{k}}}}}}},$$
(8)

where \({\tilde{f}}_{n{{{\bf{k}}}}}=\sqrt{{f}_{n{{{\bf{k}}}}}^{{{{\rm{A}}}}}({E}_{{{{\rm{F}}}}}+2,\sigma ){f}_{n{{{\bf{k}}}}}^{{{{\rm{B}}}}}({E}_{{{{\rm{F}}}}}+2,\sigma )}\) and f(EF + 2, σ) is the Fermi-Dirac distribution with the Fermi energy set to 2 eV above the real Fermi energy EF to compare also part of the conduction bands; the smearing width is set to σ = 0.1 eV. The statistics of η are shown in Fig. 5. It is worth noting that the VB interpolation (\({\eta }_{{{{\rm{isolated}}}}}^{{{{\rm{VB-DFT}}}}}\) = 0.859 meV) is even more accurate than the VCB interpolation (\({\eta }_{2}^{{{{\rm{VCB-DFT}}}}}\) = 2.609 meV): this is partly because \({\eta }_{2}^{{{{\rm{VCB-DFT}}}}}\) is averaged over all bands, including the larger error of CB interpolation; to exclude the effect of averaging, we also compute the band distance of the VB of VCB Wannierization w.r.t. the VB of DFT, \({\eta }_{{{{\rm{isolated}}}}}^{{{{\rm{VB(VCB)-DFT}}}}}\) = 1.721 meV, which is larger than \({\eta }_{{{{\rm{isolated}}}}}^{{{{\rm{VB-DFT}}}}}\) = 0.859 meV, showing that the VB interpolation is indeed more accurate than the VCB interpolation—this can be explained by two facts: (1) the valence MRWFs are constructed by unitary transformations of Bloch states, thus the valence manifold is exactly preserved (see Supplementary Section 1.3 for a proof); (2) the valence MRWFs are more localized than the VCB MLWFs (will be discussed in the next paragraph), leading to a better Fourier interpolation quality. The CB interpolation (\({\eta }_{2}^{{{{\rm{CB-DFT}}}}}\) = 7.619 meV) is slightly worse than the CB of VCB Wannierization (\({\eta }_{2}^{{{{\rm{CB(VCB)-DFT}}}}}\) = 6.616 meV), since the CB MLWFs are more delocalized than the VCB MLWFs (will be discussed in the next paragraph); moreover, it appears much larger than the \({\eta }_{2}^{{{{\rm{VCB-DFT}}}}}\) = 2.609 meV since η is defined as an average over all bands—the (accurate) VB interpolations are not taken into account in the computation of \({\eta }_{2}^{{{{\rm{CB-DFT}}}}}\). In addition, and most importantly, the VB/CB to VCB distances are \({\eta }_{{{{\rm{isolated}}}}}^{{{{\rm{VB-VCB}}}}}\) = 2.219 meV and \({\eta }_{{{{\rm{isolated}}}}}^{{{{\rm{CB-VCB}}}}}\) = 3.835 meV, showing that the submanifolds are well separated with little loss of interpolation accuracy compared with the starting-point VCB Wannierization. For completeness, we also show the statistics of max band distance, which is a stricter measure of band interpolation quality, in the Supplementary Fig. 5.

Fig. 5: Band distances of 77 insulators.
figure 5

From top to bottom: histograms of band distances for valence plus conduction bands (VCB) w.r.t. DFT, valence bands (VB) of VCB Wannierization w.r.t. DFT, VB Wannierization w.r.t. DFT, VB Wannierization w.r.t. VCB Wannierization, conduction bands (CB) of VCB Wannierization w.r.t. DFT, CB Wannierization w.r.t. DFT, and CB Wannierization w.r.t. VCB Wannierization. The red and blue bars are the histograms and cumulative histograms, respectively. The vertical lines indicate the mean and median values.

Now we discuss the localization of MLWFs by comparing the average spread from the 77 materials. For VCB Wannierization, the average spread ΩVCB = 1.178 Å2; after separation (followed by maximal localization of VB and CB, respectively), the average spread of VB MLWFs is slightly more localized (ΩVB = 1.079 Å2); while that of CB MLWFs are more delocalized (ΩCB = 2.919 Å2). This is consistent with the intuition that the VB MLWFs are the more localized bonding orbitals whereas the CB MLWFs are the more delocalized anti-bonding orbitals. Finally, as discussed in the previous section, the separated MLWFs have less degrees of freedom compared with the VCB MLWFs, thus the sum of the spreads of VB and CB (ΩVB + ΩCB) is in general larger than that of VCB (ΩVCB). Figure 6b shows the percentage increase of ΩVB + ΩCB over ΩVCB. On average, there is a 52.9% increase of the spread. Note, however, that in three cases (Na2Se, Ca4O14V4, and HK) there are a 39.2%, 56.0%, and 5.1% decreases of spreads, respectively. For the first two cases, there are few large-spread VCB MLWFs, probably because the VCB Wannierizations are trapped in local minima; during the separation Wannierizations, the parallel transport algorithm is able to find a smoother gauge, thus reaching more localized MLWFs for both VB and CB, leading to smaller ΩVB + ΩCB than ΩVCB.

Fig. 6: WF spreads of 77 insulators.
figure 6

a From top to bottom: histograms of VCB, VB, and CB MLWF spreads. The upper limit of the right y-axis of each panel is the total number of WFs, respectively. b Histogram of the percentage increase of the sum of VB and CB spreads w.r.t. VCB spreads.

For completeness, we show the band-structure comparisons, the band distances, the evolution of spreads and the evolution of the sum of WF centers during maximal localization in Supplementary Section 3.1, for each of the 77 materials. The smooth evolution of spreads and sum of WF centers during maximal localization for CB and VB demonstrate that parallel transport is able to construct continuous gauge, thus maximal localization has no difficulty in further smoothening the gauge.

Discussion

We introduce an automated method (manifold-remixed Wannier functions (MRWF)) to separate band manifolds by constructing MLWFs for the respective submanifolds that have finite energy gaps (at each k-point) between them. The method naturally extends to the case of valence and conduction manifolds, but also to any other case of isolated groups of bands. First, we start with a properly Wannierized valence plus conduction manifold, obtained using any manual or automated method (the recently introduced projectability disentangled WF17 is particularly suitable for this application since it is able to robustly and reliably construct MLWFs that preserve as much as possible the anti-bonding characters). Then, we split the manifolds by diagonalizing the Wannier-gauge Hamiltonian into submanifolds for target energy ranges, respectively. Next, using parallel transport, we construct smooth gauges for each submanifold to fix the randomness caused by the independent Hamiltonian diagonalization at every k-point. Finally, we maximally localize the parallel-transport gauge to obtain smooth MLWFs for the desired manifolds. Before the final maximal localization, we can optionally run a preliminary rotation w.r.t. a single unitary matrix to fix the remaining gauge randomness intrinsic to parallel transport. Often the final maximal localization is able to find the maximally-localized gauge directly; however, the single rotation step helps to improve the robustness of the final maximal localization, and has the additional benefit of improving localization while still preserving the parallel transport gauge, which might be relevant in some applications.

Results on silicon and MoS2 show that the final valence (conduction) MLWFs restore faithfully chemical intuition for bonding/anti-bonding orbitals, and accurately reproduce the valence/conduction part of the band structure of the valence plus conduction manifold. Moreover, we demonstrate that the method is not limited to the separation of valence and conduction manifolds, but also applicable to any system with band groups separated by a finite gap: for instance, the single top valence band of MoS2; or the 3d, t2g, and eg manifolds of SrVO3. Furthermore, we implement fully automated AiiDA32,33,34 workflows to carry out the whole separate Wannierization process, and test the present method on a set of 77 insulators. Statistics show that the band interpolation achieves excellent accuracy at the meV scale, and on average the sum of VB and CB MLWF spreads increase around 50% w.r.t. the VCB MLWF spreads. Thus, we highlight that to ensure accurate band interpolation quality, the k-point sampling density for separated Wannierization might need to be increased, as demonstrated in the Wannierization of the MoS2 top valence band.

As an outlook, we envision several applications that one may find useful with the preset approach: the analysis of bonding/anti-bonding orbitals based on MLWFs; material properties that rely solely on the occupied manifold, such as the electric polarization; spectral theories that require separate sets of localized orbitals for both occupied and unoccupied states (for instance, the Koopmans functionals to predict accurately the electronic band gap6); and the dynamical mean field theory for correlated electrons.

Methods

Calculation parameters

The DFT calculations are carried out by Quantum ESPRESSO35, using the SSSP efficiency (version 1.1, PBE functional) library31 for pseudopotentials and its recommended energy cutoffs. The high-throughput calculations for 77 insulators are managed by the AiiDA32,33,34 infrastructure which submits Quantum ESPRESSO and Wannier904 calculations to remote clusters, parses, and stores the results into a database, while also orchestrating all sequences of simulations and workflows. The automated AiiDA workflows are open-source and hosted on GitHub36. Semicore states from pseudopotentials are excluded from Wannierizations, except for a few cases where the semicore states overlap with valence states; in such cases, all the semicore states are Wannierized. A regular k-point mesh is used for the Wannier calculations, with a k-point spacing of 0.2 Å−1, as selected by the protocol in Ref. 12. Figures are generated by matplotlib37.