1. Noncollinear magnetism and force theorem
For many materials the magnetic unit cell is neither ferromagnetic nor antiferromagnetic but features a more complex magnetic structure in which the orientation of the magnetic moments related to the different atoms changes within the unit cell. Such magnetic structures are called noncollinear. In this tutorial we will calculate a noncollinear magnetic structure and compare it to the simple ferromagnetic and antiferromagnetic equivalents.
In fleur noncollinearity is treated such that within the MT sphere of a certain atom a single magnetization direction is assumed in the setup of the Hamiltonian but this direction can differ between the atoms. The magnetization directions in the MT spheres are given in terms of the two angles and analogous to the and angles used for the specification of the SQA in SOC calculations. In the interstitial region between the MT spheres the orientation of the magnetization continuously changes.
1.1. Noncollinear magnetism in FeMn
NOTE: While performing the calculations for this example you should download the visualization tool XCrysDen and get it to run if it doesn't already run on your computer. You will need it. Alternatively you can also work with VESTA.
We perform a noncollinear calculation with fixed magnetization directions in the MT spheres for FeMn. Use the following inpgen input as a starting point:
FeMn
&lattice latsys='sc' a=6.803 /
4
26.01 0.00 0.00 0.00
26.02 0.50 0.50 0.00
25.01 0.50 0.00 0.50
25.02 0.00 0.50 0.50
&end /
The "noco parametrization" by default is not written out to the inp.xml file. To generate it we have to invoke inpgen with the switch "noco". Do this to generate the inp.xml file. We also have to perform a few adaptions to actually perform the calculations:

Set the number of iterations to 50.

Set /calculationSetup/coreElectrons/@ctail to "F". Noncollinear features are incompatibel with this feature. The switch turns on a certain treatment of the part of the core electron density that reaches out of the MT spheres.

Set /calculationSetup/magnetism/@l_noco to "T". This actually switches on the noncollinear calculation mode.

Set /calculationSetup/nocoParams/@l_mperp to "T". This activates the calculation of the offdiagonal (SpinUp  SpinDown) part of the density in the MT spheres. This is required for the relaxation of the magnetization directions in the MTs. We perform such a relaxation one of the homework exercises.

Set /calculationSetup/nocoParams/@mix_b to "1.5". The relaxation of the magnetization directions is performed with linear mixing. This is the mixing parameter. Note that it has to be set to rather large values. (In comparison: When performing linear mixing for the density we deal with a mixing parameter in the order of 0.01 to 0.05.)

Set all MT radii to . (...this may actually not be required but it was done in the test calculation.)
Next we have to set the magnetization directions in the MT spheres. This is done in the /atomGroups/atomGroup/nocoParams XML element in the attributes alpha and beta. For our test calculation we use the following angles:
atom  

Fe1  Pi/4.0  7.0*Pi/4.0 
Fe2  Pi/4.0  3.0*Pi/4.0 
Mn1  3.0*Pi/4.0  3.0*Pi/4.0 
Mn2  3.0*Pi/4.0  5.0*Pi/4.0 
Tutorial maintenance
Check whether alpha and beta have to be swapped. There may be a mistake here.
Perform a selfconsistency calculation.
We now want to visualize the charge and magnetization densities. For this copy everything to a new directory and in this directory change in the inp.xml file /output/plotting/@iplot to "T". If you invoke fleur for this input it will complain that you don't provide a plot_inp file. But on the other hand it will generate a template for such a file. In the plot_inp file one specifies which plots are to be generated. By default 2 plots are generated, one 2D plot and one 3D plot. We slightly adapt this template:

We extend the first line with ",polar=t". Note that you should not introduce any unwanted spaces (no spaces in front of the comma) at this place. This line is sensitve to the column in which a variable is set.

for the 3D plot modify the grid such that it becomes a 50 x 50 x 50 grid.
Invoke fleur again. Now the following XCrysDen structure files are generated:

cdn_pl.xsf: a file containing the charge density (this is also produced for calculations that are not noncollinear)

mdnx_pl.xsf: magnetization density in x direction

mdny_pl.xsf: magnetization density in y direction

mdnz_pl.xsf: magnetization density in z direction
if polar=t you also obtain the following files:

mabs_pl.xsf: absolute value of the magnetization density

mphi_pl.xsf: phi angle for the magnetization direction at every point of the magnetization density

