Magnetism and Magnetic Materials

These examples illustrate how to perform calculations in magnetic materials using the most common approach for colinear magnetism: LSDA, i.e. a single spin quantization axis.

Getting ready

  1. A short reminder of the relevant theory can be found here.
  2. The following "make" targets must have been executed:
         make pw pp
    
    ("make all" is also ok).
  3. You may download the entire exercise file examples_magn.tgz in a directory of your choice. Uncompress and unpack the file and enter in the resulting directory:
         tar -zxvf examples_magn.tgz
         cd examples_magn
         
In the following, $espresso_dir stands for the root directory of the Quantum ESPRESSO distribution.

A non-magnetic case first: Si

As a first test, one should verify the effect ot the spin polarization in a case that is known to be non-magnetic, and to verify that a non-magnetic ground-state is effectively found. Let us consider as a simple case: fcc Si, and see three possible magnetic structure: non-magnetic, ferromagnetic, antiferromagnetic. In all cases we will perform "spin-unconstrained" LSDA calculation, that is, we leave the system free to choose the preferred occupancies.
  1. Non-Magnetic (NM). See files in subdirectory "Si_lsda/":
    • si_nm.scf.in for self-consistency
    • si_nm.nscf.in for non-self-consistent calculation on a denser k-point grid, useful for Density-of-States (DOS) calculation;
    • si.dos.in for DOS calculation;
    • si.pdos.in for projection on atomic wavefunctions, including projected DOS (in the followinf, collectively indicated as PDOS).
    The sequence of execution is as follows: first the self-consistent calculation, then the non-selfconsistent calculation, then DOS and PDOS calculation (the latter actually includes the former, but if you want to have a look at up and down DOS only, the former is more straightfoward to interpret):
         $espresso_dir/bin/pw.x < si_nm.scf.in > si.scf.out
         $espresso_dir/bin/pw.x < si_nm.nscf.in > si.nscf.out
         $espresso_dir/bin/dos.x < si.dos.in > si.dos.out
         $espresso_dir/bin/projwfc.x < si.pdos.in > si.pdos.out
      
    Inspect the input, verify that "pseudo_dir" and "outdir"point respectively to the directory containing the pseudopotential and to the scratch directory. Inspect the output: you should get the usual results, with data written to or read from directory "outdir"/"prefix".save.
  2. Ferro-Magnetic (FM).
    • Inspect file si_fm.scf.in for self-consistency. This contains the usual data for Si, with the following important additions:
          &system
             nspin = 2
             occupations='smearing', smearing='gauss', degauss=0.02,
             starting_magnetization(1) = 0.4
             nbnd = 8,
             ... /
          
      • "nspin=2" specifies a LSDA calculation.
      • "starting_magnetization(N)" sets the starting atomic polarization for atom type N (in this case, N=1 necessarily). The value has to be between -1 and +1: better to avoid extreme values, that mean "all spin up (or down) for atom type 1". Since there is a single type of atoms, one will necessarily get a ferromagnetic configuration.
      • variables "occupations", "smearing"and "degauss" are those needed for metal calculations. Since Si is not a metal, they will have no final effect, but the code requires them, because occupancies have to be free to choose the preferred ground state.
      • the number of bands, "nbnd", should be optionally set to something appropriate for a metallic system
    • Run the scf calculation:
             $espresso_dir/bin/pw.x < si_fm.scf.in > si.scf.out
          
      Inspect the output: you will notice several things. First of all, the number of k-points has doubled with respect to the previous case. The first half contains states with up spin, the second half states with down spin. The code prints the total and absolute magnetizations, ans you will notice that both are nonzero at the beginning and then the vanish during self-consistency. At the end, we get the same results as for the non-magnetic case.
    • At this point, you may try to run the non-scf calculation: si_fm.nscf.in, containing the same differences with respect to the non-magnetic case as in the scf files; then run the DOS and PDOS calculations (you can use the same input files as for the non-magnetic case). Let us have a look at the DOS, contained in file "si.dos" (energies in the first column, spin-up and spin-down DOS in the second and the third). You can plot it using for instance "gnuplot":
          $ gnuplot
            plot 'si.dos' using 1:2 with lines, 'si.dos' using 1:(-$3) with lines 
          
      The resulting plot will be quite the same as for the nomagnetic case, apart from a 1/2 factor.
      Note: if you are interested in the DOS alone and not in PDOS, you may replace "occupations='smearing'" with "occupations='tetrahedra'", remove variables "smearing" and "degauss", and get a much better DOS using tetrahedra (remove "degauss" as well from the input of dos.x code, si.dos.in)
  3. Anti-Ferro-Magnetic (AFM). Si has a FCC unit cell with two sublattices. In this particular case, we can easily simulate an AFM structure in which each of sublattice has opposite spin. What we need to do is simply to assign different types of atoms to the different sublattices and to assign a starting magnetization with opposite sign for the two sublattices. Inspect file si_afm.scf.in for self-consistency. Notice in particular:
        &system
           ntyp = 2
           starting_magnetization(1) = 0.4
           starting_magnetization(2) =-0.7
        ATOMIC_SPECIES
        Si1  1.  Si.pbe-rrkj.UPF
        Si2  1.  Si.pbe-rrkj.UPF
        ATOMIC_POSITIONS crystal
        Si1 0.00  0.00  0.00
        Si2 0.25  0.25  0.25
    
        
    Now we have two different types of atoms, Si1 and Si2, described by the same pseudopotential. The code will think that they are different because labels are different and will not recognize symmetry operations that send Si1 into Si2 or vice versa. Again, you can run the self-consistency and see how a nonzero absolute (but not total) magnetization is present in the first stages of self-consistency, just to disappear at the end.

