Magneto-Optical Kerr Effect (MOKE)

by Dmitrii Nabok & Santiago Rigamonti for exciting boron

Purpose: In this tutorial you will learn how to set up and execute exciting calculations of the magneto-optical Kerr effect (MOKE). As an example, we calculate the MOKE spectrum for ferromagnetic fcc-Ni.

0. Define relevant environment variables and download scripts

Read the following paragraphs before starting with the rest of this tutorial!

Before starting, be sure that relevant environment variables are already defined as specified in How to set environment variables for tutorials scripts.

From now on the symbol $ will indicate the shell prompt.

Important note: All input parameters are in atomic units!

1. Previous knowledge

The evaluation of the MOKE spectrum involves a spin polarized ground state calculation followed by a TDDFT calculation. Therefore, before starting, it is recommended to be familiar with the following related tutorials:

2. Theoretical background of the MOKE effect

When linearly polarized light is reflected on the surface of a ferromagnetic material, the reflected beam will be, in general, elliptically polarized with its polarization plane rotated with respect to the incident beam. The magnitude of both the polarization rotation $\theta_K$ and the ellipticity $\gamma_K$ are given by the complex Kerr angle: $\phi_K(\omega)= \theta_K(\omega)+i \gamma_K(\omega)$ which can be obtained from the dielectric tensor $\epsilon_{\alpha\beta}$. In particular, for the so-called polar configuration present when both incident light and the magnetic moment of the material are perpendicular to the surface, the Kerr angle is given by:

\begin{align} \phi_K(\omega)=-\frac{\epsilon_{xy}}{(1-\epsilon_{xx})\sqrt{\epsilon_{xx}}} \end{align}

A proper description of the MOKE effect requires the knowledge of the current-current response function. However, in the TDDFT framework the longitudinal contraction of the dielectric tensor is obtained from the density-density response function, which lacks a part of the transverse response contained in the current-current response. This term, which is non-zero only when time-reversal symmetry is broken, is called the anomalous Hall conductivity (AHC) and constitutes an essential ingredient for describing magneto-orbit effects. Therefore, in the TDDFT calculation this term must be added to obtain the correct MOKE spectrum. In order to do that, we must set the attribute ahc to "true" in the tddft element, as shown in the example input file of this example (see below).

3. The MOKE spectrum of Nickel

In order to generate the MOKE spectrum for nickel, we will use the following input file (input.xml) to run exciting:

   <title>FM fcc Ni</title>
   <structure speciespath="$EXCITINGROOT/species">
      <crystal scale="6.652">
         <basevect> 0.5  0.5  0.0 </basevect>
         <basevect> 0.5  0.0  0.5 </basevect>
         <basevect> 0.0  0.5  0.5 </basevect>
      <species speciesfile="Ni.xml" rmt="2.3">
         <atom coord="0.0 0.0 0.0"/>
      ngridk="4 4 4"
      vkloff="0.097 0.273 0.493"
      bfieldc="0.0 0.0 -2.0"
          drude="0.18 0.001"
         <qpoint> 0.0 0.0 0.0 </qpoint>
         intv="0.00 0.32" points="150"/>

Make sure to set $EXCITINGROOT to the correct exciting root directory in the speciespath attribute using the command


Please be aware that for time-saving reasons, here we have chosen computational parameters which do not correspond to those obtained from convergence tests. However, with them we are able to reproduce the main spectral features for the system under consideration.

Before running exciting, let's examine the input file displayed above. First, we consider the groundstate element. Inside it we find the spin element as explained in Spin-polarized calculations. Most importantly, we must set the spinorb attribute to "true", because the spin-orbit coupling is essential to obtain the Kerr rotation. As you can notice, we skip the ground-state calculation. The reason for this is that the self-consistency loop will be triggered (from scratch) by the xs element, where a fine k-grid is defined (see below). Nevertheless, we need to set the groundstate element to define several parameters, such as the type of exchange-correlation functional or the spin element and its attributes. Notice that the convergence threshold for the total energy, epsengy, is set to "1.0d-4", which is a larger value than the default one.

Next, we consider the xs element. Most of the attributes and convergence issues for that element are discussed in Excited states from TDDFT. Therefore, we refer the reader to it in case of doubts. However, we have in this case a few additional parameters: We set the attribute dogroundstate = "fromscratch", meaning that we will trigger the ground-state calculation from the xs element, therefore, there is no need in this case to have a previous groundstate run. We set also maxscl to "200" and bfieldc to a finite value in the z-direction. Both attributes have exactly the same meaning as their homonyms in the groundstate element. Inside the tddft element, we must set ahc to "true" in order to include the anomalus Hall conductivity term to the TDDFT response functions, as explained in the theoretical section.

In order to run exciting create the input.xml from the example above and run the scripts

$ k444

After the completion of the run, all results will be written inside the directory k444. In particular for the MOKE, the relevant file is called MOKE_label.OUT. In order to visualize the MOKE spectrum, move to the directory k444

$ cd k444

and run the following script:


The resulting plot is saved in the files PLOT.png and, which should look like in the following image:


4. Convergence issues

In the calculation of optical properties, two of the most important convergence parameters are the size of the k-point grid and the number of empty states included in the calculation of the response function. They are controlled, respectively, by the attributes ngridk and nempty of the xs element. It is important to note that to obtain convergent optical spectra one has to use rather large k-point sets. In addition, the attribute nempty plays now not only the role of a convergence parameter for spin-polarized calculations. In this case, one has to be sure that the excited (empty) states are covering the energy range where the MOKE spectrum is searched. Additionally, as we are dealing with a metal system, the smearing of the k-points (controlled by the attributes stype and swidth of the groundstate element) can play an important role to reach convergence.

  • In this tutorial we are using the default value for the nempty attribute. Check if this selection is enough to obtain a reasonable spectrum in the energy range between 0 and 8 eV (Hint: Inspect the file EIGVAL_QMT001.OUT).
  • Perform the complete convergence test to get the value of the magnetic moment of FM fcc-Ni and compare it with the experimental value of ~0.6 $\mu_{\tt B}$.
  • Use the default value for the attribute epsengy and repeat the calculations. Is there any difference in the calculated spectra?
  • Converge the MOKE spectrum with respect to ngridk size.
  • As a matter of fact, the MOKE effect is mainly due to presence of the spin-orbit coupling. One can readily check it by recalculating the spectrum by setting spinorb = "false".


  • J. Kunes, Physica Scripta T109, 116 (2004)
  • D. Sangalli, A. Marini, and A. Debernardi, Phys. Rev. B 86, 125139 (2012)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License