Introduction

This tutorial describes how to prepare and write a Hamiltonian matrix in Wannier functions basis using the exciting-plus code. The theoretical background for Wannier functions generation and Hamiltonian production procedure is described in EPJB 65, 91 (2008). The procedure of Hamiltonian generation consists of three steps:

  • Self-consistent DFT calculation.
  • Preparation of input parameters for projection.
  • Generation of Wannier functions and writing of obtained Hamiltonian.

Below we illustrate this procedure on examples of nickel oxide and bcc-iron. The details about performing DFT calculations can be found in a code distribution or at the Exciting-plus web-site.

Example 1: Nickel oxide

Input file elk.in for NiO is shown below.

tasks
0         ! Ground state run starting from the atomic densities
10        ! Total, partial and interstitial density of states (DOS).
20        ! Band structure plot.

xctype    !PBE exchange-correlation potential, PRL 77, 3865 (1996)
20 0 0

autormt   ! muffin-tin radii should be determined automatically
.true.

betamax   ! maximum adaptive mixing parameter
0.1

scale
7.893389

avec
1.0 0.5 0.5
0.5 1.0 0.5
0.5 0.5 1.0

atoms
2                          ! nspecies
'Ni.in'                    ! spfname
2                          ! natoms
0.0 0.0 0.0 0.0 0.0 0.0    ! atpos, bfcmt
0.5 0.5 0.5 0.0 0.0 0.0    ! atpos, bfcmt
'O.in'                     ! spfname
2                          ! natoms
0.25 0.25 0.25 0.0 0.0 0.0 ! atpos, bfcmt
0.75 0.75 0.75 0.0 0.0 0.0 ! atpos, bfcmt

nempty                     ! the number of empty states
20

ngridk                     ! the k-point mesh sizes
4 4 4

dosmsum                    ! partial DOS is to be summed over m
.true.

plot1d
5 100
0.00000 0.00000 0.00000 ! G
0.00000 0.50000 0.00000 ! X
0.25000 0.25000 0.25000 ! L
0.25000 0.50000 0.00000 ! W
0.00000 0.00000 0.00000 ! G

wannier
.false.       ! switch on/off wannier block
.false.       ! .false. -> don't apply potential correction to WF states
4 2 1         ! N of atoms, N of orbital groups, N of energy intervals
5             ! number of orbitals in orbital group #1 : Ni-d
5 6 7 8 9     ! order of cubic 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 #3 : O-p
2 3 4         ! order of cubic harmonics : y, z, x
1 1 1         ! spin
1 1 1         ! energy window for each orbital
-0.1 0.3 0.0  ! Definition of energy interval:E_bottom, E_top
1 1           ! 1 atom takes 1 orbital group
2 1           ! 2 atom takes 1 orbital group
3 2           ! 3 atom takes 2 orbital group
4 2           ! 4 atom takes 2 orbital group

Copy species files Ni.in and O.in from distribution of exciting-plus to working directory and run exciting-plus. Exciting-plus allows to specify multiple tasks successively. Thus, at the end of first run one can find a lot of files with different information. A self-consistency info is in INFO.OUT file. The total and partial DOSes are written to TDOS.OUT, PDOS_S01_A0001.OUT and PDOS_S02_A0002.OUT files respectively (for Ni and O). The band structure is in the file BAND.OUT.Data visualization can be done with any suitable program.

The results of our calculations are presented in Fig.1. We are interested in the Ni 3d and O 2p bands located at 0.15 - 0.3 Ha and -0.05 - 0.15 Ha, respectively. These bands are well separated from other by energy gaps.

Figure 1: Band structure obtained in non-spin-polarized GGA calculation for NiO. In the figure the green lines indicate the upper and lower boundaries of energy window, which will be used later for projection, violet line denotes Fermi energy.

To start projection to WF basis set task 822 and switch on wannier block of input in elk.in. The token task 822 defines generation of band structure in basis of Wannier functions. The block wannier contains parameters of projection. The first line of the block switches on/off an utilization of block parameters. Second line switches on/off potential correction to the Wannier states. Third line defines number of atoms (2 Ni + 2 O = 4), orbital groups (d orbitals of Ni + p orbitals of O = 2) and energy interval(s) used in projection.

In next lines there are definition of mentioned orbital groups, energy intervals and relations between them. Line 4 sets number of orbitals in the first group to "5" (degeneracy of d states). Next three lines define first orbital group: it contains d orbitals in certain order (see Exciting-plus documentation), for all orbitals we take spin "1" (as a result of non-spin-polarized calculation) and energy interval "1". The next four lines define second orbital group: it contains 3 p orbitals of oxygen, for all 3 orbitals we take spin "1" and energy interval "1". It is important to note that states with different orbital symmetry cannot be mixed in the same orbital group.

The next line contains definition of energy interval shown in Fig.1 by green color: Ebottom =-0.1 Ha, Etop =0.3 Ha, third parameter is not used, set it to zero.

