### bcc Fe: Construction of MLWFs without SOC

First we generate the input files using the input generator. We use the following inpgen.inp file for the input generator:

 Wannier tutorial: Fe
&input film=f /
2.71175  2.71175 2.71175
-2.71175  2.71175 2.71175
-2.71175 -2.71175 2.71175
1.0
1.0 1.0 1.0
1
26 0.0 0.0 0.0


Run inpgen2 -f inpgen.inp in order to obtain the inp.xml input file. Run fleur_MPI in order to converge the charge density. Check that the charge density is converged.

After converging the charge density we start with the construction of MLWFs. For this purpose, generate a new subdirectory Wann in your working directory. Copy inp.xml, cdn.hdf and sym.xml into the Wann subdirectory. Change into the Wann subdirectory and obtain from the inp.xml file information on the local orbitals. In this example, the input generator has defined the following local orbitals:

   <atomSpecies>
<species name="Fe-1" element="Fe" atomicNumber="26" flipSpinPhi=".00000000" flipSpinTheta=".00000000" flipSpinScale="F">
...
<lo type="SCLO" l="0" n="3" eDeriv="0"/>
<lo type="SCLO" l="1" n="3" eDeriv="0"/>
</species>
</atomSpecies>


Thus, there are 2 3s local orbitals and 6 3p local orbitals, which is 8 local orbitals in total. Out of these 8 local orbitals 4 are spin-up and 4 are spin-down. In collinear magnetic calculations without SOC the spin-up bands and the spin-down bands are counted separately. Therefore, the first 4 spin-up bands and the first 4 spin-down bands describe semicore states corresponding to these local orbitals. In this example we do not generate MLWFs for these semicore states. Thus, the first spin-up band of interest for the construction of MLWFs is band 5. Likewise, the first spin-down band of interest for the construction of MLWFs is band 5. In Fe the states from the 3d shell hybridize with the 4s and 4p states to form the bands at the Fermi energy. Therefore, we construct 18 MLWFs (3d contains 10 states, 4s contains 2 states and 4p contains 6 states. 10+2+6=18). These 18 MLWFs are split into 9 spin-up MLWFs (seedname WF1) and 9 spin-down MLWFs (seedname WF2). The corresponding group of 18 bands is not separated by a gap from the bands higher in energy. Therefore, we use disentanglement to disentangle 9 spin-up MLWFs from 18 spin-up bands and 9 spin-down MLWFs from 18 spin-down bands. Since the first 4 spin-up bands describe semicore states, we disentangle the 9 spin-up MLWFs from the bands 5 through 22 (because 4+18=22). Therefore, we add the section "wannier" to inp.xml, where we specify minSpinUp="5" and maxSpinUp="22" in the bandSelection:

   <output dos="F" band="F" vacdos="F" slice="F" mcd="F" wannier="T">
<wannier>
<bandSelection minSpinUp="5" maxSpinUp="22"/>
<jobList>  projgen prepwan90 stopopt </jobList>
</wannier>
</output>


Note that we do not need to add minSpinDown="5" and maxSpinDown="22", because by default the program assumes that minSpinDown=minSpinUp and maxSpinDown=maxSpinUp. Note that we added wannier="T" to the line output and we added a jobList with the keywords projgen, prepwan90, and stopopt. In order to make sure that fleur computes the first 22 bands we specify numbands="22" in the line cutoffs in inp.xml:

   <calculationSetup>
<cutoffs Kmax="3.50000000" Gmax="10.50000000" GmaxXC="10.50000000" numbands="22"/>


Create the file projgen_inp with the following contents:

Fe 2 2 0
Fe 2 3 0
Fe 2 5 0
Fe -5 0 0


Create a file kpts.xml with an equidistant 8x8x8 mesh of k-points. Now, run fleur_MPI in order to generate the file proj with the initial projections. The tasks projgen and prepwan90 are not parallelized. It is therefore sufficient to run fleur_MPI on a single node in order to define the initial projections (projgen) and to set up the bkpts and WF1 files (prepwan90).

Edit the jobList in inp.xml:

        <jobList> matrixmmn matrixamn </jobList>
</wannier>
</output>


Run fleur_MPI. You may run fleur_MPI in parallel. In WF1.win specify dis_froz_max=14.0 and run wannier90.x WF1. In WF2.win specify dis_froz_max=14.0 and run wannier90.x WF2. Converge the MLWFs. The converged MLWFs should look like this: For the spin-up MLWFs according to WF1.wout:

 Final State
WF centre and spread    1  ( -0.000000, -0.000000,  0.000000 )     1.54177668
WF centre and spread    2  ( -0.000000, -0.000000,  0.000000 )     1.54150957
WF centre and spread    3  (  0.000000, -0.000000, -0.000000 )     1.54223010
WF centre and spread    4  (  1.110752,  0.000575,  0.000213 )     2.79521764
WF centre and spread    5  ( -1.110752, -0.000575, -0.000213 )     2.79521764
WF centre and spread    6  ( -0.000466, -1.110514, -0.000201 )     2.79412439
WF centre and spread    7  (  0.000466,  1.110514,  0.000201 )     2.79412439
WF centre and spread    8  ( -0.000184, -0.000202, -1.110112 )     2.79228489
WF centre and spread    9  (  0.000184,  0.000202,  1.110112 )     2.79228489
Sum of centres and spreads ( -0.000000,  0.000000,  0.000000 )    21.38877020


For the spin-down MLWFs according to WF2.wout:

   Final State
WF centre and spread    1  ( -0.000000,  0.000000,  0.000000 )     1.66037839
WF centre and spread    2  ( -0.000000, -0.000000,  0.000000 )     1.66037839
WF centre and spread    3  (  0.000000,  0.000000, -0.000000 )     1.66037839
WF centre and spread    4  (  0.237900, -0.000000,  0.000000 )     4.06952586
WF centre and spread    5  ( -0.237900,  0.000000,  0.000000 )     4.06952586
WF centre and spread    6  (  0.000000,  0.237900,  0.000000 )     4.06952586
WF centre and spread    7  ( -0.000000, -0.237900,  0.000000 )     4.06952586
WF centre and spread    8  (  0.000000,  0.000000,  0.237900 )     4.06952586
WF centre and spread    9  ( -0.000000, -0.000000, -0.237900 )     4.06952586
Sum of centres and spreads (  0.000000, -0.000000,  0.000000 )    29.39829031