mtha_pl.xsf: theta angle for the magnetization direction at every point of the magnetization density
Run XCrysden and open one of the files, e.g., mphi_pl.xsf. Go to Tools>Data grid and select "plot2". You can then define different parametrizations for the visualization. Play with it. If you open one of the files not related to angles you will realize that most of the density and magnetization density if found very near to the atom positions.
If you have time you can also go to earlier tutorial examples from which you have selfconsistent solutions and generate charge density plots for those. For example Si should have a large density between the atoms due to the covalent bonding. Is this really the case?
2. Exercises
2.1. Relaxation of the noncollinear structure of FeMn
We want to find out the ground state magnetization direction for each atom in FeMn. Modify the inp.xml file from above in the following way:
Set the angles to:
atom  

Fe1  Pi0.1  Pi/2.0 
Fe2  Pi+0.14  Pi/2.0+0.07 
Mn1  Pi/2.0  0+0.15 
Mn2  Pi/2.0  7.0*Pi/4.00.03 
Tutorial maintenance
Check whether alpha and beta have to be swapped. There may be a mistake here.
Note: The starting angles here are a mixture of an educated guess and a random offset to avoid being stuck in some highsymmetry setup from start.
We also have to set all /atomGroups/atomGroup/nocoParams/@l_relax switches to T to enable the relaxation of the respective angles.
Perform the relaxation from scratch during night or at the weekend with an adaption of the following script:
rm broyd* FLEURPATH/build/fleur last_extra rm cdn.hdf cp cdn_last.hdf cdn.hdf rm broyd* FLEURPATH/build/fleur last_extra rm cdn.hdf cp cdn_last.hdf cdn.hdf rm broyd* FLEURPATH/build/fleur last_extra rm cdn.hdf cp cdn_last.hdf cdn.hdf rm broyd* FLEURPATH/build/fleur last_extra rm cdn.hdf cp cdn_last.hdf cdn.hdf rm broyd* FLEURPATH/build/fleur last_extra rm cdn.hdf cp cdn_last.hdf cdn.hdf
The command line switch last_extra produces after every iteration a file cdn_last.hdf containing only the last charge density. We replace cdn.hdf by this file from time to time because otherwise cdn.hdf might become large. Note that the calculation will take some time (hours). You will probably not end at the connverged solution after performing the calculations due to the script. Hopefully you are at least rather near to the final result.
You will realize that a file "nocoinp" is generated after every iteration. It also contains all noco parameters and the values from this file overwrite the values in the inp.xml file. The values in the nocoinp file will change over the iterations since the angles will be modified.
What angles do you get? Compare the last total energy to the total energy obtained for the calculation with fixed angles.
2.2. Magnetocrystalline anisotropy in Co revisited with the force theorem
Last week the magnetocrystalline anisotropy in Co was determined by performing selfconsistent calculations for different spinquantization axes (SQAs). There is also a faster way to do this. According to the magnetic force theorem already singleshot calculations for different SQAs (only determination of the eigenvalue sum for a fixed input density) on top of a representative selfconsistent density for one SQA should provide reasonable approximate results. To do this we have to add a special XML element to one of the inp.xml files for Co from last week. Choose the one with and and add
<forceTheorem>
<MAE theta="0.0 0.5*Pi 0.25*Pi 0.5*Pi" phi="0.0 0.0 0.0 0.5*Pi" />
</forceTheorem>
directly after the output section of the inp.xml file. In the forceTheorem XML element we provide the parametrization for such a calculation. It can be used to determine the magnetocrystalline anisotropy energy (MAE), for other quantities like the parameters of the DzyaloshinskiiMoriya interaction (DMI), or for the determination of spinspiral dispersion relations.
For the MAE calculation a MAE xml element has to be provided that features the two xml attributes theta and phi, both representing a list of respective angles. The ith angles from both lists define the ith SQA. The example above provides exactly those angles that were also used last week.
Run fleur with this input to first calculate a selfconsistent density. The force theorem calculation starts if the iteration number of the current run equals the maximum iteration number specified in the inp.xml file. Since the calculation probably stops due to another convergence criterion we invoke fleur again but for the second run we specify in the inp.xml file that only a single iteration should be performed. Note that the usage of the force theorem replaces the 4 selfconsistency calculations from last week by a single selfconsistency calculation. We thus nearly obtain a factor 4 speedup.
In the out.xml file you should now have a "Forcetheorem_MAE" section in which a list with the different angles together with respective eigenvalue sums is provided. Determine the "K_i" parameters from last weeks uniaxial MAE model and compare them to the parameters determined with selfconsistent calculations.