Next block of lines defines binding between atoms in structure block of elk.in (token atoms) and defined above orbital groups. From atom "1" and "2" of crystal structure (Ni) we take orbitals, defined in orbital group "1" (d). From atom "3" and "4" of crystal structure (O) we take orbitals, defined in orbital group "2" (p).

Figure 2: Comparison of bands in LAPW and WF basis for NiO.

One should run exciting-plus with task 822. The band structure in basis of Wannier functions is placed in WANN_BAND.OUT. To check correctness of chosen projection parameters, please draw on the same plot band structure in WF and LAPW basis (see Fig. 2). Bands in WF basis should coincide as much as possible with the LAPW bands. If it is not true, it is necessary to tune energy window to achieve the best possible match.

When you will be satisfied with the result, set task 809 and run exciting-plus again. It will create files hamilt.am and system.am containing Hamiltonian matrix in the basis of Wannier function and an additional information about considered compound.

Example 2: Iron in bcc structure

The second example to consider is building of Hamiltonian for bcc-Fe. Starting steps are the same as described above for NiO. Copy species file Fe.in from distribution of exciting-plus to working directory and run it. You can use the next input file elk.in:

tasks
0         ! Ground state run starting from the atomic densities
10        ! Total, partial and interstitial density of states (DOS).
20        ! Band structure plot.
nempty 15
ngridk 12 12 12
avec 2.769866077 2.769866077 2.769866077 2.769866077 2.769866077 -2.769866077 2.769866077 -2.769866077 2.769866077
atoms 1 : nspecies 'Fe.in' : spfname 1 : natoms; 0.0 0.0 0.0 0.0 0.0 0.0 : atposl, bfcmt below
rgkmax 9.5
plot1d 6 500 0.0 0.0 0.0 ! G 0.5 0.5 0.0 ! N 0.5 0.5 0.5 ! P 0.0 0.0 0.0 ! G 0.5 0.5 0.0 ! N 0.5 -0.5 0.5 ! H
wannier .false. ! switch on/off wannier block .false. ! .false. -> don't apply potential correction to WF states 3 3 1 ! N of atoms, N of orbital groups, N of energy intervals 1 ! number of orbitals in orbital group #1 : Fe-s 1 ! order of cubic harmonics : s 1 ! spin 1 ! energy window for each orbital 3 ! number of orbitals in orbital group #1 : Fe-p 2 3 4 ! order of cubic harmonics : y, z, x 1 1 1 ! spin 1 1 1 ! energy window for each orbital 5 ! number of orbitals in orbital group #1 : Fe-d 5 6 7 8 9 ! order of cubic 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 -0.1 1.5 0.0 ! energy window #1 : s-p-d complex of bands 1 1 ! atom 1 (Fe) gets first orbital group 1 2 ! atom 1 (Fe) gets second orbital group 1 3 ! atom 1 (Fe) gets third orbital group
wannier_soft_eint -0.1 0.6 0.005 0.15

The obtained band structure is presented in Fig.3. We would like to include sp and d states of iron into Wannier basis set. All bands are above 0 Ha, so Ebottom =-0.1 Ha is a good choice. Setting of Etop is a bit more tricky. Our basis includes 9 bands, but there is no band gap above them. With any choice of Etop, defined energy window will include less or more than 9 bands. Let set Etop =1.5 Ha, this window guarantees including of all 9 bands in basis.

There is only one atom in considered unit cell and three orbital groups for s , p and d  states. The connection between orbital groups and atom includes 3 lines. From atom "1" of crystal structure (Fe) we take orbitals, defined in orbital group "1" (s); in next line, from the same atom "1" we take orbitals, defined in orbital group "2" (p); and in last line again from atom "1" we take orbitals, defined in orbital group "3" (d).

Figure 3: Band structure obtained in non-spin-polarized GGA calculation for bcc-Fe. Violet bold line denotes Fermi energy, green bold lines indicate bottom and top of energy window, that will be used for projection.

To solve the problem with admixture of high lying energy bands we add to input file elk.in token wannier_soft_eint. It defines step functions at the bottom and top of energy window. Every step function defines weights of trial wave functions at given energy to constructed Wannier functions. First step function is centered at energy -1 Ha and has width 0.005 Ha, second step function is centered at energy 0.6 Ha and has width 0.15 Ha. It means that the weights of trial wave functions are equal to one within the energy window (-0.995 - 0.45) Ha and it vanishes smoothly to zero outside of (-1.005 - 0.75) Ha region.This technique allows one to cut off admixture of additional states at the boundary of energy window. Energy positions and width of step function are an additional parameters to improve coincidence between LAPW and WF bands.

Set task 822 and run exciting-plus to produce bands in WF basis. As seen form Fig.4, chosen parameters allow us to get reasonable agreement of bands near the Fermi energy (in the main - Fe-d bands), but projection of high-lying state is not good. Nevertheless, if you are not interested in high energy physical properties, this projection is good enough for DFT+DMFT calculations.

Set task 809 and run exciting-plus to create a Hamiltonian matrix and write files hamilt.am and system.am.

Figure 4: Comparison of bands in LAPW and WF basises for bcc-Fe.

Back to top