Wannier interpolation starts from certain matrix elements defined on the ab initio (\({\bf q}\)) grid. Those matrix elements should be evaluated within the ab initio code, namely within its interface to Wannier90. However, only QuantumEspresso has the most complete interface pw2wannier90.x. The other codes provide only the basic interface, which includes the eigenenergies \(E_{n{\bf q}}\) (.eig file) and overlaps

\[M_{mn}^{\mathbf{b}}({\bf q})=\langle u_{m{\bf q}}\vert u_{n{\bf q}+\mathbf{b}}\rangle\]

(file .mmn), where \(\mathbf{b}\) vector connects neighbouring \({\bf q}\)-points. This information allows to interpolate the band energies (and their derivatives of any order) as well as Berry connections (Yates et al. 2007) and Berry curvature (Wang et al. 2006). However, to evaluate the orbital moment of a Bloch state, one needs matrix elements of the Hamiltonian (Lopez et al. 2012) (.uHu file)

(1)\[C_{mn}^{\mathbf{b}_1,\mathbf{b}_2}({\bf q})=\langle u_{m{\bf q}+\mathbf{b}_1}\vert\hat{H}_{\bf q}\vert u_{n{\bf q}+\mathbf{b}_2}\rangle.\]

The evaluation of (1) is very specific to the details of the ab initio code, and implemented only in pw2wannier90.x and only for norm-conserving pseudopotentials. To enable the study of properties related to the orbital moment with other ab initio codes, the following workaround may be employed. By inserting a complete set of Bloch states at a particular \({\bf q}\) point \(\mathbf{1}=\sum_l^\infty \vert u_{l{\bf q}}\rangle\langle u_{l{\bf q}}\vert\) we can rewrite (1) as

(2)\[C_{mn}^{\mathbf{b}_1,\mathbf{b}_2}({\bf q})\approx\sum_l^{l_{\rm max}} \left(M_{lm}^{\mathbf{b}_1}({\bf q})\right)^* E_{l{\bf q}} M_{ln}^{\mathbf{b}_2}({\bf q}).\]

Similarly, the two quantities below allows to interpolate spin currnet matrices to calculate spin Hall conductivity. In Ryoo’s scheme (Ryoo et al. 2019) , they are required as input data (.sHu and .sIu)

(3)\[ \begin{align}\begin{aligned}\langle u_{m{\bf q}}\vert\hat{s}\hat{H}_{\bf q}\vert u_{n{\bf q}+\mathbf{b}}\rangle \approx \sum_l^{l_{\rm max}} \left(s_{lm}({\bf q})\right)^* E_{l{\bf q}} M_{ln}^{\mathbf{b}}({\bf q}).\\\langle u_{m{\bf q}}\vert\hat{s}\vert u_{n{\bf q}+\mathbf{b}}\rangle \approx \sum_l^{l_{\rm max}} \left(s_{lm}({\bf q})\right)^* M_{ln}^{\mathbf{b}}({\bf q}).\end{aligned}\end{align} \]

These equations are implemented within the wannierberri.utils.mmn2uHu submodule, which allows to generate the .uHu, .sHu, and .sIu file out of .mmn, .spn, and .eig files. The equality in (2) and (3) is exact only in the limit \(l_{\rm max}\to\infty\) and infinitely large basis set for the wavefunctions representation. So in practice one has to check convergence for a particular system. As an example the bandstructure of bcc Fe was calculated based on the QE code and a norm-sonserving pseudopotential from the PseudoDojo library(van Setten et al. 2018; Hamann 2013). Next, the orbital magnetization was calculated using the .uHu file computed with pw2wannier90.x and using the wannierberri.utils.mmn2uHu interface with different summation limit \(l_{\rm max}\) in (2). As can be seen in Fig. 1 already \(l_{\rm max}=200\) (corresponding energy \(\sim 230\) eV) yields a result very close to that of pw2wannier90.x. However one should bear in mind that convergence depends on many factors, such as as choice of WFs and pseudopotentials. In particular, for tellurium we observed (Tsirkin, Puente, and Souza 2018) that including only a few bands above the highest \(p\)-band is enough to obtain accurate results. However for iron, using a pseudopotential shipped with the examples of Wannier90, we failed to reach convergence even with \(l_{\rm max}=600\).


Fig. 1 Orbital magntization of bcc Fe as a function of the Fermi level \(E_F\) reative to the pristine Fermi level \(E_F^0\), evaluated using the .uHu file computed with pw2wannier90.x (dashed line) and using the wannierberri.utils.mmn2uHu interface (solid lines) with different summation limit \(l_{\rm max}\) in (2)

This utility calculates the matrices .uHu, .uIu, .sHu, and/or .sIu from the .mmn, .spn matrices, and also reduces the number of bands in .amn, .mmn, .eig and .spn files

Usage example:

python3 -m wannierberri.utils.mmn2uHu seedname NBout=10 NBsum=100,200  targets=mmn,uHu formatted=uHu
print the help message
the first band in the output file (counting starts from 1).
default: 1
the first band in the sum (counting starts from 1).
default: 1
the number of bands in the output files.
Default : all bands
the number of bands in the summation. (one may specify several numbers, usefull to test convergence with the number of bands).
Default:all bands
path to the input files.
Default: ./
path to the output files
files to write : amn, mmn, spn, uHu, uIu, sHu, sIu, eig
default: amn,``mmn``,``eig``,``uHu``
files to write as formatted uHu, uIu , sHu, sIu, spn, spn_in, spn_out, all
default: none