### Calculating Green's functions

Experimental Green's function features

Many of the features involving Green's functions are to be considered experimental in the MaX5 Release.

This is the case especially for intersite and interorbital Green's functions. If you are interested in
these features please contact Henning Janssen

The Green's function provides a tool to extract a variety of properties from DFT calculations. In fleur the calculation of Grren's functions fo specific orbitals and atoms is implemented. This implementation is restricted to the atoms repsoective muffin-tin sphere.

The scheme for these calculations starts from the Lehmann-representation of the Green's function.

Here and are atom sites and and are the eigenstates and eigenenergies of the Kohn-Sham system respectively.

Selection of Green's function elements

The selection of atoms and orbitals for Green's functions is done by inserting `greensfCalculation`

tags on the desired atoms (either `atomSpecies/species`

or `atomsGroups/atomGroup`

).
In addition, there are tags, which will lead to Green's function calculations for specific purposes (e.g. `torgueCalculation`

).
For more details refer to the element setup section

By utilizing the following decomposition of the denominator

the imaginary part of the expression above is much easier to compute. This is essentially equivalent to a density of states calculation. The complete Green's function can be calculated from the imaginary part via the Kramers-Kronig-Transformation.

Unoccupied States

For a Green's function calculation the unoccupied states have to be considered, since the algorithm relies on the Kramers-Kronig-Transformation,
which integrates from to for the energy.
For this reason the `numBands`

attribute in the `calculationSetup/cutoffs`

section might have to be increased or set to `all`

to make these calculations possible

Here we also deform the energy grid into the complex plane to reduce the number of necessary points on the contour to achieve accurate results.

Necessary energy contours

For a Green's function calculation two energy contours have to be defined. One equidistant energy grid close
to the real axis and a complex energy contour on which the Green's function is obtained. This is done inside the
tag `calculationSetup/greensFunction`

by inserting the `realAxis`

tag and at least one of the
`contourSemicircle`

, `contourDOS`

, `contourRectangle`

. For detailed information about each tag and the
corresponding contours you can refer to the respective section in the reference

Output of Green's function calculations

It is strongly encouraged to use Green's function calculations with a version compiled with the HDF5 library.
This way much more meaningful output is produced. All calculated Green's functions are provided in the `greensf.hdf`

file for further calculations in this case. Without HDF5 only basic information beyond any specific calculation
like the occupation matrix for all Green's function is provided.