A ferromagnetic case: BCC iron

Iron (Fe, from Latin ferrum) is a prototypical "ferro"magnet. Iron crystallizes into the body-centered cubic structure. It is a metal, thus it requires a rather accurate sampling of the Brillouin Zone. The "Fe_lsda/" subdirectory contains: Note that the difference between the first and the second set of files is just the starting magnetization and nothing else! You should however find a substantial difference in the results this time: the non-magnetic state reached in the first case has a higher energy, by a relatively small but significant amount, than the second one. It is especially interest to plot the DOS for FM iron:
    $ gnuplot
      plot 'fe.dos' using 1:2 with lines, 'fe.dos' using 1:(-$3) with lines 
    
compare the DOS fon non-magnetic iron:
    $ gnuplot
      plot 'fe.dos' using 1:2 with lines
    
The presence of more spin-up than spin-down occupied states is evident (remember that only states at E < EF are occupied, and that EF is printed in the output; the small difference between EF calculated in the scf and non-scf cases is hardly relevant).

For a deeper analysis of the origin of the difference between spin-up and spin-down DOSes, have a look at the output files from "projwfc.x". This codes prints out a number of information and of files. In particular: files '"prefix".pdos_atm#N(X)_wfc#M(L)' contain the DOS projected on atomic orbital X, having angular momentum L, for atom number N, of type X. The following command:

    $ gnuplot
      plot './fe.pdos_atm#1(Fe)_wfc#2(d)' u 1:2 w l lt 1, \
           './fe.pdos_atm#1(Fe)_wfc#2(d)' u 1:(-$3) w l lt 3, \
           './fe.pdos_atm#1(Fe)_wfc#1(s)' u 1:2 w l lt 2, \
           './fe.pdos_atm#1(Fe)_wfc#1(s)' u 1:(-$3) w l lt 4 \
    
will clearly show that the l=2 (d) orbitals of Fe are strongly spin-polarized.

The AFM input differs from the two others not only for the starting magnetization, but also for the presence of two iron sublattices. This is straightforward in a BCC lattice, which can be represented as a Simple Cubic (SC) lattice with two sublattices, one at the origin and one in the middle of the cube. You will however notice that iron ends up falling again into the FM state. Notice that the energy of the SC lattice with two sublattices is twice as big as the energy of the BCC lattice, within numerical differences due to the slightly different k-point sampling in the two cases. If however you make a more symmetric choice of starting_magnetization, you may end up into an AFM state, characterized by vanishing total magnetization and large absolute magnetization. The AFM state is however definitely higher in energy than the FM state (remember to account for the differnt cell size! you have to compare EAFM with 2 EFM).


Problem: can you compare the equations of states of Fe for the bcc, fcc, and hcp lattices, and find whether theoretical Fe is actually what true Fe is expected to be: a ferromagnetic crystal in the bcc structure? For simplicity, fix the c/a ratio in simple hexagonal to its ideal value (1.633). Both LDA (pseudo/Fe.pz-nd-rrkjus.UPF) and PBE (pseudo/Fe.pbe-nd-rrkjus.UPF) pseudopotentials are available.

An anti-ferromagnetic case: NiO

NiO is a simple oxide with a rocksalt structure, i.e. comnposed of two fcc lattices. NiO is actually a well-known case of failure of simple DFT approximations (failing to predict its insulator character). Still, the AFM character is correctly predicted. The data reported here, in subdirectory "NiO_lsda/", are for simplicity all referred to the same (4-atom rhombohedral) cell, i.e. the one of the observed magnetic structure, in which <111> planes have alternating magnetization along the diagonal. With different values of "starting_magnetization", one finds AFM, FM, NM states, with EAFM < EFM < ENM. An inspection of the DOS and the PDOS shows that the two Ni sublattices have opposite spin-up and spni-down DOS, while O atoms are non-magnetic.