For this section of this tutorial please change into the tutorial directory.
cd inpgen
Performing Fleur calculations on some material always starts with the specification of a (prototype)
unit cell. With this basic specification the Fleur input generator inpgen
then generates a Fleur input file with
a reasonable parametrization for the provided unit cell. In this section we discuss the basic usage of the input
generator.
In general the input for the Fleur input generator consists of the definition of the unit cell shape as well as the definition of the atoms and atom positions in the cell. Optionally some additional parameters can be set to override or modify the automatic procedure used to determine the parametrization in the Fleur input file.
Using the input generator starts by writing a small text file containing the configuration of the unit cell. For a simple Si crystal such a file might look like:
Si bulk
&lattice latsys='cF', a0=1.8897269, a=5.43 /
2
14 0.125 0.125 0.125
14 -0.125 -0.125 -0.125
The first line of the file contains a comment. Here this comment is Si bulk
. Next comes the definition of the
crystal lattice. This is done in the &lattice
line. It starts with the specification of the lattice system
in latsys='cF'
. cf
specifies an fcc lattice. The line is completed with the setting of some parameters. In this
case the parameter a
is the lattice parameter of the fcc lattice and a0
is a factor that is multipied to all
lattice parameters. Note that the input generator expects the lattice specification in units of Bohr radii (
a
is provided in Angstrom we need the factor a0
to convert it to units of .
In the next part of the inpgen input the atom positions are specified. This starts by providing the number of atoms in the
next line. For this example system there are 2
atoms in the unit cell. The following lines define the atomic numbers
and related atom positions in internal coordinates, i.e., in coordinates of the Bravais lattice vectors. 14
is the atomic
number of Si and the two atoms are at
.
Consider that the name of the inpgen
input file is inpSi.txt
, a call to inpgen
may look like:
inpgen -f inpSi.txt
With this command inpgen
will generate a basic Fleur input file inp.xml
. In addition a file sym.xml
containing the symmetry
operations and a file kpts.xml
containing sets of k-points will be generated. These additional xml file are actually included into inp.xml
by the parser and can also be included directly in the file. (See corresponding documention for inpgen).
Furthermore a file struct.xsf
is generated. This is an XCrysden structure file that can be used to visualize
the just defined unit cell, e.g., to check for complex structures whether the setup is as expected. The output of the input
generator can be found in the file out
. If there are problems in generating the Fleur input file hints for the reason
might be found in this file or directly on the terminal. The generated file FleurInputSchema.xsd
is temporary. It is
generated in every inpgen
and fleur
run and only contains the formal specification of the Fleur input file format.
Modifying input
By changing into the directory inpgen
in the file view
to the left of this notebook you can find the input and output files of
the last example in which you run the input generator. You now can open
an editor view of inpSi.txt
to modify this file. As an alternative you could open a terminal and use the nano editor.
For example you could now modify the inpSi.txt
by specifying a different XC-Potential and overwritting the default of 'PBE'.
to do so, add a line with:
&exco xctyp='vwn' /
at the end of the file.
inpgen -f inpSi.txt
Running the input generator again will lead to an error as the inpgen by default will not overwrite existing inp.xml
files. You can force the programm to overwrite the file or delete it beforehand.
inpgen -overwrite -f inpSi.txt
The FLEUR input file: inp.xml
Have a closer look at 'inp.xml' and identify in it the different cutoff parameters and other numerical parameters used for the FLAPW method and for DFT in general. We will discuss the contents. The proper choice of the parameters is not a topic of this tutorial. Here we will mostly rely on the default values. If you perform real research with Fleur make sure that you obtain results that are also converged with respect to the parameters.
cat inp.xml
As you can see even for this very simple Si crystall the actual input
for the fleur code is rather long. In general you will find the
following sections:
- a comment taken from inpgen
- a section calculationSetup
containing most switches
controlling the setup. If you used other DFT codes before you will
probably recognize settings like those of the used XC-Functional or
cutoffs used for the plane waves
- a cell
section containing the actual unit cell, the
symmetries of the system (included from sym.xml) and the information on
the Brillouin zone integration with the k-point set
- an atomSpecies
section in which details about different
atomic species used in the calculation are defined. In pseudopotential
codes a lot of these settings are actually 'frozen' into the generation
process of the pseudopotentials.
- an atomGoups
section with the information about atomic
positions and species. The atoms are grouped according to the symmetry
of the system, which might lead to atoms being equivalent due to
symmetry.
- and finally an output
section in which you can control some aspects of the calculation to produce special output.
The inpgen
code generates defaults for most of the parameters and writes a standard inp.xml
file. You should know that not all possible input is present in the
file as fleur supports additional optional parameters. Please have a
look at the corresponding page of the documentation for reference.
Summary of inpgen
In this example we used the input-generator inpgen
to construct the input for FLEUR starting from some basic minimal input. Please remember that:
- inpgen
provides you with defaults that should be appropriate, but in some cases you might have to adjust the default parameters.
- In the documentation you will find examples to provide additional input to fine-tune your setup.
- inpgen
also is the k-point generator for fleur.
0 Comments