# First FLEUR run

As a first example of a FLEUR run we will calculate bulk Cu. As you already learned, we start with generating an inp.xml file by using the input generator. The corresponding basic input file is already provided in the CuBulk directory.

cd CuBulk


By now you already know how to inspect and interpret the basic input for the input generator. In this case the example is particular simple and contains only a title, the specification of the lattice and a list of atoms with only a single element:

cat CuBulk.txt


Running inpgen we now create an input for FLEUR:

inpgen -f CuBulk.txt


## Running FLEUR

One of the most basic usage info for FLEUR to learn is that the fleur or fleur_MPI executable will always read its input from an inp.xml file in the current directory.

The most basic call thus is simply

fleur_MPI


If all went well, the program should stop after some time with the message "all done". This is the message FLEUR will usually output after a sucessful run. In practice DFT is implemented as an iterative algorithm that starts with a first guess for the ground-state electron density and ends after several iterations with a self-consistent ground-state density. In Fleur by default up to 15 iterations of the self-consistency loop are performed (can be changed in inp.xml, parameter itmax). The output of the fleur calculation is available in the 'out' file and also in the 'out.xml' file.

You can observe the development of the distance between the input and output densities of each iteration in the terminal output. Alternatively this can also be obtained after the calculation by invoking 'grep dist out' to find the respective entries in the generated out file.

grep "distance of" out


The most important quantity that is directly obtainable from a DFT calculation is the total energy of the unit cell's ground state. Although this quantity cannot be measured total energy differences can be used to calculate many measurable quantities. It is written out in each iteration of the self-consistency cycle but only meaningful for the self-consistent ground-state density. How large is the total energy for the Cu example ('grep "total energy" out' to obtain the respective values for all iterations)?

grep "total energy" out


## FLEUR ouput

In general the most important output files of FLEUR are: - out: This is the most comprehensive output. It is meant to be human readable but sometimes contains a slightly overwhelming amount of information. - out.xml: This file is probably best suited for automatic processing. It contains a subset of the information in out. - cdn.hdf: This file contains the charge densities calculated. This is the key quantity you will need to run additional FLEUR calculations on top of your converged results or to restart a not-yet converged calculation. (if you use a version compiled without the HDF5 library you will find cdn* files instead.) - usage.json,juDFT_times.json: Files with technical info of the last run.

Inspect which files you now have in the directory.

ls


## Summary of your first FLEUR calculation

In this notebook you have learned how to * run FLEUR with an inp.xml file specifying the setup and parameters. * restart FLEUR in case you have not achieved convergence. * understand the key output files