# Berry-curvature {#sec:berry}

## Introduction

RESCU has been used to predict the topological properties of
heterostructures in a couple of studies \[[CMWG18](#CMWG18){.citation},
[CMWG19](#CMWG19){.citation}\]. A key element of the analysis is the
Berry curvature, defined as follows

[$$\mathbf\Omega_n(\mathbf{k})=\nabla_{\mathbf{k}} \times\mathcal{A}_n(\mathbf{k})$$]{label="eq:berry-curvature"}

where the Berry connection $\mathcal{A}_n$ is defined as

[$$\mathcal{A}_n(\mathbf k)=i\langle u_{n\mathbf k}(\mathbf r)|\nabla_{\mathbf k}|u_{n\mathbf k}(\mathbf r)\rangle$$]{label="eq:berry-connection"}

Eq. `eq:berry-connection`{.interpreted-text role="eq"} is difficult to
evaluate numerically because of the k-space gradient, and hence RESCU
implements this equivalent sum-over-eigenstates formula
[\[XYSV06\]](#XYSV06){.citation}

[$$\Omega_{n,xy}(\mathbf{k}) = -2\texttt{Im}\sum_{m\neq n}
\frac{\langle \psi_{n\mathbf{k}}|\hat v_{x}|\psi_{m\mathbf{k}}\rangle
\langle \psi_{m\mathbf{k}}|\hat v_y| \psi_{n\mathbf{k}}\rangle
}{
(\varepsilon_{m\mathbf{k}}-\varepsilon_{n\mathbf{k}})^2}$$]{label="eq:berry"}

where the velocity matrix elements are defined as

[$$v_{nm,\alpha}(\mathbf{k}) = \langle \psi_{n\mathbf{k}}|\hat v_{\alpha}|\psi_{m\mathbf{k}}\rangle = \left\langle \psi_{n\mathbf{k}}\left|\frac{\partial \hat H(\mathbf{k})}{\partial k_\alpha}\right|\psi_{m\mathbf{k}}\right\rangle$$]{label="eq:velocity"}

and

[$$\hat H(\mathbf{k}) = e^{-i\mathbf{k}\cdot\mathbf{r}}\hat H e^{i\mathbf{k}\cdot\mathbf{r}}$$]{label="eq:Hk"}

The Berry-curvature calculator was developed to study specific
two-dimensional heterostructures (e.g. graphene deposited on boron
nitride). Consequently, it is now subjected to the following
constraints:

1.  The system must be two-dimensional, oriented in the plane
    perpendicular to the z-direction.
2.  The Berry curvature is calculated in the $k_z = 0$ plane (hence Eq.
    `eq:berry`{.interpreted-text role="eq"} which gives
    $\Omega_{n,xy}(\mathbf{k})$).
3.  The system must be solved by means of numerical atomic orbitals
    (`LCAO.status = true`).
4.  The implementation is tested for degenerate spin systems only, but
    the collinear-spin formalism is supported.

## Example: Graphene/BN

<figure>
<img src="figs/gbn_berry.png" id="fig:gbn_berry" style="height:8cm"
alt="figs/gbn_berry.png" />
<figcaption>Berry curvature of the graphene-boron-nitride
heterostructure.</figcaption>
</figure>

In this section, we compute the Berry curvature of the first conduction
band of the graphene-boron-nitride heterostructure. Let's define the
input file `gbn_lcao_scf.input` as follows

``` matlab
LCAO.status = 1
info.calculationType = 'self-consistent'
info.savepath = './results/gbn_lcao_scf'
atom.element = [1 1 2 3]
da = 3.0425
atom.fracxyz = [2/3 1/3 0.5 + da/30
1/3 2/3 0.5 + da/30
2/3 1/3 0.5 - da/30
1/3 2/3 0.5 - da/30]
la = 4.648725932
domain.latvec = [[1/2  sqrt(3)/2     0]*la
[1/2 -sqrt(3)/2     0]*la
[0            0    30]]
domain.lowres = 0.3
element(1).species = 'C'
element(1).path = './C_ONCV_LDA.mat'
element(2).species = 'B'
element(2).path = './B_ONCV_LDA.mat'
element(3).species = 'N'
element(3).path = './N_ONCV_LDA.mat'
kpoint.gridn = [15,15,1]
```

This is a standard `self-consistent` calculation input file which will
provide us with the ground state density (and Hamiltonian). You may
execute the program typing

``` shell
rescu -i gbn_lcao_scf.input
```

Next, we define the input file `gbn_lcao_ber.input`

``` matlab
info.calculationType = 'berry-curvature'
info.savepath = './results/gbn_lcao_ber'
rho.in = './results/gbn_lcao_scf'
kpoint.gridn = [102,102,1]
berry.bandIndex = 9
```

Here are the key elements:

-   RESCU find the eigenvalues and eigenstates on a two-dimensional
    Monkhorst-Pack grid and then computes the Berry curvature when set
    to `berry-curvature`;
-   Points RESCU to the ground state results;
-   Defines the size of the Monkhorst-Pack grid. The Berry curvature
    typically requires very high k-sampling, here we use more than
    $10^{4}$ k-points. Alternatively, one can define a custom k-point
    mesh using the keyword `kpoint.kdirect` (see `inputDescription.m`
    for more details);
-   Determines the band index for which the Berry curvature is
    calculated (see Eq. `eq:berry`{.interpreted-text role="eq"}).

You may then run the program as follows

``` shell
rescu -i gbn_lcao_ber
```

Upon return, the results will be in `./results/gbn_lcao_ber.mat`. One
may find the Berry curvature in the structure component `berry.Omega`.
The Berry curvature can also be visualize typing

``` shell
rescu -p results/gbn_lcao_ber
```

The resulting graph should look like the one in
`fig:gbn_berry`{.interpreted-text role="numref"}.

::: {#citations}

[CMWG18]{#CMWG18 .citation-label}

:   Chen Hu, Vincent Michaud-Rioux, Wang Yao, and Hong Guo.
    `Moiré Valleytronics: Realizing Dense Arrays of Topological Helical Channels. <10.1103/PhysRevLett.121.186403>`{.interpreted-text
    role="doi"} Physical Review Letters 121.18 (2018), p. 186403.

[CMWG19]{#CMWG19 .citation-label}

:   Chen Hu, Vincent Michaud-Rioux, Wang Yao, and Hong Guo.
    `Theoretical Design of Topological Heteronanotubes. <10.1021/acs.nanolett.9b01661>`{.interpreted-text
    role="doi"} In: Nano Letters 19.6 (June 2019), pp. 4146--4150.

[XYSV06]{#XYSV06 .citation-label}

:   Xinjie Wang, Jonathan R. Yates, Ivo Souza, and David Vanderbilt.
    `Ab initio calculation of the anomalous Hall conductivity by Wannier interpolation. <10.1103/PhysRevB.74.195118>`{.interpreted-text
    role="doi"}. Phys. Rev. B 74 (19 Nov. 2006), p. 195118.
:::
