### Introduction

Here we will describe a generation of a Hamiltonian matrix in Wannier functions basis from ELK calculation. The theoretical background for Wannier functions generation and Hamiltonian production procedure is described in EPJB 65, 91 (2008). The obtained Hamiltonian is suitable to be used as an input for the AMULET code.

Typical Hamiltonian generation procedure consists of three steps:

1. Self-consistent DFT calculation

2. Band structure calculation

3. Wannier functions generation and the Hamiltonian construction.

### Step 1: Self-consistent DFT calculation

Use the ELK code in a usual way to obtain self-consistent results. The corresponding documentation can be found in a code distribution or at the ELK web-site.

### Step 2: Band structure calculation

After self-consistency is reached one can proceed to a band structure calculation. Before that step it is highly recommended to save the self-consistent results to a separate place. First, a path in the Brillouin zone has to be specified in an input file. For example, one can copy the following lines to elk.in:

`task`

822

plot1d

5 100

0.0 0.0 0.5

0.0 0.0 0.0

0.5 0.0 0.0

0.5 0.5 0.0

0.5 0.5 0.5

...

The change of task tells the program to compute eigenvectors at 100 k-points along the path defined by 5 vortices (in lattice coordinate system). After the calculation is completed the band structure along symmetry lines is written to the file bands.dat. This file contains Kohn-Sham eigenvalues of your system of interests.

### Step 3: Construction of Wannier functions and effective Hamiltonian

To calculate Wannier states and construct an effective Hamiltonian add the following lines to the elk.in input file:

`wannier`

.true. ! switch on wannier block

.false. ! .false. -> don''t apply potential correction to WF states

2 2 1 ! number of atoms, number of orbital groups, number of energy intervals

5 ! number of orbitals in orbital group #1 : Ni-d

5 6 7 8 9 ! standard order of cubical harmonics : xy, yz, 3z^2-r^2, xz, x^2-y^2

1 1 1 1 1 ! spin

1 1 1 1 1 ! energy window for each orbital

3 ! number of orbitals in orbital group #2 : O-p

2 3 4 ! y,z,x

1 1 1 ! spin

1 1 1 ! same energy window as for Ni-d

5 12 0.0 ! energy window #1 : p-d complex of bands

1 1 ! atom 1 (Ni) gets first orbital group

2 2 ! atom 2 (O) gets second orbital group

The ''wannier'' block specifies an energy window or (like in the presented example) band range (integer numbers) for which Wannier states have to be calculated. When the calculation done, a file bands_wann.dat wil appear in the working directory. It contains the energy bands of the effective Hamiltonian along high symmetry directions which have to coincide with the Kohn-Sham counterparts in the energy window defined.

To construct the effective Hamiltonian repeat the code run once again with task 807. The Hamiltonian will be written to the file WANN_H.OUT compatible with the AMULET format.