<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.yambo-code.eu/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Davide</id>
	<title>The Yambo Project - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.yambo-code.eu/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Davide"/>
	<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Special:Contributions/Davide"/>
	<updated>2026-04-11T00:44:07Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=SHG_within_the_TD-HSEX_level_(also_called_TD-aGW_or_TD-BSE)&amp;diff=9185</id>
		<title>SHG within the TD-HSEX level (also called TD-aGW or TD-BSE)</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=SHG_within_the_TD-HSEX_level_(also_called_TD-aGW_or_TD-BSE)&amp;diff=9185"/>
		<updated>2025-10-23T20:15:11Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:TD-aGW.png|right|300px |Sum frequency generation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this tutorial we show step by step how to calculate SHG within the TD-aGW approximation.&amp;lt;ref name=&amp;quot;Attaccalite2013&amp;quot;/&amp;gt;&lt;br /&gt;
This approximation was also called TD-BSE or TD-HSEX in previous papers.&amp;lt;ref name=&amp;quot;Attaccalite2011&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This calculation is quite complicated, here we present a simple strategy to do it.&lt;br /&gt;
We will consider hBN monolayer as example because calculations are very fast.&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
Download the code from github&lt;br /&gt;
&lt;br /&gt;
 [https://github.com/yambo-code/yambo https://github.com/yambo-code/yambo]&lt;br /&gt;
&lt;br /&gt;
and compiler all yambo projects by doing&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
 make all&lt;br /&gt;
&lt;br /&gt;
because this tutorial will require different yambo executables&lt;br /&gt;
&lt;br /&gt;
== Calculations for the quasi-particle band structure ==&lt;br /&gt;
&lt;br /&gt;
We start from a self-consistent(scf) and a non-self-consistent (nscf) of hBN with QuantumEspresso.&lt;br /&gt;
All inputs file are here: [https://www.attaccalite.com/tutorials_yambo/hBNsymm.tgz hBNsymm.tgz]&lt;br /&gt;
&lt;br /&gt;
We included 40 bands in the DFT calculation that are used to converge the dielectric constant the enters in the GW and in the COLLISIONS calculations.&amp;lt;br&amp;gt;&lt;br /&gt;
We run all the calculation in the folder &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;hBNsymm&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* Run the SCF and NSCF calculations with QuantumEspresso&lt;br /&gt;
* Go in the &amp;lt;code&amp;gt;bn.save&amp;lt;/code&amp;gt; folder and run &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;p2y&amp;lt;/span&amp;gt;&lt;br /&gt;
* Run the setup, just execute &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;yambo&amp;lt;/span&amp;gt;&lt;br /&gt;
* Generate the input file for the GW calculation: &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;yambo -g n -r -X p -gw0 p -F gw.in&amp;lt;/span&amp;gt;. &amp;lt;br&amp;gt;Notice that if you want to use a scissor operator in the non-linear response you can skip this calculation. &amp;lt;br&amp;gt;Notice also that we added the flag &amp;lt;code&amp;gt;-r&amp;lt;/code&amp;gt; to introduce a cut-off to the Coulomb interaction for low-dimensional systems.&lt;br /&gt;
&lt;br /&gt;
 dyson                            # [R] Dyson Equation solver&lt;br /&gt;
 rim_cut                          # [R] Coulomb potential&lt;br /&gt;
 ppa                              # [R][Xp] Plasmon Pole Approximation for the Screened Interaction&lt;br /&gt;
 gw0                              # [R] GW approximation&lt;br /&gt;
 el_el_corr                       # [R] Electron-Electron Correlation&lt;br /&gt;
 HF_and_locXC                     # [R] Hartree-Fock&lt;br /&gt;
 em1d                             # [R][X] Dynamically Screened Interaction&lt;br /&gt;
 RandQpts=  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;5000000&amp;lt;/span&amp;gt;               # [RIM] Number of random q-points in the BZ&lt;br /&gt;
 RandGvec= &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;29&amp;lt;/span&amp;gt;             RL    # [RIM] Coulomb interaction RS components&lt;br /&gt;
  CUTGeo= &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&amp;quot;slab z&amp;quot;&amp;lt;/span&amp;gt;                 # [CUT] Coulomb Cutoff geometry: box/cylinder/sphere/ws/slab X/Y/Z/XY..&lt;br /&gt;
 % CUTBox&lt;br /&gt;
  0.000000 | 0.000000 | 0.000000 |        # [CUT] [au] Box sides&lt;br /&gt;
 %&lt;br /&gt;
 Chimod= &amp;quot;HARTREE&amp;quot;                # [X] IP/Hartree/ALDA/LRC/PF/BSfxc&lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
    1 |  40 |                         # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXp=  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;3000  &amp;lt;/span&amp;gt;         mHa   # [Xp] Response block size&lt;br /&gt;
 % LongDrXp&lt;br /&gt;
  0.000000 | 1.000000 | 0.000000 |        # [Xp] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 PPAPntXp= 27.21138         eV    # [Xp] PPA imaginary energy&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
    1 |  40 |                         # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 GTermKind= &amp;quot;none&amp;quot;                # [GW] GW terminator (&amp;quot;none&amp;quot;,&amp;quot;BG&amp;quot; Bruneval-Gonze,&amp;quot;BRS&amp;quot; Berger-Reining-Sottile)&lt;br /&gt;
 DysSolver= &amp;quot;n&amp;quot;                   # [GW] Dyson Equation solver (&amp;quot;n&amp;quot;,&amp;quot;s&amp;quot;,&amp;quot;g&amp;quot;,&amp;quot;q&amp;quot;)&lt;br /&gt;
 %QPkrange                        # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;1|14|3|6|&amp;lt;/span&amp;gt;&lt;br /&gt;
 %&lt;br /&gt;
Notice that we calculate the GW corrections only for the bands &#039;&#039;&#039;3-6&#039;&#039;&#039; we want to use in the non-linear response.&lt;br /&gt;
&lt;br /&gt;
* Run the calculation with the command: &amp;lt;code&amp;gt;yambo -F gw.in&amp;lt;/code&amp;gt;&lt;br /&gt;
* Optional step: you can calculate the BSE response that can be usefull to interprate the non-linear response with the command: &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;yambo -o b -k sex -r -X p -V qp -y d -F bse.in&amp;lt;/span&amp;gt; &amp;lt;br&amp;gt; (do not forget to read the Quasi-Particle database by setting &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;KfnQPdb= &amp;quot;E &amp;lt; SAVE/ndb.QP&amp;quot;&amp;lt;/span&amp;gt; in the bse.in file.&lt;br /&gt;
&lt;br /&gt;
== Calculations of the non-linear response ==&lt;br /&gt;
* Generate input file to remove symmatries: &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;ypp_nl -y&amp;lt;/span&amp;gt;&lt;br /&gt;
 fixsyms                          &lt;br /&gt;
 # [R] Remove symmetries not consistent with an external perturbation&lt;br /&gt;
 % Efield1&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;0.000000 | 1.000000 | 0.000000 |   &amp;lt;/span&amp;gt;     # First external Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 % Efield2&lt;br /&gt;
  0.000000 | 0.000000 | 0.000000 |        # Additional external Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 BField= 0.000000           T     # [MAG] Magnetic field modulus&lt;br /&gt;
 Bpsi= 0.000000             deg   # [MAG] Magnetic field psi angle [degree]&lt;br /&gt;
 Btheta= 0.000000           deg   # [MAG] Magnetic field theta angle [degree]&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;RRmTimeRev    &amp;lt;/span&amp;gt;                 # Remove Time Reversal&lt;br /&gt;
&lt;br /&gt;
here we remove all symmetries but you it is possible to remove only the ones not compatible with the external field,&amp;lt;br&amp;gt;&lt;br /&gt;
by putting the field version in the ypp input and removing the time reversal symmetry (&amp;lt;code&amp;gt;RmTimeRev&amp;lt;/code&amp;gt;) that is not compatible with the real-time dynamics, &amp;lt;br&amp;gt;&lt;br /&gt;
see for instance here: [[Prerequisites for Real Time propagation with Yambo]]&lt;br /&gt;
&lt;br /&gt;
* Go in the  &amp;lt;code&amp;gt;FixSymm&amp;lt;/code&amp;gt; folder and run setup again&lt;br /&gt;
&lt;br /&gt;
* Calculate the static dielectric constant and the collisions integrals: &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;yambo_rt -X s -collisions -potential h+sex -r -F collisions.in&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 em1s                             # [R][Xs] Statically Screened Interaction&lt;br /&gt;
 collisions                       # [R] Collisions&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 rim_cut                          # [R] Coulomb potential&lt;br /&gt;
 RandQpts=&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;5000000   &amp;lt;/span&amp;gt;                   # [RIM] Number of random q-points in the BZ&lt;br /&gt;
 RandGvec= 29                RL    # [RIM] Coulomb interaction RS components&lt;br /&gt;
 CUTGeo= &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&amp;quot;slab z&amp;quot;  &amp;lt;/span&amp;gt;                 # [CUT] Coulomb Cutoff geometry: box/cylinder/sphere/ws/slab X/Y/Z/XY..&lt;br /&gt;
 % CUTBox&lt;br /&gt;
  0.000000 | 0.000000 | 0.000000 |        # [CUT] [au] Box sides&lt;br /&gt;
 %&lt;br /&gt;
 Chimod= &amp;quot;HARTREE&amp;quot;                # [X] IP/Hartree/ALDA/LRC/PF/BSfxc&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;  1 |  40 |     &amp;lt;/span&amp;gt;                    # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;3000 mHa &amp;lt;/span&amp;gt;  # [Xs] Response block size&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  0.000000 |  1.00000    |  0.00000    # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 % COLLBands&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;   4 |  5 |      &amp;lt;/span&amp;gt;                   # [COLL] Bands for the collisions&lt;br /&gt;
 %&lt;br /&gt;
 HXC_Potential= &amp;quot;SEX+HARTREE&amp;quot;     # [SC] SC HXC Potential&lt;br /&gt;
 HARRLvcs=&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 3000 mHa   &amp;lt;/span&amp;gt; # [HA] Hartree     RL components&lt;br /&gt;
 EXXRLvcs= &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;3000 mHa   &amp;lt;/span&amp;gt; # [XX] Exchange    RL components&lt;br /&gt;
 CORRLvcs= &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;3000 mHa   &amp;lt;/span&amp;gt; # [GW] Correlation RL components&lt;br /&gt;
 &lt;br /&gt;
For the Collisions it is important to use &amp;lt;code&amp;gt;yambo_rt&amp;lt;/code&amp;gt; because it is in single-precision and much faster than &amp;lt;code&amp;gt;yambo_nl&amp;lt;/code&amp;gt;. &amp;lt;br&amp;gt;&lt;br /&gt;
Notice that we also use the cutoff on the Coulomb interaction &amp;lt;code&amp;gt;-r&amp;lt;/code&amp;gt; because this is a 2D system.&lt;br /&gt;
&lt;br /&gt;
* Run the calculations &amp;lt;code&amp;gt;yambo_rt -F collisions.in&amp;lt;/code&amp;gt;. &lt;br /&gt;
* Generate input file for the non-linear response: &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;yambo_nl -u n -V qp -F nonlinear.in &amp;lt;/span&amp;gt;&lt;br /&gt;
* Run the SHG calculation including collisions, with the command:  &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;yambo_nl -nl n -V qp&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 nloptics                         # [R] Non-linear spectroscopy&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 NL_Threads=0                     # [OPENMP/NL] Number of threads for nl-optics&lt;br /&gt;
 % NLBands&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 4 |  5 |    &amp;lt;/span&amp;gt;                       # [NL] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 NLverbosity= &amp;quot;high&amp;quot;              # [NL] Verbosity level (low | high)&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;NLtime=42.000000&amp;lt;/span&amp;gt;          fs    # [NL] Simulation Time&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;NLintegrator= &amp;quot;CRANKNIC&amp;quot;        &amp;lt;/span&amp;gt; # [NL] Integrator (&amp;quot;EULEREXP/RK2/RK4/RK2EXP/HEUN/INVINT/CRANKNIC&amp;quot;)&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;NLCorrelation= &amp;quot;SEX&amp;quot;          &amp;lt;/span&amp;gt;   # [NL] Correlation (&amp;quot;IPA/HARTREE/TDDFT/LRC/LRW/JGM/SEX&amp;quot;)&lt;br /&gt;
 NLLrcAlpha= 0.000000             # [NL] Long Range Correction&lt;br /&gt;
 % NLEnRange&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;  2.000000 | 8.000000 |  &amp;lt;/span&amp;gt;       eV    # [NL] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 NLEnSteps=  80                   # [NL] Energy steps&lt;br /&gt;
 NLDamping= 0.200000        eV    # [NL] Damping (or dephasing)&lt;br /&gt;
 RADLifeTime=-1.000000      fs    # [RT] Radiative life-time (if negative Yambo sets it equal to Phase_LifeTime in NL)&lt;br /&gt;
 #EvalCurrent                   # [NL] Evaluate the current&lt;br /&gt;
 #FrPolPerdic                   # [DIP] Force periodicity of polarization respect to the external field&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;HARRLvcs= 3000             mHa &amp;lt;/span&amp;gt;  # [HA] Hartree     RL components&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;EXXRLvcs= 3000             mHa &amp;lt;/span&amp;gt;  # [XX] Exchange    RL components&lt;br /&gt;
 GfnQPdb= &amp;quot; &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;E &amp;lt; SAVE/ndb.QP&amp;lt;/span&amp;gt;&amp;quot;                  # [EXTQP G] Database action&lt;br /&gt;
 .............&lt;br /&gt;
 % Field1_Freq&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [RT Field1] Frequency&lt;br /&gt;
 %&lt;br /&gt;
 Field1_NFreqs= 1                 # [RT Field1] Frequency&lt;br /&gt;
 Field1_Int=  1000.00       kWLm2 # [RT Field1] Intensity&lt;br /&gt;
 Field1_Width= 0.000000     fs    # [RT Field1] Width&lt;br /&gt;
 Field1_kind= &amp;quot;SOFTSIN&amp;quot;           # [RT Field1] Kind(SIN|COS|RES|ANTIRES|GAUSS|DELTA|QSSIN)&lt;br /&gt;
 Field1_pol= &amp;quot;linear&amp;quot;         # [RT Field1] Pol(linear|circular)&lt;br /&gt;
 % Field1_Dir&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 0.000000 | 1.000000 | 0.000000 |    &amp;lt;/span&amp;gt;    # [RT Field1] Versor&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
== Analysis of the non-linear response ==&lt;br /&gt;
* Use the command  &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;ypp_nl -u &amp;lt;/span&amp;gt; to analyze the result&lt;br /&gt;
 nonlinear                        # [R] Non-linear response analysis&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Xorder= 4  &amp;lt;/span&amp;gt;                      # Max order of the response/exc functions&lt;br /&gt;
 % TimeRange&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;40.000 | -1.00000 |   &amp;lt;/span&amp;gt;      fs    # Time-window where processing is done&lt;br /&gt;
 %&lt;br /&gt;
 ETStpsRt= 200                    # Total Energy steps&lt;br /&gt;
 % EnRngeRt&lt;br /&gt;
   0.00000 | 20.00000 |         eV    # Energy range&lt;br /&gt;
 %&lt;br /&gt;
 DampMode= &amp;quot;NONE&amp;quot;                 # Damping type ( NONE | LORENTZIAN | GAUSSIAN )&lt;br /&gt;
 DampFactor= 0.000000       eV    # Damping parameter&lt;br /&gt;
 PumpPATH= &amp;quot;none&amp;quot;                 # Path of the simulation with the Pump only&lt;br /&gt;
&lt;br /&gt;
now you can plot columns 4 and 5 of the o.YPP-X_probe_order_2 file that are the real and imaginary part of Xhi2 along yyy direction.&lt;br /&gt;
Using gnuplot, just plot &lt;br /&gt;
 &lt;br /&gt;
 p &#039;o.YPP-X_probe_order_2&#039; u 1:(sqrt($4**2+$5**2)) t &#039;SHG in hBN monolayer&#039; w lp&lt;br /&gt;
&lt;br /&gt;
and you will get &lt;br /&gt;
&lt;br /&gt;
[[File:Xhi2 hbn.png|center]]&lt;br /&gt;
&lt;br /&gt;
Alternative to  &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;ypp_nl&amp;lt;/span&amp;gt; you can also use &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;YamboPy&amp;lt;/span&amp;gt; to analyze and plot the data see here: [https://wiki.yambo-code.eu/wiki/index.php?title=Real_time_approach_to_non-linear_response_(SHG)#Analysis_of_the_results_using_YamboPy Analysis of the results using_YamboPy]&lt;br /&gt;
&lt;br /&gt;
Here after we resume with a simple scheme all the steps to calculate SHG at the GoWo+BSE level (courtesy of Sohan, Central University of Punjab, India):&lt;br /&gt;
&lt;br /&gt;
[[File:SHG including GoWo BSE.png|center|SHG GoWo+BSE]]&lt;br /&gt;
&lt;br /&gt;
If you arrived up here, you have the right to listen to the [https://www.youtube.com/watch?v=gz2WMvHCJOU Yambo song].&lt;br /&gt;
&lt;br /&gt;
== Tips and tricks ==&lt;br /&gt;
&lt;br /&gt;
* When you calculate the dielectric constant add the flag -V par to set the parallelization and put as much as possible processors on conduction &amp;lt;code&amp;gt;c&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;v&amp;lt;/code&amp;gt; bands&lt;br /&gt;
to decrease the memory&lt;br /&gt;
* Regenerate inputs with flag -V RL and decrease the number of total plane-wave to half, this will speed up calculation and save memory, results are the same&lt;br /&gt;
* In the non-linear calculation put all processors on the frequencies &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt; this is a super-efficent parallelization but does not distributed the memory&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;Attaccalite2011&amp;quot;&amp;gt;C. Attaccalite, M. Grüning, and A. Marini, &#039;&#039;Real-time approach to the optical properties of solids and nanostructures: Time-dependent Bethe-Salpeter equation&#039;&#039;, [https://doi.org/10.1103/PhysRevB.84.245110 Phys. Rev. B &#039;&#039;&#039;84&#039;&#039;&#039;, 245110 (2011)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;Attaccalite2013&amp;quot;&amp;gt;C. Attaccalite and M. Grüning, Nonlinear optics from an ab initio approach by means of the dynamical Berry phase: Application to second- and third-harmonic generation in semiconductors, [https://doi.org/10.1103/PhysRevB.88.235113  Phys. Rev. B &#039;&#039;&#039;88&#039;&#039;&#039;, 235113 (2013)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Exciton-phonon_coupling_and_luminescence&amp;diff=9179</id>
		<title>Exciton-phonon coupling and luminescence</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Exciton-phonon_coupling_and_luminescence&amp;diff=9179"/>
		<updated>2025-10-07T15:28:46Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Tdgw-phonon-usc-01-1024x829.jpg| 400px | right]]&lt;br /&gt;
&lt;br /&gt;
In this advanced tutorial, we will calculate exciton-phonon interactions from first principles by interfacing DFPT (for phonon calculations) and BSE (for exciton calculations).&lt;br /&gt;
&lt;br /&gt;
The DFTP calculations are run with Quantum ESPRESSO, while the many-body GW-BSE calculations are run with Yambo. Finally, the exciton-phonon interaction will be obtained by combining and postprocessing the databases computed in the two previous runs. The great advantage of this workflow is that the calculations can be run in the irreducible Brillouin zones both for the electronic momenta (&#039;&#039;&#039;k&#039;&#039;&#039;) and the transfer momenta (&#039;&#039;&#039;Q&#039;&#039;&#039;, &#039;&#039;&#039;q&#039;&#039;&#039;) of excitons and phonons, thus speeding up considerably the jobs while reducing the IO and memory load.&lt;br /&gt;
&lt;br /&gt;
We will first compute the exciton-phonon coupling matrix elements: these are the building blocks needed to construct experimental observables such as phonon-assisted optical spectra (such as luminescence), Raman spectra and exciton lifetimes. We will do this in the case of monolayer MoS&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, a 2D system with large spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
As an example of application, we will consider the case of phonon-assisted luminescence. We will do this in the case of bulk hBN, a layered indirect insulator with strong electron-phonon coupling.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; this tutorial will be updated when new exc-ph tools become available in Yambopy (including full-python postprocessing, Raman spectra, interpolated lifetimes, etc).&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This is an advanced topic: we assume that you already know something about the theory&amp;lt;ref name=&amp;quot;toyozawa2003&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;antonius2017&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;cudazzo2020&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;paleari2019_PhD&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;paleari2022&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;lechifflart2023_PhD&amp;quot; /&amp;gt; and applications&amp;lt;ref name=&amp;quot;paleari2019&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;cannuccia2019&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;chen2020&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;zanfrognini2023&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;lechifflart2023&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;chan2023&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;marini2024&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;murali2025&amp;quot; /&amp;gt; of exciton-phonon physics. &lt;br /&gt;
&lt;br /&gt;
Also, we assume that you already know how to run both a basic &#039;&#039;&#039;Yambo&#039;&#039;&#039; GW-BSE calculation and a DFPT phonon calculation with &#039;&#039;&#039;Quantum ESPRESSO&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Besides the QE executables &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ph.x&amp;lt;/code&amp;gt;, we also use the yambo phonon-specific executable &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt; and the python utility &#039;&#039;&#039;Yambopy&#039;&#039;&#039;. The auxiliary code &#039;&#039;&#039;LetzElPhC&#039;&#039;&#039; (executable &amp;lt;code&amp;gt;lelphc&amp;lt;/code&amp;gt;) will be used to obtain the electron-phonon matrix elements by reading the same electronic wavefunctions used by Yambo (and stored in the &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; directory), while also making full use of crystal symmetries. [https://gitlab.com/lumen-code/LetzElPhC LetzElPhC] will be run by Yambopy, but it must nonetheless be installed. Finally, the exciton-phonon properties can be computed either using &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt; or using Yambopy itself.&lt;br /&gt;
&lt;br /&gt;
[[File:Workflow scheme.png|800px|center]]&lt;br /&gt;
&lt;br /&gt;
== Step 0: Pseudopotentials, equilibrium structure and convergence ==&lt;br /&gt;
&lt;br /&gt;
In a real calculation, it is important to ensure that both the pseudopotential and the lattice parameters that we are using are compatible and perform well for the electronic excited states and for the lattice vibrations simultaneously. Furthermore, you have to make sure that the wave function cutoff &amp;lt;code&amp;gt;ecutwfc&amp;lt;/code&amp;gt; is converged with respect to the DFPT step and not just to the DFT one. This is in addition to the other customary convergence tests for DFT, DFPT, GW and BSE calculations.&lt;br /&gt;
&lt;br /&gt;
This is often the most time-demanding step when starting on a new system.&lt;br /&gt;
&lt;br /&gt;
For the sake of this tutorial, we assume that we have already done all these tests and we are starting the final workflow to get the exciton-phonon properties.&lt;br /&gt;
&lt;br /&gt;
== Step 1: scf calculation ==&lt;br /&gt;
&lt;br /&gt;
First of all, we run a standard scf calculation with &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; for Yambo. We stick with non-symmorphic symmetries. At the end, we will have the QE &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
This is the input &amp;lt;code&amp;gt;mos2.scf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;control&lt;br /&gt;
           wf_collect = .true.,&lt;br /&gt;
          calculation = &amp;quot;scf&amp;quot;,&lt;br /&gt;
            verbosity = &#039;high&#039;,&lt;br /&gt;
           pseudo_dir = &#039;$PSEUDO_DIR&#039;,&lt;br /&gt;
               prefix = &amp;quot;mos2&amp;quot;,&lt;br /&gt;
               outdir = &#039;.&#039;,&lt;br /&gt;
  /&amp;amp;end&lt;br /&gt;
  &amp;amp;system&lt;br /&gt;
              ecutwfc = 100.0,&lt;br /&gt;
          occupations = &#039;fixed&#039;,&lt;br /&gt;
                ibrav = 4,&lt;br /&gt;
            celldm(1) = 5.9000811881,&lt;br /&gt;
            celldm(3) = 6.7795677253,&lt;br /&gt;
                  nat = 3,&lt;br /&gt;
                 ntyp = 2,&lt;br /&gt;
             lspinorb = .true.&lt;br /&gt;
             noncolin = .true.&lt;br /&gt;
             assume_isolated = &#039;2D&#039;&lt;br /&gt;
         force_symmorphic = .true.&lt;br /&gt;
  /&amp;amp;end&lt;br /&gt;
  &amp;amp;electrons&lt;br /&gt;
     electron_maxstep = 200,&lt;br /&gt;
          mixing_beta = 0.7,&lt;br /&gt;
             conv_thr = 1.d-08,&lt;br /&gt;
  /&amp;amp;end&lt;br /&gt;
   ATOMIC_SPECIES&lt;br /&gt;
    Mo  95.940      Mo_ONCV_PBE_FR-1.0.upf&lt;br /&gt;
    S    32.065     S_ONCV_PBE_FR-1.1.upf&lt;br /&gt;
   ATOMIC_POSITIONS { crystal }&lt;br /&gt;
 Mo       0.333333333   0.666666667   0.000000000&lt;br /&gt;
 S        0.666666667   0.333333333   0.073413577&lt;br /&gt;
 S        0.666666667   0.333333333  -0.073413577&lt;br /&gt;
  K_POINTS { automatic }&lt;br /&gt;
 6 6 1 0 0 0&lt;br /&gt;
&lt;br /&gt;
Here we are using full relativistic pseudopotentials from the SG-15 database.&lt;br /&gt;
&lt;br /&gt;
We can run it on our machine (for example using 4 MPI tasks) as:&lt;br /&gt;
&lt;br /&gt;
 mpirun -np 4 pw.x -inp mos2.scf &amp;gt; scf.out&lt;br /&gt;
&lt;br /&gt;
== Step 2: nscf calculation for Yambo ==&lt;br /&gt;
&lt;br /&gt;
Copy the QE &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; directory from the scf calculation and run the nscf calculation for any number of empty states, with the correct &amp;lt;code&amp;gt;k&amp;lt;/code&amp;gt;-grid we want to use in Yambo. Here we are using a badly underconverged grid of 6x6x1.&lt;br /&gt;
&lt;br /&gt;
This reciprocal-space grid will also match the momentum transfer &amp;lt;code&amp;gt;q&amp;lt;/code&amp;gt; grid on which excitons and phonons will be defined!&lt;br /&gt;
&lt;br /&gt;
The electronic wavefunctions computed at this step and stored in the new nscf &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; directory will be used both by Yambo and by the electron-phonon code: this is important because using different sets of wavefunctions would lead to a phase mismatch issue in the exciton-phonon matrix elements.&lt;br /&gt;
&lt;br /&gt;
The nscf input &amp;lt;code&amp;gt;mos2.nscf&amp;lt;/code&amp;gt; is&lt;br /&gt;
 &amp;amp;control&lt;br /&gt;
           wf_collect = .true.,&lt;br /&gt;
          calculation = &amp;quot;nscf&amp;quot;,&lt;br /&gt;
            verbosity = &#039;high&#039;,&lt;br /&gt;
           pseudo_dir = &#039;$PSEUDO_DIR&#039;,&lt;br /&gt;
               prefix = &amp;quot;mos2&amp;quot;,&lt;br /&gt;
               outdir = &#039;.&#039;,&lt;br /&gt;
  /&amp;amp;end&lt;br /&gt;
  &amp;amp;system&lt;br /&gt;
              ecutwfc = 100.0,&lt;br /&gt;
          occupations = &#039;fixed&#039;,&lt;br /&gt;
                ibrav = 4,&lt;br /&gt;
            celldm(1) = 5.9000811881,&lt;br /&gt;
            celldm(3) = 6.7795677253,&lt;br /&gt;
                  nat = 3,&lt;br /&gt;
                 ntyp = 2,&lt;br /&gt;
             lspinorb = .true.&lt;br /&gt;
             noncolin = .true.&lt;br /&gt;
                nbnd  = 250&lt;br /&gt;
             assume_isolated = &#039;2D&#039;&lt;br /&gt;
         force_symmorphic = .true.&lt;br /&gt;
  /&amp;amp;end&lt;br /&gt;
  &amp;amp;electrons&lt;br /&gt;
     electron_maxstep = 200,&lt;br /&gt;
          mixing_beta = 0.7,&lt;br /&gt;
             conv_thr = 1.d-08,&lt;br /&gt;
  /&amp;amp;end&lt;br /&gt;
   ATOMIC_SPECIES&lt;br /&gt;
    Mo  95.940      Mo_ONCV_PBE_FR-1.0.upf&lt;br /&gt;
    S    32.065     S_ONCV_PBE_FR-1.1.upf&lt;br /&gt;
   ATOMIC_POSITIONS { crystal }&lt;br /&gt;
 Mo       0.333333333   0.666666667   0.000000000&lt;br /&gt;
 S        0.666666667   0.333333333   0.073413577&lt;br /&gt;
 S        0.666666667   0.333333333  -0.073413577&lt;br /&gt;
  K_POINTS { automatic }&lt;br /&gt;
 6 6 1 0 0 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Again, we run the calculation&lt;br /&gt;
&lt;br /&gt;
 mpirun -np 4 pw.x -inp mos2.nscf &amp;gt; nscf.out&lt;br /&gt;
&lt;br /&gt;
== Step 3: dvscf phonon calculation ==&lt;br /&gt;
&lt;br /&gt;
Now we run the phonon calculation.&lt;br /&gt;
&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; directory from the &#039;&#039;&#039;scf&#039;&#039;&#039; calculation and run &amp;lt;code&amp;gt;ph.x&amp;lt;/code&amp;gt; for a dvscf calculation with a standard &amp;lt;code&amp;gt;q&amp;lt;/code&amp;gt;-grid matching the &amp;lt;code&amp;gt;k&amp;lt;/code&amp;gt;-grid we wanna use in Yambo.&lt;br /&gt;
&lt;br /&gt;
At the end, we will have the &amp;lt;code&amp;gt;_ph0&amp;lt;/code&amp;gt; directory containing the variation of the self-consistent potential, &amp;lt;math&amp;gt;\Delta V_{SCF}(q)&amp;lt;/math&amp;gt;, and the &amp;lt;code&amp;gt;*.dyn&amp;lt;/code&amp;gt; files with the phonon energies and eigenvectors.&lt;br /&gt;
&lt;br /&gt;
NB: one could further refine the phonon energies by enforcing the acoustic sum rule, including non-analytic long-range contributions, interpolating to finer grids... all of this can be done within Quantum ESPRESSO and will not be covered in this version of the tutorial.&lt;br /&gt;
&lt;br /&gt;
The input is &amp;lt;code&amp;gt;mos2.dvscf&amp;lt;/code&amp;gt;:&lt;br /&gt;
 &lt;br /&gt;
 mos2_dvscf&lt;br /&gt;
 &amp;amp;inputph&lt;br /&gt;
   tr2_ph=1.0d-12,&lt;br /&gt;
   verbosity=&#039;high&#039;&lt;br /&gt;
   prefix=&#039;mos2&#039;,&lt;br /&gt;
   fildvscf = &#039;mos2-dvscf&#039;,&lt;br /&gt;
   electron_phonon = &#039;dvscf&#039;,&lt;br /&gt;
   fildyn=&#039;mos2.dyn&#039;,&lt;br /&gt;
   epsil=.false.,&lt;br /&gt;
   ldisp=.true.,&lt;br /&gt;
   recover=.true.,&lt;br /&gt;
   nq1=6,&lt;br /&gt;
   nq2=6,&lt;br /&gt;
   nq3=1&lt;br /&gt;
 /&lt;br /&gt;
&lt;br /&gt;
And now we run as&lt;br /&gt;
&lt;br /&gt;
 nohup mpirun -np 8 ph.x -inp mos2.dvscf &amp;gt; dvscf.out &amp;amp;&lt;br /&gt;
&lt;br /&gt;
This time we use nohup and more processes because this calculation may take some time. It is a good idea to set &amp;lt;code&amp;gt;recover=.true.&amp;lt;/code&amp;gt; as in a real calculation you will easily breach walltime, and in this way you can safely restart.&lt;br /&gt;
&lt;br /&gt;
== Step 4: create Yambo &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; directory ==&lt;br /&gt;
&lt;br /&gt;
This is just the standard Yambo initialization: run &lt;br /&gt;
 &lt;br /&gt;
 p2y &lt;br /&gt;
&lt;br /&gt;
and then &lt;br /&gt;
&lt;br /&gt;
 yambo &lt;br /&gt;
&lt;br /&gt;
in the &#039;&#039;&#039;nscf&#039;&#039;&#039; &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; folder and then move the newly generated &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; directory to a convenient place.&lt;br /&gt;
&lt;br /&gt;
== Step 5: run a BSE calculation ==&lt;br /&gt;
&lt;br /&gt;
Now we switch from QE to Yambo. Here, we forgo the GW step for simplicity (we can use a scissor operator to open the band gap).&lt;br /&gt;
&lt;br /&gt;
This calculation has a couple of differences with respect to a standard BSE calculation for optical absorption. We can look at the input file &amp;lt;code&amp;gt;bse.in&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;# Runlevels&amp;lt;/span&amp;gt;&lt;br /&gt;
 optics                       # [R OPT] Optics&lt;br /&gt;
 rim_cut                      # [R RIM CUT] Coulomb potential&lt;br /&gt;
 bss                          # [R BSS] Bethe Salpeter Equation solver&lt;br /&gt;
 em1s                         # [R Xs] Static Inverse Dielectric Matrix&lt;br /&gt;
 bse                          # [R BSE] Bethe Salpeter Equation.&lt;br /&gt;
 bsk                          # [R BSK] Bethe Salpeter Equation kernel&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;# RIM and cutoff settings&amp;lt;/span&amp;gt;&lt;br /&gt;
 RandQpts=1000000             # [RIM] Number of random q-points in the BZ&lt;br /&gt;
 RandGvec= 100            RL    # [RIM] Coulomb interaction RS components&lt;br /&gt;
 CUTGeo= &amp;quot;slab z&amp;quot;               # [CUT] Coulomb Cutoff geometry: box/cylinder/sphere X/Y/Z/XY..&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;# Static screening&amp;lt;/span&amp;gt;&lt;br /&gt;
 X_and_IO_CPU= &amp;quot;1 1 4 2 1&amp;quot;       # [PARALLEL] CPUs for each role&lt;br /&gt;
 X_and_IO_ROLEs= &amp;quot;q g k c v&amp;quot;      # [PARALLEL] CPUs roles (q,g,k,c,v)&lt;br /&gt;
 X_and_IO_nCPU_LinAlg_INV=-1      # [PARALLEL] CPUs for Linear Algebra (if -1 it is automatically set)&lt;br /&gt;
 Chimod= &amp;quot;hartree&amp;quot;            # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 |  200 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 8000            mRy    # [Xs] Response block size&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;# BSE&amp;lt;/span&amp;gt;&lt;br /&gt;
 BS_CPU= &amp;quot;4.1.2&amp;quot;                   # [PARALLEL] CPUs for each role&lt;br /&gt;
 BS_ROLEs= &amp;quot;k.eh.t&amp;quot;                 # [PARALLEL] CPUs roles (k,eh,t)&lt;br /&gt;
 BS_nCPU_diago=4              # [PARALLEL] CPUs for matrix diagonalization&lt;br /&gt;
 BSEmod= &amp;quot;causal&amp;quot;             # [BSE] resonant/causal/coupling&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSSmod= &amp;quot;d&amp;quot;                  # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 BSENGexx=  40000      mRy    # [BSK] Exchange components&lt;br /&gt;
 ALLGexx                      # [BSS] Force the use use all RL vectors for the exchange part&lt;br /&gt;
 BSENGBlk=  8000       mRy    # [BSK] Screened interaction block size&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Lkind=&amp;quot;full&amp;quot;                  #[BSE,X] bar(default)/full/tilde&amp;lt;/span&amp;gt;&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
 % BEnRange&lt;br /&gt;
   0.00000 |  4.00000 | eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 % BDmRange&lt;br /&gt;
   0.05000 |  0.05000 | eV    # [BSS] Damping range&lt;br /&gt;
 %&lt;br /&gt;
 BEnSteps= 2000               # [BSS] Energy steps&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;% BSEQptR&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 1 | 7 |                     # [BSK] Transferred momenta range&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;%&amp;lt;/span&amp;gt;&lt;br /&gt;
 % BSEBands&lt;br /&gt;
    25 |  28 |                 # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 WRbsWF                      # [BSS] Write to disk excitonic the FWs&lt;br /&gt;
 &lt;br /&gt;
This file was generated using the command: &amp;lt;code&amp;gt; yambo -X s -o b -k sex -y d -r&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First of all, we compute the excitons for all the momenta in the irreducible Brillouin zone for our discrete grid via the &amp;lt;code&amp;gt;BSEQptR&amp;lt;/code&amp;gt; variable. This will be a &#039;&#039;&#039;finite-momentum&#039;&#039;&#039; BSE calculation, analogous to the phonon one.&lt;br /&gt;
&lt;br /&gt;
Second, we change the variable &amp;lt;code&amp;gt;Lkind&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;bar&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;full&amp;lt;/code&amp;gt;. In Yambo, &amp;lt;code&amp;gt;Lkind=&amp;quot;bar&amp;quot;&amp;lt;/code&amp;gt;, which is the default for optical absorption, means that we are computing the excitonic response function without the long-range component of the exchange interaction. This cannot be used when computing the exciton momentum dependence, where the long-range exchange interaction can play a role, therefore we have to include it with &amp;lt;code&amp;gt;Lkind=&amp;quot;full&amp;quot;&amp;lt;/code&amp;gt;. This allows for the calculation of the excitonic longitudinal-transverse splitting (in 3D systems) as well.&lt;br /&gt;
&lt;br /&gt;
We can now run the code:&lt;br /&gt;
&lt;br /&gt;
 nohup mpirun -np 8 yambo -F bse.in -J bse_Lfull -C bse_Lfull &amp;amp;&lt;br /&gt;
&lt;br /&gt;
At the end of the calculation, we have obtained the &amp;lt;code&amp;gt;ndb.BS_diago_Q*&amp;lt;/code&amp;gt; databases inside the directory &amp;lt;code&amp;gt;bse_Lfull&amp;lt;/code&amp;gt;. They contain information on the exciton energies and wavefunctions at each momentum. Do not forget to check the report and logs of your calculation in the same directory to make sure that the code is doing what you want.&lt;br /&gt;
&lt;br /&gt;
== Step 6: obtain the electron-phonon matrix elements ==&lt;br /&gt;
&lt;br /&gt;
We have finished the heavy simulations. Now it&#039;s time for the postprocessing. The first order of business is the reconstruction of the electron-phonon coupling matrix elements from the dvscf results and the electronic wavefunctions.&lt;br /&gt;
&lt;br /&gt;
In order to do this, we will run the &amp;lt;code&amp;gt;lelphc&amp;lt;/code&amp;gt; executable of the &#039;&#039;&#039;LetzElPhC&#039;&#039;&#039; code. We will run via command line using yambopy, although it will be instructive to have look at the &amp;lt;code&amp;gt;lelphc&amp;lt;/code&amp;gt; input files later.&lt;br /&gt;
&lt;br /&gt;
We run in the same directory where the Yambo &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; is (remember than you can also virtually move it with a symbolic link).&lt;br /&gt;
&lt;br /&gt;
Type:&lt;br /&gt;
&lt;br /&gt;
 yambopy l2y&lt;br /&gt;
&lt;br /&gt;
to see the help for the calculation. For example, if we want to do a serial run of LetzElPhC for bands from &amp;lt;math&amp;gt;n_i&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;n_f&amp;lt;/math&amp;gt;, we should type:&lt;br /&gt;
&lt;br /&gt;
 yambopy l2y -ph path/of/ph_input.in -b n_i n_f&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;math&amp;gt;n_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;n_f&amp;lt;/math&amp;gt; are integers representing the initial and final band indices. &lt;br /&gt;
&lt;br /&gt;
These should coincide with those used for the Bethe-Salpeter kernel, i.e. those specified in the &amp;lt;code&amp;gt;BSEBands&amp;lt;/code&amp;gt; variable of the BSE input file (this is not strictly necessary, but certainly efficient since these calculations use a lot of disk space). &lt;br /&gt;
&lt;br /&gt;
For our system, we want to do a parallel calculation with 4 qpools and 2 kpools. In addition, we want to explicitly specify the path of the &amp;lt;code&amp;gt;lelphc&amp;lt;/code&amp;gt; executable and avoid automatically deleting the LetzElPhC data. So we type:&lt;br /&gt;
&lt;br /&gt;
 yambopy l2y -ph path/of/dvscf/mos2.dvscf -b 25 28 -par 4 2 -lelphc path/to/lelphc_exe --debug&lt;br /&gt;
&lt;br /&gt;
At the end, check the &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 ls SAVE/ndb.elph_gkkp*&lt;br /&gt;
&lt;br /&gt;
to see that it has created the Yambo-compatible electron-phonon databases.&lt;br /&gt;
&lt;br /&gt;
If you saved the &amp;lt;code&amp;gt;lelphc.in&amp;lt;/code&amp;gt; input file, you can inspect it:&lt;br /&gt;
&lt;br /&gt;
 # LetzElPhC input for yambo generated by yambopy&lt;br /&gt;
 nqpool      = 2&lt;br /&gt;
 nkpool      = 4&lt;br /&gt;
 start_bnd   = 25&lt;br /&gt;
 end_bnd     = 28&lt;br /&gt;
 save_dir    = ./SAVE&lt;br /&gt;
 kernel      = dfpt&lt;br /&gt;
 ph_save_dir = dvscf/ph_save&lt;br /&gt;
 convention = yambo&lt;br /&gt;
&lt;br /&gt;
You can also run it as it is, but the code will generate the database &amp;lt;code&amp;gt;ndb.elph&amp;lt;/code&amp;gt;. In order to convert it to the &amp;lt;code&amp;gt;ndb.elph_gkkp*&amp;lt;/code&amp;gt; databases of Yambo, you still need a couple of lines of python using the Yambopy class &amp;lt;code&amp;gt;ConvertElectronPhononDB&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;yambopy/letzelph_interface/lelph2y.py&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Notice the variable &amp;lt;code&amp;gt;convention=yambo&amp;lt;/code&amp;gt;: what does it mean? At variance with QE and many other codes, Yambo uses the &amp;quot;backward&amp;quot; momentum transfer convention for electronic scatterings. That is, an electronic transition goes from band &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; and momentum &amp;lt;math&amp;gt;k-q&amp;lt;/math&amp;gt; to band &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; and momentum &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;. In the &amp;quot;forward&amp;quot; momentum transfer convention (the more standard one), the transitions go from &amp;lt;math&amp;gt;nk&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;mk+q&amp;lt;/math&amp;gt;. Therefore, this variable ensures that the electron-phonon coupling matrix elements are computed as &amp;lt;math&amp;gt;\langle mk|dV|nk-q\rangle&amp;lt;/math&amp;gt;. This will have consequences also in the formulation of the &#039;&#039;exciton&#039;&#039;-phonon coupling matrix element.&lt;br /&gt;
&lt;br /&gt;
== Step 7: Obtain the exciton-phonon coupling ==&lt;br /&gt;
&lt;br /&gt;
Now, we can finally access our basic building block for exciton-phonon physics. This could be done entirely in python (using &#039;&#039;&#039;Yambopy&#039;&#039;&#039;), or by running &#039;&#039;&#039;Yambo&#039;&#039;&#039;. In this version of the tutorial we present the latter case.&lt;br /&gt;
&lt;br /&gt;
Our objective is obtaining the following quantity: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{G}^\mu_{\alpha\lambda}(0,q)=\sum_{vv^\prime c k} A^{\alpha, *}_{cv^\prime} (k, q) g_{vv^\prime}^\mu (k,q) A^{\lambda}_{cv}(k,q) - \sum_{cc^\prime vk} A^{\alpha, *}_{c^\prime v} (k+q, q) g_{c^\prime c}^\mu (k+q,q) A^{\lambda}_{cv}(k,q)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, &amp;lt;math&amp;gt;A^{\lambda}_{cv}(k,q)&amp;lt;/math&amp;gt; are the exciton coefficients extracted from the eigenvector of the two-particles Hamiltonian during the BSE calculation in step 5, while &amp;lt;math&amp;gt;g_{nm}^\mu (k,q)&amp;lt;/math&amp;gt; are the electron-phonon coupling matrix elements obtained in step 6. As you can see, the exciton &amp;lt;math&amp;gt;\lambda&amp;lt;/math&amp;gt; undergoes phonon-mediated scattering to state &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt; via phonon mode &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt;. The scattering can happen for the hole (valence, &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;) or for the electron (conduction, &amp;lt;math&amp;gt;c&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
NB: &lt;br /&gt;
&lt;br /&gt;
(1) This is written in the &amp;quot;backward&amp;quot; momentum transfer convention used by Yambo. The momentum dependence is different in the &amp;quot;forward&amp;quot; transfer convention. &lt;br /&gt;
&lt;br /&gt;
(2) For simplicity, this is written for zero initial exciton momentum. This means that one of the two states involved in the phonon-mediated scattering process will be in the optical limit (and possibly an optically generated exciton), while the other state can have any momentum: this momentum will be the same as the phonon one. This matrix element can be used to describe phonon-assisted absorption and emission spectra.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have to write a new yambo input, that we can call &amp;lt;code&amp;gt;excph.in&amp;lt;/code&amp;gt;, for this. You can copy (and adapt) the one below, or you can generate one by running from the command line:&lt;br /&gt;
&lt;br /&gt;
 yambo_ph -excph o&lt;br /&gt;
&lt;br /&gt;
This generates an input to compute luminescence (&amp;quot;o&amp;quot; is for &amp;quot;optics&amp;quot;). The variables that we are interested in are:&lt;br /&gt;
&lt;br /&gt;
 excph                            # [R] Exction-phonon&lt;br /&gt;
 ExcGkkp                          # [R][EXCPH] Exciton-Phonon Matrix Elelements&lt;br /&gt;
 % ELPhExcStates&lt;br /&gt;
  1 | 4 |                             # [EXCPH] Incoming (external) exciton states&lt;br /&gt;
 %&lt;br /&gt;
 % ELPhExcSum&lt;br /&gt;
  1 | 12 |                             # [EXCPH] Outgoing (virtual) exciton states&lt;br /&gt;
 %&lt;br /&gt;
 LoutPath= &amp;quot;./bse_Lfull&amp;quot;                 # [EXCPH] Path of the outgoing L&lt;br /&gt;
 % ElPhModes&lt;br /&gt;
   1 | 9 |                           # [ELPH] Phonon modes included&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
In this input, we have to select the initial exciton states &amp;lt;math&amp;gt;\lambda&amp;lt;/math&amp;gt; with &amp;lt;code&amp;gt;ELPhExcStates&amp;lt;/code&amp;gt;, the final exciton states &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt; with &amp;lt;code&amp;gt;ELPhExcSum&amp;lt;/code&amp;gt; and the phonon modes &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt; with &amp;lt;code&amp;gt;ElPhModes&amp;lt;/code&amp;gt;. Here we consider the first four states at &amp;lt;math&amp;gt;Q=0&amp;lt;/math&amp;gt; (corresponding to just two excitons because they are both doubly degenerate -- do not break degeneracies when selecting states!) and the first twelve states at each finite-&amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; point. We also include all the nine phonon modes of monolayer MoS2.&lt;br /&gt;
&lt;br /&gt;
What about &amp;lt;code&amp;gt;LoutPath&amp;lt;/code&amp;gt;? This variable controls the directory where the databases for the final-state excitons &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt; is located, which can be different from the directory with the initial-state excitons &amp;lt;math&amp;gt;\lambda&amp;lt;/math&amp;gt; read as usual with the &amp;lt;code&amp;gt;-J&amp;lt;/code&amp;gt; option when running the code. This makes it possible to compute the coupling between different exciton kinds. However, for our tutorial, we stick with the previously computed &amp;lt;code&amp;gt;Lfull&amp;lt;/code&amp;gt; in both cases.&lt;br /&gt;
&lt;br /&gt;
When we are satisfied with the input, we run the code using &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 yambo_ph -F excph.in -J excph,bse_Lfull -C excph&lt;br /&gt;
&lt;br /&gt;
If you check the output, you should find the &amp;lt;code&amp;gt;ndb.excph*&amp;lt;/code&amp;gt; databases in the &amp;lt;code&amp;gt;excph&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
=== Analysis of the couplings ===&lt;br /&gt;
&lt;br /&gt;
It is a good idea to have a look at what we computed up to now in order to make sure nothing has gone wrong. &lt;br /&gt;
&lt;br /&gt;
It is not easy to know what to expect (apart from symmetry and gauge compliance of the matrix elements), but one can work out the exciton-phonon selection rules in advance, check that the magnitude is reasonable, etc.&lt;br /&gt;
&lt;br /&gt;
It is also not easy to meaningfully plot this quantity. We have to make sure that we are not breaking degenerate states, otherwise the plots will not be invariant. &lt;br /&gt;
&lt;br /&gt;
First of all, we have to know our system: in monolayer MoS&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, the first four excitons are all doubly degenerate. The first exciton responsible for a bright peak in the absorption spectrum (the &#039;&#039;&#039;A&#039;&#039;&#039; peak), is the second state, corresponding to state indices &amp;lt;code&amp;gt;(3,4)&amp;lt;/code&amp;gt; in fortran indexing or &amp;lt;code&amp;gt;(2,3)&amp;lt;/code&amp;gt; in python indexing. &lt;br /&gt;
&lt;br /&gt;
All these information can be obtained by analyzing the BSE results (this stuff is explained in the BSE tutorials) and by knowledge of the system or class of systems from the literature.&lt;br /&gt;
&lt;br /&gt;
Thus, a good quantity to plot may be the norm of the matrix elements, summed over the degenerate subspace of exciton A, for a certain number of scattered final states mediated by certain phonon modes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;F_A(q)= \sqrt{ \sum_{\alpha \in A,\lambda,\mu} |\mathcal{G}_{\alpha\lambda}^\mu (0,q)|^2 }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to do this, we create a python script &amp;lt;code&amp;gt;analyse_excph.py&amp;lt;/code&amp;gt; in which we first load the excph dabatases using the &amp;lt;code&amp;gt;YamboExcitonPhononDB&amp;lt;/code&amp;gt; from yambopy. &lt;br /&gt;
You can find this script in the yambopy directory, in &amp;lt;code&amp;gt;tutorials/exciton-phonon&amp;lt;/code&amp;gt;. &lt;br /&gt;
First, we select the exciton and phonon states to be included in &amp;lt;code&amp;gt;F_A&amp;lt;/code&amp;gt;, together with the path of databases and plot details:&lt;br /&gt;
&lt;br /&gt;
 # Exciton in states&lt;br /&gt;
 exc_in  = [2,3]     # A: 2,3 -- B: 6,7&lt;br /&gt;
 exc_out = [0,1,2,3] # first 4 states (dispersion of triplet state and A)&lt;br /&gt;
 ph_in  = &#039;all&#039;&lt;br /&gt;
 &lt;br /&gt;
 # Paths of databases&lt;br /&gt;
 ns_db1 =f&#039;{path}/SAVE/ns.db1&#039;&lt;br /&gt;
 ndb_exc=f&#039;{path}/excph&#039;&lt;br /&gt;
 &lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Then, we load the data:&lt;br /&gt;
&lt;br /&gt;
 # Read lattice and k-space info&lt;br /&gt;
 ylat = YamboLatticeDB.from_db_file(filename=ns_db1),Expand=True)&lt;br /&gt;
 print(ylat)&lt;br /&gt;
 &lt;br /&gt;
 # Read exc-ph databases&lt;br /&gt;
 X = YamboExcitonPhononDB(ylat,save_excph=ndb_exc)&lt;br /&gt;
 print(X)&lt;br /&gt;
&lt;br /&gt;
The quantity &amp;lt;math&amp;gt;F_A(q)&amp;lt;/math&amp;gt; is defined inside the plotting function as&lt;br /&gt;
&lt;br /&gt;
 G_squared = excph.excph_sq&lt;br /&gt;
 G2plt = np.zeros(len(G_squared))&lt;br /&gt;
 &lt;br /&gt;
 if exc_in  == &#039;all&#039;: exc_in  = range(G_squared.shape[2])&lt;br /&gt;
 if exc_out == &#039;all&#039;: exc_out = range(G_squared.shape[3])&lt;br /&gt;
 if ph_in   == &#039;all&#039;: ph_in   = range(G_squared.shape[1])&lt;br /&gt;
 &lt;br /&gt;
 G_squared = G_squared[:, ph_in, :, :].sum(axis=(1))&lt;br /&gt;
 G_squared = G_squared[:, exc_in, :].sum(axis=(1))&lt;br /&gt;
 G_squared = G_squared[:, exc_out].sum(axis=(1))&lt;br /&gt;
 &lt;br /&gt;
 F_q = np.sqrt( G_squared )*ha2ev # Switch from Ha to eV&lt;br /&gt;
&lt;br /&gt;
And finally, we have to make a plotting function. For this tutorial we will use the default scatterplot provided by &amp;lt;code&amp;gt;YamboExcitonPhononDB&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 excph.plot_excph(F_q,plt_cbar=plt_cbar,**kwargs)&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
You can get more experience on using Yambopy for these kinds of visualization by following the [https://wiki.yambo-code.eu/wiki/index.php?title=First_steps_in_Yambopy Yambopy tutorials]. In fact, remember that this scripts and all the other yambopy tutorial scripts are just suggestions, not source code written in stone: if you know &amp;lt;code&amp;gt;numpy&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;matplotlib&amp;lt;/code&amp;gt; you can do your own analysis and your own plots, you just need to import the required Yambopy modules to load the data.&lt;br /&gt;
&lt;br /&gt;
In our case, the resulting plot is the following.&lt;br /&gt;
&lt;br /&gt;
[[File:1L MoS2 ExcPh.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
This can be checked against Fig. 2(d) of reference &amp;lt;ref name=&amp;quot;chan2023&amp;quot; /&amp;gt;, although you have to keep in mind that our results are badly undersampled in terms of the reciprocal-space grid, as can be easily seen, and the quantity plotted is not exactly the same. However, the main features are already there since they are dictated mostly by crystal symmetries.&lt;br /&gt;
&lt;br /&gt;
Now that we have the exciton-phonon matrix elements, we can use them to build several kinds of observables. Below, we give an example related to phonon-assisted luminescence, but we may update this tutorial in the future to include more cases.&lt;br /&gt;
&lt;br /&gt;
== Step 8: Compute phonon-assisted luminescence ==&lt;br /&gt;
&lt;br /&gt;
[[File:Luminescence scheme.png|250px|right]]&lt;br /&gt;
&lt;br /&gt;
We want to compute the experimental optical signature due to the phonon-assisted recombination of an exciton (as sketched in the figure).&lt;br /&gt;
&lt;br /&gt;
The signal from the phonon replicas can be modeled as a second-order scattering process involving one phonon and one photon:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;I^{(1)}_{PL}(\omega;T) \propto \frac{1}{N_q}\sum_{ s \mu \beta q} \left|\sum_\lambda\frac{D_\lambda \mathcal{G}^{\mu q}_{\alpha q,\lambda}}{E_{\alpha q}-E_\lambda -s\Omega_{\mu q}} \right|^2 N_{\alpha q}(T_{exc}) F^s_{\mu q}(T)\delta(\omega - \left[E_{\alpha q}-s\Omega_{\mu q}\right])&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this equation, the oscillator strength of the peak is given by the exciton-phonon coupling matrix elements &amp;lt;math&amp;gt;\mathcal{G}&amp;lt;/math&amp;gt; multiplied by the exciton dipoles &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (they are called &amp;quot;residuals&amp;quot; in Yambo). Here &amp;lt;math&amp;gt;E_\lambda&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;E_{\alpha q}&amp;lt;/math&amp;gt; are the energies of the optical and finite-momentum excitons, respectively, while &amp;lt;math&amp;gt;\Omega_{\mu q}&amp;lt;/math&amp;gt; are the phonon energies. &lt;br /&gt;
&lt;br /&gt;
The occupation function &amp;lt;math&amp;gt;F&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;F^s_{\mu q}(T)=n_{\mu q}(T)+\frac{1+s}{2}&amp;lt;/math&amp;gt;. Here, &amp;lt;math&amp;gt;n(T)&amp;lt;/math&amp;gt; is the temperature-dependent phonon Bose-Einstein occupation function. As it can be seen, &amp;lt;math&amp;gt;s=1&amp;lt;/math&amp;gt; corresponds to processes of phonon &#039;&#039;emission&#039;&#039; (&amp;lt;math&amp;gt;\propto n(T)+1&amp;lt;/math&amp;gt;), while &amp;lt;math&amp;gt;s=-1&amp;lt;/math&amp;gt; corresponds to processes of phonon &#039;&#039;absorption&#039;&#039; (&amp;lt;math&amp;gt;\propto n(T)&amp;lt;/math&amp;gt;). Therefore, &amp;lt;math&amp;gt;I^{(1)}_{PL}(\omega;T)&amp;lt;/math&amp;gt; describes &#039;&#039;light&#039;&#039; emission by recombining excitons mediated by either &#039;&#039;phonon&#039;&#039; absorption or emission. &lt;br /&gt;
&lt;br /&gt;
The quantity &amp;lt;math&amp;gt; N_{\alpha q}(T_{exc})&amp;lt;/math&amp;gt; is the exciton occupation function. Luminescence is technically an out-of-equilibrium process, but we can assume that for very low density of excitations and in steady-state conditions, the exciton population can be approximately described by an equilibrium distribution evaluated at an effective temperature. Here, we use the Boltzmann distribution. Experimentally, &amp;lt;math&amp;gt;T_{exc}&amp;lt;/math&amp;gt; tends to coincide with the lattice temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; more or less above 100 K, while at very low temperature (&amp;lt; 10 K), &amp;lt;math&amp;gt;T_{exc}&amp;lt;/math&amp;gt; may vary between 10-50 K. It goes without saying that this needs to carefully be checked in your realistic calculations.&lt;br /&gt;
&lt;br /&gt;
=== Running the jobs ===&lt;br /&gt;
&lt;br /&gt;
In order to study luminescence in a paradigmatic system, we switch to bulk hexagonal boron nitride and we repeat the workflow. As you can easily see, one can think about automatizing the execution of all these calculations via scripting or more advanced tools. However, in the case of very large simulations (memory-limited or disk-space limited) or for systems whose electronic and lattice properties are fragile with respect to tiny calculation details, one must be very careful and run many basic tests.&lt;br /&gt;
&lt;br /&gt;
Fortunately, we are running a fast underconverged example. We use LDA pseudopotentials from the pseudo-dojo library and the following are the calculations steps.&lt;br /&gt;
&lt;br /&gt;
1. Input &amp;lt;code&amp;gt;hbn.scf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;control&lt;br /&gt;
     calculation=&#039;scf&#039;,&lt;br /&gt;
     prefix=&#039;hBN&#039;,&lt;br /&gt;
     restart_mode=&#039;from_scratch&#039;&lt;br /&gt;
     pseudo_dir = &#039;$PSEUDO_DIR&#039;,&lt;br /&gt;
     outdir = &#039;./tmp&#039;&lt;br /&gt;
     verbosity = &#039;high&#039;&lt;br /&gt;
     wf_collect=.true.&lt;br /&gt;
 /&lt;br /&gt;
 &amp;amp;system&lt;br /&gt;
     ibrav = 4,&lt;br /&gt;
     celldm(1) = 4.703675849&lt;br /&gt;
     celldm(3) = 2.603711434&lt;br /&gt;
     nat= 4,&lt;br /&gt;
     ntyp= 2,&lt;br /&gt;
     force_symmorphic=.true.&lt;br /&gt;
     ecutwfc = 100,&lt;br /&gt;
 /&lt;br /&gt;
 &amp;amp;electrons&lt;br /&gt;
   diago_david_ndim = 2&lt;br /&gt;
   diago_full_acc=.true.&lt;br /&gt;
   diago_thr_init=5.0e-6&lt;br /&gt;
   mixing_mode = &#039;plain&#039;&lt;br /&gt;
   mixing_beta = 0.7&lt;br /&gt;
   conv_thr =  1.0d-16&lt;br /&gt;
 /&lt;br /&gt;
 ATOMIC_SPECIES&lt;br /&gt;
  B 10.81100  B_LDA_dojo.UPF&lt;br /&gt;
  N 14.00674  N_LDA_dojo.UPF&lt;br /&gt;
 ATOMIC_POSITIONS {crystal}&lt;br /&gt;
 N             0.6666666670        0.3333333330        -0.250000000000&lt;br /&gt;
 B             0.3333333330        0.6666666670        -0.250000000000&lt;br /&gt;
 B             0.6666666670        0.3333333330        0.25000000000&lt;br /&gt;
 N             0.3333333330        0.6666666670        0.25000000000&lt;br /&gt;
 K_POINTS {automatic}&lt;br /&gt;
 6 6 2 0 0 0&lt;br /&gt;
&lt;br /&gt;
 mpirun -np 4 pw.x -inp hbn.scf &amp;gt; scf.out&lt;br /&gt;
&lt;br /&gt;
2. Input &amp;lt;code&amp;gt;hbn.nscf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;control&lt;br /&gt;
     calculation=&#039;nscf&#039;,&lt;br /&gt;
     prefix=&#039;hBN&#039;,&lt;br /&gt;
     restart_mode=&#039;from_scratch&#039;&lt;br /&gt;
     pseudo_dir = &#039;$PSEUDO_DIR&#039;&lt;br /&gt;
     outdir = &#039;./&#039;&lt;br /&gt;
     verbosity = &#039;high&#039;&lt;br /&gt;
     wf_collect=.true.&lt;br /&gt;
 /&lt;br /&gt;
 &amp;amp;system&lt;br /&gt;
     ibrav = 4,&lt;br /&gt;
     celldm(1) = 4.703675849&lt;br /&gt;
     celldm(3) = 2.603711434&lt;br /&gt;
     nat= 4,&lt;br /&gt;
     ntyp= 2,&lt;br /&gt;
     force_symmorphic=.true.&lt;br /&gt;
     ecutwfc = 100,&lt;br /&gt;
 	nbnd = 120&lt;br /&gt;
 /&lt;br /&gt;
 &amp;amp;electrons&lt;br /&gt;
   diago_david_ndim = 2&lt;br /&gt;
   diago_full_acc=.true.&lt;br /&gt;
   diago_thr_init=5.0e-6&lt;br /&gt;
   mixing_mode = &#039;plain&#039;&lt;br /&gt;
   mixing_beta = 0.7&lt;br /&gt;
   conv_thr =  1.0d-16&lt;br /&gt;
 /&lt;br /&gt;
 ATOMIC_SPECIES&lt;br /&gt;
  B 10.81100  B_LDA_dojo.UPF&lt;br /&gt;
  N 14.00674  N_LDA_dojo.UPF&lt;br /&gt;
 ATOMIC_POSITIONS {crystal}&lt;br /&gt;
 N             0.6666666670        0.3333333330        -0.250000000000&lt;br /&gt;
 B             0.3333333330        0.6666666670        -0.250000000000&lt;br /&gt;
 B             0.6666666670        0.3333333330        0.25000000000&lt;br /&gt;
 N             0.3333333330        0.6666666670        0.25000000000&lt;br /&gt;
 K_POINTS {automatic}&lt;br /&gt;
 6 6 2 0 0 0&lt;br /&gt;
&lt;br /&gt;
 mpirun -np 4 pw.x -inp hbn.nscf &amp;gt; nscf.out&lt;br /&gt;
&lt;br /&gt;
3. Input &amp;lt;code&amp;gt;hbn.dvscf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 hbn_dvscf&lt;br /&gt;
 &amp;amp;inputph&lt;br /&gt;
   tr2_ph=1.0d-12,&lt;br /&gt;
   verbosity=&#039;high&#039;&lt;br /&gt;
   prefix=&#039;hBN&#039;,&lt;br /&gt;
   fildvscf = &#039;hBN-dvscf&#039;,&lt;br /&gt;
   electron_phonon = &#039;dvscf&#039;,&lt;br /&gt;
   fildyn=&#039;hBN.dyn&#039;,&lt;br /&gt;
   epsil=.false.,&lt;br /&gt;
   ldisp=.true.,&lt;br /&gt;
   recover=.true.,&lt;br /&gt;
   nq1=6,&lt;br /&gt;
   nq2=6,&lt;br /&gt;
   nq3=2&lt;br /&gt;
 /&lt;br /&gt;
&lt;br /&gt;
 nohup mpirun -np 8 pw.x -inp hbn.dvscf &amp;gt; dvscf.out &amp;amp;&lt;br /&gt;
&lt;br /&gt;
4. Input &amp;lt;code&amp;gt;bse.in&amp;lt;/code&amp;gt; (we include 2 valence and 2 conduction bands):&lt;br /&gt;
&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 em1s&lt;br /&gt;
 DIP_CPU= &amp;quot;1 8 1&amp;quot;                      # [PARALLEL] CPUs for each role&lt;br /&gt;
 DIP_ROLEs= &amp;quot;k c v&amp;quot;                    # [PARALLEL] CPUs roles (k,c,v)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_and_IO_CPU= &amp;quot;1 1 1 8 1&amp;quot;                 # [PARALLEL] CPUs for each role&lt;br /&gt;
 X_and_IO_ROLEs= &amp;quot;q g k c v&amp;quot;               # [PARALLEL] CPUs roles (q,g,k,c,v)&lt;br /&gt;
 X_and_IO_nCPU_LinAlg_INV=-1      # [PARALLEL] CPUs for Linear Algebra (if -1 it is automatically set)&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 BS_CPU= &amp;quot;8 1 1&amp;quot;                       # [PARALLEL] CPUs for each role&lt;br /&gt;
 BS_ROLEs= &amp;quot;k eh t&amp;quot;                     # [PARALLEL] CPUs roles (k,eh,t)&lt;br /&gt;
 BS_nCPU_LinAlg_INV=-1            # [PARALLEL] CPUs for Linear Algebra (if -1 it is automatically set)&lt;br /&gt;
 BS_nCPU_LinAlg_DIAGO=-1          # [PARALLEL] CPUs for Linear Algebra (if -1 it is automatically set)&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions&lt;br /&gt;
 % QpntsRXs&lt;br /&gt;
    1 | 14 |                         # [Xs] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 120 |                         # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 10                Ry    # [Xs] Response block size&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Lkind= &amp;quot;Lfull&amp;quot;                    # [BSE] Lbar (default) / full&amp;lt;/span&amp;gt;&lt;br /&gt;
 BSSmod= &amp;quot;d&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 % DipBands&lt;br /&gt;
    1 | 120 |                         # [DIP] Bands range for dipoles&lt;br /&gt;
 %&lt;br /&gt;
 DipApproach= &amp;quot;G-space v&amp;quot;         # [DIP] [G-space v/R-space x/Covariant/Shifted grids]&lt;br /&gt;
 DipComputed= &amp;quot;R V P&amp;quot;             # [DIP] [default R P V; extra P2 Spin Orb]&lt;br /&gt;
 BSENGexx= 30000            Ry    # [BSK] Exchange components&lt;br /&gt;
 #ALLGexx                       # [BSS] Force the use use all RL vectors for the exchange part&lt;br /&gt;
 BSENGBlk=  9000            Ry    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  1.25997 | 1.08816 | 1.12683 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;% BSEQptR&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 1 | 14 |                     # [BSK] Transferred momenta range&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;%&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;% BSEBands&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;   7 | 10 |                         # [BSK] Bands range&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;%&amp;lt;/span&amp;gt;&lt;br /&gt;
 % BEnRange&lt;br /&gt;
   0.50000 | 8.00000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.050000 | 0.050000 |         eV    # [BSS] Damping range&lt;br /&gt;
 %&lt;br /&gt;
 BEnSteps= 1000                    # [BSS] Energy steps&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 1.000000 | 0.000000 |        # [BSS] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 WRbsWF                        # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
 nohup mpirun -np 8 yambo -F bse.in -J bse_Lfull -C bse_Lfull &amp;amp;&lt;br /&gt;
&lt;br /&gt;
Importantly, since we want to describe the phonon-assisted recombination process of an *optical* exciton (i.e., emitting a transverse photon), this time we also run an additional calculation at `Q=0` omitting the nonanalytic long-range Coulomb exchange. Make a second input &amp;lt;code&amp;gt;bse_Lbar.in&amp;lt;/code&amp;gt; with the following changes: &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Lkind= &amp;quot;Lbar&amp;quot;                    # [BSE] Lbar (default) / full&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;% BSEQptR&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 1 | 1 |                     # [BSK] Transferred momenta range&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;%&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4b. So now we make a second BSE run in a different directory specified by &amp;lt;code&amp;gt;-J&amp;lt;/code&amp;gt;. Here, we also pass to yambo the directory of the previous run as it includes the important screening databases &amp;lt;code&amp;gt;ndb.em1s*&amp;lt;/code&amp;gt; that we do not want to recompute from scratch.&lt;br /&gt;
 &lt;br /&gt;
 mpirun -np 8 yambo -F bse_Lbar.in -J bse_Lbar,bse_Lfull -C bse_Lbar&lt;br /&gt;
&lt;br /&gt;
5. Now we run &amp;lt;code&amp;gt;lelphc&amp;lt;/code&amp;gt; with yambopy to get the el-ph matrix elements:&lt;br /&gt;
&lt;br /&gt;
 yambopy l2y -ph path/of/dvscf/hbn.dvscf -b 7 10 -par 4 2 &lt;br /&gt;
&lt;br /&gt;
6. And finally we generate the exciton-phonon input &amp;lt;code&amp;gt;excph.in&amp;lt;/code&amp;gt; using &amp;lt;code&amp;gt;yambo_ph -excph o&amp;lt;/code&amp;gt;. Now, we take a look at all the additional variables that we didn&#039;t check before, specifying also the details for luminescence the spectrum calculation.&lt;br /&gt;
&lt;br /&gt;
 excph                            # [R] Exction-phonon&lt;br /&gt;
 ExcGkkp                          # [R][EXCPH] Exciton-Phonon Matrix Elelements&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;ExcPhOptics                      # [R][EXCPH] Exciton-Phonon Optics&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;BoseTemp=10.000000         Kn    # Bosonic Temperature&amp;lt;/span&amp;gt; &lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;EXCTemp= 10.000000          Kn    # [EXCPH] Excitonic Temperature (for luminescence spectra)&amp;lt;/span&amp;gt;&lt;br /&gt;
 % ELPhExcStates&lt;br /&gt;
  1 | 4 |                             # [EXCPH] Incoming (external) exciton states&lt;br /&gt;
 %&lt;br /&gt;
 % ELPhExcSum&lt;br /&gt;
  1 | 12 |                             # [EXCPH] Outgoing (virtual) exciton states&lt;br /&gt;
 %&lt;br /&gt;
 % ElPhModes&lt;br /&gt;
  1 | 12 |                           # [ELPH] Phonon modes included&lt;br /&gt;
 %&lt;br /&gt;
 LoutPath= &amp;quot;./bse-L_full&amp;quot;                 # [EXCPH] Path of the outgoing L&lt;br /&gt;
 FANdEtresh= 0.100000E-5    eV    # [ELPH] Energy treshold for Fan denominator&lt;br /&gt;
 EXCPHdEtresh= 0.100000E-5  eV    # [ELPH] Energy treshold for exc-ph denominator&lt;br /&gt;
 LDamping= 0.500000E-3      eV    # [EXCPH] Damping of exc-ph self-energy&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;# These are the plot parameters, same as in other parts of yambo&amp;lt;/span&amp;gt; &lt;br /&gt;
 % EnRngeXd&lt;br /&gt;
   4.00000 | 5.00000 |         eV    # [Xd] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 % DmRngeXd&lt;br /&gt;
  0.00500000 | 0.00500000 |         eV    # [Xd] Damping range&lt;br /&gt;
 %&lt;br /&gt;
 ETStpsXd= 4000                    # [Xd] Total Energy steps&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;code&amp;gt;BoseTemp&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;EXCTemp&amp;lt;/code&amp;gt; are the lattice and excitonic temperature, respectively.&lt;br /&gt;
&lt;br /&gt;
Now we run the calculation with &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt;. Here, we read as &amp;lt;math&amp;gt;Q=0&amp;lt;/math&amp;gt; excitons with &amp;lt;code&amp;gt;-J&amp;lt;/code&amp;gt; the ones without the long-range Coulomb exchange:&lt;br /&gt;
&lt;br /&gt;
 yambo_ph -F excph.in -J excph,bse_Lbar -C excph&lt;br /&gt;
&lt;br /&gt;
and we find our outputs in the &amp;lt;code&amp;gt;excph&amp;lt;/code&amp;gt; directory. &lt;br /&gt;
&lt;br /&gt;
NB: Step 6 could have been equivalently run in yambopy, limiting the use of the yambo code to just step 4. This latter option is more flexible, as it allows for a greater degree of control by the user. We are in the last stages of the development and it will be available soon.&lt;br /&gt;
&lt;br /&gt;
=== Results ===&lt;br /&gt;
&lt;br /&gt;
If we check the output directory from the step 6 calculation, we find the &amp;lt;code&amp;gt;o-excph.pl_bse_ph_ass&amp;lt;/code&amp;gt; output files containing the luminescence spectra. We can plot them with gnuplot or any other tool:&lt;br /&gt;
&lt;br /&gt;
 gnuplot&lt;br /&gt;
 &amp;gt; set xrange[4.2:5]&lt;br /&gt;
 &amp;gt; p &#039;o-excph.pl_bse_ph_ass&#039; u 1:2 w l lc rgb &#039;red&#039; lw 3&lt;br /&gt;
&lt;br /&gt;
[[File:Luminescence plot.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
Here, the signal corresponds to a finite-momentum exciton that recombines with the help of several different phonon modes, both optical and acoustic. Each phonon mode whose coupling with the exciton is allowed can generate a peak, and the energy shifts of these peaks with respect to the initial exciton energy correspond to the phonon energies. This result is underconverged, but the main features are all there. In the plot, we show a more converged example using a 12x12x4 grid (all the other parameters being equal). These plots can be compared with Fig. 4(a) of reference &amp;lt;ref name=&amp;quot;zanfrognini2023&amp;quot; /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;toyozawa2003&amp;quot; &amp;gt;Toyozawa, Yutaka, and Chris Oxlade, &#039;&#039;Optical processes in solids&#039;&#039;, [https://m.booksee.org/book/1121964?force_lang=en Cambridge University Press, (2003)]. &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;lechifflart2023&#039;&amp;gt;P. Lechifflart, F. Paleari, D. Sangalli, C. Attaccalite, &#039;&#039;First-principles study of luminescence in hexagonal boron nitride single layer: Exciton-phonon coupling and the role of substrate&#039;&#039;, &lt;br /&gt;
[https://doi.org/10.1103/PhysRevMaterials.7.024006 Phys. Rev. M, &#039;&#039;&#039;7&#039;&#039;&#039; (2), 024006 (2023)]; [https://arxiv.org/abs/2212.10407 arXiv2212.1047]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;cannuccia2019&#039;&amp;gt;E. Cannuccia, B. Monserrat and C. Attaccalite, &#039;&#039;Theory of phonon-assisted luminescence in solids: Application to hexagonal boron nitride&#039;&#039;, [https://doi.org/10.1103/PhysRevB.99.081109 Phys. Rev. B &#039;&#039;&#039;99&#039;&#039;&#039;, 081109(R) (2019)]; [https://arxiv.org/abs/1807.11797 arXiv1807.11797]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;paleari2019&#039;&amp;gt;F. Paleari et al., &#039;&#039;Exciton-Phonon Coupling in the Ultraviolet Absorption and Emission Spectra of Bulk Hexagonal Boron Nitride&#039;&#039;, [https://doi.org/10.1103/PhysRevLett.122.187401 Phys. Rev. Lett. &#039;&#039;&#039;122&#039;&#039;&#039;, 187401 (2019)]; [https://arxiv.org/abs/1810.08976 arXiv1810.089776] &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;chen2020&#039;&amp;gt;&#039;&#039;Exciton-Phonon Interaction and Relaxation Times from First Principles&#039;&#039;,&lt;br /&gt;
Hsiao-Yi Chen, Davide Sangalli, and Marco Bernardi, [https://doi.org/10.1103/PhysRevLett.125.107401  Phys. Rev. Lett. &#039;&#039;&#039;125&#039;&#039;&#039;, 107401 (2020)]; [https://arxiv.org/abs/2002.08913 arXiv 2002.08913 (2020)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;lechifflart2023_PhD&amp;quot;&amp;gt;P. Lechifflart, &#039;&#039;Exciton-phonon coupling and phonon-assisted luminescence in hexagonal Boron Nitride nanostructures&#039;&#039;, [https://hal.science/tel-04266805v1 PhD Thesis, University of Marseille (2023)]; [https://www.yambo-code.eu/wiki/images/5/54/These_final.pdf From the yambo website]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;paleari2019_PhD&#039;&amp;gt;F. Paleari, &#039;&#039;First-principles approaches to the description of indirect absorption and luminescence spectroscopy: exciton-phonon coupling in hexagonal boron nitride&#039;&#039;, [https://wwwen.uni.lu/research/fstm/dphyms/people/fulvio_paleari PhD thesis, University of Luxembourg (2019)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;zanfrognini2023&#039;&amp;gt;M. Zanfrognini et al., &#039;&#039;Distinguishing different stackings in layered materials via luminescence spectroscopy&#039;&#039;, [https://doi.org/10.1103/PhysRevLett.131.206902 Phys. Rev. Lett. &#039;&#039;&#039;131&#039;&#039;&#039;, 206902 (2023)]; [https://arxiv.org/abs/2305.17554 arXiv 2305.17554] &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;marini2024&#039;&amp;gt;G. Marini, M. Calandra, P. Cudazzo, &#039;&#039;Optical absorption and photoluminescence of single layer boron nitride from a first principles cumulant approach&#039;&#039;, [https://doi.org/10.1021/acs.nanolett.4c00669 Nano Lett., &#039;&#039;&#039;24&#039;&#039;&#039;, 20, 6017 (2024)]; [https://arxiv.org/abs/2402.03826 arXiv 2402.03826 (2024)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;antonius2017&#039;&amp;gt;G. Antonius, S. G. Louie, &#039;&#039;Theory of exciton-phonon coupling&#039;&#039;, [https://doi.org/10.1103/PhysRevB.105.085111 Phys. Rev. B, &#039;&#039;&#039;105&#039;&#039;&#039;, 085111 (2022)]; [https://arxiv.org/abs/1705.04245 arXiv1705.04245 (2017)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;paleari2022&#039;&amp;gt; F. Paleari, and A. Marini, &#039;&#039;Exciton-phonon interaction calls for a revision of the “exciton” concept&#039;&#039;, [https://doi.org/10.1103/PhysRevB.106.125403 Phys. Rev. B, &#039;&#039;&#039;106&#039;&#039;&#039;, 125403 (2022)]; [https://arxiv.org/abs/2205.02783 arXiv 2205.02783]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;cudazzo2020&#039;&amp;gt; P. Cudazzo, &#039;&#039;First-principles description of the exciton-phonon interaction: A cumulant approach&#039;&#039;, [https://doi.org/10.1103/PhysRevB.102.045136 Phys. Rev. B, &#039;&#039;&#039;102&#039;&#039;&#039;, 045136 (2020)]; [https://orbilu.uni.lu/bitstream/10993/44769/1/main.pdf Open access pdf from Luxembourg University]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;chan2023&#039;&amp;gt;Y-h Chan, J. B. Haber, M. H. Naik, J. B. Neaton, D. Y. Qiu, F. H. da Jornada, S. G. Louie, &#039;&#039;Exciton Lifetime and Optical Line Width Profile via Exciton–Phonon Interactions: Theory and First-Principles Calculations for Monolayer MoS2&#039;&#039;, [https://doi.org/10.1021/acs.nanolett.3c00732 Nano Lett., &#039;&#039;&#039;23&#039;&#039;&#039;, 9 (2023)]; [https://arxiv.org/abs/2212.08451 arXiv 2212.08451 (2023)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;murali2025&#039;&amp;gt;M. Nalabothula, S. Reichardt, L. Wirtz, &#039;&#039;Origin of Interlayer Exciton–Phonon Coupling in 2D Heterostructures&#039;&#039;, [https://doi.org/10.1021/acs.nanolett.5c00355 Nano Lett., &#039;&#039;&#039;25&#039;&#039;&#039;, 15 (2025)], [https://arxiv.org/abs/2407.16111 arXiv 2407.16111 (2025)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Exciton-phonon_coupling_and_luminescence&amp;diff=9178</id>
		<title>Exciton-phonon coupling and luminescence</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Exciton-phonon_coupling_and_luminescence&amp;diff=9178"/>
		<updated>2025-10-07T15:22:37Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Tdgw-phonon-usc-01-1024x829.jpg| 400px | right]]&lt;br /&gt;
&lt;br /&gt;
In this advanced tutorial, we will calculate exciton-phonon interactions from first principles by interfacing DFPT (for phonon calculations) and BSE (for exciton calculations).&lt;br /&gt;
&lt;br /&gt;
The DFTP calculations are run with Quantum ESPRESSO, while the many-body GW-BSE calculations are run with Yambo. Finally, the exciton-phonon interaction will be obtained by combining and postprocessing the databases computed in the two previous runs. The great advantage of this workflow is that the calculations can be run in the irreducible Brillouin zones both for the electronic momenta (&#039;&#039;&#039;k&#039;&#039;&#039;) and the transfer momenta (&#039;&#039;&#039;Q&#039;&#039;&#039;, &#039;&#039;&#039;q&#039;&#039;&#039;) of excitons and phonons, thus speeding up considerably the jobs while reducing the IO and memory load.&lt;br /&gt;
&lt;br /&gt;
We will first compute the exciton-phonon coupling matrix elements: these are the building blocks needed to construct experimental observables such as phonon-assisted optical spectra (such as luminescence), Raman spectra and exciton lifetimes. We will do this in the case of monolayer MoS&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, a 2D system with large spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
As an example of application, we will consider the case of phonon-assisted luminescence. We will do this in the case of bulk hBN, a layered indirect insulator with strong electron-phonon coupling.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; this tutorial will be updated when new exc-ph tools become available in Yambopy (including full-python postprocessing, Raman spectra, interpolated lifetimes, etc).&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This is an advanced topic: we assume that you already know something about the theory&amp;lt;ref name=&amp;quot;toyozawa2003&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;antonius2017&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;cudazzo2020&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;paleari2019_PhD&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;paleari2022&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;lechifflart2023_PhD&amp;quot; /&amp;gt; and applications&amp;lt;ref name=&amp;quot;paleari2019&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;cannuccia2019&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;chen2020&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;zanfrognini2023&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;lechifflart2023&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;chan2023&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;marini2024&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;murali2025&amp;quot; /&amp;gt; of exciton-phonon physics. &lt;br /&gt;
&lt;br /&gt;
Also, we assume that you already know how to run both a basic &#039;&#039;&#039;Yambo&#039;&#039;&#039; GW-BSE calculation and a DFPT phonon calculation with &#039;&#039;&#039;Quantum ESPRESSO&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Besides the QE executables &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ph.x&amp;lt;/code&amp;gt;, we also use the yambo phonon-specific executable &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt; and the python utility &#039;&#039;&#039;Yambopy&#039;&#039;&#039;. The auxiliary code &#039;&#039;&#039;LetzElPhC&#039;&#039;&#039; (executable &amp;lt;code&amp;gt;lelphc&amp;lt;/code&amp;gt;) will be used to obtain the electron-phonon matrix elements by reading the same electronic wavefunctions used by Yambo (and stored in the &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; directory), while also making full use of crystal symmetries. [https://gitlab.com/lumen-code/LetzElPhC LetzElPhC] will be run by Yambopy, but it must nonetheless be installed. Finally, the exciton-phonon properties can be computed either using &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt; or using Yambopy itself.&lt;br /&gt;
&lt;br /&gt;
[[File:Workflow scheme.png|800px|center]]&lt;br /&gt;
&lt;br /&gt;
== Step 0: Pseudopotentials, equilibrium structure and convergence ==&lt;br /&gt;
&lt;br /&gt;
In a real calculation, it is important to ensure that both the pseudopotential and the lattice parameters that we are using are compatible and perform well for the electronic excited states and for the lattice vibrations simultaneously. Furthermore, you have to make sure that the wave function cutoff &amp;lt;code&amp;gt;ecutwfc&amp;lt;/code&amp;gt; is converged with respect to the DFPT step and not just to the DFT one. This is in addition to the other customary convergence tests for DFT, DFPT, GW and BSE calculations.&lt;br /&gt;
&lt;br /&gt;
This is often the most time-demanding step when starting on a new system.&lt;br /&gt;
&lt;br /&gt;
For the sake of this tutorial, we assume that we have already done all these tests and we are starting the final workflow to get the exciton-phonon properties.&lt;br /&gt;
&lt;br /&gt;
== Step 1: scf calculation ==&lt;br /&gt;
&lt;br /&gt;
First of all, we run a standard scf calculation with &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; for Yambo. We stick with non-symmorphic symmetries. At the end, we will have the QE &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
This is the input &amp;lt;code&amp;gt;mos2.scf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;control&lt;br /&gt;
           wf_collect = .true.,&lt;br /&gt;
          calculation = &amp;quot;scf&amp;quot;,&lt;br /&gt;
            verbosity = &#039;high&#039;,&lt;br /&gt;
           pseudo_dir = &#039;$PSEUDO_DIR&#039;,&lt;br /&gt;
               prefix = &amp;quot;mos2&amp;quot;,&lt;br /&gt;
               outdir = &#039;.&#039;,&lt;br /&gt;
  /&amp;amp;end&lt;br /&gt;
  &amp;amp;system&lt;br /&gt;
              ecutwfc = 100.0,&lt;br /&gt;
          occupations = &#039;fixed&#039;,&lt;br /&gt;
                ibrav = 4,&lt;br /&gt;
            celldm(1) = 5.9000811881,&lt;br /&gt;
            celldm(3) = 6.7795677253,&lt;br /&gt;
                  nat = 3,&lt;br /&gt;
                 ntyp = 2,&lt;br /&gt;
             lspinorb = .true.&lt;br /&gt;
             noncolin = .true.&lt;br /&gt;
             assume_isolated = &#039;2D&#039;&lt;br /&gt;
         force_symmorphic = .true.&lt;br /&gt;
  /&amp;amp;end&lt;br /&gt;
  &amp;amp;electrons&lt;br /&gt;
     electron_maxstep = 200,&lt;br /&gt;
          mixing_beta = 0.7,&lt;br /&gt;
             conv_thr = 1.d-08,&lt;br /&gt;
  /&amp;amp;end&lt;br /&gt;
   ATOMIC_SPECIES&lt;br /&gt;
    Mo  95.940      Mo_ONCV_PBE_FR-1.0.upf&lt;br /&gt;
    S    32.065     S_ONCV_PBE_FR-1.1.upf&lt;br /&gt;
   ATOMIC_POSITIONS { crystal }&lt;br /&gt;
 Mo       0.333333333   0.666666667   0.000000000&lt;br /&gt;
 S        0.666666667   0.333333333   0.073413577&lt;br /&gt;
 S        0.666666667   0.333333333  -0.073413577&lt;br /&gt;
  K_POINTS { automatic }&lt;br /&gt;
 6 6 1 0 0 0&lt;br /&gt;
&lt;br /&gt;
Here we are using full relativistic pseudopotentials from the SG-15 database.&lt;br /&gt;
&lt;br /&gt;
We can run it on our machine (for example using 4 MPI tasks) as:&lt;br /&gt;
&lt;br /&gt;
 mpirun -np 4 pw.x -inp mos2.scf &amp;gt; scf.out&lt;br /&gt;
&lt;br /&gt;
== Step 2: nscf calculation for Yambo ==&lt;br /&gt;
&lt;br /&gt;
Copy the QE &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; directory from the scf calculation and run the nscf calculation for any number of empty states, with the correct &amp;lt;code&amp;gt;k&amp;lt;/code&amp;gt;-grid we want to use in Yambo. Here we are using a badly underconverged grid of 6x6x1.&lt;br /&gt;
&lt;br /&gt;
This reciprocal-space grid will also match the momentum transfer &amp;lt;code&amp;gt;q&amp;lt;/code&amp;gt; grid on which excitons and phonons will be defined!&lt;br /&gt;
&lt;br /&gt;
The electronic wavefunctions computed at this step and stored in the new nscf &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; directory will be used both by Yambo and by the electron-phonon code: this is important because using different sets of wavefunctions would lead to a phase mismatch issue in the exciton-phonon matrix elements.&lt;br /&gt;
&lt;br /&gt;
The nscf input &amp;lt;code&amp;gt;mos2.nscf&amp;lt;/code&amp;gt; is&lt;br /&gt;
 &amp;amp;control&lt;br /&gt;
           wf_collect = .true.,&lt;br /&gt;
          calculation = &amp;quot;nscf&amp;quot;,&lt;br /&gt;
            verbosity = &#039;high&#039;,&lt;br /&gt;
           pseudo_dir = &#039;$PSEUDO_DIR&#039;,&lt;br /&gt;
               prefix = &amp;quot;mos2&amp;quot;,&lt;br /&gt;
               outdir = &#039;.&#039;,&lt;br /&gt;
  /&amp;amp;end&lt;br /&gt;
  &amp;amp;system&lt;br /&gt;
              ecutwfc = 100.0,&lt;br /&gt;
          occupations = &#039;fixed&#039;,&lt;br /&gt;
                ibrav = 4,&lt;br /&gt;
            celldm(1) = 5.9000811881,&lt;br /&gt;
            celldm(3) = 6.7795677253,&lt;br /&gt;
                  nat = 3,&lt;br /&gt;
                 ntyp = 2,&lt;br /&gt;
             lspinorb = .true.&lt;br /&gt;
             noncolin = .true.&lt;br /&gt;
                nbnd  = 250&lt;br /&gt;
             assume_isolated = &#039;2D&#039;&lt;br /&gt;
         force_symmorphic = .true.&lt;br /&gt;
  /&amp;amp;end&lt;br /&gt;
  &amp;amp;electrons&lt;br /&gt;
     electron_maxstep = 200,&lt;br /&gt;
          mixing_beta = 0.7,&lt;br /&gt;
             conv_thr = 1.d-08,&lt;br /&gt;
  /&amp;amp;end&lt;br /&gt;
   ATOMIC_SPECIES&lt;br /&gt;
    Mo  95.940      Mo_ONCV_PBE_FR-1.0.upf&lt;br /&gt;
    S    32.065     S_ONCV_PBE_FR-1.1.upf&lt;br /&gt;
   ATOMIC_POSITIONS { crystal }&lt;br /&gt;
 Mo       0.333333333   0.666666667   0.000000000&lt;br /&gt;
 S        0.666666667   0.333333333   0.073413577&lt;br /&gt;
 S        0.666666667   0.333333333  -0.073413577&lt;br /&gt;
  K_POINTS { automatic }&lt;br /&gt;
 6 6 1 0 0 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Again, we run the calculation&lt;br /&gt;
&lt;br /&gt;
 mpirun -np 4 pw.x -inp mos2.nscf &amp;gt; nscf.out&lt;br /&gt;
&lt;br /&gt;
== Step 3: dvscf phonon calculation ==&lt;br /&gt;
&lt;br /&gt;
Now we run the phonon calculation.&lt;br /&gt;
&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; directory from the &#039;&#039;&#039;scf&#039;&#039;&#039; calculation and run &amp;lt;code&amp;gt;ph.x&amp;lt;/code&amp;gt; for a dvscf calculation with a standard &amp;lt;code&amp;gt;q&amp;lt;/code&amp;gt;-grid matching the &amp;lt;code&amp;gt;k&amp;lt;/code&amp;gt;-grid we wanna use in Yambo.&lt;br /&gt;
&lt;br /&gt;
At the end, we will have the &amp;lt;code&amp;gt;_ph0&amp;lt;/code&amp;gt; directory containing the variation of the self-consistent potential, &amp;lt;math&amp;gt;\Delta V_{SCF}(q)&amp;lt;/math&amp;gt;, and the &amp;lt;code&amp;gt;*.dyn&amp;lt;/code&amp;gt; files with the phonon energies and eigenvectors.&lt;br /&gt;
&lt;br /&gt;
NB: one could further refine the phonon energies by enforcing the acoustic sum rule, including non-analytic long-range contributions, interpolating to finer grids... all of this can be done within Quantum ESPRESSO and will not be covered in this version of the tutorial.&lt;br /&gt;
&lt;br /&gt;
The input is &amp;lt;code&amp;gt;mos2.dvscf&amp;lt;/code&amp;gt;:&lt;br /&gt;
 &lt;br /&gt;
 mos2_dvscf&lt;br /&gt;
 &amp;amp;inputph&lt;br /&gt;
   tr2_ph=1.0d-12,&lt;br /&gt;
   verbosity=&#039;high&#039;&lt;br /&gt;
   prefix=&#039;mos2&#039;,&lt;br /&gt;
   fildvscf = &#039;mos2-dvscf&#039;,&lt;br /&gt;
   electron_phonon = &#039;dvscf&#039;,&lt;br /&gt;
   fildyn=&#039;mos2.dyn&#039;,&lt;br /&gt;
   epsil=.false.,&lt;br /&gt;
   ldisp=.true.,&lt;br /&gt;
   recover=.true.,&lt;br /&gt;
   nq1=6,&lt;br /&gt;
   nq2=6,&lt;br /&gt;
   nq3=1&lt;br /&gt;
 /&lt;br /&gt;
&lt;br /&gt;
And now we run as&lt;br /&gt;
&lt;br /&gt;
 nohup mpirun -np 8 ph.x -inp mos2.dvscf &amp;gt; dvscf.out &amp;amp;&lt;br /&gt;
&lt;br /&gt;
This time we use nohup and more processes because this calculation may take some time. It is a good idea to set &amp;lt;code&amp;gt;recover=.true.&amp;lt;/code&amp;gt; as in a real calculation you will easily breach walltime, and in this way you can safely restart.&lt;br /&gt;
&lt;br /&gt;
== Step 4: create Yambo &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; directory ==&lt;br /&gt;
&lt;br /&gt;
This is just the standard Yambo initialization: run &lt;br /&gt;
 &lt;br /&gt;
 p2y &lt;br /&gt;
&lt;br /&gt;
and then &lt;br /&gt;
&lt;br /&gt;
 yambo &lt;br /&gt;
&lt;br /&gt;
in the &#039;&#039;&#039;nscf&#039;&#039;&#039; &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; folder and then move the newly generated &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; directory to a convenient place.&lt;br /&gt;
&lt;br /&gt;
== Step 5: run a BSE calculation ==&lt;br /&gt;
&lt;br /&gt;
Now we switch from QE to Yambo. Here, we forgo the GW step for simplicity (we can use a scissor operator to open the band gap).&lt;br /&gt;
&lt;br /&gt;
This calculation has a couple of differences with respect to a standard BSE calculation for optical absorption. We can look at the input file &amp;lt;code&amp;gt;bse.in&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;# Runlevels&amp;lt;/span&amp;gt;&lt;br /&gt;
 optics                       # [R OPT] Optics&lt;br /&gt;
 rim_cut                      # [R RIM CUT] Coulomb potential&lt;br /&gt;
 bss                          # [R BSS] Bethe Salpeter Equation solver&lt;br /&gt;
 em1s                         # [R Xs] Static Inverse Dielectric Matrix&lt;br /&gt;
 bse                          # [R BSE] Bethe Salpeter Equation.&lt;br /&gt;
 bsk                          # [R BSK] Bethe Salpeter Equation kernel&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;# RIM and cutoff settings&amp;lt;/span&amp;gt;&lt;br /&gt;
 RandQpts=1000000             # [RIM] Number of random q-points in the BZ&lt;br /&gt;
 RandGvec= 100            RL    # [RIM] Coulomb interaction RS components&lt;br /&gt;
 CUTGeo= &amp;quot;slab z&amp;quot;               # [CUT] Coulomb Cutoff geometry: box/cylinder/sphere X/Y/Z/XY..&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;# Static screening&amp;lt;/span&amp;gt;&lt;br /&gt;
 X_and_IO_CPU= &amp;quot;1 1 4 2 1&amp;quot;       # [PARALLEL] CPUs for each role&lt;br /&gt;
 X_and_IO_ROLEs= &amp;quot;q g k c v&amp;quot;      # [PARALLEL] CPUs roles (q,g,k,c,v)&lt;br /&gt;
 X_and_IO_nCPU_LinAlg_INV=-1      # [PARALLEL] CPUs for Linear Algebra (if -1 it is automatically set)&lt;br /&gt;
 Chimod= &amp;quot;hartree&amp;quot;            # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 |  200 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 8000            mRy    # [Xs] Response block size&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;# BSE&amp;lt;/span&amp;gt;&lt;br /&gt;
 BS_CPU= &amp;quot;4.1.2&amp;quot;                   # [PARALLEL] CPUs for each role&lt;br /&gt;
 BS_ROLEs= &amp;quot;k.eh.t&amp;quot;                 # [PARALLEL] CPUs roles (k,eh,t)&lt;br /&gt;
 BS_nCPU_diago=4              # [PARALLEL] CPUs for matrix diagonalization&lt;br /&gt;
 BSEmod= &amp;quot;causal&amp;quot;             # [BSE] resonant/causal/coupling&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSSmod= &amp;quot;d&amp;quot;                  # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 BSENGexx=  40000      mRy    # [BSK] Exchange components&lt;br /&gt;
 ALLGexx                      # [BSS] Force the use use all RL vectors for the exchange part&lt;br /&gt;
 BSENGBlk=  8000       mRy    # [BSK] Screened interaction block size&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Lkind=&amp;quot;full&amp;quot;                  #[BSE,X] bar(default)/full/tilde&amp;lt;/span&amp;gt;&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
 % BEnRange&lt;br /&gt;
   0.00000 |  4.00000 | eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 % BDmRange&lt;br /&gt;
   0.05000 |  0.05000 | eV    # [BSS] Damping range&lt;br /&gt;
 %&lt;br /&gt;
 BEnSteps= 2000               # [BSS] Energy steps&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;% BSEQptR&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 1 | 7 |                     # [BSK] Transferred momenta range&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;%&amp;lt;/span&amp;gt;&lt;br /&gt;
 % BSEBands&lt;br /&gt;
    25 |  28 |                 # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 WRbsWF                      # [BSS] Write to disk excitonic the FWs&lt;br /&gt;
 &lt;br /&gt;
This file was generated using the command: &amp;lt;code&amp;gt; yambo -X s -o b -k sex -y d -r&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First of all, we compute the excitons for all the momenta in the irreducible Brillouin zone for our discrete grid via the &amp;lt;code&amp;gt;BSEQptR&amp;lt;/code&amp;gt; variable. This will be a &#039;&#039;&#039;finite-momentum&#039;&#039;&#039; BSE calculation, analogous to the phonon one.&lt;br /&gt;
&lt;br /&gt;
Second, we change the variable &amp;lt;code&amp;gt;Lkind&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;bar&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;full&amp;lt;/code&amp;gt;. In Yambo, &amp;lt;code&amp;gt;Lkind=&amp;quot;bar&amp;quot;&amp;lt;/code&amp;gt;, which is the default for optical absorption, means that we are computing the excitonic response function without the long-range component of the exchange interaction. This cannot be used when computing the exciton momentum dependence, where the long-range exchange interaction can play a role, therefore we have to include it with &amp;lt;code&amp;gt;Lkind=&amp;quot;full&amp;quot;&amp;lt;/code&amp;gt;. This allows for the calculation of the excitonic longitudinal-transverse splitting (in 3D systems) as well.&lt;br /&gt;
&lt;br /&gt;
We can now run the code:&lt;br /&gt;
&lt;br /&gt;
 nohup mpirun -np 8 yambo -F bse.in -J bse_Lfull -C bse_Lfull &amp;amp;&lt;br /&gt;
&lt;br /&gt;
At the end of the calculation, we have obtained the &amp;lt;code&amp;gt;ndb.BS_diago_Q*&amp;lt;/code&amp;gt; databases inside the directory &amp;lt;code&amp;gt;bse_Lfull&amp;lt;/code&amp;gt;. They contain information on the exciton energies and wavefunctions at each momentum. Do not forget to check the report and logs of your calculation in the same directory to make sure that the code is doing what you want.&lt;br /&gt;
&lt;br /&gt;
== Step 6: obtain the electron-phonon matrix elements ==&lt;br /&gt;
&lt;br /&gt;
We have finished the heavy simulations. Now it&#039;s time for the postprocessing. The first order of business is the reconstruction of the electron-phonon coupling matrix elements from the dvscf results and the electronic wavefunctions.&lt;br /&gt;
&lt;br /&gt;
In order to do this, we will run the &amp;lt;code&amp;gt;lelphc&amp;lt;/code&amp;gt; executable of the &#039;&#039;&#039;LetzElPhC&#039;&#039;&#039; code. We will run via command line using yambopy, although it will be instructive to have look at the &amp;lt;code&amp;gt;lelphc&amp;lt;/code&amp;gt; input files later.&lt;br /&gt;
&lt;br /&gt;
We run in the same directory where the Yambo &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; is (remember than you can also virtually move it with a symbolic link).&lt;br /&gt;
&lt;br /&gt;
Type:&lt;br /&gt;
&lt;br /&gt;
 yambopy l2y&lt;br /&gt;
&lt;br /&gt;
to see the help for the calculation. For example, if we want to do a serial run of LetzElPhC for bands from &amp;lt;math&amp;gt;n_i&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;n_f&amp;lt;/math&amp;gt;, we should type:&lt;br /&gt;
&lt;br /&gt;
 yambopy l2y -ph path/of/ph_input.in -b n_i n_f&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;math&amp;gt;n_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;n_f&amp;lt;/math&amp;gt; are integers representing the initial and final band indices. &lt;br /&gt;
&lt;br /&gt;
These should coincide with those used for the Bethe-Salpeter kernel, i.e. those specified in the &amp;lt;code&amp;gt;BSEBands&amp;lt;/code&amp;gt; variable of the BSE input file (this is not strictly necessary, but certainly efficient since these calculations use a lot of disk space). &lt;br /&gt;
&lt;br /&gt;
For our system, we want to do a parallel calculation with 4 qpools and 2 kpools. In addition, we want to explicitly specify the path of the &amp;lt;code&amp;gt;lelphc&amp;lt;/code&amp;gt; executable and avoid automatically deleting the LetzElPhC data. So we type:&lt;br /&gt;
&lt;br /&gt;
 yambopy l2y -ph path/of/dvscf/mos2.dvscf -b 25 28 -par 4 2 -lelphc path/to/lelphc_exe --debug&lt;br /&gt;
&lt;br /&gt;
At the end, check the &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 ls SAVE/ndb.elph_gkkp*&lt;br /&gt;
&lt;br /&gt;
to see that it has created the Yambo-compatible electron-phonon databases.&lt;br /&gt;
&lt;br /&gt;
If you saved the &amp;lt;code&amp;gt;lelphc.in&amp;lt;/code&amp;gt; input file, you can inspect it:&lt;br /&gt;
&lt;br /&gt;
 # LetzElPhC input for yambo generated by yambopy&lt;br /&gt;
 nqpool      = 2&lt;br /&gt;
 nkpool      = 4&lt;br /&gt;
 start_bnd   = 25&lt;br /&gt;
 end_bnd     = 28&lt;br /&gt;
 save_dir    = ./SAVE&lt;br /&gt;
 kernel      = dfpt&lt;br /&gt;
 ph_save_dir = dvscf/ph_save&lt;br /&gt;
 convention = yambo&lt;br /&gt;
&lt;br /&gt;
You can also run it as it is, but the code will generate the database &amp;lt;code&amp;gt;ndb.elph&amp;lt;/code&amp;gt;. In order to convert it to the &amp;lt;code&amp;gt;ndb.elph_gkkp*&amp;lt;/code&amp;gt; databases of Yambo, you still need a couple of lines of python using the Yambopy class &amp;lt;code&amp;gt;ConvertElectronPhononDB&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;yambopy/letzelph_interface/lelph2y.py&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Notice the variable &amp;lt;code&amp;gt;convention=yambo&amp;lt;/code&amp;gt;: what does it mean? At variance with QE and many other codes, Yambo uses the &amp;quot;backward&amp;quot; momentum transfer convention for electronic scatterings. That is, an electronic transition goes from band &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; and momentum &amp;lt;math&amp;gt;k-q&amp;lt;/math&amp;gt; to band &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; and momentum &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;. In the &amp;quot;forward&amp;quot; momentum transfer convention (the more standard one), the transitions go from &amp;lt;math&amp;gt;nk&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;mk+q&amp;lt;/math&amp;gt;. Therefore, this variable ensures that the electron-phonon coupling matrix elements are computed as &amp;lt;math&amp;gt;\langle mk|dV|nk-q\rangle&amp;lt;/math&amp;gt;. This will have consequences also in the formulation of the &#039;&#039;exciton&#039;&#039;-phonon coupling matrix element.&lt;br /&gt;
&lt;br /&gt;
== Step 7: Obtain the exciton-phonon coupling ==&lt;br /&gt;
&lt;br /&gt;
Now, we can finally access our basic building block for exciton-phonon physics. This could be done entirely in python (using &#039;&#039;&#039;Yambopy&#039;&#039;&#039;), or by running &#039;&#039;&#039;Yambo&#039;&#039;&#039;. In this version of the tutorial we present the latter case.&lt;br /&gt;
&lt;br /&gt;
Our objective is obtaining the following quantity: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{G}^\mu_{\alpha\lambda}(0,q)=\sum_{vv^\prime c k} A^{\alpha, *}_{cv^\prime} (k, q) g_{vv^\prime}^\mu (k,q) A^{\lambda}_{cv}(k,q) - \sum_{cc^\prime vk} A^{\alpha, *}_{c^\prime v} (k+q, q) g_{c^\prime c}^\mu (k+q,q) A^{\lambda}_{cv}(k,q)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, &amp;lt;math&amp;gt;A^{\lambda}_{cv}(k,q)&amp;lt;/math&amp;gt; are the exciton coefficients extracted from the eigenvector of the two-particles Hamiltonian during the BSE calculation in step 5, while &amp;lt;math&amp;gt;g_{nm}^\mu (k,q)&amp;lt;/math&amp;gt; are the electron-phonon coupling matrix elements obtained in step 6. As you can see, the exciton &amp;lt;math&amp;gt;\lambda&amp;lt;/math&amp;gt; undergoes phonon-mediated scattering to state &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt; via phonon mode &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt;. The scattering can happen for the hole (valence, &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;) or for the electron (conduction, &amp;lt;math&amp;gt;c&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
NB: &lt;br /&gt;
&lt;br /&gt;
(1) This is written in the &amp;quot;backward&amp;quot; momentum transfer convention used by Yambo. The momentum dependence is different in the &amp;quot;forward&amp;quot; transfer convention. &lt;br /&gt;
&lt;br /&gt;
(2) For simplicity, this is written for zero initial exciton momentum. This means that one of the two states involved in the phonon-mediated scattering process will be in the optical limit (and possibly an optically generated exciton), while the other state can have any momentum: this momentum will be the same as the phonon one. This matrix element can be used to describe phonon-assisted absorption and emission spectra.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have to write a new yambo input, that we can call &amp;lt;code&amp;gt;excph.in&amp;lt;/code&amp;gt;, for this. You can copy (and adapt) the one below, or you can generate one by running from the command line:&lt;br /&gt;
&lt;br /&gt;
 yambo_ph -excph o&lt;br /&gt;
&lt;br /&gt;
This generates an input to compute luminescence (&amp;quot;o&amp;quot; is for &amp;quot;optics&amp;quot;). The variables that we are interested in are:&lt;br /&gt;
&lt;br /&gt;
 excph                            # [R] Exction-phonon&lt;br /&gt;
 ExcGkkp                          # [R][EXCPH] Exciton-Phonon Matrix Elelements&lt;br /&gt;
 % ELPhExcStates&lt;br /&gt;
  1 | 4 |                             # [EXCPH] Incoming (external) exciton states&lt;br /&gt;
 %&lt;br /&gt;
 % ELPhExcSum&lt;br /&gt;
  1 | 12 |                             # [EXCPH] Outgoing (virtual) exciton states&lt;br /&gt;
 %&lt;br /&gt;
 LoutPath= &amp;quot;./bse_Lfull&amp;quot;                 # [EXCPH] Path of the outgoing L&lt;br /&gt;
 % ElPhModes&lt;br /&gt;
   1 | 9 |                           # [ELPH] Phonon modes included&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
In this input, we have to select the initial exciton states &amp;lt;math&amp;gt;\lambda&amp;lt;/math&amp;gt; with &amp;lt;code&amp;gt;ELPhExcStates&amp;lt;/code&amp;gt;, the final exciton states &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt; with &amp;lt;code&amp;gt;ELPhExcSum&amp;lt;/code&amp;gt; and the phonon modes &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt; with &amp;lt;code&amp;gt;ElPhModes&amp;lt;/code&amp;gt;. Here we consider the first four states at &amp;lt;math&amp;gt;Q=0&amp;lt;/math&amp;gt; (corresponding to just two excitons because they are both doubly degenerate -- do not break degeneracies when selecting states!) and the first twelve states at each finite-&amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; point. We also include all the nine phonon modes of monolayer MoS2.&lt;br /&gt;
&lt;br /&gt;
What about &amp;lt;code&amp;gt;LoutPath&amp;lt;/code&amp;gt;? This variable controls the directory where the databases for the final-state excitons &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt; is located, which can be different from the directory with the initial-state excitons &amp;lt;math&amp;gt;\lambda&amp;lt;/math&amp;gt; read as usual with the &amp;lt;code&amp;gt;-J&amp;lt;/code&amp;gt; option when running the code. This makes it possible to compute the coupling between different exciton kinds. However, for our tutorial, we stick with the previously computed &amp;lt;code&amp;gt;Lfull&amp;lt;/code&amp;gt; in both cases.&lt;br /&gt;
&lt;br /&gt;
When we are satisfied with the input, we run the code using &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 yambo_ph -F excph.in -J excph,bse_Lfull -C excph&lt;br /&gt;
&lt;br /&gt;
If you check the output, you should find the &amp;lt;code&amp;gt;ndb.excph*&amp;lt;/code&amp;gt; databases in the &amp;lt;code&amp;gt;excph&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
=== Analysis of the couplings ===&lt;br /&gt;
&lt;br /&gt;
It is a good idea to have a look at what we computed up to now in order to make sure nothing has gone wrong. &lt;br /&gt;
&lt;br /&gt;
It is not easy to know what to expect (apart from symmetry and gauge compliance of the matrix elements), but one can work out the exciton-phonon selection rules in advance, check that the magnitude is reasonable, etc.&lt;br /&gt;
&lt;br /&gt;
It is also not easy to meaningfully plot this quantity. We have to make sure that we are not breaking degenerate states, otherwise the plots will not be invariant. &lt;br /&gt;
&lt;br /&gt;
First of all, we have to know our system: in monolayer MoS&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, the first four excitons are all doubly degenerate. The first exciton responsible for a bright peak in the absorption spectrum (the &#039;&#039;&#039;A&#039;&#039;&#039; peak), is the second state, corresponding to state indices &amp;lt;code&amp;gt;(3,4)&amp;lt;/code&amp;gt; in fortran indexing or &amp;lt;code&amp;gt;(2,3)&amp;lt;/code&amp;gt; in python indexing. &lt;br /&gt;
&lt;br /&gt;
All these information can be obtained by analyzing the BSE results (this stuff is explained in the BSE tutorials) and by knowledge of the system or class of systems from the literature.&lt;br /&gt;
&lt;br /&gt;
Thus, a good quantity to plot may be the norm of the matrix elements, summed over the degenerate subspace of exciton A, for a certain number of scattered final states mediated by certain phonon modes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;F_A(q)= \sqrt{ \sum_{\alpha \in A,\lambda,\mu} |\mathcal{G}_{\alpha\lambda}^\mu (0,q)|^2 }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to do this, we create a python script &amp;lt;code&amp;gt;analyse_excph.py&amp;lt;/code&amp;gt; in which we first load the excph dabatases using the &amp;lt;code&amp;gt;YamboExcitonPhononDB&amp;lt;/code&amp;gt; from yambopy. &lt;br /&gt;
You can find this script in the yambopy directory, in &amp;lt;code&amp;gt;tutorials/exciton-phonon&amp;lt;/code&amp;gt;. &lt;br /&gt;
First, we select the exciton and phonon states to be included in &amp;lt;code&amp;gt;F_A&amp;lt;/code&amp;gt;, together with the path of databases and plot details:&lt;br /&gt;
&lt;br /&gt;
 # Exciton in states&lt;br /&gt;
 exc_in  = [2,3]     # A: 2,3 -- B: 6,7&lt;br /&gt;
 exc_out = [0,1,2,3] # first 4 states (dispersion of triplet state and A)&lt;br /&gt;
 ph_in  = &#039;all&#039;&lt;br /&gt;
 &lt;br /&gt;
 # Paths of databases&lt;br /&gt;
 ns_db1 =f&#039;{path}/SAVE/ns.db1&#039;&lt;br /&gt;
 ndb_exc=f&#039;{path}/excph&#039;&lt;br /&gt;
 &lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Then, we load the data:&lt;br /&gt;
&lt;br /&gt;
 # Read lattice and k-space info&lt;br /&gt;
 ylat = YamboLatticeDB.from_db_file(filename=ns_db1),Expand=True)&lt;br /&gt;
 print(ylat)&lt;br /&gt;
 &lt;br /&gt;
 # Read exc-ph databases&lt;br /&gt;
 X = YamboExcitonPhononDB(ylat,save_excph=ndb_exc)&lt;br /&gt;
 print(X)&lt;br /&gt;
&lt;br /&gt;
The quantity &amp;lt;math&amp;gt;F_A(q)&amp;lt;/math&amp;gt; is defined inside the plotting function as&lt;br /&gt;
&lt;br /&gt;
 G_squared = excph.excph_sq&lt;br /&gt;
 G2plt = np.zeros(len(G_squared))&lt;br /&gt;
 &lt;br /&gt;
 if exc_in  == &#039;all&#039;: exc_in  = range(G_squared.shape[2])&lt;br /&gt;
 if exc_out == &#039;all&#039;: exc_out = range(G_squared.shape[3])&lt;br /&gt;
 if ph_in   == &#039;all&#039;: ph_in   = range(G_squared.shape[1])&lt;br /&gt;
 &lt;br /&gt;
 G_squared = G_squared[:, ph_in, :, :].sum(axis=(1))&lt;br /&gt;
 G_squared = G_squared[:, exc_in, :].sum(axis=(1))&lt;br /&gt;
 G_squared = G_squared[:, exc_out].sum(axis=(1))&lt;br /&gt;
 &lt;br /&gt;
 F_q = np.sqrt( G_squared )*ha2ev # Switch from Ha to eV&lt;br /&gt;
&lt;br /&gt;
And finally, we have to make a plotting function. For this tutorial we will use the default scatterplot provided by &amp;lt;code&amp;gt;YamboExcitonPhononDB&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 excph.plot_excph(F_q,plt_cbar=plt_cbar,**kwargs)&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
You can get more experience on using Yambopy for these kinds of visualization by following the [https://wiki.yambo-code.eu/wiki/index.php?title=First_steps_in_Yambopy Yambopy tutorials]. In fact, remember that this scripts and all the other yambopy tutorial scripts are just suggestions, not source code written in stone: if you know &amp;lt;code&amp;gt;numpy&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;matplotlib&amp;lt;/code&amp;gt; you can do your own analysis and your own plots, you just need to import the required Yambopy modules to load the data.&lt;br /&gt;
&lt;br /&gt;
In our case, the resulting plot is the following.&lt;br /&gt;
&lt;br /&gt;
[[File:1L MoS2 ExcPh.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
This can be checked against Fig. 2(d) of reference &amp;lt;ref name=&amp;quot;chan2023&amp;quot; /&amp;gt;, although you have to keep in mind that our results are badly undersampled in terms of the reciprocal-space grid, as can be easily seen, and the quantity plotted is not exactly the same. However, the main features are already there since they are dictated mostly by crystal symmetries.&lt;br /&gt;
&lt;br /&gt;
Now that we have the exciton-phonon matrix elements, we can use them to build several kinds of observables. Below, we give an example related to phonon-assisted luminescence, but we may update this tutorial in the future to include more cases.&lt;br /&gt;
&lt;br /&gt;
== Step 8: Compute phonon-assisted luminescence ==&lt;br /&gt;
&lt;br /&gt;
[[File:Luminescence scheme.png|250px|right]]&lt;br /&gt;
&lt;br /&gt;
We want to compute the experimental optical signature due to the phonon-assisted recombination of an exciton (as sketched in the figure).&lt;br /&gt;
&lt;br /&gt;
The signal from the phonon replicas can be modeled as a second-order scattering process involving one phonon and one photon:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;I^{(1)}_{PL}(\omega;T) \propto \frac{1}{N_q}\sum_{ s \mu \beta q} \left|\sum_\lambda\frac{D_\lambda \mathcal{G}^{\mu q}_{\alpha q,\lambda}}{E_{\alpha q}-E_\lambda -s\Omega_{\mu q}} \right|^2 N_{\alpha q}(T_{exc}) F^s_{\mu q}(T)\delta(\omega - \left[E_{\alpha q}-s\Omega_{\mu q}\right])&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this equation, the oscillator strength of the peak is given by the exciton-phonon coupling matrix elements &amp;lt;math&amp;gt;\mathcal{G}&amp;lt;/math&amp;gt; multiplied by the exciton dipoles &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (they are called &amp;quot;residuals&amp;quot; in Yambo). Here &amp;lt;math&amp;gt;E_\lambda&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;E_{\alpha q}&amp;lt;/math&amp;gt; are the energies of the optical and finite-momentum excitons, respectively, while &amp;lt;math&amp;gt;\Omega_{\mu q}&amp;lt;/math&amp;gt; are the phonon energies. &lt;br /&gt;
&lt;br /&gt;
The occupation function &amp;lt;math&amp;gt;F&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;F^s_{\mu q}(T)=n_{\mu q}(T)+\frac{1+s}{2}&amp;lt;/math&amp;gt;. Here, &amp;lt;math&amp;gt;n(T)&amp;lt;/math&amp;gt; is the temperature-dependent phonon Bose-Einstein occupation function. As it can be seen, &amp;lt;math&amp;gt;s=1&amp;lt;/math&amp;gt; corresponds to processes of phonon &#039;&#039;emission&#039;&#039; (&amp;lt;math&amp;gt;\propto n(T)+1&amp;lt;/math&amp;gt;), while &amp;lt;math&amp;gt;s=-1&amp;lt;/math&amp;gt; corresponds to processes of phonon &#039;&#039;absorption&#039;&#039; (&amp;lt;math&amp;gt;\propto n(T)&amp;lt;/math&amp;gt;). Therefore, &amp;lt;math&amp;gt;I^{(1)}_{PL}(\omega;T)&amp;lt;/math&amp;gt; describes &#039;&#039;light&#039;&#039; emission by recombining excitons mediated by either &#039;&#039;phonon&#039;&#039; absorption or emission. &lt;br /&gt;
&lt;br /&gt;
The quantity &amp;lt;math&amp;gt; N_{\alpha q}(T_{exc})&amp;lt;/math&amp;gt; is the exciton occupation function. Luminescence is technically an out-of-equilibrium process, but we can assume that for very low density of excitations and in steady-state conditions, the exciton population can be approximately described by an equilibrium distribution evaluated at an effective temperature. Here, we use the Boltzmann distribution. Experimentally, &amp;lt;math&amp;gt;T_{exc}&amp;lt;/math&amp;gt; tends to coincide with the lattice temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; more or less above 100 K, while at very low temperature (&amp;lt; 10 K), &amp;lt;math&amp;gt;T_{exc}&amp;lt;/math&amp;gt; may vary between 10-50 K. It goes without saying that this needs to carefully be checked in your realistic calculations.&lt;br /&gt;
&lt;br /&gt;
=== Running the jobs ===&lt;br /&gt;
&lt;br /&gt;
In order to study luminescence in a paradigmatic system, we switch to bulk hexagonal boron nitride and we repeat the workflow. As you can easily see, one can think about automatizing the execution of all these calculations via scripting or more advanced tools. However, in the case of very large simulations (memory-limited or disk-space limited) or for systems whose electronic and lattice properties are fragile with respect to tiny calculation details, one must be very careful and run many basic tests.&lt;br /&gt;
&lt;br /&gt;
Fortunately, we are running a fast underconverged example. We use LDA pseudopotentials from the pseudo-dojo library and the following are the calculations steps.&lt;br /&gt;
&lt;br /&gt;
1. Input &amp;lt;code&amp;gt;hbn.scf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;control&lt;br /&gt;
     calculation=&#039;scf&#039;,&lt;br /&gt;
     prefix=&#039;hBN&#039;,&lt;br /&gt;
     restart_mode=&#039;from_scratch&#039;&lt;br /&gt;
     pseudo_dir = &#039;$PSEUDO_DIR&#039;,&lt;br /&gt;
     outdir = &#039;./tmp&#039;&lt;br /&gt;
     verbosity = &#039;high&#039;&lt;br /&gt;
     wf_collect=.true.&lt;br /&gt;
 /&lt;br /&gt;
 &amp;amp;system&lt;br /&gt;
     ibrav = 4,&lt;br /&gt;
     celldm(1) = 4.703675849&lt;br /&gt;
     celldm(3) = 2.603711434&lt;br /&gt;
     nat= 4,&lt;br /&gt;
     ntyp= 2,&lt;br /&gt;
     force_symmorphic=.true.&lt;br /&gt;
     ecutwfc = 100,&lt;br /&gt;
 /&lt;br /&gt;
 &amp;amp;electrons&lt;br /&gt;
   diago_david_ndim = 2&lt;br /&gt;
   diago_full_acc=.true.&lt;br /&gt;
   diago_thr_init=5.0e-6&lt;br /&gt;
   mixing_mode = &#039;plain&#039;&lt;br /&gt;
   mixing_beta = 0.7&lt;br /&gt;
   conv_thr =  1.0d-16&lt;br /&gt;
 /&lt;br /&gt;
 ATOMIC_SPECIES&lt;br /&gt;
  B 10.81100  B_LDA_dojo.UPF&lt;br /&gt;
  N 14.00674  N_LDA_dojo.UPF&lt;br /&gt;
 ATOMIC_POSITIONS {crystal}&lt;br /&gt;
 N             0.6666666670        0.3333333330        -0.250000000000&lt;br /&gt;
 B             0.3333333330        0.6666666670        -0.250000000000&lt;br /&gt;
 B             0.6666666670        0.3333333330        0.25000000000&lt;br /&gt;
 N             0.3333333330        0.6666666670        0.25000000000&lt;br /&gt;
 K_POINTS {automatic}&lt;br /&gt;
 6 6 2 0 0 0&lt;br /&gt;
&lt;br /&gt;
 mpirun -np 4 pw.x -inp hbn.scf &amp;gt; scf.out&lt;br /&gt;
&lt;br /&gt;
2. Input &amp;lt;code&amp;gt;hbn.nscf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;control&lt;br /&gt;
     calculation=&#039;nscf&#039;,&lt;br /&gt;
     prefix=&#039;hBN&#039;,&lt;br /&gt;
     restart_mode=&#039;from_scratch&#039;&lt;br /&gt;
     pseudo_dir = &#039;$PSEUDO_DIR&#039;&lt;br /&gt;
     outdir = &#039;./&#039;&lt;br /&gt;
     verbosity = &#039;high&#039;&lt;br /&gt;
     wf_collect=.true.&lt;br /&gt;
 /&lt;br /&gt;
 &amp;amp;system&lt;br /&gt;
     ibrav = 4,&lt;br /&gt;
     celldm(1) = 4.703675849&lt;br /&gt;
     celldm(3) = 2.603711434&lt;br /&gt;
     nat= 4,&lt;br /&gt;
     ntyp= 2,&lt;br /&gt;
     force_symmorphic=.true.&lt;br /&gt;
     ecutwfc = 100,&lt;br /&gt;
 	nbnd = 120&lt;br /&gt;
 /&lt;br /&gt;
 &amp;amp;electrons&lt;br /&gt;
   diago_david_ndim = 2&lt;br /&gt;
   diago_full_acc=.true.&lt;br /&gt;
   diago_thr_init=5.0e-6&lt;br /&gt;
   mixing_mode = &#039;plain&#039;&lt;br /&gt;
   mixing_beta = 0.7&lt;br /&gt;
   conv_thr =  1.0d-16&lt;br /&gt;
 /&lt;br /&gt;
 ATOMIC_SPECIES&lt;br /&gt;
  B 10.81100  B_LDA_dojo.UPF&lt;br /&gt;
  N 14.00674  N_LDA_dojo.UPF&lt;br /&gt;
 ATOMIC_POSITIONS {crystal}&lt;br /&gt;
 N             0.6666666670        0.3333333330        -0.250000000000&lt;br /&gt;
 B             0.3333333330        0.6666666670        -0.250000000000&lt;br /&gt;
 B             0.6666666670        0.3333333330        0.25000000000&lt;br /&gt;
 N             0.3333333330        0.6666666670        0.25000000000&lt;br /&gt;
 K_POINTS {automatic}&lt;br /&gt;
 6 6 2 0 0 0&lt;br /&gt;
&lt;br /&gt;
 mpirun -np 4 pw.x -inp hbn.nscf &amp;gt; nscf.out&lt;br /&gt;
&lt;br /&gt;
3. Input &amp;lt;code&amp;gt;hbn.dvscf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 hbn_dvscf&lt;br /&gt;
 &amp;amp;inputph&lt;br /&gt;
   tr2_ph=1.0d-12,&lt;br /&gt;
   verbosity=&#039;high&#039;&lt;br /&gt;
   prefix=&#039;hBN&#039;,&lt;br /&gt;
   fildvscf = &#039;hBN-dvscf&#039;,&lt;br /&gt;
   electron_phonon = &#039;dvscf&#039;,&lt;br /&gt;
   fildyn=&#039;hBN.dyn&#039;,&lt;br /&gt;
   epsil=.false.,&lt;br /&gt;
   ldisp=.true.,&lt;br /&gt;
   recover=.true.,&lt;br /&gt;
   nq1=6,&lt;br /&gt;
   nq2=6,&lt;br /&gt;
   nq3=2&lt;br /&gt;
 /&lt;br /&gt;
&lt;br /&gt;
 nohup mpirun -np 8 pw.x -inp hbn.dvscf &amp;gt; dvscf.out &amp;amp;&lt;br /&gt;
&lt;br /&gt;
4. Input &amp;lt;code&amp;gt;bse.in&amp;lt;/code&amp;gt; (we include 2 valence and 2 conduction bands):&lt;br /&gt;
&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 em1s&lt;br /&gt;
 DIP_CPU= &amp;quot;1 8 1&amp;quot;                      # [PARALLEL] CPUs for each role&lt;br /&gt;
 DIP_ROLEs= &amp;quot;k c v&amp;quot;                    # [PARALLEL] CPUs roles (k,c,v)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_and_IO_CPU= &amp;quot;1 1 1 8 1&amp;quot;                 # [PARALLEL] CPUs for each role&lt;br /&gt;
 X_and_IO_ROLEs= &amp;quot;q g k c v&amp;quot;               # [PARALLEL] CPUs roles (q,g,k,c,v)&lt;br /&gt;
 X_and_IO_nCPU_LinAlg_INV=-1      # [PARALLEL] CPUs for Linear Algebra (if -1 it is automatically set)&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 BS_CPU= &amp;quot;8 1 1&amp;quot;                       # [PARALLEL] CPUs for each role&lt;br /&gt;
 BS_ROLEs= &amp;quot;k eh t&amp;quot;                     # [PARALLEL] CPUs roles (k,eh,t)&lt;br /&gt;
 BS_nCPU_LinAlg_INV=-1            # [PARALLEL] CPUs for Linear Algebra (if -1 it is automatically set)&lt;br /&gt;
 BS_nCPU_LinAlg_DIAGO=-1          # [PARALLEL] CPUs for Linear Algebra (if -1 it is automatically set)&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions&lt;br /&gt;
 % QpntsRXs&lt;br /&gt;
    1 | 14 |                         # [Xs] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 120 |                         # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 10                Ry    # [Xs] Response block size&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Lkind= &amp;quot;Lfull&amp;quot;                    # [BSE] Lbar (default) / full&amp;lt;/span&amp;gt;&lt;br /&gt;
 BSSmod= &amp;quot;d&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 % DipBands&lt;br /&gt;
    1 | 120 |                         # [DIP] Bands range for dipoles&lt;br /&gt;
 %&lt;br /&gt;
 DipApproach= &amp;quot;G-space v&amp;quot;         # [DIP] [G-space v/R-space x/Covariant/Shifted grids]&lt;br /&gt;
 DipComputed= &amp;quot;R V P&amp;quot;             # [DIP] [default R P V; extra P2 Spin Orb]&lt;br /&gt;
 BSENGexx= 30000            Ry    # [BSK] Exchange components&lt;br /&gt;
 #ALLGexx                       # [BSS] Force the use use all RL vectors for the exchange part&lt;br /&gt;
 BSENGBlk=  9000            Ry    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  1.25997 | 1.08816 | 1.12683 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;% BSEQptR&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 1 | 14 |                     # [BSK] Transferred momenta range&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;%&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;% BSEBands&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;   7 | 10 |                         # [BSK] Bands range&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;%&amp;lt;/span&amp;gt;&lt;br /&gt;
 % BEnRange&lt;br /&gt;
   0.50000 | 8.00000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.050000 | 0.050000 |         eV    # [BSS] Damping range&lt;br /&gt;
 %&lt;br /&gt;
 BEnSteps= 1000                    # [BSS] Energy steps&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 1.000000 | 0.000000 |        # [BSS] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 WRbsWF                        # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
 nohup mpirun -np 8 yambo -F bse.in -J bse_Lfull -C bse_Lfull &amp;amp;&lt;br /&gt;
&lt;br /&gt;
Importantly, since we want to describe the phonon-assisted recombination process of an *optical* exciton (i.e., emitting a transverse photon), this time we also run an additional calculation at `Q=0` omitting the nonanalytic long-range Coulomb exchange. Make a second input &amp;lt;code&amp;gt;bse_Lbar.in&amp;lt;/code&amp;gt; with the following changes: &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Lkind= &amp;quot;Lbar&amp;quot;                    # [BSE] Lbar (default) / full&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;% BSEQptR&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 1 | 1 |                     # [BSK] Transferred momenta range&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;%&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4b. So now we make a second BSE run in a different directory specified by &amp;lt;code&amp;gt;-J&amp;lt;/code&amp;gt;. Here, we also pass to yambo the directory of the previous run as it includes the important screening databases &amp;lt;code&amp;gt;ndb.em1s*&amp;lt;/code&amp;gt; that we do not want to recompute from scratch.&lt;br /&gt;
 &lt;br /&gt;
 mpirun -np 8 yambo -F bse_Lbar.in -J bse_Lbar,bse_Lfull -C bse_Lbar&lt;br /&gt;
&lt;br /&gt;
5. Now we run &amp;lt;code&amp;gt;lelphc&amp;lt;/code&amp;gt; with yambopy to get the el-ph matrix elements:&lt;br /&gt;
&lt;br /&gt;
 yambopy l2y -ph path/of/dvscf/hbn.dvscf -b 7 10 -par 4 2 &lt;br /&gt;
&lt;br /&gt;
6. And finally we generate the exciton-phonon input &amp;lt;code&amp;gt;excph.in&amp;lt;/code&amp;gt; using &amp;lt;code&amp;gt;yambo_ph -excph o&amp;lt;/code&amp;gt;. Now, we take a look at all the additional variables that we didn&#039;t check before, specifying also the details for luminescence the spectrum calculation.&lt;br /&gt;
&lt;br /&gt;
 excph                            # [R] Exction-phonon&lt;br /&gt;
 ExcGkkp                          # [R][EXCPH] Exciton-Phonon Matrix Elelements&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;ExcPhOptics                      # [R][EXCPH] Exciton-Phonon Optics&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;BoseTemp=10.000000         Kn    # Bosonic Temperature&amp;lt;/span&amp;gt; &lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;EXCTemp= 10.000000          Kn    # [EXCPH] Excitonic Temperature (for luminescence spectra)&amp;lt;/span&amp;gt;&lt;br /&gt;
 % ELPhExcStates&lt;br /&gt;
  1 | 4 |                             # [EXCPH] Incoming (external) exciton states&lt;br /&gt;
 %&lt;br /&gt;
 % ELPhExcSum&lt;br /&gt;
  1 | 12 |                             # [EXCPH] Outgoing (virtual) exciton states&lt;br /&gt;
 %&lt;br /&gt;
 % ElPhModes&lt;br /&gt;
  1 | 12 |                           # [ELPH] Phonon modes included&lt;br /&gt;
 %&lt;br /&gt;
 LoutPath= &amp;quot;./bse-L_full&amp;quot;                 # [EXCPH] Path of the outgoing L&lt;br /&gt;
 FANdEtresh= 0.100000E-5    eV    # [ELPH] Energy treshold for Fan denominator&lt;br /&gt;
 EXCPHdEtresh= 0.100000E-5  eV    # [ELPH] Energy treshold for exc-ph denominator&lt;br /&gt;
 LDamping= 0.500000E-3      eV    # [EXCPH] Damping of exc-ph self-energy&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;# These are the plot parameters, same as in other parts of yambo&amp;lt;/span&amp;gt; &lt;br /&gt;
 % EnRngeXd&lt;br /&gt;
   4.00000 | 5.00000 |         eV    # [Xd] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 % DmRngeXd&lt;br /&gt;
  0.00500000 | 0.00500000 |         eV    # [Xd] Damping range&lt;br /&gt;
 %&lt;br /&gt;
 ETStpsXd= 4000                    # [Xd] Total Energy steps&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;code&amp;gt;BoseTemp&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;EXCTemp&amp;lt;/code&amp;gt; are the lattice and excitonic temperature, respectively.&lt;br /&gt;
&lt;br /&gt;
Now we run the calculation with &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt;. Here, we read as &amp;lt;math&amp;gt;Q=0&amp;lt;/math&amp;gt; excitons with &amp;lt;code&amp;gt;-J&amp;lt;/code&amp;gt; the ones without the long-range Coulomb exchange:&lt;br /&gt;
&lt;br /&gt;
 yambo_ph -F excph.in -J excph,bse_Lbar -C excph&lt;br /&gt;
&lt;br /&gt;
and we find our outputs in the &amp;lt;code&amp;gt;excph&amp;lt;/code&amp;gt; directory. &lt;br /&gt;
&lt;br /&gt;
NB: Step 6 could have been equivalently run in yambopy, limiting the use of the yambo code to just step 4. This latter option is more flexible, as it allows for a greater degree of control by the user. We are in the last stages of the development and it will be available soon.&lt;br /&gt;
&lt;br /&gt;
=== Results ===&lt;br /&gt;
&lt;br /&gt;
If we check the output directory from the step 6 calculation, we find the &amp;lt;code&amp;gt;o-excph.pl_bse_ph_ass&amp;lt;/code&amp;gt; output files containing the luminescence spectra. We can plot them with gnuplot or any other tool:&lt;br /&gt;
&lt;br /&gt;
 gnuplot&lt;br /&gt;
 &amp;gt; set xrange[4.2:5]&lt;br /&gt;
 &amp;gt; p &#039;o-excph.pl_bse_ph_ass&#039; u 1:2 w l lc rgb &#039;red&#039; lw 3&lt;br /&gt;
&lt;br /&gt;
[[File:Luminescence plot.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
Here, the signal corresponds to a finite-momentum exciton that recombines with the help of several different phonon modes, both optical and acoustic. Each phonon mode whose coupling with the exciton is allowed can generate a peak, and the energy shifts of these peaks with respect to the initial exciton energy correspond to the phonon energies. This result is underconverged, but the main features are all there. In the plot, we show a more converged example using a 12x12x4 grid (all the other parameters being equal). These plots can be compared with Fig. 4(a) of reference &amp;lt;ref name=&amp;quot;zanfrognini2023&amp;quot; /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;toyozawa2003&amp;quot; &amp;gt;[https://m.booksee.org/book/1121964?force_lang=en Optical processes in solids], Toyozawa, Yutaka, and Chris Oxlade. Cambridge University Press, (2003). &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;lechifflart2023&#039;&amp;gt;P. Lechifflart, F. Paleari, D. Sangalli, C. Attaccalite, &#039;&#039;First-principles study of luminescence in hexagonal boron nitride single layer: Exciton-phonon coupling and the role of substrate&#039;&#039;, &lt;br /&gt;
[https://doi.org/10.1103/PhysRevMaterials.7.024006 Phys. Rev. M, &#039;&#039;&#039;7&#039;&#039;&#039; (2), 024006 (2023)]; [https://arxiv.org/abs/2212.10407 arXiv2212.1047]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;cannuccia2019&#039;&amp;gt;E. Cannuccia, B. Monserrat and C. Attaccalite, &#039;&#039;Theory of phonon-assisted luminescence in solids: Application to hexagonal boron nitride&#039;&#039;, [https://doi.org/10.1103/PhysRevB.99.081109 Phys. Rev. B &#039;&#039;&#039;99&#039;&#039;&#039;, 081109(R) (2019)]; [https://arxiv.org/abs/1807.11797 arXiv1807.11797]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;paleari2019&#039;&amp;gt;F. Paleari et al., &#039;&#039;Exciton-Phonon Coupling in the Ultraviolet Absorption and Emission Spectra of Bulk Hexagonal Boron Nitride&#039;&#039;, [https://doi.org/10.1103/PhysRevLett.122.187401 Phys. Rev. Lett. &#039;&#039;&#039;122&#039;&#039;&#039;, 187401 (2019)]; [https://arxiv.org/abs/1810.08976 arXiv1810.089776] &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;chen2020&#039;&amp;gt;&#039;&#039;Exciton-Phonon Interaction and Relaxation Times from First Principles&#039;&#039;,&lt;br /&gt;
Hsiao-Yi Chen, Davide Sangalli, and Marco Bernardi, [https://doi.org/10.1103/PhysRevLett.125.107401  Phys. Rev. Lett. &#039;&#039;&#039;125&#039;&#039;&#039;, 107401 (2020)]; [https://arxiv.org/abs/2002.08913 arXiv 2002.08913 (2020)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;lechifflart2023_PhD&amp;quot;&amp;gt;[https://www.yambo-code.eu/wiki/images/5/54/These_final.pdf Exciton-phonon coupling and phonon-assisted luminescence in hexagonal Boron Nitride nanostructures], PhD Thesis, Pierre Lechifflart (2023)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;paleari2019_PhD&#039;&amp;gt;F. Paleari, &#039;&#039;First-principles approaches to the description of indirect absorption and luminescence spectroscopy: exciton-phonon coupling in hexagonal boron nitride&#039;&#039;, [https://wwwen.uni.lu/research/fstm/dphyms/people/fulvio_paleari PhD thesis, University of Luxembourg (2019)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;zanfrognini2023&#039;&amp;gt;[https://arxiv.org/abs/2305.17554 Distinguishing different stackings in layered materials via luminescence spectroscopy], M. Zanfrognini et al. Phys. Rev. Lett. &#039;&#039;&#039;131&#039;&#039;&#039;, 206902 (2023) &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;marini2024&#039;&amp;gt;G. Marini, M. Calandra, P. Cudazzo, &#039;&#039;Optical absorption and photoluminescence of single layer boron nitride from a first principles cumulant approach&#039;&#039;, [https://doi.org/10.1021/acs.nanolett.4c00669 Nano Lett., &#039;&#039;&#039;24&#039;&#039;&#039;, 20, 6017 (2024)]; [https://arxiv.org/abs/2402.03826 arXiv 2402.03826 (2024)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;antonius2017&#039;&amp;gt;G. Antonius, S. G. Louie, &#039;&#039;Theory of exciton-phonon coupling&#039;&#039;, [https://doi.org/10.1103/PhysRevB.105.085111 Phys. Rev. B, &#039;&#039;&#039;105&#039;&#039;&#039;, 085111 (2022)]; [https://arxiv.org/abs/1705.04245 arXiv1705.04245 (2017)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;paleari2022&#039;&amp;gt; F. Paleari, and A. Marini, &#039;&#039;Exciton-phonon interaction calls for a revision of the “exciton” concept&#039;&#039;, [Phys. Rev. B, &#039;&#039;&#039;106&#039;&#039;&#039;, 125403 (2022) https://doi.org/10.1103/PhysRevB.106.125403]; [https://arxiv.org/abs/2205.02783 arXiv 2205.02783]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;cudazzo2020&#039;&amp;gt; P. Cudazzo, &#039;&#039;First-principles description of the exciton-phonon interaction: A cumulant approach&#039;&#039;, [https://doi.org/10.1103/PhysRevB.102.045136 Phys. Rev. B, &#039;&#039;&#039;102&#039;&#039;&#039;, 045136 (2020)]; [https://orbilu.uni.lu/bitstream/10993/44769/1/main.pdf Open access pdf from Luxembourg University]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;chan2023&#039;&amp;gt;Y-h Chan, J. B. Haber, M. H. Naik, J. B. Neaton, D. Y. Qiu, F. H. da Jornada, S. G. Louie, &#039;&#039;Exciton Lifetime and Optical Line Width Profile via Exciton–Phonon Interactions: Theory and First-Principles Calculations for Monolayer MoS2&#039;&#039;, [https://doi.org/10.1021/acs.nanolett.3c00732 Nano Lett., &#039;&#039;&#039;23&#039;&#039;&#039;, 9 (2023)]; [https://arxiv.org/abs/2212.08451 arXiv 2212.08451 (2023)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;murali2025&#039;&amp;gt;M. Nalabothula, S. Reichardt, L. Wirtz, &#039;&#039;Origin of Interlayer Exciton–Phonon Coupling in 2D Heterostructures&#039;&#039;, [https://doi.org/10.1021/acs.nanolett.5c00355 Nano Lett., &#039;&#039;&#039;25&#039;&#039;&#039;, 15 (2025)], [https://arxiv.org/abs/2407.16111 arXiv 2407.16111 (2025)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Exciton-phonon_coupling_and_luminescence&amp;diff=9121</id>
		<title>Exciton-phonon coupling and luminescence</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Exciton-phonon_coupling_and_luminescence&amp;diff=9121"/>
		<updated>2025-09-22T11:33:39Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Tdgw-phonon-usc-01-1024x829.jpg| 400px | right]]&lt;br /&gt;
&lt;br /&gt;
In this advanced tutorial, we will calculate exciton-phonon interactions from first principles by interfacing DFPT (for phonon calculations) and BSE (for exciton calculations).&lt;br /&gt;
&lt;br /&gt;
The DFTP calculations are run with Quantum ESPRESSO, while the many-body GW-BSE calculations are run with Yambo. Finally, the exciton-phonon interaction will be obtained by combining and postprocessing the databases computed in the two previous runs. The great advantage of this workflow is that the calculations can be run in the irreducible Brillouin zones both for the electronic momenta (&amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;) and the transfer momenta (&amp;lt;math&amp;gt;Q&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt;) of excitons and phonons, thus speeding up considerably the jobs while reducing the IO and memory load.&lt;br /&gt;
&lt;br /&gt;
We will first compute the exciton-phonon coupling matrix elements: these are the building blocks needed to construct experimental observables such as phonon-assisted optical spectra (such as luminescence), Raman spectra and exciton lifetimes. We will do this in the case of monolayer MoS2, a 2D system with large spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
As an example of application, we will consider the case of phonon-assisted luminescence. We will do this in the case of bulk hBN, a layered indirect insulator with strong electron-phonon coupling.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; this tutorial will be updated when new exc-ph tools become available in Yambopy (including full-python postprocessing, Raman spectra, interpolated lifetimes, etc).&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This is an advanced topic: we assume that you already know something about the theory&amp;lt;ref name=&amp;quot;toyozawa2003&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;antonius2017&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;cudazzo2020&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;paleari2019_PhD&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;paleari2022&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;lechifflart2023_PhD&amp;quot; /&amp;gt; and applications&amp;lt;ref name=&amp;quot;paleari2019&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;cannuccia2019&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;chen2020&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;zanfrognini2023&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;lechifflart2023&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;chan2023&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;marini2024&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;murali2025&amp;quot; /&amp;gt; of exciton-phonon physics. &lt;br /&gt;
&lt;br /&gt;
Also, we assume that you already know how to run both a basic &#039;&#039;&#039;Yambo&#039;&#039;&#039; GW-BSE calculation and a DFPT phonon calculation with &#039;&#039;&#039;Quantum ESPRESSO&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Besides the QE executables &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ph.x&amp;lt;/code&amp;gt;, we also use the yambo phonon-specific executable &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt; and the python utility &#039;&#039;&#039;Yambopy&#039;&#039;&#039;. The auxiliary code &#039;&#039;&#039;LetzElPhC&#039;&#039;&#039; (executable &amp;lt;code&amp;gt;lelphc&amp;lt;/code&amp;gt;) will be used to obtain the electron-phonon matrix elements by reading the same electronic wavefunctions used by Yambo (and stored in the &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; directory), while also making full use of crystal symmetries. LetzElPhC (link) will be run by Yambopy, but it must nonetheless be installed. Finally, the exciton-phonon properties can be computed either using &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt; or using Yambopy itself.&lt;br /&gt;
&lt;br /&gt;
[[File:Workflow scheme.png|800px|center]]&lt;br /&gt;
&lt;br /&gt;
== Step 0: Pseudopotentials, equilibrium structure and convergence ==&lt;br /&gt;
&lt;br /&gt;
In a real calculation, it is important to ensure that both the pseudopotential and the lattice parameters that we are using are compatible and perform well for the electronic excited states and for the lattice vibrations simultaneously. Furthermore, you have to make sure that the wave function cutoff &amp;lt;code&amp;gt;ecutwfc&amp;lt;/code&amp;gt; is converged with respect to the DFPT step and not just to the DFT one. This is in addition to the other customary convergence tests for DFT, DFPT, GW and BSE calculations.&lt;br /&gt;
&lt;br /&gt;
This is often the most time-demanding step when starting on a new system.&lt;br /&gt;
&lt;br /&gt;
For the sake of this tutorial, we assume that we have already done all these tests and we are starting the final workflow to get the exciton-phonon properties.&lt;br /&gt;
&lt;br /&gt;
== Step 1: scf calculation ==&lt;br /&gt;
&lt;br /&gt;
First of all, we run a standard scf calculation with &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; for Yambo. We stick with non-symmorphic symmetries. At the end, we will have the QE &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
This is the input &amp;lt;code&amp;gt;mos2.scf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;control&lt;br /&gt;
           wf_collect = .true.,&lt;br /&gt;
          calculation = &amp;quot;scf&amp;quot;,&lt;br /&gt;
            verbosity = &#039;high&#039;,&lt;br /&gt;
           pseudo_dir = &#039;$PSEUDO_DIR&#039;,&lt;br /&gt;
               prefix = &amp;quot;mos2&amp;quot;,&lt;br /&gt;
               outdir = &#039;.&#039;,&lt;br /&gt;
  /&amp;amp;end&lt;br /&gt;
  &amp;amp;system&lt;br /&gt;
              ecutwfc = 100.0,&lt;br /&gt;
          occupations = &#039;fixed&#039;,&lt;br /&gt;
                ibrav = 4,&lt;br /&gt;
            celldm(1) = 5.9000811881,&lt;br /&gt;
            celldm(3) = 6.7795677253,&lt;br /&gt;
                  nat = 3,&lt;br /&gt;
                 ntyp = 2,&lt;br /&gt;
             lspinorb = .true.&lt;br /&gt;
             noncolin = .true.&lt;br /&gt;
             assume_isolated = &#039;2D&#039;&lt;br /&gt;
         force_symmorphic = .true.&lt;br /&gt;
  /&amp;amp;end&lt;br /&gt;
  &amp;amp;electrons&lt;br /&gt;
     electron_maxstep = 200,&lt;br /&gt;
          mixing_beta = 0.7,&lt;br /&gt;
             conv_thr = 1.d-08,&lt;br /&gt;
  /&amp;amp;end&lt;br /&gt;
   ATOMIC_SPECIES&lt;br /&gt;
    Mo  95.940      Mo_ONCV_PBE_FR-1.0.upf&lt;br /&gt;
    S    32.065     S_ONCV_PBE_FR-1.1.upf&lt;br /&gt;
   ATOMIC_POSITIONS { crystal }&lt;br /&gt;
 Mo       0.333333333   0.666666667   0.000000000&lt;br /&gt;
 S        0.666666667   0.333333333   0.073413577&lt;br /&gt;
 S        0.666666667   0.333333333  -0.073413577&lt;br /&gt;
  K_POINTS { automatic }&lt;br /&gt;
 6 6 1 0 0 0&lt;br /&gt;
&lt;br /&gt;
Here we are using full relativistic pseudopotentials from the SG-15 database.&lt;br /&gt;
&lt;br /&gt;
We can run it on our machine (for example using 4 MPI tasks) as:&lt;br /&gt;
&lt;br /&gt;
 mpirun -np 4 pw.x -inp mos2.scf &amp;gt; scf.out&lt;br /&gt;
&lt;br /&gt;
== Step 2: nscf calculation for Yambo ==&lt;br /&gt;
&lt;br /&gt;
Copy the QE &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; directory from the scf calculation and run the nscf calculation for any number of empty states, with the correct &amp;lt;code&amp;gt;k&amp;lt;/code&amp;gt;-grid we want to use in Yambo. Here we are using a badly underconverged grid of 6x6x1.&lt;br /&gt;
&lt;br /&gt;
This reciprocal-space grid will also match the momentum transfer &amp;lt;code&amp;gt;q&amp;lt;/code&amp;gt; grid on which excitons and phonons will be defined!&lt;br /&gt;
&lt;br /&gt;
The electronic wavefunctions computed at this step and stored in the new nscf &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; directory will be used both by Yambo and by the electron-phonon code: this is important because using different sets of wavefunctions would lead to a phase mismatch issue in the exciton-phonon matrix elements.&lt;br /&gt;
&lt;br /&gt;
The nscf input &amp;lt;code&amp;gt;mos2.nscf&amp;lt;/code&amp;gt; is&lt;br /&gt;
 &amp;amp;control&lt;br /&gt;
           wf_collect = .true.,&lt;br /&gt;
          calculation = &amp;quot;nscf&amp;quot;,&lt;br /&gt;
            verbosity = &#039;high&#039;,&lt;br /&gt;
           pseudo_dir = &#039;$PSEUDO_DIR&#039;,&lt;br /&gt;
               prefix = &amp;quot;mos2&amp;quot;,&lt;br /&gt;
               outdir = &#039;.&#039;,&lt;br /&gt;
  /&amp;amp;end&lt;br /&gt;
  &amp;amp;system&lt;br /&gt;
              ecutwfc = 100.0,&lt;br /&gt;
          occupations = &#039;fixed&#039;,&lt;br /&gt;
                ibrav = 4,&lt;br /&gt;
            celldm(1) = 5.9000811881,&lt;br /&gt;
            celldm(3) = 6.7795677253,&lt;br /&gt;
                  nat = 3,&lt;br /&gt;
                 ntyp = 2,&lt;br /&gt;
             lspinorb = .true.&lt;br /&gt;
             noncolin = .true.&lt;br /&gt;
                nbnd  = 250&lt;br /&gt;
             assume_isolated = &#039;2D&#039;&lt;br /&gt;
         force_symmorphic = .true.&lt;br /&gt;
  /&amp;amp;end&lt;br /&gt;
  &amp;amp;electrons&lt;br /&gt;
     electron_maxstep = 200,&lt;br /&gt;
          mixing_beta = 0.7,&lt;br /&gt;
             conv_thr = 1.d-08,&lt;br /&gt;
  /&amp;amp;end&lt;br /&gt;
   ATOMIC_SPECIES&lt;br /&gt;
    Mo  95.940      Mo_ONCV_PBE_FR-1.0.upf&lt;br /&gt;
    S    32.065     S_ONCV_PBE_FR-1.1.upf&lt;br /&gt;
   ATOMIC_POSITIONS { crystal }&lt;br /&gt;
 Mo       0.333333333   0.666666667   0.000000000&lt;br /&gt;
 S        0.666666667   0.333333333   0.073413577&lt;br /&gt;
 S        0.666666667   0.333333333  -0.073413577&lt;br /&gt;
  K_POINTS { automatic }&lt;br /&gt;
 6 6 1 0 0 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Again, we run the calculation&lt;br /&gt;
&lt;br /&gt;
 mpirun -np 4 pw.x -inp mos2.nscf &amp;gt; nscf.out&lt;br /&gt;
&lt;br /&gt;
== Step 3: dvscf phonon calculation ==&lt;br /&gt;
&lt;br /&gt;
Now we run the phonon calculation.&lt;br /&gt;
&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; directory from the &#039;&#039;&#039;scf&#039;&#039;&#039; calculation and run &amp;lt;code&amp;gt;ph.x&amp;lt;/code&amp;gt; for a dvscf calculation with a standard &amp;lt;code&amp;gt;q&amp;lt;/code&amp;gt;-grid matching the &amp;lt;code&amp;gt;k&amp;lt;/code&amp;gt;-grid we wanna use in Yambo.&lt;br /&gt;
&lt;br /&gt;
At the end, we will have the &amp;lt;code&amp;gt;_ph0&amp;lt;/code&amp;gt; directory containing the variation of the self-consistent potential, &amp;lt;math&amp;gt;\Delta V_{SCF}(q)&amp;lt;/math&amp;gt;, and the &amp;lt;code&amp;gt;*.dyn&amp;lt;/code&amp;gt; files with the phonon energies and eigenvectors.&lt;br /&gt;
&lt;br /&gt;
NB: one could further refine the phonon energies by enforcing the acoustic sum rule, including non-analytic long-range contributions, interpolating to finer grids... all of this can be done within Quantum ESPRESSO and will not be covered in this version of the tutorial.&lt;br /&gt;
&lt;br /&gt;
The input is &amp;lt;code&amp;gt;mos2.dvscf&amp;lt;/code&amp;gt;:&lt;br /&gt;
 &lt;br /&gt;
 mos2_dvscf&lt;br /&gt;
 &amp;amp;inputph&lt;br /&gt;
   tr2_ph=1.0d-12,&lt;br /&gt;
   verbosity=&#039;high&#039;&lt;br /&gt;
   prefix=&#039;mos2&#039;,&lt;br /&gt;
   fildvscf = &#039;mos2-dvscf&#039;,&lt;br /&gt;
   electron_phonon = &#039;dvscf&#039;,&lt;br /&gt;
   fildyn=&#039;mos2.dyn&#039;,&lt;br /&gt;
   epsil=.false.,&lt;br /&gt;
   ldisp=.true.,&lt;br /&gt;
   recover=.true.,&lt;br /&gt;
   nq1=6,&lt;br /&gt;
   nq2=6,&lt;br /&gt;
   nq3=1&lt;br /&gt;
 /&lt;br /&gt;
&lt;br /&gt;
And now we run as&lt;br /&gt;
&lt;br /&gt;
 nohup mpirun -np 8 ph.x -inp mos2.dvscf &amp;gt; dvscf.out &amp;amp;&lt;br /&gt;
&lt;br /&gt;
This time we use nohup and more processes because this calculation may take some time. It is a good idea to set &amp;lt;code&amp;gt;recover=.true.&amp;lt;/code&amp;gt; as in a real calculation you will easily breach walltime, and in this way you can safely restart.&lt;br /&gt;
&lt;br /&gt;
== Step 4: create Yambo &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; directory ==&lt;br /&gt;
&lt;br /&gt;
This is just the standard Yambo initialization: run &lt;br /&gt;
 &lt;br /&gt;
 p2y &lt;br /&gt;
&lt;br /&gt;
and then &lt;br /&gt;
&lt;br /&gt;
 yambo &lt;br /&gt;
&lt;br /&gt;
in the &#039;&#039;&#039;nscf&#039;&#039;&#039; &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; folder and then move the newly generated &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; directory to a convenient place.&lt;br /&gt;
&lt;br /&gt;
== Step 5: run a BSE calculation ==&lt;br /&gt;
&lt;br /&gt;
Now we switch from QE to Yambo. Here, we forgo the GW step for simplicity (we can use a scissor operator to open the band gap).&lt;br /&gt;
&lt;br /&gt;
This calculation has a couple of differences with respect to a standard BSE calculation for optical absorption. We can look at the input file &amp;lt;code&amp;gt;bse.in&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;# Runlevels&amp;lt;/span&amp;gt;&lt;br /&gt;
 optics                       # [R OPT] Optics&lt;br /&gt;
 rim_cut                      # [R RIM CUT] Coulomb potential&lt;br /&gt;
 bss                          # [R BSS] Bethe Salpeter Equation solver&lt;br /&gt;
 em1s                         # [R Xs] Static Inverse Dielectric Matrix&lt;br /&gt;
 bse                          # [R BSE] Bethe Salpeter Equation.&lt;br /&gt;
 bsk                          # [R BSK] Bethe Salpeter Equation kernel&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;# RIM and cutoff settings&amp;lt;/span&amp;gt;&lt;br /&gt;
 RandQpts=1000000             # [RIM] Number of random q-points in the BZ&lt;br /&gt;
 RandGvec= 100            RL    # [RIM] Coulomb interaction RS components&lt;br /&gt;
 CUTGeo= &amp;quot;slab z&amp;quot;               # [CUT] Coulomb Cutoff geometry: box/cylinder/sphere X/Y/Z/XY..&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;# Static screening&amp;lt;/span&amp;gt;&lt;br /&gt;
 X_and_IO_CPU= &amp;quot;1 1 4 2 1&amp;quot;       # [PARALLEL] CPUs for each role&lt;br /&gt;
 X_and_IO_ROLEs= &amp;quot;q g k c v&amp;quot;      # [PARALLEL] CPUs roles (q,g,k,c,v)&lt;br /&gt;
 X_and_IO_nCPU_LinAlg_INV=-1      # [PARALLEL] CPUs for Linear Algebra (if -1 it is automatically set)&lt;br /&gt;
 Chimod= &amp;quot;hartree&amp;quot;            # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 % QpntsRXs&lt;br /&gt;
    1 | 7 |                 # [Xs] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 |  200 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 8            Ry    # [Xs] Response block size&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;# BSE&amp;lt;/span&amp;gt;&lt;br /&gt;
 BS_CPU= &amp;quot;4.1.2&amp;quot;                   # [PARALLEL] CPUs for each role&lt;br /&gt;
 BS_ROLEs= &amp;quot;k.eh.t&amp;quot;                 # [PARALLEL] CPUs roles (k,eh,t)&lt;br /&gt;
 BS_nCPU_diago=4              # [PARALLEL] CPUs for matrix diagonalization&lt;br /&gt;
 BSEmod= &amp;quot;causal&amp;quot;             # [BSE] resonant/causal/coupling&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSSmod= &amp;quot;d&amp;quot;                  # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft`&lt;br /&gt;
 BSENGexx=  40          Ry    # [BSK] Exchange components&lt;br /&gt;
 ALLGexx                      # [BSS] Force the use use all RL vectors for the exchange part&lt;br /&gt;
 BSENGBlk=  8           Ry    # [BSK] Screened interaction block size&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Lkind=&amp;quot;full&amp;quot;                  #[BSE,X] bar(default)/full/tilde&amp;lt;/span&amp;gt;&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
 % BEnRange&lt;br /&gt;
   0.00000 |  4.00000 | eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 % BDmRange&lt;br /&gt;
   0.05000 |  0.05000 | eV    # [BSS] Damping range&lt;br /&gt;
 %&lt;br /&gt;
 BEnSteps= 2000               # [BSS] Energy steps&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;% BSEQptR&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 1 | 7 |                     # [BSK] Transferred momenta range&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;%&amp;lt;/span&amp;gt;&lt;br /&gt;
 % BSEBands&lt;br /&gt;
    25 |  28 |                 # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 WRbsWF                      # [BSS] Write to disk excitonic the FWs&lt;br /&gt;
 &lt;br /&gt;
First of all, we compute the excitons for all the momenta in the irreducible Brillouin zone for our discrete grid via the &amp;lt;code&amp;gt;BSEQptR&amp;lt;/code&amp;gt; variable. This will be a &#039;&#039;&#039;finite-momentum&#039;&#039;&#039; BSE calculation, analogous to the phonon one.&lt;br /&gt;
&lt;br /&gt;
Second, we change the variable &amp;lt;code&amp;gt;Lkind&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;bar&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;full&amp;lt;/code&amp;gt;. In Yambo, &amp;lt;code&amp;gt;Lkind=&amp;quot;bar&amp;quot;&amp;lt;/code&amp;gt;, which is the default for optical absorption, means that we are computing the excitonic response function without the long-range component of the exchange interaction. This cannot be used when computing the exciton momentum dependence, where the long-range exchange interaction can play a role, therefore we have to include it with &amp;lt;code&amp;gt;Lkind=&amp;quot;full&amp;quot;&amp;lt;/code&amp;gt;. This allows for the calculation of the excitonic longitudinal-transverse splitting (in 3D systems) as well.&lt;br /&gt;
&lt;br /&gt;
We can now run the code:&lt;br /&gt;
&lt;br /&gt;
 nohup mpirun -np 8 yambo -F bse.in -J bse_Lfull -C bse_Lfull &amp;amp;&lt;br /&gt;
&lt;br /&gt;
At the end of the calculation, we have obtained the &amp;lt;code&amp;gt;ndb.BS_diago_Q*&amp;lt;/code&amp;gt; databases inside the directory &amp;lt;code&amp;gt;bse_Lfull&amp;lt;/code&amp;gt;. They contain information on the exciton energies and wavefunctions at each momentum. Do not forget to check the report and logs of your calculation in the same directory to make sure that the code is doing what you want.&lt;br /&gt;
&lt;br /&gt;
== Step 6: obtain the electron-phonon matrix elements ==&lt;br /&gt;
&lt;br /&gt;
We have finished the heavy simulations. Now it&#039;s time for the postprocessing. The first order of business is the reconstruction of the electron-phonon coupling matrix elements from the dvscf results and the electronic wavefunctions.&lt;br /&gt;
&lt;br /&gt;
In order to do this, we will run the &amp;lt;code&amp;gt;lelphc&amp;lt;/code&amp;gt; executable of the &#039;&#039;&#039;LetzElPhC&#039;&#039;&#039; code. We will run via command line using yambopy, although it will be instructive to have look at the &amp;lt;code&amp;gt;lelphc&amp;lt;/code&amp;gt; input files later.&lt;br /&gt;
&lt;br /&gt;
We run in the same directory where the Yambo &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; is (remember than you can also virtually move it with a symbolic link).&lt;br /&gt;
&lt;br /&gt;
Type:&lt;br /&gt;
&lt;br /&gt;
 yambopy l2y&lt;br /&gt;
&lt;br /&gt;
to see the help for the calculation. For example, if we want to do a serial run of LetzElPhC for bands from &amp;lt;math&amp;gt;n_i&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;n_f&amp;lt;/math&amp;gt;, we should type:&lt;br /&gt;
&lt;br /&gt;
 yambopy l2y -ph path/of/ph_input.in -b n_i n_f&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;math&amp;gt;n_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;n_f&amp;lt;/math&amp;gt; are integers representing the initial and final band indices. &lt;br /&gt;
&lt;br /&gt;
These should coincide with those used for the Bethe-Salpeter kernel, i.e. those specified in the &amp;lt;code&amp;gt;BSEBands&amp;lt;/code&amp;gt; variable of the BSE input file (this is not strictly necessary, but certainly efficient since these calculations use a lot of disk space). &lt;br /&gt;
&lt;br /&gt;
For our system, we want to do a parallel calculation with 4 qpools and 2 kpools. In addition, we want to explicitly specify the path of the &amp;lt;code&amp;gt;lelphc&amp;lt;/code&amp;gt; executable and avoid automatically deleting the LetzElPhC data. So we type:&lt;br /&gt;
&lt;br /&gt;
 yambopy l2y -ph path/of/dvscf/mos2.dvscf -b 25 28 -par 4 2 -lelphc path/to/lelphc_exe --debug&lt;br /&gt;
&lt;br /&gt;
At the end, check the &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 ls SAVE/ndb.elph_gkkp*&lt;br /&gt;
&lt;br /&gt;
to see that it has created the Yambo-compatible electron-phonon databases.&lt;br /&gt;
&lt;br /&gt;
If you saved the &amp;lt;code&amp;gt;lelphc.in&amp;lt;/code&amp;gt; input file, you can inspect it:&lt;br /&gt;
&lt;br /&gt;
 # LetzElPhC input for yambo generated by yambopy&lt;br /&gt;
 nqpool      = 2&lt;br /&gt;
 nkpool      = 4&lt;br /&gt;
 start_bnd   = 25&lt;br /&gt;
 end_bnd     = 28&lt;br /&gt;
 save_dir    = ./SAVE&lt;br /&gt;
 kernel      = dfpt&lt;br /&gt;
 ph_save_dir = dvscf/ph_save&lt;br /&gt;
 convention = yambo&lt;br /&gt;
&lt;br /&gt;
You can also run it as it is, but the code will generate the database &amp;lt;code&amp;gt;ndb.elph&amp;lt;/code&amp;gt;. In order to convert it to the &amp;lt;code&amp;gt;ndb.elph_gkkp*&amp;lt;/code&amp;gt; databases of Yambo, you still need a couple of lines of python using the Yambopy class &amp;lt;code&amp;gt;ConvertElectronPhononDB&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;yambopy/letzelph_interface/lelph2y.py&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Notice the variable &amp;lt;code&amp;gt;convention=yambo&amp;lt;/code&amp;gt;: what does it mean? At variance with QE and many other codes, Yambo uses the &amp;quot;backward&amp;quot; momentum transfer convention for electronic scatterings. That is, an electronic transition goes from band &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; and momentum &amp;lt;math&amp;gt;k-q&amp;lt;/math&amp;gt; to band &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; and momentum &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;. In the &amp;quot;forward&amp;quot; momentum transfer convention (the more standard one), the transitions go from &amp;lt;math&amp;gt;nk&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;mk+q&amp;lt;/math&amp;gt;. Therefore, this variable ensures that the electron-phonon coupling matrix elements are computed as &amp;lt;math&amp;gt;\langle mk|dV|nk-q\rangle&amp;lt;/math&amp;gt;. This will have consequences also in the formulation of the &#039;&#039;exciton&#039;&#039;-phonon coupling matrix element.&lt;br /&gt;
&lt;br /&gt;
== Step 7: Obtain the exciton-phonon coupling ==&lt;br /&gt;
&lt;br /&gt;
Now, we can finally access our basic building block for exciton-phonon physics. This could be done entirely in python (using &#039;&#039;&#039;Yambopy&#039;&#039;&#039;), or by running &#039;&#039;&#039;Yambo&#039;&#039;&#039;. In this version of the tutorial we present the latter case.&lt;br /&gt;
&lt;br /&gt;
Our objective is obtaining the following quantity: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{G}^\mu_{\alpha\lambda}(0,q)=\sum_{vv^\prime c k} A^{\alpha, *}_{cv^\prime} (k, q) g_{vv^\prime}^\mu (k,q) A^{\lambda}_{cv}(k,q) - \sum_{cc^\prime vk} A^{\alpha, *}_{c^\prime v} (k+q, q) g_{c^\prime c}^\mu (k+q,q) A^{\lambda}_{cv}(k,q)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, &amp;lt;math&amp;gt;A^{\lambda}_{cv}(k,q)&amp;lt;/math&amp;gt; are the exciton coefficients extracted from the eigenvector of the two-particles Hamiltonian during the BSE calculation in step 5, while &amp;lt;math&amp;gt;g_{nm}^\mu (k,q)&amp;lt;/math&amp;gt; are the electron-phonon coupling matrix elements obtained in step 6. As you can see, the exciton &amp;lt;math&amp;gt;\lambda&amp;lt;/math&amp;gt; undergoes phonon-mediated scattering to state &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt; via phonon mode &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt;. The scattering can happen for the hole (valence, &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;) or for the electron (conduction, &amp;lt;math&amp;gt;c&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
NB: &lt;br /&gt;
&lt;br /&gt;
(1) This is written in the &amp;quot;backward&amp;quot; momentum transfer convention used by Yambo. The momentum dependence is different in the &amp;quot;forward&amp;quot; transfer convention. &lt;br /&gt;
&lt;br /&gt;
(2) For simplicity, this is written for zero initial exciton momentum. This means that one of the two states involved in the phonon-mediated scattering process will be in the optical limit (and possibly an optically generated exciton), while the other state can have any momentum: this momentum will be the same as the phonon one. This matrix element can be used to describe phonon-assisted absorption and emission spectra.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have to write a new yambo input, that we can call &amp;lt;code&amp;gt;excph.in&amp;lt;/code&amp;gt;, for this. You can copy (and adapt) the one below, or you can generate one by running from the command line:&lt;br /&gt;
&lt;br /&gt;
 yambo_ph -excph o&lt;br /&gt;
&lt;br /&gt;
This generates an input to compute luminescence (&amp;quot;o&amp;quot; is for &amp;quot;optics&amp;quot;). The variables that we are interested in are:&lt;br /&gt;
&lt;br /&gt;
 excph                            # [R] Exction-phonon&lt;br /&gt;
 ExcGkkp                          # [R][EXCPH] Exciton-Phonon Matrix Elelements&lt;br /&gt;
 % ELPhExcStates&lt;br /&gt;
  1 | 4 |                             # [EXCPH] Incoming (external) exciton states&lt;br /&gt;
 %&lt;br /&gt;
 % ELPhExcSum&lt;br /&gt;
  1 | 12 |                             # [EXCPH] Outgoing (virtual) exciton states&lt;br /&gt;
 %&lt;br /&gt;
 LoutPath= &amp;quot;./bse_Lfull&amp;quot;                 # [EXCPH] Path of the outgoing L&lt;br /&gt;
 % ElPhModes&lt;br /&gt;
   1 | 9 |                           # [ELPH] Phonon modes included&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
In this input, we have to select the initial exciton states &amp;lt;math&amp;gt;\lambda&amp;lt;/math&amp;gt; with &amp;lt;code&amp;gt;ELPhExcStates&amp;lt;/code&amp;gt;, the final exciton states &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt; with &amp;lt;code&amp;gt;ELPhExcSum&amp;lt;/code&amp;gt; and the phonon modes &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt; with &amp;lt;code&amp;gt;ElPhModes&amp;lt;/code&amp;gt;. Here we consider the first four states at &amp;lt;math&amp;gt;Q=0&amp;lt;/math&amp;gt; (corresponding to just two excitons because they are both doubly degenerate -- do not break degeneracies when selecting states!) and the first twelve states at each finite-&amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; point. We also include all the nine phonon modes of monolayer MoS2.&lt;br /&gt;
&lt;br /&gt;
What about &amp;lt;code&amp;gt;LoutPath&amp;lt;/code&amp;gt;? This variable controls the directory where the databases for the final-state excitons &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt; is located, which can be different from the directory with the initial-state excitons &amp;lt;math&amp;gt;\lambda&amp;lt;/math&amp;gt; read as usual with the &amp;lt;code&amp;gt;-J&amp;lt;/code&amp;gt; option when running the code. This makes it possible to compute the coupling between different exciton kinds. However, for our tutorial, we stick with the previously computed &amp;lt;code&amp;gt;Lfull&amp;lt;/code&amp;gt; in both cases.&lt;br /&gt;
&lt;br /&gt;
When we are satisfied with the input, we run the code using &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 yambo_ph -F excph.in -J excph,bse_Lfull -C excph&lt;br /&gt;
&lt;br /&gt;
If you check the output, you should find the &amp;lt;code&amp;gt;ndb.excph*&amp;lt;/code&amp;gt; databases in the &amp;lt;code&amp;gt;excph&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
=== Analysis of the couplings ===&lt;br /&gt;
&lt;br /&gt;
It is a good idea to have a look at what we computed up to now in order to make sure nothing has gone wrong. &lt;br /&gt;
&lt;br /&gt;
It is not easy to know what to expect (apart from symmetry and gauge compliance of the matrix elements), but one can work out the exciton-phonon selection rules in advance, check that the magnitude is reasonable, etc.&lt;br /&gt;
&lt;br /&gt;
It is also not easy to meaningfully plot this quantity. We have to make sure that we are not breaking degenerate states, otherwise the plots will not be invariant. &lt;br /&gt;
&lt;br /&gt;
First of all, we have to know our system: in monolayer MoS2, the first four excitons are all doubly degenerate. The first exciton responsible for a bright peak in the absorption spectrum (the &#039;&#039;&#039;A&#039;&#039;&#039; peak), is the second state, corresponding to state indices &amp;lt;code&amp;gt;(3,4)&amp;lt;/code&amp;gt; in fortran indexing or &amp;lt;code&amp;gt;(2,3)&amp;lt;/code&amp;gt; in python indexing. &lt;br /&gt;
&lt;br /&gt;
All these information can be obtained by analyzing the BSE results (this stuff is explained in the BSE tutorials) and by knowledge of the system or class of systems from the literature.&lt;br /&gt;
&lt;br /&gt;
Thus, a good quantity to plot may be the norm of the matrix elements, summed over the degenerate subspace of exciton A, for a certain number of scattered final states mediated by certain phonon modes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;F_A(q)= \sqrt{ \sum_{\alpha \in A,\lambda,\mu} |\mathcal{G}_{\alpha\lambda}^\mu (0,q)|^2 }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to do this, we create a python script &amp;lt;code&amp;gt;analyse_excph.py&amp;lt;/code&amp;gt; in which we first load the excph dabatases using the &amp;lt;code&amp;gt;YamboExcitonPhononDB&amp;lt;/code&amp;gt; from yambopy. &lt;br /&gt;
You can find this script in the yambopy directory, in &amp;lt;code&amp;gt;tutorials/exciton-phonon&amp;lt;/code&amp;gt;. &lt;br /&gt;
First, we select the exciton and phonon states to be included in &amp;lt;code&amp;gt;F_A&amp;lt;/code&amp;gt;, together with the path of databases and plot details:&lt;br /&gt;
&lt;br /&gt;
 # Exciton in states&lt;br /&gt;
 exc_in  = [2,3]     # A: 2,3 -- B: 6,7&lt;br /&gt;
 exc_out = [0,1,2,3] # first 4 states (dispersion of triplet state and A)&lt;br /&gt;
 ph_in  = &#039;all&#039;&lt;br /&gt;
 &lt;br /&gt;
 # Paths of databases&lt;br /&gt;
 ns_db1 =f&#039;{path}/SAVE/ns.db1&#039;&lt;br /&gt;
 ndb_exc=f&#039;{path}/excph&#039;&lt;br /&gt;
 &lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Then, we load the data:&lt;br /&gt;
&lt;br /&gt;
 # Read lattice and k-space info&lt;br /&gt;
 ylat = YamboLatticeDB.from_db_file(filename=ns_db1)#,Expand=False)&lt;br /&gt;
 print(ylat)&lt;br /&gt;
 &lt;br /&gt;
 # Read exc-ph databases&lt;br /&gt;
 X = YamboExcitonPhononDB(ylat,save_excph=ndb_exc)&lt;br /&gt;
 print(X)&lt;br /&gt;
&lt;br /&gt;
The quantity &amp;lt;math&amp;gt;F_A(q)&amp;lt;/math&amp;gt; is defined inside the plotting function as&lt;br /&gt;
&lt;br /&gt;
 G_squared = excph.excph_sq&lt;br /&gt;
 G2plt = np.zeros(len(G_squared))&lt;br /&gt;
 &lt;br /&gt;
 if exc_in  == &#039;all&#039;: exc_in  = range(G_squared.shape[2])&lt;br /&gt;
 if exc_out == &#039;all&#039;: exc_out = range(G_squared.shape[3])&lt;br /&gt;
 if ph_in   == &#039;all&#039;: ph_in   = range(G_squared.shape[1])&lt;br /&gt;
 &lt;br /&gt;
 G_squared = G_squared[:, ph_in, :, :].sum(axis=(1))&lt;br /&gt;
 G_squared = G_squared[:, exc_in, :].sum(axis=(1))&lt;br /&gt;
 G_squared = G_squared[:, exc_out].sum(axis=(1))&lt;br /&gt;
 &lt;br /&gt;
 F_q = np.sqrt( G_squared )*ha2ev # Switch from Ha to eV&lt;br /&gt;
&lt;br /&gt;
And finally, we have to make a plotting function. For this tutorial we will use the default scatterplot provided by &amp;lt;code&amp;gt;YamboExcitonPhononDB&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 excph.plot_excph(F_q,plt_cbar=plt_cbar,**kwargs)&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
You can get more experience on using Yambopy for these kinds of visualization by following the Yambopy tutorials[LINK]. In fact, remember that this scripts and all the other yambopy tutorial scripts are just suggestions, not source code written in stone: if you know &amp;lt;code&amp;gt;numpy&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;matplotlib&amp;lt;/code&amp;gt; you can do your own analysis and your own plots, you just need to import the required Yambopy modules to load the data.&lt;br /&gt;
&lt;br /&gt;
In our case, the resulting plot is the following.&lt;br /&gt;
&lt;br /&gt;
[[File:1L MoS2 ExcPh.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
This can be checked against Fig. 2(d) of reference &amp;lt;ref name=&amp;quot;chan2023&amp;quot; /&amp;gt;, although you have to keep in mind that our results are badly undersampled in terms of the reciprocal-space grid, as can be easily seen, and the quantity plotted is not exactly the same. However, the main features are already there since they are dictated mostly by crystal symmetries.&lt;br /&gt;
&lt;br /&gt;
Now that we have the exciton-phonon matrix elements, we can use them to build several kinds of observables. Below, we give an example related to phonon-assisted luminescence, but we may update this tutorial in the future to include more cases.&lt;br /&gt;
&lt;br /&gt;
== Step 8: Compute phonon-assisted luminescence ==&lt;br /&gt;
&lt;br /&gt;
[[File:Luminescence scheme.png|250px|right]]&lt;br /&gt;
&lt;br /&gt;
We want to compute the experimental optical signature due to the phonon-assisted recombination of an exciton (as sketched in the figure).&lt;br /&gt;
&lt;br /&gt;
The signal from the phonon replicas can be modeled as a second-order scattering process involving one phonon and one photon:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;I^{(1)}_{PL}(\omega;T) \propto \frac{1}{N_q}\sum_{ s \mu \beta q} \left|\sum_\lambda\frac{D_\lambda \mathcal{G}^{\mu q}_{\alpha q,\lambda}}{E_{\alpha q}-E_\lambda -s\Omega_{\mu q}} \right|^2 N_{\alpha q}(T_{exc}) F^s_{\mu q}(T)\delta(\omega - \left[E_{\alpha q}-s\Omega_{\mu q}\right])&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this equation, the oscillator strength of the peak is given by the exciton-phonon coupling matrix elements &amp;lt;math&amp;gt;\mathcal{G}&amp;lt;/math&amp;gt; multiplied by the exciton dipoles &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (they are called &amp;quot;residuals&amp;quot; in Yambo). Here &amp;lt;math&amp;gt;E_\lambda&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;E_{\alpha q}&amp;lt;/math&amp;gt; are the energies of the optical and finite-momentum excitons, respectively, while &amp;lt;math&amp;gt;\Omega_{\mu q}&amp;lt;/math&amp;gt; are the phonon energies. &lt;br /&gt;
&lt;br /&gt;
The occupation function &amp;lt;math&amp;gt;F&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;F^s_{\mu q}(T)=n_{\mu q}(T)+\frac{1+s}{2}&amp;lt;/math&amp;gt;. Here, &amp;lt;math&amp;gt;n(T)&amp;lt;/math&amp;gt; is the temperature-dependent phonon Bose-Einstein occupation function. As it can be seen, &amp;lt;math&amp;gt;s=1&amp;lt;/math&amp;gt; corresponds to processes of phonon &#039;&#039;emission&#039;&#039; (&amp;lt;math&amp;gt;\propto n(T)+1&amp;lt;/math&amp;gt;), while &amp;lt;math&amp;gt;s=-1&amp;lt;/math&amp;gt; corresponds to processes of phonon &#039;&#039;absorption&#039;&#039; (&amp;lt;math&amp;gt;\propto n(T)&amp;lt;/math&amp;gt;). Therefore, &amp;lt;math&amp;gt;I^{(1)}_{PL}(\omega;T)&amp;lt;/math&amp;gt; describes &#039;&#039;light&#039;&#039; emission by recombining excitons mediated by either &#039;&#039;phonon&#039;&#039; absorption or emission. &lt;br /&gt;
&lt;br /&gt;
The quantity &amp;lt;math&amp;gt; N_{\alpha q}(T_{exc})&amp;lt;/math&amp;gt; is the exciton occupation function. Luminescence is technically an out-of-equilibrium process, but we can assume that for very low density of excitations and in steady-state conditions, the exciton population can be approximately described by an equilibrium distribution evaluated at an effective temperature. Here, we use the Boltzmann distribution. Experimentally, &amp;lt;math&amp;gt;T_{exc}&amp;lt;/math&amp;gt; tends to coincide with the lattice temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; more or less above 100 K, while at very low temperature (&amp;lt; 10 K), &amp;lt;math&amp;gt;T_{exc}&amp;lt;/math&amp;gt; may vary between 10-50 K. It goes without saying that this needs to carefully be checked in your realistic calculations.&lt;br /&gt;
&lt;br /&gt;
=== Running the jobs ===&lt;br /&gt;
&lt;br /&gt;
In order to study luminescence in a paradigmatic system, we switch to bulk hexagonal boron nitride and we repeat the workflow. As you can easily see, one can think about automatizing the execution of all these calculations via scripting or more advanced tools. However, in the case of very large simulations (memory-limited or disk-space limited) or for systems whose electronic and lattice properties are fragile with respect to tiny calculation details, one must be very careful and run many basic tests.&lt;br /&gt;
&lt;br /&gt;
Fortunately, we are running a fast underconverged example. We use LDA pseudopotentials from the pseudo-dojo library and the following are the calculations steps.&lt;br /&gt;
&lt;br /&gt;
1. Input &amp;lt;code&amp;gt;hbn.scf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;control&lt;br /&gt;
     calculation=&#039;scf&#039;,&lt;br /&gt;
     prefix=&#039;hBN&#039;,&lt;br /&gt;
     restart_mode=&#039;from_scratch&#039;&lt;br /&gt;
     pseudo_dir = &#039;$PSEUDO_DIR&#039;,&lt;br /&gt;
     outdir = &#039;./tmp&#039;&lt;br /&gt;
     verbosity = &#039;high&#039;&lt;br /&gt;
     wf_collect=.true.&lt;br /&gt;
 /&lt;br /&gt;
 &amp;amp;system&lt;br /&gt;
     ibrav = 4,&lt;br /&gt;
     celldm(1) = 4.703675849&lt;br /&gt;
     celldm(3) = 2.603711434&lt;br /&gt;
     nat= 4,&lt;br /&gt;
     ntyp= 2,&lt;br /&gt;
     force_symmorphic=.true.&lt;br /&gt;
     ecutwfc = 100,&lt;br /&gt;
 /&lt;br /&gt;
 &amp;amp;electrons&lt;br /&gt;
   diago_david_ndim = 2&lt;br /&gt;
   diago_full_acc=.true.&lt;br /&gt;
   diago_thr_init=5.0e-6&lt;br /&gt;
   mixing_mode = &#039;plain&#039;&lt;br /&gt;
   mixing_beta = 0.7&lt;br /&gt;
   conv_thr =  1.0d-16&lt;br /&gt;
 /&lt;br /&gt;
 ATOMIC_SPECIES&lt;br /&gt;
  B 10.81100  B_LDA_dojo.UPF&lt;br /&gt;
  N 14.00674  N_LDA_dojo.UPF&lt;br /&gt;
 ATOMIC_POSITIONS {crystal}&lt;br /&gt;
 N             0.6666666670        0.3333333330        -0.250000000000&lt;br /&gt;
 B             0.3333333330        0.6666666670        -0.250000000000&lt;br /&gt;
 B             0.6666666670        0.3333333330        0.25000000000&lt;br /&gt;
 N             0.3333333330        0.6666666670        0.25000000000&lt;br /&gt;
 K_POINTS {automatic}&lt;br /&gt;
 6 6 2 0 0 0&lt;br /&gt;
&lt;br /&gt;
 mpirun -np 4 pw.x -inp hbn.scf &amp;gt; scf.out&lt;br /&gt;
&lt;br /&gt;
2. Input &amp;lt;code&amp;gt;hbn.nscf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;control&lt;br /&gt;
     calculation=&#039;nscf&#039;,&lt;br /&gt;
     prefix=&#039;hBN&#039;,&lt;br /&gt;
     restart_mode=&#039;from_scratch&#039;&lt;br /&gt;
     pseudo_dir = &#039;$PSEUDO_DIR&#039;&lt;br /&gt;
     outdir = &#039;./&#039;&lt;br /&gt;
     verbosity = &#039;high&#039;&lt;br /&gt;
     wf_collect=.true.&lt;br /&gt;
 /&lt;br /&gt;
 &amp;amp;system&lt;br /&gt;
     ibrav = 4,&lt;br /&gt;
     celldm(1) = 4.703675849&lt;br /&gt;
     celldm(3) = 2.603711434&lt;br /&gt;
     nat= 4,&lt;br /&gt;
     ntyp= 2,&lt;br /&gt;
     force_symmorphic=.true.&lt;br /&gt;
     ecutwfc = 100,&lt;br /&gt;
 	nbnd = 120&lt;br /&gt;
 /&lt;br /&gt;
 &amp;amp;electrons&lt;br /&gt;
   diago_david_ndim = 2&lt;br /&gt;
   diago_full_acc=.true.&lt;br /&gt;
   diago_thr_init=5.0e-6&lt;br /&gt;
   mixing_mode = &#039;plain&#039;&lt;br /&gt;
   mixing_beta = 0.7&lt;br /&gt;
   conv_thr =  1.0d-16&lt;br /&gt;
 /&lt;br /&gt;
 ATOMIC_SPECIES&lt;br /&gt;
  B 10.81100  B_LDA_dojo.UPF&lt;br /&gt;
  N 14.00674  N_LDA_dojo.UPF&lt;br /&gt;
 ATOMIC_POSITIONS {crystal}&lt;br /&gt;
 N             0.6666666670        0.3333333330        -0.250000000000&lt;br /&gt;
 B             0.3333333330        0.6666666670        -0.250000000000&lt;br /&gt;
 B             0.6666666670        0.3333333330        0.25000000000&lt;br /&gt;
 N             0.3333333330        0.6666666670        0.25000000000&lt;br /&gt;
 K_POINTS {automatic}&lt;br /&gt;
 6 6 2 0 0 0&lt;br /&gt;
&lt;br /&gt;
 mpirun -np 4 pw.x -inp hbn.nscf &amp;gt; nscf.out&lt;br /&gt;
&lt;br /&gt;
3. Input &amp;lt;code&amp;gt;hbn.dvscf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 hbn_dvscf&lt;br /&gt;
 &amp;amp;inputph&lt;br /&gt;
   tr2_ph=1.0d-12,&lt;br /&gt;
   verbosity=&#039;high&#039;&lt;br /&gt;
   prefix=&#039;hBN&#039;,&lt;br /&gt;
   fildvscf = &#039;hBN-dvscf&#039;,&lt;br /&gt;
   electron_phonon = &#039;dvscf&#039;,&lt;br /&gt;
   fildyn=&#039;hBN.dyn&#039;,&lt;br /&gt;
   epsil=.false.,&lt;br /&gt;
   ldisp=.true.,&lt;br /&gt;
   recover=.true.,&lt;br /&gt;
   nq1=6,&lt;br /&gt;
   nq2=6,&lt;br /&gt;
   nq3=2&lt;br /&gt;
 /&lt;br /&gt;
&lt;br /&gt;
 nohup mpirun -np 8 pw.x -inp hbn.dvscf &amp;gt; dvscf.out &amp;amp;&lt;br /&gt;
&lt;br /&gt;
4. Input &amp;lt;code&amp;gt;bse.in&amp;lt;/code&amp;gt; (we include 2 valence and 2 conduction bands):&lt;br /&gt;
&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 em1s&lt;br /&gt;
 DIP_CPU= &amp;quot;1 8 1&amp;quot;                      # [PARALLEL] CPUs for each role&lt;br /&gt;
 DIP_ROLEs= &amp;quot;k c v&amp;quot;                    # [PARALLEL] CPUs roles (k,c,v)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_and_IO_CPU= &amp;quot;1 1 1 8 1&amp;quot;                 # [PARALLEL] CPUs for each role&lt;br /&gt;
 X_and_IO_ROLEs= &amp;quot;q g k c v&amp;quot;               # [PARALLEL] CPUs roles (q,g,k,c,v)&lt;br /&gt;
 X_and_IO_nCPU_LinAlg_INV=-1      # [PARALLEL] CPUs for Linear Algebra (if -1 it is automatically set)&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 BS_CPU= &amp;quot;8 1 1&amp;quot;                       # [PARALLEL] CPUs for each role&lt;br /&gt;
 BS_ROLEs= &amp;quot;k eh t&amp;quot;                     # [PARALLEL] CPUs roles (k,eh,t)&lt;br /&gt;
 BS_nCPU_LinAlg_INV=-1            # [PARALLEL] CPUs for Linear Algebra (if -1 it is automatically set)&lt;br /&gt;
 BS_nCPU_LinAlg_DIAGO=-1          # [PARALLEL] CPUs for Linear Algebra (if -1 it is automatically set)&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions&lt;br /&gt;
 % QpntsRXs&lt;br /&gt;
    1 | 14 |                         # [Xs] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 120 |                         # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 10                Ry    # [Xs] Response block size&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Lkind= &amp;quot;Lfull&amp;quot;                    # [BSE] Lbar (default) / full&amp;lt;/span&amp;gt;&lt;br /&gt;
 BSSmod= &amp;quot;d&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 % DipBands&lt;br /&gt;
    1 | 120 |                         # [DIP] Bands range for dipoles&lt;br /&gt;
 %&lt;br /&gt;
 DipApproach= &amp;quot;G-space v&amp;quot;         # [DIP] [G-space v/R-space x/Covariant/Shifted grids]&lt;br /&gt;
 DipComputed= &amp;quot;R V P&amp;quot;             # [DIP] [default R P V; extra P2 Spin Orb]&lt;br /&gt;
 BSENGexx= 30               Ry    # [BSK] Exchange components&lt;br /&gt;
 #ALLGexx                       # [BSS] Force the use use all RL vectors for the exchange part&lt;br /&gt;
 BSENGBlk=  9               Ry    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  1.25997 | 1.08816 | 1.12683 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;% BSEQptR&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 1 | 14 |                     # [BSK] Transferred momenta range&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;%&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;% BSEBands&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;   7 | 10 |                         # [BSK] Bands range&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;%&amp;lt;/span&amp;gt;&lt;br /&gt;
 % BEnRange&lt;br /&gt;
   0.50000 | 8.00000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.050000 | 0.050000 |         eV    # [BSS] Damping range&lt;br /&gt;
 %&lt;br /&gt;
 BEnSteps= 1000                    # [BSS] Energy steps&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 1.000000 | 0.000000 |        # [BSS] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 WRbsWF                        # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
 nohup mpirun -np 8 yambo -F bse.in -J bse_Lfull -C bse_Lfull &amp;amp;&lt;br /&gt;
&lt;br /&gt;
Importantly, since we want to describe the phonon-assisted recombination process of an *optical* exciton (i.e., emitting a transverse photon), this time we also run an additional calculation at `Q=0` omitting the nonanalytic long-range Coulomb exchange. Make a second input &amp;lt;code&amp;gt;bse_Lbar.in&amp;lt;/code&amp;gt; with the following changes: &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Lkind= &amp;quot;Lbar&amp;quot;                    # [BSE] Lbar (default) / full&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;% BSEQptR&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 1 | 1 |                     # [BSK] Transferred momenta range&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;%&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4b. So now we make a second BSE run in a different directory specified by &amp;lt;code&amp;gt;-J&amp;lt;/code&amp;gt;. Here, we also pass to yambo the directory of the previous run as it includes the important screening databases &amp;lt;code&amp;gt;ndb.em1s*&amp;lt;/code&amp;gt; that we do not want to recompute from scratch.&lt;br /&gt;
 &lt;br /&gt;
 mpirun -np 8 yambo -F bse_Lbar.in -J bse_Lbar,bse_Lfull -C bse_Lbar&lt;br /&gt;
&lt;br /&gt;
5. Now we run &amp;lt;code&amp;gt;lelphc&amp;lt;/code&amp;gt; with yambopy to get the el-ph matrix elements:&lt;br /&gt;
&lt;br /&gt;
 yambopy l2y -ph path/of/dvscf/hbn.dvscf -b 7 10 -par 4 2 &lt;br /&gt;
&lt;br /&gt;
6. And finally we generate the exciton-phonon input &amp;lt;code&amp;gt;excph.in&amp;lt;/code&amp;gt; using &amp;lt;code&amp;gt;yambo_ph -excph o&amp;lt;/code&amp;gt;. Now, we take a look at all the additional variables that we didn&#039;t check before, specifying also the details for luminescence the spectrum calculation.&lt;br /&gt;
&lt;br /&gt;
 excph                            # [R] Exction-phonon&lt;br /&gt;
 ExcGkkp                          # [R][EXCPH] Exciton-Phonon Matrix Elelements&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;ExcPhOptics                      # [R][EXCPH] Exciton-Phonon Optics&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;BoseTemp=10.000000         Kn    # Bosonic Temperature&amp;lt;/span&amp;gt; &lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;EXCTemp= 10.000000          Kn    # [EXCPH] Excitonic Temperature (for luminescence spectra)&amp;lt;/span&amp;gt;&lt;br /&gt;
 % ELPhExcStates&lt;br /&gt;
  1 | 4 |                             # [EXCPH] Incoming (external) exciton states&lt;br /&gt;
 %&lt;br /&gt;
 % ELPhExcSum&lt;br /&gt;
  1 | 12 |                             # [EXCPH] Outgoing (virtual) exciton states&lt;br /&gt;
 %&lt;br /&gt;
 % ElPhModes&lt;br /&gt;
  1 | 12 |                           # [ELPH] Phonon modes included&lt;br /&gt;
 %&lt;br /&gt;
 LoutPath= &amp;quot;./bse-L_full&amp;quot;                 # [EXCPH] Path of the outgoing L&lt;br /&gt;
 FANdEtresh= 0.100000E-5    eV    # [ELPH] Energy treshold for Fan denominator&lt;br /&gt;
 EXCPHdEtresh= 0.100000E-5  eV    # [ELPH] Energy treshold for exc-ph denominator&lt;br /&gt;
 LDamping= 0.500000E-3      eV    # [EXCPH] Damping of exc-ph self-energy&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;# These are the plot parameters, same as in other parts of yambo&amp;lt;/span&amp;gt; &lt;br /&gt;
 % EnRngeXd&lt;br /&gt;
   4.00000 | 5.00000 |         eV    # [Xd] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 % DmRngeXd&lt;br /&gt;
  0.00500000 | 0.00500000 |         eV    # [Xd] Damping range&lt;br /&gt;
 %&lt;br /&gt;
 ETStpsXd= 4000                    # [Xd] Total Energy steps&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;code&amp;gt;BoseTemp&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;EXCTemp&amp;lt;/code&amp;gt; are the lattice and excitonic temperature, respectively.&lt;br /&gt;
&lt;br /&gt;
Now we run the calculation with &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt;. Here, we read as &amp;lt;math&amp;gt;Q=0&amp;lt;/math&amp;gt; excitons with &amp;lt;code&amp;gt;-J&amp;lt;/code&amp;gt; the ones without the long-range Coulomb exchange:&lt;br /&gt;
&lt;br /&gt;
 yambo_ph -F excph.in -J excph,bse_Lbar -C excph&lt;br /&gt;
&lt;br /&gt;
and we find our outputs in the &amp;lt;code&amp;gt;excph&amp;lt;/code&amp;gt; directory. &lt;br /&gt;
&lt;br /&gt;
NB: Step 6 could have been equivalently run in yambopy, limiting the use of the yambo code to just step 4. This latter option is more flexible, as it allows for a greater degree of control by the user. We are in the last stages of the development and it will be available soon.&lt;br /&gt;
&lt;br /&gt;
=== Results ===&lt;br /&gt;
&lt;br /&gt;
If we check the output directory from the step 6 calculation, we find the &amp;lt;code&amp;gt;o-excph.pl_bse_ph_ass&amp;lt;/code&amp;gt; output files containing the luminescence spectra. We can plot them with gnuplot or any other tool:&lt;br /&gt;
&lt;br /&gt;
 gnuplot&lt;br /&gt;
 &amp;gt; set xrange[4.2:5]&lt;br /&gt;
 &amp;gt; p &#039;o-excph.pl_bse_ph_ass&#039; u 1:2 w l lc rgb &#039;red&#039; lw 3&lt;br /&gt;
&lt;br /&gt;
[[File:Luminescence plot.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
Here, the signal corresponds to a finite-momentum exciton that recombines with the help of several different phonon modes, both optical and acoustic. Each phonon mode whose coupling with the exciton is allowed can generate a peak, and the energy shifts of these peaks with respect to the initial exciton energy correspond to the phonon energies. This result is underconverged, but the main features are all there. In the plot, we show a more converged example using a 12x12x4 grid (all the other parameters being equal). These plots can be compared with Fig. 4(a) of reference &amp;lt;ref name=&amp;quot;zanfrognini2023&amp;quot; /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;toyozawa2003&amp;quot; &amp;gt;Optical processes in solids, Toyozawa, Yutaka, and Chris Oxlade. Cambridge University Press, (2003). &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;lechifflart2023&#039;&amp;gt;P. Lechifflart, F. Paleari, D. Sangalli, C. Attaccalite, &#039;&#039;First-principles study of luminescence in hexagonal boron nitride single layer: Exciton-phonon coupling and the role of substrate&#039;&#039;, &lt;br /&gt;
[https://doi.org/10.1103/PhysRevMaterials.7.024006 Phys. Rev. M, &#039;&#039;&#039;7&#039;&#039;&#039; (2), 024006 (2023)]; [https://arxiv.org/abs/2212.10407 arXiv2212.1047]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;cannuccia2019&#039;&amp;gt;E. Cannuccia, B. Monserrat and C. Attaccalite, &#039;&#039;Theory of phonon-assisted luminescence in solids: Application to hexagonal boron nitride&#039;&#039;, [https://doi.org/10.1103/PhysRevB.99.081109 Phys. Rev. B &#039;&#039;&#039;99&#039;&#039;&#039;, 081109(R) (2019)]; [https://arxiv.org/abs/1807.11797 arXiv1807.11797]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;paleari2019&#039;&amp;gt;F. Paleari et al., &#039;&#039;Exciton-Phonon Coupling in the Ultraviolet Absorption and Emission Spectra of Bulk Hexagonal Boron Nitride&#039;&#039;, [https://doi.org/10.1103/PhysRevLett.122.187401 Phys. Rev. Lett. &#039;&#039;&#039;122&#039;&#039;&#039;, 187401 (2019)]; [https://arxiv.org/abs/1810.08976 arXiv1810.089776] &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;chen2020&#039;&amp;gt;&#039;&#039;Exciton-Phonon Interaction and Relaxation Times from First Principles&#039;&#039;,&lt;br /&gt;
Hsiao-Yi Chen, Davide Sangalli, and Marco Bernardi, [https://doi.org/10.1103/PhysRevLett.125.107401  Phys. Rev. Lett. &#039;&#039;&#039;125&#039;&#039;&#039;, 107401 (2020)]; [https://arxiv.org/abs/2002.08913 arXiv 2002.08913 (2020)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;lechifflart2023_PhD&amp;quot;&amp;gt;[https://www.yambo-code.eu/wiki/images/5/54/These_final.pdf Exciton-phonon coupling and phonon-assisted luminescence in hexagonal Boron Nitride nanostructures], PhD Thesis, Pierre Lechifflart (2023)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;paleari2019_PhD&#039;&amp;gt;F. Paleari, &#039;&#039;First-principles approaches to the description of indirect absorption and luminescence spectroscopy: exciton-phonon coupling in hexagonal boron nitride&#039;&#039;, [https://wwwen.uni.lu/research/fstm/dphyms/people/fulvio_paleari PhD thesis, University of Luxembourg (2019)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;zanfrognini2023&#039;&amp;gt;[https://arxiv.org/abs/2305.17554 Distinguishing different stackings in layered materials via luminescence spectroscopy], M. Zanfrognini et al. Phys. Rev. Lett. &#039;&#039;&#039;131&#039;&#039;&#039;, 206902 (2023) &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;marini2024&#039;&amp;gt;G. Marini, M. Calandra, P. Cudazzo, &#039;&#039;Optical absorption and photoluminescence of single layer boron nitride from a first principles cumulant approach&#039;&#039;, [https://doi.org/10.1021/acs.nanolett.4c00669 Nano Lett., &#039;&#039;&#039;24&#039;&#039;&#039;, 20, 6017 (2024)]; [https://arxiv.org/abs/2402.03826 arXiv 2402.03826 (2024)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;antonius2017&#039;&amp;gt;G. Antonius, S. G. Louie, &#039;&#039;Theory of exciton-phonon coupling&#039;&#039;, [https://doi.org/10.1103/PhysRevB.105.085111 Phys. Rev. B, &#039;&#039;&#039;105&#039;&#039;&#039;, 085111 (2022)]; [https://arxiv.org/abs/1705.04245 arXiv1705.04245 (2017)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;paleari2022&#039;&amp;gt;[https://arxiv.org/abs/2205.02783 Exciton-phonon interaction calls for a revision of the “exciton” concept], F. Paleari, A. Marini, Phys. Rev. B, &#039;&#039;&#039;106&#039;&#039;&#039;, 125403 (2022)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;cudazzo2020&#039;&amp;gt; P. Cudazzo, &#039;&#039;First-principles description of the exciton-phonon interaction: A cumulant approach&#039;&#039;, [https://doi.org/10.1103/PhysRevB.102.045136 Phys. Rev. B, &#039;&#039;&#039;102&#039;&#039;&#039;, 045136 (2020)]; [https://orbilu.uni.lu/bitstream/10993/44769/1/main.pdf Open access pdf from Luxembourg University]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;chan2023&#039;&amp;gt;Y-h Chan, J. B. Haber, M. H. Naik, J. B. Neaton, D. Y. Qiu, F. H. da Jornada, S. G. Louie, &#039;&#039;Exciton Lifetime and Optical Line Width Profile via Exciton–Phonon Interactions: Theory and First-Principles Calculations for Monolayer MoS2&#039;&#039;, [https://doi.org/10.1021/acs.nanolett.3c00732 Nano Lett., &#039;&#039;&#039;23&#039;&#039;&#039;, 9 (2023)]; [https://arxiv.org/abs/2212.08451 arXiv 2212.08451 (2023)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;murali2025&#039;&amp;gt;M. Nalabothula, S. Reichardt, L. Wirtz, &#039;&#039;Origin of Interlayer Exciton–Phonon Coupling in 2D Heterostructures&#039;&#039;, [https://doi.org/10.1021/acs.nanolett.5c00355 Nano Lett., &#039;&#039;&#039;25&#039;&#039;&#039;, 15 (2025)], [https://arxiv.org/abs/2407.16111 arXiv 2407.16111 (2025)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Exciton-phonon_coupling_and_luminescence&amp;diff=9059</id>
		<title>Exciton-phonon coupling and luminescence</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Exciton-phonon_coupling_and_luminescence&amp;diff=9059"/>
		<updated>2025-09-18T15:33:44Z</updated>

		<summary type="html">&lt;p&gt;Davide: References sorted by year&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Tdgw-phonon-usc-01-1024x829.jpg| 400px | right]]&lt;br /&gt;
&lt;br /&gt;
In this advanced tutorial, we will calculate exciton-phonon interactions from first principles by interfacing DFPT (for phonon calculations) and BSE (for exciton calculations).&lt;br /&gt;
&lt;br /&gt;
The DFTP calculations are run with Quantum ESPRESSO, while the many-body GW-BSE calculations are run with Yambo. Finally, the exciton-phonon interaction will be obtained by combining and postprocessing the databases computed in the two previous runs. The great advantage of this workflow is that the calculations can be run in the irreducible Brillouin zones both for the electronic momenta (&amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;) and the transfer momenta (&amp;lt;math&amp;gt;Q&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt;) of excitons and phonons, thus speeding up considerably the jobs while reducing the IO and memory load.&lt;br /&gt;
&lt;br /&gt;
We will first compute the exciton-phonon coupling matrix elements: these are the building blocks needed to construct experimental observables such as phonon-assisted optical spectra (such as luminescence), Raman spectra and exciton lifetimes. We will do this in the case of monolayer MoS2, a 2D system with large spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
As an example of application, we will consider the case of phonon-assisted luminescence. We will do this in the case of bulk hBN, a layered indirect insulator with strong electron-phonon coupling.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; this tutorial will be updated when new exc-ph tools become available in Yambopy (including full-python postprocessing, Raman spectra, interpolated lifetimes, etc).&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This is an advanced topic: we assume that you already know something about the theory&amp;lt;ref name=&amp;quot;toyozawa2003&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;antonius2017&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;cudazzo2020&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;paleari2019_PhD&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;paleari2022&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;lechifflart2023_PhD&amp;quot; /&amp;gt; and applications&amp;lt;ref name=&amp;quot;paleari2019&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;cannuccia2019&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;chen2020&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;zanfrognini2023&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;lechifflart2023&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;chan2023&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;marini2024&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;murali2025&amp;quot; /&amp;gt; of exciton-phonon physics. &lt;br /&gt;
&lt;br /&gt;
Also, we assume that you already know how to run both a basic &#039;&#039;&#039;Yambo&#039;&#039;&#039; GW-BSE calculation and a DFPT phonon calculation with &#039;&#039;&#039;Quantum ESPRESSO&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Besides the QE executables &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ph.x&amp;lt;/code&amp;gt;, we also use the yambo phonon-specific executable &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt; and the python utility &#039;&#039;&#039;Yambopy&#039;&#039;&#039;. The auxiliary code &#039;&#039;&#039;LetzElPhC&#039;&#039;&#039; (executable &amp;lt;code&amp;gt;lelphc&amp;lt;/code&amp;gt;) will be used to obtain the electron-phonon matrix elements by reading the same electronic wavefunctions used by Yambo (and stored in the &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; directory), while also making full use of crystal symmetries. LetzElPhC (link) will be run by Yambopy, but it must nonetheless be installed. Finally, the exciton-phonon properties can be computed either using &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt; or using Yambopy itself.&lt;br /&gt;
&lt;br /&gt;
[[File:Workflow scheme.png|800px|center]]&lt;br /&gt;
&lt;br /&gt;
== Step 0: Pseudopotentials, equilibrium structure and convergence ==&lt;br /&gt;
&lt;br /&gt;
In a real calculation, it is important to ensure that both the pseudopotential and the lattice parameters that we are using are compatible and perform well for the electronic excited states and for the lattice vibrations simultaneously. Furthermore, you have to make sure that the wave function cutoff &amp;lt;code&amp;gt;ecutwfc&amp;lt;/code&amp;gt; is converged with respect to the DFPT step and not just to the DFT one. This is in addition to the other customary convergence tests for DFT, DFPT, GW and BSE calculations.&lt;br /&gt;
&lt;br /&gt;
This is often the most time-demanding step when starting on a new system.&lt;br /&gt;
&lt;br /&gt;
For the sake of this tutorial, we assume that we have already done all these tests and we are starting the final workflow to get the exciton-phonon properties.&lt;br /&gt;
&lt;br /&gt;
== Step 1: scf calculation ==&lt;br /&gt;
&lt;br /&gt;
First of all, we run a standard scf calculation with &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; for Yambo. We stick with non-symmorphic symmetries. At the end, we will have the QE &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
INPUT&lt;br /&gt;
&lt;br /&gt;
 mpirun -np 4 pw.x -inp mos2.scf &amp;gt; scf.out&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;toyozawa2003&amp;quot; &amp;gt;Optical processes in solids, Toyozawa, Yutaka, and Chris Oxlade. Cambridge University Press, (2003). &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;lechifflart2023&#039;&amp;gt;P. Lechifflart, F. Paleari, D. Sangalli, C. Attaccalite, &#039;&#039;First-principles study of luminescence in hexagonal boron nitride single layer: Exciton-phonon coupling and the role of substrate&#039;&#039;, &lt;br /&gt;
[https://doi.org/10.1103/PhysRevMaterials.7.024006 Phys. Rev. M, &#039;&#039;&#039;7&#039;&#039;&#039; (2), 024006 (2023)]; [https://arxiv.org/abs/2212.10407 arXiv2212.1047]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;cannuccia2019&#039;&amp;gt;E. Cannuccia, B. Monserrat and C. Attaccalite, &#039;&#039;Theory of phonon-assisted luminescence in solids: Application to hexagonal boron nitride&#039;&#039;, [https://doi.org/10.1103/PhysRevB.99.081109 Phys. Rev. B &#039;&#039;&#039;99&#039;&#039;&#039;, 081109(R) (2019)]; [https://arxiv.org/abs/1807.11797 arXiv1807.11797]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;paleari2019&#039;&amp;gt;F. Paleari et al., &#039;&#039;Exciton-Phonon Coupling in the Ultraviolet Absorption and Emission Spectra of Bulk Hexagonal Boron Nitride&#039;&#039;, [https://doi.org/10.1103/PhysRevLett.122.187401 Phys. Rev. Lett. &#039;&#039;&#039;122&#039;&#039;&#039;, 187401 (2019)]; [https://arxiv.org/abs/1810.08976 arXiv1810.089776] &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;chen2020&#039;&amp;gt;[https://arxiv.org/abs/2002.08913 Exciton-Phonon Interaction and Relaxation Times from First Principles],&lt;br /&gt;
Hsiao-Yi Chen, Davide Sangalli, and Marco Bernardi, Phys. Rev. Lett. &#039;&#039;&#039;125&#039;&#039;&#039;, 107401(2020)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;lechifflart2023_PhD&amp;quot;&amp;gt;[https://www.yambo-code.eu/wiki/images/5/54/These_final.pdf Exciton-phonon coupling and phonon-assisted luminescence in hexagonal Boron Nitride nanostructures], PhD Thesis, Pierre Lechifflart (2023)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;paleari2019_PhD&#039;&amp;gt;F. Paleari, &#039;&#039;First-principles approaches to the description of indirect absorption and luminescence spectroscopy: exciton-phonon coupling in hexagonal boron nitride&#039;&#039;, [https://wwwen.uni.lu/research/fstm/dphyms/people/fulvio_paleari PhD thesis, University of Luxembourg (2019)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;zanfrognini2023&#039;&amp;gt;[https://arxiv.org/abs/2305.17554 Distinguishing different stackings in layered materials via luminescence spectroscopy], M. Zanfrognini et al. Phys. Rev. Lett. &#039;&#039;&#039;131&#039;&#039;&#039;, 206902 (2023) &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;marini2024&#039;&amp;gt;[https://arxiv.org/abs/2402.03826 Optical absorption and photoluminescence of single layer boron nitride from a first principles cumulant approach], G. Marini, M. Calandra, P. Cudazzo, Nano Lett., &#039;&#039;&#039;24&#039;&#039;&#039;, 20, 6017 (2024)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;antonius2017&#039;&amp;gt;G. Antonius, S. G. Louie, &#039;&#039;Theory of exciton-phonon coupling&#039;&#039;, [https://doi.org/10.1103/PhysRevB.105.085111 Phys. Rev. B, &#039;&#039;&#039;105&#039;&#039;&#039;, 085111 (2022)]; [https://arxiv.org/abs/1705.04245 arXiv1705.04245 (2017)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;paleari2022&#039;&amp;gt;[https://arxiv.org/abs/2205.02783 Exciton-phonon interaction calls for a revision of the “exciton” concept], F. Paleari, A. Marini, Phys. Rev. B, &#039;&#039;&#039;106&#039;&#039;&#039;, 125403 (2022)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;cudazzo2020&#039;&amp;gt; P. Cudazzo, &#039;&#039;First-principles description of the exciton-phonon interaction: A cumulant approach&#039;&#039;, [https://doi.org/10.1103/PhysRevB.102.045136 Phys. Rev. B, &#039;&#039;&#039;102&#039;&#039;&#039;, 045136 (2020)]; [https://orbilu.uni.lu/bitstream/10993/44769/1/main.pdf Open access pdf from Luxembourg University]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;chan2023&#039;&amp;gt;[https://arxiv.org/abs/2212.08451 Exciton Lifetime and Optical Line Width Profile via Exciton–Phonon Interactions: Theory and First-Principles Calculations for Monolayer MoS2], Y-h Chan, J. B. Haber, M. H. Naik, J. B. Neaton, D. Y. Qiu, F. H. da Jornada, S. G. Louie, Nano Lett., &#039;&#039;&#039;23&#039;&#039;&#039;, 9 (2023)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;murali2025&#039;&amp;gt;[https://arxiv.org/abs/2407.16111 Origin of Interlayer Exciton–Phonon Coupling in 2D Heterostructures], M. Nalabothula, S. Reichardt, L. Wirtz, Nano Lett., &#039;&#039;&#039;25&#039;&#039;&#039;, 15 (2025)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Exciton-phonon_coupling_and_luminescence&amp;diff=9058</id>
		<title>Exciton-phonon coupling and luminescence</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Exciton-phonon_coupling_and_luminescence&amp;diff=9058"/>
		<updated>2025-09-18T15:32:24Z</updated>

		<summary type="html">&lt;p&gt;Davide: renference names&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Tdgw-phonon-usc-01-1024x829.jpg| 400px | right]]&lt;br /&gt;
&lt;br /&gt;
In this advanced tutorial, we will calculate exciton-phonon interactions from first principles by interfacing DFPT (for phonon calculations) and BSE (for exciton calculations).&lt;br /&gt;
&lt;br /&gt;
The DFTP calculations are run with Quantum ESPRESSO, while the many-body GW-BSE calculations are run with Yambo. Finally, the exciton-phonon interaction will be obtained by combining and postprocessing the databases computed in the two previous runs. The great advantage of this workflow is that the calculations can be run in the irreducible Brillouin zones both for the electronic momenta (&amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;) and the transfer momenta (&amp;lt;math&amp;gt;Q&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt;) of excitons and phonons, thus speeding up considerably the jobs while reducing the IO and memory load.&lt;br /&gt;
&lt;br /&gt;
We will first compute the exciton-phonon coupling matrix elements: these are the building blocks needed to construct experimental observables such as phonon-assisted optical spectra (such as luminescence), Raman spectra and exciton lifetimes. We will do this in the case of monolayer MoS2, a 2D system with large spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
As an example of application, we will consider the case of phonon-assisted luminescence. We will do this in the case of bulk hBN, a layered indirect insulator with strong electron-phonon coupling.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; this tutorial will be updated when new exc-ph tools become available in Yambopy (including full-python postprocessing, Raman spectra, interpolated lifetimes, etc).&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This is an advanced topic: we assume that you already know something about the theory&amp;lt;ref name=&amp;quot;toyozawa2003&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;cudazzo2020&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;antonius2017&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;paleari2022&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;paleari2019_PhD&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;lechifflart2023_PhD&amp;quot; /&amp;gt; and applications&amp;lt;ref name=&amp;quot;zanfrognini2023&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;lechifflart2023&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;marini2024&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;chan2023&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;murali2025&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;chen2020&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;paleari2019&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;cannuccia2019&amp;quot; /&amp;gt; of exciton-phonon physics. &lt;br /&gt;
&lt;br /&gt;
Also, we assume that you already know how to run both a basic &#039;&#039;&#039;Yambo&#039;&#039;&#039; GW-BSE calculation and a DFPT phonon calculation with &#039;&#039;&#039;Quantum ESPRESSO&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Besides the QE executables &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ph.x&amp;lt;/code&amp;gt;, we also use the yambo phonon-specific executable &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt; and the python utility &#039;&#039;&#039;Yambopy&#039;&#039;&#039;. The auxiliary code &#039;&#039;&#039;LetzElPhC&#039;&#039;&#039; (executable &amp;lt;code&amp;gt;lelphc&amp;lt;/code&amp;gt;) will be used to obtain the electron-phonon matrix elements by reading the same electronic wavefunctions used by Yambo (and stored in the &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; directory), while also making full use of crystal symmetries. LetzElPhC (link) will be run by Yambopy, but it must nonetheless be installed. Finally, the exciton-phonon properties can be computed either using &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt; or using Yambopy itself.&lt;br /&gt;
&lt;br /&gt;
[[File:Workflow scheme.png|800px|center]]&lt;br /&gt;
&lt;br /&gt;
== Step 0: Pseudopotentials, equilibrium structure and convergence ==&lt;br /&gt;
&lt;br /&gt;
In a real calculation, it is important to ensure that both the pseudopotential and the lattice parameters that we are using are compatible and perform well for the electronic excited states and for the lattice vibrations simultaneously. Furthermore, you have to make sure that the wave function cutoff &amp;lt;code&amp;gt;ecutwfc&amp;lt;/code&amp;gt; is converged with respect to the DFPT step and not just to the DFT one. This is in addition to the other customary convergence tests for DFT, DFPT, GW and BSE calculations.&lt;br /&gt;
&lt;br /&gt;
This is often the most time-demanding step when starting on a new system.&lt;br /&gt;
&lt;br /&gt;
For the sake of this tutorial, we assume that we have already done all these tests and we are starting the final workflow to get the exciton-phonon properties.&lt;br /&gt;
&lt;br /&gt;
== Step 1: scf calculation ==&lt;br /&gt;
&lt;br /&gt;
First of all, we run a standard scf calculation with &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; for Yambo. We stick with non-symmorphic symmetries. At the end, we will have the QE &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
INPUT&lt;br /&gt;
&lt;br /&gt;
 mpirun -np 4 pw.x -inp mos2.scf &amp;gt; scf.out&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;toyozawa2003&amp;quot; &amp;gt;Optical processes in solids, Toyozawa, Yutaka, and Chris Oxlade. Cambridge University Press, (2003). &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;lechifflart2023&#039;&amp;gt;P. Lechifflart, F. Paleari, D. Sangalli, C. Attaccalite, &#039;&#039;First-principles study of luminescence in hexagonal boron nitride single layer: Exciton-phonon coupling and the role of substrate&#039;&#039;, &lt;br /&gt;
[https://doi.org/10.1103/PhysRevMaterials.7.024006 Phys. Rev. M, &#039;&#039;&#039;7&#039;&#039;&#039; (2), 024006 (2023)]; [https://arxiv.org/abs/2212.10407 arXiv2212.1047]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;cannuccia2019&#039;&amp;gt;E. Cannuccia, B. Monserrat and C. Attaccalite, &#039;&#039;Theory of phonon-assisted luminescence in solids: Application to hexagonal boron nitride&#039;&#039;, [https://doi.org/10.1103/PhysRevB.99.081109 Phys. Rev. B &#039;&#039;&#039;99&#039;&#039;&#039;, 081109(R) (2019)]; [https://arxiv.org/abs/1807.11797 arXiv1807.11797]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;paleari2019&#039;&amp;gt;F. Paleari et al., &#039;&#039;Exciton-Phonon Coupling in the Ultraviolet Absorption and Emission Spectra of Bulk Hexagonal Boron Nitride&#039;&#039;, [https://doi.org/10.1103/PhysRevLett.122.187401 Phys. Rev. Lett. &#039;&#039;&#039;122&#039;&#039;&#039;, 187401 (2019)]; [https://arxiv.org/abs/1810.08976 arXiv1810.089776] &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;chen2020&#039;&amp;gt;[https://arxiv.org/abs/2002.08913 Exciton-Phonon Interaction and Relaxation Times from First Principles],&lt;br /&gt;
Hsiao-Yi Chen, Davide Sangalli, and Marco Bernardi, Phys. Rev. Lett. &#039;&#039;&#039;125&#039;&#039;&#039;, 107401(2020)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;lechifflart2023_PhD&amp;quot;&amp;gt;[https://www.yambo-code.eu/wiki/images/5/54/These_final.pdf Exciton-phonon coupling and phonon-assisted luminescence in hexagonal Boron Nitride nanostructures], PhD Thesis, Pierre Lechifflart (2023)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;paleari2019_PhD&#039;&amp;gt;F. Paleari, &#039;&#039;First-principles approaches to the description of indirect absorption and luminescence spectroscopy: exciton-phonon coupling in hexagonal boron nitride&#039;&#039;, [https://wwwen.uni.lu/research/fstm/dphyms/people/fulvio_paleari PhD thesis, University of Luxembourg (2019)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;zanfrognini2023&#039;&amp;gt;[https://arxiv.org/abs/2305.17554 Distinguishing different stackings in layered materials via luminescence spectroscopy], M. Zanfrognini et al. Phys. Rev. Lett. &#039;&#039;&#039;131&#039;&#039;&#039;, 206902 (2023) &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;marini2024&#039;&amp;gt;[https://arxiv.org/abs/2402.03826 Optical absorption and photoluminescence of single layer boron nitride from a first principles cumulant approach], G. Marini, M. Calandra, P. Cudazzo, Nano Lett., &#039;&#039;&#039;24&#039;&#039;&#039;, 20, 6017 (2024)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;antonius2017&#039;&amp;gt;G. Antonius, S. G. Louie, &#039;&#039;Theory of exciton-phonon coupling&#039;&#039;, [https://doi.org/10.1103/PhysRevB.105.085111 Phys. Rev. B, &#039;&#039;&#039;105&#039;&#039;&#039;, 085111 (2022)]; [https://arxiv.org/abs/1705.04245 arXiv1705.04245 (2017)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;paleari2022&#039;&amp;gt;[https://arxiv.org/abs/2205.02783 Exciton-phonon interaction calls for a revision of the “exciton” concept], F. Paleari, A. Marini, Phys. Rev. B, &#039;&#039;&#039;106&#039;&#039;&#039;, 125403 (2022)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;cudazzo2020&#039;&amp;gt; P. Cudazzo, &#039;&#039;First-principles description of the exciton-phonon interaction: A cumulant approach&#039;&#039;, [https://doi.org/10.1103/PhysRevB.102.045136 Phys. Rev. B, &#039;&#039;&#039;102&#039;&#039;&#039;, 045136 (2020)]; [https://orbilu.uni.lu/bitstream/10993/44769/1/main.pdf Open access pdf from Luxembourg University]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;chan2023&#039;&amp;gt;[https://arxiv.org/abs/2212.08451 Exciton Lifetime and Optical Line Width Profile via Exciton–Phonon Interactions: Theory and First-Principles Calculations for Monolayer MoS2], Y-h Chan, J. B. Haber, M. H. Naik, J. B. Neaton, D. Y. Qiu, F. H. da Jornada, S. G. Louie, Nano Lett., &#039;&#039;&#039;23&#039;&#039;&#039;, 9 (2023)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;murali2025&#039;&amp;gt;[https://arxiv.org/abs/2407.16111 Origin of Interlayer Exciton–Phonon Coupling in 2D Heterostructures], M. Nalabothula, S. Reichardt, L. Wirtz, Nano Lett., &#039;&#039;&#039;25&#039;&#039;&#039;, 15 (2025)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Exciton-phonon_coupling_and_luminescence&amp;diff=9057</id>
		<title>Exciton-phonon coupling and luminescence</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Exciton-phonon_coupling_and_luminescence&amp;diff=9057"/>
		<updated>2025-09-18T15:29:22Z</updated>

		<summary type="html">&lt;p&gt;Davide: References format is surname+year. Used for then re-ordering in time&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Tdgw-phonon-usc-01-1024x829.jpg| 400px | right]]&lt;br /&gt;
&lt;br /&gt;
In this advanced tutorial, we will calculate exciton-phonon interactions from first principles by interfacing DFPT (for phonon calculations) and BSE (for exciton calculations).&lt;br /&gt;
&lt;br /&gt;
The DFTP calculations are run with Quantum ESPRESSO, while the many-body GW-BSE calculations are run with Yambo. Finally, the exciton-phonon interaction will be obtained by combining and postprocessing the databases computed in the two previous runs. The great advantage of this workflow is that the calculations can be run in the irreducible Brillouin zones both for the electronic momenta (&amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;) and the transfer momenta (&amp;lt;math&amp;gt;Q&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt;) of excitons and phonons, thus speeding up considerably the jobs while reducing the IO and memory load.&lt;br /&gt;
&lt;br /&gt;
We will first compute the exciton-phonon coupling matrix elements: these are the building blocks needed to construct experimental observables such as phonon-assisted optical spectra (such as luminescence), Raman spectra and exciton lifetimes. We will do this in the case of monolayer MoS2, a 2D system with large spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
As an example of application, we will consider the case of phonon-assisted luminescence. We will do this in the case of bulk hBN, a layered indirect insulator with strong electron-phonon coupling.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; this tutorial will be updated when new exc-ph tools become available in Yambopy (including full-python postprocessing, Raman spectra, interpolated lifetimes, etc).&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This is an advanced topic: we assume that you already know something about the theory&amp;lt;ref name=&amp;quot;Toyozawa&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;cudazzo2020&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;antonius2017&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;paleari2022&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;paleari2019_PhD&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;lechifflart2023_PhD&amp;quot; /&amp;gt; and applications&amp;lt;ref name=&amp;quot;zanfrognini&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;lechifflart2023&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;marini_g&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;chan&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;murali&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;chen&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;paleari2019&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;elena&amp;quot; /&amp;gt; of exciton-phonon physics. &lt;br /&gt;
&lt;br /&gt;
Also, we assume that you already know how to run both a basic &#039;&#039;&#039;Yambo&#039;&#039;&#039; GW-BSE calculation and a DFPT phonon calculation with &#039;&#039;&#039;Quantum ESPRESSO&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Besides the QE executables &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ph.x&amp;lt;/code&amp;gt;, we also use the yambo phonon-specific executable &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt; and the python utility &#039;&#039;&#039;Yambopy&#039;&#039;&#039;. The auxiliary code &#039;&#039;&#039;LetzElPhC&#039;&#039;&#039; (executable &amp;lt;code&amp;gt;lelphc&amp;lt;/code&amp;gt;) will be used to obtain the electron-phonon matrix elements by reading the same electronic wavefunctions used by Yambo (and stored in the &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; directory), while also making full use of crystal symmetries. LetzElPhC (link) will be run by Yambopy, but it must nonetheless be installed. Finally, the exciton-phonon properties can be computed either using &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt; or using Yambopy itself.&lt;br /&gt;
&lt;br /&gt;
[[File:Workflow scheme.png|800px|center]]&lt;br /&gt;
&lt;br /&gt;
== Step 0: Pseudopotentials, equilibrium structure and convergence ==&lt;br /&gt;
&lt;br /&gt;
In a real calculation, it is important to ensure that both the pseudopotential and the lattice parameters that we are using are compatible and perform well for the electronic excited states and for the lattice vibrations simultaneously. Furthermore, you have to make sure that the wave function cutoff &amp;lt;code&amp;gt;ecutwfc&amp;lt;/code&amp;gt; is converged with respect to the DFPT step and not just to the DFT one. This is in addition to the other customary convergence tests for DFT, DFPT, GW and BSE calculations.&lt;br /&gt;
&lt;br /&gt;
This is often the most time-demanding step when starting on a new system.&lt;br /&gt;
&lt;br /&gt;
For the sake of this tutorial, we assume that we have already done all these tests and we are starting the final workflow to get the exciton-phonon properties.&lt;br /&gt;
&lt;br /&gt;
== Step 1: scf calculation ==&lt;br /&gt;
&lt;br /&gt;
First of all, we run a standard scf calculation with &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; for Yambo. We stick with non-symmorphic symmetries. At the end, we will have the QE &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
INPUT&lt;br /&gt;
&lt;br /&gt;
 mpirun -np 4 pw.x -inp mos2.scf &amp;gt; scf.out&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;Toyozawa&amp;quot; &amp;gt;Optical processes in solids, Toyozawa, Yutaka, and Chris Oxlade. Cambridge University Press, (2003). &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;lechifflart2023&#039;&amp;gt;P. Lechifflart, F. Paleari, D. Sangalli, C. Attaccalite, &#039;&#039;First-principles study of luminescence in hexagonal boron nitride single layer: Exciton-phonon coupling and the role of substrate&#039;&#039;, &lt;br /&gt;
[https://doi.org/10.1103/PhysRevMaterials.7.024006 Phys. Rev. M, &#039;&#039;&#039;7&#039;&#039;&#039; (2), 024006 (2023)]; [https://arxiv.org/abs/2212.10407 arXiv2212.1047]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;elena&#039;&amp;gt;E. Cannuccia, B. Monserrat and C. Attaccalite, &#039;&#039;Theory of phonon-assisted luminescence in solids: Application to hexagonal boron nitride&#039;&#039;, [https://doi.org/10.1103/PhysRevB.99.081109 Phys. Rev. B &#039;&#039;&#039;99&#039;&#039;&#039;, 081109(R) (2019)]; [https://arxiv.org/abs/1807.11797 arXiv1807.11797]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;paleari2019&#039;&amp;gt;F. Paleari et al., &#039;&#039;Exciton-Phonon Coupling in the Ultraviolet Absorption and Emission Spectra of Bulk Hexagonal Boron Nitride&#039;&#039;, [https://doi.org/10.1103/PhysRevLett.122.187401 Phys. Rev. Lett. &#039;&#039;&#039;122&#039;&#039;&#039;, 187401 (2019)]; [https://arxiv.org/abs/1810.08976 arXiv1810.089776] &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;chen&#039;&amp;gt;[https://arxiv.org/abs/2002.08913 Exciton-Phonon Interaction and Relaxation Times from First Principles],&lt;br /&gt;
Hsiao-Yi Chen, Davide Sangalli, and Marco Bernardi, Phys. Rev. Lett. &#039;&#039;&#039;125&#039;&#039;&#039;, 107401(2020)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;lechifflart2023_PhD&amp;quot;&amp;gt;[https://www.yambo-code.eu/wiki/images/5/54/These_final.pdf Exciton-phonon coupling and phonon-assisted luminescence in hexagonal Boron Nitride nanostructures], PhD Thesis, Pierre Lechifflart (2023)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;paleari2019_PhD&#039;&amp;gt;F. Paleari, &#039;&#039;First-principles approaches to the description of indirect absorption and luminescence spectroscopy: exciton-phonon coupling in hexagonal boron nitride&#039;&#039;, [https://wwwen.uni.lu/research/fstm/dphyms/people/fulvio_paleari PhD thesis, University of Luxembourg (2019)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;zanfrognini&#039;&amp;gt;[https://arxiv.org/abs/2305.17554 Distinguishing different stackings in layered materials via luminescence spectroscopy], M. Zanfrognini et al. Phys. Rev. Lett. &#039;&#039;&#039;131&#039;&#039;&#039;, 206902 (2023) &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;marini_g&#039;&amp;gt;[https://arxiv.org/abs/2402.03826 Optical absorption and photoluminescence of single layer boron nitride from a first principles cumulant approach], G. Marini, M. Calandra, P. Cudazzo, Nano Lett., &#039;&#039;&#039;24&#039;&#039;&#039;, 20, 6017 (2024)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;antonius2017&#039;&amp;gt;G. Antonius, S. G. Louie, &#039;&#039;Theory of exciton-phonon coupling&#039;&#039;, [https://doi.org/10.1103/PhysRevB.105.085111 Phys. Rev. B, &#039;&#039;&#039;105&#039;&#039;&#039;, 085111 (2022)]; [https://arxiv.org/abs/1705.04245 arXiv1705.04245 (2017)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;paleari2022&#039;&amp;gt;[https://arxiv.org/abs/2205.02783 Exciton-phonon interaction calls for a revision of the “exciton” concept], F. Paleari, A. Marini, Phys. Rev. B, &#039;&#039;&#039;106&#039;&#039;&#039;, 125403 (2022)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;cudazzo2020&#039;&amp;gt; P. Cudazzo, &#039;&#039;First-principles description of the exciton-phonon interaction: A cumulant approach&#039;&#039;, [https://doi.org/10.1103/PhysRevB.102.045136 Phys. Rev. B, &#039;&#039;&#039;102&#039;&#039;&#039;, 045136 (2020)]; [https://orbilu.uni.lu/bitstream/10993/44769/1/main.pdf Open access pdf from Luxembourg University]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;chan&#039;&amp;gt;[https://arxiv.org/abs/2212.08451 Exciton Lifetime and Optical Line Width Profile via Exciton–Phonon Interactions: Theory and First-Principles Calculations for Monolayer MoS2], Y-h Chan, J. B. Haber, M. H. Naik, J. B. Neaton, D. Y. Qiu, F. H. da Jornada, S. G. Louie, Nano Lett., &#039;&#039;&#039;23&#039;&#039;&#039;, 9 (2023)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;murali&#039;&amp;gt;[https://arxiv.org/abs/2407.16111 Origin of Interlayer Exciton–Phonon Coupling in 2D Heterostructures], M. Nalabothula, S. Reichardt, L. Wirtz, Nano Lett., &#039;&#039;&#039;25&#039;&#039;&#039;, 15 (2025)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Exciton-phonon_coupling_and_luminescence&amp;diff=9056</id>
		<title>Exciton-phonon coupling and luminescence</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Exciton-phonon_coupling_and_luminescence&amp;diff=9056"/>
		<updated>2025-09-18T15:26:06Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Tdgw-phonon-usc-01-1024x829.jpg| 400px | right]]&lt;br /&gt;
&lt;br /&gt;
In this advanced tutorial, we will calculate exciton-phonon interactions from first principles by interfacing DFPT (for phonon calculations) and BSE (for exciton calculations).&lt;br /&gt;
&lt;br /&gt;
The DFTP calculations are run with Quantum ESPRESSO, while the many-body GW-BSE calculations are run with Yambo. Finally, the exciton-phonon interaction will be obtained by combining and postprocessing the databases computed in the two previous runs. The great advantage of this workflow is that the calculations can be run in the irreducible Brillouin zones both for the electronic momenta (&amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;) and the transfer momenta (&amp;lt;math&amp;gt;Q&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt;) of excitons and phonons, thus speeding up considerably the jobs while reducing the IO and memory load.&lt;br /&gt;
&lt;br /&gt;
We will first compute the exciton-phonon coupling matrix elements: these are the building blocks needed to construct experimental observables such as phonon-assisted optical spectra (such as luminescence), Raman spectra and exciton lifetimes. We will do this in the case of monolayer MoS2, a 2D system with large spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
As an example of application, we will consider the case of phonon-assisted luminescence. We will do this in the case of bulk hBN, a layered indirect insulator with strong electron-phonon coupling.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; this tutorial will be updated when new exc-ph tools become available in Yambopy (including full-python postprocessing, Raman spectra, interpolated lifetimes, etc).&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This is an advanced topic: we assume that you already know something about the theory&amp;lt;ref name=&amp;quot;Toyozawa&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;cudazzo&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;antonius&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;fulvio2&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;fulvio_thesis&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;pierre_thesis&amp;quot; /&amp;gt; and applications&amp;lt;ref name=&amp;quot;zanfrognini&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;pierre&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;marini_g&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;chan&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;murali&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;chen&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;fulvio1&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;elena&amp;quot; /&amp;gt; of exciton-phonon physics. &lt;br /&gt;
&lt;br /&gt;
Also, we assume that you already know how to run both a basic &#039;&#039;&#039;Yambo&#039;&#039;&#039; GW-BSE calculation and a DFPT phonon calculation with &#039;&#039;&#039;Quantum ESPRESSO&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Besides the QE executables &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ph.x&amp;lt;/code&amp;gt;, we also use the yambo phonon-specific executable &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt; and the python utility &#039;&#039;&#039;Yambopy&#039;&#039;&#039;. The auxiliary code &#039;&#039;&#039;LetzElPhC&#039;&#039;&#039; (executable &amp;lt;code&amp;gt;lelphc&amp;lt;/code&amp;gt;) will be used to obtain the electron-phonon matrix elements by reading the same electronic wavefunctions used by Yambo (and stored in the &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; directory), while also making full use of crystal symmetries. LetzElPhC (link) will be run by Yambopy, but it must nonetheless be installed. Finally, the exciton-phonon properties can be computed either using &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt; or using Yambopy itself.&lt;br /&gt;
&lt;br /&gt;
[[File:Workflow scheme.png|800px|center]]&lt;br /&gt;
&lt;br /&gt;
== Step 0: Pseudopotentials, equilibrium structure and convergence ==&lt;br /&gt;
&lt;br /&gt;
In a real calculation, it is important to ensure that both the pseudopotential and the lattice parameters that we are using are compatible and perform well for the electronic excited states and for the lattice vibrations simultaneously. Furthermore, you have to make sure that the wave function cutoff &amp;lt;code&amp;gt;ecutwfc&amp;lt;/code&amp;gt; is converged with respect to the DFPT step and not just to the DFT one. This is in addition to the other customary convergence tests for DFT, DFPT, GW and BSE calculations.&lt;br /&gt;
&lt;br /&gt;
This is often the most time-demanding step when starting on a new system.&lt;br /&gt;
&lt;br /&gt;
For the sake of this tutorial, we assume that we have already done all these tests and we are starting the final workflow to get the exciton-phonon properties.&lt;br /&gt;
&lt;br /&gt;
== Step 1: scf calculation ==&lt;br /&gt;
&lt;br /&gt;
First of all, we run a standard scf calculation with &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; for Yambo. We stick with non-symmorphic symmetries. At the end, we will have the QE &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
INPUT&lt;br /&gt;
&lt;br /&gt;
 mpirun -np 4 pw.x -inp mos2.scf &amp;gt; scf.out&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;Toyozawa&amp;quot; &amp;gt;Optical processes in solids, Toyozawa, Yutaka, and Chris Oxlade. Cambridge University Press, (2003). &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;pierre&#039;&amp;gt;P. Lechifflart, F. Paleari, D. Sangalli, C. Attaccalite, &#039;&#039;First-principles study of luminescence in hexagonal boron nitride single layer: Exciton-phonon coupling and the role of substrate&#039;&#039;, &lt;br /&gt;
[https://doi.org/10.1103/PhysRevMaterials.7.024006 Phys. Rev. M, &#039;&#039;&#039;7&#039;&#039;&#039; (2), 024006 (2023)]; [https://arxiv.org/abs/2212.10407 arXiv2212.1047]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;elena&#039;&amp;gt;E. Cannuccia, B. Monserrat and C. Attaccalite, &#039;&#039;Theory of phonon-assisted luminescence in solids: Application to hexagonal boron nitride&#039;&#039;, [https://doi.org/10.1103/PhysRevB.99.081109 Phys. Rev. B &#039;&#039;&#039;99&#039;&#039;&#039;, 081109(R) (2019)]; [https://arxiv.org/abs/1807.11797 arXiv1807.11797]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;fulvio1&#039;&amp;gt;F. Paleari et al., &#039;&#039;Exciton-Phonon Coupling in the Ultraviolet Absorption and Emission Spectra of Bulk Hexagonal Boron Nitride&#039;&#039;, [https://doi.org/10.1103/PhysRevLett.122.187401 Phys. Rev. Lett. &#039;&#039;&#039;122&#039;&#039;&#039;, 187401 (2019)]; [https://arxiv.org/abs/1810.08976 arXiv1810.089776] &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;chen&#039;&amp;gt;[https://arxiv.org/abs/2002.08913 Exciton-Phonon Interaction and Relaxation Times from First Principles],&lt;br /&gt;
Hsiao-Yi Chen, Davide Sangalli, and Marco Bernardi, Phys. Rev. Lett. &#039;&#039;&#039;125&#039;&#039;&#039;, 107401(2020)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;pierre_thesis&amp;quot;&amp;gt;[https://www.yambo-code.eu/wiki/images/5/54/These_final.pdf Exciton-phonon coupling and phonon-assisted luminescence in hexagonal Boron Nitride nanostructures], PhD Thesis, Pierre Lechifflart (2023)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;fulvio_thesis&#039;&amp;gt;F. Paleari, &#039;&#039;First-principles approaches to the description of indirect absorption and luminescence spectroscopy: exciton-phonon coupling in hexagonal boron nitride&#039;&#039;, [https://wwwen.uni.lu/research/fstm/dphyms/people/fulvio_paleari PhD thesis, University of Luxembourg (2019)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;zanfrognini&#039;&amp;gt;[https://arxiv.org/abs/2305.17554 Distinguishing different stackings in layered materials via luminescence spectroscopy], M. Zanfrognini et al. Phys. Rev. Lett. &#039;&#039;&#039;131&#039;&#039;&#039;, 206902 (2023) &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;marini_g&#039;&amp;gt;[https://arxiv.org/abs/2402.03826 Optical absorption and photoluminescence of single layer boron nitride from a first principles cumulant approach], G. Marini, M. Calandra, P. Cudazzo, Nano Lett., &#039;&#039;&#039;24&#039;&#039;&#039;, 20, 6017 (2024)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;antonius&#039;&amp;gt;G. Antonius, S. G. Louie, &#039;&#039;Theory of exciton-phonon coupling&#039;&#039;, [https://doi.org/10.1103/PhysRevB.105.085111 Phys. Rev. B, &#039;&#039;&#039;105&#039;&#039;&#039;, 085111 (2022)]; [https://arxiv.org/abs/1705.04245 arXiv1705.04245 (2017)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;fulvio2&#039;&amp;gt;[https://arxiv.org/abs/2205.02783 Exciton-phonon interaction calls for a revision of the “exciton” concept], F. Paleari, A. Marini, Phys. Rev. B, &#039;&#039;&#039;106&#039;&#039;&#039;, 125403 (2022)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;cudazzo&#039;&amp;gt; P. Cudazzo, &#039;&#039;First-principles description of the exciton-phonon interaction: A cumulant approach&#039;&#039;, [https://doi.org/10.1103/PhysRevB.102.045136 Phys. Rev. B, &#039;&#039;&#039;102&#039;&#039;&#039;, 045136 (2020)]; [https://orbilu.uni.lu/bitstream/10993/44769/1/main.pdf Open access pdf from Luxembourg University]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;chan&#039;&amp;gt;[https://arxiv.org/abs/2212.08451 Exciton Lifetime and Optical Line Width Profile via Exciton–Phonon Interactions: Theory and First-Principles Calculations for Monolayer MoS2], Y-h Chan, J. B. Haber, M. H. Naik, J. B. Neaton, D. Y. Qiu, F. H. da Jornada, S. G. Louie, Nano Lett., &#039;&#039;&#039;23&#039;&#039;&#039;, 9 (2023)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;murali&#039;&amp;gt;[https://arxiv.org/abs/2407.16111 Origin of Interlayer Exciton–Phonon Coupling in 2D Heterostructures], M. Nalabothula, S. Reichardt, L. Wirtz, Nano Lett., &#039;&#039;&#039;25&#039;&#039;&#039;, 15 (2025)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Exciton-phonon_coupling_and_luminescence&amp;diff=9055</id>
		<title>Exciton-phonon coupling and luminescence</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Exciton-phonon_coupling_and_luminescence&amp;diff=9055"/>
		<updated>2025-09-18T15:24:05Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Tdgw-phonon-usc-01-1024x829.jpg| 400px | right]]&lt;br /&gt;
&lt;br /&gt;
In this advanced tutorial, we will calculate exciton-phonon interactions from first principles by interfacing DFPT (for phonon calculations) and BSE (for exciton calculations).&lt;br /&gt;
&lt;br /&gt;
The DFTP calculations are run with Quantum ESPRESSO, while the many-body GW-BSE calculations are run with Yambo. Finally, the exciton-phonon interaction will be obtained by combining and postprocessing the databases computed in the two previous runs. The great advantage of this workflow is that the calculations can be run in the irreducible Brillouin zones both for the electronic momenta (&amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;) and the transfer momenta (&amp;lt;math&amp;gt;Q&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt;) of excitons and phonons, thus speeding up considerably the jobs while reducing the IO and memory load.&lt;br /&gt;
&lt;br /&gt;
We will first compute the exciton-phonon coupling matrix elements: these are the building blocks needed to construct experimental observables such as phonon-assisted optical spectra (such as luminescence), Raman spectra and exciton lifetimes. We will do this in the case of monolayer MoS2, a 2D system with large spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
As an example of application, we will consider the case of phonon-assisted luminescence. We will do this in the case of bulk hBN, a layered indirect insulator with strong electron-phonon coupling.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; this tutorial will be updated when new exc-ph tools become available in Yambopy (including full-python postprocessing, Raman spectra, interpolated lifetimes, etc).&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This is an advanced topic: we assume that you already know something about the theory&amp;lt;ref name=&amp;quot;Toyozawa&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;cudazzo&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;antonius&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;fulvio2&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;fulvio_thesis&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;pierre_thesis&amp;quot; /&amp;gt; and applications&amp;lt;ref name=&amp;quot;zanfrognini&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;pierre&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;marini_g&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;chan&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;murali&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;chen&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;fulvio1&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;elena&amp;quot; /&amp;gt; of exciton-phonon physics. &lt;br /&gt;
&lt;br /&gt;
Also, we assume that you already know how to run both a basic &#039;&#039;&#039;Yambo&#039;&#039;&#039; GW-BSE calculation and a DFPT phonon calculation with &#039;&#039;&#039;Quantum ESPRESSO&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Besides the QE executables &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ph.x&amp;lt;/code&amp;gt;, we also use the yambo phonon-specific executable &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt; and the python utility &#039;&#039;&#039;Yambopy&#039;&#039;&#039;. The auxiliary code &#039;&#039;&#039;LetzElPhC&#039;&#039;&#039; (executable &amp;lt;code&amp;gt;lelphc&amp;lt;/code&amp;gt;) will be used to obtain the electron-phonon matrix elements by reading the same electronic wavefunctions used by Yambo (and stored in the &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; directory), while also making full use of crystal symmetries. LetzElPhC (link) will be run by Yambopy, but it must nonetheless be installed. Finally, the exciton-phonon properties can be computed either using &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt; or using Yambopy itself.&lt;br /&gt;
&lt;br /&gt;
[[File:Workflow scheme.png|800px|center]]&lt;br /&gt;
&lt;br /&gt;
== Step 0: Pseudopotentials, equilibrium structure and convergence ==&lt;br /&gt;
&lt;br /&gt;
In a real calculation, it is important to ensure that both the pseudopotential and the lattice parameters that we are using are compatible and perform well for the electronic excited states and for the lattice vibrations simultaneously. Furthermore, you have to make sure that the wave function cutoff &amp;lt;code&amp;gt;ecutwfc&amp;lt;/code&amp;gt; is converged with respect to the DFPT step and not just to the DFT one. This is in addition to the other customary convergence tests for DFT, DFPT, GW and BSE calculations.&lt;br /&gt;
&lt;br /&gt;
This is often the most time-demanding step when starting on a new system.&lt;br /&gt;
&lt;br /&gt;
For the sake of this tutorial, we assume that we have already done all these tests and we are starting the final workflow to get the exciton-phonon properties.&lt;br /&gt;
&lt;br /&gt;
== Step 1: scf calculation ==&lt;br /&gt;
&lt;br /&gt;
First of all, we run a standard scf calculation with &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; for Yambo. We stick with non-symmorphic symmetries. At the end, we will have the QE &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
INPUT&lt;br /&gt;
&lt;br /&gt;
 mpirun -np 4 pw.x -inp mos2.scf &amp;gt; scf.out&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;Toyozawa&amp;quot; &amp;gt;Optical processes in solids, Toyozawa, Yutaka, and Chris Oxlade. Cambridge University Press, (2003). &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;pierre&#039;&amp;gt;P. Lechifflart, F. Paleari, D. Sangalli, C. Attaccalite, &#039;&#039;First-principles study of luminescence in hexagonal boron nitride single layer: Exciton-phonon coupling and the role of substrate&#039;&#039;, &lt;br /&gt;
[https://doi.org/10.1103/PhysRevMaterials.7.024006 Phys. Rev. M, &#039;&#039;&#039;7&#039;&#039;&#039; (2), 024006 (2023)]; [https://arxiv.org/abs/2212.10407 arXiv2212.1047]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;elena&#039;&amp;gt;E. Cannuccia, B. Monserrat and C. Attaccalite, &#039;&#039;Theory of phonon-assisted luminescence in solids: Application to hexagonal boron nitride&#039;&#039;, [https://doi.org/10.1103/PhysRevB.99.081109 Phys. Rev. B &#039;&#039;&#039;99&#039;&#039;&#039;, 081109(R) (2019)]; [https://arxiv.org/abs/1807.11797 arXiv1807.11797]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;fulvio1&#039;&amp;gt;F. Paleari et al., &#039;&#039;Exciton-Phonon Coupling in the Ultraviolet Absorption and Emission Spectra of Bulk Hexagonal Boron Nitride&#039;&#039;, [https://doi.org/10.1103/PhysRevLett.122.187401 Phys. Rev. Lett. &#039;&#039;&#039;122&#039;&#039;&#039;, 187401 (2019)]; [https://arxiv.org/abs/1810.08976 arXiv1810.089776] &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;chen&#039;&amp;gt;[https://arxiv.org/abs/2002.08913 Exciton-Phonon Interaction and Relaxation Times from First Principles],&lt;br /&gt;
Hsiao-Yi Chen, Davide Sangalli, and Marco Bernardi, Phys. Rev. Lett. &#039;&#039;&#039;125&#039;&#039;&#039;, 107401(2020)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;pierre_thesis&amp;quot;&amp;gt;[https://www.yambo-code.eu/wiki/images/5/54/These_final.pdf Exciton-phonon coupling and phonon-assisted luminescence in hexagonal Boron Nitride nanostructures], PhD Thesis, Pierre Lechifflart (2023)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;fulvio_thesis&#039;&amp;gt;[https://wwwen.uni.lu/research/fstm/dphyms/people/fulvio_paleari First-principles approaches to the description of indirect absorption and luminescence spectroscopy: exciton-phonon coupling in hexagonal boron nitride], PhD thesis, Fulvio Paleari (2019)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;zanfrognini&#039;&amp;gt;[https://arxiv.org/abs/2305.17554 Distinguishing different stackings in layered materials via luminescence spectroscopy], M. Zanfrognini et al. Phys. Rev. Lett. &#039;&#039;&#039;131&#039;&#039;&#039;, 206902 (2023) &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;marini_g&#039;&amp;gt;[https://arxiv.org/abs/2402.03826 Optical absorption and photoluminescence of single layer boron nitride from a first principles cumulant approach], G. Marini, M. Calandra, P. Cudazzo, Nano Lett., &#039;&#039;&#039;24&#039;&#039;&#039;, 20, 6017 (2024)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;antonius&#039;&amp;gt;G. Antonius, S. G. Louie, &#039;&#039;Theory of exciton-phonon coupling&#039;&#039;, [https://doi.org/10.1103/PhysRevB.105.085111 Phys. Rev. B, &#039;&#039;&#039;105&#039;&#039;&#039;, 085111 (2022)]; [https://arxiv.org/abs/1705.04245 arXiv1705.04245 (2017)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;fulvio2&#039;&amp;gt;[https://arxiv.org/abs/2205.02783 Exciton-phonon interaction calls for a revision of the “exciton” concept], F. Paleari, A. Marini, Phys. Rev. B, &#039;&#039;&#039;106&#039;&#039;&#039;, 125403 (2022)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;cudazzo&#039;&amp;gt; P. Cudazzo, &#039;&#039;First-principles description of the exciton-phonon interaction: A cumulant approach&#039;&#039;, [https://doi.org/10.1103/PhysRevB.102.045136 Phys. Rev. B, &#039;&#039;&#039;102&#039;&#039;&#039;, 045136 (2020)]; [https://orbilu.uni.lu/bitstream/10993/44769/1/main.pdf Open access pdf from Luxembourg University]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;chan&#039;&amp;gt;[https://arxiv.org/abs/2212.08451 Exciton Lifetime and Optical Line Width Profile via Exciton–Phonon Interactions: Theory and First-Principles Calculations for Monolayer MoS2], Y-h Chan, J. B. Haber, M. H. Naik, J. B. Neaton, D. Y. Qiu, F. H. da Jornada, S. G. Louie, Nano Lett., &#039;&#039;&#039;23&#039;&#039;&#039;, 9 (2023)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;murali&#039;&amp;gt;[https://arxiv.org/abs/2407.16111 Origin of Interlayer Exciton–Phonon Coupling in 2D Heterostructures], M. Nalabothula, S. Reichardt, L. Wirtz, Nano Lett., &#039;&#039;&#039;25&#039;&#039;&#039;, 15 (2025)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Exciton-phonon_coupling_and_luminescence&amp;diff=9054</id>
		<title>Exciton-phonon coupling and luminescence</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Exciton-phonon_coupling_and_luminescence&amp;diff=9054"/>
		<updated>2025-09-18T13:59:04Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Tdgw-phonon-usc-01-1024x829.jpg| 400px | right]]&lt;br /&gt;
&lt;br /&gt;
In this advanced tutorial, we will calculate exciton-phonon interactions from first principles by interfacing DFPT (for phonon calculations) and BSE (for exciton calculations).&lt;br /&gt;
&lt;br /&gt;
The DFTP calculations are run with Quantum ESPRESSO, while the many-body GW-BSE calculations are run with Yambo. Finally, the exciton-phonon interaction will be obtained by combining and postprocessing the databases computed in the two previous runs. The great advantage of this workflow is that the calculations can be run in the irreducible Brillouin zones both for the electronic momenta (&amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;) and the transfer momenta (&amp;lt;math&amp;gt;Q&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt;) of excitons and phonons, thus speeding up considerably the jobs while reducing the IO and memory load.&lt;br /&gt;
&lt;br /&gt;
We will first compute the exciton-phonon coupling matrix elements: these are the building blocks needed to construct experimental observables such as phonon-assisted optical spectra (such as luminescence), Raman spectra and exciton lifetimes. We will do this in the case of monolayer MoS2, a 2D system with large spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
As an example of application, we will consider the case of phonon-assisted luminescence. We will do this in the case of bulk hBN, a layered indirect insulator with strong electron-phonon coupling.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; this tutorial will be updated when new exc-ph tools become available in Yambopy (including full-python postprocessing, Raman spectra, interpolated lifetimes, etc).&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This is an advanced topic: we assume that you already know something about the theory&amp;lt;ref name=&amp;quot;Toyozawa&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;cudazzo&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;antonius&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;fulvio2&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;fulvio_thesis&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;pierre_thesis&amp;quot; /&amp;gt; and applications&amp;lt;ref name=&amp;quot;zanfrognini&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;pierre&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;marini_g&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;chan&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;murali&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;chen&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;fulvio1&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;elena&amp;quot; /&amp;gt; of exciton-phonon physics. &lt;br /&gt;
&lt;br /&gt;
Also, we assume that you already know how to run both a basic &#039;&#039;&#039;Yambo&#039;&#039;&#039; GW-BSE calculation and a DFPT phonon calculation with &#039;&#039;&#039;Quantum ESPRESSO&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Besides the QE executables &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ph.x&amp;lt;/code&amp;gt;, we also use the yambo phonon-specific executable &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt; and the python utility &#039;&#039;&#039;Yambopy&#039;&#039;&#039;. The auxiliary code &#039;&#039;&#039;LetzElPhC&#039;&#039;&#039; (executable &amp;lt;code&amp;gt;lelphc&amp;lt;/code&amp;gt;) will be used to obtain the electron-phonon matrix elements by reading the same electronic wavefunctions used by Yambo (and stored in the &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; directory), while also making full use of crystal symmetries. LetzElPhC (link) will be run by Yambopy, but it must nonetheless be installed. Finally, the exciton-phonon properties can be computed either using &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt; or using Yambopy itself.&lt;br /&gt;
&lt;br /&gt;
[[File:Workflow scheme.png|800px|center]]&lt;br /&gt;
&lt;br /&gt;
== Step 0: Pseudopotentials, equilibrium structure and convergence ==&lt;br /&gt;
&lt;br /&gt;
In a real calculation, it is important to ensure that both the pseudopotential and the lattice parameters that we are using are compatible and perform well for the electronic excited states and for the lattice vibrations simultaneously. Furthermore, you have to make sure that the wave function cutoff &amp;lt;code&amp;gt;ecutwfc&amp;lt;/code&amp;gt; is converged with respect to the DFPT step and not just to the DFT one. This is in addition to the other customary convergence tests for DFT, DFPT, GW and BSE calculations.&lt;br /&gt;
&lt;br /&gt;
This is often the most time-demanding step when starting on a new system.&lt;br /&gt;
&lt;br /&gt;
For the sake of this tutorial, we assume that we have already done all these tests and we are starting the final workflow to get the exciton-phonon properties.&lt;br /&gt;
&lt;br /&gt;
== Step 1: scf calculation ==&lt;br /&gt;
&lt;br /&gt;
First of all, we run a standard scf calculation with &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; for Yambo. We stick with non-symmorphic symmetries. At the end, we will have the QE &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
INPUT&lt;br /&gt;
&lt;br /&gt;
 mpirun -np 4 pw.x -inp mos2.scf &amp;gt; scf.out&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;Toyozawa&amp;quot; &amp;gt;Optical processes in solids, Toyozawa, Yutaka, and Chris Oxlade. Cambridge University Press, (2003). &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;pierre&#039;&amp;gt;P. Lechifflart, F. Paleari, D. Sangalli, C. Attaccalite, &#039;&#039;First-principles study of luminescence in hexagonal boron nitride single layer: Exciton-phonon coupling and the role of substrate&#039;&#039;, &lt;br /&gt;
[https://doi.org/10.1103/PhysRevMaterials.7.024006 Phys. Rev. M, &#039;&#039;&#039;7&#039;&#039;&#039; (2), 024006 (2023)]; [https://arxiv.org/abs/2212.10407 arXiv2212.1047]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;elena&#039;&amp;gt;E. Cannuccia, B. Monserrat and C. Attaccalite, &#039;&#039;Theory of phonon-assisted luminescence in solids: Application to hexagonal boron nitride&#039;&#039;, [https://doi.org/10.1103/PhysRevB.99.081109 Phys. Rev. B &#039;&#039;&#039;99&#039;&#039;&#039;, 081109(R) (2019)]; [https://arxiv.org/abs/1807.11797 arXiv1807.11797]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;fulvio1&#039;&amp;gt;F. Paleari et al., &#039;&#039;Exciton-Phonon Coupling in the Ultraviolet Absorption and Emission Spectra of Bulk Hexagonal Boron Nitride&#039;&#039;, [https://doi.org/10.1103/PhysRevLett.122.187401 Phys. Rev. Lett. &#039;&#039;&#039;122&#039;&#039;&#039;, 187401 (2019)]; [https://arxiv.org/abs/1810.08976 arXiv1810.089776] &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;chen&#039;&amp;gt;[https://arxiv.org/abs/2002.08913 Exciton-Phonon Interaction and Relaxation Times from First Principles],&lt;br /&gt;
Hsiao-Yi Chen, Davide Sangalli, and Marco Bernardi, Phys. Rev. Lett. &#039;&#039;&#039;125&#039;&#039;&#039;, 107401(2020)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;pierre_thesis&amp;quot;&amp;gt;[https://www.yambo-code.eu/wiki/images/5/54/These_final.pdf Exciton-phonon coupling and phonon-assisted luminescence in hexagonal Boron Nitride nanostructures], PhD Thesis, Pierre Lechifflart (2023)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;fulvio_thesis&#039;&amp;gt;[https://wwwen.uni.lu/research/fstm/dphyms/people/fulvio_paleari First-principles approaches to the description of indirect absorption and luminescence spectroscopy: exciton-phonon coupling in hexagonal boron nitride], PhD thesis, Fulvio Paleari (2019)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;zanfrognini&#039;&amp;gt;[https://arxiv.org/abs/2305.17554 Distinguishing different stackings in layered materials via luminescence spectroscopy], M. Zanfrognini et al. Phys. Rev. Lett. &#039;&#039;&#039;131&#039;&#039;&#039;, 206902 (2023) &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;marini_g&#039;&amp;gt;[https://arxiv.org/abs/2402.03826 Optical absorption and photoluminescence of single layer boron nitride from a first principles cumulant approach], G. Marini, M. Calandra, P. Cudazzo, Nano Lett., &#039;&#039;&#039;24&#039;&#039;&#039;, 20, 6017 (2024)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;antonius&#039;&amp;gt;[https://arxiv.org/abs/1705.04245 Theory of exciton-phonon coupling], G. Antonius, S. G. Louie, Phys. Rev. B, &#039;&#039;&#039;105&#039;&#039;&#039;, 085111 (2022)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;fulvio2&#039;&amp;gt;[https://arxiv.org/abs/2205.02783 Exciton-phonon interaction calls for a revision of the “exciton” concept], F. Paleari, A. Marini, Phys. Rev. B, &#039;&#039;&#039;106&#039;&#039;&#039;, 125403 (2022)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;cudazzo&#039;&amp;gt; P. Cudazzo, &#039;&#039;First-principles description of the exciton-phonon interaction: A cumulant approach&#039;&#039;, [https://doi.org/10.1103/PhysRevB.102.045136 Phys. Rev. B, &#039;&#039;&#039;102&#039;&#039;&#039;, 045136 (2020)]; [https://orbilu.uni.lu/bitstream/10993/44769/1/main.pdf Open access pdf from Luxembourg University]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;chan&#039;&amp;gt;[https://arxiv.org/abs/2212.08451 Exciton Lifetime and Optical Line Width Profile via Exciton–Phonon Interactions: Theory and First-Principles Calculations for Monolayer MoS2], Y-h Chan, J. B. Haber, M. H. Naik, J. B. Neaton, D. Y. Qiu, F. H. da Jornada, S. G. Louie, Nano Lett., &#039;&#039;&#039;23&#039;&#039;&#039;, 9 (2023)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;murali&#039;&amp;gt;[https://arxiv.org/abs/2407.16111 Origin of Interlayer Exciton–Phonon Coupling in 2D Heterostructures], M. Nalabothula, S. Reichardt, L. Wirtz, Nano Lett., &#039;&#039;&#039;25&#039;&#039;&#039;, 15 (2025)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Exciton-phonon_coupling_and_luminescence&amp;diff=9053</id>
		<title>Exciton-phonon coupling and luminescence</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Exciton-phonon_coupling_and_luminescence&amp;diff=9053"/>
		<updated>2025-09-18T13:55:48Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* References */ Proceeding with references style update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Tdgw-phonon-usc-01-1024x829.jpg| 400px | right]]&lt;br /&gt;
&lt;br /&gt;
In this advanced tutorial, we will calculate exciton-phonon interactions from first principles by interfacing DFPT (for phonon calculations) and BSE (for exciton calculations).&lt;br /&gt;
&lt;br /&gt;
The DFTP calculations are run with Quantum ESPRESSO, while the many-body GW-BSE calculations are run with Yambo. Finally, the exciton-phonon interaction will be obtained by combining and postprocessing the databases computed in the two previous runs. The great advantage of this workflow is that the calculations can be run in the irreducible Brillouin zones both for the electronic momenta (&amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;) and the transfer momenta (&amp;lt;math&amp;gt;Q&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt;) of excitons and phonons, thus speeding up considerably the jobs while reducing the IO and memory load.&lt;br /&gt;
&lt;br /&gt;
We will first compute the exciton-phonon coupling matrix elements: these are the building blocks needed to construct experimental observables such as phonon-assisted optical spectra (such as luminescence), Raman spectra and exciton lifetimes. We will do this in the case of monolayer MoS2, a 2D system with large spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
As an example of application, we will consider the case of phonon-assisted luminescence. We will do this in the case of bulk hBN, a layered indirect insulator with strong electron-phonon coupling.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; this tutorial will be updated when new exc-ph tools become available in Yambopy (including full-python postprocessing, Raman spectra, interpolated lifetimes, etc).&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This is an advanced topic: we assume that you already know something about the theory&amp;lt;ref name=&amp;quot;Toyozawa&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;cudazzo&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;antonius&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;fulvio2&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;fulvio_thesis&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;pierre_thesis&amp;quot; /&amp;gt; and applications&amp;lt;ref name=&amp;quot;zanfrognini&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;pierre&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;marini_g&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;chan&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;murali&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;chen&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;fulvio1&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;elena&amp;quot; /&amp;gt; of exciton-phonon physics. &lt;br /&gt;
&lt;br /&gt;
Also, we assume that you already know how to run both a basic &#039;&#039;&#039;Yambo&#039;&#039;&#039; GW-BSE calculation and a DFPT phonon calculation with &#039;&#039;&#039;Quantum ESPRESSO&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Besides the QE executables &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ph.x&amp;lt;/code&amp;gt;, we also use the yambo phonon-specific executable &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt; and the python utility &#039;&#039;&#039;Yambopy&#039;&#039;&#039;. The auxiliary code &#039;&#039;&#039;LetzElPhC&#039;&#039;&#039; (executable &amp;lt;code&amp;gt;lelphc&amp;lt;/code&amp;gt;) will be used to obtain the electron-phonon matrix elements by reading the same electronic wavefunctions used by Yambo (and stored in the &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; directory), while also making full use of crystal symmetries. LetzElPhC (link) will be run by Yambopy, but it must nonetheless be installed. Finally, the exciton-phonon properties can be computed either using &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt; or using Yambopy itself.&lt;br /&gt;
&lt;br /&gt;
[[File:Workflow scheme.png|800px|center]]&lt;br /&gt;
&lt;br /&gt;
== Step 0: Pseudopotentials, equilibrium structure and convergence ==&lt;br /&gt;
&lt;br /&gt;
In a real calculation, it is important to ensure that both the pseudopotential and the lattice parameters that we are using are compatible and perform well for the electronic excited states and for the lattice vibrations simultaneously. Furthermore, you have to make sure that the wave function cutoff &amp;lt;code&amp;gt;ecutwfc&amp;lt;/code&amp;gt; is converged with respect to the DFPT step and not just to the DFT one. This is in addition to the other customary convergence tests for DFT, DFPT, GW and BSE calculations.&lt;br /&gt;
&lt;br /&gt;
This is often the most time-demanding step when starting on a new system.&lt;br /&gt;
&lt;br /&gt;
For the sake of this tutorial, we assume that we have already done all these tests and we are starting the final workflow to get the exciton-phonon properties.&lt;br /&gt;
&lt;br /&gt;
== Step 1: scf calculation ==&lt;br /&gt;
&lt;br /&gt;
First of all, we run a standard scf calculation with &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; for Yambo. We stick with non-symmorphic symmetries. At the end, we will have the QE &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
INPUT&lt;br /&gt;
&lt;br /&gt;
 mpirun -np 4 pw.x -inp mos2.scf &amp;gt; scf.out&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;Toyozawa&amp;quot; &amp;gt;Optical processes in solids, Toyozawa, Yutaka, and Chris Oxlade. Cambridge University Press, (2003). &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;pierre&#039;&amp;gt;P. Lechifflart, F. Paleari, D. Sangalli, C. Attaccalite, &#039;&#039;First-principles study of luminescence in hexagonal boron nitride single layer: Exciton-phonon coupling and the role of substrate&#039;&#039;, &lt;br /&gt;
[https://doi.org/10.1103/PhysRevMaterials.7.024006 Phys. Rev. M, &#039;&#039;&#039;7&#039;&#039;&#039; (2), 024006 (2023)] [https://arxiv.org/abs/2212.10407 arXiv2212.1047]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;elena&#039;&amp;gt;[https://arxiv.org/abs/1807.11797 Theory of phonon-assisted luminescence in solids: Application to hexagonal boron nitride], E. Cannuccia, B. Monserrat and C. Attaccalite, Phys. Rev. B &#039;&#039;&#039;99&#039;&#039;&#039;, 081109(R) (2019)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;fulvio1&#039;&amp;gt;F. Paleari et al., &#039;&#039;Exciton-Phonon Coupling in the Ultraviolet Absorption and Emission Spectra of Bulk Hexagonal Boron Nitride&#039;&#039;, [https://doi.org/10.1103/PhysRevLett.122.187401 Phys. Rev. Lett. &#039;&#039;&#039;122&#039;&#039;&#039;, 187401 (2019)] [https://arxiv.org/abs/1810.08976 arXiv1810.089776] &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;chen&#039;&amp;gt;[https://arxiv.org/abs/2002.08913 Exciton-Phonon Interaction and Relaxation Times from First Principles],&lt;br /&gt;
Hsiao-Yi Chen, Davide Sangalli, and Marco Bernardi, Phys. Rev. Lett. &#039;&#039;&#039;125&#039;&#039;&#039;, 107401(2020)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;pierre_thesis&amp;quot;&amp;gt;[https://www.yambo-code.eu/wiki/images/5/54/These_final.pdf Exciton-phonon coupling and phonon-assisted luminescence in hexagonal Boron Nitride nanostructures], PhD Thesis, Pierre Lechifflart (2023)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;fulvio_thesis&#039;&amp;gt;[https://wwwen.uni.lu/research/fstm/dphyms/people/fulvio_paleari First-principles approaches to the description of indirect absorption and luminescence spectroscopy: exciton-phonon coupling in hexagonal boron nitride], PhD thesis, Fulvio Paleari (2019)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;zanfrognini&#039;&amp;gt;[https://arxiv.org/abs/2305.17554 Distinguishing different stackings in layered materials via luminescence spectroscopy], M. Zanfrognini et al. Phys. Rev. Lett. &#039;&#039;&#039;131&#039;&#039;&#039;, 206902 (2023) &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;marini_g&#039;&amp;gt;[https://arxiv.org/abs/2402.03826 Optical absorption and photoluminescence of single layer boron nitride from a first principles cumulant approach], G. Marini, M. Calandra, P. Cudazzo, Nano Lett., &#039;&#039;&#039;24&#039;&#039;&#039;, 20, 6017 (2024)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;antonius&#039;&amp;gt;[https://arxiv.org/abs/1705.04245 Theory of exciton-phonon coupling], G. Antonius, S. G. Louie, Phys. Rev. B, &#039;&#039;&#039;105&#039;&#039;&#039;, 085111 (2022)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;fulvio2&#039;&amp;gt;[https://arxiv.org/abs/2205.02783 Exciton-phonon interaction calls for a revision of the “exciton” concept], F. Paleari, A. Marini, Phys. Rev. B, &#039;&#039;&#039;106&#039;&#039;&#039;, 125403 (2022)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;cudazzo&#039;&amp;gt; P. Cudazzo, &#039;&#039;First-principles description of the exciton-phonon interaction: A cumulant approach&#039;&#039;, [https://doi.org/10.1103/PhysRevB.102.045136 Phys. Rev. B, &#039;&#039;&#039;102&#039;&#039;&#039;, 045136 (2020)] [https://orbilu.uni.lu/bitstream/10993/44769/1/main.pdf Open access pdf from Luxembourg University]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;chan&#039;&amp;gt;[https://arxiv.org/abs/2212.08451 Exciton Lifetime and Optical Line Width Profile via Exciton–Phonon Interactions: Theory and First-Principles Calculations for Monolayer MoS2], Y-h Chan, J. B. Haber, M. H. Naik, J. B. Neaton, D. Y. Qiu, F. H. da Jornada, S. G. Louie, Nano Lett., &#039;&#039;&#039;23&#039;&#039;&#039;, 9 (2023)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;murali&#039;&amp;gt;[https://arxiv.org/abs/2407.16111 Origin of Interlayer Exciton–Phonon Coupling in 2D Heterostructures], M. Nalabothula, S. Reichardt, L. Wirtz, Nano Lett., &#039;&#039;&#039;25&#039;&#039;&#039;, 15 (2025)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Exciton-phonon_coupling_and_luminescence&amp;diff=9052</id>
		<title>Exciton-phonon coupling and luminescence</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Exciton-phonon_coupling_and_luminescence&amp;diff=9052"/>
		<updated>2025-09-18T13:52:26Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* References */ Updating references style and adding link to journal nearby open access link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Tdgw-phonon-usc-01-1024x829.jpg| 400px | right]]&lt;br /&gt;
&lt;br /&gt;
In this advanced tutorial, we will calculate exciton-phonon interactions from first principles by interfacing DFPT (for phonon calculations) and BSE (for exciton calculations).&lt;br /&gt;
&lt;br /&gt;
The DFTP calculations are run with Quantum ESPRESSO, while the many-body GW-BSE calculations are run with Yambo. Finally, the exciton-phonon interaction will be obtained by combining and postprocessing the databases computed in the two previous runs. The great advantage of this workflow is that the calculations can be run in the irreducible Brillouin zones both for the electronic momenta (&amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;) and the transfer momenta (&amp;lt;math&amp;gt;Q&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt;) of excitons and phonons, thus speeding up considerably the jobs while reducing the IO and memory load.&lt;br /&gt;
&lt;br /&gt;
We will first compute the exciton-phonon coupling matrix elements: these are the building blocks needed to construct experimental observables such as phonon-assisted optical spectra (such as luminescence), Raman spectra and exciton lifetimes. We will do this in the case of monolayer MoS2, a 2D system with large spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
As an example of application, we will consider the case of phonon-assisted luminescence. We will do this in the case of bulk hBN, a layered indirect insulator with strong electron-phonon coupling.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; this tutorial will be updated when new exc-ph tools become available in Yambopy (including full-python postprocessing, Raman spectra, interpolated lifetimes, etc).&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This is an advanced topic: we assume that you already know something about the theory&amp;lt;ref name=&amp;quot;Toyozawa&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;cudazzo&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;antonius&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;fulvio2&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;fulvio_thesis&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;pierre_thesis&amp;quot; /&amp;gt; and applications&amp;lt;ref name=&amp;quot;zanfrognini&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;pierre&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;marini_g&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;chan&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;murali&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;chen&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;fulvio1&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;elena&amp;quot; /&amp;gt; of exciton-phonon physics. &lt;br /&gt;
&lt;br /&gt;
Also, we assume that you already know how to run both a basic &#039;&#039;&#039;Yambo&#039;&#039;&#039; GW-BSE calculation and a DFPT phonon calculation with &#039;&#039;&#039;Quantum ESPRESSO&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Besides the QE executables &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ph.x&amp;lt;/code&amp;gt;, we also use the yambo phonon-specific executable &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt; and the python utility &#039;&#039;&#039;Yambopy&#039;&#039;&#039;. The auxiliary code &#039;&#039;&#039;LetzElPhC&#039;&#039;&#039; (executable &amp;lt;code&amp;gt;lelphc&amp;lt;/code&amp;gt;) will be used to obtain the electron-phonon matrix elements by reading the same electronic wavefunctions used by Yambo (and stored in the &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; directory), while also making full use of crystal symmetries. LetzElPhC (link) will be run by Yambopy, but it must nonetheless be installed. Finally, the exciton-phonon properties can be computed either using &amp;lt;code&amp;gt;yambo_ph&amp;lt;/code&amp;gt; or using Yambopy itself.&lt;br /&gt;
&lt;br /&gt;
[[File:Workflow scheme.png|800px|center]]&lt;br /&gt;
&lt;br /&gt;
== Step 0: Pseudopotentials, equilibrium structure and convergence ==&lt;br /&gt;
&lt;br /&gt;
In a real calculation, it is important to ensure that both the pseudopotential and the lattice parameters that we are using are compatible and perform well for the electronic excited states and for the lattice vibrations simultaneously. Furthermore, you have to make sure that the wave function cutoff &amp;lt;code&amp;gt;ecutwfc&amp;lt;/code&amp;gt; is converged with respect to the DFPT step and not just to the DFT one. This is in addition to the other customary convergence tests for DFT, DFPT, GW and BSE calculations.&lt;br /&gt;
&lt;br /&gt;
This is often the most time-demanding step when starting on a new system.&lt;br /&gt;
&lt;br /&gt;
For the sake of this tutorial, we assume that we have already done all these tests and we are starting the final workflow to get the exciton-phonon properties.&lt;br /&gt;
&lt;br /&gt;
== Step 1: scf calculation ==&lt;br /&gt;
&lt;br /&gt;
First of all, we run a standard scf calculation with &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; for Yambo. We stick with non-symmorphic symmetries. At the end, we will have the QE &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
INPUT&lt;br /&gt;
&lt;br /&gt;
 mpirun -np 4 pw.x -inp mos2.scf &amp;gt; scf.out&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;Toyozawa&amp;quot; &amp;gt;Optical processes in solids, Toyozawa, Yutaka, and Chris Oxlade. Cambridge University Press, (2003). &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;pierre&#039;&amp;gt;P. Lechifflart, F. Paleari, D. Sangalli, C. Attaccalite, &#039;&#039;First-principles study of luminescence in hexagonal boron nitride single layer: Exciton-phonon coupling and the role of substrate&#039;&#039;, &lt;br /&gt;
[https://doi.org/10.1103/PhysRevMaterials.7.024006 Phys. Rev. M, &#039;&#039;&#039;7&#039;&#039;&#039; (2), 024006 (2023)] [https://arxiv.org/abs/2212.10407 arXiv2212.1047]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;elena&#039;&amp;gt;[https://arxiv.org/abs/1807.11797 Theory of phonon-assisted luminescence in solids: Application to hexagonal boron nitride], E. Cannuccia, B. Monserrat and C. Attaccalite, Phys. Rev. B &#039;&#039;&#039;99&#039;&#039;&#039;, 081109(R) (2019)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;fulvio1&#039;&amp;gt;F. Paleari et al., &#039;&#039;Exciton-Phonon Coupling in the Ultraviolet Absorption and Emission Spectra of Bulk Hexagonal Boron Nitride&#039;&#039;, [https://doi.org/10.1103/PhysRevLett.122.187401 Phys. Rev. Lett. &#039;&#039;&#039;122&#039;&#039;&#039;, 187401 (2019)] [https://arxiv.org/abs/1810.08976 arXiv1810.089776] &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;chen&#039;&amp;gt;[https://arxiv.org/abs/2002.08913 Exciton-Phonon Interaction and Relaxation Times from First Principles],&lt;br /&gt;
Hsiao-Yi Chen, Davide Sangalli, and Marco Bernardi, Phys. Rev. Lett. &#039;&#039;&#039;125&#039;&#039;&#039;, 107401(2020)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;pierre_thesis&amp;quot;&amp;gt;[https://www.yambo-code.eu/wiki/images/5/54/These_final.pdf Exciton-phonon coupling and phonon-assisted luminescence in hexagonal Boron Nitride nanostructures], PhD Thesis, Pierre Lechifflart (2023)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;fulvio_thesis&#039;&amp;gt;[https://wwwen.uni.lu/research/fstm/dphyms/people/fulvio_paleari First-principles approaches to the description of indirect absorption and luminescence spectroscopy: exciton-phonon coupling in hexagonal boron nitride], PhD thesis, Fulvio Paleari (2019)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;zanfrognini&#039;&amp;gt;[https://arxiv.org/abs/2305.17554 Distinguishing different stackings in layered materials via luminescence spectroscopy], M. Zanfrognini et al. Phys. Rev. Lett. &#039;&#039;&#039;131&#039;&#039;&#039;, 206902 (2023) &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;marini_g&#039;&amp;gt;[https://arxiv.org/abs/2402.03826 Optical absorption and photoluminescence of single layer boron nitride from a first principles cumulant approach], G. Marini, M. Calandra, P. Cudazzo, Nano Lett., &#039;&#039;&#039;24&#039;&#039;&#039;, 20, 6017 (2024)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;antonius&#039;&amp;gt;[https://arxiv.org/abs/1705.04245 Theory of exciton-phonon coupling], G. Antonius, S. G. Louie, Phys. Rev. B, &#039;&#039;&#039;105&#039;&#039;&#039;, 085111 (2022)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;fulvio2&#039;&amp;gt;[https://arxiv.org/abs/2205.02783 Exciton-phonon interaction calls for a revision of the “exciton” concept], F. Paleari, A. Marini, Phys. Rev. B, &#039;&#039;&#039;106&#039;&#039;&#039;, 125403 (2022)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;cudazzo&#039;&amp;gt;[https://orbilu.uni.lu/bitstream/10993/44769/1/main.pdf First-principles description of the exciton-phonon interaction: A cumulant approach], P. Cudazzo, Phys. Rev. B, &#039;&#039;&#039;102&#039;&#039;&#039;, 045136 (2020)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;chan&#039;&amp;gt;[https://arxiv.org/abs/2212.08451 Exciton Lifetime and Optical Line Width Profile via Exciton–Phonon Interactions: Theory and First-Principles Calculations for Monolayer MoS2], Y-h Chan, J. B. Haber, M. H. Naik, J. B. Neaton, D. Y. Qiu, F. H. da Jornada, S. G. Louie, Nano Lett., &#039;&#039;&#039;23&#039;&#039;&#039;, 9 (2023)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;murali&#039;&amp;gt;[https://arxiv.org/abs/2407.16111 Origin of Interlayer Exciton–Phonon Coupling in 2D Heterostructures], M. Nalabothula, S. Reichardt, L. Wirtz, Nano Lett., &#039;&#039;&#039;25&#039;&#039;&#039;, 15 (2025)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=9032</id>
		<title>SOC</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=9032"/>
		<updated>2025-09-15T09:30:43Z</updated>

		<summary type="html">&lt;p&gt;Davide: Uncommented perturbative SOC&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Effect of spin-orbit interaction =&lt;br /&gt;
&lt;br /&gt;
Spin–orbit coupling (SOC) is a relativistic interaction between an electron’s spin and its orbital motion in the crystal potential. Presently, SOC can be included withing GW-BSE approach either perturbatively, or fully, considering the spinorial nature of the electronic wave-function. In this tutorial, we will use both approaches. More details on the theory and comparison between full spinorial GW-BSE and perturbative approach to SOC can be found in the following paper &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;, and in the Wikipedia article&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;/&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To include the spin-orbit coupling we start with many–body total Hamiltonian of the system including first order relativistic corrections. &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 1 many body rel hamiltonian.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where, &amp;lt;math&amp;gt;\hat{H}^{0}&amp;lt;/math&amp;gt; is the non-relativistic one body hamiltonian, &amp;lt;math&amp;gt;\hat{H}^{(e-e)}&amp;lt;/math&amp;gt; is the e-e Coulomb interaction, and &amp;lt;math&amp;gt;\hat{H}^{(RK)} + \hat{H}^{(SOI)}&amp;lt;/math&amp;gt; are the first order relativistic correction, and the last term is the spin-orbit interaction (SOI) in which we are interested in this tutorial. &lt;br /&gt;
&lt;br /&gt;
The SOI term itself is composed of three different components, &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 2 soi term.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; are many-body terms, called &amp;quot;two-electron spin-orbit&amp;quot;, and &amp;quot;spin-other-orbit&amp;quot;, respectively. And,  &amp;lt;math&amp;gt; \hat{H}^{(SOI)} = \hat{H}^{SO(N)} &amp;lt;/math&amp;gt; is &amp;quot;one electron spin-orbit&amp;quot; is a one body term, which is given by: &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 3 one electron spin orbit.png|250px|frameless]]&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;math&amp;gt;\underline{\nu}&amp;lt;/math&amp;gt; a 2x2 matrix in the &amp;lt;math&amp;gt;\uparrow&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\downarrow&amp;lt;/math&amp;gt; spin space, and:&lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 4 v soc.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;\mathbf{\sigma}&amp;lt;/math&amp;gt; is the three dimensional vector whose components are the Pauli matrices. In a plane wave representation the SOC is, in practice, accounted for by the use of pseudopotentials. The SOC contribution from the pseudopotential captures what is called “local SOC”, which is due to the electrons orbiting around the nuclei, it neglects instead the itinerant SOC which can- not be easily captured in periodic boundary conditions. When relativistic corrections are taken into account instead, one should in principle account for the effects of the many–body terms &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt;. A shortcut is to add a term constructed replacing &amp;lt;math&amp;gt;v^{ext}&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;v^{Hxc}&amp;lt;/math&amp;gt; into previous equation. Doing so partially account for &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt;, while &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; is neglected.&lt;br /&gt;
&lt;br /&gt;
= Introduction = &lt;br /&gt;
&lt;br /&gt;
The scope of this tutorial is to calculate the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; corrections to the DFT-LDA band-structure and the BSE optical spectrum for a bulk semiconducting material, gallium antimonide (GaSb) &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;wiki&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;kim&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;rem&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan1&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan2&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan3&amp;quot;/&amp;gt;. We will compare the results with and without the spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For this tutorial we provide two state (GS) databases (DBs), one contains the GS-DBs with the effect of SOC included and one without. The idea is to repeat the same calculation for both database and compare the results and the performances of the code. GaSb input files can be downloaded from the following link [https://media.yambo-code.eu/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz], and can be unarchived using the following command: &lt;br /&gt;
&lt;br /&gt;
 $ tar -xzf GaSb.tar.gz&lt;br /&gt;
&lt;br /&gt;
As in the other tutorials, you will find two main folders, Without_SOC and With_SOC.&lt;br /&gt;
To avoid continuously switching between the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;With_SOC&amp;lt;/code&amp;gt; directories, we recommend opening two terminals: keep one terminal for the without SOC case and the other for the with SOC case.&lt;br /&gt;
 $ cd GaSb/With_SOC    # terminal 1&lt;br /&gt;
 $ cd GaSb/Without_SOC # terminal 2&lt;br /&gt;
&lt;br /&gt;
Inside each of the two there are two subfolders:&lt;br /&gt;
&lt;br /&gt;
* Pwscf - contains the input files and the pseudo-potentials for Quantum ESPRESSO, to generate the ground-state databases (GS-DBs) yourself.&lt;br /&gt;
* YAMBO - contains Example of yambo input files (Input folder) and output files (References folder)&lt;br /&gt;
&lt;br /&gt;
In the next section we show how to generate the databases running QE. If you prefer to skip that step, you can also download pre-computed databases at the following link: [https://media.yambo-code.eu/educational/tutorials/files/GaSb_DBs.tar.gz GaSb_DBs.tar.gz]&lt;br /&gt;
&lt;br /&gt;
= DFT band structure =&lt;br /&gt;
&lt;br /&gt;
To generate the  KS WFs and energies databases, you must enter the Pwscf folder and generate the KS databases&lt;br /&gt;
 $ cd Pwscf&lt;br /&gt;
 $ pw.x &amp;lt; 01_scf_kx4.in &amp;gt; 01_scf_kx4.out&lt;br /&gt;
 $ pw.x &amp;lt; 02_nscf_kx4_shifted+Gamma.in &amp;gt; 02_nscf_kx4_shifted+Gamma.out&lt;br /&gt;
 $ cd GaSb.save&lt;br /&gt;
 $ p2y&lt;br /&gt;
&lt;br /&gt;
You just generated your SAVE folder to be used for the YAMBO tutorial. We are going to move it inside a dedicated folder under Yambo&lt;br /&gt;
Let&#039;s have a look to the content of the Yambo folder. &lt;br /&gt;
 $ ls ../../YAMBO&lt;br /&gt;
 4x4x4_shifted+GAMMA 6x6x6_shifted Inputs  Reference&lt;br /&gt;
&lt;br /&gt;
Inside the YAMBO folder there are indeed two folders corresponding to two different k-points meshes. In this tutorial we will use the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; folder for the computation of the QP corrections within the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; approximation. It is a k-points grid obtained as the sum of a 4x4x4 k-points grid centered in Gamma and a 4x4x4 grid shifted. Instead for the computation of the optical properties we will use the &amp;lt;code&amp;gt;6x6x6_shifted&amp;lt;/code&amp;gt; folder. It is a 6x6x6 k-points grid shifted from Gamma. In the References folder yuo will find runs for the grids, &amp;lt;code&amp;gt;10x10x10_shifted&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;14x14x14_shifted&amp;lt;/code&amp;gt; used to do a minimum convergence of the optical properties against the number of k-points. (pay attention that the BSE calculations with bigger grids will be very memory and time demanding!). Later, you can generate the corresponding SAVE folders as well if you wish.&lt;br /&gt;
&lt;br /&gt;
For now let&#039;s move our SAVE folder inside 4x4x4_shifted+GAMMA&lt;br /&gt;
 $ mv SAVE ../../YAMBO&lt;br /&gt;
&lt;br /&gt;
The first part of the tutorial is on the computation of the QP corrections. So let&#039;s enter the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; grid and, as seen in other tutorials run the Initialization:&lt;br /&gt;
&lt;br /&gt;
 $ cd ../../YAMBO/4x4x4_shifted+GAMMA/ &lt;br /&gt;
 $ yambo &lt;br /&gt;
Now compare the result of the two setup runs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; With_SOC Energies and Occupations (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  [02.05] Energies &amp;amp; Occupations&lt;br /&gt;
  ==============================&lt;br /&gt;
&lt;br /&gt;
  [X] === General ===&lt;br /&gt;
  [X] Electronic Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Bosonic    Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Finite Temperature mode                       : no&lt;br /&gt;
  [X] El. density                                   :  0.14622E+24 [cm-3]&lt;br /&gt;
  [X] Fermi Level                                   :  5.085716 [eV]&lt;br /&gt;
&lt;br /&gt;
  [X] === Gaps and Widths ===&lt;br /&gt;
  [X] Conduction Band Min                           :  0.095395 [eV]&lt;br /&gt;
  [X] Valence Band Max                              :  0.000000 [eV]&lt;br /&gt;
  [X] Filled Bands                                  :   8&lt;br /&gt;
  [X] Empty Bands                                   :    9  200&lt;br /&gt;
  [X] Direct Gap                                    :  0.095395 [eV]&lt;br /&gt;
  [X] Direct Gap localized at k                     :  29&lt;br /&gt;
  [X] Indirect Gap                                  :  0.095395 [eV]&lt;br /&gt;
  [X] Indirect Gap between kpts                     :  29  29&lt;br /&gt;
  [X] Last valence band width                       :  3.508355 [eV]&lt;br /&gt;
  [X] 1st conduction band width                     :  3.413699 [eV]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; Without_SOC Energies and Occupations (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  [02.05] Energies &amp;amp; Occupations&lt;br /&gt;
  ==============================&lt;br /&gt;
&lt;br /&gt;
  [X] === General ===&lt;br /&gt;
  [X] Electronic Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Bosonic    Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Finite Temperature mode                       : no&lt;br /&gt;
  [X] El. density                                   :  0.14622E+24 [cm-3]&lt;br /&gt;
  [X] Fermi Level                                   :  4.815616 [eV]&lt;br /&gt;
&lt;br /&gt;
  [X] === Gaps and Widths ===&lt;br /&gt;
  [X] Conduction Band Min                           :  0.367929 [eV]&lt;br /&gt;
  [X] Valence Band Max                              :  0.000000 [eV]&lt;br /&gt;
  [X] Filled Bands                                  :   4&lt;br /&gt;
  [X] Empty Bands                                   :    5  200&lt;br /&gt;
  [X] Direct Gap                                    :  0.367929 [eV]&lt;br /&gt;
  [X] Direct Gap localized at k                     :  29&lt;br /&gt;
  [X] Indirect Gap                                  :  0.367929 [eV]&lt;br /&gt;
  [X] Indirect Gap between kpts                     :  29  29&lt;br /&gt;
  [X] Last valence band width                       :  3.276561 [eV]&lt;br /&gt;
  [X] 1st conduction band width                     :  3.649610 [eV]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A clear shrink of the DFT-LDA gap due to spin-orbit occurs. Note that, having 8 electrons in the fundamental cell, due to the spinorial nature of the wavefunction, with SOC we have 8 occupied bands, while only 4 without. Here a picture of the DFT band structure for the two cases.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_pwscf.png|500px|center|GaSb bands DFT]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the band structure of GaSb =&lt;br /&gt;
 &lt;br /&gt;
Now we will perform a G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; calculation to correct the DFT-LDA bandstructure. We assume that you are already familiar with the concept of screening needed to build up the GW self-energy and thus the QP corrections. At this stage we assume you are already inside 4x4x4_shifted+GAMMA. There, create a local folder &#039;&#039;My_inputs&#039;&#039; and generate the input for a G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; calculation within the plasmon-pole approximation using the following command: &lt;br /&gt;
 $ mkdir My_inputs&lt;br /&gt;
 $ yambo -p p -g n -V RL -F My_inputs/02_GW.in&lt;br /&gt;
However we also provide an input file with suggested parameters for this calculations inside the folder &#039;&#039;Solid_GaSb/Without_SOC/Yambo/Inputs&#039;&#039;. Remember: these parameters are system dependent and should be converged as you can see other GW tutorials (e.g. [[Silicon|GW on bulk Silicon]] or [[GW on h-BN (standalone)]]). Here we provide reasonable (but not fully converged) parameters to have a low computational cost but yet qualitatively meaningful results.&lt;br /&gt;
&lt;br /&gt;
The plane-waves cutoff for the wavefunctions and exchange part of the self-energy are set to 10 Ry. &lt;br /&gt;
 FFTGvecs =  10 Ry   # [FFT] Plane-waves&lt;br /&gt;
 EXXRLvcs=   10 Ry   # [XX] Exchange RL components&lt;br /&gt;
while we will use 40 bands, a plane-wave cut-off of 1 Ry, and a plasmon-pole energy of 20 eV to build up the screening matrix &lt;br /&gt;
 NGsBlkXp=    1 Ry  # [Xp] Response block size &lt;br /&gt;
 PPAPntXp= 20.  eV  # [Xp] PPA imaginary energy &lt;br /&gt;
 % BndsRnXp    &lt;br /&gt;
 1 | 40 |        # [Xp] Polarization function bands &lt;br /&gt;
 % &lt;br /&gt;
 % LongDrXp  &lt;br /&gt;
 1.000000 | 1.000000 | 1.000000 |        # [Xp] [cc] Electric Field &lt;br /&gt;
 %&lt;br /&gt;
The number of bands in the green function G to build up the GW self-energy is also 40 &lt;br /&gt;
 % GbndRnge    &lt;br /&gt;
 1 | 40 |                 # [GW] G[W] bands range &lt;br /&gt;
 %&lt;br /&gt;
with those parameters we will compute the correction only in the last 2 points of our grid, 28 and 29 and for the states from 3 to 6, setting the input variable &lt;br /&gt;
 %QPkrange                      &lt;br /&gt;
 28 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
You can now run the code using either your input file or the one provided in the Inputs folder &lt;br /&gt;
 $ yambo -F My_inputs/02_GW.in -J GW -C GW&lt;br /&gt;
The run will take some time. Indeed the code has first to compute the dipoles, then the screening within the plasmon pole approximation and finally the self-energy, first the exchange part Gv and then the correlation part G(W-v). &lt;br /&gt;
In the &amp;lt;code&amp;gt;GW&amp;lt;/code&amp;gt; folder you will find the &amp;lt;code&amp;gt;o-GW.qp&amp;lt;/code&amp;gt; file containing the GW corrections.&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &lt;br /&gt;
 #&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #&lt;br /&gt;
  ...&lt;br /&gt;
      29        4      0.000000      0.182291    0.992707 &lt;br /&gt;
      29        5      0.367929      0.597428    -2.431549&lt;br /&gt;
  ...&lt;br /&gt;
Thus it is about 0.60-0.18=0.42  eV (not fully converged).&lt;br /&gt;
&lt;br /&gt;
We can also compute the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; correction for all the k-point of the database. To this end open the input file &#039;&#039;My_inputs/02_GW.in&#039;&#039; (or your own) and edit the number of k-point to be computed &lt;br /&gt;
 %&lt;br /&gt;
 QPkrange                      1 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
Remember to use the same name after the -J option, so that the code will be able to use the informations from the previous run and avoid many calculations. &lt;br /&gt;
 $ yambo -F My_inputs/02_GW.in -J GW -C GW&lt;br /&gt;
In the &#039;&#039;GW&#039;&#039; folder you will find now also the &#039;&#039;o-GW.qp_01&#039;&#039; file containg the GW corrections for all the k-points.&lt;br /&gt;
&lt;br /&gt;
Now you can enter the folder of the 4x4x4 shifted grid&lt;br /&gt;
 cd Solid_GaSb/With_SOC/Yambo/4x4x4_shifted+GAMMA&lt;br /&gt;
and repeat the same calculations. Remember that in the input file you will generate you should change all the band ranges doubling the number of states (do you understand why?) &lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
    1 | 80 |        # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
    1 | 80 |        # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 % QPkrange&lt;br /&gt;
   29 | 29 |   5 | 12|  # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band.&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #  &lt;br /&gt;
   ...   &lt;br /&gt;
       29         8       0.000000    0.251074           0.896306&lt;br /&gt;
       29         9       0.095395    0.647108          -2.334492&lt;br /&gt;
   ...&lt;br /&gt;
Thus it is about 0.65-0.25=0.43 eV (not fully converged). Indeed the same result obtained without SOC. The resulting electronic gap is about 0.49 eV reasonably close to the experimental band gap of 0.72 eV. It is also a big improvement compared to the LDA band gap (approximatively 0.09 eV). This correction will be used, in the form of a scissor operator, as a starting point to compute the optical spectra.&lt;br /&gt;
&lt;br /&gt;
Again we can also compute the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; correction for all the k-point of the database. You can plot column 4 of the output file against column 3 to obtain a picture of the QP corrections. In the following figure we show the plot of the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; correction (E_G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;-E_LDA) vs the LDA eigenvalues. The corrections at the Gamma and the L point are marked with bigger red spots.&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=400px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_GoWo_corrections.png|GaSb QP corrections without SOC &lt;br /&gt;
Image:GaSb GoWo corrections SOC.png|GaSb GoWo corrections with SOC&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
[[File:SOC_GaSb_GoWo_corrections.png|500px|frameless|center]]&lt;br /&gt;
[[File:GaSb GoWo corrections SOC.png|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;scissor operator approach&amp;amp;quot; does not seem a very good approximation for GaSb. Indeed the quasi particle corrections are not constant, especially in the conduction band. For example the correction to the Gamma point is bigger than the corrections to all other k-points. This result however maybe due to the poor covergence parameters. If you would like to better investigate these results you should try do convergence tests. Since QP corrections are poorly sensitive to the spin-orbit interaction it is probably a good idea to do convergence without SOC.&lt;br /&gt;
&lt;br /&gt;
Here we also provide a plot of the band-structure at different levels of approximation: DFT, DFT+scissor, QP. The band structures are obtained from an interpolation of our k-points mesh and it is not very precise since, again, we are using a quite coarse sampling of the brillouine zone. Indeed we can see that already the interpolated DFT band structure deviates from the exact DFT band-structure, which has also been reported. In particular in the region nearby Gamma. However it gives quite nicely an overview of how the QP band structure compares with the DFT band stucture. The main effect is indeed an opening of the band-gap which can be described in terms of a scissor operator.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_yambo.png|500px|center|GaSb QP bands]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the optical properties of GaSb =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--{|&lt;br /&gt;
| [[File:SOC_GaSb_bands.png|600px|center|GaSb bands 1]]&lt;br /&gt;
| [[File:SOC_GaSb_absorption.png|600px|center|GaSb bands 2]]&lt;br /&gt;
|} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now turn our attention on the optical properties of the system. Here we will compute the dielectric function at different levels of approximations:&amp;lt;br /&amp;gt;&lt;br /&gt;
# at the IP-RPA level, thus using the Fermi golden rule with the KS energies and wave-functions&amp;lt;br /&amp;gt;&lt;br /&gt;
# at the RPA level, thus also including the effect of the local fields&amp;lt;br /&amp;gt;&lt;br /&gt;
# at the BSE level, thus including many-body effects, both correcting the KS energies (we will introduce a scissor obtained from the GW calculation) and considering the statically screened electron-hole interaction&lt;br /&gt;
# Run the simulations with SOC using screening databases computed without SOC.&lt;br /&gt;
# Run the simulations in perturbative SOC approach  &lt;br /&gt;
&lt;br /&gt;
First, setup the calculation (initialisation) in the usual way in the folder without SOC&lt;br /&gt;
 $ cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 $ yambo&lt;br /&gt;
and repeat the same inside the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; before continuing.&lt;br /&gt;
&lt;br /&gt;
== RPA-IP absorption ==&lt;br /&gt;
&lt;br /&gt;
Create a local folder inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; which you will call &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt;, and create the input file:&lt;br /&gt;
 &amp;gt;cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o c -V RL -F My_inputs/03_IP-RPA.in&lt;br /&gt;
&lt;br /&gt;
As before, we also provide an input file with suggested parameters for this calculations. The kind of calculation is controlled by the input variable&lt;br /&gt;
 Chimod= &amp;quot;IP&amp;quot;                 # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1            RL    # [Xd] Response block size&lt;br /&gt;
These tells you that we are building up the dielectric function in G-space considering only on G vector, i.e. the G=0 component. The string Chimod= &amp;amp;quot;IP&amp;amp;quot; recalls us that this means we are neglecting the local fields effect.&lt;br /&gt;
&lt;br /&gt;
We set the plane-waves cutoff for the wavefunctions to&lt;br /&gt;
 FFTGvecs=  10  Ry   # [FFT] Plane-waves&lt;br /&gt;
Since we are interested into the optical spectrum calculation, only the Q=0 term, i.e. the first Q-point, is calculated&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
The number of bands we use is 10. This is a reasonable number of states to converge the IP-RPA optical spectrum in the VIS-UV range. (If you wish to calculate the EELS spectrum for q different from 0 probably more bands will be required.)&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 10 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
As you learned the dielectric function is a tensor and in principle three calculations for light polarized along x,y,z chould be done depending on the experimental setup. However GaSb is a system with cubic symmetry, thus any direction is equivalent. Here we decide to compute epsilon along the &amp;amp;quot;(1 1 1)&amp;amp;quot; direction.&lt;br /&gt;
 % LongDrXd&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation using either your input file or the one provided in the Inputs folder&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/03_IP-RPA.in  -J 03_IP-RPA -C 03_IP-RPA&lt;br /&gt;
&lt;br /&gt;
Inside the &amp;lt;code&amp;gt;03_IP-RPA&amp;lt;/code&amp;gt; folder you will find the databases created by the code (in this case just the dipoles), the report file and the output files for the dielectric function which describes the absorption (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;) and for its inverse (&amp;lt;code&amp;gt;o-03_IP-RPA.eel*&amp;lt;/code&amp;gt;), which describes the electron energy loss. You can plot them with your favorite software (for example gnuplot or xmgrace). The real and imaginary parts of the IP-RPA dielectric function are column 3 and 2 respectively of the file (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;). Using also the reference output file in the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; folder you can compare the spectrum with and without SOC.&lt;br /&gt;
&lt;br /&gt;
Now repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 20 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.jpg|600px|center|GaSb absorption RPA]]&lt;br /&gt;
If you wish to obtain a reasonable spectrum however the 6x6x6 kpts grid is not enough. In order to check the convergence with the number of k-points you should generate denser k-points meshes using the input files provided in the Pwscf folder. &lt;br /&gt;
&amp;lt;!-- (see section [[more.php|More on GaSb]] for more advanced calculations).--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the directories Reference_Outputs several RPA dielectric functions are saved with the dielectric function calculated with the 10x10x10 and the 14x14x14 k-grid. You will learn that within RPA spectra the lowest energy peak is under-estimated. Also the spectra with and without SOC look very similar and the SO splitting is almost not present. This is clearly due to the excitonic nature of the E1 peak which can be correctly described only including the electron-hole interaction.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== RPA absorption with local fields ==&lt;br /&gt;
&lt;br /&gt;
To also include the local fields effect you can generate the input with the command: &lt;br /&gt;
 &amp;gt;yambo -o c -k hartree -F My_inputs/04_RPA_LF.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
In the input file we provide you will see that now the chimod and size of the dynamical matrix are set to&lt;br /&gt;
 Chimod= &amp;amp;quot;Hartree&amp;amp;quot;       # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1       Ry    # [Xd] Response block size&lt;br /&gt;
&lt;br /&gt;
Including local fields the poles of absorption will move from KS transitions to many-electrons transitions (although we are still neglecting the electron-hole interaction). As a result you will need more states to converge the absorption spectrum. This is why we set the number of bands to 15:&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 15 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
while as before we will have&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 %&lt;br /&gt;
 LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/04_RPA_LF.in -J 04_RPA_LF -C 04_RPA_LF_out&lt;br /&gt;
&lt;br /&gt;
In the 04_RPA+LF_out folder you will fine the report and the output files as before. The real and imaginary parts of the RPA+LF dielectric function with local fields are column 3 and 2 respectively of the .eps file. While the corresponding IP-RPA spectra is reported in columns 5 and 4.&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 30 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
In the following picture we compare the result of IP-RPA and RPA+LF with SOC.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA_IP_vs_LF.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== BSE absorption with QP corrections ==&lt;br /&gt;
&lt;br /&gt;
A more detailed description of BSE in Yambo is available in the following tutorial: &lt;br /&gt;
[https://wiki.yambo-code.eu/wiki/index.php?title=Calculating%20optical%20spectra%20including%20excitonic%20effects:%20a%20step-by-step%20guide BSE in hBN].&lt;br /&gt;
&lt;br /&gt;
=== Static Screening ===&lt;br /&gt;
&lt;br /&gt;
First we need to obtain the static screening. &lt;br /&gt;
&lt;br /&gt;
This can be done using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s -F My_inputs/05_screening.in&lt;br /&gt;
&lt;br /&gt;
In the resulting input file you can also see the parameters used to compute the static dielectric function needed for the screened Coulomb term (W) of the BSE kernel. Here we use 20 bands and an energy cut-off of 1 Ry.&lt;br /&gt;
&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 20 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 1            Ry    # [Xs] Response block size&lt;br /&gt;
&lt;br /&gt;
Remember to double the number of bands for the case with spin-oribit coupling included. &lt;br /&gt;
&lt;br /&gt;
Then run the file &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F My_inputs/05_screening.in -J screening -C screening&lt;br /&gt;
&lt;br /&gt;
=== BS Kernel and Solver ===&lt;br /&gt;
&lt;br /&gt;
Now we build the BS kernel, and specify the BS kernel solver. Overview of the BSE solvers is available using the following link: [[BSE solvers overview]]. In this tutorial we will use Haydock solver because it is computationally cheaper.&lt;br /&gt;
&lt;br /&gt;
As you probably know the inclusion of the electron-hole interaction makes the approach in G space not feasible. We have thus to compute the dielectric function in the electron-hole space, building up the excitonic hamiltonian. Thus to create the input file you can run the command:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y h -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder. As before you, in the directory Inputs, you can find an example with suggested parameters. The plane-wave cutoffs used to expand wavefunctions is set to 10 Ry, the cut-off on the exchange interaction between the electron and the hole (i.e. for the local-fields) is set to 10 Ry (here we use a much higer value compared to the previous run since the computational cost of increasing this variable in the electron-hole space is very low). and, finally, the cut-off on the direct electron-hole interaction is set to 1 Ry (to build up this term, where the interaction is screened, we need to compute the static dielectric constant in G-space, thus increasing this value is computationally demanding).&lt;br /&gt;
 FFTGvecs= 10     Ry    # [FFT] Plane-waves&lt;br /&gt;
 BSENGexx= 10     Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=  1     Ry    # [BSK] Screened interaction block size&lt;br /&gt;
&lt;br /&gt;
The input variable &amp;amp;quot;KfnQP_E&amp;amp;quot; can be used to include a scissor operator, i.e a opening of the DFT band gap. The value 0.53 eV is the coverged correction at Gamma obtained in the GW run. Here we will calculate the BSE assuming that the &amp;amp;quot;scissor operator approximation&amp;amp;quot; is valid for GaSb (to be checked in principle!) .&lt;br /&gt;
&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 0.530000 &amp;lt;/span&amp;gt; | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
To build up the excitonic matrix we consider the states from 3 to 6, i.e. we are using 2 occupied and 2 unoccupied bands.&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and we will build up the dielectric function using a grid of 200 point in frequency space&lt;br /&gt;
 BEnSteps= 200                # [BSS] Energy steps&lt;br /&gt;
Finally, similarly as before, we will have&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
Remember that the BS kernel is written in the electron-hole space and its size is given by the relation&amp;lt;br /&amp;gt;&lt;br /&gt;
BS kernel size = Valence Bands × Conduction Bands × K-points in the whole BZ.&amp;lt;br /&amp;gt;&lt;br /&gt;
This means that in the case with SO we are building up a matrix 2x2=4 times larger of the corresponding calculation without spin-orbit (you can compare the input in With_SO/Yambo/Inputs / Without_SO/Yambo/Inputs and reference outputs in With_SO/Yambo/Reference_Outputs / With_SO/Yambo/Reference_Outputs)&lt;br /&gt;
&lt;br /&gt;
We are ready to run the BSE calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J &amp;quot;05_BSE,screening&amp;quot; -C 05_BSE&lt;br /&gt;
&lt;br /&gt;
We specify to Yambo the folder which contains calculated static screening, and in &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; the two response files &amp;lt;code&amp;gt; o-05_BSE.eel_q1_haydock_bse &amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-05_BSE.eps_q1_haydock_bse&amp;lt;/code&amp;gt; can be found. In the &#039;&#039;eps file&#039;&#039; the real and imaginary parts of the BSE dielectric function are column 3 and 2 respectively, while the corresponding GW spectra are column 5 and 4.&lt;br /&gt;
&lt;br /&gt;
In the folder &amp;lt;code&amp;gt;screening&amp;lt;/code&amp;gt; you will find instead the DBs of the static screening (W) needed to build up the BSE kernel (&amp;lt;code&amp;gt;ndb.em1s&amp;lt;/code&amp;gt;) and in the folder &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; the BSE matrix (&amp;lt;code&amp;gt;ndb.BS*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 40 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   5 | 12 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
If you do the corresponding calculations for the case without spin-orbits using the databases in the directory GaSb_nSO/YAMBO and inputs in GaSb_nSO/Inputs, the two BSE spectra should look like in this figure:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE_few_kpts.jpg|500px|center|GaSb absorption BSE gew kpts]]&lt;br /&gt;
As mentioned before the two spectra present spurious peaks ( as the first peak!) due to uncoverged k-point sampling. Nevertheless the splitting due to spin-orbit interaction is already visible in the peak around 2.1 eV.&lt;br /&gt;
A more converged (yet not fully converged calculation) would give the following results which compares very nicely with the experimental data:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE.png|500px|center|GaSb absorption BSE]]&lt;br /&gt;
&lt;br /&gt;
=== Using Static Screening without SOC, for the SOC case === &lt;br /&gt;
&lt;br /&gt;
Additionally, a BSE run for the spin-orbit coupling case can be done using the screening computed for the case without spin-orbit coupling. &lt;br /&gt;
&lt;br /&gt;
To do it we can make a symlink from the no-SOC folder:&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt; cd Path/GaSb/With_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt; ln -s Path/GaSb/Without_SOC/YAMBO/6x6x6_shifted/screening screening_no_soc&lt;br /&gt;
&lt;br /&gt;
The BSE kernel can be build and solved using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s -o b -k sex -y h -V qp -F 06_BSE_using_nosoc_screening.in&lt;br /&gt;
&lt;br /&gt;
Here we combined the screening part (-X s) and BSE part (-o b -k sex -y h -V qp). All of the input parameters have been discussed previously. Although, it is important to keep the right matching behind the screening bands used for the no SOC and SOC case.&lt;br /&gt;
&lt;br /&gt;
If for the SOC case the specified screening bands are n1, n2 then for the no-SOC screening the bands should be ((n1-1)/2+1, n2/2). &lt;br /&gt;
&lt;br /&gt;
 # No SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   1 | 20 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and &lt;br /&gt;
 # SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   1 | 40 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The results for the BSE solved using screening used from SOC and no SOC databases is presented below. As we can see, there is almost no difference between them. &lt;br /&gt;
&lt;br /&gt;
[[File:GaSb screening w and wo soc second.png|600px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
= Exciton analysis =&lt;br /&gt;
&lt;br /&gt;
In this part of the tutorial we show how to analyze the origin of the E1 peak in GaSb. Since the calculation with the SOC case is very demanding we will do that only for the case without SOC. So first of all enter the &lt;br /&gt;
&amp;lt;code&amp;gt;Without_SOC/YAMBO/6x6x6_shifted&amp;lt;/code&amp;gt; folder and, if you didn&#039;t before, run the setup:&lt;br /&gt;
 &amp;gt;cd Without_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt;ls SAVE&lt;br /&gt;
 &amp;gt;yambo -J 01_init&lt;br /&gt;
 &amp;gt;ls SAVE r-01_init_setup&lt;br /&gt;
&lt;br /&gt;
Similar to previous section we need to compute the static screening first, and then solve the BSE equation.&lt;br /&gt;
This time we will use the full diagonalization solver to calculate all exciton energies and composition in terms of electron-hole pairs. See [[BSE solvers overview]] for more details. &lt;br /&gt;
&lt;br /&gt;
Then create the &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; folder and the input file for a BSE&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -X s -F My_inputs/05_screening.in&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_screening.in -J screening -C screening &lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y d -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the same parameters you used to compute the absorption with SOC previously. The number of bands will be the half of the case without SOC&lt;br /&gt;
 % BSEBands&lt;br /&gt;
  3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
Also this time you will use the to &amp;lt;code&amp;gt;&amp;amp;quot;d&amp;amp;quot;&amp;lt;/code&amp;gt; and uncomment the variable needed to Write to disk excitonic the WFs:&lt;br /&gt;
 BSSmod= &amp;amp;quot;d&amp;amp;quot;              # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft`&lt;br /&gt;
 WRbsWF                   # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
Then you have to run the BSE calculation (notice that, in case you already computed the BSE spectrum also for the case without SOC, the code can read the results from the provious BSE run skipping many steps)&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J 05_BSE -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; folder you will now find a new database file called &amp;lt;code&amp;gt;ndb.BS_diago_Q01&amp;lt;/code&amp;gt;. This is what you need to analyze the exciton peaks running the post-processing code ypp.&lt;br /&gt;
&lt;br /&gt;
First of all you can run:&lt;br /&gt;
 &amp;gt;ypp -e s -J 05_BSE -C BSE_out&lt;br /&gt;
This run will sort in energy the excitonic eigenvalues writing their oscillator strenghts (see &amp;lt;code&amp;gt;o-06_bse.exc_E_sorted&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Then you can create the ypp input required to analize how each excitonic state is build up in terms of single-particle states:&lt;br /&gt;
 &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE&lt;br /&gt;
Put the index &amp;lt;code&amp;gt;#N&amp;lt;/code&amp;gt; of the exciton with higher strenght in the E_1 peak region&lt;br /&gt;
 &amp;gt;ypp -F My_inputs/05_BSE_ypp.in -J 05_BSE -C 06_BSE_out&lt;br /&gt;
You will find the two files &amp;lt;code&amp;gt;o-06_bse.exc_weights_at_#N&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-06_bse.exc_amplitude_at_#N&amp;lt;/code&amp;gt;. In these files you will find informations on the highest strenght exciton in the E1 peak region.&lt;br /&gt;
&lt;br /&gt;
= Perturbative SOC approach =&lt;br /&gt;
&lt;br /&gt;
It is possible to include the spin-orbit coupling perturbatively in Yambo.&lt;br /&gt;
&lt;br /&gt;
To first order the perturbation just gives a correction to the DFT eigenvalues and does not touch the wave–functions. Numerically the perturbation need to be applied by mapping the solution of the DFT calculation without SOC into the solution of the DFT calculation with SOC. Once a mapping is defined, the SOC perturbation could be directly applied to the KS energies before solving both the GW scheme and/or the BSE.&lt;br /&gt;
&lt;br /&gt;
All we need is to computed a SOC mapping database given by the following equation (eq 68 in the referenced paper):&lt;br /&gt;
&lt;br /&gt;
EQUATION &lt;br /&gt;
&lt;br /&gt;
Where x, y, z are ... &lt;br /&gt;
&lt;br /&gt;
To build this map, in the folder without spin-orbit coupling we do the following:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; cd Solid_GaSb/Without_SOC/Yambo/6x6xWi6_shifted&lt;br /&gt;
 &amp;gt; mkdir SOC_DBs&lt;br /&gt;
 &amp;gt; cp -r Path/SAVE_GaSb_k6_w_soc SOC_DBs/SAVE&lt;br /&gt;
 &amp;gt; ypp -w &lt;br /&gt;
 &amp;gt; ypp -F map_wfs.in -J SOC_map -C SOC_map&lt;br /&gt;
&lt;br /&gt;
With the following input for &amp;lt;code&amp;gt;map_wfs.in&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 WFs_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 WFs_SOC_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 SOC_DBs= &amp;quot;SOC_DBs&amp;quot;        # Path to the folder containing the DB with SOC&lt;br /&gt;
 SOC_splitting= 0.01 eV    # SOC splitting between the levels&lt;br /&gt;
 % bands_to_map&lt;br /&gt;
   5 | 12 |                # Number of bands to map&lt;br /&gt;
 %&lt;br /&gt;
 bands_buffer=1&lt;br /&gt;
&lt;br /&gt;
Where the SAVE folder with spin-orbit coupling should be saved in a separate folder, and in this case it is in the &amp;lt;code&amp;gt; SOC_DBs &amp;lt;/code&amp;gt; folder. &lt;br /&gt;
Then, the BSE can be computed using the following command &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F 05_BSE+scissor.in -J &amp;quot;BSE_soc_perturbative,screening,SOC_map&amp;quot; -C BSE_soc_perturbative&lt;br /&gt;
&lt;br /&gt;
Where screening was precomputed, and the SOC_map is the one generated in this section. Check BSE section for more details on setting a BSE calculation.&lt;br /&gt;
Not converged results are presented below. &lt;br /&gt;
[[File:GaSb perturbative soc 1.png|600px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
= Other excercises =&lt;br /&gt;
&lt;br /&gt;
# Try to converge the G0W0 increasing the polarization RL size, the polarization bands, the number of bands in the Green function and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Try to converge the absorption spectra increasing the polarization RL size, the polarization bands, the number of bands to construct the excitonic matrix and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Plot the EELS spectrum obtained within IP-RPA and RPA with local fields. Also in this case you can check the effect of increasing the polarization bands. You may also try to do a resonant only calculation to see that the EELS cannot be described using only the resonant part of the response function.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;&amp;gt;M. Marsili, A. Molina-Sánchez, M. Palummo, D. Sangalli, A. Marini, [https://doi.org/10.1103/PhysRevB.103.155152  Phys. Rev. B &#039;&#039;&#039;103&#039;&#039;&#039;, 155152 (2021)] ([https://arxiv.org/abs/2103.02266 arXiv 2103.02266])&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wiki&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Gallium_antimonide GaSb on wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;&amp;gt; [https://en.wikipedia.org/wiki/Spin%E2%80%93orbit_interaction#In_atomic_energy_levels Spin-Orbit Interaction on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kim&amp;quot;&amp;gt; Y.S. Kim et al. Phys. Rev. B &#039;&#039;&#039;82&#039;&#039;&#039;, 205212 (2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;rem&amp;quot;&amp;gt; I. N. Remediakis and Efthimios Kaxiras, Phys. Rev. B &#039;&#039;&#039;59&#039;&#039;&#039;, 5336 (1999).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan1&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1002/pssb.200983959 Phys. Sol. State B &#039;&#039;&#039;247&#039;&#039;&#039;, 1960 (2010)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan2&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1103/PhysRevLett.104.157402 Phys. Rev. Lett. &#039;&#039;&#039;104&#039;&#039;&#039;, 157402 (2010)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan3&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1103/PhysRevB.83.155421 Phys. Rev. B 83, &#039;&#039;&#039;155421&#039;&#039;&#039; (2011)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Thermal_lines_and_special_displacements_with_YamboPy&amp;diff=9031</id>
		<title>Thermal lines and special displacements with YamboPy</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Thermal_lines_and_special_displacements_with_YamboPy&amp;diff=9031"/>
		<updated>2025-09-12T13:41:34Z</updated>

		<summary type="html">&lt;p&gt;Davide: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&#039;&#039;&#039;THIS TUTORIAL IS FOR INTERNAL USE ONLY&#039;&#039;&#039;&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In this tutorial we show how to generate Thermal Lines&amp;lt;ref name=&#039;monserrat&#039;/&amp;gt;. and Special Displacements&amp;lt;ref name=&amp;quot;marios&amp;quot;/&amp;gt; with YamboPy and then use them&lt;br /&gt;
to calculate different properties at finite temperature. &amp;lt;br&amp;gt;We will start from phonon calculations, interpolation of phonon modes, generation&lt;br /&gt;
of thermal lines/special displacements supercells and finally calculation of electronic properties ad finite temperature.&amp;lt;br&amp;gt;&lt;br /&gt;
This tutorial requires a deep knowledge of phonon calculations, and the study of Refs.&amp;lt;ref name=&#039;monserrat&#039;/&amp;gt;,&amp;lt;ref name=&amp;quot;marios&amp;quot;/&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Phonons==&lt;br /&gt;
=== Phonon calculation ===&lt;br /&gt;
In order to generate Thermal-lines or Special Displacements we need a converged phonon calculation. We will take as example bulk Diamond. &amp;lt;br&amp;gt;&lt;br /&gt;
In the file [https://www.attaccalite.com/tutorials_yambo/Diamond_Phonons.tgz Diamond_Phonons.tgz] you will find all inputs to generate phonon band&lt;br /&gt;
structure report below:&lt;br /&gt;
&lt;br /&gt;
[[File:Diamond_phonons.png|500px | center]]&lt;br /&gt;
&lt;br /&gt;
Notice that calculations are not fully converged but the selected parameters are enough to get positive and reasonable phonons for the Diamond.&lt;br /&gt;
&lt;br /&gt;
=== Phonon interpolation in the BZ ===&lt;br /&gt;
Now that you calculated phonons, you have to interpolate them on a regular grid in the full Brillouin zone, that later will be used&lt;br /&gt;
to general supercells and displace atoms. &amp;lt;br&amp;gt;To do this, we use the &amp;lt;code&amp;gt;dos&amp;lt;/code&amp;gt; option of &amp;lt;code&amp;gt;matdyn.x&amp;lt;/code&amp;gt; together with the &amp;lt;code&amp;gt;nosym&amp;lt;/code&amp;gt; flag.&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;input&lt;br /&gt;
     asr=&#039;simple&#039;&lt;br /&gt;
     flfrc=&#039;diamond.fc&#039;, &lt;br /&gt;
     flfrq=&#039;diamond.freq&#039;,&lt;br /&gt;
     dos=.true.&lt;br /&gt;
     nosym=.true.&lt;br /&gt;
     fldos=&#039;diamond.dos&#039;,&lt;br /&gt;
     deltaE=1.d0,&lt;br /&gt;
     nk1=1, nk2=2, nk3=2&lt;br /&gt;
  /&lt;br /&gt;
this will generate a file &amp;lt;code&amp;gt;matdyn.modes&amp;lt;/code&amp;gt; that contains all phonon modes, including both eigenvalues and eigenvectors.&lt;br /&gt;
&lt;br /&gt;
==Thermal-lines/Special Displacements==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&#039;monserrat&#039;&amp;gt;[https://arxiv.org/abs/1512.06377 Vibrational averages along thermal lines],&lt;br /&gt;
Bartomeu Monserrat, Phys. Rev. B &#039;&#039;&#039;93&#039;&#039;&#039;, 014302 (2016)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref name=&#039;marios&#039;&amp;gt;[https://arxiv.org/abs/1912.10929 Theory of the special displacement method for electronic structure calculations at finite temperature],&lt;br /&gt;
Marios Zacharias, Feliciano Giustino, Phys. Rev. Research &#039;&#039;&#039;2&#039;&#039;&#039;, 013357 (2020)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=9026</id>
		<title>SOC</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=9026"/>
		<updated>2025-09-10T09:08:30Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Effect of spin-orbit interaction =&lt;br /&gt;
&lt;br /&gt;
Spin–orbit coupling (SOC) is a relativistic interaction between an electron’s spin and its orbital motion in the crystal potential. Presently, SOC can be included withing GW-BSE approach either perturbatively, or fully, considering the spinorial nature of the electronic wave-function. In this tutorial, we will use both approaches. More details on the theory and comparison between full spinorial GW-BSE and perturbative approach to SOC can be found in the following paper &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;, and in the Wikipedia article&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;/&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To include the spin-orbit coupling we start with many–body total Hamiltonian of the system including first order relativistic corrections. &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 1 many body rel hamiltonian.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where, &amp;lt;math&amp;gt;\hat{H}^{0}&amp;lt;/math&amp;gt; is the non-relativistic one body hamiltonian, &amp;lt;math&amp;gt;\hat{H}^{(e-e)}&amp;lt;/math&amp;gt; is the e-e Coulomb interaction, and &amp;lt;math&amp;gt;\hat{H}^{(RK)} + \hat{H}^{(SOI)}&amp;lt;/math&amp;gt; are the first order relativistic correction, and the last term is the spin-orbit interaction (SOI) in which we are interested in this tutorial. &lt;br /&gt;
&lt;br /&gt;
The SOI term itself is composed of three different components, &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 2 soi term.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; are many-body terms, called &amp;quot;two-electron spin-orbit&amp;quot;, and &amp;quot;spin-other-orbit&amp;quot;, respectively. And,  &amp;lt;math&amp;gt; \hat{H}^{(SOI)} = \hat{H}^{SO(N)} &amp;lt;/math&amp;gt; is &amp;quot;one electron spin-orbit&amp;quot; is a one body term, which is given by: &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 3 one electron spin orbit.png|250px|frameless]]&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;math&amp;gt;\underline{\nu}&amp;lt;/math&amp;gt; a 2x2 matrix in the &amp;lt;math&amp;gt;\uparrow&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\downarrow&amp;lt;/math&amp;gt; spin space, and:&lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 4 v soc.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;\mathbf{\sigma}&amp;lt;/math&amp;gt; is the three dimensional vector whose components are the Pauli matrices. In a plane wave representation the SOC is, in practice, accounted for by the use of pseudopotentials. The SOC contribution from the pseudopotential captures what is called “local SOC”, which is due to the electrons orbiting around the nuclei, it neglects instead the itinerant SOC which can- not be easily captured in periodic boundary conditions. When relativistic corrections are taken into account instead, one should in principle account for the effects of the many–body terms &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt;. A shortcut is to add a term constructed replacing &amp;lt;math&amp;gt;v^{ext}&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;v^{Hxc}&amp;lt;/math&amp;gt; into previous equation. Doing so partially account for &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt;, while &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; is neglected.&lt;br /&gt;
&lt;br /&gt;
= Introduction = &lt;br /&gt;
&lt;br /&gt;
The scope of this tutorial is to calculate the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; corrections to the DFT-LDA band-structure and the BSE optical spectrum for a bulk semiconducting material, gallium antimonide (GaSb) &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;wiki&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;kim&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;rem&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan1&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan2&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan3&amp;quot;/&amp;gt;. We will compare the results with and without the spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For this tutorial we provide two state (GS) databases (DBs), one contains the GS-DBs with the effect of SOC included and one without. The idea is to repeat the same calculation for both database and compare the results and the performances of the code. GaSb input files can be downloaded from the following link [https://media.yambo-code.eu/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz], and can be unarchived using the following command: &lt;br /&gt;
&lt;br /&gt;
 $ tar -xzf GaSb.tar.gz&lt;br /&gt;
&lt;br /&gt;
As in the other tutorials, you will find two main folders, Without_SOC and With_SOC.&lt;br /&gt;
To avoid continuously switching between the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;With_SOC&amp;lt;/code&amp;gt; directories, we recommend opening two terminals: keep one terminal for the without SOC case and the other for the with SOC case.&lt;br /&gt;
 $ cd GaSb/With_SOC    # terminal 1&lt;br /&gt;
 $ cd GaSb/Without_SOC # terminal 2&lt;br /&gt;
&lt;br /&gt;
Inside each of the two there are two subfolders:&lt;br /&gt;
&lt;br /&gt;
* Pwscf - contains the input files and the pseudo-potentials for Quantum ESPRESSO, to generate the ground-state databases (GS-DBs) yourself.&lt;br /&gt;
* YAMBO - contains Example of yambo input files (Input folder) and output files (References folder)&lt;br /&gt;
&lt;br /&gt;
In the next section we show how to generate the databases running QE. If you prefer to skip that step, you can also download pre-computed databases at the following link: [https://media.yambo-code.eu/educational/tutorials/files/GaSb_DBs.tar.gz GaSb_DBs.tar.gz]&lt;br /&gt;
&lt;br /&gt;
= DFT band structure =&lt;br /&gt;
&lt;br /&gt;
To generate the  KS WFs and energies databases, you must enter the Pwscf folder and generate the KS databases&lt;br /&gt;
 $ cd Pwscf&lt;br /&gt;
 $ pw.x &amp;lt; 01_scf_kx4.in &amp;gt; 01_scf_kx4.out&lt;br /&gt;
 $ pw.x &amp;lt; 02_nscf_kx4_shifted+Gamma.in &amp;gt; 02_nscf_kx4_shifted+Gamma.out&lt;br /&gt;
 $ cd GaSb.save&lt;br /&gt;
 $ p2y&lt;br /&gt;
&lt;br /&gt;
You just generated your SAVE folder to be used for the YAMBO tutorial. We are going to move it inside a dedicated folder under Yambo&lt;br /&gt;
Let&#039;s have a look to the content of the Yambo folder. &lt;br /&gt;
 $ ls ../../YAMBO&lt;br /&gt;
 4x4x4_shifted+GAMMA 6x6x6_shifted Inputs  Reference&lt;br /&gt;
&lt;br /&gt;
Inside the YAMBO folder there are indeed two folders corresponding to two different k-points meshes. In this tutorial we will use the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; folder for the computation of the QP corrections within the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; approximation. It is a k-points grid obtained as the sum of a 4x4x4 k-points grid centered in Gamma and a 4x4x4 grid shifted. Instead for the computation of the optical properties we will use the &amp;lt;code&amp;gt;6x6x6_shifted&amp;lt;/code&amp;gt; folder. It is a 6x6x6 k-points grid shifted from Gamma. In the References folder yuo will find runs for the grids, &amp;lt;code&amp;gt;10x10x10_shifted&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;14x14x14_shifted&amp;lt;/code&amp;gt; used to do a minimum convergence of the optical properties against the number of k-points. (pay attention that the BSE calculations with bigger grids will be very memory and time demanding!). Later, you can generate the corresponding SAVE folders as well if you wish.&lt;br /&gt;
&lt;br /&gt;
For now let&#039;s move our SAVE folder inside 4x4x4_shifted+GAMMA&lt;br /&gt;
 $ mv SAVE ../../YAMBO&lt;br /&gt;
&lt;br /&gt;
The first part of the tutorial is on the computation of the QP corrections. So let&#039;s enter the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; grid and, as seen in other tutorials run the Initialization:&lt;br /&gt;
&lt;br /&gt;
 $ cd ../../YAMBO/4x4x4_shifted+GAMMA/ &lt;br /&gt;
 $ yambo &lt;br /&gt;
Now compare the result of the two setup runs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; With_SOC Energies and Occupations (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  [02.05] Energies &amp;amp; Occupations&lt;br /&gt;
  ==============================&lt;br /&gt;
&lt;br /&gt;
  [X] === General ===&lt;br /&gt;
  [X] Electronic Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Bosonic    Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Finite Temperature mode                       : no&lt;br /&gt;
  [X] El. density                                   :  0.14622E+24 [cm-3]&lt;br /&gt;
  [X] Fermi Level                                   :  5.085716 [eV]&lt;br /&gt;
&lt;br /&gt;
  [X] === Gaps and Widths ===&lt;br /&gt;
  [X] Conduction Band Min                           :  0.095395 [eV]&lt;br /&gt;
  [X] Valence Band Max                              :  0.000000 [eV]&lt;br /&gt;
  [X] Filled Bands                                  :   8&lt;br /&gt;
  [X] Empty Bands                                   :    9  200&lt;br /&gt;
  [X] Direct Gap                                    :  0.095395 [eV]&lt;br /&gt;
  [X] Direct Gap localized at k                     :  29&lt;br /&gt;
  [X] Indirect Gap                                  :  0.095395 [eV]&lt;br /&gt;
  [X] Indirect Gap between kpts                     :  29  29&lt;br /&gt;
  [X] Last valence band width                       :  3.508355 [eV]&lt;br /&gt;
  [X] 1st conduction band width                     :  3.413699 [eV]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; Without_SOC Energies and Occupations (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  [02.05] Energies &amp;amp; Occupations&lt;br /&gt;
  ==============================&lt;br /&gt;
&lt;br /&gt;
  [X] === General ===&lt;br /&gt;
  [X] Electronic Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Bosonic    Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Finite Temperature mode                       : no&lt;br /&gt;
  [X] El. density                                   :  0.14622E+24 [cm-3]&lt;br /&gt;
  [X] Fermi Level                                   :  4.815616 [eV]&lt;br /&gt;
&lt;br /&gt;
  [X] === Gaps and Widths ===&lt;br /&gt;
  [X] Conduction Band Min                           :  0.367929 [eV]&lt;br /&gt;
  [X] Valence Band Max                              :  0.000000 [eV]&lt;br /&gt;
  [X] Filled Bands                                  :   4&lt;br /&gt;
  [X] Empty Bands                                   :    5  200&lt;br /&gt;
  [X] Direct Gap                                    :  0.367929 [eV]&lt;br /&gt;
  [X] Direct Gap localized at k                     :  29&lt;br /&gt;
  [X] Indirect Gap                                  :  0.367929 [eV]&lt;br /&gt;
  [X] Indirect Gap between kpts                     :  29  29&lt;br /&gt;
  [X] Last valence band width                       :  3.276561 [eV]&lt;br /&gt;
  [X] 1st conduction band width                     :  3.649610 [eV]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A clear shrink of the DFT-LDA gap due to spin-orbit occurs. Note that, having 8 electrons in the fundamental cell, due to the spinorial nature of the wavefunction, with SOC we have 8 occupied bands, while only 4 without. Here a picture of the DFT band structure for the two cases.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_pwscf.png|500px|center|GaSb bands DFT]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the band structure of GaSb =&lt;br /&gt;
 &lt;br /&gt;
Now we will perform a G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; calculation to correct the DFT-LDA bandstructure. We assume that you are already familiar with the concept of screening needed to build up the GW self-energy and thus the QP corrections. At this stage we assume you are already inside 4x4x4_shifted+GAMMA. There, create a local folder &#039;&#039;My_inputs&#039;&#039; and generate the input for a G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; calculation within the plasmon-pole approximation using the following command: &lt;br /&gt;
 $ mkdir My_inputs&lt;br /&gt;
 $ yambo -p p -g n -V RL -F My_inputs/02_GW.in&lt;br /&gt;
However we also provide an input file with suggested parameters for this calculations inside the folder &#039;&#039;Solid_GaSb/Without_SOC/Yambo/Inputs&#039;&#039;. Remember: these parameters are system dependent and should be converged as you can see other GW tutorials (e.g. [[Silicon|GW on bulk Silicon]] or [[GW on h-BN (standalone)]]). Here we provide reasonable (but not fully converged) parameters to have a low computational cost but yet qualitatively meaningful results.&lt;br /&gt;
&lt;br /&gt;
The plane-waves cutoff for the wavefunctions and exchange part of the self-energy are set to 10 Ry. &lt;br /&gt;
 FFTGvecs =  10 Ry   # [FFT] Plane-waves&lt;br /&gt;
 EXXRLvcs=   10 Ry   # [XX] Exchange RL components&lt;br /&gt;
while we will use 40 bands, a plane-wave cut-off of 1 Ry, and a plasmon-pole energy of 20 eV to build up the screening matrix &lt;br /&gt;
 NGsBlkXp=    1 Ry  # [Xp] Response block size &lt;br /&gt;
 PPAPntXp= 20.  eV  # [Xp] PPA imaginary energy &lt;br /&gt;
 % BndsRnXp    &lt;br /&gt;
 1 | 40 |        # [Xp] Polarization function bands &lt;br /&gt;
 % &lt;br /&gt;
 % LongDrXp  &lt;br /&gt;
 1.000000 | 1.000000 | 1.000000 |        # [Xp] [cc] Electric Field &lt;br /&gt;
 %&lt;br /&gt;
The number of bands in the green function G to build up the GW self-energy is also 40 &lt;br /&gt;
 % GbndRnge    &lt;br /&gt;
 1 | 40 |                 # [GW] G[W] bands range &lt;br /&gt;
 %&lt;br /&gt;
with those parameters we will compute the correction only in the last 2 points of our grid, 28 and 29 and for the states from 3 to 6, setting the input variable &lt;br /&gt;
 %QPkrange                      &lt;br /&gt;
 28 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
You can now run the code using either your input file or the one provided in the Inputs folder &lt;br /&gt;
 $ yambo -F My_inputs/02_GW.in -J GW -C GW&lt;br /&gt;
The run will take some time. Indeed the code has first to compute the dipoles, then the screening within the plasmon pole approximation and finally the self-energy, first the exchange part Gv and then the correlation part G(W-v). &lt;br /&gt;
In the &amp;lt;code&amp;gt;GW&amp;lt;/code&amp;gt; folder you will find the &amp;lt;code&amp;gt;o-GW.qp&amp;lt;/code&amp;gt; file containing the GW corrections.&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &lt;br /&gt;
 #&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #&lt;br /&gt;
  ...&lt;br /&gt;
      29        4      0.000000      0.182291    0.992707 &lt;br /&gt;
      29        5      0.367929      0.597428    -2.431549&lt;br /&gt;
  ...&lt;br /&gt;
Thus it is about 0.60-0.18=0.42  eV (not fully converged).&lt;br /&gt;
&lt;br /&gt;
We can also compute the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; correction for all the k-point of the database. To this end open the input file &#039;&#039;My_inputs/02_GW.in&#039;&#039; (or your own) and edit the number of k-point to be computed &lt;br /&gt;
 %&lt;br /&gt;
 QPkrange                      1 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
Remember to use the same name after the -J option, so that the code will be able to use the informations from the previous run and avoid many calculations. &lt;br /&gt;
 $ yambo -F My_inputs/02_GW.in -J GW -C GW&lt;br /&gt;
In the &#039;&#039;GW&#039;&#039; folder you will find now also the &#039;&#039;o-GW.qp_01&#039;&#039; file containg the GW corrections for all the k-points.&lt;br /&gt;
&lt;br /&gt;
Now you can enter the folder of the 4x4x4 shifted grid&lt;br /&gt;
 cd Solid_GaSb/With_SOC/Yambo/4x4x4_shifted+GAMMA&lt;br /&gt;
and repeat the same calculations. Remember that in the input file you will generate you should change all the band ranges doubling the number of states (do you understand why?) &lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
    1 | 80 |        # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
    1 | 80 |        # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 % QPkrange&lt;br /&gt;
   29 | 29 |   5 | 12|  # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band.&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #  &lt;br /&gt;
   ...   &lt;br /&gt;
       29         8       0.000000    0.251074           0.896306&lt;br /&gt;
       29         9       0.095395    0.647108          -2.334492&lt;br /&gt;
   ...&lt;br /&gt;
Thus it is about 0.65-0.25=0.43 eV (not fully converged). Indeed the same result obtained without SOC. The resulting electronic gap is about 0.49 eV reasonably close to the experimental band gap of 0.72 eV. It is also a big improvement compared to the LDA band gap (approximatively 0.09 eV). This correction will be used, in the form of a scissor operator, as a starting point to compute the optical spectra.&lt;br /&gt;
&lt;br /&gt;
Again we can also compute the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; correction for all the k-point of the database. You can plot column 4 of the output file against column 3 to obtain a picture of the QP corrections. In the following figure we show the plot of the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; correction (E_G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;-E_LDA) vs the LDA eigenvalues. The corrections at the Gamma and the L point are marked with bigger red spots.&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=400px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_GoWo_corrections.png|GaSb QP corrections without SOC &lt;br /&gt;
Image:GaSb GoWo corrections SOC.png|GaSb GoWo corrections with SOC&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
[[File:SOC_GaSb_GoWo_corrections.png|500px|frameless|center]]&lt;br /&gt;
[[File:GaSb GoWo corrections SOC.png|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;scissor operator approach&amp;amp;quot; does not seem a very good approximation for GaSb. Indeed the quasi particle corrections are not constant, especially in the conduction band. For example the correction to the Gamma point is bigger than the corrections to all other k-points. This result however maybe due to the poor covergence parameters. If you would like to better investigate these results you should try do convergence tests. Since QP corrections are poorly sensitive to the spin-orbit interaction it is probably a good idea to do convergence without SOC.&lt;br /&gt;
&lt;br /&gt;
Here we also provide a plot of the band-structure at different levels of approximation: DFT, DFT+scissor, QP. The band structures are obtained from an interpolation of our k-points mesh and it is not very precise since, again, we are using a quite coarse sampling of the brillouine zone. Indeed we can see that already the interpolated DFT band structure deviates from the exact DFT band-structure, which has also been reported. In particular in the region nearby Gamma. However it gives quite nicely an overview of how the QP band structure compares with the DFT band stucture. The main effect is indeed an opening of the band-gap which can be described in terms of a scissor operator.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_yambo.png|500px|center|GaSb QP bands]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the optical properties of GaSb =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--{|&lt;br /&gt;
| [[File:SOC_GaSb_bands.png|600px|center|GaSb bands 1]]&lt;br /&gt;
| [[File:SOC_GaSb_absorption.png|600px|center|GaSb bands 2]]&lt;br /&gt;
|} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now turn our attention on the optical properties of the system. Here we will compute the dielectric function at different levels of approximations:&amp;lt;br /&amp;gt;&lt;br /&gt;
# at the IP-RPA level, thus using the Fermi golden rule with the KS energies and wave-functions&amp;lt;br /&amp;gt;&lt;br /&gt;
# at the RPA level, thus also including the effect of the local fields&amp;lt;br /&amp;gt;&lt;br /&gt;
# at the BSE level, thus including many-body effects, both correcting the KS energies (we will introduce a scissor obtained from the GW calculation) and considering the statically screened electron-hole interaction&lt;br /&gt;
# Run the simulations with SOC using screening databases computed without SOC.&lt;br /&gt;
# Run the simulations in perturbative SOC approach  &lt;br /&gt;
&lt;br /&gt;
First, setup the calculation (initialisation) in the usual way in the folder without SOC&lt;br /&gt;
 $ cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 $ yambo&lt;br /&gt;
and repeat the same inside the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; before continuing.&lt;br /&gt;
&lt;br /&gt;
== RPA-IP absorption ==&lt;br /&gt;
&lt;br /&gt;
Create a local folder inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; which you will call &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt;, and create the input file:&lt;br /&gt;
 &amp;gt;cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o c -V RL -F My_inputs/03_IP-RPA.in&lt;br /&gt;
&lt;br /&gt;
As before, we also provide an input file with suggested parameters for this calculations. The kind of calculation is controlled by the input variable&lt;br /&gt;
 Chimod= &amp;quot;IP&amp;quot;                 # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1            RL    # [Xd] Response block size&lt;br /&gt;
These tells you that we are building up the dielectric function in G-space considering only on G vector, i.e. the G=0 component. The string Chimod= &amp;amp;quot;IP&amp;amp;quot; recalls us that this means we are neglecting the local fields effect.&lt;br /&gt;
&lt;br /&gt;
We set the plane-waves cutoff for the wavefunctions to&lt;br /&gt;
 FFTGvecs=  10  Ry   # [FFT] Plane-waves&lt;br /&gt;
Since we are interested into the optical spectrum calculation, only the Q=0 term, i.e. the first Q-point, is calculated&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
The number of bands we use is 10. This is a reasonable number of states to converge the IP-RPA optical spectrum in the VIS-UV range. (If you wish to calculate the EELS spectrum for q different from 0 probably more bands will be required.)&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 10 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
As you learned the dielectric function is a tensor and in principle three calculations for light polarized along x,y,z chould be done depending on the experimental setup. However GaSb is a system with cubic symmetry, thus any direction is equivalent. Here we decide to compute epsilon along the &amp;amp;quot;(1 1 1)&amp;amp;quot; direction.&lt;br /&gt;
 % LongDrXd&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation using either your input file or the one provided in the Inputs folder&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/03_IP-RPA.in  -J 03_IP-RPA -C 03_IP-RPA&lt;br /&gt;
&lt;br /&gt;
Inside the &amp;lt;code&amp;gt;03_IP-RPA&amp;lt;/code&amp;gt; folder you will find the databases created by the code (in this case just the dipoles), the report file and the output files for the dielectric function which describes the absorption (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;) and for its inverse (&amp;lt;code&amp;gt;o-03_IP-RPA.eel*&amp;lt;/code&amp;gt;), which describes the electron energy loss. You can plot them with your favorite software (for example gnuplot or xmgrace). The real and imaginary parts of the IP-RPA dielectric function are column 3 and 2 respectively of the file (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;). Using also the reference output file in the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; folder you can compare the spectrum with and without SOC.&lt;br /&gt;
&lt;br /&gt;
Now repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 20 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.jpg|600px|center|GaSb absorption RPA]]&lt;br /&gt;
If you wish to obtain a reasonable spectrum however the 6x6x6 kpts grid is not enough. In order to check the convergence with the number of k-points you should generate denser k-points meshes using the input files provided in the Pwscf folder. &lt;br /&gt;
&amp;lt;!-- (see section [[more.php|More on GaSb]] for more advanced calculations).--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the directories Reference_Outputs several RPA dielectric functions are saved with the dielectric function calculated with the 10x10x10 and the 14x14x14 k-grid. You will learn that within RPA spectra the lowest energy peak is under-estimated. Also the spectra with and without SOC look very similar and the SO splitting is almost not present. This is clearly due to the excitonic nature of the E1 peak which can be correctly described only including the electron-hole interaction.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== RPA absorption with local fields ==&lt;br /&gt;
&lt;br /&gt;
To also include the local fields effect you can generate the input with the command: &lt;br /&gt;
 &amp;gt;yambo -o c -k hartree -F My_inputs/04_RPA_LF.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
In the input file we provide you will see that now the chimod and size of the dynamical matrix are set to&lt;br /&gt;
 Chimod= &amp;amp;quot;Hartree&amp;amp;quot;       # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1       Ry    # [Xd] Response block size&lt;br /&gt;
&lt;br /&gt;
Including local fields the poles of absorption will move from KS transitions to many-electrons transitions (although we are still neglecting the electron-hole interaction). As a result you will need more states to converge the absorption spectrum. This is why we set the number of bands to 15:&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 15 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
while as before we will have&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 %&lt;br /&gt;
 LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/04_RPA_LF.in -J 04_RPA_LF -C 04_RPA_LF_out&lt;br /&gt;
&lt;br /&gt;
In the 04_RPA+LF_out folder you will fine the report and the output files as before. The real and imaginary parts of the RPA+LF dielectric function with local fields are column 3 and 2 respectively of the .eps file. While the corresponding IP-RPA spectra is reported in columns 5 and 4.&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 30 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
In the following picture we compare the result of IP-RPA and RPA+LF with SOC.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA_IP_vs_LF.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== BSE absorption with QP corrections ==&lt;br /&gt;
&lt;br /&gt;
A more detailed description of BSE in Yambo is available in the following tutorial: &lt;br /&gt;
[https://wiki.yambo-code.eu/wiki/index.php?title=Calculating%20optical%20spectra%20including%20excitonic%20effects:%20a%20step-by-step%20guide BSE in hBN].&lt;br /&gt;
&lt;br /&gt;
=== Static Screening ===&lt;br /&gt;
&lt;br /&gt;
First we need to obtain the static screening. &lt;br /&gt;
&lt;br /&gt;
This can be done using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s -F My_inputs/05_screening.in&lt;br /&gt;
&lt;br /&gt;
In the resulting input file you can also see the parameters used to compute the static dielectric function needed for the screened Coulomb term (W) of the BSE kernel. Here we use 20 bands and an energy cut-off of 1 Ry.&lt;br /&gt;
&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 20 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 1            Ry    # [Xs] Response block size&lt;br /&gt;
&lt;br /&gt;
Remember to double the number of bands for the case with spin-oribit coupling included. &lt;br /&gt;
&lt;br /&gt;
Then run the file &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F My_inputs/05_screening.in -J screening -C screening&lt;br /&gt;
&lt;br /&gt;
=== BS Kernel and Solver ===&lt;br /&gt;
&lt;br /&gt;
Now we build the BS kernel, and specify the BS kernel solver. Overview of the BSE solvers is available using the following link: [[BSE solvers overview]]. In this tutorial we will use Haydock solver because it is computationally cheaper.&lt;br /&gt;
&lt;br /&gt;
As you probably know the inclusion of the electron-hole interaction makes the approach in G space not feasible. We have thus to compute the dielectric function in the electron-hole space, building up the excitonic hamiltonian. Thus to create the input file you can run the command:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y h -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder. As before you, in the directory Inputs, you can find an example with suggested parameters. The plane-wave cutoffs used to expand wavefunctions is set to 10 Ry, the cut-off on the exchange interaction between the electron and the hole (i.e. for the local-fields) is set to 10 Ry (here we use a much higer value compared to the previous run since the computational cost of increasing this variable in the electron-hole space is very low). and, finally, the cut-off on the direct electron-hole interaction is set to 1 Ry (to build up this term, where the interaction is screened, we need to compute the static dielectric constant in G-space, thus increasing this value is computationally demanding).&lt;br /&gt;
 FFTGvecs= 10     Ry    # [FFT] Plane-waves&lt;br /&gt;
 BSENGexx= 10     Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=  1     Ry    # [BSK] Screened interaction block size&lt;br /&gt;
&lt;br /&gt;
The input variable &amp;amp;quot;KfnQP_E&amp;amp;quot; can be used to include a scissor operator, i.e a opening of the DFT band gap. The value 0.53 eV is the coverged correction at Gamma obtained in the GW run. Here we will calculate the BSE assuming that the &amp;amp;quot;scissor operator approximation&amp;amp;quot; is valid for GaSb (to be checked in principle!) .&lt;br /&gt;
&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 0.530000 &amp;lt;/span&amp;gt; | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
To build up the excitonic matrix we consider the states from 3 to 6, i.e. we are using 2 occupied and 2 unoccupied bands.&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and we will build up the dielectric function using a grid of 200 point in frequency space&lt;br /&gt;
 BEnSteps= 200                # [BSS] Energy steps&lt;br /&gt;
Finally, similarly as before, we will have&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
Remember that the BS kernel is written in the electron-hole space and its size is given by the relation&amp;lt;br /&amp;gt;&lt;br /&gt;
BS kernel size = Valence Bands × Conduction Bands × K-points in the whole BZ.&amp;lt;br /&amp;gt;&lt;br /&gt;
This means that in the case with SO we are building up a matrix 2x2=4 times larger of the corresponding calculation without spin-orbit (you can compare the input in With_SO/Yambo/Inputs / Without_SO/Yambo/Inputs and reference outputs in With_SO/Yambo/Reference_Outputs / With_SO/Yambo/Reference_Outputs)&lt;br /&gt;
&lt;br /&gt;
We are ready to run the BSE calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J &amp;quot;05_BSE,screening&amp;quot; -C 05_BSE&lt;br /&gt;
&lt;br /&gt;
We specify to Yambo the folder which contains calculated static screening, and in &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; the two response files &amp;lt;code&amp;gt; o-05_BSE.eel_q1_haydock_bse &amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-05_BSE.eps_q1_haydock_bse&amp;lt;/code&amp;gt; can be found. In the &#039;&#039;eps file&#039;&#039; the real and imaginary parts of the BSE dielectric function are column 3 and 2 respectively, while the corresponding GW spectra are column 5 and 4.&lt;br /&gt;
&lt;br /&gt;
In the folder &amp;lt;code&amp;gt;screening&amp;lt;/code&amp;gt; you will find instead the DBs of the static screening (W) needed to build up the BSE kernel (&amp;lt;code&amp;gt;ndb.em1s&amp;lt;/code&amp;gt;) and in the folder &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; the BSE matrix (&amp;lt;code&amp;gt;ndb.BS*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 40 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   5 | 12 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
If you do the corresponding calculations for the case without spin-orbits using the databases in the directory GaSb_nSO/YAMBO and inputs in GaSb_nSO/Inputs, the two BSE spectra should look like in this figure:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE_few_kpts.jpg|500px|center|GaSb absorption BSE gew kpts]]&lt;br /&gt;
As mentioned before the two spectra present spurious peaks ( as the first peak!) due to uncoverged k-point sampling. Nevertheless the splitting due to spin-orbit interaction is already visible in the peak around 2.1 eV.&lt;br /&gt;
A more converged (yet not fully converged calculation) would give the following results which compares very nicely with the experimental data:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE.png|500px|center|GaSb absorption BSE]]&lt;br /&gt;
&lt;br /&gt;
=== Using Static Screening without SOC, for the SOC case === &lt;br /&gt;
&lt;br /&gt;
Additionally, a BSE run for the spin-orbit coupling case can be done using the screening computed for the case without spin-orbit coupling. &lt;br /&gt;
&lt;br /&gt;
To do it we can make a symlink from the no-SOC folder:&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt; cd Path/GaSb/With_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt; ln -s Path/GaSb/Without_SOC/YAMBO/6x6x6_shifted/screening screening_no_soc&lt;br /&gt;
&lt;br /&gt;
The BSE kernel can be build and solved using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s -o b -k sex -y h -V qp -F 06_BSE_using_nosoc_screening.in&lt;br /&gt;
&lt;br /&gt;
Here we combined the screening part (-X s) and BSE part (-o b -k sex -y h -V qp). All of the input parameters have been discussed previously. Although, it is important to keep the right matching behind the screening bands used for the no SOC and SOC case.&lt;br /&gt;
&lt;br /&gt;
If for the SOC case the specified screening bands are n1, n2 then for the no-SOC screening the bands should be ((n1-1)/2+1, n2/2). &lt;br /&gt;
&lt;br /&gt;
 # No SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   1 | 20 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and &lt;br /&gt;
 # SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   1 | 40 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The results for the BSE solved using screening used from SOC and no SOC databases is presented below. As we can see, there is almost no difference between them. &lt;br /&gt;
&lt;br /&gt;
[[File:GaSb screening w and wo soc second.png|600px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
= Exciton analysis =&lt;br /&gt;
&lt;br /&gt;
In this part of the tutorial we show how to analyze the origin of the E1 peak in GaSb. Since the calculation with the SOC case is very demanding we will do that only for the case without SOC. So first of all enter the &lt;br /&gt;
&amp;lt;code&amp;gt;Without_SOC/YAMBO/6x6x6_shifted&amp;lt;/code&amp;gt; folder and, if you didn&#039;t before, run the setup:&lt;br /&gt;
 &amp;gt;cd Without_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt;ls SAVE&lt;br /&gt;
 &amp;gt;yambo -J 01_init&lt;br /&gt;
 &amp;gt;ls SAVE r-01_init_setup&lt;br /&gt;
&lt;br /&gt;
Similar to previous section we need to compute the static screening first, and then solve the BSE equation.&lt;br /&gt;
This time we will use the full diagonalization solver to calculate all exciton energies and composition in terms of electron-hole pairs. See [[BSE solvers overview]] for more details. &lt;br /&gt;
&lt;br /&gt;
Then create the &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; folder and the input file for a BSE&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -X s -F My_inputs/05_screening.in&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_screening.in -J screening -C screening &lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y d -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the same parameters you used to compute the absorption with SOC previously. The number of bands will be the half of the case without SOC&lt;br /&gt;
 % BSEBands&lt;br /&gt;
  3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
Also this time you will use the to &amp;lt;code&amp;gt;&amp;amp;quot;d&amp;amp;quot;&amp;lt;/code&amp;gt; and uncomment the variable needed to Write to disk excitonic the WFs:&lt;br /&gt;
 BSSmod= &amp;amp;quot;d&amp;amp;quot;              # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft`&lt;br /&gt;
 WRbsWF                   # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
Then you have to run the BSE calculation (notice that, in case you already computed the BSE spectrum also for the case without SOC, the code can read the results from the provious BSE run skipping many steps)&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J 05_BSE -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; folder you will now find a new database file called &amp;lt;code&amp;gt;ndb.BS_diago_Q01&amp;lt;/code&amp;gt;. This is what you need to analyze the exciton peaks running the post-processing code ypp.&lt;br /&gt;
&lt;br /&gt;
First of all you can run:&lt;br /&gt;
 &amp;gt;ypp -e s -J 05_BSE -C BSE_out&lt;br /&gt;
This run will sort in energy the excitonic eigenvalues writing their oscillator strenghts (see &amp;lt;code&amp;gt;o-06_bse.exc_E_sorted&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Then you can create the ypp input required to analize how each excitonic state is build up in terms of single-particle states:&lt;br /&gt;
 &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE&lt;br /&gt;
Put the index &amp;lt;code&amp;gt;#N&amp;lt;/code&amp;gt; of the exciton with higher strenght in the E_1 peak region&lt;br /&gt;
 &amp;gt;ypp -F My_inputs/05_BSE_ypp.in -J 05_BSE -C 06_BSE_out&lt;br /&gt;
You will find the two files &amp;lt;code&amp;gt;o-06_bse.exc_weights_at_#N&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-06_bse.exc_amplitude_at_#N&amp;lt;/code&amp;gt;. In these files you will find informations on the highest strenght exciton in the E1 peak region.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
= Perturbative SOC approach =&lt;br /&gt;
&lt;br /&gt;
It is possible to include the spin-orbit coupling perturbatively in Yambo.&lt;br /&gt;
&lt;br /&gt;
To first order the perturbation just gives a correction to the DFT eigenvalues and does not touch the wave–functions. Numerically the perturbation need to be applied by mapping the solution of the DFT calculation without SOC into the solution of the DFT calculation with SOC. Once a mapping is defined, the SOC perturbation could be directly applied to the KS energies before solving both the GW scheme and/or the BSE.&lt;br /&gt;
&lt;br /&gt;
All we need is to computed a SOC mapping database given by the following equation (eq 68 in the referenced paper):&lt;br /&gt;
&lt;br /&gt;
EQUATION &lt;br /&gt;
&lt;br /&gt;
Where x, y, z are ... &lt;br /&gt;
&lt;br /&gt;
To build this map, in the folder without spin-orbit coupling we do the following:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; cd Solid_GaSb/Without_SOC/Yambo/6x6xWi6_shifted&lt;br /&gt;
 &amp;gt; mkdir SOC_DBs&lt;br /&gt;
 &amp;gt; cp -r Path/SAVE_GaSb_k6_w_soc SOC_DBs/SAVE&lt;br /&gt;
 &amp;gt; ypp -w &lt;br /&gt;
 &amp;gt; ypp -F map_wfs.in -J SOC_map -C SOC_map&lt;br /&gt;
&lt;br /&gt;
With the following input for &amp;lt;code&amp;gt;map_wfs.in&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 WFs_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 WFs_SOC_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 SOC_DBs= &amp;quot;SOC_DBs&amp;quot;        # Path to the folder containing the DB with SOC&lt;br /&gt;
 SOC_splitting= 0.01 eV    # SOC splitting between the levels&lt;br /&gt;
 % bands_to_map&lt;br /&gt;
   5 | 12 |                # Number of bands to map&lt;br /&gt;
 %&lt;br /&gt;
 bands_buffer=1&lt;br /&gt;
&lt;br /&gt;
Where the SAVE folder with spin-orbit coupling should be saved in a separate folder, and in this case it is in the &amp;lt;code&amp;gt; SOC_DBs &amp;lt;/code&amp;gt; folder. &lt;br /&gt;
Then, the BSE can be computed using the following command &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F 05_BSE+scissor.in -J &amp;quot;BSE_soc_perturbative,screening,SOC_map&amp;quot; -C BSE_soc_perturbative&lt;br /&gt;
&lt;br /&gt;
Where screening was precomputed, and the SOC_map is the one generated in this section. Check BSE section for more details on setting a BSE calculation.&lt;br /&gt;
Not converged results are presented below. &lt;br /&gt;
[[File:GaSb perturbative soc 1.png|600px|thumb|center]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Other excercises =&lt;br /&gt;
&lt;br /&gt;
# Try to converge the G0W0 increasing the polarization RL size, the polarization bands, the number of bands in the Green function and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Try to converge the absorption spectra increasing the polarization RL size, the polarization bands, the number of bands to construct the excitonic matrix and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Plot the EELS spectrum obtained within IP-RPA and RPA with local fields. Also in this case you can check the effect of increasing the polarization bands. You may also try to do a resonant only calculation to see that the EELS cannot be described using only the resonant part of the response function.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;&amp;gt;M. Marsili, A. Molina-Sánchez, M. Palummo, D. Sangalli, A. Marini, [https://doi.org/10.1103/PhysRevB.103.155152  Phys. Rev. B &#039;&#039;&#039;103&#039;&#039;&#039;, 155152 (2021)] ([https://arxiv.org/abs/2103.02266 arXiv 2103.02266])&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wiki&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Gallium_antimonide GaSb on wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;&amp;gt; [https://en.wikipedia.org/wiki/Spin%E2%80%93orbit_interaction#In_atomic_energy_levels Spin-Orbit Interaction on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kim&amp;quot;&amp;gt; Y.S. Kim et al. Phys. Rev. B &#039;&#039;&#039;82&#039;&#039;&#039;, 205212 (2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;rem&amp;quot;&amp;gt; I. N. Remediakis and Efthimios Kaxiras, Phys. Rev. B &#039;&#039;&#039;59&#039;&#039;&#039;, 5336 (1999).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan1&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1002/pssb.200983959 Phys. Sol. State B &#039;&#039;&#039;247&#039;&#039;&#039;, 1960 (2010)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan2&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1103/PhysRevLett.104.157402 Phys. Rev. Lett. &#039;&#039;&#039;104&#039;&#039;&#039;, 157402 (2010)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan3&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1103/PhysRevB.83.155421 Phys. Rev. B 83, &#039;&#039;&#039;155421&#039;&#039;&#039; (2011)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=9025</id>
		<title>SOC</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=9025"/>
		<updated>2025-09-10T09:06:07Z</updated>

		<summary type="html">&lt;p&gt;Davide: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Effect of spin-orbit interaction =&lt;br /&gt;
&lt;br /&gt;
Spin–orbit coupling (SOC) is a relativistic interaction between an electron’s spin and its orbital motion in the crystal potential. Presently, SOC can be included withing GW-BSE approach either perturbatively, or fully, considering the spinorial nature of the electronic wave-function. In this tutorial, we will use both approaches. More details on the theory and comparison between full spinorial GW-BSE and perturbative approach to SOC can be found in the following paper &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;, and in the Wikipedia article&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;/&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To include the spin-orbit coupling we start with many–body total Hamiltonian of the system including first order relativistic corrections. &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 1 many body rel hamiltonian.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where, &amp;lt;math&amp;gt;\hat{H}^{0}&amp;lt;/math&amp;gt; is the non-relativistic one body hamiltonian, &amp;lt;math&amp;gt;\hat{H}^{(e-e)}&amp;lt;/math&amp;gt; is the e-e Coulomb interaction, and &amp;lt;math&amp;gt;\hat{H}^{(RK)} + \hat{H}^{(SOI)}&amp;lt;/math&amp;gt; are the first order relativistic correction, and the last term is the spin-orbit interaction (SOI) in which we are interested in this tutorial. &lt;br /&gt;
&lt;br /&gt;
The SOI term itself is composed of three different components, &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 2 soi term.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; are many-body terms, called &amp;quot;two-electron spin-orbit&amp;quot;, and &amp;quot;spin-other-orbit&amp;quot;, respectively. And,  &amp;lt;math&amp;gt; \hat{H}^{(SOI)} = \hat{H}^{SO(N)} &amp;lt;/math&amp;gt; is &amp;quot;one electron spin-orbit&amp;quot; is a one body term, which is given by: &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 3 one electron spin orbit.png|250px|frameless]]&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;math&amp;gt;\underline{\nu}&amp;lt;/math&amp;gt; a 2x2 matrix in the &amp;lt;math&amp;gt;\uparrow&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\downarrow&amp;lt;/math&amp;gt; spin space, and:&lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 4 v soc.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;\mathbf{\sigma}&amp;lt;/math&amp;gt; is the three dimensional vector whose components are the Pauli matrices. In a plane wave representation the SOC is, in practice, accounted for by the use of pseudopotentials. The SOC contribution from the pseudopotential captures what is called “local SOC”, which is due to the electrons orbiting around the nuclei, it neglects instead the itinerant SOC which can- not be easily captured in periodic boundary conditions. When relativistic corrections are taken into account instead, one should in principle account for the effects of the many–body terms &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt;. A shortcut is to add a term constructed replacing &amp;lt;math&amp;gt;v^{ext}&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;v^{Hxc}&amp;lt;/math&amp;gt; into previous equation. Doing so partially account for &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt;, while &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; is neglected.&lt;br /&gt;
&lt;br /&gt;
= Introduction = &lt;br /&gt;
&lt;br /&gt;
The scope of this tutorial is to calculate the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; corrections to the DFT-LDA band-structure and the BSE optical spectrum for a bulk semiconducting material, gallium antimonide (GaSb) &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;wiki&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;kim&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;rem&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan1&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan2&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan3&amp;quot;/&amp;gt;. We will compare the results with and without the spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For this tutorial we provide two state (GS) databases (DBs), one contains the GS-DBs with the effect of SOC included and one without. The idea is to repeat the same calculation for both database and compare the results and the performances of the code. GaSb input files can be downloaded from the following link [https://media.yambo-code.eu/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz], and can be unarchived using the following command: &lt;br /&gt;
&lt;br /&gt;
 $ tar -xzf GaSb.tar.gz&lt;br /&gt;
&lt;br /&gt;
As in the other tutorials, you will find two main folders, Without_SOC and With_SOC.&lt;br /&gt;
To avoid continuously switching between the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;With_SOC&amp;lt;/code&amp;gt; directories, we recommend opening two terminals: keep one terminal for the without SOC case and the other for the with SOC case.&lt;br /&gt;
 $ cd GaSb/With_SOC    # terminal 1&lt;br /&gt;
 $ cd GaSb/Without_SOC # terminal 2&lt;br /&gt;
&lt;br /&gt;
Inside each of the two there are two subfolders:&lt;br /&gt;
&lt;br /&gt;
* Pwscf - contains the input files and the pseudo-potentials for Quantum ESPRESSO, to generate the ground-state databases (GS-DBs) yourself.&lt;br /&gt;
* YAMBO - contains Example of yambo input files (Input folder) and output files (References folder)&lt;br /&gt;
&lt;br /&gt;
In the next section we show how to generate the databases running QE&lt;br /&gt;
&lt;br /&gt;
= DFT band structure =&lt;br /&gt;
&lt;br /&gt;
To generate the  KS WFs and energies databases, you must enter the Pwscf folder and generate the KS databases&lt;br /&gt;
 $ cd Pwscf&lt;br /&gt;
 $ pw.x &amp;lt; 01_scf_kx4.in &amp;gt; 01_scf_kx4.out&lt;br /&gt;
 $ pw.x &amp;lt; 02_nscf_kx4_shifted+Gamma.in &amp;gt; 02_nscf_kx4_shifted+Gamma.out&lt;br /&gt;
 $ cd GaSb.save&lt;br /&gt;
 $ p2y&lt;br /&gt;
&lt;br /&gt;
You just generated your SAVE folder to be used for the YAMBO tutorial. We are going to move it inside a dedicated folder under Yambo&lt;br /&gt;
Let&#039;s have a look to the content of the Yambo folder. &lt;br /&gt;
 $ ls ../../YAMBO&lt;br /&gt;
 4x4x4_shifted+GAMMA 6x6x6_shifted Inputs  Reference&lt;br /&gt;
&lt;br /&gt;
Inside the YAMBO folder there are indeed two folders corresponding to two different k-points meshes. In this tutorial we will use the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; folder for the computation of the QP corrections within the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; approximation. It is a k-points grid obtained as the sum of a 4x4x4 k-points grid centered in Gamma and a 4x4x4 grid shifted. Instead for the computation of the optical properties we will use the &amp;lt;code&amp;gt;6x6x6_shifted&amp;lt;/code&amp;gt; folder. It is a 6x6x6 k-points grid shifted from Gamma. In the References folder yuo will find runs for the grids, &amp;lt;code&amp;gt;10x10x10_shifted&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;14x14x14_shifted&amp;lt;/code&amp;gt; used to do a minimum convergence of the optical properties against the number of k-points. (pay attention that the BSE calculations with bigger grids will be very memory and time demanding!). Later, you can generate the corresponding SAVE folders as well if you wish.&lt;br /&gt;
&lt;br /&gt;
For now let&#039;s move our SAVE folder inside 4x4x4_shifted+GAMMA&lt;br /&gt;
 $ mv SAVE ../../YAMBO&lt;br /&gt;
&lt;br /&gt;
The first part of the tutorial is on the computation of the QP corrections. So let&#039;s enter the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; grid and, as seen in other tutorials run the Initialization:&lt;br /&gt;
&lt;br /&gt;
 $ cd ../../YAMBO/4x4x4_shifted+GAMMA/ &lt;br /&gt;
 $ yambo &lt;br /&gt;
Now compare the result of the two setup runs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; With_SOC Energies and Occupations (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  [02.05] Energies &amp;amp; Occupations&lt;br /&gt;
  ==============================&lt;br /&gt;
&lt;br /&gt;
  [X] === General ===&lt;br /&gt;
  [X] Electronic Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Bosonic    Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Finite Temperature mode                       : no&lt;br /&gt;
  [X] El. density                                   :  0.14622E+24 [cm-3]&lt;br /&gt;
  [X] Fermi Level                                   :  5.085716 [eV]&lt;br /&gt;
&lt;br /&gt;
  [X] === Gaps and Widths ===&lt;br /&gt;
  [X] Conduction Band Min                           :  0.095395 [eV]&lt;br /&gt;
  [X] Valence Band Max                              :  0.000000 [eV]&lt;br /&gt;
  [X] Filled Bands                                  :   8&lt;br /&gt;
  [X] Empty Bands                                   :    9  200&lt;br /&gt;
  [X] Direct Gap                                    :  0.095395 [eV]&lt;br /&gt;
  [X] Direct Gap localized at k                     :  29&lt;br /&gt;
  [X] Indirect Gap                                  :  0.095395 [eV]&lt;br /&gt;
  [X] Indirect Gap between kpts                     :  29  29&lt;br /&gt;
  [X] Last valence band width                       :  3.508355 [eV]&lt;br /&gt;
  [X] 1st conduction band width                     :  3.413699 [eV]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; Without_SOC Energies and Occupations (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  [02.05] Energies &amp;amp; Occupations&lt;br /&gt;
  ==============================&lt;br /&gt;
&lt;br /&gt;
  [X] === General ===&lt;br /&gt;
  [X] Electronic Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Bosonic    Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Finite Temperature mode                       : no&lt;br /&gt;
  [X] El. density                                   :  0.14622E+24 [cm-3]&lt;br /&gt;
  [X] Fermi Level                                   :  4.815616 [eV]&lt;br /&gt;
&lt;br /&gt;
  [X] === Gaps and Widths ===&lt;br /&gt;
  [X] Conduction Band Min                           :  0.367929 [eV]&lt;br /&gt;
  [X] Valence Band Max                              :  0.000000 [eV]&lt;br /&gt;
  [X] Filled Bands                                  :   4&lt;br /&gt;
  [X] Empty Bands                                   :    5  200&lt;br /&gt;
  [X] Direct Gap                                    :  0.367929 [eV]&lt;br /&gt;
  [X] Direct Gap localized at k                     :  29&lt;br /&gt;
  [X] Indirect Gap                                  :  0.367929 [eV]&lt;br /&gt;
  [X] Indirect Gap between kpts                     :  29  29&lt;br /&gt;
  [X] Last valence band width                       :  3.276561 [eV]&lt;br /&gt;
  [X] 1st conduction band width                     :  3.649610 [eV]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A clear shrink of the DFT-LDA gap due to spin-orbit occurs. Note that, having 8 electrons in the fundamental cell, due to the spinorial nature of the wavefunction, with SOC we have 8 occupied bands, while only 4 without. Here a picture of the DFT band structure for the two cases.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_pwscf.png|500px|center|GaSb bands DFT]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the band structure of GaSb =&lt;br /&gt;
 &lt;br /&gt;
Now we will perform a G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; calculation to correct the DFT-LDA bandstructure. We assume that you are already familiar with the concept of screening needed to build up the GW self-energy and thus the QP corrections. At this stage we assume you are already inside 4x4x4_shifted+GAMMA. There, create a local folder &#039;&#039;My_inputs&#039;&#039; and generate the input for a G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; calculation within the plasmon-pole approximation using the following command: &lt;br /&gt;
 $ mkdir My_inputs&lt;br /&gt;
 $ yambo -p p -g n -V RL -F My_inputs/02_GW.in&lt;br /&gt;
However we also provide an input file with suggested parameters for this calculations inside the folder &#039;&#039;Solid_GaSb/Without_SOC/Yambo/Inputs&#039;&#039;. Remember: these parameters are system dependent and should be converged as you can see other GW tutorials (e.g. [[Silicon|GW on bulk Silicon]] or [[GW on h-BN (standalone)]]). Here we provide reasonable (but not fully converged) parameters to have a low computational cost but yet qualitatively meaningful results.&lt;br /&gt;
&lt;br /&gt;
The plane-waves cutoff for the wavefunctions and exchange part of the self-energy are set to 10 Ry. &lt;br /&gt;
 FFTGvecs =  10 Ry   # [FFT] Plane-waves&lt;br /&gt;
 EXXRLvcs=   10 Ry   # [XX] Exchange RL components&lt;br /&gt;
while we will use 40 bands, a plane-wave cut-off of 1 Ry, and a plasmon-pole energy of 20 eV to build up the screening matrix &lt;br /&gt;
 NGsBlkXp=    1 Ry  # [Xp] Response block size &lt;br /&gt;
 PPAPntXp= 20.  eV  # [Xp] PPA imaginary energy &lt;br /&gt;
 % BndsRnXp    &lt;br /&gt;
 1 | 40 |        # [Xp] Polarization function bands &lt;br /&gt;
 % &lt;br /&gt;
 % LongDrXp  &lt;br /&gt;
 1.000000 | 1.000000 | 1.000000 |        # [Xp] [cc] Electric Field &lt;br /&gt;
 %&lt;br /&gt;
The number of bands in the green function G to build up the GW self-energy is also 40 &lt;br /&gt;
 % GbndRnge    &lt;br /&gt;
 1 | 40 |                 # [GW] G[W] bands range &lt;br /&gt;
 %&lt;br /&gt;
with those parameters we will compute the correction only in the last 2 points of our grid, 28 and 29 and for the states from 3 to 6, setting the input variable &lt;br /&gt;
 %QPkrange                      &lt;br /&gt;
 28 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
You can now run the code using either your input file or the one provided in the Inputs folder &lt;br /&gt;
 $ yambo -F My_inputs/02_GW.in -J GW -C GW&lt;br /&gt;
The run will take some time. Indeed the code has first to compute the dipoles, then the screening within the plasmon pole approximation and finally the self-energy, first the exchange part Gv and then the correlation part G(W-v). &lt;br /&gt;
In the &amp;lt;code&amp;gt;GW&amp;lt;/code&amp;gt; folder you will find the &amp;lt;code&amp;gt;o-GW.qp&amp;lt;/code&amp;gt; file containing the GW corrections.&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &lt;br /&gt;
 #&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #&lt;br /&gt;
  ...&lt;br /&gt;
      29        4      0.000000      0.182291    0.992707 &lt;br /&gt;
      29        5      0.367929      0.597428    -2.431549&lt;br /&gt;
  ...&lt;br /&gt;
Thus it is about 0.60-0.18=0.42  eV (not fully converged).&lt;br /&gt;
&lt;br /&gt;
We can also compute the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; correction for all the k-point of the database. To this end open the input file &#039;&#039;My_inputs/02_GW.in&#039;&#039; (or your own) and edit the number of k-point to be computed &lt;br /&gt;
 %&lt;br /&gt;
 QPkrange                      1 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
Remember to use the same name after the -J option, so that the code will be able to use the informations from the previous run and avoid many calculations. &lt;br /&gt;
 $ yambo -F My_inputs/02_GW.in -J GW -C GW&lt;br /&gt;
In the &#039;&#039;GW&#039;&#039; folder you will find now also the &#039;&#039;o-GW.qp_01&#039;&#039; file containg the GW corrections for all the k-points.&lt;br /&gt;
&lt;br /&gt;
Now you can enter the folder of the 4x4x4 shifted grid&lt;br /&gt;
 cd Solid_GaSb/With_SOC/Yambo/4x4x4_shifted+GAMMA&lt;br /&gt;
and repeat the same calculations. Remember that in the input file you will generate you should change all the band ranges doubling the number of states (do you understand why?) &lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
    1 | 80 |        # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
    1 | 80 |        # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 % QPkrange&lt;br /&gt;
   29 | 29 |   5 | 12|  # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band.&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #  &lt;br /&gt;
   ...   &lt;br /&gt;
       29         8       0.000000    0.251074           0.896306&lt;br /&gt;
       29         9       0.095395    0.647108          -2.334492&lt;br /&gt;
   ...&lt;br /&gt;
Thus it is about 0.65-0.25=0.43 eV (not fully converged). Indeed the same result obtained without SOC. The resulting electronic gap is about 0.49 eV reasonably close to the experimental band gap of 0.72 eV. It is also a big improvement compared to the LDA band gap (approximatively 0.09 eV). This correction will be used, in the form of a scissor operator, as a starting point to compute the optical spectra.&lt;br /&gt;
&lt;br /&gt;
Again we can also compute the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; correction for all the k-point of the database. You can plot column 4 of the output file against column 3 to obtain a picture of the QP corrections. In the following figure we show the plot of the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; correction (E_G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;-E_LDA) vs the LDA eigenvalues. The corrections at the Gamma and the L point are marked with bigger red spots.&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=400px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_GoWo_corrections.png|GaSb QP corrections without SOC &lt;br /&gt;
Image:GaSb GoWo corrections SOC.png|GaSb GoWo corrections with SOC&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
[[File:SOC_GaSb_GoWo_corrections.png|500px|frameless|center]]&lt;br /&gt;
[[File:GaSb GoWo corrections SOC.png|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;scissor operator approach&amp;amp;quot; does not seem a very good approximation for GaSb. Indeed the quasi particle corrections are not constant, especially in the conduction band. For example the correction to the Gamma point is bigger than the corrections to all other k-points. This result however maybe due to the poor covergence parameters. If you would like to better investigate these results you should try do convergence tests. Since QP corrections are poorly sensitive to the spin-orbit interaction it is probably a good idea to do convergence without SOC.&lt;br /&gt;
&lt;br /&gt;
Here we also provide a plot of the band-structure at different levels of approximation: DFT, DFT+scissor, QP. The band structures are obtained from an interpolation of our k-points mesh and it is not very precise since, again, we are using a quite coarse sampling of the brillouine zone. Indeed we can see that already the interpolated DFT band structure deviates from the exact DFT band-structure, which has also been reported. In particular in the region nearby Gamma. However it gives quite nicely an overview of how the QP band structure compares with the DFT band stucture. The main effect is indeed an opening of the band-gap which can be described in terms of a scissor operator.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_yambo.png|500px|center|GaSb QP bands]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the optical properties of GaSb =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--{|&lt;br /&gt;
| [[File:SOC_GaSb_bands.png|600px|center|GaSb bands 1]]&lt;br /&gt;
| [[File:SOC_GaSb_absorption.png|600px|center|GaSb bands 2]]&lt;br /&gt;
|} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now turn our attention on the optical properties of the system. Here we will compute the dielectric function at different levels of approximations:&amp;lt;br /&amp;gt;&lt;br /&gt;
# at the IP-RPA level, thus using the Fermi golden rule with the KS energies and wave-functions&amp;lt;br /&amp;gt;&lt;br /&gt;
# at the RPA level, thus also including the effect of the local fields&amp;lt;br /&amp;gt;&lt;br /&gt;
# at the BSE level, thus including many-body effects, both correcting the KS energies (we will introduce a scissor obtained from the GW calculation) and considering the statically screened electron-hole interaction&lt;br /&gt;
# Run the simulations with SOC using screening databases computed without SOC.&lt;br /&gt;
# Run the simulations in perturbative SOC approach  &lt;br /&gt;
&lt;br /&gt;
First, setup the calculation (initialisation) in the usual way in the folder without SOC&lt;br /&gt;
 $ cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 $ yambo&lt;br /&gt;
and repeat the same inside the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; before continuing.&lt;br /&gt;
&lt;br /&gt;
== RPA-IP absorption ==&lt;br /&gt;
&lt;br /&gt;
Create a local folder inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; which you will call &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt;, and create the input file:&lt;br /&gt;
 &amp;gt;cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o c -V RL -F My_inputs/03_IP-RPA.in&lt;br /&gt;
&lt;br /&gt;
As before, we also provide an input file with suggested parameters for this calculations. The kind of calculation is controlled by the input variable&lt;br /&gt;
 Chimod= &amp;quot;IP&amp;quot;                 # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1            RL    # [Xd] Response block size&lt;br /&gt;
These tells you that we are building up the dielectric function in G-space considering only on G vector, i.e. the G=0 component. The string Chimod= &amp;amp;quot;IP&amp;amp;quot; recalls us that this means we are neglecting the local fields effect.&lt;br /&gt;
&lt;br /&gt;
We set the plane-waves cutoff for the wavefunctions to&lt;br /&gt;
 FFTGvecs=  10  Ry   # [FFT] Plane-waves&lt;br /&gt;
Since we are interested into the optical spectrum calculation, only the Q=0 term, i.e. the first Q-point, is calculated&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
The number of bands we use is 10. This is a reasonable number of states to converge the IP-RPA optical spectrum in the VIS-UV range. (If you wish to calculate the EELS spectrum for q different from 0 probably more bands will be required.)&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 10 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
As you learned the dielectric function is a tensor and in principle three calculations for light polarized along x,y,z chould be done depending on the experimental setup. However GaSb is a system with cubic symmetry, thus any direction is equivalent. Here we decide to compute epsilon along the &amp;amp;quot;(1 1 1)&amp;amp;quot; direction.&lt;br /&gt;
 % LongDrXd&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation using either your input file or the one provided in the Inputs folder&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/03_IP-RPA.in  -J 03_IP-RPA -C 03_IP-RPA&lt;br /&gt;
&lt;br /&gt;
Inside the &amp;lt;code&amp;gt;03_IP-RPA&amp;lt;/code&amp;gt; folder you will find the databases created by the code (in this case just the dipoles), the report file and the output files for the dielectric function which describes the absorption (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;) and for its inverse (&amp;lt;code&amp;gt;o-03_IP-RPA.eel*&amp;lt;/code&amp;gt;), which describes the electron energy loss. You can plot them with your favorite software (for example gnuplot or xmgrace). The real and imaginary parts of the IP-RPA dielectric function are column 3 and 2 respectively of the file (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;). Using also the reference output file in the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; folder you can compare the spectrum with and without SOC.&lt;br /&gt;
&lt;br /&gt;
Now repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 20 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.jpg|600px|center|GaSb absorption RPA]]&lt;br /&gt;
If you wish to obtain a reasonable spectrum however the 6x6x6 kpts grid is not enough. In order to check the convergence with the number of k-points you should generate denser k-points meshes using the input files provided in the Pwscf folder. &lt;br /&gt;
&amp;lt;!-- (see section [[more.php|More on GaSb]] for more advanced calculations).--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the directories Reference_Outputs several RPA dielectric functions are saved with the dielectric function calculated with the 10x10x10 and the 14x14x14 k-grid. You will learn that within RPA spectra the lowest energy peak is under-estimated. Also the spectra with and without SOC look very similar and the SO splitting is almost not present. This is clearly due to the excitonic nature of the E1 peak which can be correctly described only including the electron-hole interaction.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== RPA absorption with local fields ==&lt;br /&gt;
&lt;br /&gt;
To also include the local fields effect you can generate the input with the command: &lt;br /&gt;
 &amp;gt;yambo -o c -k hartree -F My_inputs/04_RPA_LF.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
In the input file we provide you will see that now the chimod and size of the dynamical matrix are set to&lt;br /&gt;
 Chimod= &amp;amp;quot;Hartree&amp;amp;quot;       # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1       Ry    # [Xd] Response block size&lt;br /&gt;
&lt;br /&gt;
Including local fields the poles of absorption will move from KS transitions to many-electrons transitions (although we are still neglecting the electron-hole interaction). As a result you will need more states to converge the absorption spectrum. This is why we set the number of bands to 15:&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 15 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
while as before we will have&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 %&lt;br /&gt;
 LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/04_RPA_LF.in -J 04_RPA_LF -C 04_RPA_LF_out&lt;br /&gt;
&lt;br /&gt;
In the 04_RPA+LF_out folder you will fine the report and the output files as before. The real and imaginary parts of the RPA+LF dielectric function with local fields are column 3 and 2 respectively of the .eps file. While the corresponding IP-RPA spectra is reported in columns 5 and 4.&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 30 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
In the following picture we compare the result of IP-RPA and RPA+LF with SOC.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA_IP_vs_LF.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== BSE absorption with QP corrections ==&lt;br /&gt;
&lt;br /&gt;
A more detailed description of BSE in Yambo is available in the following tutorial: &lt;br /&gt;
[https://wiki.yambo-code.eu/wiki/index.php?title=Calculating%20optical%20spectra%20including%20excitonic%20effects:%20a%20step-by-step%20guide BSE in hBN].&lt;br /&gt;
&lt;br /&gt;
=== Static Screening ===&lt;br /&gt;
&lt;br /&gt;
First we need to obtain the static screening. &lt;br /&gt;
&lt;br /&gt;
This can be done using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s -F My_inputs/05_screening.in&lt;br /&gt;
&lt;br /&gt;
In the resulting input file you can also see the parameters used to compute the static dielectric function needed for the screened Coulomb term (W) of the BSE kernel. Here we use 20 bands and an energy cut-off of 1 Ry.&lt;br /&gt;
&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 20 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 1            Ry    # [Xs] Response block size&lt;br /&gt;
&lt;br /&gt;
Remember to double the number of bands for the case with spin-oribit coupling included. &lt;br /&gt;
&lt;br /&gt;
Then run the file &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F My_inputs/05_screening.in -J screening -C screening&lt;br /&gt;
&lt;br /&gt;
=== BS Kernel and Solver ===&lt;br /&gt;
&lt;br /&gt;
Now we build the BS kernel, and specify the BS kernel solver. Overview of the BSE solvers is available using the following link: [[BSE solvers overview]]. In this tutorial we will use Haydock solver because it is computationally cheaper.&lt;br /&gt;
&lt;br /&gt;
As you probably know the inclusion of the electron-hole interaction makes the approach in G space not feasible. We have thus to compute the dielectric function in the electron-hole space, building up the excitonic hamiltonian. Thus to create the input file you can run the command:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y h -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder. As before you, in the directory Inputs, you can find an example with suggested parameters. The plane-wave cutoffs used to expand wavefunctions is set to 10 Ry, the cut-off on the exchange interaction between the electron and the hole (i.e. for the local-fields) is set to 10 Ry (here we use a much higer value compared to the previous run since the computational cost of increasing this variable in the electron-hole space is very low). and, finally, the cut-off on the direct electron-hole interaction is set to 1 Ry (to build up this term, where the interaction is screened, we need to compute the static dielectric constant in G-space, thus increasing this value is computationally demanding).&lt;br /&gt;
 FFTGvecs= 10     Ry    # [FFT] Plane-waves&lt;br /&gt;
 BSENGexx= 10     Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=  1     Ry    # [BSK] Screened interaction block size&lt;br /&gt;
&lt;br /&gt;
The input variable &amp;amp;quot;KfnQP_E&amp;amp;quot; can be used to include a scissor operator, i.e a opening of the DFT band gap. The value 0.53 eV is the coverged correction at Gamma obtained in the GW run. Here we will calculate the BSE assuming that the &amp;amp;quot;scissor operator approximation&amp;amp;quot; is valid for GaSb (to be checked in principle!) .&lt;br /&gt;
&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 0.530000 &amp;lt;/span&amp;gt; | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
To build up the excitonic matrix we consider the states from 3 to 6, i.e. we are using 2 occupied and 2 unoccupied bands.&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and we will build up the dielectric function using a grid of 200 point in frequency space&lt;br /&gt;
 BEnSteps= 200                # [BSS] Energy steps&lt;br /&gt;
Finally, similarly as before, we will have&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
Remember that the BS kernel is written in the electron-hole space and its size is given by the relation&amp;lt;br /&amp;gt;&lt;br /&gt;
BS kernel size = Valence Bands × Conduction Bands × K-points in the whole BZ.&amp;lt;br /&amp;gt;&lt;br /&gt;
This means that in the case with SO we are building up a matrix 2x2=4 times larger of the corresponding calculation without spin-orbit (you can compare the input in With_SO/Yambo/Inputs / Without_SO/Yambo/Inputs and reference outputs in With_SO/Yambo/Reference_Outputs / With_SO/Yambo/Reference_Outputs)&lt;br /&gt;
&lt;br /&gt;
We are ready to run the BSE calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J &amp;quot;05_BSE,screening&amp;quot; -C 05_BSE&lt;br /&gt;
&lt;br /&gt;
We specify to Yambo the folder which contains calculated static screening, and in &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; the two response files &amp;lt;code&amp;gt; o-05_BSE.eel_q1_haydock_bse &amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-05_BSE.eps_q1_haydock_bse&amp;lt;/code&amp;gt; can be found. In the &#039;&#039;eps file&#039;&#039; the real and imaginary parts of the BSE dielectric function are column 3 and 2 respectively, while the corresponding GW spectra are column 5 and 4.&lt;br /&gt;
&lt;br /&gt;
In the folder &amp;lt;code&amp;gt;screening&amp;lt;/code&amp;gt; you will find instead the DBs of the static screening (W) needed to build up the BSE kernel (&amp;lt;code&amp;gt;ndb.em1s&amp;lt;/code&amp;gt;) and in the folder &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; the BSE matrix (&amp;lt;code&amp;gt;ndb.BS*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 40 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   5 | 12 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
If you do the corresponding calculations for the case without spin-orbits using the databases in the directory GaSb_nSO/YAMBO and inputs in GaSb_nSO/Inputs, the two BSE spectra should look like in this figure:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE_few_kpts.jpg|500px|center|GaSb absorption BSE gew kpts]]&lt;br /&gt;
As mentioned before the two spectra present spurious peaks ( as the first peak!) due to uncoverged k-point sampling. Nevertheless the splitting due to spin-orbit interaction is already visible in the peak around 2.1 eV.&lt;br /&gt;
A more converged (yet not fully converged calculation) would give the following results which compares very nicely with the experimental data:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE.png|500px|center|GaSb absorption BSE]]&lt;br /&gt;
&lt;br /&gt;
=== Using Static Screening without SOC, for the SOC case === &lt;br /&gt;
&lt;br /&gt;
Additionally, a BSE run for the spin-orbit coupling case can be done using the screening computed for the case without spin-orbit coupling. &lt;br /&gt;
&lt;br /&gt;
To do it we can make a symlink from the no-SOC folder:&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt; cd Path/GaSb/With_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt; ln -s Path/GaSb/Without_SOC/YAMBO/6x6x6_shifted/screening screening_no_soc&lt;br /&gt;
&lt;br /&gt;
The BSE kernel can be build and solved using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s -o b -k sex -y h -V qp -F 06_BSE_using_nosoc_screening.in&lt;br /&gt;
&lt;br /&gt;
Here we combined the screening part (-X s) and BSE part (-o b -k sex -y h -V qp). All of the input parameters have been discussed previously. Although, it is important to keep the right matching behind the screening bands used for the no SOC and SOC case.&lt;br /&gt;
&lt;br /&gt;
If for the SOC case the specified screening bands are n1, n2 then for the no-SOC screening the bands should be ((n1-1)/2+1, n2/2). &lt;br /&gt;
&lt;br /&gt;
 # No SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   1 | 20 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and &lt;br /&gt;
 # SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   1 | 40 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The results for the BSE solved using screening used from SOC and no SOC databases is presented below. As we can see, there is almost no difference between them. &lt;br /&gt;
&lt;br /&gt;
[[File:GaSb screening w and wo soc second.png|600px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
= Exciton analysis =&lt;br /&gt;
&lt;br /&gt;
In this part of the tutorial we show how to analyze the origin of the E1 peak in GaSb. Since the calculation with the SOC case is very demanding we will do that only for the case without SOC. So first of all enter the &lt;br /&gt;
&amp;lt;code&amp;gt;Without_SOC/YAMBO/6x6x6_shifted&amp;lt;/code&amp;gt; folder and, if you didn&#039;t before, run the setup:&lt;br /&gt;
 &amp;gt;cd Without_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt;ls SAVE&lt;br /&gt;
 &amp;gt;yambo -J 01_init&lt;br /&gt;
 &amp;gt;ls SAVE r-01_init_setup&lt;br /&gt;
&lt;br /&gt;
Similar to previous section we need to compute the static screening first, and then solve the BSE equation.&lt;br /&gt;
This time we will use the full diagonalization solver to calculate all exciton energies and composition in terms of electron-hole pairs. See [[BSE solvers overview]] for more details. &lt;br /&gt;
&lt;br /&gt;
Then create the &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; folder and the input file for a BSE&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -X s -F My_inputs/05_screening.in&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_screening.in -J screening -C screening &lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y d -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the same parameters you used to compute the absorption with SOC previously. The number of bands will be the half of the case without SOC&lt;br /&gt;
 % BSEBands&lt;br /&gt;
  3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
Also this time you will use the to &amp;lt;code&amp;gt;&amp;amp;quot;d&amp;amp;quot;&amp;lt;/code&amp;gt; and uncomment the variable needed to Write to disk excitonic the WFs:&lt;br /&gt;
 BSSmod= &amp;amp;quot;d&amp;amp;quot;              # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft`&lt;br /&gt;
 WRbsWF                   # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
Then you have to run the BSE calculation (notice that, in case you already computed the BSE spectrum also for the case without SOC, the code can read the results from the provious BSE run skipping many steps)&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J 05_BSE -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; folder you will now find a new database file called &amp;lt;code&amp;gt;ndb.BS_diago_Q01&amp;lt;/code&amp;gt;. This is what you need to analyze the exciton peaks running the post-processing code ypp.&lt;br /&gt;
&lt;br /&gt;
First of all you can run:&lt;br /&gt;
 &amp;gt;ypp -e s -J 05_BSE -C BSE_out&lt;br /&gt;
This run will sort in energy the excitonic eigenvalues writing their oscillator strenghts (see &amp;lt;code&amp;gt;o-06_bse.exc_E_sorted&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Then you can create the ypp input required to analize how each excitonic state is build up in terms of single-particle states:&lt;br /&gt;
 &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE&lt;br /&gt;
Put the index &amp;lt;code&amp;gt;#N&amp;lt;/code&amp;gt; of the exciton with higher strenght in the E_1 peak region&lt;br /&gt;
 &amp;gt;ypp -F My_inputs/05_BSE_ypp.in -J 05_BSE -C 06_BSE_out&lt;br /&gt;
You will find the two files &amp;lt;code&amp;gt;o-06_bse.exc_weights_at_#N&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-06_bse.exc_amplitude_at_#N&amp;lt;/code&amp;gt;. In these files you will find informations on the highest strenght exciton in the E1 peak region.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
= Perturbative SOC approach =&lt;br /&gt;
&lt;br /&gt;
It is possible to include the spin-orbit coupling perturbatively in Yambo.&lt;br /&gt;
&lt;br /&gt;
To first order the perturbation just gives a correction to the DFT eigenvalues and does not touch the wave–functions. Numerically the perturbation need to be applied by mapping the solution of the DFT calculation without SOC into the solution of the DFT calculation with SOC. Once a mapping is defined, the SOC perturbation could be directly applied to the KS energies before solving both the GW scheme and/or the BSE.&lt;br /&gt;
&lt;br /&gt;
All we need is to computed a SOC mapping database given by the following equation (eq 68 in the referenced paper):&lt;br /&gt;
&lt;br /&gt;
EQUATION &lt;br /&gt;
&lt;br /&gt;
Where x, y, z are ... &lt;br /&gt;
&lt;br /&gt;
To build this map, in the folder without spin-orbit coupling we do the following:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; cd Solid_GaSb/Without_SOC/Yambo/6x6xWi6_shifted&lt;br /&gt;
 &amp;gt; mkdir SOC_DBs&lt;br /&gt;
 &amp;gt; cp -r Path/SAVE_GaSb_k6_w_soc SOC_DBs/SAVE&lt;br /&gt;
 &amp;gt; ypp -w &lt;br /&gt;
 &amp;gt; ypp -F map_wfs.in -J SOC_map -C SOC_map&lt;br /&gt;
&lt;br /&gt;
With the following input for &amp;lt;code&amp;gt;map_wfs.in&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 WFs_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 WFs_SOC_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 SOC_DBs= &amp;quot;SOC_DBs&amp;quot;        # Path to the folder containing the DB with SOC&lt;br /&gt;
 SOC_splitting= 0.01 eV    # SOC splitting between the levels&lt;br /&gt;
 % bands_to_map&lt;br /&gt;
   5 | 12 |                # Number of bands to map&lt;br /&gt;
 %&lt;br /&gt;
 bands_buffer=1&lt;br /&gt;
&lt;br /&gt;
Where the SAVE folder with spin-orbit coupling should be saved in a separate folder, and in this case it is in the &amp;lt;code&amp;gt; SOC_DBs &amp;lt;/code&amp;gt; folder. &lt;br /&gt;
Then, the BSE can be computed using the following command &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F 05_BSE+scissor.in -J &amp;quot;BSE_soc_perturbative,screening,SOC_map&amp;quot; -C BSE_soc_perturbative&lt;br /&gt;
&lt;br /&gt;
Where screening was precomputed, and the SOC_map is the one generated in this section. Check BSE section for more details on setting a BSE calculation.&lt;br /&gt;
Not converged results are presented below. &lt;br /&gt;
[[File:GaSb perturbative soc 1.png|600px|thumb|center]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Other excercises =&lt;br /&gt;
&lt;br /&gt;
# Try to converge the G0W0 increasing the polarization RL size, the polarization bands, the number of bands in the Green function and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Try to converge the absorption spectra increasing the polarization RL size, the polarization bands, the number of bands to construct the excitonic matrix and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Plot the EELS spectrum obtained within IP-RPA and RPA with local fields. Also in this case you can check the effect of increasing the polarization bands. You may also try to do a resonant only calculation to see that the EELS cannot be described using only the resonant part of the response function.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;&amp;gt;M. Marsili, A. Molina-Sánchez, M. Palummo, D. Sangalli, A. Marini, [https://doi.org/10.1103/PhysRevB.103.155152  Phys. Rev. B &#039;&#039;&#039;103&#039;&#039;&#039;, 155152 (2021)] ([https://arxiv.org/abs/2103.02266 arXiv 2103.02266])&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wiki&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Gallium_antimonide GaSb on wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;&amp;gt; [https://en.wikipedia.org/wiki/Spin%E2%80%93orbit_interaction#In_atomic_energy_levels Spin-Orbit Interaction on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kim&amp;quot;&amp;gt; Y.S. Kim et al. Phys. Rev. B &#039;&#039;&#039;82&#039;&#039;&#039;, 205212 (2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;rem&amp;quot;&amp;gt; I. N. Remediakis and Efthimios Kaxiras, Phys. Rev. B &#039;&#039;&#039;59&#039;&#039;&#039;, 5336 (1999).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan1&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1002/pssb.200983959 Phys. Sol. State B &#039;&#039;&#039;247&#039;&#039;&#039;, 1960 (2010)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan2&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1103/PhysRevLett.104.157402 Phys. Rev. Lett. &#039;&#039;&#039;104&#039;&#039;&#039;, 157402 (2010)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan3&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1103/PhysRevB.83.155421 Phys. Rev. B 83, &#039;&#039;&#039;155421&#039;&#039;&#039; (2011)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=9024</id>
		<title>SOC</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=9024"/>
		<updated>2025-09-10T06:14:13Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* Effect of spin-orbit interaction on the band structure of GaSb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Effect of spin-orbit interaction =&lt;br /&gt;
&lt;br /&gt;
Spin–orbit coupling (SOC) is a relativistic interaction between an electron’s spin and its orbital motion in the crystal potential. Presently, SOC can be included withing GW-BSE approach either perturbatively, or fully, considering the spinorial nature of the electronic wave-function. In this tutorial, we will use both approaches. More details on the theory and comparison between full spinorial GW-BSE and perturbative approach to SOC can be found in the following paper &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;, and in the Wikipedia article&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;/&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To include the spin-orbit coupling we start with many–body total Hamiltonian of the system including first order relativistic corrections. &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 1 many body rel hamiltonian.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where, &amp;lt;math&amp;gt;\hat{H}^{0}&amp;lt;/math&amp;gt; is the non-relativistic one body hamiltonian, &amp;lt;math&amp;gt;\hat{H}^{(e-e)}&amp;lt;/math&amp;gt; is the e-e Coulomb interaction, and &amp;lt;math&amp;gt;\hat{H}^{(RK)} + \hat{H}^{(SOI)}&amp;lt;/math&amp;gt; are the first order relativistic correction, and the last term is the spin-orbit interaction (SOI) in which we are interested in this tutorial. &lt;br /&gt;
&lt;br /&gt;
The SOI term itself is composed of three different components, &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 2 soi term.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; are many-body terms, called &amp;quot;two-electron spin-orbit&amp;quot;, and &amp;quot;spin-other-orbit&amp;quot;, respectively. And,  &amp;lt;math&amp;gt; \hat{H}^{(SOI)} = \hat{H}^{SO(N)} &amp;lt;/math&amp;gt; is &amp;quot;one electron spin-orbit&amp;quot; is a one body term, which is given by: &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 3 one electron spin orbit.png|250px|frameless]]&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;math&amp;gt;\underline{\nu}&amp;lt;/math&amp;gt; a 2x2 matrix in the &amp;lt;math&amp;gt;\uparrow&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\downarrow&amp;lt;/math&amp;gt; spin space, and:&lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 4 v soc.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;\mathbf{\sigma}&amp;lt;/math&amp;gt; is the three dimensional vector whose components are the Pauli matrices. In a plane wave representation the SOC is, in practice, accounted for by the use of pseudopotentials. The SOC contribution from the pseudopotential captures what is called “local SOC”, which is due to the electrons orbiting around the nuclei, it neglects instead the itinerant SOC which can- not be easily captured in periodic boundary conditions. When relativistic corrections are taken into account instead, one should in principle account for the effects of the many–body terms &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt;. A shortcut is to add a term constructed replacing &amp;lt;math&amp;gt;v^{ext}&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;v^{Hxc}&amp;lt;/math&amp;gt; into previous equation. Doing so partially account for &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt;, while &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; is neglected.&lt;br /&gt;
&lt;br /&gt;
= Introduction = &lt;br /&gt;
&lt;br /&gt;
The scope of this tutorial is to calculate the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; corrections to the DFT-LDA band-structure and the BSE optical spectrum for a bulk semiconducting material, gallium antimonide (GaSb) &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;wiki&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;kim&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;rem&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan1&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan2&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan3&amp;quot;/&amp;gt;. We will compare the results with and without the spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DFT band structure =&lt;br /&gt;
&lt;br /&gt;
For this tutorial we provide two state (GS) databases (DBs), one contains the GS-DBs with the effect of SOC included and one without. The idea is to repeat the same calculation for both database and compare the results and the performances of the code. GaSb input files can be downloaded from the following link [https://media.yambo-code.eu/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz], and can be unarchived using the following command: &lt;br /&gt;
&lt;br /&gt;
 $ tar -xzf GaSb.tar.gz&lt;br /&gt;
&lt;br /&gt;
As in the other tutorials, you will find two main folders, Without_SOC and With_SOC.&lt;br /&gt;
To avoid continuously switching between the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;With_SOC&amp;lt;/code&amp;gt; directories, we recommend opening two terminals: keep one terminal for the without SOC case and the other for the with SOC case.&lt;br /&gt;
 $ cd GaSb/With_SOC    # terminal 1&lt;br /&gt;
 $ cd GaSb/Without_SOC # terminal 2&lt;br /&gt;
&lt;br /&gt;
Inside each of the two there are two subfolders:&lt;br /&gt;
&lt;br /&gt;
* Pwscf - contains the input files and the pseudo-potentials for Quantum ESPRESSO, to generate the ground-state databases (GS-DBs) yourself.&lt;br /&gt;
* YAMBO - contains Example of yambo input files (Input folder) and output files (References folder)&lt;br /&gt;
&lt;br /&gt;
To start the tutorial you must enter the Pwscf folder and generate the KS databases&lt;br /&gt;
 $ cd Pwscf&lt;br /&gt;
 $ pw.x &amp;lt; 01_scf_kx4.in &amp;gt; 01_scf_kx4.out&lt;br /&gt;
 $ pw.x &amp;lt; 02_nscf_kx4_shifted+Gamma.in &amp;gt; 02_nscf_kx4_shifted+Gamma.out&lt;br /&gt;
 $ cd GaSb.save&lt;br /&gt;
 $ p2y&lt;br /&gt;
&lt;br /&gt;
You just generated your SAVE folder to be used for the YAMBO tutorial. We are going to move it inside a dedicated folder under Yambo&lt;br /&gt;
Let&#039;s have a look to the content of the Yambo folder. &lt;br /&gt;
 $ ls ../../YAMBO&lt;br /&gt;
 4x4x4_shifted+GAMMA 6x6x6_shifted Inputs  Reference&lt;br /&gt;
&lt;br /&gt;
Inside the YAMBO folder there are indeed two folders corresponding to two different k-points meshes. In this tutorial we will use the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; folder for the computation of the QP corrections within the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; approximation. It is a k-points grid obtained as the sum of a 4x4x4 k-points grid centered in Gamma and a 4x4x4 grid shifted. Instead for the computation of the optical properties we will use the &amp;lt;code&amp;gt;6x6x6_shifted&amp;lt;/code&amp;gt; folder. It is a 6x6x6 k-points grid shifted from Gamma. In the References folder yuo will find runs for the grids, &amp;lt;code&amp;gt;10x10x10_shifted&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;14x14x14_shifted&amp;lt;/code&amp;gt; used to do a minimum convergence of the optical properties against the number of k-points. (pay attention that the BSE calculations with bigger grids will be very memory and time demanding!). Later, you can generate the corresponding SAVE folders as well if you wish.&lt;br /&gt;
&lt;br /&gt;
For now let&#039;s move our SAVE folder inside 4x4x4_shifted+GAMMA&lt;br /&gt;
 $ mv SAVE ../../YAMBO&lt;br /&gt;
&lt;br /&gt;
The first part of the tutorial is on the computation of the QP corrections. So let&#039;s enter the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; grid and, as seen in other tutorials run the Initialization:&lt;br /&gt;
&lt;br /&gt;
 $ cd ../../YAMBO/4x4x4_shifted+GAMMA/ &lt;br /&gt;
 $ yambo &lt;br /&gt;
Now compare the result of the two setup runs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; With_SOC Energies and Occupations (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  [02.05] Energies &amp;amp; Occupations&lt;br /&gt;
  ==============================&lt;br /&gt;
&lt;br /&gt;
  [X] === General ===&lt;br /&gt;
  [X] Electronic Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Bosonic    Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Finite Temperature mode                       : no&lt;br /&gt;
  [X] El. density                                   :  0.14622E+24 [cm-3]&lt;br /&gt;
  [X] Fermi Level                                   :  5.085716 [eV]&lt;br /&gt;
&lt;br /&gt;
  [X] === Gaps and Widths ===&lt;br /&gt;
  [X] Conduction Band Min                           :  0.095395 [eV]&lt;br /&gt;
  [X] Valence Band Max                              :  0.000000 [eV]&lt;br /&gt;
  [X] Filled Bands                                  :   8&lt;br /&gt;
  [X] Empty Bands                                   :    9  200&lt;br /&gt;
  [X] Direct Gap                                    :  0.095395 [eV]&lt;br /&gt;
  [X] Direct Gap localized at k                     :  29&lt;br /&gt;
  [X] Indirect Gap                                  :  0.095395 [eV]&lt;br /&gt;
  [X] Indirect Gap between kpts                     :  29  29&lt;br /&gt;
  [X] Last valence band width                       :  3.508355 [eV]&lt;br /&gt;
  [X] 1st conduction band width                     :  3.413699 [eV]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; Without_SOC Energies and Occupations (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  [02.05] Energies &amp;amp; Occupations&lt;br /&gt;
  ==============================&lt;br /&gt;
&lt;br /&gt;
  [X] === General ===&lt;br /&gt;
  [X] Electronic Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Bosonic    Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Finite Temperature mode                       : no&lt;br /&gt;
  [X] El. density                                   :  0.14622E+24 [cm-3]&lt;br /&gt;
  [X] Fermi Level                                   :  4.815616 [eV]&lt;br /&gt;
&lt;br /&gt;
  [X] === Gaps and Widths ===&lt;br /&gt;
  [X] Conduction Band Min                           :  0.367929 [eV]&lt;br /&gt;
  [X] Valence Band Max                              :  0.000000 [eV]&lt;br /&gt;
  [X] Filled Bands                                  :   4&lt;br /&gt;
  [X] Empty Bands                                   :    5  200&lt;br /&gt;
  [X] Direct Gap                                    :  0.367929 [eV]&lt;br /&gt;
  [X] Direct Gap localized at k                     :  29&lt;br /&gt;
  [X] Indirect Gap                                  :  0.367929 [eV]&lt;br /&gt;
  [X] Indirect Gap between kpts                     :  29  29&lt;br /&gt;
  [X] Last valence band width                       :  3.276561 [eV]&lt;br /&gt;
  [X] 1st conduction band width                     :  3.649610 [eV]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A clear shrink of the DFT-LDA gap due to spin-orbit occurs. Note that, having 8 electrons in the fundamental cell, due to the spinorial nature of the wavefunction, with SOC we have 8 occupied bands, while only 4 without. Here a picture of the DFT band structure for the two cases.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_pwscf.png|500px|center|GaSb bands DFT]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the band structure of GaSb =&lt;br /&gt;
 &lt;br /&gt;
Now we will perform a G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; calculation to correct the DFT-LDA bandstructure. We assume that you are already familiar with the concept of screening needed to build up the GW self-energy and thus the QP corrections. At this stage we assume you are already inside 4x4x4_shifted+GAMMA. There, create a local folder &#039;&#039;My_inputs&#039;&#039; and generate the input for a G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; calculation within the plasmon-pole approximation using the following command: &lt;br /&gt;
 $ mkdir My_inputs&lt;br /&gt;
 $ yambo -p p -g n -V RL -F My_inputs/02_GW.in&lt;br /&gt;
However we also provide an input file with suggested parameters for this calculations inside the folder &#039;&#039;Solid_GaSb/Without_SOC/Yambo/Inputs&#039;&#039;. Remember: these parameters are system dependent and should be converged as you can see other GW tutorials (e.g. [[Silicon|GW on bulk Silicon]] or [[GW on h-BN (standalone)]]). Here we provide reasonable (but not fully converged) parameters to have a low computational cost but yet qualitatively meaningful results.&lt;br /&gt;
&lt;br /&gt;
The plane-waves cutoff for the wavefunctions and exchange part of the self-energy are set to 10 Ry. &lt;br /&gt;
 FFTGvecs =  10 Ry   # [FFT] Plane-waves&lt;br /&gt;
 EXXRLvcs=   10 Ry   # [XX] Exchange RL components&lt;br /&gt;
while we will use 40 bands, a plane-wave cut-off of 1 Ry, and a plasmon-pole energy of 20 eV to build up the screening matrix &lt;br /&gt;
 NGsBlkXp=    1 Ry  # [Xp] Response block size &lt;br /&gt;
 PPAPntXp= 20.  eV  # [Xp] PPA imaginary energy &lt;br /&gt;
 % BndsRnXp    &lt;br /&gt;
 1 | 40 |        # [Xp] Polarization function bands &lt;br /&gt;
 % &lt;br /&gt;
 % LongDrXp  &lt;br /&gt;
 1.000000 | 1.000000 | 1.000000 |        # [Xp] [cc] Electric Field &lt;br /&gt;
 %&lt;br /&gt;
The number of bands in the green function G to build up the GW self-energy is also 40 &lt;br /&gt;
 % GbndRnge    &lt;br /&gt;
 1 | 40 |                 # [GW] G[W] bands range &lt;br /&gt;
 %&lt;br /&gt;
with those parameters we will compute the correction only in the last 2 points of our grid, 28 and 29 and for the states from 3 to 6, setting the input variable &lt;br /&gt;
 %QPkrange                      &lt;br /&gt;
 28 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
You can now run the code using either your input file or the one provided in the Inputs folder &lt;br /&gt;
 $ yambo -F My_inputs/02_GW.in -J GW -C GW&lt;br /&gt;
The run will take some time. Indeed the code has first to compute the dipoles, then the screening within the plasmon pole approximation and finally the self-energy, first the exchange part Gv and then the correlation part G(W-v). &lt;br /&gt;
In the &amp;lt;code&amp;gt;GW&amp;lt;/code&amp;gt; folder you will find the &amp;lt;code&amp;gt;o-GW.qp&amp;lt;/code&amp;gt; file containing the GW corrections.&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &lt;br /&gt;
 #&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #&lt;br /&gt;
  ...&lt;br /&gt;
      29        4      0.000000      0.182291    0.992707 &lt;br /&gt;
      29        5      0.367929      0.597428    -2.431549&lt;br /&gt;
  ...&lt;br /&gt;
Thus it is about 0.60-0.18=0.42  eV (not fully converged).&lt;br /&gt;
&lt;br /&gt;
We can also compute the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; correction for all the k-point of the database. To this end open the input file &#039;&#039;My_inputs/02_GW.in&#039;&#039; (or your own) and edit the number of k-point to be computed &lt;br /&gt;
 %&lt;br /&gt;
 QPkrange                      1 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
Remember to use the same name after the -J option, so that the code will be able to use the informations from the previous run and avoid many calculations. &lt;br /&gt;
 $ yambo -F My_inputs/02_GW.in -J GW -C GW&lt;br /&gt;
In the &#039;&#039;GW&#039;&#039; folder you will find now also the &#039;&#039;o-GW.qp_01&#039;&#039; file containg the GW corrections for all the k-points.&lt;br /&gt;
&lt;br /&gt;
Now you can enter the folder of the 4x4x4 shifted grid&lt;br /&gt;
 cd Solid_GaSb/With_SOC/Yambo/4x4x4_shifted+GAMMA&lt;br /&gt;
and repeat the same calculations. Remember that in the input file you will generate you should change all the band ranges doubling the number of states (do you understand why?) &lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
    1 | 80 |        # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
    1 | 80 |        # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 % QPkrange&lt;br /&gt;
   29 | 29 |   5 | 12|  # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band.&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #  &lt;br /&gt;
   ...   &lt;br /&gt;
       29         8       0.000000    0.251074           0.896306&lt;br /&gt;
       29         9       0.095395    0.647108          -2.334492&lt;br /&gt;
   ...&lt;br /&gt;
Thus it is about 0.65-0.25=0.43 eV (not fully converged). Indeed the same result obtained without SOC. The resulting electronic gap is about 0.49 eV reasonably close to the experimental band gap of 0.72 eV. It is also a big improvement compared to the LDA band gap (approximatively 0.09 eV). This correction will be used, in the form of a scissor operator, as a starting point to compute the optical spectra.&lt;br /&gt;
&lt;br /&gt;
Again we can also compute the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; correction for all the k-point of the database. You can plot column 4 of the output file against column 3 to obtain a picture of the QP corrections. In the following figure we show the plot of the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; correction (E_G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;-E_LDA) vs the LDA eigenvalues. The corrections at the Gamma and the L point are marked with bigger red spots.&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=400px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_GoWo_corrections.png|GaSb QP corrections without SOC &lt;br /&gt;
Image:GaSb GoWo corrections SOC.png|GaSb GoWo corrections with SOC&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
[[File:SOC_GaSb_GoWo_corrections.png|500px|frameless|center]]&lt;br /&gt;
[[File:GaSb GoWo corrections SOC.png|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;scissor operator approach&amp;amp;quot; does not seem a very good approximation for GaSb. Indeed the quasi particle corrections are not constant, especially in the conduction band. For example the correction to the Gamma point is bigger than the corrections to all other k-points. This result however maybe due to the poor covergence parameters. If you would like to better investigate these results you should try do convergence tests. Since QP corrections are poorly sensitive to the spin-orbit interaction it is probably a good idea to do convergence without SOC.&lt;br /&gt;
&lt;br /&gt;
Here we also provide a plot of the band-structure at different levels of approximation: DFT, DFT+scissor, QP. The band structures are obtained from an interpolation of our k-points mesh and it is not very precise since, again, we are using a quite coarse sampling of the brillouine zone. Indeed we can see that already the interpolated DFT band structure deviates from the exact DFT band-structure, which has also been reported. In particular in the region nearby Gamma. However it gives quite nicely an overview of how the QP band structure compares with the DFT band stucture. The main effect is indeed an opening of the band-gap which can be described in terms of a scissor operator.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_yambo.png|500px|center|GaSb QP bands]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the optical properties of GaSb =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--{|&lt;br /&gt;
| [[File:SOC_GaSb_bands.png|600px|center|GaSb bands 1]]&lt;br /&gt;
| [[File:SOC_GaSb_absorption.png|600px|center|GaSb bands 2]]&lt;br /&gt;
|} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now turn our attention on the optical properties of the system. Here we will compute the dielectric function at different levels of approximations:&amp;lt;br /&amp;gt;&lt;br /&gt;
# at the IP-RPA level, thus using the Fermi golden rule with the KS energies and wave-functions&amp;lt;br /&amp;gt;&lt;br /&gt;
# at the RPA level, thus also including the effect of the local fields&amp;lt;br /&amp;gt;&lt;br /&gt;
# at the BSE level, thus including many-body effects, both correcting the KS energies (we will introduce a scissor obtained from the GW calculation) and considering the statically screened electron-hole interaction&lt;br /&gt;
# Run the simulations with SOC using screening databases computed without SOC.&lt;br /&gt;
# Run the simulations in perturbative SOC approach  &lt;br /&gt;
&lt;br /&gt;
First, setup the calculation (initialisation) in the usual way in the folder without SOC&lt;br /&gt;
 $ cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 $ yambo&lt;br /&gt;
and repeat the same inside the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; before continuing.&lt;br /&gt;
&lt;br /&gt;
== RPA-IP absorption ==&lt;br /&gt;
&lt;br /&gt;
Create a local folder inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; which you will call &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt;, and create the input file:&lt;br /&gt;
 &amp;gt;cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o c -V RL -F My_inputs/03_IP-RPA.in&lt;br /&gt;
&lt;br /&gt;
As before, we also provide an input file with suggested parameters for this calculations. The kind of calculation is controlled by the input variable&lt;br /&gt;
 Chimod= &amp;quot;IP&amp;quot;                 # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1            RL    # [Xd] Response block size&lt;br /&gt;
These tells you that we are building up the dielectric function in G-space considering only on G vector, i.e. the G=0 component. The string Chimod= &amp;amp;quot;IP&amp;amp;quot; recalls us that this means we are neglecting the local fields effect.&lt;br /&gt;
&lt;br /&gt;
We set the plane-waves cutoff for the wavefunctions to&lt;br /&gt;
 FFTGvecs=  10  Ry   # [FFT] Plane-waves&lt;br /&gt;
Since we are interested into the optical spectrum calculation, only the Q=0 term, i.e. the first Q-point, is calculated&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
The number of bands we use is 10. This is a reasonable number of states to converge the IP-RPA optical spectrum in the VIS-UV range. (If you wish to calculate the EELS spectrum for q different from 0 probably more bands will be required.)&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 10 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
As you learned the dielectric function is a tensor and in principle three calculations for light polarized along x,y,z chould be done depending on the experimental setup. However GaSb is a system with cubic symmetry, thus any direction is equivalent. Here we decide to compute epsilon along the &amp;amp;quot;(1 1 1)&amp;amp;quot; direction.&lt;br /&gt;
 % LongDrXd&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation using either your input file or the one provided in the Inputs folder&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/03_IP-RPA.in  -J 03_IP-RPA -C 03_IP-RPA&lt;br /&gt;
&lt;br /&gt;
Inside the &amp;lt;code&amp;gt;03_IP-RPA&amp;lt;/code&amp;gt; folder you will find the databases created by the code (in this case just the dipoles), the report file and the output files for the dielectric function which describes the absorption (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;) and for its inverse (&amp;lt;code&amp;gt;o-03_IP-RPA.eel*&amp;lt;/code&amp;gt;), which describes the electron energy loss. You can plot them with your favorite software (for example gnuplot or xmgrace). The real and imaginary parts of the IP-RPA dielectric function are column 3 and 2 respectively of the file (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;). Using also the reference output file in the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; folder you can compare the spectrum with and without SOC.&lt;br /&gt;
&lt;br /&gt;
Now repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 20 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.jpg|600px|center|GaSb absorption RPA]]&lt;br /&gt;
If you wish to obtain a reasonable spectrum however the 6x6x6 kpts grid is not enough. In order to check the convergence with the number of k-points you should generate denser k-points meshes using the input files provided in the Pwscf folder. &lt;br /&gt;
&amp;lt;!-- (see section [[more.php|More on GaSb]] for more advanced calculations).--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the directories Reference_Outputs several RPA dielectric functions are saved with the dielectric function calculated with the 10x10x10 and the 14x14x14 k-grid. You will learn that within RPA spectra the lowest energy peak is under-estimated. Also the spectra with and without SOC look very similar and the SO splitting is almost not present. This is clearly due to the excitonic nature of the E1 peak which can be correctly described only including the electron-hole interaction.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== RPA absorption with local fields ==&lt;br /&gt;
&lt;br /&gt;
To also include the local fields effect you can generate the input with the command: &lt;br /&gt;
 &amp;gt;yambo -o c -k hartree -F My_inputs/04_RPA_LF.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
In the input file we provide you will see that now the chimod and size of the dynamical matrix are set to&lt;br /&gt;
 Chimod= &amp;amp;quot;Hartree&amp;amp;quot;       # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1       Ry    # [Xd] Response block size&lt;br /&gt;
&lt;br /&gt;
Including local fields the poles of absorption will move from KS transitions to many-electrons transitions (although we are still neglecting the electron-hole interaction). As a result you will need more states to converge the absorption spectrum. This is why we set the number of bands to 15:&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 15 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
while as before we will have&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 %&lt;br /&gt;
 LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/04_RPA_LF.in -J 04_RPA_LF -C 04_RPA_LF_out&lt;br /&gt;
&lt;br /&gt;
In the 04_RPA+LF_out folder you will fine the report and the output files as before. The real and imaginary parts of the RPA+LF dielectric function with local fields are column 3 and 2 respectively of the .eps file. While the corresponding IP-RPA spectra is reported in columns 5 and 4.&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 30 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
In the following picture we compare the result of IP-RPA and RPA+LF with SOC.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA_IP_vs_LF.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== BSE absorption with QP corrections ==&lt;br /&gt;
&lt;br /&gt;
A more detailed description of BSE in Yambo is available in the following tutorial: &lt;br /&gt;
[https://wiki.yambo-code.eu/wiki/index.php?title=Calculating%20optical%20spectra%20including%20excitonic%20effects:%20a%20step-by-step%20guide BSE in hBN].&lt;br /&gt;
&lt;br /&gt;
=== Static Screening ===&lt;br /&gt;
&lt;br /&gt;
First we need to obtain the static screening. &lt;br /&gt;
&lt;br /&gt;
This can be done using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s -F My_inputs/05_screening.in&lt;br /&gt;
&lt;br /&gt;
In the resulting input file you can also see the parameters used to compute the static dielectric function needed for the screened Coulomb term (W) of the BSE kernel. Here we use 20 bands and an energy cut-off of 1 Ry.&lt;br /&gt;
&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 20 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 1            Ry    # [Xs] Response block size&lt;br /&gt;
&lt;br /&gt;
Remember to double the number of bands for the case with spin-oribit coupling included. &lt;br /&gt;
&lt;br /&gt;
Then run the file &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F My_inputs/05_screening.in -J screening -C screening&lt;br /&gt;
&lt;br /&gt;
=== BS Kernel and Solver ===&lt;br /&gt;
&lt;br /&gt;
Now we build the BS kernel, and specify the BS kernel solver. Overview of the BSE solvers is available using the following link: [[BSE solvers overview]]. In this tutorial we will use Haydock solver because it is computationally cheaper.&lt;br /&gt;
&lt;br /&gt;
As you probably know the inclusion of the electron-hole interaction makes the approach in G space not feasible. We have thus to compute the dielectric function in the electron-hole space, building up the excitonic hamiltonian. Thus to create the input file you can run the command:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y h -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder. As before you, in the directory Inputs, you can find an example with suggested parameters. The plane-wave cutoffs used to expand wavefunctions is set to 10 Ry, the cut-off on the exchange interaction between the electron and the hole (i.e. for the local-fields) is set to 10 Ry (here we use a much higer value compared to the previous run since the computational cost of increasing this variable in the electron-hole space is very low). and, finally, the cut-off on the direct electron-hole interaction is set to 1 Ry (to build up this term, where the interaction is screened, we need to compute the static dielectric constant in G-space, thus increasing this value is computationally demanding).&lt;br /&gt;
 FFTGvecs= 10     Ry    # [FFT] Plane-waves&lt;br /&gt;
 BSENGexx= 10     Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=  1     Ry    # [BSK] Screened interaction block size&lt;br /&gt;
&lt;br /&gt;
The input variable &amp;amp;quot;KfnQP_E&amp;amp;quot; can be used to include a scissor operator, i.e a opening of the DFT band gap. The value 0.53 eV is the coverged correction at Gamma obtained in the GW run. Here we will calculate the BSE assuming that the &amp;amp;quot;scissor operator approximation&amp;amp;quot; is valid for GaSb (to be checked in principle!) .&lt;br /&gt;
&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 0.530000 &amp;lt;/span&amp;gt; | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
To build up the excitonic matrix we consider the states from 3 to 6, i.e. we are using 2 occupied and 2 unoccupied bands.&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and we will build up the dielectric function using a grid of 200 point in frequency space&lt;br /&gt;
 BEnSteps= 200                # [BSS] Energy steps&lt;br /&gt;
Finally, similarly as before, we will have&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
Remember that the BS kernel is written in the electron-hole space and its size is given by the relation&amp;lt;br /&amp;gt;&lt;br /&gt;
BS kernel size = Valence Bands × Conduction Bands × K-points in the whole BZ.&amp;lt;br /&amp;gt;&lt;br /&gt;
This means that in the case with SO we are building up a matrix 2x2=4 times larger of the corresponding calculation without spin-orbit (you can compare the input in With_SO/Yambo/Inputs / Without_SO/Yambo/Inputs and reference outputs in With_SO/Yambo/Reference_Outputs / With_SO/Yambo/Reference_Outputs)&lt;br /&gt;
&lt;br /&gt;
We are ready to run the BSE calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J &amp;quot;05_BSE,screening&amp;quot; -C 05_BSE&lt;br /&gt;
&lt;br /&gt;
We specify to Yambo the folder which contains calculated static screening, and in &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; the two response files &amp;lt;code&amp;gt; o-05_BSE.eel_q1_haydock_bse &amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-05_BSE.eps_q1_haydock_bse&amp;lt;/code&amp;gt; can be found. In the &#039;&#039;eps file&#039;&#039; the real and imaginary parts of the BSE dielectric function are column 3 and 2 respectively, while the corresponding GW spectra are column 5 and 4.&lt;br /&gt;
&lt;br /&gt;
In the folder &amp;lt;code&amp;gt;screening&amp;lt;/code&amp;gt; you will find instead the DBs of the static screening (W) needed to build up the BSE kernel (&amp;lt;code&amp;gt;ndb.em1s&amp;lt;/code&amp;gt;) and in the folder &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; the BSE matrix (&amp;lt;code&amp;gt;ndb.BS*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 40 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   5 | 12 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
If you do the corresponding calculations for the case without spin-orbits using the databases in the directory GaSb_nSO/YAMBO and inputs in GaSb_nSO/Inputs, the two BSE spectra should look like in this figure:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE_few_kpts.jpg|500px|center|GaSb absorption BSE gew kpts]]&lt;br /&gt;
As mentioned before the two spectra present spurious peaks ( as the first peak!) due to uncoverged k-point sampling. Nevertheless the splitting due to spin-orbit interaction is already visible in the peak around 2.1 eV.&lt;br /&gt;
A more converged (yet not fully converged calculation) would give the following results which compares very nicely with the experimental data:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE.png|500px|center|GaSb absorption BSE]]&lt;br /&gt;
&lt;br /&gt;
=== Using Static Screening without SOC, for the SOC case === &lt;br /&gt;
&lt;br /&gt;
Additionally, a BSE run for the spin-orbit coupling case can be done using the screening computed for the case without spin-orbit coupling. &lt;br /&gt;
&lt;br /&gt;
To do it we can make a symlink from the no-SOC folder:&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt; cd Path/GaSb/With_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt; ln -s Path/GaSb/Without_SOC/YAMBO/6x6x6_shifted/screening screening_no_soc&lt;br /&gt;
&lt;br /&gt;
The BSE kernel can be build and solved using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s -o b -k sex -y h -V qp -F 06_BSE_using_nosoc_screening.in&lt;br /&gt;
&lt;br /&gt;
Here we combined the screening part (-X s) and BSE part (-o b -k sex -y h -V qp). All of the input parameters have been discussed previously. Although, it is important to keep the right matching behind the screening bands used for the no SOC and SOC case.&lt;br /&gt;
&lt;br /&gt;
If for the SOC case the specified screening bands are n1, n2 then for the no-SOC screening the bands should be ((n1-1)/2+1, n2/2). &lt;br /&gt;
&lt;br /&gt;
 # No SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   1 | 20 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and &lt;br /&gt;
 # SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   1 | 40 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The results for the BSE solved using screening used from SOC and no SOC databases is presented below. As we can see, there is almost no difference between them. &lt;br /&gt;
&lt;br /&gt;
[[File:GaSb screening w and wo soc second.png|600px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
= Exciton analysis =&lt;br /&gt;
&lt;br /&gt;
In this part of the tutorial we show how to analyze the origin of the E1 peak in GaSb. Since the calculation with the SOC case is very demanding we will do that only for the case without SOC. So first of all enter the &lt;br /&gt;
&amp;lt;code&amp;gt;Without_SOC/YAMBO/6x6x6_shifted&amp;lt;/code&amp;gt; folder and, if you didn&#039;t before, run the setup:&lt;br /&gt;
 &amp;gt;cd Without_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt;ls SAVE&lt;br /&gt;
 &amp;gt;yambo -J 01_init&lt;br /&gt;
 &amp;gt;ls SAVE r-01_init_setup&lt;br /&gt;
&lt;br /&gt;
Similar to previous section we need to compute the static screening first, and then solve the BSE equation.&lt;br /&gt;
This time we will use the full diagonalization solver to calculate all exciton energies and composition in terms of electron-hole pairs. See [[BSE solvers overview]] for more details. &lt;br /&gt;
&lt;br /&gt;
Then create the &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; folder and the input file for a BSE&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -X s -F My_inputs/05_screening.in&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_screening.in -J screening -C screening &lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y d -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the same parameters you used to compute the absorption with SOC previously. The number of bands will be the half of the case without SOC&lt;br /&gt;
 % BSEBands&lt;br /&gt;
  3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
Also this time you will use the to &amp;lt;code&amp;gt;&amp;amp;quot;d&amp;amp;quot;&amp;lt;/code&amp;gt; and uncomment the variable needed to Write to disk excitonic the WFs:&lt;br /&gt;
 BSSmod= &amp;amp;quot;d&amp;amp;quot;              # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft`&lt;br /&gt;
 WRbsWF                   # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
Then you have to run the BSE calculation (notice that, in case you already computed the BSE spectrum also for the case without SOC, the code can read the results from the provious BSE run skipping many steps)&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J 05_BSE -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; folder you will now find a new database file called &amp;lt;code&amp;gt;ndb.BS_diago_Q01&amp;lt;/code&amp;gt;. This is what you need to analyze the exciton peaks running the post-processing code ypp.&lt;br /&gt;
&lt;br /&gt;
First of all you can run:&lt;br /&gt;
 &amp;gt;ypp -e s -J 05_BSE -C BSE_out&lt;br /&gt;
This run will sort in energy the excitonic eigenvalues writing their oscillator strenghts (see &amp;lt;code&amp;gt;o-06_bse.exc_E_sorted&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Then you can create the ypp input required to analize how each excitonic state is build up in terms of single-particle states:&lt;br /&gt;
 &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE&lt;br /&gt;
Put the index &amp;lt;code&amp;gt;#N&amp;lt;/code&amp;gt; of the exciton with higher strenght in the E_1 peak region&lt;br /&gt;
 &amp;gt;ypp -F My_inputs/05_BSE_ypp.in -J 05_BSE -C 06_BSE_out&lt;br /&gt;
You will find the two files &amp;lt;code&amp;gt;o-06_bse.exc_weights_at_#N&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-06_bse.exc_amplitude_at_#N&amp;lt;/code&amp;gt;. In these files you will find informations on the highest strenght exciton in the E1 peak region.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
= Perturbative SOC approach =&lt;br /&gt;
&lt;br /&gt;
It is possible to include the spin-orbit coupling perturbatively in Yambo.&lt;br /&gt;
&lt;br /&gt;
To first order the perturbation just gives a correction to the DFT eigenvalues and does not touch the wave–functions. Numerically the perturbation need to be applied by mapping the solution of the DFT calculation without SOC into the solution of the DFT calculation with SOC. Once a mapping is defined, the SOC perturbation could be directly applied to the KS energies before solving both the GW scheme and/or the BSE.&lt;br /&gt;
&lt;br /&gt;
All we need is to computed a SOC mapping database given by the following equation (eq 68 in the referenced paper):&lt;br /&gt;
&lt;br /&gt;
EQUATION &lt;br /&gt;
&lt;br /&gt;
Where x, y, z are ... &lt;br /&gt;
&lt;br /&gt;
To build this map, in the folder without spin-orbit coupling we do the following:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; cd Solid_GaSb/Without_SOC/Yambo/6x6xWi6_shifted&lt;br /&gt;
 &amp;gt; mkdir SOC_DBs&lt;br /&gt;
 &amp;gt; cp -r Path/SAVE_GaSb_k6_w_soc SOC_DBs/SAVE&lt;br /&gt;
 &amp;gt; ypp -w &lt;br /&gt;
 &amp;gt; ypp -F map_wfs.in -J SOC_map -C SOC_map&lt;br /&gt;
&lt;br /&gt;
With the following input for &amp;lt;code&amp;gt;map_wfs.in&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 WFs_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 WFs_SOC_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 SOC_DBs= &amp;quot;SOC_DBs&amp;quot;        # Path to the folder containing the DB with SOC&lt;br /&gt;
 SOC_splitting= 0.01 eV    # SOC splitting between the levels&lt;br /&gt;
 % bands_to_map&lt;br /&gt;
   5 | 12 |                # Number of bands to map&lt;br /&gt;
 %&lt;br /&gt;
 bands_buffer=1&lt;br /&gt;
&lt;br /&gt;
Where the SAVE folder with spin-orbit coupling should be saved in a separate folder, and in this case it is in the &amp;lt;code&amp;gt; SOC_DBs &amp;lt;/code&amp;gt; folder. &lt;br /&gt;
Then, the BSE can be computed using the following command &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F 05_BSE+scissor.in -J &amp;quot;BSE_soc_perturbative,screening,SOC_map&amp;quot; -C BSE_soc_perturbative&lt;br /&gt;
&lt;br /&gt;
Where screening was precomputed, and the SOC_map is the one generated in this section. Check BSE section for more details on setting a BSE calculation.&lt;br /&gt;
Not converged results are presented below. &lt;br /&gt;
[[File:GaSb perturbative soc 1.png|600px|thumb|center]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Other excercises =&lt;br /&gt;
&lt;br /&gt;
# Try to converge the G0W0 increasing the polarization RL size, the polarization bands, the number of bands in the Green function and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Try to converge the absorption spectra increasing the polarization RL size, the polarization bands, the number of bands to construct the excitonic matrix and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Plot the EELS spectrum obtained within IP-RPA and RPA with local fields. Also in this case you can check the effect of increasing the polarization bands. You may also try to do a resonant only calculation to see that the EELS cannot be described using only the resonant part of the response function.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;&amp;gt;M. Marsili, A. Molina-Sánchez, M. Palummo, D. Sangalli, A. Marini, [https://doi.org/10.1103/PhysRevB.103.155152  Phys. Rev. B &#039;&#039;&#039;103&#039;&#039;&#039;, 155152 (2021)] ([https://arxiv.org/abs/2103.02266 arXiv 2103.02266])&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wiki&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Gallium_antimonide GaSb on wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;&amp;gt; [https://en.wikipedia.org/wiki/Spin%E2%80%93orbit_interaction#In_atomic_energy_levels Spin-Orbit Interaction on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kim&amp;quot;&amp;gt; Y.S. Kim et al. Phys. Rev. B &#039;&#039;&#039;82&#039;&#039;&#039;, 205212 (2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;rem&amp;quot;&amp;gt; I. N. Remediakis and Efthimios Kaxiras, Phys. Rev. B &#039;&#039;&#039;59&#039;&#039;&#039;, 5336 (1999).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan1&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1002/pssb.200983959 Phys. Sol. State B &#039;&#039;&#039;247&#039;&#039;&#039;, 1960 (2010)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan2&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1103/PhysRevLett.104.157402 Phys. Rev. Lett. &#039;&#039;&#039;104&#039;&#039;&#039;, 157402 (2010)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan3&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1103/PhysRevB.83.155421 Phys. Rev. B 83, &#039;&#039;&#039;155421&#039;&#039;&#039; (2011)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=9023</id>
		<title>SOC</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=9023"/>
		<updated>2025-09-10T06:12:40Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* DFT band structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Effect of spin-orbit interaction =&lt;br /&gt;
&lt;br /&gt;
Spin–orbit coupling (SOC) is a relativistic interaction between an electron’s spin and its orbital motion in the crystal potential. Presently, SOC can be included withing GW-BSE approach either perturbatively, or fully, considering the spinorial nature of the electronic wave-function. In this tutorial, we will use both approaches. More details on the theory and comparison between full spinorial GW-BSE and perturbative approach to SOC can be found in the following paper &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;, and in the Wikipedia article&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;/&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To include the spin-orbit coupling we start with many–body total Hamiltonian of the system including first order relativistic corrections. &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 1 many body rel hamiltonian.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where, &amp;lt;math&amp;gt;\hat{H}^{0}&amp;lt;/math&amp;gt; is the non-relativistic one body hamiltonian, &amp;lt;math&amp;gt;\hat{H}^{(e-e)}&amp;lt;/math&amp;gt; is the e-e Coulomb interaction, and &amp;lt;math&amp;gt;\hat{H}^{(RK)} + \hat{H}^{(SOI)}&amp;lt;/math&amp;gt; are the first order relativistic correction, and the last term is the spin-orbit interaction (SOI) in which we are interested in this tutorial. &lt;br /&gt;
&lt;br /&gt;
The SOI term itself is composed of three different components, &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 2 soi term.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; are many-body terms, called &amp;quot;two-electron spin-orbit&amp;quot;, and &amp;quot;spin-other-orbit&amp;quot;, respectively. And,  &amp;lt;math&amp;gt; \hat{H}^{(SOI)} = \hat{H}^{SO(N)} &amp;lt;/math&amp;gt; is &amp;quot;one electron spin-orbit&amp;quot; is a one body term, which is given by: &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 3 one electron spin orbit.png|250px|frameless]]&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;math&amp;gt;\underline{\nu}&amp;lt;/math&amp;gt; a 2x2 matrix in the &amp;lt;math&amp;gt;\uparrow&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\downarrow&amp;lt;/math&amp;gt; spin space, and:&lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 4 v soc.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;\mathbf{\sigma}&amp;lt;/math&amp;gt; is the three dimensional vector whose components are the Pauli matrices. In a plane wave representation the SOC is, in practice, accounted for by the use of pseudopotentials. The SOC contribution from the pseudopotential captures what is called “local SOC”, which is due to the electrons orbiting around the nuclei, it neglects instead the itinerant SOC which can- not be easily captured in periodic boundary conditions. When relativistic corrections are taken into account instead, one should in principle account for the effects of the many–body terms &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt;. A shortcut is to add a term constructed replacing &amp;lt;math&amp;gt;v^{ext}&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;v^{Hxc}&amp;lt;/math&amp;gt; into previous equation. Doing so partially account for &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt;, while &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; is neglected.&lt;br /&gt;
&lt;br /&gt;
= Introduction = &lt;br /&gt;
&lt;br /&gt;
The scope of this tutorial is to calculate the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; corrections to the DFT-LDA band-structure and the BSE optical spectrum for a bulk semiconducting material, gallium antimonide (GaSb) &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;wiki&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;kim&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;rem&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan1&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan2&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan3&amp;quot;/&amp;gt;. We will compare the results with and without the spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DFT band structure =&lt;br /&gt;
&lt;br /&gt;
For this tutorial we provide two state (GS) databases (DBs), one contains the GS-DBs with the effect of SOC included and one without. The idea is to repeat the same calculation for both database and compare the results and the performances of the code. GaSb input files can be downloaded from the following link [https://media.yambo-code.eu/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz], and can be unarchived using the following command: &lt;br /&gt;
&lt;br /&gt;
 $ tar -xzf GaSb.tar.gz&lt;br /&gt;
&lt;br /&gt;
As in the other tutorials, you will find two main folders, Without_SOC and With_SOC.&lt;br /&gt;
To avoid continuously switching between the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;With_SOC&amp;lt;/code&amp;gt; directories, we recommend opening two terminals: keep one terminal for the without SOC case and the other for the with SOC case.&lt;br /&gt;
 $ cd GaSb/With_SOC    # terminal 1&lt;br /&gt;
 $ cd GaSb/Without_SOC # terminal 2&lt;br /&gt;
&lt;br /&gt;
Inside each of the two there are two subfolders:&lt;br /&gt;
&lt;br /&gt;
* Pwscf - contains the input files and the pseudo-potentials for Quantum ESPRESSO, to generate the ground-state databases (GS-DBs) yourself.&lt;br /&gt;
* YAMBO - contains Example of yambo input files (Input folder) and output files (References folder)&lt;br /&gt;
&lt;br /&gt;
To start the tutorial you must enter the Pwscf folder and generate the KS databases&lt;br /&gt;
 $ cd Pwscf&lt;br /&gt;
 $ pw.x &amp;lt; 01_scf_kx4.in &amp;gt; 01_scf_kx4.out&lt;br /&gt;
 $ pw.x &amp;lt; 02_nscf_kx4_shifted+Gamma.in &amp;gt; 02_nscf_kx4_shifted+Gamma.out&lt;br /&gt;
 $ cd GaSb.save&lt;br /&gt;
 $ p2y&lt;br /&gt;
&lt;br /&gt;
You just generated your SAVE folder to be used for the YAMBO tutorial. We are going to move it inside a dedicated folder under Yambo&lt;br /&gt;
Let&#039;s have a look to the content of the Yambo folder. &lt;br /&gt;
 $ ls ../../YAMBO&lt;br /&gt;
 4x4x4_shifted+GAMMA 6x6x6_shifted Inputs  Reference&lt;br /&gt;
&lt;br /&gt;
Inside the YAMBO folder there are indeed two folders corresponding to two different k-points meshes. In this tutorial we will use the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; folder for the computation of the QP corrections within the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; approximation. It is a k-points grid obtained as the sum of a 4x4x4 k-points grid centered in Gamma and a 4x4x4 grid shifted. Instead for the computation of the optical properties we will use the &amp;lt;code&amp;gt;6x6x6_shifted&amp;lt;/code&amp;gt; folder. It is a 6x6x6 k-points grid shifted from Gamma. In the References folder yuo will find runs for the grids, &amp;lt;code&amp;gt;10x10x10_shifted&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;14x14x14_shifted&amp;lt;/code&amp;gt; used to do a minimum convergence of the optical properties against the number of k-points. (pay attention that the BSE calculations with bigger grids will be very memory and time demanding!). Later, you can generate the corresponding SAVE folders as well if you wish.&lt;br /&gt;
&lt;br /&gt;
For now let&#039;s move our SAVE folder inside 4x4x4_shifted+GAMMA&lt;br /&gt;
 $ mv SAVE ../../YAMBO&lt;br /&gt;
&lt;br /&gt;
The first part of the tutorial is on the computation of the QP corrections. So let&#039;s enter the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; grid and, as seen in other tutorials run the Initialization:&lt;br /&gt;
&lt;br /&gt;
 $ cd ../../YAMBO/4x4x4_shifted+GAMMA/ &lt;br /&gt;
 $ yambo &lt;br /&gt;
Now compare the result of the two setup runs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; With_SOC Energies and Occupations (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  [02.05] Energies &amp;amp; Occupations&lt;br /&gt;
  ==============================&lt;br /&gt;
&lt;br /&gt;
  [X] === General ===&lt;br /&gt;
  [X] Electronic Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Bosonic    Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Finite Temperature mode                       : no&lt;br /&gt;
  [X] El. density                                   :  0.14622E+24 [cm-3]&lt;br /&gt;
  [X] Fermi Level                                   :  5.085716 [eV]&lt;br /&gt;
&lt;br /&gt;
  [X] === Gaps and Widths ===&lt;br /&gt;
  [X] Conduction Band Min                           :  0.095395 [eV]&lt;br /&gt;
  [X] Valence Band Max                              :  0.000000 [eV]&lt;br /&gt;
  [X] Filled Bands                                  :   8&lt;br /&gt;
  [X] Empty Bands                                   :    9  200&lt;br /&gt;
  [X] Direct Gap                                    :  0.095395 [eV]&lt;br /&gt;
  [X] Direct Gap localized at k                     :  29&lt;br /&gt;
  [X] Indirect Gap                                  :  0.095395 [eV]&lt;br /&gt;
  [X] Indirect Gap between kpts                     :  29  29&lt;br /&gt;
  [X] Last valence band width                       :  3.508355 [eV]&lt;br /&gt;
  [X] 1st conduction band width                     :  3.413699 [eV]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; Without_SOC Energies and Occupations (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  [02.05] Energies &amp;amp; Occupations&lt;br /&gt;
  ==============================&lt;br /&gt;
&lt;br /&gt;
  [X] === General ===&lt;br /&gt;
  [X] Electronic Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Bosonic    Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Finite Temperature mode                       : no&lt;br /&gt;
  [X] El. density                                   :  0.14622E+24 [cm-3]&lt;br /&gt;
  [X] Fermi Level                                   :  4.815616 [eV]&lt;br /&gt;
&lt;br /&gt;
  [X] === Gaps and Widths ===&lt;br /&gt;
  [X] Conduction Band Min                           :  0.367929 [eV]&lt;br /&gt;
  [X] Valence Band Max                              :  0.000000 [eV]&lt;br /&gt;
  [X] Filled Bands                                  :   4&lt;br /&gt;
  [X] Empty Bands                                   :    5  200&lt;br /&gt;
  [X] Direct Gap                                    :  0.367929 [eV]&lt;br /&gt;
  [X] Direct Gap localized at k                     :  29&lt;br /&gt;
  [X] Indirect Gap                                  :  0.367929 [eV]&lt;br /&gt;
  [X] Indirect Gap between kpts                     :  29  29&lt;br /&gt;
  [X] Last valence band width                       :  3.276561 [eV]&lt;br /&gt;
  [X] 1st conduction band width                     :  3.649610 [eV]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A clear shrink of the DFT-LDA gap due to spin-orbit occurs. Note that, having 8 electrons in the fundamental cell, due to the spinorial nature of the wavefunction, with SOC we have 8 occupied bands, while only 4 without. Here a picture of the DFT band structure for the two cases.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_pwscf.png|500px|center|GaSb bands DFT]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the band structure of GaSb =&lt;br /&gt;
 &lt;br /&gt;
Now we will perform a G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; calculation to correct the DFT-LDA bandstructure. We assume that you are already familiar with the concept of screening needed to build up the GW self-energy and thus the QP corrections. Create a local folder &#039;&#039;My_inputs&#039;&#039; and generate the input for a G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; calculation within the plasmon-pole approximation using the following command: &lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA&lt;br /&gt;
 $ mkdir My_inputs&lt;br /&gt;
 $ yambo -p p -g n -V RL -F My_inputs/02_GW.in&lt;br /&gt;
However we also provide an input file with suggested parameters for this calculations inside the folder &#039;&#039;Solid_GaSb/Without_SOC/Yambo/Inputs&#039;&#039;. Remember: these parameters are system dependent and should be converged as you can see other GW tutorials (e.g. [[Silicon|GW on bulk Silicon]] or [[GW on h-BN (standalone)]]). Here we provide reasonable (but not fully converged) parameters to have a low computational cost but yet qualitatively meaningful results.&lt;br /&gt;
&lt;br /&gt;
The plane-waves cutoff for the wavefunctions and exchange part of the self-energy are set to 10 Ry. &lt;br /&gt;
 FFTGvecs =  10 Ry   # [FFT] Plane-waves&lt;br /&gt;
 EXXRLvcs=   10 Ry   # [XX] Exchange RL components&lt;br /&gt;
while we will use 40 bands, a plane-wave cut-off of 1 Ry, and a plasmon-pole energy of 20 eV to build up the screening matrix &lt;br /&gt;
 NGsBlkXp=    1 Ry  # [Xp] Response block size &lt;br /&gt;
 PPAPntXp= 20.  eV  # [Xp] PPA imaginary energy &lt;br /&gt;
 % BndsRnXp    &lt;br /&gt;
 1 | 40 |        # [Xp] Polarization function bands &lt;br /&gt;
 % &lt;br /&gt;
 % LongDrXp  &lt;br /&gt;
 1.000000 | 1.000000 | 1.000000 |        # [Xp] [cc] Electric Field &lt;br /&gt;
 %&lt;br /&gt;
The number of bands in the green function G to build up the GW self-energy is also 40 &lt;br /&gt;
 % GbndRnge    &lt;br /&gt;
 1 | 40 |                 # [GW] G[W] bands range &lt;br /&gt;
 %&lt;br /&gt;
with those parameters we will compute the correction only in the last 2 points of our grid, 28 and 29 and for the states from 3 to 6, setting the input variable &lt;br /&gt;
 %QPkrange                      &lt;br /&gt;
 28 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
You can now run the code using either your input file or the one provided in the Inputs folder &lt;br /&gt;
 $ yambo -F My_inputs/02_GW.in -J GW -C GW&lt;br /&gt;
The run will take some time. Indeed the code has first to compute the dipoles, then the screening within the plasmon pole approximation and finally the self-energy, first the exchange part Gv and then the correlation part G(W-v). &lt;br /&gt;
In the &amp;lt;code&amp;gt;GW&amp;lt;/code&amp;gt; folder you will find the &amp;lt;code&amp;gt;o-GW.qp&amp;lt;/code&amp;gt; file containing the GW corrections.&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &lt;br /&gt;
 #&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #&lt;br /&gt;
  ...&lt;br /&gt;
      29        4      0.000000      0.182291    0.992707 &lt;br /&gt;
      29        5      0.367929      0.597428    -2.431549&lt;br /&gt;
  ...&lt;br /&gt;
Thus it is about 0.60-0.18=0.42  eV (not fully converged).&lt;br /&gt;
&lt;br /&gt;
We can also compute the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; correction for all the k-point of the database. To this end open the input file &#039;&#039;My_inputs/02_GW.in&#039;&#039; (or your own) and edit the number of k-point to be computed &lt;br /&gt;
 %&lt;br /&gt;
 QPkrange                      1 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
Remember to use the same name after the -J option, so that the code will be able to use the informations from the previous run and avoid many calculations. &lt;br /&gt;
 $ yambo -F My_inputs/02_GW.in -J GW -C GW&lt;br /&gt;
In the &#039;&#039;GW&#039;&#039; folder you will find now also the &#039;&#039;o-GW.qp_01&#039;&#039; file containg the GW corrections for all the k-points.&lt;br /&gt;
&lt;br /&gt;
Now you can enter the folder of the 4x4x4 shifted grid&lt;br /&gt;
 cd Solid_GaSb/With_SOC/Yambo/4x4x4_shifted+GAMMA&lt;br /&gt;
and repeat the same calculations. Remember that in the input file you will generate you should change all the band ranges doubling the number of states (do you understand why?) &lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
    1 | 80 |        # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
    1 | 80 |        # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 % QPkrange&lt;br /&gt;
   29 | 29 |   5 | 12|  # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band.&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #  &lt;br /&gt;
   ...   &lt;br /&gt;
       29         8       0.000000    0.251074           0.896306&lt;br /&gt;
       29         9       0.095395    0.647108          -2.334492&lt;br /&gt;
   ...&lt;br /&gt;
Thus it is about 0.65-0.25=0.43 eV (not fully converged). Indeed the same result obtained without SOC. The resulting electronic gap is about 0.49 eV reasonably close to the experimental band gap of 0.72 eV. It is also a big improvement compared to the LDA band gap (approximatively 0.09 eV). This correction will be used, in the form of a scissor operator, as a starting point to compute the optical spectra.&lt;br /&gt;
&lt;br /&gt;
Again we can also compute the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; correction for all the k-point of the database. You can plot column 4 of the output file against column 3 to obtain a picture of the QP corrections. In the following figure we show the plot of the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; correction (E_G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;-E_LDA) vs the LDA eigenvalues. The corrections at the Gamma and the L point are marked with bigger red spots.&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=400px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_GoWo_corrections.png|GaSb QP corrections without SOC &lt;br /&gt;
Image:GaSb GoWo corrections SOC.png|GaSb GoWo corrections with SOC&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
[[File:SOC_GaSb_GoWo_corrections.png|500px|frameless|center]]&lt;br /&gt;
[[File:GaSb GoWo corrections SOC.png|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;scissor operator approach&amp;amp;quot; does not seem a very good approximation for GaSb. Indeed the quasi particle corrections are not constant, especially in the conduction band. For example the correction to the Gamma point is bigger than the corrections to all other k-points. This result however maybe due to the poor covergence parameters. If you would like to better investigate these results you should try do convergence tests. Since QP corrections are poorly sensitive to the spin-orbit interaction it is probably a good idea to do convergence without SOC.&lt;br /&gt;
&lt;br /&gt;
Here we also provide a plot of the band-structure at different levels of approximation: DFT, DFT+scissor, QP. The band structures are obtained from an interpolation of our k-points mesh and it is not very precise since, again, we are using a quite coarse sampling of the brillouine zone. Indeed we can see that already the interpolated DFT band structure deviates from the exact DFT band-structure, which has also been reported. In particular in the region nearby Gamma. However it gives quite nicely an overview of how the QP band structure compares with the DFT band stucture. The main effect is indeed an opening of the band-gap which can be described in terms of a scissor operator.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_yambo.png|500px|center|GaSb QP bands]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the optical properties of GaSb =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--{|&lt;br /&gt;
| [[File:SOC_GaSb_bands.png|600px|center|GaSb bands 1]]&lt;br /&gt;
| [[File:SOC_GaSb_absorption.png|600px|center|GaSb bands 2]]&lt;br /&gt;
|} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now turn our attention on the optical properties of the system. Here we will compute the dielectric function at different levels of approximations:&amp;lt;br /&amp;gt;&lt;br /&gt;
# at the IP-RPA level, thus using the Fermi golden rule with the KS energies and wave-functions&amp;lt;br /&amp;gt;&lt;br /&gt;
# at the RPA level, thus also including the effect of the local fields&amp;lt;br /&amp;gt;&lt;br /&gt;
# at the BSE level, thus including many-body effects, both correcting the KS energies (we will introduce a scissor obtained from the GW calculation) and considering the statically screened electron-hole interaction&lt;br /&gt;
# Run the simulations with SOC using screening databases computed without SOC.&lt;br /&gt;
# Run the simulations in perturbative SOC approach  &lt;br /&gt;
&lt;br /&gt;
First, setup the calculation (initialisation) in the usual way in the folder without SOC&lt;br /&gt;
 $ cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 $ yambo&lt;br /&gt;
and repeat the same inside the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; before continuing.&lt;br /&gt;
&lt;br /&gt;
== RPA-IP absorption ==&lt;br /&gt;
&lt;br /&gt;
Create a local folder inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; which you will call &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt;, and create the input file:&lt;br /&gt;
 &amp;gt;cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o c -V RL -F My_inputs/03_IP-RPA.in&lt;br /&gt;
&lt;br /&gt;
As before, we also provide an input file with suggested parameters for this calculations. The kind of calculation is controlled by the input variable&lt;br /&gt;
 Chimod= &amp;quot;IP&amp;quot;                 # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1            RL    # [Xd] Response block size&lt;br /&gt;
These tells you that we are building up the dielectric function in G-space considering only on G vector, i.e. the G=0 component. The string Chimod= &amp;amp;quot;IP&amp;amp;quot; recalls us that this means we are neglecting the local fields effect.&lt;br /&gt;
&lt;br /&gt;
We set the plane-waves cutoff for the wavefunctions to&lt;br /&gt;
 FFTGvecs=  10  Ry   # [FFT] Plane-waves&lt;br /&gt;
Since we are interested into the optical spectrum calculation, only the Q=0 term, i.e. the first Q-point, is calculated&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
The number of bands we use is 10. This is a reasonable number of states to converge the IP-RPA optical spectrum in the VIS-UV range. (If you wish to calculate the EELS spectrum for q different from 0 probably more bands will be required.)&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 10 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
As you learned the dielectric function is a tensor and in principle three calculations for light polarized along x,y,z chould be done depending on the experimental setup. However GaSb is a system with cubic symmetry, thus any direction is equivalent. Here we decide to compute epsilon along the &amp;amp;quot;(1 1 1)&amp;amp;quot; direction.&lt;br /&gt;
 % LongDrXd&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation using either your input file or the one provided in the Inputs folder&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/03_IP-RPA.in  -J 03_IP-RPA -C 03_IP-RPA&lt;br /&gt;
&lt;br /&gt;
Inside the &amp;lt;code&amp;gt;03_IP-RPA&amp;lt;/code&amp;gt; folder you will find the databases created by the code (in this case just the dipoles), the report file and the output files for the dielectric function which describes the absorption (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;) and for its inverse (&amp;lt;code&amp;gt;o-03_IP-RPA.eel*&amp;lt;/code&amp;gt;), which describes the electron energy loss. You can plot them with your favorite software (for example gnuplot or xmgrace). The real and imaginary parts of the IP-RPA dielectric function are column 3 and 2 respectively of the file (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;). Using also the reference output file in the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; folder you can compare the spectrum with and without SOC.&lt;br /&gt;
&lt;br /&gt;
Now repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 20 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.jpg|600px|center|GaSb absorption RPA]]&lt;br /&gt;
If you wish to obtain a reasonable spectrum however the 6x6x6 kpts grid is not enough. In order to check the convergence with the number of k-points you should generate denser k-points meshes using the input files provided in the Pwscf folder. &lt;br /&gt;
&amp;lt;!-- (see section [[more.php|More on GaSb]] for more advanced calculations).--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the directories Reference_Outputs several RPA dielectric functions are saved with the dielectric function calculated with the 10x10x10 and the 14x14x14 k-grid. You will learn that within RPA spectra the lowest energy peak is under-estimated. Also the spectra with and without SOC look very similar and the SO splitting is almost not present. This is clearly due to the excitonic nature of the E1 peak which can be correctly described only including the electron-hole interaction.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== RPA absorption with local fields ==&lt;br /&gt;
&lt;br /&gt;
To also include the local fields effect you can generate the input with the command: &lt;br /&gt;
 &amp;gt;yambo -o c -k hartree -F My_inputs/04_RPA_LF.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
In the input file we provide you will see that now the chimod and size of the dynamical matrix are set to&lt;br /&gt;
 Chimod= &amp;amp;quot;Hartree&amp;amp;quot;       # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1       Ry    # [Xd] Response block size&lt;br /&gt;
&lt;br /&gt;
Including local fields the poles of absorption will move from KS transitions to many-electrons transitions (although we are still neglecting the electron-hole interaction). As a result you will need more states to converge the absorption spectrum. This is why we set the number of bands to 15:&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 15 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
while as before we will have&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 %&lt;br /&gt;
 LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/04_RPA_LF.in -J 04_RPA_LF -C 04_RPA_LF_out&lt;br /&gt;
&lt;br /&gt;
In the 04_RPA+LF_out folder you will fine the report and the output files as before. The real and imaginary parts of the RPA+LF dielectric function with local fields are column 3 and 2 respectively of the .eps file. While the corresponding IP-RPA spectra is reported in columns 5 and 4.&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 30 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
In the following picture we compare the result of IP-RPA and RPA+LF with SOC.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA_IP_vs_LF.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== BSE absorption with QP corrections ==&lt;br /&gt;
&lt;br /&gt;
A more detailed description of BSE in Yambo is available in the following tutorial: &lt;br /&gt;
[https://wiki.yambo-code.eu/wiki/index.php?title=Calculating%20optical%20spectra%20including%20excitonic%20effects:%20a%20step-by-step%20guide BSE in hBN].&lt;br /&gt;
&lt;br /&gt;
=== Static Screening ===&lt;br /&gt;
&lt;br /&gt;
First we need to obtain the static screening. &lt;br /&gt;
&lt;br /&gt;
This can be done using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s -F My_inputs/05_screening.in&lt;br /&gt;
&lt;br /&gt;
In the resulting input file you can also see the parameters used to compute the static dielectric function needed for the screened Coulomb term (W) of the BSE kernel. Here we use 20 bands and an energy cut-off of 1 Ry.&lt;br /&gt;
&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 20 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 1            Ry    # [Xs] Response block size&lt;br /&gt;
&lt;br /&gt;
Remember to double the number of bands for the case with spin-oribit coupling included. &lt;br /&gt;
&lt;br /&gt;
Then run the file &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F My_inputs/05_screening.in -J screening -C screening&lt;br /&gt;
&lt;br /&gt;
=== BS Kernel and Solver ===&lt;br /&gt;
&lt;br /&gt;
Now we build the BS kernel, and specify the BS kernel solver. Overview of the BSE solvers is available using the following link: [[BSE solvers overview]]. In this tutorial we will use Haydock solver because it is computationally cheaper.&lt;br /&gt;
&lt;br /&gt;
As you probably know the inclusion of the electron-hole interaction makes the approach in G space not feasible. We have thus to compute the dielectric function in the electron-hole space, building up the excitonic hamiltonian. Thus to create the input file you can run the command:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y h -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder. As before you, in the directory Inputs, you can find an example with suggested parameters. The plane-wave cutoffs used to expand wavefunctions is set to 10 Ry, the cut-off on the exchange interaction between the electron and the hole (i.e. for the local-fields) is set to 10 Ry (here we use a much higer value compared to the previous run since the computational cost of increasing this variable in the electron-hole space is very low). and, finally, the cut-off on the direct electron-hole interaction is set to 1 Ry (to build up this term, where the interaction is screened, we need to compute the static dielectric constant in G-space, thus increasing this value is computationally demanding).&lt;br /&gt;
 FFTGvecs= 10     Ry    # [FFT] Plane-waves&lt;br /&gt;
 BSENGexx= 10     Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=  1     Ry    # [BSK] Screened interaction block size&lt;br /&gt;
&lt;br /&gt;
The input variable &amp;amp;quot;KfnQP_E&amp;amp;quot; can be used to include a scissor operator, i.e a opening of the DFT band gap. The value 0.53 eV is the coverged correction at Gamma obtained in the GW run. Here we will calculate the BSE assuming that the &amp;amp;quot;scissor operator approximation&amp;amp;quot; is valid for GaSb (to be checked in principle!) .&lt;br /&gt;
&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 0.530000 &amp;lt;/span&amp;gt; | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
To build up the excitonic matrix we consider the states from 3 to 6, i.e. we are using 2 occupied and 2 unoccupied bands.&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and we will build up the dielectric function using a grid of 200 point in frequency space&lt;br /&gt;
 BEnSteps= 200                # [BSS] Energy steps&lt;br /&gt;
Finally, similarly as before, we will have&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
Remember that the BS kernel is written in the electron-hole space and its size is given by the relation&amp;lt;br /&amp;gt;&lt;br /&gt;
BS kernel size = Valence Bands × Conduction Bands × K-points in the whole BZ.&amp;lt;br /&amp;gt;&lt;br /&gt;
This means that in the case with SO we are building up a matrix 2x2=4 times larger of the corresponding calculation without spin-orbit (you can compare the input in With_SO/Yambo/Inputs / Without_SO/Yambo/Inputs and reference outputs in With_SO/Yambo/Reference_Outputs / With_SO/Yambo/Reference_Outputs)&lt;br /&gt;
&lt;br /&gt;
We are ready to run the BSE calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J &amp;quot;05_BSE,screening&amp;quot; -C 05_BSE&lt;br /&gt;
&lt;br /&gt;
We specify to Yambo the folder which contains calculated static screening, and in &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; the two response files &amp;lt;code&amp;gt; o-05_BSE.eel_q1_haydock_bse &amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-05_BSE.eps_q1_haydock_bse&amp;lt;/code&amp;gt; can be found. In the &#039;&#039;eps file&#039;&#039; the real and imaginary parts of the BSE dielectric function are column 3 and 2 respectively, while the corresponding GW spectra are column 5 and 4.&lt;br /&gt;
&lt;br /&gt;
In the folder &amp;lt;code&amp;gt;screening&amp;lt;/code&amp;gt; you will find instead the DBs of the static screening (W) needed to build up the BSE kernel (&amp;lt;code&amp;gt;ndb.em1s&amp;lt;/code&amp;gt;) and in the folder &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; the BSE matrix (&amp;lt;code&amp;gt;ndb.BS*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 40 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   5 | 12 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
If you do the corresponding calculations for the case without spin-orbits using the databases in the directory GaSb_nSO/YAMBO and inputs in GaSb_nSO/Inputs, the two BSE spectra should look like in this figure:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE_few_kpts.jpg|500px|center|GaSb absorption BSE gew kpts]]&lt;br /&gt;
As mentioned before the two spectra present spurious peaks ( as the first peak!) due to uncoverged k-point sampling. Nevertheless the splitting due to spin-orbit interaction is already visible in the peak around 2.1 eV.&lt;br /&gt;
A more converged (yet not fully converged calculation) would give the following results which compares very nicely with the experimental data:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE.png|500px|center|GaSb absorption BSE]]&lt;br /&gt;
&lt;br /&gt;
=== Using Static Screening without SOC, for the SOC case === &lt;br /&gt;
&lt;br /&gt;
Additionally, a BSE run for the spin-orbit coupling case can be done using the screening computed for the case without spin-orbit coupling. &lt;br /&gt;
&lt;br /&gt;
To do it we can make a symlink from the no-SOC folder:&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt; cd Path/GaSb/With_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt; ln -s Path/GaSb/Without_SOC/YAMBO/6x6x6_shifted/screening screening_no_soc&lt;br /&gt;
&lt;br /&gt;
The BSE kernel can be build and solved using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s -o b -k sex -y h -V qp -F 06_BSE_using_nosoc_screening.in&lt;br /&gt;
&lt;br /&gt;
Here we combined the screening part (-X s) and BSE part (-o b -k sex -y h -V qp). All of the input parameters have been discussed previously. Although, it is important to keep the right matching behind the screening bands used for the no SOC and SOC case.&lt;br /&gt;
&lt;br /&gt;
If for the SOC case the specified screening bands are n1, n2 then for the no-SOC screening the bands should be ((n1-1)/2+1, n2/2). &lt;br /&gt;
&lt;br /&gt;
 # No SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   1 | 20 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and &lt;br /&gt;
 # SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   1 | 40 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The results for the BSE solved using screening used from SOC and no SOC databases is presented below. As we can see, there is almost no difference between them. &lt;br /&gt;
&lt;br /&gt;
[[File:GaSb screening w and wo soc second.png|600px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
= Exciton analysis =&lt;br /&gt;
&lt;br /&gt;
In this part of the tutorial we show how to analyze the origin of the E1 peak in GaSb. Since the calculation with the SOC case is very demanding we will do that only for the case without SOC. So first of all enter the &lt;br /&gt;
&amp;lt;code&amp;gt;Without_SOC/YAMBO/6x6x6_shifted&amp;lt;/code&amp;gt; folder and, if you didn&#039;t before, run the setup:&lt;br /&gt;
 &amp;gt;cd Without_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt;ls SAVE&lt;br /&gt;
 &amp;gt;yambo -J 01_init&lt;br /&gt;
 &amp;gt;ls SAVE r-01_init_setup&lt;br /&gt;
&lt;br /&gt;
Similar to previous section we need to compute the static screening first, and then solve the BSE equation.&lt;br /&gt;
This time we will use the full diagonalization solver to calculate all exciton energies and composition in terms of electron-hole pairs. See [[BSE solvers overview]] for more details. &lt;br /&gt;
&lt;br /&gt;
Then create the &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; folder and the input file for a BSE&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -X s -F My_inputs/05_screening.in&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_screening.in -J screening -C screening &lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y d -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the same parameters you used to compute the absorption with SOC previously. The number of bands will be the half of the case without SOC&lt;br /&gt;
 % BSEBands&lt;br /&gt;
  3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
Also this time you will use the to &amp;lt;code&amp;gt;&amp;amp;quot;d&amp;amp;quot;&amp;lt;/code&amp;gt; and uncomment the variable needed to Write to disk excitonic the WFs:&lt;br /&gt;
 BSSmod= &amp;amp;quot;d&amp;amp;quot;              # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft`&lt;br /&gt;
 WRbsWF                   # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
Then you have to run the BSE calculation (notice that, in case you already computed the BSE spectrum also for the case without SOC, the code can read the results from the provious BSE run skipping many steps)&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J 05_BSE -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; folder you will now find a new database file called &amp;lt;code&amp;gt;ndb.BS_diago_Q01&amp;lt;/code&amp;gt;. This is what you need to analyze the exciton peaks running the post-processing code ypp.&lt;br /&gt;
&lt;br /&gt;
First of all you can run:&lt;br /&gt;
 &amp;gt;ypp -e s -J 05_BSE -C BSE_out&lt;br /&gt;
This run will sort in energy the excitonic eigenvalues writing their oscillator strenghts (see &amp;lt;code&amp;gt;o-06_bse.exc_E_sorted&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Then you can create the ypp input required to analize how each excitonic state is build up in terms of single-particle states:&lt;br /&gt;
 &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE&lt;br /&gt;
Put the index &amp;lt;code&amp;gt;#N&amp;lt;/code&amp;gt; of the exciton with higher strenght in the E_1 peak region&lt;br /&gt;
 &amp;gt;ypp -F My_inputs/05_BSE_ypp.in -J 05_BSE -C 06_BSE_out&lt;br /&gt;
You will find the two files &amp;lt;code&amp;gt;o-06_bse.exc_weights_at_#N&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-06_bse.exc_amplitude_at_#N&amp;lt;/code&amp;gt;. In these files you will find informations on the highest strenght exciton in the E1 peak region.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
= Perturbative SOC approach =&lt;br /&gt;
&lt;br /&gt;
It is possible to include the spin-orbit coupling perturbatively in Yambo.&lt;br /&gt;
&lt;br /&gt;
To first order the perturbation just gives a correction to the DFT eigenvalues and does not touch the wave–functions. Numerically the perturbation need to be applied by mapping the solution of the DFT calculation without SOC into the solution of the DFT calculation with SOC. Once a mapping is defined, the SOC perturbation could be directly applied to the KS energies before solving both the GW scheme and/or the BSE.&lt;br /&gt;
&lt;br /&gt;
All we need is to computed a SOC mapping database given by the following equation (eq 68 in the referenced paper):&lt;br /&gt;
&lt;br /&gt;
EQUATION &lt;br /&gt;
&lt;br /&gt;
Where x, y, z are ... &lt;br /&gt;
&lt;br /&gt;
To build this map, in the folder without spin-orbit coupling we do the following:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; cd Solid_GaSb/Without_SOC/Yambo/6x6xWi6_shifted&lt;br /&gt;
 &amp;gt; mkdir SOC_DBs&lt;br /&gt;
 &amp;gt; cp -r Path/SAVE_GaSb_k6_w_soc SOC_DBs/SAVE&lt;br /&gt;
 &amp;gt; ypp -w &lt;br /&gt;
 &amp;gt; ypp -F map_wfs.in -J SOC_map -C SOC_map&lt;br /&gt;
&lt;br /&gt;
With the following input for &amp;lt;code&amp;gt;map_wfs.in&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 WFs_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 WFs_SOC_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 SOC_DBs= &amp;quot;SOC_DBs&amp;quot;        # Path to the folder containing the DB with SOC&lt;br /&gt;
 SOC_splitting= 0.01 eV    # SOC splitting between the levels&lt;br /&gt;
 % bands_to_map&lt;br /&gt;
   5 | 12 |                # Number of bands to map&lt;br /&gt;
 %&lt;br /&gt;
 bands_buffer=1&lt;br /&gt;
&lt;br /&gt;
Where the SAVE folder with spin-orbit coupling should be saved in a separate folder, and in this case it is in the &amp;lt;code&amp;gt; SOC_DBs &amp;lt;/code&amp;gt; folder. &lt;br /&gt;
Then, the BSE can be computed using the following command &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F 05_BSE+scissor.in -J &amp;quot;BSE_soc_perturbative,screening,SOC_map&amp;quot; -C BSE_soc_perturbative&lt;br /&gt;
&lt;br /&gt;
Where screening was precomputed, and the SOC_map is the one generated in this section. Check BSE section for more details on setting a BSE calculation.&lt;br /&gt;
Not converged results are presented below. &lt;br /&gt;
[[File:GaSb perturbative soc 1.png|600px|thumb|center]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Other excercises =&lt;br /&gt;
&lt;br /&gt;
# Try to converge the G0W0 increasing the polarization RL size, the polarization bands, the number of bands in the Green function and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Try to converge the absorption spectra increasing the polarization RL size, the polarization bands, the number of bands to construct the excitonic matrix and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Plot the EELS spectrum obtained within IP-RPA and RPA with local fields. Also in this case you can check the effect of increasing the polarization bands. You may also try to do a resonant only calculation to see that the EELS cannot be described using only the resonant part of the response function.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;&amp;gt;M. Marsili, A. Molina-Sánchez, M. Palummo, D. Sangalli, A. Marini, [https://doi.org/10.1103/PhysRevB.103.155152  Phys. Rev. B &#039;&#039;&#039;103&#039;&#039;&#039;, 155152 (2021)] ([https://arxiv.org/abs/2103.02266 arXiv 2103.02266])&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wiki&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Gallium_antimonide GaSb on wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;&amp;gt; [https://en.wikipedia.org/wiki/Spin%E2%80%93orbit_interaction#In_atomic_energy_levels Spin-Orbit Interaction on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kim&amp;quot;&amp;gt; Y.S. Kim et al. Phys. Rev. B &#039;&#039;&#039;82&#039;&#039;&#039;, 205212 (2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;rem&amp;quot;&amp;gt; I. N. Remediakis and Efthimios Kaxiras, Phys. Rev. B &#039;&#039;&#039;59&#039;&#039;&#039;, 5336 (1999).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan1&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1002/pssb.200983959 Phys. Sol. State B &#039;&#039;&#039;247&#039;&#039;&#039;, 1960 (2010)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan2&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1103/PhysRevLett.104.157402 Phys. Rev. Lett. &#039;&#039;&#039;104&#039;&#039;&#039;, 157402 (2010)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan3&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1103/PhysRevB.83.155421 Phys. Rev. B 83, &#039;&#039;&#039;155421&#039;&#039;&#039; (2011)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=9022</id>
		<title>SOC</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=9022"/>
		<updated>2025-09-09T15:39:37Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* RPA-IP absorption */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Effect of spin-orbit interaction =&lt;br /&gt;
&lt;br /&gt;
Spin–orbit coupling (SOC) is a relativistic interaction between an electron’s spin and its orbital motion in the crystal potential. Presently, SOC can be included withing GW-BSE approach either perturbatively, or fully, considering the spinorial nature of the electronic wave-function. In this tutorial, we will use both approaches. More details on the theory and comparison between full spinorial GW-BSE and perturbative approach to SOC can be found in the following paper &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;, and in the Wikipedia article&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;/&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To include the spin-orbit coupling we start with many–body total Hamiltonian of the system including first order relativistic corrections. &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 1 many body rel hamiltonian.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where, &amp;lt;math&amp;gt;\hat{H}^{0}&amp;lt;/math&amp;gt; is the non-relativistic one body hamiltonian, &amp;lt;math&amp;gt;\hat{H}^{(e-e)}&amp;lt;/math&amp;gt; is the e-e Coulomb interaction, and &amp;lt;math&amp;gt;\hat{H}^{(RK)} + \hat{H}^{(SOI)}&amp;lt;/math&amp;gt; are the first order relativistic correction, and the last term is the spin-orbit interaction (SOI) in which we are interested in this tutorial. &lt;br /&gt;
&lt;br /&gt;
The SOI term itself is composed of three different components, &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 2 soi term.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; are many-body terms, called &amp;quot;two-electron spin-orbit&amp;quot;, and &amp;quot;spin-other-orbit&amp;quot;, respectively. And,  &amp;lt;math&amp;gt; \hat{H}^{(SOI)} = \hat{H}^{SO(N)} &amp;lt;/math&amp;gt; is &amp;quot;one electron spin-orbit&amp;quot; is a one body term, which is given by: &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 3 one electron spin orbit.png|250px|frameless]]&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;math&amp;gt;\underline{\nu}&amp;lt;/math&amp;gt; a 2x2 matrix in the &amp;lt;math&amp;gt;\uparrow&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\downarrow&amp;lt;/math&amp;gt; spin space, and:&lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 4 v soc.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;\mathbf{\sigma}&amp;lt;/math&amp;gt; is the three dimensional vector whose components are the Pauli matrices. In a plane wave representation the SOC is, in practice, accounted for by the use of pseudopotentials. The SOC contribution from the pseudopotential captures what is called “local SOC”, which is due to the electrons orbiting around the nuclei, it neglects instead the itinerant SOC which can- not be easily captured in periodic boundary conditions. When relativistic corrections are taken into account instead, one should in principle account for the effects of the many–body terms &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt;. A shortcut is to add a term constructed replacing &amp;lt;math&amp;gt;v^{ext}&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;v^{Hxc}&amp;lt;/math&amp;gt; into previous equation. Doing so partially account for &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt;, while &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; is neglected.&lt;br /&gt;
&lt;br /&gt;
= Introduction = &lt;br /&gt;
&lt;br /&gt;
The scope of this tutorial is to calculate the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; corrections to the DFT-LDA band-structure and the BSE optical spectrum for a bulk semiconducting material, gallium antimonide (GaSb) &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;wiki&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;kim&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;rem&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan1&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan2&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan3&amp;quot;/&amp;gt;. We will compare the results with and without the spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DFT band structure =&lt;br /&gt;
&lt;br /&gt;
For this tutorial we provide two state (GS) databases (DBs), one contains the GS-DBs with the effect of SOC included and one without. The idea is to repeat the same calculation for both database and compare the results and the performances of the code. GaSb input files can be downloaded from the following link [https://media.yambo-code.eu/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz], and can be unarchived using the following command: &lt;br /&gt;
&lt;br /&gt;
 $ tar -xzf GaSb.tar.gz&lt;br /&gt;
&lt;br /&gt;
As in the other tutorials, you will find two main folders:&lt;br /&gt;
&lt;br /&gt;
* WSCF – contains the input files for Quantum ESPRESSO, in case you prefer to generate the ground-state databases (GS-DBs) yourself.&lt;br /&gt;
* YAMBO – contains the pre-generated GS-DBs&lt;br /&gt;
* Input - Example of input files &lt;br /&gt;
* References - Example of yambo output files&lt;br /&gt;
&lt;br /&gt;
To avoid continuously switching between the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;With_SOC&amp;lt;/code&amp;gt; directories, we recommend opening two terminals: keep one terminal for the without SOC case and the other for the with SOC case.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s have a look to the content of the folders. For example we can enter in the &amp;lt;code&amp;gt;GaSb/With_SOC/&amp;lt;/code&amp;gt; folder &lt;br /&gt;
 $ cd GaSb/With_SOC/YAMBO&lt;br /&gt;
 $ ls &lt;br /&gt;
 4x4x4_shifted+GAMMA 6x6x6_shifted 10x10x10_shifted 14x14x14_shifted Inputs  Reference_Outputs&lt;br /&gt;
&lt;br /&gt;
Inside the YAMBO folder there are indeed four folders corresponding to four different k-points meshes. In this tutorial we will use the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; folder for the computation of the QP corrections within the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; approximation. It is a k-points grid obtained as the sum of a 4x4x4 k-points grid centered in Gamma and a 4x4x4 grid shifted. Instead for the computation of the optical properties we will use the &amp;lt;code&amp;gt;6x6x6_shifted&amp;lt;/code&amp;gt; folder. It is a 6x6x6 k-points grid shifted from Gamma. The other two folders, &amp;lt;code&amp;gt;10x10x10_shifted&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;14x14x14_shifted&amp;lt;/code&amp;gt; can be used to do a minimum convergence of the optical properties against the number of k-points (pay attention that the BSE calculations with bigger grids will be very memory and time demanding!).&lt;br /&gt;
&lt;br /&gt;
The first part of the tutorial is on the computation of the QP corrections. So let&#039;s enter the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; grid and, as seen in other tutorials run the Initialization:&lt;br /&gt;
&lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA/ &lt;br /&gt;
 $ yambo &lt;br /&gt;
Now compare the result of the two setup runs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; With_SOC Energies and Occupations (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  [02.05] Energies &amp;amp; Occupations&lt;br /&gt;
  ==============================&lt;br /&gt;
&lt;br /&gt;
  [X] === General ===&lt;br /&gt;
  [X] Electronic Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Bosonic    Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Finite Temperature mode                       : no&lt;br /&gt;
  [X] El. density                                   :  0.14622E+24 [cm-3]&lt;br /&gt;
  [X] Fermi Level                                   :  5.085716 [eV]&lt;br /&gt;
&lt;br /&gt;
  [X] === Gaps and Widths ===&lt;br /&gt;
  [X] Conduction Band Min                           :  0.095395 [eV]&lt;br /&gt;
  [X] Valence Band Max                              :  0.000000 [eV]&lt;br /&gt;
  [X] Filled Bands                                  :   8&lt;br /&gt;
  [X] Empty Bands                                   :    9  200&lt;br /&gt;
  [X] Direct Gap                                    :  0.095395 [eV]&lt;br /&gt;
  [X] Direct Gap localized at k                     :  29&lt;br /&gt;
  [X] Indirect Gap                                  :  0.095395 [eV]&lt;br /&gt;
  [X] Indirect Gap between kpts                     :  29  29&lt;br /&gt;
  [X] Last valence band width                       :  3.508355 [eV]&lt;br /&gt;
  [X] 1st conduction band width                     :  3.413699 [eV]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; Without_SOC Energies and Occupations (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  [02.05] Energies &amp;amp; Occupations&lt;br /&gt;
  ==============================&lt;br /&gt;
&lt;br /&gt;
  [X] === General ===&lt;br /&gt;
  [X] Electronic Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Bosonic    Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Finite Temperature mode                       : no&lt;br /&gt;
  [X] El. density                                   :  0.14622E+24 [cm-3]&lt;br /&gt;
  [X] Fermi Level                                   :  4.815616 [eV]&lt;br /&gt;
&lt;br /&gt;
  [X] === Gaps and Widths ===&lt;br /&gt;
  [X] Conduction Band Min                           :  0.367929 [eV]&lt;br /&gt;
  [X] Valence Band Max                              :  0.000000 [eV]&lt;br /&gt;
  [X] Filled Bands                                  :   4&lt;br /&gt;
  [X] Empty Bands                                   :    5  200&lt;br /&gt;
  [X] Direct Gap                                    :  0.367929 [eV]&lt;br /&gt;
  [X] Direct Gap localized at k                     :  29&lt;br /&gt;
  [X] Indirect Gap                                  :  0.367929 [eV]&lt;br /&gt;
  [X] Indirect Gap between kpts                     :  29  29&lt;br /&gt;
  [X] Last valence band width                       :  3.276561 [eV]&lt;br /&gt;
  [X] 1st conduction band width                     :  3.649610 [eV]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A clear shrink of the DFT-LDA gap due to spin-orbit occurs. Note that, having 8 electrons in the fundamental cell, due to the spinorial nature of the wavefunction, with SOC we have 8 occupied bands, while only 4 without. Here a picture of the DFT band structure for the two cases.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_pwscf.png|500px|center|GaSb bands DFT]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the band structure of GaSb =&lt;br /&gt;
 &lt;br /&gt;
Now we will perform a G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; calculation to correct the DFT-LDA bandstructure. We assume that you are already familiar with the concept of screening needed to build up the GW self-energy and thus the QP corrections. Create a local folder &#039;&#039;My_inputs&#039;&#039; and generate the input for a G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; calculation within the plasmon-pole approximation using the following command: &lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA&lt;br /&gt;
 $ mkdir My_inputs&lt;br /&gt;
 $ yambo -p p -g n -V RL -F My_inputs/02_GW.in&lt;br /&gt;
However we also provide an input file with suggested parameters for this calculations inside the folder &#039;&#039;Solid_GaSb/Without_SOC/Yambo/Inputs&#039;&#039;. Remember: these parameters are system dependent and should be converged as you can see other GW tutorials (e.g. [[Silicon|GW on bulk Silicon]] or [[GW on h-BN (standalone)]]). Here we provide reasonable (but not fully converged) parameters to have a low computational cost but yet qualitatively meaningful results.&lt;br /&gt;
&lt;br /&gt;
The plane-waves cutoff for the wavefunctions and exchange part of the self-energy are set to 10 Ry. &lt;br /&gt;
 FFTGvecs =  10 Ry   # [FFT] Plane-waves&lt;br /&gt;
 EXXRLvcs=   10 Ry   # [XX] Exchange RL components&lt;br /&gt;
while we will use 40 bands, a plane-wave cut-off of 1 Ry, and a plasmon-pole energy of 20 eV to build up the screening matrix &lt;br /&gt;
 NGsBlkXp=    1 Ry  # [Xp] Response block size &lt;br /&gt;
 PPAPntXp= 20.  eV  # [Xp] PPA imaginary energy &lt;br /&gt;
 % BndsRnXp    &lt;br /&gt;
 1 | 40 |        # [Xp] Polarization function bands &lt;br /&gt;
 % &lt;br /&gt;
 % LongDrXp  &lt;br /&gt;
 1.000000 | 1.000000 | 1.000000 |        # [Xp] [cc] Electric Field &lt;br /&gt;
 %&lt;br /&gt;
The number of bands in the green function G to build up the GW self-energy is also 40 &lt;br /&gt;
 % GbndRnge    &lt;br /&gt;
 1 | 40 |                 # [GW] G[W] bands range &lt;br /&gt;
 %&lt;br /&gt;
with those parameters we will compute the correction only in the last 2 points of our grid, 28 and 29 and for the states from 3 to 6, setting the input variable &lt;br /&gt;
 %QPkrange                      &lt;br /&gt;
 28 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
You can now run the code using either your input file or the one provided in the Inputs folder &lt;br /&gt;
 $ yambo -F My_inputs/02_GW.in -J GW -C GW&lt;br /&gt;
The run will take some time. Indeed the code has first to compute the dipoles, then the screening within the plasmon pole approximation and finally the self-energy, first the exchange part Gv and then the correlation part G(W-v). &lt;br /&gt;
In the &amp;lt;code&amp;gt;GW&amp;lt;/code&amp;gt; folder you will find the &amp;lt;code&amp;gt;o-GW.qp&amp;lt;/code&amp;gt; file containing the GW corrections.&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &lt;br /&gt;
 #&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #&lt;br /&gt;
  ...&lt;br /&gt;
      29        4      0.000000      0.182291    0.992707 &lt;br /&gt;
      29        5      0.367929      0.597428    -2.431549&lt;br /&gt;
  ...&lt;br /&gt;
Thus it is about 0.60-0.18=0.42  eV (not fully converged).&lt;br /&gt;
&lt;br /&gt;
We can also compute the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; correction for all the k-point of the database. To this end open the input file &#039;&#039;My_inputs/02_GW.in&#039;&#039; (or your own) and edit the number of k-point to be computed &lt;br /&gt;
 %&lt;br /&gt;
 QPkrange                      1 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
Remember to use the same name after the -J option, so that the code will be able to use the informations from the previous run and avoid many calculations. &lt;br /&gt;
 $ yambo -F My_inputs/02_GW.in -J GW -C GW&lt;br /&gt;
In the &#039;&#039;GW&#039;&#039; folder you will find now also the &#039;&#039;o-GW.qp_01&#039;&#039; file containg the GW corrections for all the k-points.&lt;br /&gt;
&lt;br /&gt;
Now you can enter the folder of the 4x4x4 shifted grid&lt;br /&gt;
 cd Solid_GaSb/With_SOC/Yambo/4x4x4_shifted+GAMMA&lt;br /&gt;
and repeat the same calculations. Remember that in the input file you will generate you should change all the band ranges doubling the number of states (do you understand why?) &lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
    1 | 80 |        # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
    1 | 80 |        # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 % QPkrange&lt;br /&gt;
   29 | 29 |   5 | 12|  # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band.&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #  &lt;br /&gt;
   ...   &lt;br /&gt;
       29         8       0.000000    0.251074           0.896306&lt;br /&gt;
       29         9       0.095395    0.647108          -2.334492&lt;br /&gt;
   ...&lt;br /&gt;
Thus it is about 0.65-0.25=0.43 eV (not fully converged). Indeed the same result obtained without SOC. The resulting electronic gap is about 0.49 eV reasonably close to the experimental band gap of 0.72 eV. It is also a big improvement compared to the LDA band gap (approximatively 0.09 eV). This correction will be used, in the form of a scissor operator, as a starting point to compute the optical spectra.&lt;br /&gt;
&lt;br /&gt;
Again we can also compute the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; correction for all the k-point of the database. You can plot column 4 of the output file against column 3 to obtain a picture of the QP corrections. In the following figure we show the plot of the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; correction (E_G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;-E_LDA) vs the LDA eigenvalues. The corrections at the Gamma and the L point are marked with bigger red spots.&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=400px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_GoWo_corrections.png|GaSb QP corrections without SOC &lt;br /&gt;
Image:GaSb GoWo corrections SOC.png|GaSb GoWo corrections with SOC&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
[[File:SOC_GaSb_GoWo_corrections.png|500px|frameless|center]]&lt;br /&gt;
[[File:GaSb GoWo corrections SOC.png|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;scissor operator approach&amp;amp;quot; does not seem a very good approximation for GaSb. Indeed the quasi particle corrections are not constant, especially in the conduction band. For example the correction to the Gamma point is bigger than the corrections to all other k-points. This result however maybe due to the poor covergence parameters. If you would like to better investigate these results you should try do convergence tests. Since QP corrections are poorly sensitive to the spin-orbit interaction it is probably a good idea to do convergence without SOC.&lt;br /&gt;
&lt;br /&gt;
Here we also provide a plot of the band-structure at different levels of approximation: DFT, DFT+scissor, QP. The band structures are obtained from an interpolation of our k-points mesh and it is not very precise since, again, we are using a quite coarse sampling of the brillouine zone. Indeed we can see that already the interpolated DFT band structure deviates from the exact DFT band-structure, which has also been reported. In particular in the region nearby Gamma. However it gives quite nicely an overview of how the QP band structure compares with the DFT band stucture. The main effect is indeed an opening of the band-gap which can be described in terms of a scissor operator.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_yambo.png|500px|center|GaSb QP bands]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the optical properties of GaSb =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--{|&lt;br /&gt;
| [[File:SOC_GaSb_bands.png|600px|center|GaSb bands 1]]&lt;br /&gt;
| [[File:SOC_GaSb_absorption.png|600px|center|GaSb bands 2]]&lt;br /&gt;
|} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now turn our attention on the optical properties of the system. Here we will compute the dielectric function at different levels of approximations:&amp;lt;br /&amp;gt;&lt;br /&gt;
# at the IP-RPA level, thus using the Fermi golden rule with the KS energies and wave-functions&amp;lt;br /&amp;gt;&lt;br /&gt;
# at the RPA level, thus also including the effect of the local fields&amp;lt;br /&amp;gt;&lt;br /&gt;
# at the BSE level, thus including many-body effects, both correcting the KS energies (we will introduce a scissor obtained from the GW calculation) and considering the statically screened electron-hole interaction&lt;br /&gt;
# Run the simulations with SOC using screening databases computed without SOC.&lt;br /&gt;
# Run the simulations in perturbative SOC approach  &lt;br /&gt;
&lt;br /&gt;
First, setup the calculation (initialisation) in the usual way in the folder without SOC&lt;br /&gt;
 $ cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 $ yambo&lt;br /&gt;
and repeat the same inside the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; before continuing.&lt;br /&gt;
&lt;br /&gt;
== RPA-IP absorption ==&lt;br /&gt;
&lt;br /&gt;
Create a local folder inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; which you will call &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt;, and create the input file:&lt;br /&gt;
 &amp;gt;cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o c -V RL -F My_inputs/03_IP-RPA.in&lt;br /&gt;
&lt;br /&gt;
As before, we also provide an input file with suggested parameters for this calculations. The kind of calculation is controlled by the input variable&lt;br /&gt;
 Chimod= &amp;quot;IP&amp;quot;                 # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1            RL    # [Xd] Response block size&lt;br /&gt;
These tells you that we are building up the dielectric function in G-space considering only on G vector, i.e. the G=0 component. The string Chimod= &amp;amp;quot;IP&amp;amp;quot; recalls us that this means we are neglecting the local fields effect.&lt;br /&gt;
&lt;br /&gt;
We set the plane-waves cutoff for the wavefunctions to&lt;br /&gt;
 FFTGvecs=  10  Ry   # [FFT] Plane-waves&lt;br /&gt;
Since we are interested into the optical spectrum calculation, only the Q=0 term, i.e. the first Q-point, is calculated&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
The number of bands we use is 10. This is a reasonable number of states to converge the IP-RPA optical spectrum in the VIS-UV range. (If you wish to calculate the EELS spectrum for q different from 0 probably more bands will be required.)&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 10 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
As you learned the dielectric function is a tensor and in principle three calculations for light polarized along x,y,z chould be done depending on the experimental setup. However GaSb is a system with cubic symmetry, thus any direction is equivalent. Here we decide to compute epsilon along the &amp;amp;quot;(1 1 1)&amp;amp;quot; direction.&lt;br /&gt;
 % LongDrXd&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation using either your input file or the one provided in the Inputs folder&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/03_IP-RPA.in  -J 03_IP-RPA -C 03_IP-RPA&lt;br /&gt;
&lt;br /&gt;
Inside the &amp;lt;code&amp;gt;03_IP-RPA&amp;lt;/code&amp;gt; folder you will find the databases created by the code (in this case just the dipoles), the report file and the output files for the dielectric function which describes the absorption (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;) and for its inverse (&amp;lt;code&amp;gt;o-03_IP-RPA.eel*&amp;lt;/code&amp;gt;), which describes the electron energy loss. You can plot them with your favorite software (for example gnuplot or xmgrace). The real and imaginary parts of the IP-RPA dielectric function are column 3 and 2 respectively of the file (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;). Using also the reference output file in the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; folder you can compare the spectrum with and without SOC.&lt;br /&gt;
&lt;br /&gt;
Now repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 20 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.jpg|600px|center|GaSb absorption RPA]]&lt;br /&gt;
If you wish to obtain a reasonable spectrum however the 6x6x6 kpts grid is not enough. In order to check the convergence with the number of k-points you should generate denser k-points meshes using the input files provided in the Pwscf folder. &lt;br /&gt;
&amp;lt;!-- (see section [[more.php|More on GaSb]] for more advanced calculations).--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the directories Reference_Outputs several RPA dielectric functions are saved with the dielectric function calculated with the 10x10x10 and the 14x14x14 k-grid. You will learn that within RPA spectra the lowest energy peak is under-estimated. Also the spectra with and without SOC look very similar and the SO splitting is almost not present. This is clearly due to the excitonic nature of the E1 peak which can be correctly described only including the electron-hole interaction.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== RPA absorption with local fields ==&lt;br /&gt;
&lt;br /&gt;
To also include the local fields effect you can generate the input with the command: &lt;br /&gt;
 &amp;gt;yambo -o c -k hartree -F My_inputs/04_RPA_LF.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
In the input file we provide you will see that now the chimod and size of the dynamical matrix are set to&lt;br /&gt;
 Chimod= &amp;amp;quot;Hartree&amp;amp;quot;       # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1       Ry    # [Xd] Response block size&lt;br /&gt;
&lt;br /&gt;
Including local fields the poles of absorption will move from KS transitions to many-electrons transitions (although we are still neglecting the electron-hole interaction). As a result you will need more states to converge the absorption spectrum. This is why we set the number of bands to 15:&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 15 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
while as before we will have&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 %&lt;br /&gt;
 LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/04_RPA_LF.in -J 04_RPA_LF -C 04_RPA_LF_out&lt;br /&gt;
&lt;br /&gt;
In the 04_RPA+LF_out folder you will fine the report and the output files as before. The real and imaginary parts of the RPA+LF dielectric function with local fields are column 3 and 2 respectively of the .eps file. While the corresponding IP-RPA spectra is reported in columns 5 and 4.&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 30 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
In the following picture we compare the result of IP-RPA and RPA+LF with SOC.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA_IP_vs_LF.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== BSE absorption with QP corrections ==&lt;br /&gt;
&lt;br /&gt;
A more detailed description of BSE in Yambo is available in the following tutorial: &lt;br /&gt;
[https://wiki.yambo-code.eu/wiki/index.php?title=Calculating%20optical%20spectra%20including%20excitonic%20effects:%20a%20step-by-step%20guide BSE in hBN].&lt;br /&gt;
&lt;br /&gt;
=== Static Screening ===&lt;br /&gt;
&lt;br /&gt;
First we need to obtain the static screening. &lt;br /&gt;
&lt;br /&gt;
This can be done using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s -F My_inputs/05_screening.in&lt;br /&gt;
&lt;br /&gt;
In the resulting input file you can also see the parameters used to compute the static dielectric function needed for the screened Coulomb term (W) of the BSE kernel. Here we use 20 bands and an energy cut-off of 1 Ry.&lt;br /&gt;
&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 20 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 1            Ry    # [Xs] Response block size&lt;br /&gt;
&lt;br /&gt;
Remember to double the number of bands for the case with spin-oribit coupling included. &lt;br /&gt;
&lt;br /&gt;
Then run the file &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F My_inputs/05_screening.in -J screening -C screening&lt;br /&gt;
&lt;br /&gt;
=== BS Kernel and Solver ===&lt;br /&gt;
&lt;br /&gt;
Now we build the BS kernel, and specify the BS kernel solver. Overview of the BSE solvers is available using the following link: [[BSE solvers overview]]. In this tutorial we will use Haydock solver because it is computationally cheaper.&lt;br /&gt;
&lt;br /&gt;
As you probably know the inclusion of the electron-hole interaction makes the approach in G space not feasible. We have thus to compute the dielectric function in the electron-hole space, building up the excitonic hamiltonian. Thus to create the input file you can run the command:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y h -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder. As before you, in the directory Inputs, you can find an example with suggested parameters. The plane-wave cutoffs used to expand wavefunctions is set to 10 Ry, the cut-off on the exchange interaction between the electron and the hole (i.e. for the local-fields) is set to 10 Ry (here we use a much higer value compared to the previous run since the computational cost of increasing this variable in the electron-hole space is very low). and, finally, the cut-off on the direct electron-hole interaction is set to 1 Ry (to build up this term, where the interaction is screened, we need to compute the static dielectric constant in G-space, thus increasing this value is computationally demanding).&lt;br /&gt;
 FFTGvecs= 10     Ry    # [FFT] Plane-waves&lt;br /&gt;
 BSENGexx= 10     Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=  1     Ry    # [BSK] Screened interaction block size&lt;br /&gt;
&lt;br /&gt;
The input variable &amp;amp;quot;KfnQP_E&amp;amp;quot; can be used to include a scissor operator, i.e a opening of the DFT band gap. The value 0.53 eV is the coverged correction at Gamma obtained in the GW run. Here we will calculate the BSE assuming that the &amp;amp;quot;scissor operator approximation&amp;amp;quot; is valid for GaSb (to be checked in principle!) .&lt;br /&gt;
&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 0.530000 &amp;lt;/span&amp;gt; | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
To build up the excitonic matrix we consider the states from 3 to 6, i.e. we are using 2 occupied and 2 unoccupied bands.&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and we will build up the dielectric function using a grid of 200 point in frequency space&lt;br /&gt;
 BEnSteps= 200                # [BSS] Energy steps&lt;br /&gt;
Finally, similarly as before, we will have&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
Remember that the BS kernel is written in the electron-hole space and its size is given by the relation&amp;lt;br /&amp;gt;&lt;br /&gt;
BS kernel size = Valence Bands × Conduction Bands × K-points in the whole BZ.&amp;lt;br /&amp;gt;&lt;br /&gt;
This means that in the case with SO we are building up a matrix 2x2=4 times larger of the corresponding calculation without spin-orbit (you can compare the input in With_SO/Yambo/Inputs / Without_SO/Yambo/Inputs and reference outputs in With_SO/Yambo/Reference_Outputs / With_SO/Yambo/Reference_Outputs)&lt;br /&gt;
&lt;br /&gt;
We are ready to run the BSE calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J &amp;quot;05_BSE,screening&amp;quot; -C 05_BSE&lt;br /&gt;
&lt;br /&gt;
We specify to Yambo the folder which contains calculated static screening, and in &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; the two response files &amp;lt;code&amp;gt; o-05_BSE.eel_q1_haydock_bse &amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-05_BSE.eps_q1_haydock_bse&amp;lt;/code&amp;gt; can be found. In the &#039;&#039;eps file&#039;&#039; the real and imaginary parts of the BSE dielectric function are column 3 and 2 respectively, while the corresponding GW spectra are column 5 and 4.&lt;br /&gt;
&lt;br /&gt;
In the folder &amp;lt;code&amp;gt;screening&amp;lt;/code&amp;gt; you will find instead the DBs of the static screening (W) needed to build up the BSE kernel (&amp;lt;code&amp;gt;ndb.em1s&amp;lt;/code&amp;gt;) and in the folder &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; the BSE matrix (&amp;lt;code&amp;gt;ndb.BS*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 40 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   5 | 12 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
If you do the corresponding calculations for the case without spin-orbits using the databases in the directory GaSb_nSO/YAMBO and inputs in GaSb_nSO/Inputs, the two BSE spectra should look like in this figure:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE_few_kpts.jpg|500px|center|GaSb absorption BSE gew kpts]]&lt;br /&gt;
As mentioned before the two spectra present spurious peaks ( as the first peak!) due to uncoverged k-point sampling. Nevertheless the splitting due to spin-orbit interaction is already visible in the peak around 2.1 eV.&lt;br /&gt;
A more converged (yet not fully converged calculation) would give the following results which compares very nicely with the experimental data:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE.png|500px|center|GaSb absorption BSE]]&lt;br /&gt;
&lt;br /&gt;
=== Using Static Screening without SOC, for the SOC case === &lt;br /&gt;
&lt;br /&gt;
Additionally, a BSE run for the spin-orbit coupling case can be done using the screening computed for the case without spin-orbit coupling. &lt;br /&gt;
&lt;br /&gt;
To do it we can make a symlink from the no-SOC folder:&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt; cd Path/GaSb/With_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt; ln -s Path/GaSb/Without_SOC/YAMBO/6x6x6_shifted/screening screening_no_soc&lt;br /&gt;
&lt;br /&gt;
The BSE kernel can be build and solved using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s -o b -k sex -y h -V qp -F 06_BSE_using_nosoc_screening.in&lt;br /&gt;
&lt;br /&gt;
Here we combined the screening part (-X s) and BSE part (-o b -k sex -y h -V qp). All of the input parameters have been discussed previously. Although, it is important to keep the right matching behind the screening bands used for the no SOC and SOC case.&lt;br /&gt;
&lt;br /&gt;
If for the SOC case the specified screening bands are n1, n2 then for the no-SOC screening the bands should be ((n1-1)/2+1, n2/2). &lt;br /&gt;
&lt;br /&gt;
 # No SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   1 | 20 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and &lt;br /&gt;
 # SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   1 | 40 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The results for the BSE solved using screening used from SOC and no SOC databases is presented below. As we can see, there is almost no difference between them. &lt;br /&gt;
&lt;br /&gt;
[[File:GaSb screening w and wo soc second.png|600px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
= Exciton analysis =&lt;br /&gt;
&lt;br /&gt;
In this part of the tutorial we show how to analyze the origin of the E1 peak in GaSb. Since the calculation with the SOC case is very demanding we will do that only for the case without SOC. So first of all enter the &lt;br /&gt;
&amp;lt;code&amp;gt;Without_SOC/YAMBO/6x6x6_shifted&amp;lt;/code&amp;gt; folder and, if you didn&#039;t before, run the setup:&lt;br /&gt;
 &amp;gt;cd Without_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt;ls SAVE&lt;br /&gt;
 &amp;gt;yambo -J 01_init&lt;br /&gt;
 &amp;gt;ls SAVE r-01_init_setup&lt;br /&gt;
&lt;br /&gt;
Similar to previous section we need to compute the static screening first, and then solve the BSE equation.&lt;br /&gt;
This time we will use the full diagonalization solver to calculate all exciton energies and composition in terms of electron-hole pairs. See [[BSE solvers overview]] for more details. &lt;br /&gt;
&lt;br /&gt;
Then create the &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; folder and the input file for a BSE&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -X s -F My_inputs/05_screening.in&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_screening.in -J screening -C screening &lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y d -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the same parameters you used to compute the absorption with SOC previously. The number of bands will be the half of the case without SOC&lt;br /&gt;
 % BSEBands&lt;br /&gt;
  3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
Also this time you will use the to &amp;lt;code&amp;gt;&amp;amp;quot;d&amp;amp;quot;&amp;lt;/code&amp;gt; and uncomment the variable needed to Write to disk excitonic the WFs:&lt;br /&gt;
 BSSmod= &amp;amp;quot;d&amp;amp;quot;              # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft`&lt;br /&gt;
 WRbsWF                   # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
Then you have to run the BSE calculation (notice that, in case you already computed the BSE spectrum also for the case without SOC, the code can read the results from the provious BSE run skipping many steps)&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J 05_BSE -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; folder you will now find a new database file called &amp;lt;code&amp;gt;ndb.BS_diago_Q01&amp;lt;/code&amp;gt;. This is what you need to analyze the exciton peaks running the post-processing code ypp.&lt;br /&gt;
&lt;br /&gt;
First of all you can run:&lt;br /&gt;
 &amp;gt;ypp -e s -J 05_BSE -C BSE_out&lt;br /&gt;
This run will sort in energy the excitonic eigenvalues writing their oscillator strenghts (see &amp;lt;code&amp;gt;o-06_bse.exc_E_sorted&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Then you can create the ypp input required to analize how each excitonic state is build up in terms of single-particle states:&lt;br /&gt;
 &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE&lt;br /&gt;
Put the index &amp;lt;code&amp;gt;#N&amp;lt;/code&amp;gt; of the exciton with higher strenght in the E_1 peak region&lt;br /&gt;
 &amp;gt;ypp -F My_inputs/05_BSE_ypp.in -J 05_BSE -C 06_BSE_out&lt;br /&gt;
You will find the two files &amp;lt;code&amp;gt;o-06_bse.exc_weights_at_#N&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-06_bse.exc_amplitude_at_#N&amp;lt;/code&amp;gt;. In these files you will find informations on the highest strenght exciton in the E1 peak region.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
= Perturbative SOC approach =&lt;br /&gt;
&lt;br /&gt;
It is possible to include the spin-orbit coupling perturbatively in Yambo.&lt;br /&gt;
&lt;br /&gt;
To first order the perturbation just gives a correction to the DFT eigenvalues and does not touch the wave–functions. Numerically the perturbation need to be applied by mapping the solution of the DFT calculation without SOC into the solution of the DFT calculation with SOC. Once a mapping is defined, the SOC perturbation could be directly applied to the KS energies before solving both the GW scheme and/or the BSE.&lt;br /&gt;
&lt;br /&gt;
All we need is to computed a SOC mapping database given by the following equation (eq 68 in the referenced paper):&lt;br /&gt;
&lt;br /&gt;
EQUATION &lt;br /&gt;
&lt;br /&gt;
Where x, y, z are ... &lt;br /&gt;
&lt;br /&gt;
To build this map, in the folder without spin-orbit coupling we do the following:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; cd Solid_GaSb/Without_SOC/Yambo/6x6xWi6_shifted&lt;br /&gt;
 &amp;gt; mkdir SOC_DBs&lt;br /&gt;
 &amp;gt; cp -r Path/SAVE_GaSb_k6_w_soc SOC_DBs/SAVE&lt;br /&gt;
 &amp;gt; ypp -w &lt;br /&gt;
 &amp;gt; ypp -F map_wfs.in -J SOC_map -C SOC_map&lt;br /&gt;
&lt;br /&gt;
With the following input for &amp;lt;code&amp;gt;map_wfs.in&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 WFs_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 WFs_SOC_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 SOC_DBs= &amp;quot;SOC_DBs&amp;quot;        # Path to the folder containing the DB with SOC&lt;br /&gt;
 SOC_splitting= 0.01 eV    # SOC splitting between the levels&lt;br /&gt;
 % bands_to_map&lt;br /&gt;
   5 | 12 |                # Number of bands to map&lt;br /&gt;
 %&lt;br /&gt;
 bands_buffer=1&lt;br /&gt;
&lt;br /&gt;
Where the SAVE folder with spin-orbit coupling should be saved in a separate folder, and in this case it is in the &amp;lt;code&amp;gt; SOC_DBs &amp;lt;/code&amp;gt; folder. &lt;br /&gt;
Then, the BSE can be computed using the following command &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F 05_BSE+scissor.in -J &amp;quot;BSE_soc_perturbative,screening,SOC_map&amp;quot; -C BSE_soc_perturbative&lt;br /&gt;
&lt;br /&gt;
Where screening was precomputed, and the SOC_map is the one generated in this section. Check BSE section for more details on setting a BSE calculation.&lt;br /&gt;
Not converged results are presented below. &lt;br /&gt;
[[File:GaSb perturbative soc 1.png|600px|thumb|center]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Other excercises =&lt;br /&gt;
&lt;br /&gt;
# Try to converge the G0W0 increasing the polarization RL size, the polarization bands, the number of bands in the Green function and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Try to converge the absorption spectra increasing the polarization RL size, the polarization bands, the number of bands to construct the excitonic matrix and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Plot the EELS spectrum obtained within IP-RPA and RPA with local fields. Also in this case you can check the effect of increasing the polarization bands. You may also try to do a resonant only calculation to see that the EELS cannot be described using only the resonant part of the response function.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;&amp;gt;M. Marsili, A. Molina-Sánchez, M. Palummo, D. Sangalli, A. Marini, [https://doi.org/10.1103/PhysRevB.103.155152  Phys. Rev. B &#039;&#039;&#039;103&#039;&#039;&#039;, 155152 (2021)] ([https://arxiv.org/abs/2103.02266 arXiv 2103.02266])&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wiki&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Gallium_antimonide GaSb on wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;&amp;gt; [https://en.wikipedia.org/wiki/Spin%E2%80%93orbit_interaction#In_atomic_energy_levels Spin-Orbit Interaction on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kim&amp;quot;&amp;gt; Y.S. Kim et al. Phys. Rev. B &#039;&#039;&#039;82&#039;&#039;&#039;, 205212 (2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;rem&amp;quot;&amp;gt; I. N. Remediakis and Efthimios Kaxiras, Phys. Rev. B &#039;&#039;&#039;59&#039;&#039;&#039;, 5336 (1999).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan1&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1002/pssb.200983959 Phys. Sol. State B &#039;&#039;&#039;247&#039;&#039;&#039;, 1960 (2010)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan2&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1103/PhysRevLett.104.157402 Phys. Rev. Lett. &#039;&#039;&#039;104&#039;&#039;&#039;, 157402 (2010)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan3&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1103/PhysRevB.83.155421 Phys. Rev. B 83, &#039;&#039;&#039;155421&#039;&#039;&#039; (2011)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Nonequilibrium_absorption_in_bulk_silicon&amp;diff=9021</id>
		<title>Nonequilibrium absorption in bulk silicon</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Nonequilibrium_absorption_in_bulk_silicon&amp;diff=9021"/>
		<updated>2025-09-08T14:21:43Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* Generating non-equilibrium carriers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will learn the basic concepts for computing changes in the optical properties of a semi-conductor in presence of a non-equilibrium electrons and holes distribution in conduction and valence band respectively. This tutorial is based on the results published in Phys. Rev. B&amp;lt;ref name=&amp;quot;sangalli2016&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Under construction&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= The material: Silicon =&lt;br /&gt;
&lt;br /&gt;
We will study nonequilibrium absorption in bulk silicon. The same material used for this [[Silicon|GW tutorial]] &lt;br /&gt;
&lt;br /&gt;
* [http://cst-www.nrl.navy.mil/lattice/struk/a1.html FCC] lattice&lt;br /&gt;
* Two atoms per cell (8 electrons)&lt;br /&gt;
* Lattice constant 10.183 [a.u.]&lt;br /&gt;
* Plane waves cutoff 15 Rydberg&lt;br /&gt;
* Direct gap   3.4 eV at Gamma&lt;br /&gt;
* Indirect gap 1.1 eV between Gamma= (0 0 0) and a point X&#039;, close to X=(0 1 0)&lt;br /&gt;
&lt;br /&gt;
[[File:si_banddiagram.gif|thumb|x400px|Silicon Band Structure]]&lt;br /&gt;
&lt;br /&gt;
= Tutorial files and Tutorial structure =&lt;br /&gt;
Follow the instructions in [[Tutorials download]] and download/unpack the &amp;lt;code&amp;gt;Silicon.tar.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
Once the tutorial archive file is unzipped the following folder structure will appear&lt;br /&gt;
 COPYING  README  Silicon/&lt;br /&gt;
&lt;br /&gt;
with the Solid_Si folder containing&lt;br /&gt;
 &amp;gt; ls Silicon/ &lt;br /&gt;
 PWSCF/  YAMBO/&lt;br /&gt;
&lt;br /&gt;
In the Pwscf folder  the student will find an input/output directory with input/output files for pw.x. The Silicon pseudopotential file is also provided.&lt;br /&gt;
 &amp;gt; ls PWSCF/&lt;br /&gt;
 convergence_scripts  input  output  psps&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;convergence_scripts&amp;lt;/code&amp;gt; you will find some useful shell scripts to run the ground state convergence runs for Silicon.&lt;br /&gt;
The YAMBO folder contains the Yambo input/output files and core databases.&lt;br /&gt;
 &amp;gt; ls YAMBO/&lt;br /&gt;
 2x2x2/  4x4x4/  6x6x6/  8x8x8/  Convergence_Plots_and_Scripts/  GAMMA/&lt;br /&gt;
&lt;br /&gt;
The core databases are provided for several k-points grids. In addition the folder &amp;lt;code&amp;gt;Convergence_Plots_and_Scripts&amp;lt;/code&amp;gt; contains some scripts used for the [Silicon|GW tutorial] .&lt;br /&gt;
Here we will just use the 8x8x8 (which is still very far from convergence) folder for computing (nonequilibrium) optical properties.&lt;br /&gt;
&lt;br /&gt;
To run the tutorial you will need the standard executables&lt;br /&gt;
 yambo&lt;br /&gt;
 ypp &lt;br /&gt;
plus the executables of the real time module of the Yambo code&lt;br /&gt;
 yambo_rt&lt;br /&gt;
 ypp_rt&lt;br /&gt;
&lt;br /&gt;
= Overview of the simulations in this tutorial= &lt;br /&gt;
We start from a density-functional theory (DFT) calculation as the foundation. As a first demonstrative step, we will solve the Bethe-Salpeter equation (BSE) for the equilibrium case without including quasiparticle (QP) corrections. Once this is completed, we will use the Yambo post-processing module, &amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt;, to generate a distribution of non-equilibrium carriers. This distribution will be used in all subsequent non-equilibrium (NEQ) calculations. It is important to note that solving the non-equilibrium BSE is not feasible within the GW plasmon pole approximation. To address this limitation, we will instead solve the BSE for the equilibrium case and apply corrections to the energy values using a non-equilibrium COHSEX calculation.&lt;br /&gt;
&lt;br /&gt;
The QP band structure will show the effect of the screened electron-electron interaction, while the absorption spectrum within the BSE accounts for the effect of the electron-hole interaction. When QP corrections are not available, they can be included using the scissor operator &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt;, and the numerical values for &amp;quot;corrections&amp;quot; can be deduced from a GW calculation. For more information about solving the Equilibrium BSE equation refer to the following tutorial: [https://wiki.yambo-code.eu/wiki/index.php/Calculating%20optical%20spectra%20including%20excitonic%20effects:%20a%20step-by-step%20guide Calculating optical spectra including excitonic effects: a step-by-step guide]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; List of Steps Executed in This Module (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
# Equilibrium BSE Calculation (Demonstrative)  &lt;br /&gt;
# Generating non-equilibrium carriers &lt;br /&gt;
# Equilibrium and non-equilibrium COHSEX calculations &lt;br /&gt;
# Calculation of QP-PPA corrections to Silicon (Optional) &lt;br /&gt;
# Non-Equilibrium BSE Calculation&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The run of all the files in this tutorial should take around 2-5 minutes in total. In case a faster run is needed, results from a lower kgrid can be used, or some converged criteria can be used, for example lowering the &amp;lt;code&amp;gt;NGsBlkXs&amp;lt;/code&amp;gt; and/or &amp;lt;code&amp;gt;NGsBlkXp&amp;lt;/code&amp;gt;, or lowering the number of conduction bands used in the calculations.&lt;br /&gt;
&lt;br /&gt;
= Equilibrium optical properties =&lt;br /&gt;
&lt;br /&gt;
In this part, we will solve the equilibrium BSE calculation without quasiparticle corrections. &lt;br /&gt;
&lt;br /&gt;
Enter the folder 8x8x8, and initialize yambo in the respective folder &lt;br /&gt;
 $ cd 8x8x8&lt;br /&gt;
 $ yambo&lt;br /&gt;
&lt;br /&gt;
== Static screening at equilibrium ==&lt;br /&gt;
&lt;br /&gt;
First, to solve the BSE equation we need to calculate the statically screened electron-electron interaction (W), which is related to static dielectric screening &amp;lt;math&amp;gt; \epsilon^{-1} &amp;lt;/math&amp;gt;. &lt;br /&gt;
&amp;lt;!--&amp;lt;math&amp;gt; \Large&lt;br /&gt;
\epsilon^{-1}_{\mathbf{G},\mathbf{G&#039;}} (\mathbf{q}, \omega = 0) = \delta_{\mathbf{G},\mathbf{G&#039;}} + v(\mathbf{v} + \mathbf{G}) \chi_{\mathbf{G},\mathbf{G&#039;}(\mathbf{q}}, \omega = 0)&amp;lt;/math&amp;gt;--&amp;gt;&lt;br /&gt;
[[File:Static dielectric screening.png|550px|frameless|left]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To do this create the following input file: &lt;br /&gt;
 $ yambo -X s -F 01_EQ_BSE_screening.in&lt;br /&gt;
&lt;br /&gt;
with the following contents: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 01_EQ_BSE_screening.in file (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 em1s                                 # [R][Xs] Statically Screened Interaction&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 |  30 |                         # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 3000                   mRy    # [Xs] Response block size&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |    # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where we changed the response block size &amp;lt;code&amp;gt;NGsBlkXs = 3000 mRy&amp;lt;/code&amp;gt; and number of polarization function bands &amp;lt;code&amp;gt;BndsRnXs&amp;lt;/code&amp;gt; to be in the range of 1 to 30. Now run the file:&lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 01_EQ_BSE_screening.in -J EQ_BSE&lt;br /&gt;
&lt;br /&gt;
== Solving the Bethe-Salpeter equation == &lt;br /&gt;
To solve the (equilibrium) Bethe-Salpeter equation, the latter is usually rewritten in the space of transitions between valence and conduction states as the (pseudo)eigenvalue problem for a two-particle Hamiltonian. In the &amp;lt;math&amp;gt; q = 0 &amp;lt;/math&amp;gt; limit, the two-particle Hamiltonian matrix elements are given by:&lt;br /&gt;
&amp;lt;!--&amp;lt;math&amp;gt; \widetilde{H}_{ll&#039;} = \widetilde{\varepsilon}_l - \sqrt{\widetilde{f}_l} \left( v_{ll&#039;} - \widetilde{W}^{s}_{ll&#039;} \right) \sqrt{\widetilde{f}_{l&#039;}} &amp;lt;/math&amp;gt; --&amp;gt;&lt;br /&gt;
[[File:H_eq_bse_2016.png|310px|frameless|left]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where compact notation  &amp;lt;math&amp;gt; l = \{mn\mathbf{k}\} &amp;lt;/math&amp;gt;, was introduced, and quantities with a tilde represent the corresponding quantity evaluated at equilibrium. &lt;br /&gt;
&lt;br /&gt;
For equilibrium occupation factor and energy (KS or QP corrected KS energies): &lt;br /&gt;
[[File:Equilibrium occ factor.png|160px|frameless|left|Equilibrium occupation factor]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Epsilon eng l.png|160px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Moreover, it was defined: &lt;br /&gt;
[[File:W ss.png|300px|frameless|left]] &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:V ss.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;math&amp;gt;\widetilde{W}_{GG&#039;}(\mathbf{q}, 0)&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;v_{G}(\mathbf{q})&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt; \rho_{nm\mathbf{k}, G}(\mathbf{q})&amp;lt;/math&amp;gt; are static approximation to the screened interaction, bare Coulomb interaction, and KS response function respectively. After calculating the equilibrium Bethe-Salpeter kernel, the resulting two-particle Hamiltonian can be diagonalized to compute the macroscopic dielectric function, which can be used to get absorption and EELS spectra. Calculation of BS kernel and diagonalization of Hamiltonian can be done in one step. For a more detailed description please consult  Phis. Rev. B 93, 195205 (2016). &lt;br /&gt;
&lt;br /&gt;
To generate the input file for the calculation of BSE kernel, run the following command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -o b -k sex -F 02_EQ_BSE_kernel_diag.in -y h -V qp -J EQ_BSE&lt;br /&gt;
&lt;br /&gt;
with the following input&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 02_EQ_BSE_kernel_diag.in file (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 15000            mRy    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BSEBands&lt;br /&gt;
    2 |  7 |                         # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 % BEnRange&lt;br /&gt;
   2.20000 | 5.00000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  0.70000 | 1.000000 | 1.000000 |      # [EXTQP BSK BSS] E parameters (c/v)&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/...&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where the value of &amp;lt;code&amp;gt;BSENGexx&amp;lt;/code&amp;gt; was changed for better convergence, &amp;lt;code&amp;gt;BSEBands&amp;lt;/code&amp;gt; was changed to include bands from 2 to 7, which defines the basis of quasiparticle pairs that are used to describe excitons. 3 degenerate valence and 3 degenerate conduction bands where included. &amp;lt;code&amp;gt;BEnRange&amp;lt;/code&amp;gt; was changed to 2.2-5.5 eV to match experimental data, and &amp;lt;code&amp;gt;BEnSteps&amp;lt;/code&amp;gt; was increased from 100 to 200. The scissors operator &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt; was used to match the possiton calculated spectra with experimental values. The Haydock BSE solver was chosen, &amp;lt;code&amp;gt;-y h&amp;lt;/code&amp;gt; option, because it is substantially cheaper than the full diagonalization (quadratic with the number of electron-hole pairs). However, this approach does not provide the individual exciton energies and composition in terms of electron-hole pairs. The [https://wiki.yambo-code.eu/wiki/index.php/BSE%20solvers%20overview BSE solvers overview] page can provide more info on the subject. &lt;br /&gt;
&lt;br /&gt;
To run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 02_EQ_BSE_kernel_diag.in -J EQ_BSE&lt;br /&gt;
&lt;br /&gt;
After the calculation has finished, the absorption spectra can be plotted with the following: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; gnuplot commands (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gnuplot&lt;br /&gt;
...&lt;br /&gt;
gnuplot&amp;gt; set xlabel &amp;quot;Energy (eV)&amp;quot;&lt;br /&gt;
gnuplot&amp;gt; set ylabel &amp;quot;Absorption&amp;quot; &lt;br /&gt;
gnuplot&amp;gt; plot &#039;o-EQ_BSE.eps_q1_haydock_bse&#039; u 1:2 w l t &#039;-k sex&#039;&lt;br /&gt;
gnuplot&amp;gt; rep  &#039;o-EQ_BSE.eps_q1_haydock_bse&#039; u 1:4 w l t &#039;-k ip&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the following plot will results (the &amp;quot;experimental&amp;quot; and &amp;quot;-k hartree&amp;quot; plots are added additionally for comparison) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; Plot of the computed spectra &amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:Plot of Si absorption spectra.png|900px|frameless|Plots of computed absorption spectra for the equilibrium case.]]&lt;br /&gt;
&lt;br /&gt;
= Generating non-equilibrium carriers =&lt;br /&gt;
To simulate non-equilibrium absorption, we need to define the distribution and the density of non-equilibrium carriers, specifically electrons in the conduction band and holes in the valence band.&lt;br /&gt;
Non-equilibrium carriers can be generated via the action of a laser pulse on the material. This can be described by performing a non-equilibrium real-time simulation with the yambo_rt code.&amp;lt;ref name=&amp;quot;sangalli2016&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;sangalli2016epl&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case we choose, instead, to generate a carriers distribution that follows a Fermi-Dirac distribution given by:&lt;br /&gt;
&amp;lt;!--&amp;lt;math&amp;gt;\Large f(E) = 1 / (exp((E - μ) / k_B T) + 1)&amp;lt;/math&amp;gt;--&amp;gt;&lt;br /&gt;
[[File:Fermi dirac distr.png|250px]]&lt;br /&gt;
&lt;br /&gt;
Here:&lt;br /&gt;
* 	E is the energy level,&lt;br /&gt;
* 	&amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt; is the chemical potential (specific to electrons or holes),&lt;br /&gt;
* 	&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; is the effective temperature,&lt;br /&gt;
* 	&amp;lt;math&amp;gt;k_B&amp;lt;/math&amp;gt; is the Boltzmann constant.&lt;br /&gt;
&lt;br /&gt;
For the simulation, both electrons and holes are characterized by their own &amp;lt;math&amp;gt;\mu_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;T_i&amp;lt;/math&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
The distribution of non-equilibrium carriers can be generated using Yambo’s post processing for real-time module (&amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt;), which allows modeling of these conditions.&lt;br /&gt;
&lt;br /&gt;
To generate to non-equilibrium carriers databases create &amp;lt;code&amp;gt;input_ypp1 input_ypp2&amp;lt;/code&amp;gt; files, with the following content: &lt;br /&gt;
&lt;br /&gt;
 ypp_rt -rtdb f -F input_ypp1&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp1 (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RTDBs                      	# [R] Real-Time databases&lt;br /&gt;
Select_Fermi               	# [R] NEQ DBs according to Fermi distribution&lt;br /&gt;
% RTBands&lt;br /&gt;
   1 | 30 |               	# [RT] Bands range&lt;br /&gt;
%&lt;br /&gt;
% RTmuEh&lt;br /&gt;
-0.223 | 0.10 | eV  	        # [RT] Chemical potentials hole | electron&lt;br /&gt;
%&lt;br /&gt;
% RTtempEh&lt;br /&gt;
 0.08 	| 0.08 	| eV  	    # [RT] Effective temperature hole | electron&lt;br /&gt;
%&lt;br /&gt;
RTautotuneThr= 0.000100    	# [RT] Threshold to match no. of pumped holes and electrons.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 ypp_rt -rtplot o -rtmode e -F input_ypp2&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp2 (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RealTime                   	# [R] Real-Time Post-Processing&lt;br /&gt;
RToccupations              	# [R] Analize time-dependent occupations&lt;br /&gt;
RTenergy                   	# [R] Post-Processing kind: function of energy&lt;br /&gt;
TimeStep= 0.000000 	fs  	# Time step&lt;br /&gt;
% TimeRange&lt;br /&gt;
-1.000000 |-1.000000 | fs  	# Time-window where processing is done&lt;br /&gt;
%&lt;br /&gt;
#IncludeEQocc              	# [NEGF] Include also equilibrium occupations&lt;br /&gt;
#SkipFermiFIT              	# [NEGF] Do a Fermi Fit of occupations (and lifetimes ratio)&lt;br /&gt;
%QPkrange                	#  generalized Kpoint/Band indices&lt;br /&gt;
  1| 1|  2|7|&lt;br /&gt;
%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And then run the files:&lt;br /&gt;
&lt;br /&gt;
 $ ypp_rt -F input_ypp1 -J carriers -C carriers &lt;br /&gt;
 $ ypp_rt -F input_ypp2 -J carriers -C carriers &lt;br /&gt;
&lt;br /&gt;
The file &amp;lt;code&amp;gt;input_ypp1&amp;lt;/code&amp;gt; will generate a &amp;lt;code&amp;gt;ndb.RT_carriers&amp;lt;/code&amp;gt; database which will contain the Fermi distribution of the electrons and the hole according to the specified chemical potential, &amp;lt;code&amp;gt;RTmuEh&amp;lt;/code&amp;gt;, and for a specific temperature given by &amp;lt;code&amp;gt;RTtempEh&amp;lt;/code&amp;gt;.  The file &amp;lt;code&amp;gt;input_ypp2&amp;lt;/code&amp;gt; will generate a series of databases to plot different different aspects of the distribution.&lt;br /&gt;
&lt;br /&gt;
Plot for the distribution of electrons in conduction band and holes in the valence band generated by the &amp;lt;code&amp;gt;input_ypp1&amp;lt;/code&amp;gt; and data file made by &amp;lt;code&amp;gt;input_ypp2&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--[[File:Plot occupation kgrid8 neq silicon.png|900px|frameless|center]]--&amp;gt; &lt;br /&gt;
[[File:Plot occupation kgrid8 neq silicon 2.png|900px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
This plot can be generated from the &amp;lt;code&amp;gt;carriers&amp;lt;/code&amp;gt; folder using the following gnuplot script [[Gnuplot scripts|plot_occupations.gnu]]&lt;br /&gt;
== Plotting non-equilibrium carriers with YamboPy ==&lt;br /&gt;
&lt;br /&gt;
Non equilibrium carries can also be read and plotted using YamboPy.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; YamboPy plotting &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 from yambopy import *&lt;br /&gt;
 import matplotlib.pyplot as plt&lt;br /&gt;
 import numpy as np&lt;br /&gt;
 &lt;br /&gt;
 RT_db=YamboRT_Carriers_DB(calc=&#039;carriers&#039;,carriers_db=&#039;ndb.RT_carriers&#039;)&lt;br /&gt;
 &lt;br /&gt;
 RT_db.get_info() &lt;br /&gt;
 &lt;br /&gt;
 w,bare_carrier_dos=RT_db.build_f_bare_dos()&lt;br /&gt;
 w,carrier_dos=RT_db.build_delta_f_dos()&lt;br /&gt;
 fig = plt.figure(figsize=(15,5))&lt;br /&gt;
 plt.xlabel(&#039;Energy [eV]&#039;,fontsize=16)&lt;br /&gt;
 plt.ylabel(&#039;w-DOS&#039;,fontsize=16)&lt;br /&gt;
 plt.plot(w,bare_carrier_dos,color=&amp;quot;blue&amp;quot;, linewidth=2, linestyle=&amp;quot;-&amp;quot;,label=&amp;quot;equilibrium w-DOS&amp;quot;)&lt;br /&gt;
 plt.plot(w,carrier_dos,color=&amp;quot;red&amp;quot;, linewidth=2, linestyle=&amp;quot;-&amp;quot;,label=&amp;quot;excited carriers w-DOS&amp;quot;)&lt;br /&gt;
 plt.legend(fontsize=16)&lt;br /&gt;
 plt.show()&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here the plot of the Density of States, weighted for the occupation factors (w-DOS) for the equilibrium carries in blue and the excited carriers in red.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:W-dos.png|center| 1000px|w-DOS non-equilibrium]]&lt;br /&gt;
&lt;br /&gt;
= Energy shift in the band structure =&lt;br /&gt;
&lt;br /&gt;
The GW method is the standard approach to compute quasi-particle corrections. However, in presence of non-equilibrium carriers, or even at finite temperature the formulation of the GW self-energy needs to be refined. This is due to its frequency dependence, which results in extra terms when performing the analytic continuation from the Keldish contour&amp;lt;ref name=&amp;quot;thygesen2007&amp;quot;/&amp;gt; (non-equilibrium case) or from the Matsubara axis&amp;lt;ref name=&amp;quot;faleev2006&amp;quot;/&amp;gt; (finite temperature case) to the real time/frequency axis.&lt;br /&gt;
On the other hand the COHSEX self-energy, being static, avoids this complication. This is why we will compute changes in the QP corrections within the COHSEX approximation.&lt;br /&gt;
&lt;br /&gt;
To compute the Non-Equilibrium Absorption Spectra, we need to diagonalize a previously defined two-particle Hamiltonian. To account for the Non-Equilibrium effect, the Kohn-Sham energies, &amp;lt;math&amp;gt;\varepsilon_{c\mathbf{k}}, \varepsilon_{v\mathbf{k}}&amp;lt;/math&amp;gt;, calculated at the DFT level, need to be corrected. This requires calculating the following: COHSEX self-energy at equilibrium, COHSEX self-energy at non-equilibrium, and Equilibrium GW self-energy at Plasmon-Pole Approximation level.&lt;br /&gt;
&lt;br /&gt;
Using these, the energy correction, &amp;lt;math&amp;gt;\varepsilon^{corr,neq}&amp;lt;/math&amp;gt;, can be computed as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Large \varepsilon^{corr,neq}_{c\mathbf{k}} = \varepsilon^{GW,eq}_{c\mathbf{k}} + (\varepsilon^{cohsex,neq}_{c\mathbf{k}} - \varepsilon^{cohsex,eq}_{c\mathbf{k}})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The KS energies will be corrected as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Large \varepsilon^{KS,neq}_{c\mathbf{k}} = \varepsilon_{c\mathbf{k}} + \varepsilon^{corr,neq}_{c\mathbf{k}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These corrected KS energies will be used when diagonalizing the two-particle Hamiltonian.&lt;br /&gt;
&lt;br /&gt;
== COHSEX corrections at equilibrium ==&lt;br /&gt;
To make a COHSEX calculation at equilibrium, we do the following: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -p c -F 03_eq_cohsex.in &lt;br /&gt;
&lt;br /&gt;
which will create a file with the following content: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_eq_cohsex.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 gw0                              # [R] GW approximation&lt;br /&gt;
 cohsex                           # [R][Xp] COlumb Hole Screened EXchange&lt;br /&gt;
 dyson                            # [R] Dyson Equation solver&lt;br /&gt;
 el_el_corr                       # [R] Electron-Electron Correlation&lt;br /&gt;
 HF_and_locXC                     # [R] Hartree-Fock&lt;br /&gt;
 em1s                             # [R][Xs] Statically Screened Interaction&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 SE_Threads=0                     # [OPENMP/GW] Number of threads for self-energy&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 EXXRLvcs= 15             Ry    # [XX] Exchange    RL components&lt;br /&gt;
 VXCRLvcs= 15             Ry    # [XC] XCpotential RL components&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 Chimod= &amp;quot;HARTREE&amp;quot;                # [X] IP/Hartree/ALDA/LRC/PF/BSfxc&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 |  30 |                         # [Xs] Polarization function bands &lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 3                Ry    # [Xs] Response block size&lt;br /&gt;
 UseEbands&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
   1 | 40 |                   # [GW] G[W] bands range&lt;br /&gt;
 %&amp;lt;/span&amp;gt;&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;%QPkrange                        # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 1|1|2|7|&lt;br /&gt;
 %&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;EXXRLvcs&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;VXCRLvcs&amp;lt;/code&amp;gt; were increased up to 15 Ry, due to the fact that computation of terms to which those cut-offs correspond, is not computationally demanding. The number of Polarization function bands, &amp;lt;code&amp;gt;BndsRnXs&amp;lt;/code&amp;gt; was changed to &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt;, and the quasi-particles generalized Kpoint and Band indices,&amp;lt;code&amp;gt;QPkrange&amp;lt;/code&amp;gt;, was changed from &amp;lt;code&amp;gt;1|29|1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1|1|2|7&amp;lt;/code&amp;gt;. Additionally the following lines were added &lt;br /&gt;
 UseEbands&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
   1 | 40 |                   # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
to force Yambo to do a calculation where self-energy depends on the conduction bands too, or this is also known as [https://wiki.yambo-code.eu/wiki/index.php?title=Silicon COHSEX with empty bands]. Alternatively, an option option &amp;lt;code&amp;gt;-V qp&amp;lt;/code&amp;gt; can be added when generating the file, but it will include a lot of redundant variables. &lt;br /&gt;
&lt;br /&gt;
And after it we run the file with the following command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 03_eq_cohsex.in -J cohsex_eq_emp -C cohsex_eq_emp&lt;br /&gt;
&lt;br /&gt;
We can plot the &amp;lt;code&amp;gt;o-cohsex_eq_emp.qp&amp;lt;/code&amp;gt; file from the &amp;lt;code&amp;gt;cohsex_eq_emp&amp;lt;/code&amp;gt; folder, to find out the gap opening due to the COHSEX correction. The plot can be done using the [[Gnuplot scripts|plot_qp_energies.gnu]]. &lt;br /&gt;
&lt;br /&gt;
[[File:Band opening eq cohsex plot.png|800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The points used to calculate band opening are: (0.000000, -1.034067) and (1.608910, -0.449499), which corresponds to an opening of 0.584568 eV.&lt;br /&gt;
&lt;br /&gt;
== COHSEX corrections in presence of non-equilibrium carriers ==&lt;br /&gt;
Before making a COHSEX calculation, we need to recalculate the static screening in the presence of non-equilibrium carriers. After it, we can make a COHSEX calculation in the presence of non-equilibrium carriers using the &amp;lt;code&amp;gt;ndb.RT_carriers&amp;lt;/code&amp;gt; database generated in the previous step with the &amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt; module. To do this, we do the following: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -p c -F 03_neq_cohsex.in &lt;br /&gt;
&lt;br /&gt;
where we need to add the following lines: &lt;br /&gt;
&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 GfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
&lt;br /&gt;
and the resulting file is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_neq_cohsex.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 gw0                              # [R] GW approximation&lt;br /&gt;
 cohsex                           # [R][Xp] COlumb Hole Screened EXchange&lt;br /&gt;
 dyson                            # [R] Dyson Equation solver&lt;br /&gt;
 el_el_corr                       # [R] Electron-Electron Correlation&lt;br /&gt;
 HF_and_locXC                     # [R] Hartree-Fock&lt;br /&gt;
 em1s                             # [R][Xs] Statically Screened Interaction&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 SE_Threads=0                     # [OPENMP/GW] Number of threads for self-energy&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 EXXRLvcs= 15             Ry    # [XX] Exchange    RL components&lt;br /&gt;
 VXCRLvcs= 15             Ry    # [XC] XCpotential RL components&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 Chimod= &amp;quot;HARTREE&amp;quot;                # [X] IP/Hartree/ALDA/LRC/PF/BSfxc&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 |  30 |                         # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 UseEbands&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
   1 | 40 |                   # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 GfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 NGsBlkXs= 3                Ry    # [Xs] Response block size&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 %QPkrange                        # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 1|1|2|7|&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we added the respective two lines with &amp;lt;code&amp;gt;XfnRTdb&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;GfnRTdb&amp;lt;/code&amp;gt;, and made changes to &amp;lt;code&amp;gt;BndsRnXs&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;QPkrange&amp;lt;/code&amp;gt; similar to the equilibrium case. Additionally, we added the lines to force Yambo to do a COHSEX calculation with empty bands. &lt;br /&gt;
&lt;br /&gt;
The line &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; em1s                             # [R][Xs] Statically Screened Interaction&lt;br /&gt;
&lt;br /&gt;
will tell Yambo to make the static screening calculation, and the lines:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; gw0                              # [R] GW approximation&lt;br /&gt;
 &amp;gt; cohsex                           # [R][Xp] COlumb Hole Screened EXchange&lt;br /&gt;
&lt;br /&gt;
will tell Yambo to do make a COHSEX calculation. &lt;br /&gt;
&lt;br /&gt;
After it we can run the file with the command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 03_neq_cohsex.in -J cohsex_neq -C cohsex_neq&lt;br /&gt;
&lt;br /&gt;
We can plot &amp;lt;code&amp;gt;o-cohsex_neq.qp&amp;lt;/code&amp;gt; file from the &amp;lt;code&amp;gt;cohsex_neq&amp;lt;/code&amp;gt; folder, to find the gap opening due the COHSEX correction and the non-equilibrium distribution of the carriers. The plot can be done using the [[Gnuplot scripts|plot_qp_energies.gnu]].&lt;br /&gt;
&lt;br /&gt;
[[File:Band opening neq cohsex plot.png .png|800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The points to calculate band opening are (0.000000, -0.882580), and (1.608910, -0.535269), which correspond to an opening of 0.347311 eV.&lt;br /&gt;
&lt;br /&gt;
== GW PPA corrections for the equilibrium case ==&lt;br /&gt;
&lt;br /&gt;
This subchapter can be skipped, and replaced by using scissors operator when diagonalizing the two particle Hamiltonian. &lt;br /&gt;
&lt;br /&gt;
To get accurate values for the band gap value we need to go beyond COHSEX approximation. Therefore we will obtain the Quasi-particle corrections in the plasmon pole approximation for equilibrium case, and in next steps, to this value we will add the correction calculated at COHSEX approximation to account for the non-equilibrium state of the system. &lt;br /&gt;
&lt;br /&gt;
To make this calculation, we do the following: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -p p -F 03_eq_qp_ppa.in &lt;br /&gt;
&lt;br /&gt;
which will create a file with the following content: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_eq_qp_ppa.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 gw0                              # [R] GW approximation&lt;br /&gt;
 ppa                              # [R][Xp] Plasmon Pole Approximation for the Screened Interaction&lt;br /&gt;
 el_el_corr                       # [R] Electron-Electron Correlation&lt;br /&gt;
 HF_and_locXC                     # [R] Hartree-Fock&lt;br /&gt;
 em1d                             # [R][X] Dynamically Screened Interaction&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 SE_Threads=0                     # [OPENMP/GW] Number of threads for self-energy&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 EXXRLvcs= 15             Ry    # [XX] Exchange    Ry components&lt;br /&gt;
 VXCRLvcs= 15             Ry    # [XC] XCpotential Ry components&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 Chimod= &amp;quot;HARTREE&amp;quot;                # [X] IP/Hartree/ALDA/LRC/PF/BSfxc&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
    1 |  30 |                         # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt; &lt;br /&gt;
 NGsBlkXp= 3                Ry    # [Xp] Response block size&lt;br /&gt;
 % LongDrXp&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [Xp] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 PPAPntXp= 27.21138         eV    # [Xp] PPA imaginary energy&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;  &lt;br /&gt;
 % GbndRnge&lt;br /&gt;
    1 |  40 |                         # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt; &lt;br /&gt;
 GTermKind= &amp;quot;none&amp;quot;                # [GW] GW terminator (&amp;quot;none&amp;quot;,&amp;quot;BG&amp;quot; Bruneval-Gonze,&amp;quot;BRS&amp;quot; Berger-Reining-Sottile)&lt;br /&gt;
 DysSolver= &amp;quot;n&amp;quot;                   # [GW] Dyson Equation solver (&amp;quot;n&amp;quot;,&amp;quot;s&amp;quot;,&amp;quot;g&amp;quot;,&amp;quot;q&amp;quot;)&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 %QPkrange                        # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 1|1|2|7|&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;       &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the following changes have been made: the number of polarization function bands, &amp;lt;code&amp;gt;BndsRnXp&amp;lt;/code&amp;gt; was changed to &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt;, the G[W] bands range, &amp;lt;code&amp;gt;GbndRnge&amp;lt;/code&amp;gt; was changed from &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1|40&amp;lt;/code&amp;gt;, and quasi-particle generalized k points  and band indices, &amp;lt;code&amp;gt;QPkrange&amp;lt;/code&amp;gt; was changed from &amp;lt;code&amp;gt;1|29|1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1|1|2|7&amp;lt;/code&amp;gt;. And after it we run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 03_eq_qp_ppa.in -J gw_eq -C gw_eq&lt;br /&gt;
&lt;br /&gt;
We can plot the &amp;lt;code&amp;gt;o-gw_eq.qp&amp;lt;/code&amp;gt; file from the &amp;lt;code&amp;gt;eq_gw_bse&amp;lt;/code&amp;gt; folder, to find out the gap opening due to the plasmon-pole approximation. The plot can be done using the [[Gnuplot scripts|plot_qp_energies.gnu]]. &lt;br /&gt;
&lt;br /&gt;
[[File:O gw eq qp plot.png|800px|frameless]]&lt;br /&gt;
&lt;br /&gt;
The points used to calculated band opening are (0, -0.045932), and (1.608910, 0.456526), which correspond to an opening of 0.502458 eV. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;(OPTIONAL)&#039;&#039;&#039; Additionally, after computing the QP corrections those can be used during the BSE corrections.  To do it, we create file similar to the [[Nonequilibrium absorption in bulk silicon|Solving the Bethe-Salpeter equation]], where we do not add the scissors line, but we add &amp;lt;code&amp;gt;KfnQPdb= &amp;quot;E &amp;lt; gw_eq/ndb.QP&amp;quot;&amp;lt;/code&amp;gt;. &lt;br /&gt;
The final file will look like &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_eq_bse.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 15             Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 #WehCpl                        # [BSK] eh interaction included also in coupling&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %  &lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 % BSEBands&lt;br /&gt;
   2 |  7 |                           # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 % BEnRange&lt;br /&gt;
  2.200000 | 5.000000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt; &lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 % &lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; gw_eq/ndb.QP&amp;quot;&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
 #WRbsWF                        # [BSS] Write to disk excitonic the WFs     &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and we run this file by typing: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 03_eq_bse.in -J &amp;quot;eq_gw_bse,gw_eq&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Data post-processing ==&lt;br /&gt;
Now after obtaining all the energy components that we need to calculate corrections to Kohn-Sham energies for the Non-Equilibrium case, we can manipulate them using the yambo&#039;s real time post processing module, &amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt;. We want to obtain energies defined by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Large \varepsilon^{corr,neq}_{c\mathbf{k}} = \varepsilon^{GW,eq}_{c\mathbf{k}} + (\varepsilon^{cohsex,neq}_{c\mathbf{k}} - \varepsilon^{cohsex,eq}_{c\mathbf{k}})&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Therefore we create a yambo post processing file with the following contents: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp3 (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
QPDBs                      	# [R] Quasi-particle databases&lt;br /&gt;
QPDB_merge                 	# [R] Mergering&lt;br /&gt;
%Actions_and_names       	# [QPDB] QP databases and Actions (format is &amp;quot;what&amp;quot;|&amp;quot;OP&amp;quot;|&amp;quot;prefactor&amp;quot;|&amp;quot;DB&amp;quot;|). OP can be ±/x.&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_neq/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;-&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_eq_emp/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;Z&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;gw_eq/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;gw_eq/ndb.QP&amp;quot; |&lt;br /&gt;
%       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we tell ypp to take from the quasi particle correction databases the values of &amp;lt;math&amp;gt;\varepsilon^{cohsex,neq}_{c\mathbf{k}}&amp;lt;/math&amp;gt; subtract from them &amp;lt;math&amp;gt;\varepsilon^{cohsex,eq}_{c\mathbf{k}}&amp;lt;/math&amp;gt;, multiply the resulting value by &amp;lt;code&amp;gt;?????&amp;lt;/code&amp;gt;  and add it to &amp;lt;math&amp;gt;\varepsilon^{GW,eq}_{c\mathbf{k}}&amp;lt;/math&amp;gt; and save them in the the new database &amp;lt;code&amp;gt;ndb.QP_merged_1_gw_cohsex_gw_ppa&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
We run the file by the following command: &lt;br /&gt;
&lt;br /&gt;
 $ ypp_rt -F input_ypp3 -J QP_merge -C QP_merge&lt;br /&gt;
&lt;br /&gt;
Or alternatively, if no calculation for the quasiparticle correction has been made (except the COHSEX calculation), and a scissors operator is going to be used, we can use the following yambo post processing file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp3_scissors (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
QPDBs                      	# [R] Quasi-particle databases&lt;br /&gt;
QPDB_merge                 	# [R] Mergering&lt;br /&gt;
%Actions_and_names       	# [QPDB] QP databases and Actions (format is &amp;quot;what&amp;quot;|&amp;quot;OP&amp;quot;|&amp;quot;prefactor&amp;quot;|&amp;quot;DB&amp;quot;|). OP can be ±/x.&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_neq/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;-&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_eq_emp/ndb.QP&amp;quot; |&lt;br /&gt;
%  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which will just take from the quasi particle correction databases the values of &amp;lt;math&amp;gt;\varepsilon^{cohsex,neq}_{c\mathbf{k}}&amp;lt;/math&amp;gt; subtract from them &amp;lt;math&amp;gt;\varepsilon^{cohsex,eq}_{c\mathbf{k}}&amp;lt;/math&amp;gt;. And we run this file by: &lt;br /&gt;
&lt;br /&gt;
 $ ypp_rt -F input_ypp3_scissors -J QP_merge_scissor -C QP_merge_scissor&lt;br /&gt;
&lt;br /&gt;
= Renormalization of the exciton binding energy =&lt;br /&gt;
&lt;br /&gt;
We finally perform a BSE calculation loading both the nonequilibrium carriers and the quasi-particle energy shifts. The Non-Equilibrium Hamiltonian is: &lt;br /&gt;
&lt;br /&gt;
[[File:Neq h.png|310px|frameless|left]] &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Where quantities entering into the hamiltonian are the non-equilibrium counterparts of the quantities discussion for the EQ Hamiltonian, and &amp;lt;math&amp;gt;\tau&amp;lt;/math&amp;gt; is the pump probe delay. The &amp;lt;math&amp;gt;\Delta \epsilon^{\tau}_l&amp;lt;/math&amp;gt; is the difference between non-equilibrium COHSEX and equilibrium COHSEX energy (calculated in the COHSEX chapter). &lt;br /&gt;
&lt;br /&gt;
We create a file using the following command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -o b -y h -F 04_neq_bse.in&lt;br /&gt;
&lt;br /&gt;
== With GW qp corrections ==&lt;br /&gt;
&lt;br /&gt;
Compared to the equilibrium case we add the lines:&lt;br /&gt;
&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge/ndb.QP_merged_1_gw_cohsex_gw_ppa&amp;quot;&lt;br /&gt;
&lt;br /&gt;
the resulting structure of the file is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 04_neq_bse.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions &lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 3             Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 #WehCpl                        # [BSK] eh interaction included also in coupling&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   2 |  7 |                           # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BEnRange&lt;br /&gt;
  2.200000 | 5.000000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge/ndb.QP_merged_1_gw_cohsex_gw_ppa&amp;quot;&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
 #WRbsWF                        # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we added the lines, and changed the bands range, &amp;lt;code&amp;gt;BSEBands&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2|7&amp;lt;/code&amp;gt;, energy range, &amp;lt;code&amp;gt;BEnRange&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;0.00000 | 10.00000 &amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2.00000 | 10.00000 |&amp;lt;/code&amp;gt; and energy steps, &amp;lt;code&amp;gt;BEnSteps&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;100&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;200&amp;lt;/code&amp;gt;. And we run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 04_neq_bse.in -J &amp;quot;neq_bse,gw_eq&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Alternatively, when scissors are used, the lines can be added, to account for the lack of a proper GW correction.&lt;br /&gt;
&lt;br /&gt;
The final plot from the calculations presented in this tutorial, for k-grid 8x8x8, with NEQ BSE with QP corrections, EQ BSE with QP corrections (not presented in this tutorial), and Experimental Data looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--[[File:NEQ2 abs bulk silicon tutorial plot results kgrid8.png|800px|frameless|center]]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[[File:Plot results kgrid8 7ry.png|800px|frameless|center]]--&amp;gt;&lt;br /&gt;
[[File:Plot results kgrid8 15 3ry.png||800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
In case, a better convergence is needed, a 16x16x16 k-grid can be used. To decrease computational time, the GW corrections can be done on lower grid, whereas solving the BSE equation can be done on higher k-grids. And for the 16x16x16 k-grid the plot looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Neq abs bulk silicon plot kgrid16.png|800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The plots can be done using [[Gnuplot scripts|plot_absorbance.gnu]] gnuplot script.&lt;br /&gt;
&lt;br /&gt;
== With scissor corrections ==&lt;br /&gt;
&lt;br /&gt;
Compared to the equilibrium case we just add the lines below:&lt;br /&gt;
&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge_scissor/ndb.QP_merged_1_gw_cohsex&amp;quot;&lt;br /&gt;
&lt;br /&gt;
the resulting structure of the file is (lines for nonequilibrium simulations added in red):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 04_neq_bse_scissors.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 3             Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 #WehCpl                        # [BSK] eh interaction included also in coupling&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  0.700000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge/ndb.QP_merged_1_gw_cohsex&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot; &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
    2 |  7 |                         # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BEnRange&lt;br /&gt;
   2.20000 | 5.00000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&amp;lt;/span&amp;gt;&lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 %&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
 #WRbsWF                        # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we added the lines, and changed the bands range, &amp;lt;code&amp;gt;BSEBands&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2|7&amp;lt;/code&amp;gt;, energy range, &amp;lt;code&amp;gt;BEnRange&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;0.00000 | 10.00000 &amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2.20000 | 5.00000 |&amp;lt;/code&amp;gt; and energy steps, &amp;lt;code&amp;gt;BEnSteps&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;100&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;200&amp;lt;/code&amp;gt;.  And we run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 04_neq_bse_sciss.in -J &amp;quot;neq_bse,gw_eq&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;sangalli2016&amp;quot;&amp;gt;D. Sangalli, S. Dal Conte, C. Manzoni, G. Cerullo, and A. Marini, [https://doi.org/10.1103/PhysRevB.93.195205 Phis. Rev. &#039;&#039;&#039;B 93&#039;&#039;&#039;, 195205 (2016)] ([https://arxiv.org/abs/1603.00225 arXiv1603.00225])&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;sangalli2016epl&amp;quot;&amp;gt;D. Sangalli, and A. Marini, [https://doi.org/10.1209/0295-5075/110/47004 Europhys. Lett. &#039;&#039;&#039;110&#039;&#039;&#039;, 47004 (2016)] ([https://arxiv.org/abs/1409.1706 arXiv1409.1706])&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;faleev2006&amp;quot;&amp;gt;S. V. Faleev, M. van Schilfgaarde, T. Kotani, F. Léonard, and M. P. Desjarlais, [https://doi.org/10.1103/PhysRevB.74.033101 Phys. Rev. &#039;&#039;&#039;B 74&#039;&#039;&#039;, 033101 (2006)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;thygesen2007&amp;quot;&amp;gt;K. S. Thygesen, and A. Rubio, [https://doi.org/10.1063/1.2565690 J. Chem. Phys. &#039;&#039;&#039;126&#039;&#039;&#039;, 091101 (2007)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Nonequilibrium_absorption_in_bulk_silicon&amp;diff=9020</id>
		<title>Nonequilibrium absorption in bulk silicon</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Nonequilibrium_absorption_in_bulk_silicon&amp;diff=9020"/>
		<updated>2025-09-08T14:21:28Z</updated>

		<summary type="html">&lt;p&gt;Davide: Added reference&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will learn the basic concepts for computing changes in the optical properties of a semi-conductor in presence of a non-equilibrium electrons and holes distribution in conduction and valence band respectively. This tutorial is based on the results published in Phys. Rev. B&amp;lt;ref name=&amp;quot;sangalli2016&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Under construction&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= The material: Silicon =&lt;br /&gt;
&lt;br /&gt;
We will study nonequilibrium absorption in bulk silicon. The same material used for this [[Silicon|GW tutorial]] &lt;br /&gt;
&lt;br /&gt;
* [http://cst-www.nrl.navy.mil/lattice/struk/a1.html FCC] lattice&lt;br /&gt;
* Two atoms per cell (8 electrons)&lt;br /&gt;
* Lattice constant 10.183 [a.u.]&lt;br /&gt;
* Plane waves cutoff 15 Rydberg&lt;br /&gt;
* Direct gap   3.4 eV at Gamma&lt;br /&gt;
* Indirect gap 1.1 eV between Gamma= (0 0 0) and a point X&#039;, close to X=(0 1 0)&lt;br /&gt;
&lt;br /&gt;
[[File:si_banddiagram.gif|thumb|x400px|Silicon Band Structure]]&lt;br /&gt;
&lt;br /&gt;
= Tutorial files and Tutorial structure =&lt;br /&gt;
Follow the instructions in [[Tutorials download]] and download/unpack the &amp;lt;code&amp;gt;Silicon.tar.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
Once the tutorial archive file is unzipped the following folder structure will appear&lt;br /&gt;
 COPYING  README  Silicon/&lt;br /&gt;
&lt;br /&gt;
with the Solid_Si folder containing&lt;br /&gt;
 &amp;gt; ls Silicon/ &lt;br /&gt;
 PWSCF/  YAMBO/&lt;br /&gt;
&lt;br /&gt;
In the Pwscf folder  the student will find an input/output directory with input/output files for pw.x. The Silicon pseudopotential file is also provided.&lt;br /&gt;
 &amp;gt; ls PWSCF/&lt;br /&gt;
 convergence_scripts  input  output  psps&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;convergence_scripts&amp;lt;/code&amp;gt; you will find some useful shell scripts to run the ground state convergence runs for Silicon.&lt;br /&gt;
The YAMBO folder contains the Yambo input/output files and core databases.&lt;br /&gt;
 &amp;gt; ls YAMBO/&lt;br /&gt;
 2x2x2/  4x4x4/  6x6x6/  8x8x8/  Convergence_Plots_and_Scripts/  GAMMA/&lt;br /&gt;
&lt;br /&gt;
The core databases are provided for several k-points grids. In addition the folder &amp;lt;code&amp;gt;Convergence_Plots_and_Scripts&amp;lt;/code&amp;gt; contains some scripts used for the [Silicon|GW tutorial] .&lt;br /&gt;
Here we will just use the 8x8x8 (which is still very far from convergence) folder for computing (nonequilibrium) optical properties.&lt;br /&gt;
&lt;br /&gt;
To run the tutorial you will need the standard executables&lt;br /&gt;
 yambo&lt;br /&gt;
 ypp &lt;br /&gt;
plus the executables of the real time module of the Yambo code&lt;br /&gt;
 yambo_rt&lt;br /&gt;
 ypp_rt&lt;br /&gt;
&lt;br /&gt;
= Overview of the simulations in this tutorial= &lt;br /&gt;
We start from a density-functional theory (DFT) calculation as the foundation. As a first demonstrative step, we will solve the Bethe-Salpeter equation (BSE) for the equilibrium case without including quasiparticle (QP) corrections. Once this is completed, we will use the Yambo post-processing module, &amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt;, to generate a distribution of non-equilibrium carriers. This distribution will be used in all subsequent non-equilibrium (NEQ) calculations. It is important to note that solving the non-equilibrium BSE is not feasible within the GW plasmon pole approximation. To address this limitation, we will instead solve the BSE for the equilibrium case and apply corrections to the energy values using a non-equilibrium COHSEX calculation.&lt;br /&gt;
&lt;br /&gt;
The QP band structure will show the effect of the screened electron-electron interaction, while the absorption spectrum within the BSE accounts for the effect of the electron-hole interaction. When QP corrections are not available, they can be included using the scissor operator &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt;, and the numerical values for &amp;quot;corrections&amp;quot; can be deduced from a GW calculation. For more information about solving the Equilibrium BSE equation refer to the following tutorial: [https://wiki.yambo-code.eu/wiki/index.php/Calculating%20optical%20spectra%20including%20excitonic%20effects:%20a%20step-by-step%20guide Calculating optical spectra including excitonic effects: a step-by-step guide]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; List of Steps Executed in This Module (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
# Equilibrium BSE Calculation (Demonstrative)  &lt;br /&gt;
# Generating non-equilibrium carriers &lt;br /&gt;
# Equilibrium and non-equilibrium COHSEX calculations &lt;br /&gt;
# Calculation of QP-PPA corrections to Silicon (Optional) &lt;br /&gt;
# Non-Equilibrium BSE Calculation&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The run of all the files in this tutorial should take around 2-5 minutes in total. In case a faster run is needed, results from a lower kgrid can be used, or some converged criteria can be used, for example lowering the &amp;lt;code&amp;gt;NGsBlkXs&amp;lt;/code&amp;gt; and/or &amp;lt;code&amp;gt;NGsBlkXp&amp;lt;/code&amp;gt;, or lowering the number of conduction bands used in the calculations.&lt;br /&gt;
&lt;br /&gt;
= Equilibrium optical properties =&lt;br /&gt;
&lt;br /&gt;
In this part, we will solve the equilibrium BSE calculation without quasiparticle corrections. &lt;br /&gt;
&lt;br /&gt;
Enter the folder 8x8x8, and initialize yambo in the respective folder &lt;br /&gt;
 $ cd 8x8x8&lt;br /&gt;
 $ yambo&lt;br /&gt;
&lt;br /&gt;
== Static screening at equilibrium ==&lt;br /&gt;
&lt;br /&gt;
First, to solve the BSE equation we need to calculate the statically screened electron-electron interaction (W), which is related to static dielectric screening &amp;lt;math&amp;gt; \epsilon^{-1} &amp;lt;/math&amp;gt;. &lt;br /&gt;
&amp;lt;!--&amp;lt;math&amp;gt; \Large&lt;br /&gt;
\epsilon^{-1}_{\mathbf{G},\mathbf{G&#039;}} (\mathbf{q}, \omega = 0) = \delta_{\mathbf{G},\mathbf{G&#039;}} + v(\mathbf{v} + \mathbf{G}) \chi_{\mathbf{G},\mathbf{G&#039;}(\mathbf{q}}, \omega = 0)&amp;lt;/math&amp;gt;--&amp;gt;&lt;br /&gt;
[[File:Static dielectric screening.png|550px|frameless|left]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To do this create the following input file: &lt;br /&gt;
 $ yambo -X s -F 01_EQ_BSE_screening.in&lt;br /&gt;
&lt;br /&gt;
with the following contents: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 01_EQ_BSE_screening.in file (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 em1s                                 # [R][Xs] Statically Screened Interaction&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 |  30 |                         # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 3000                   mRy    # [Xs] Response block size&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |    # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where we changed the response block size &amp;lt;code&amp;gt;NGsBlkXs = 3000 mRy&amp;lt;/code&amp;gt; and number of polarization function bands &amp;lt;code&amp;gt;BndsRnXs&amp;lt;/code&amp;gt; to be in the range of 1 to 30. Now run the file:&lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 01_EQ_BSE_screening.in -J EQ_BSE&lt;br /&gt;
&lt;br /&gt;
== Solving the Bethe-Salpeter equation == &lt;br /&gt;
To solve the (equilibrium) Bethe-Salpeter equation, the latter is usually rewritten in the space of transitions between valence and conduction states as the (pseudo)eigenvalue problem for a two-particle Hamiltonian. In the &amp;lt;math&amp;gt; q = 0 &amp;lt;/math&amp;gt; limit, the two-particle Hamiltonian matrix elements are given by:&lt;br /&gt;
&amp;lt;!--&amp;lt;math&amp;gt; \widetilde{H}_{ll&#039;} = \widetilde{\varepsilon}_l - \sqrt{\widetilde{f}_l} \left( v_{ll&#039;} - \widetilde{W}^{s}_{ll&#039;} \right) \sqrt{\widetilde{f}_{l&#039;}} &amp;lt;/math&amp;gt; --&amp;gt;&lt;br /&gt;
[[File:H_eq_bse_2016.png|310px|frameless|left]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where compact notation  &amp;lt;math&amp;gt; l = \{mn\mathbf{k}\} &amp;lt;/math&amp;gt;, was introduced, and quantities with a tilde represent the corresponding quantity evaluated at equilibrium. &lt;br /&gt;
&lt;br /&gt;
For equilibrium occupation factor and energy (KS or QP corrected KS energies): &lt;br /&gt;
[[File:Equilibrium occ factor.png|160px|frameless|left|Equilibrium occupation factor]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Epsilon eng l.png|160px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Moreover, it was defined: &lt;br /&gt;
[[File:W ss.png|300px|frameless|left]] &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:V ss.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;math&amp;gt;\widetilde{W}_{GG&#039;}(\mathbf{q}, 0)&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;v_{G}(\mathbf{q})&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt; \rho_{nm\mathbf{k}, G}(\mathbf{q})&amp;lt;/math&amp;gt; are static approximation to the screened interaction, bare Coulomb interaction, and KS response function respectively. After calculating the equilibrium Bethe-Salpeter kernel, the resulting two-particle Hamiltonian can be diagonalized to compute the macroscopic dielectric function, which can be used to get absorption and EELS spectra. Calculation of BS kernel and diagonalization of Hamiltonian can be done in one step. For a more detailed description please consult  Phis. Rev. B 93, 195205 (2016). &lt;br /&gt;
&lt;br /&gt;
To generate the input file for the calculation of BSE kernel, run the following command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -o b -k sex -F 02_EQ_BSE_kernel_diag.in -y h -V qp -J EQ_BSE&lt;br /&gt;
&lt;br /&gt;
with the following input&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 02_EQ_BSE_kernel_diag.in file (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 15000            mRy    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BSEBands&lt;br /&gt;
    2 |  7 |                         # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 % BEnRange&lt;br /&gt;
   2.20000 | 5.00000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  0.70000 | 1.000000 | 1.000000 |      # [EXTQP BSK BSS] E parameters (c/v)&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/...&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where the value of &amp;lt;code&amp;gt;BSENGexx&amp;lt;/code&amp;gt; was changed for better convergence, &amp;lt;code&amp;gt;BSEBands&amp;lt;/code&amp;gt; was changed to include bands from 2 to 7, which defines the basis of quasiparticle pairs that are used to describe excitons. 3 degenerate valence and 3 degenerate conduction bands where included. &amp;lt;code&amp;gt;BEnRange&amp;lt;/code&amp;gt; was changed to 2.2-5.5 eV to match experimental data, and &amp;lt;code&amp;gt;BEnSteps&amp;lt;/code&amp;gt; was increased from 100 to 200. The scissors operator &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt; was used to match the possiton calculated spectra with experimental values. The Haydock BSE solver was chosen, &amp;lt;code&amp;gt;-y h&amp;lt;/code&amp;gt; option, because it is substantially cheaper than the full diagonalization (quadratic with the number of electron-hole pairs). However, this approach does not provide the individual exciton energies and composition in terms of electron-hole pairs. The [https://wiki.yambo-code.eu/wiki/index.php/BSE%20solvers%20overview BSE solvers overview] page can provide more info on the subject. &lt;br /&gt;
&lt;br /&gt;
To run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 02_EQ_BSE_kernel_diag.in -J EQ_BSE&lt;br /&gt;
&lt;br /&gt;
After the calculation has finished, the absorption spectra can be plotted with the following: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; gnuplot commands (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gnuplot&lt;br /&gt;
...&lt;br /&gt;
gnuplot&amp;gt; set xlabel &amp;quot;Energy (eV)&amp;quot;&lt;br /&gt;
gnuplot&amp;gt; set ylabel &amp;quot;Absorption&amp;quot; &lt;br /&gt;
gnuplot&amp;gt; plot &#039;o-EQ_BSE.eps_q1_haydock_bse&#039; u 1:2 w l t &#039;-k sex&#039;&lt;br /&gt;
gnuplot&amp;gt; rep  &#039;o-EQ_BSE.eps_q1_haydock_bse&#039; u 1:4 w l t &#039;-k ip&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the following plot will results (the &amp;quot;experimental&amp;quot; and &amp;quot;-k hartree&amp;quot; plots are added additionally for comparison) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; Plot of the computed spectra &amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:Plot of Si absorption spectra.png|900px|frameless|Plots of computed absorption spectra for the equilibrium case.]]&lt;br /&gt;
&lt;br /&gt;
= Generating non-equilibrium carriers =&lt;br /&gt;
To simulate non-equilibrium absorption, we need to define the distribution and the density of non-equilibrium carriers, specifically electrons in the conduction band and holes in the valence band.&lt;br /&gt;
Non-equilibrium carriers can be generated via the action of a laser pulse on the material. This can be described by performing a non-equilibrium real-time simulation with the yambo_rt code.&amp;lt;ref name=&amp;quot;sangalli2016&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;sangalli2016epl&amp;quot;/&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In this case we choose, instead, to generate a carriers distribution that follows a Fermi-Dirac distribution given by:&lt;br /&gt;
&amp;lt;!--&amp;lt;math&amp;gt;\Large f(E) = 1 / (exp((E - μ) / k_B T) + 1)&amp;lt;/math&amp;gt;--&amp;gt;&lt;br /&gt;
[[File:Fermi dirac distr.png|250px]]&lt;br /&gt;
&lt;br /&gt;
Here:&lt;br /&gt;
* 	E is the energy level,&lt;br /&gt;
* 	&amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt; is the chemical potential (specific to electrons or holes),&lt;br /&gt;
* 	&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; is the effective temperature,&lt;br /&gt;
* 	&amp;lt;math&amp;gt;k_B&amp;lt;/math&amp;gt; is the Boltzmann constant.&lt;br /&gt;
&lt;br /&gt;
For the simulation, both electrons and holes are characterized by their own &amp;lt;math&amp;gt;\mu_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;T_i&amp;lt;/math&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
The distribution of non-equilibrium carriers can be generated using Yambo’s post processing for real-time module (&amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt;), which allows modeling of these conditions.&lt;br /&gt;
&lt;br /&gt;
To generate to non-equilibrium carriers databases create &amp;lt;code&amp;gt;input_ypp1 input_ypp2&amp;lt;/code&amp;gt; files, with the following content: &lt;br /&gt;
&lt;br /&gt;
 ypp_rt -rtdb f -F input_ypp1&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp1 (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RTDBs                      	# [R] Real-Time databases&lt;br /&gt;
Select_Fermi               	# [R] NEQ DBs according to Fermi distribution&lt;br /&gt;
% RTBands&lt;br /&gt;
   1 | 30 |               	# [RT] Bands range&lt;br /&gt;
%&lt;br /&gt;
% RTmuEh&lt;br /&gt;
-0.223 | 0.10 | eV  	        # [RT] Chemical potentials hole | electron&lt;br /&gt;
%&lt;br /&gt;
% RTtempEh&lt;br /&gt;
 0.08 	| 0.08 	| eV  	    # [RT] Effective temperature hole | electron&lt;br /&gt;
%&lt;br /&gt;
RTautotuneThr= 0.000100    	# [RT] Threshold to match no. of pumped holes and electrons.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 ypp_rt -rtplot o -rtmode e -F input_ypp2&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp2 (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RealTime                   	# [R] Real-Time Post-Processing&lt;br /&gt;
RToccupations              	# [R] Analize time-dependent occupations&lt;br /&gt;
RTenergy                   	# [R] Post-Processing kind: function of energy&lt;br /&gt;
TimeStep= 0.000000 	fs  	# Time step&lt;br /&gt;
% TimeRange&lt;br /&gt;
-1.000000 |-1.000000 | fs  	# Time-window where processing is done&lt;br /&gt;
%&lt;br /&gt;
#IncludeEQocc              	# [NEGF] Include also equilibrium occupations&lt;br /&gt;
#SkipFermiFIT              	# [NEGF] Do a Fermi Fit of occupations (and lifetimes ratio)&lt;br /&gt;
%QPkrange                	#  generalized Kpoint/Band indices&lt;br /&gt;
  1| 1|  2|7|&lt;br /&gt;
%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And then run the files:&lt;br /&gt;
&lt;br /&gt;
 $ ypp_rt -F input_ypp1 -J carriers -C carriers &lt;br /&gt;
 $ ypp_rt -F input_ypp2 -J carriers -C carriers &lt;br /&gt;
&lt;br /&gt;
The file &amp;lt;code&amp;gt;input_ypp1&amp;lt;/code&amp;gt; will generate a &amp;lt;code&amp;gt;ndb.RT_carriers&amp;lt;/code&amp;gt; database which will contain the Fermi distribution of the electrons and the hole according to the specified chemical potential, &amp;lt;code&amp;gt;RTmuEh&amp;lt;/code&amp;gt;, and for a specific temperature given by &amp;lt;code&amp;gt;RTtempEh&amp;lt;/code&amp;gt;.  The file &amp;lt;code&amp;gt;input_ypp2&amp;lt;/code&amp;gt; will generate a series of databases to plot different different aspects of the distribution.&lt;br /&gt;
&lt;br /&gt;
Plot for the distribution of electrons in conduction band and holes in the valence band generated by the &amp;lt;code&amp;gt;input_ypp1&amp;lt;/code&amp;gt; and data file made by &amp;lt;code&amp;gt;input_ypp2&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--[[File:Plot occupation kgrid8 neq silicon.png|900px|frameless|center]]--&amp;gt; &lt;br /&gt;
[[File:Plot occupation kgrid8 neq silicon 2.png|900px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
This plot can be generated from the &amp;lt;code&amp;gt;carriers&amp;lt;/code&amp;gt; folder using the following gnuplot script [[Gnuplot scripts|plot_occupations.gnu]]&lt;br /&gt;
== Plotting non-equilibrium carriers with YamboPy ==&lt;br /&gt;
&lt;br /&gt;
Non equilibrium carries can also be read and plotted using YamboPy.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; YamboPy plotting &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 from yambopy import *&lt;br /&gt;
 import matplotlib.pyplot as plt&lt;br /&gt;
 import numpy as np&lt;br /&gt;
 &lt;br /&gt;
 RT_db=YamboRT_Carriers_DB(calc=&#039;carriers&#039;,carriers_db=&#039;ndb.RT_carriers&#039;)&lt;br /&gt;
 &lt;br /&gt;
 RT_db.get_info() &lt;br /&gt;
 &lt;br /&gt;
 w,bare_carrier_dos=RT_db.build_f_bare_dos()&lt;br /&gt;
 w,carrier_dos=RT_db.build_delta_f_dos()&lt;br /&gt;
 fig = plt.figure(figsize=(15,5))&lt;br /&gt;
 plt.xlabel(&#039;Energy [eV]&#039;,fontsize=16)&lt;br /&gt;
 plt.ylabel(&#039;w-DOS&#039;,fontsize=16)&lt;br /&gt;
 plt.plot(w,bare_carrier_dos,color=&amp;quot;blue&amp;quot;, linewidth=2, linestyle=&amp;quot;-&amp;quot;,label=&amp;quot;equilibrium w-DOS&amp;quot;)&lt;br /&gt;
 plt.plot(w,carrier_dos,color=&amp;quot;red&amp;quot;, linewidth=2, linestyle=&amp;quot;-&amp;quot;,label=&amp;quot;excited carriers w-DOS&amp;quot;)&lt;br /&gt;
 plt.legend(fontsize=16)&lt;br /&gt;
 plt.show()&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here the plot of the Density of States, weighted for the occupation factors (w-DOS) for the equilibrium carries in blue and the excited carriers in red.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:W-dos.png|center| 1000px|w-DOS non-equilibrium]]&lt;br /&gt;
&lt;br /&gt;
= Energy shift in the band structure =&lt;br /&gt;
&lt;br /&gt;
The GW method is the standard approach to compute quasi-particle corrections. However, in presence of non-equilibrium carriers, or even at finite temperature the formulation of the GW self-energy needs to be refined. This is due to its frequency dependence, which results in extra terms when performing the analytic continuation from the Keldish contour&amp;lt;ref name=&amp;quot;thygesen2007&amp;quot;/&amp;gt; (non-equilibrium case) or from the Matsubara axis&amp;lt;ref name=&amp;quot;faleev2006&amp;quot;/&amp;gt; (finite temperature case) to the real time/frequency axis.&lt;br /&gt;
On the other hand the COHSEX self-energy, being static, avoids this complication. This is why we will compute changes in the QP corrections within the COHSEX approximation.&lt;br /&gt;
&lt;br /&gt;
To compute the Non-Equilibrium Absorption Spectra, we need to diagonalize a previously defined two-particle Hamiltonian. To account for the Non-Equilibrium effect, the Kohn-Sham energies, &amp;lt;math&amp;gt;\varepsilon_{c\mathbf{k}}, \varepsilon_{v\mathbf{k}}&amp;lt;/math&amp;gt;, calculated at the DFT level, need to be corrected. This requires calculating the following: COHSEX self-energy at equilibrium, COHSEX self-energy at non-equilibrium, and Equilibrium GW self-energy at Plasmon-Pole Approximation level.&lt;br /&gt;
&lt;br /&gt;
Using these, the energy correction, &amp;lt;math&amp;gt;\varepsilon^{corr,neq}&amp;lt;/math&amp;gt;, can be computed as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Large \varepsilon^{corr,neq}_{c\mathbf{k}} = \varepsilon^{GW,eq}_{c\mathbf{k}} + (\varepsilon^{cohsex,neq}_{c\mathbf{k}} - \varepsilon^{cohsex,eq}_{c\mathbf{k}})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The KS energies will be corrected as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Large \varepsilon^{KS,neq}_{c\mathbf{k}} = \varepsilon_{c\mathbf{k}} + \varepsilon^{corr,neq}_{c\mathbf{k}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These corrected KS energies will be used when diagonalizing the two-particle Hamiltonian.&lt;br /&gt;
&lt;br /&gt;
== COHSEX corrections at equilibrium ==&lt;br /&gt;
To make a COHSEX calculation at equilibrium, we do the following: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -p c -F 03_eq_cohsex.in &lt;br /&gt;
&lt;br /&gt;
which will create a file with the following content: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_eq_cohsex.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 gw0                              # [R] GW approximation&lt;br /&gt;
 cohsex                           # [R][Xp] COlumb Hole Screened EXchange&lt;br /&gt;
 dyson                            # [R] Dyson Equation solver&lt;br /&gt;
 el_el_corr                       # [R] Electron-Electron Correlation&lt;br /&gt;
 HF_and_locXC                     # [R] Hartree-Fock&lt;br /&gt;
 em1s                             # [R][Xs] Statically Screened Interaction&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 SE_Threads=0                     # [OPENMP/GW] Number of threads for self-energy&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 EXXRLvcs= 15             Ry    # [XX] Exchange    RL components&lt;br /&gt;
 VXCRLvcs= 15             Ry    # [XC] XCpotential RL components&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 Chimod= &amp;quot;HARTREE&amp;quot;                # [X] IP/Hartree/ALDA/LRC/PF/BSfxc&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 |  30 |                         # [Xs] Polarization function bands &lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 3                Ry    # [Xs] Response block size&lt;br /&gt;
 UseEbands&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
   1 | 40 |                   # [GW] G[W] bands range&lt;br /&gt;
 %&amp;lt;/span&amp;gt;&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;%QPkrange                        # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 1|1|2|7|&lt;br /&gt;
 %&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;EXXRLvcs&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;VXCRLvcs&amp;lt;/code&amp;gt; were increased up to 15 Ry, due to the fact that computation of terms to which those cut-offs correspond, is not computationally demanding. The number of Polarization function bands, &amp;lt;code&amp;gt;BndsRnXs&amp;lt;/code&amp;gt; was changed to &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt;, and the quasi-particles generalized Kpoint and Band indices,&amp;lt;code&amp;gt;QPkrange&amp;lt;/code&amp;gt;, was changed from &amp;lt;code&amp;gt;1|29|1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1|1|2|7&amp;lt;/code&amp;gt;. Additionally the following lines were added &lt;br /&gt;
 UseEbands&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
   1 | 40 |                   # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
to force Yambo to do a calculation where self-energy depends on the conduction bands too, or this is also known as [https://wiki.yambo-code.eu/wiki/index.php?title=Silicon COHSEX with empty bands]. Alternatively, an option option &amp;lt;code&amp;gt;-V qp&amp;lt;/code&amp;gt; can be added when generating the file, but it will include a lot of redundant variables. &lt;br /&gt;
&lt;br /&gt;
And after it we run the file with the following command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 03_eq_cohsex.in -J cohsex_eq_emp -C cohsex_eq_emp&lt;br /&gt;
&lt;br /&gt;
We can plot the &amp;lt;code&amp;gt;o-cohsex_eq_emp.qp&amp;lt;/code&amp;gt; file from the &amp;lt;code&amp;gt;cohsex_eq_emp&amp;lt;/code&amp;gt; folder, to find out the gap opening due to the COHSEX correction. The plot can be done using the [[Gnuplot scripts|plot_qp_energies.gnu]]. &lt;br /&gt;
&lt;br /&gt;
[[File:Band opening eq cohsex plot.png|800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The points used to calculate band opening are: (0.000000, -1.034067) and (1.608910, -0.449499), which corresponds to an opening of 0.584568 eV.&lt;br /&gt;
&lt;br /&gt;
== COHSEX corrections in presence of non-equilibrium carriers ==&lt;br /&gt;
Before making a COHSEX calculation, we need to recalculate the static screening in the presence of non-equilibrium carriers. After it, we can make a COHSEX calculation in the presence of non-equilibrium carriers using the &amp;lt;code&amp;gt;ndb.RT_carriers&amp;lt;/code&amp;gt; database generated in the previous step with the &amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt; module. To do this, we do the following: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -p c -F 03_neq_cohsex.in &lt;br /&gt;
&lt;br /&gt;
where we need to add the following lines: &lt;br /&gt;
&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 GfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
&lt;br /&gt;
and the resulting file is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_neq_cohsex.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 gw0                              # [R] GW approximation&lt;br /&gt;
 cohsex                           # [R][Xp] COlumb Hole Screened EXchange&lt;br /&gt;
 dyson                            # [R] Dyson Equation solver&lt;br /&gt;
 el_el_corr                       # [R] Electron-Electron Correlation&lt;br /&gt;
 HF_and_locXC                     # [R] Hartree-Fock&lt;br /&gt;
 em1s                             # [R][Xs] Statically Screened Interaction&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 SE_Threads=0                     # [OPENMP/GW] Number of threads for self-energy&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 EXXRLvcs= 15             Ry    # [XX] Exchange    RL components&lt;br /&gt;
 VXCRLvcs= 15             Ry    # [XC] XCpotential RL components&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 Chimod= &amp;quot;HARTREE&amp;quot;                # [X] IP/Hartree/ALDA/LRC/PF/BSfxc&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 |  30 |                         # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 UseEbands&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
   1 | 40 |                   # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 GfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 NGsBlkXs= 3                Ry    # [Xs] Response block size&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 %QPkrange                        # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 1|1|2|7|&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we added the respective two lines with &amp;lt;code&amp;gt;XfnRTdb&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;GfnRTdb&amp;lt;/code&amp;gt;, and made changes to &amp;lt;code&amp;gt;BndsRnXs&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;QPkrange&amp;lt;/code&amp;gt; similar to the equilibrium case. Additionally, we added the lines to force Yambo to do a COHSEX calculation with empty bands. &lt;br /&gt;
&lt;br /&gt;
The line &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; em1s                             # [R][Xs] Statically Screened Interaction&lt;br /&gt;
&lt;br /&gt;
will tell Yambo to make the static screening calculation, and the lines:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; gw0                              # [R] GW approximation&lt;br /&gt;
 &amp;gt; cohsex                           # [R][Xp] COlumb Hole Screened EXchange&lt;br /&gt;
&lt;br /&gt;
will tell Yambo to do make a COHSEX calculation. &lt;br /&gt;
&lt;br /&gt;
After it we can run the file with the command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 03_neq_cohsex.in -J cohsex_neq -C cohsex_neq&lt;br /&gt;
&lt;br /&gt;
We can plot &amp;lt;code&amp;gt;o-cohsex_neq.qp&amp;lt;/code&amp;gt; file from the &amp;lt;code&amp;gt;cohsex_neq&amp;lt;/code&amp;gt; folder, to find the gap opening due the COHSEX correction and the non-equilibrium distribution of the carriers. The plot can be done using the [[Gnuplot scripts|plot_qp_energies.gnu]].&lt;br /&gt;
&lt;br /&gt;
[[File:Band opening neq cohsex plot.png .png|800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The points to calculate band opening are (0.000000, -0.882580), and (1.608910, -0.535269), which correspond to an opening of 0.347311 eV.&lt;br /&gt;
&lt;br /&gt;
== GW PPA corrections for the equilibrium case ==&lt;br /&gt;
&lt;br /&gt;
This subchapter can be skipped, and replaced by using scissors operator when diagonalizing the two particle Hamiltonian. &lt;br /&gt;
&lt;br /&gt;
To get accurate values for the band gap value we need to go beyond COHSEX approximation. Therefore we will obtain the Quasi-particle corrections in the plasmon pole approximation for equilibrium case, and in next steps, to this value we will add the correction calculated at COHSEX approximation to account for the non-equilibrium state of the system. &lt;br /&gt;
&lt;br /&gt;
To make this calculation, we do the following: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -p p -F 03_eq_qp_ppa.in &lt;br /&gt;
&lt;br /&gt;
which will create a file with the following content: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_eq_qp_ppa.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 gw0                              # [R] GW approximation&lt;br /&gt;
 ppa                              # [R][Xp] Plasmon Pole Approximation for the Screened Interaction&lt;br /&gt;
 el_el_corr                       # [R] Electron-Electron Correlation&lt;br /&gt;
 HF_and_locXC                     # [R] Hartree-Fock&lt;br /&gt;
 em1d                             # [R][X] Dynamically Screened Interaction&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 SE_Threads=0                     # [OPENMP/GW] Number of threads for self-energy&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 EXXRLvcs= 15             Ry    # [XX] Exchange    Ry components&lt;br /&gt;
 VXCRLvcs= 15             Ry    # [XC] XCpotential Ry components&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 Chimod= &amp;quot;HARTREE&amp;quot;                # [X] IP/Hartree/ALDA/LRC/PF/BSfxc&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
    1 |  30 |                         # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt; &lt;br /&gt;
 NGsBlkXp= 3                Ry    # [Xp] Response block size&lt;br /&gt;
 % LongDrXp&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [Xp] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 PPAPntXp= 27.21138         eV    # [Xp] PPA imaginary energy&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;  &lt;br /&gt;
 % GbndRnge&lt;br /&gt;
    1 |  40 |                         # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt; &lt;br /&gt;
 GTermKind= &amp;quot;none&amp;quot;                # [GW] GW terminator (&amp;quot;none&amp;quot;,&amp;quot;BG&amp;quot; Bruneval-Gonze,&amp;quot;BRS&amp;quot; Berger-Reining-Sottile)&lt;br /&gt;
 DysSolver= &amp;quot;n&amp;quot;                   # [GW] Dyson Equation solver (&amp;quot;n&amp;quot;,&amp;quot;s&amp;quot;,&amp;quot;g&amp;quot;,&amp;quot;q&amp;quot;)&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 %QPkrange                        # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 1|1|2|7|&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;       &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the following changes have been made: the number of polarization function bands, &amp;lt;code&amp;gt;BndsRnXp&amp;lt;/code&amp;gt; was changed to &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt;, the G[W] bands range, &amp;lt;code&amp;gt;GbndRnge&amp;lt;/code&amp;gt; was changed from &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1|40&amp;lt;/code&amp;gt;, and quasi-particle generalized k points  and band indices, &amp;lt;code&amp;gt;QPkrange&amp;lt;/code&amp;gt; was changed from &amp;lt;code&amp;gt;1|29|1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1|1|2|7&amp;lt;/code&amp;gt;. And after it we run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 03_eq_qp_ppa.in -J gw_eq -C gw_eq&lt;br /&gt;
&lt;br /&gt;
We can plot the &amp;lt;code&amp;gt;o-gw_eq.qp&amp;lt;/code&amp;gt; file from the &amp;lt;code&amp;gt;eq_gw_bse&amp;lt;/code&amp;gt; folder, to find out the gap opening due to the plasmon-pole approximation. The plot can be done using the [[Gnuplot scripts|plot_qp_energies.gnu]]. &lt;br /&gt;
&lt;br /&gt;
[[File:O gw eq qp plot.png|800px|frameless]]&lt;br /&gt;
&lt;br /&gt;
The points used to calculated band opening are (0, -0.045932), and (1.608910, 0.456526), which correspond to an opening of 0.502458 eV. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;(OPTIONAL)&#039;&#039;&#039; Additionally, after computing the QP corrections those can be used during the BSE corrections.  To do it, we create file similar to the [[Nonequilibrium absorption in bulk silicon|Solving the Bethe-Salpeter equation]], where we do not add the scissors line, but we add &amp;lt;code&amp;gt;KfnQPdb= &amp;quot;E &amp;lt; gw_eq/ndb.QP&amp;quot;&amp;lt;/code&amp;gt;. &lt;br /&gt;
The final file will look like &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_eq_bse.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 15             Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 #WehCpl                        # [BSK] eh interaction included also in coupling&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %  &lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 % BSEBands&lt;br /&gt;
   2 |  7 |                           # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 % BEnRange&lt;br /&gt;
  2.200000 | 5.000000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt; &lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 % &lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; gw_eq/ndb.QP&amp;quot;&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
 #WRbsWF                        # [BSS] Write to disk excitonic the WFs     &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and we run this file by typing: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 03_eq_bse.in -J &amp;quot;eq_gw_bse,gw_eq&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Data post-processing ==&lt;br /&gt;
Now after obtaining all the energy components that we need to calculate corrections to Kohn-Sham energies for the Non-Equilibrium case, we can manipulate them using the yambo&#039;s real time post processing module, &amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt;. We want to obtain energies defined by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Large \varepsilon^{corr,neq}_{c\mathbf{k}} = \varepsilon^{GW,eq}_{c\mathbf{k}} + (\varepsilon^{cohsex,neq}_{c\mathbf{k}} - \varepsilon^{cohsex,eq}_{c\mathbf{k}})&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Therefore we create a yambo post processing file with the following contents: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp3 (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
QPDBs                      	# [R] Quasi-particle databases&lt;br /&gt;
QPDB_merge                 	# [R] Mergering&lt;br /&gt;
%Actions_and_names       	# [QPDB] QP databases and Actions (format is &amp;quot;what&amp;quot;|&amp;quot;OP&amp;quot;|&amp;quot;prefactor&amp;quot;|&amp;quot;DB&amp;quot;|). OP can be ±/x.&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_neq/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;-&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_eq_emp/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;Z&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;gw_eq/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;gw_eq/ndb.QP&amp;quot; |&lt;br /&gt;
%       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we tell ypp to take from the quasi particle correction databases the values of &amp;lt;math&amp;gt;\varepsilon^{cohsex,neq}_{c\mathbf{k}}&amp;lt;/math&amp;gt; subtract from them &amp;lt;math&amp;gt;\varepsilon^{cohsex,eq}_{c\mathbf{k}}&amp;lt;/math&amp;gt;, multiply the resulting value by &amp;lt;code&amp;gt;?????&amp;lt;/code&amp;gt;  and add it to &amp;lt;math&amp;gt;\varepsilon^{GW,eq}_{c\mathbf{k}}&amp;lt;/math&amp;gt; and save them in the the new database &amp;lt;code&amp;gt;ndb.QP_merged_1_gw_cohsex_gw_ppa&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
We run the file by the following command: &lt;br /&gt;
&lt;br /&gt;
 $ ypp_rt -F input_ypp3 -J QP_merge -C QP_merge&lt;br /&gt;
&lt;br /&gt;
Or alternatively, if no calculation for the quasiparticle correction has been made (except the COHSEX calculation), and a scissors operator is going to be used, we can use the following yambo post processing file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp3_scissors (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
QPDBs                      	# [R] Quasi-particle databases&lt;br /&gt;
QPDB_merge                 	# [R] Mergering&lt;br /&gt;
%Actions_and_names       	# [QPDB] QP databases and Actions (format is &amp;quot;what&amp;quot;|&amp;quot;OP&amp;quot;|&amp;quot;prefactor&amp;quot;|&amp;quot;DB&amp;quot;|). OP can be ±/x.&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_neq/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;-&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_eq_emp/ndb.QP&amp;quot; |&lt;br /&gt;
%  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which will just take from the quasi particle correction databases the values of &amp;lt;math&amp;gt;\varepsilon^{cohsex,neq}_{c\mathbf{k}}&amp;lt;/math&amp;gt; subtract from them &amp;lt;math&amp;gt;\varepsilon^{cohsex,eq}_{c\mathbf{k}}&amp;lt;/math&amp;gt;. And we run this file by: &lt;br /&gt;
&lt;br /&gt;
 $ ypp_rt -F input_ypp3_scissors -J QP_merge_scissor -C QP_merge_scissor&lt;br /&gt;
&lt;br /&gt;
= Renormalization of the exciton binding energy =&lt;br /&gt;
&lt;br /&gt;
We finally perform a BSE calculation loading both the nonequilibrium carriers and the quasi-particle energy shifts. The Non-Equilibrium Hamiltonian is: &lt;br /&gt;
&lt;br /&gt;
[[File:Neq h.png|310px|frameless|left]] &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Where quantities entering into the hamiltonian are the non-equilibrium counterparts of the quantities discussion for the EQ Hamiltonian, and &amp;lt;math&amp;gt;\tau&amp;lt;/math&amp;gt; is the pump probe delay. The &amp;lt;math&amp;gt;\Delta \epsilon^{\tau}_l&amp;lt;/math&amp;gt; is the difference between non-equilibrium COHSEX and equilibrium COHSEX energy (calculated in the COHSEX chapter). &lt;br /&gt;
&lt;br /&gt;
We create a file using the following command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -o b -y h -F 04_neq_bse.in&lt;br /&gt;
&lt;br /&gt;
== With GW qp corrections ==&lt;br /&gt;
&lt;br /&gt;
Compared to the equilibrium case we add the lines:&lt;br /&gt;
&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge/ndb.QP_merged_1_gw_cohsex_gw_ppa&amp;quot;&lt;br /&gt;
&lt;br /&gt;
the resulting structure of the file is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 04_neq_bse.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions &lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 3             Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 #WehCpl                        # [BSK] eh interaction included also in coupling&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   2 |  7 |                           # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BEnRange&lt;br /&gt;
  2.200000 | 5.000000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge/ndb.QP_merged_1_gw_cohsex_gw_ppa&amp;quot;&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
 #WRbsWF                        # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we added the lines, and changed the bands range, &amp;lt;code&amp;gt;BSEBands&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2|7&amp;lt;/code&amp;gt;, energy range, &amp;lt;code&amp;gt;BEnRange&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;0.00000 | 10.00000 &amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2.00000 | 10.00000 |&amp;lt;/code&amp;gt; and energy steps, &amp;lt;code&amp;gt;BEnSteps&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;100&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;200&amp;lt;/code&amp;gt;. And we run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 04_neq_bse.in -J &amp;quot;neq_bse,gw_eq&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Alternatively, when scissors are used, the lines can be added, to account for the lack of a proper GW correction.&lt;br /&gt;
&lt;br /&gt;
The final plot from the calculations presented in this tutorial, for k-grid 8x8x8, with NEQ BSE with QP corrections, EQ BSE with QP corrections (not presented in this tutorial), and Experimental Data looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--[[File:NEQ2 abs bulk silicon tutorial plot results kgrid8.png|800px|frameless|center]]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[[File:Plot results kgrid8 7ry.png|800px|frameless|center]]--&amp;gt;&lt;br /&gt;
[[File:Plot results kgrid8 15 3ry.png||800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
In case, a better convergence is needed, a 16x16x16 k-grid can be used. To decrease computational time, the GW corrections can be done on lower grid, whereas solving the BSE equation can be done on higher k-grids. And for the 16x16x16 k-grid the plot looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Neq abs bulk silicon plot kgrid16.png|800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The plots can be done using [[Gnuplot scripts|plot_absorbance.gnu]] gnuplot script.&lt;br /&gt;
&lt;br /&gt;
== With scissor corrections ==&lt;br /&gt;
&lt;br /&gt;
Compared to the equilibrium case we just add the lines below:&lt;br /&gt;
&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge_scissor/ndb.QP_merged_1_gw_cohsex&amp;quot;&lt;br /&gt;
&lt;br /&gt;
the resulting structure of the file is (lines for nonequilibrium simulations added in red):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 04_neq_bse_scissors.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 3             Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 #WehCpl                        # [BSK] eh interaction included also in coupling&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  0.700000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge/ndb.QP_merged_1_gw_cohsex&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot; &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
    2 |  7 |                         # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BEnRange&lt;br /&gt;
   2.20000 | 5.00000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&amp;lt;/span&amp;gt;&lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 %&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
 #WRbsWF                        # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we added the lines, and changed the bands range, &amp;lt;code&amp;gt;BSEBands&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2|7&amp;lt;/code&amp;gt;, energy range, &amp;lt;code&amp;gt;BEnRange&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;0.00000 | 10.00000 &amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2.20000 | 5.00000 |&amp;lt;/code&amp;gt; and energy steps, &amp;lt;code&amp;gt;BEnSteps&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;100&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;200&amp;lt;/code&amp;gt;.  And we run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 04_neq_bse_sciss.in -J &amp;quot;neq_bse,gw_eq&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;sangalli2016&amp;quot;&amp;gt;D. Sangalli, S. Dal Conte, C. Manzoni, G. Cerullo, and A. Marini, [https://doi.org/10.1103/PhysRevB.93.195205 Phis. Rev. &#039;&#039;&#039;B 93&#039;&#039;&#039;, 195205 (2016)] ([https://arxiv.org/abs/1603.00225 arXiv1603.00225])&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;sangalli2016epl&amp;quot;&amp;gt;D. Sangalli, and A. Marini, [https://doi.org/10.1209/0295-5075/110/47004 Europhys. Lett. &#039;&#039;&#039;110&#039;&#039;&#039;, 47004 (2016)] ([https://arxiv.org/abs/1409.1706 arXiv1409.1706])&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;faleev2006&amp;quot;&amp;gt;S. V. Faleev, M. van Schilfgaarde, T. Kotani, F. Léonard, and M. P. Desjarlais, [https://doi.org/10.1103/PhysRevB.74.033101 Phys. Rev. &#039;&#039;&#039;B 74&#039;&#039;&#039;, 033101 (2006)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;thygesen2007&amp;quot;&amp;gt;K. S. Thygesen, and A. Rubio, [https://doi.org/10.1063/1.2565690 J. Chem. Phys. &#039;&#039;&#039;126&#039;&#039;&#039;, 091101 (2007)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Nonequilibrium_absorption_in_bulk_silicon&amp;diff=9019</id>
		<title>Nonequilibrium absorption in bulk silicon</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Nonequilibrium_absorption_in_bulk_silicon&amp;diff=9019"/>
		<updated>2025-09-08T13:50:04Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will learn the basic concepts for computing changes in the optical properties of a semi-conductor in presence of a non-equilibrium electrons and holes distribution in conduction and valence band respectively. This tutorial is based on the results published in Phys. Rev. B&amp;lt;ref name=&amp;quot;sangalli2016&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Under construction&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= The material: Silicon =&lt;br /&gt;
&lt;br /&gt;
We will study nonequilibrium absorption in bulk silicon. The same material used for this [[Silicon|GW tutorial]] &lt;br /&gt;
&lt;br /&gt;
* [http://cst-www.nrl.navy.mil/lattice/struk/a1.html FCC] lattice&lt;br /&gt;
* Two atoms per cell (8 electrons)&lt;br /&gt;
* Lattice constant 10.183 [a.u.]&lt;br /&gt;
* Plane waves cutoff 15 Rydberg&lt;br /&gt;
* Direct gap   3.4 eV at Gamma&lt;br /&gt;
* Indirect gap 1.1 eV between Gamma= (0 0 0) and a point X&#039;, close to X=(0 1 0)&lt;br /&gt;
&lt;br /&gt;
[[File:si_banddiagram.gif|thumb|x400px|Silicon Band Structure]]&lt;br /&gt;
&lt;br /&gt;
= Tutorial files and Tutorial structure =&lt;br /&gt;
Follow the instructions in [[Tutorials download]] and download/unpack the &amp;lt;code&amp;gt;Silicon.tar.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
Once the tutorial archive file is unzipped the following folder structure will appear&lt;br /&gt;
 COPYING  README  Silicon/&lt;br /&gt;
&lt;br /&gt;
with the Solid_Si folder containing&lt;br /&gt;
 &amp;gt; ls Silicon/ &lt;br /&gt;
 PWSCF/  YAMBO/&lt;br /&gt;
&lt;br /&gt;
In the Pwscf folder  the student will find an input/output directory with input/output files for pw.x. The Silicon pseudopotential file is also provided.&lt;br /&gt;
 &amp;gt; ls PWSCF/&lt;br /&gt;
 convergence_scripts  input  output  psps&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;convergence_scripts&amp;lt;/code&amp;gt; you will find some useful shell scripts to run the ground state convergence runs for Silicon.&lt;br /&gt;
The YAMBO folder contains the Yambo input/output files and core databases.&lt;br /&gt;
 &amp;gt; ls YAMBO/&lt;br /&gt;
 2x2x2/  4x4x4/  6x6x6/  8x8x8/  Convergence_Plots_and_Scripts/  GAMMA/&lt;br /&gt;
&lt;br /&gt;
The core databases are provided for several k-points grids. In addition the folder &amp;lt;code&amp;gt;Convergence_Plots_and_Scripts&amp;lt;/code&amp;gt; contains some scripts used for the [Silicon|GW tutorial] .&lt;br /&gt;
Here we will just use the 8x8x8 (which is still very far from convergence) folder for computing (nonequilibrium) optical properties.&lt;br /&gt;
&lt;br /&gt;
To run the tutorial you will need the standard executables&lt;br /&gt;
 yambo&lt;br /&gt;
 ypp &lt;br /&gt;
plus the executables of the real time module of the Yambo code&lt;br /&gt;
 yambo_rt&lt;br /&gt;
 ypp_rt&lt;br /&gt;
&lt;br /&gt;
= Overview of the simulations in this tutorial= &lt;br /&gt;
We start from a density-functional theory (DFT) calculation as the foundation. As a first demonstrative step, we will solve the Bethe-Salpeter equation (BSE) for the equilibrium case without including quasiparticle (QP) corrections. Once this is completed, we will use the Yambo post-processing module, &amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt;, to generate a distribution of non-equilibrium carriers. This distribution will be used in all subsequent non-equilibrium (NEQ) calculations. It is important to note that solving the non-equilibrium BSE is not feasible within the GW plasmon pole approximation. To address this limitation, we will instead solve the BSE for the equilibrium case and apply corrections to the energy values using a non-equilibrium COHSEX calculation.&lt;br /&gt;
&lt;br /&gt;
The QP band structure will show the effect of the screened electron-electron interaction, while the absorption spectrum within the BSE accounts for the effect of the electron-hole interaction. When QP corrections are not available, they can be included using the scissor operator &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt;, and the numerical values for &amp;quot;corrections&amp;quot; can be deduced from a GW calculation. For more information about solving the Equilibrium BSE equation refer to the following tutorial: [https://wiki.yambo-code.eu/wiki/index.php/Calculating%20optical%20spectra%20including%20excitonic%20effects:%20a%20step-by-step%20guide Calculating optical spectra including excitonic effects: a step-by-step guide]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; List of Steps Executed in This Module (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
# Equilibrium BSE Calculation (Demonstrative)  &lt;br /&gt;
# Generating non-equilibrium carriers &lt;br /&gt;
# Equilibrium and non-equilibrium COHSEX calculations &lt;br /&gt;
# Calculation of QP-PPA corrections to Silicon (Optional) &lt;br /&gt;
# Non-Equilibrium BSE Calculation&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The run of all the files in this tutorial should take around 2-5 minutes in total. In case a faster run is needed, results from a lower kgrid can be used, or some converged criteria can be used, for example lowering the &amp;lt;code&amp;gt;NGsBlkXs&amp;lt;/code&amp;gt; and/or &amp;lt;code&amp;gt;NGsBlkXp&amp;lt;/code&amp;gt;, or lowering the number of conduction bands used in the calculations.&lt;br /&gt;
&lt;br /&gt;
= Equilibrium optical properties =&lt;br /&gt;
&lt;br /&gt;
In this part, we will solve the equilibrium BSE calculation without quasiparticle corrections. &lt;br /&gt;
&lt;br /&gt;
Enter the folder 8x8x8, and initialize yambo in the respective folder &lt;br /&gt;
 $ cd 8x8x8&lt;br /&gt;
 $ yambo&lt;br /&gt;
&lt;br /&gt;
== Static screening at equilibrium ==&lt;br /&gt;
&lt;br /&gt;
First, to solve the BSE equation we need to calculate the statically screened electron-electron interaction (W), which is related to static dielectric screening &amp;lt;math&amp;gt; \epsilon^{-1} &amp;lt;/math&amp;gt;. &lt;br /&gt;
&amp;lt;!--&amp;lt;math&amp;gt; \Large&lt;br /&gt;
\epsilon^{-1}_{\mathbf{G},\mathbf{G&#039;}} (\mathbf{q}, \omega = 0) = \delta_{\mathbf{G},\mathbf{G&#039;}} + v(\mathbf{v} + \mathbf{G}) \chi_{\mathbf{G},\mathbf{G&#039;}(\mathbf{q}}, \omega = 0)&amp;lt;/math&amp;gt;--&amp;gt;&lt;br /&gt;
[[File:Static dielectric screening.png|550px|frameless|left]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To do this create the following input file: &lt;br /&gt;
 $ yambo -X s -F 01_EQ_BSE_screening.in&lt;br /&gt;
&lt;br /&gt;
with the following contents: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 01_EQ_BSE_screening.in file (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 em1s                                 # [R][Xs] Statically Screened Interaction&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 |  30 |                         # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 3000                   mRy    # [Xs] Response block size&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |    # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where we changed the response block size &amp;lt;code&amp;gt;NGsBlkXs = 3000 mRy&amp;lt;/code&amp;gt; and number of polarization function bands &amp;lt;code&amp;gt;BndsRnXs&amp;lt;/code&amp;gt; to be in the range of 1 to 30. Now run the file:&lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 01_EQ_BSE_screening.in -J EQ_BSE&lt;br /&gt;
&lt;br /&gt;
== Solving the Bethe-Salpeter equation == &lt;br /&gt;
To solve the (equilibrium) Bethe-Salpeter equation, the latter is usually rewritten in the space of transitions between valence and conduction states as the (pseudo)eigenvalue problem for a two-particle Hamiltonian. In the &amp;lt;math&amp;gt; q = 0 &amp;lt;/math&amp;gt; limit, the two-particle Hamiltonian matrix elements are given by:&lt;br /&gt;
&amp;lt;!--&amp;lt;math&amp;gt; \widetilde{H}_{ll&#039;} = \widetilde{\varepsilon}_l - \sqrt{\widetilde{f}_l} \left( v_{ll&#039;} - \widetilde{W}^{s}_{ll&#039;} \right) \sqrt{\widetilde{f}_{l&#039;}} &amp;lt;/math&amp;gt; --&amp;gt;&lt;br /&gt;
[[File:H_eq_bse_2016.png|310px|frameless|left]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where compact notation  &amp;lt;math&amp;gt; l = \{mn\mathbf{k}\} &amp;lt;/math&amp;gt;, was introduced, and quantities with a tilde represent the corresponding quantity evaluated at equilibrium. &lt;br /&gt;
&lt;br /&gt;
For equilibrium occupation factor and energy (KS or QP corrected KS energies): &lt;br /&gt;
[[File:Equilibrium occ factor.png|160px|frameless|left|Equilibrium occupation factor]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Epsilon eng l.png|160px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Moreover, it was defined: &lt;br /&gt;
[[File:W ss.png|300px|frameless|left]] &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:V ss.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;math&amp;gt;\widetilde{W}_{GG&#039;}(\mathbf{q}, 0)&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;v_{G}(\mathbf{q})&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt; \rho_{nm\mathbf{k}, G}(\mathbf{q})&amp;lt;/math&amp;gt; are static approximation to the screened interaction, bare Coulomb interaction, and KS response function respectively. After calculating the equilibrium Bethe-Salpeter kernel, the resulting two-particle Hamiltonian can be diagonalized to compute the macroscopic dielectric function, which can be used to get absorption and EELS spectra. Calculation of BS kernel and diagonalization of Hamiltonian can be done in one step. For a more detailed description please consult  Phis. Rev. B 93, 195205 (2016). &lt;br /&gt;
&lt;br /&gt;
To generate the input file for the calculation of BSE kernel, run the following command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -o b -k sex -F 02_EQ_BSE_kernel_diag.in -y h -V qp -J EQ_BSE&lt;br /&gt;
&lt;br /&gt;
with the following input&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 02_EQ_BSE_kernel_diag.in file (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 15000            mRy    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BSEBands&lt;br /&gt;
    2 |  7 |                         # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 % BEnRange&lt;br /&gt;
   2.20000 | 5.00000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  0.70000 | 1.000000 | 1.000000 |      # [EXTQP BSK BSS] E parameters (c/v)&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/...&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where the value of &amp;lt;code&amp;gt;BSENGexx&amp;lt;/code&amp;gt; was changed for better convergence, &amp;lt;code&amp;gt;BSEBands&amp;lt;/code&amp;gt; was changed to include bands from 2 to 7, which defines the basis of quasiparticle pairs that are used to describe excitons. 3 degenerate valence and 3 degenerate conduction bands where included. &amp;lt;code&amp;gt;BEnRange&amp;lt;/code&amp;gt; was changed to 2.2-5.5 eV to match experimental data, and &amp;lt;code&amp;gt;BEnSteps&amp;lt;/code&amp;gt; was increased from 100 to 200. The scissors operator &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt; was used to match the possiton calculated spectra with experimental values. The Haydock BSE solver was chosen, &amp;lt;code&amp;gt;-y h&amp;lt;/code&amp;gt; option, because it is substantially cheaper than the full diagonalization (quadratic with the number of electron-hole pairs). However, this approach does not provide the individual exciton energies and composition in terms of electron-hole pairs. The [https://wiki.yambo-code.eu/wiki/index.php/BSE%20solvers%20overview BSE solvers overview] page can provide more info on the subject. &lt;br /&gt;
&lt;br /&gt;
To run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 02_EQ_BSE_kernel_diag.in -J EQ_BSE&lt;br /&gt;
&lt;br /&gt;
After the calculation has finished, the absorption spectra can be plotted with the following: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; gnuplot commands (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gnuplot&lt;br /&gt;
...&lt;br /&gt;
gnuplot&amp;gt; set xlabel &amp;quot;Energy (eV)&amp;quot;&lt;br /&gt;
gnuplot&amp;gt; set ylabel &amp;quot;Absorption&amp;quot; &lt;br /&gt;
gnuplot&amp;gt; plot &#039;o-EQ_BSE.eps_q1_haydock_bse&#039; u 1:2 w l t &#039;-k sex&#039;&lt;br /&gt;
gnuplot&amp;gt; rep  &#039;o-EQ_BSE.eps_q1_haydock_bse&#039; u 1:4 w l t &#039;-k ip&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the following plot will results (the &amp;quot;experimental&amp;quot; and &amp;quot;-k hartree&amp;quot; plots are added additionally for comparison) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; Plot of the computed spectra &amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:Plot of Si absorption spectra.png|900px|frameless|Plots of computed absorption spectra for the equilibrium case.]]&lt;br /&gt;
&lt;br /&gt;
= Generating non-equilibrium carriers =&lt;br /&gt;
To simulate non-equilibrium absorption, we need to define the number of non-equilibrium carriers, specifically electrons in the conduction band and holes in the valence band. These carriers follow the Fermi-Dirac distribution given by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&amp;lt;math&amp;gt;\Large f(E) = 1 / (exp((E - μ) / k_B T) + 1)&amp;lt;/math&amp;gt;--&amp;gt;&lt;br /&gt;
[[File:Fermi dirac distr.png|250px]]&lt;br /&gt;
&lt;br /&gt;
Here:&lt;br /&gt;
* 	E is the energy level,&lt;br /&gt;
* 	&amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt; is the chemical potential (specific to electrons or holes),&lt;br /&gt;
* 	&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; is the effective temperature,&lt;br /&gt;
* 	&amp;lt;math&amp;gt;k_B&amp;lt;/math&amp;gt; is the Boltzmann constant.&lt;br /&gt;
&lt;br /&gt;
For the simulation, both electrons and holes are characterized by their own &amp;lt;math&amp;gt;\mu_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;T_i&amp;lt;/math&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
The distribution of non-equilibrium carriers can be generated using Yambo’s post processing for real-time module (&amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt;), which allows modeling of these conditions.&lt;br /&gt;
&lt;br /&gt;
To generate to non-equilibrium carriers databases create &amp;lt;code&amp;gt;input_ypp1 input_ypp2&amp;lt;/code&amp;gt; files, with the following content: &lt;br /&gt;
&lt;br /&gt;
 ypp_rt -rtdb f -F input_ypp1&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp1 (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RTDBs                      	# [R] Real-Time databases&lt;br /&gt;
Select_Fermi               	# [R] NEQ DBs according to Fermi distribution&lt;br /&gt;
% RTBands&lt;br /&gt;
   1 | 30 |               	# [RT] Bands range&lt;br /&gt;
%&lt;br /&gt;
% RTmuEh&lt;br /&gt;
-0.223 | 0.10 | eV  	        # [RT] Chemical potentials hole | electron&lt;br /&gt;
%&lt;br /&gt;
% RTtempEh&lt;br /&gt;
 0.08 	| 0.08 	| eV  	    # [RT] Effective temperature hole | electron&lt;br /&gt;
%&lt;br /&gt;
RTautotuneThr= 0.000100    	# [RT] Threshold to match no. of pumped holes and electrons.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 ypp_rt -rtplot o -rtmode e -F input_ypp2&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp2 (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RealTime                   	# [R] Real-Time Post-Processing&lt;br /&gt;
RToccupations              	# [R] Analize time-dependent occupations&lt;br /&gt;
RTenergy                   	# [R] Post-Processing kind: function of energy&lt;br /&gt;
TimeStep= 0.000000 	fs  	# Time step&lt;br /&gt;
% TimeRange&lt;br /&gt;
-1.000000 |-1.000000 | fs  	# Time-window where processing is done&lt;br /&gt;
%&lt;br /&gt;
#IncludeEQocc              	# [NEGF] Include also equilibrium occupations&lt;br /&gt;
#SkipFermiFIT              	# [NEGF] Do a Fermi Fit of occupations (and lifetimes ratio)&lt;br /&gt;
%QPkrange                	#  generalized Kpoint/Band indices&lt;br /&gt;
  1| 1|  2|7|&lt;br /&gt;
%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And then run the files:&lt;br /&gt;
&lt;br /&gt;
 $ ypp_rt -F input_ypp1 -J carriers -C carriers &lt;br /&gt;
 $ ypp_rt -F input_ypp2 -J carriers -C carriers &lt;br /&gt;
&lt;br /&gt;
The file &amp;lt;code&amp;gt;input_ypp1&amp;lt;/code&amp;gt; will generate a &amp;lt;code&amp;gt;ndb.RT_carriers&amp;lt;/code&amp;gt; database which will contain the Fermi distribution of the electrons and the hole according to the specified chemical potential, &amp;lt;code&amp;gt;RTmuEh&amp;lt;/code&amp;gt;, and for a specific temperature given by &amp;lt;code&amp;gt;RTtempEh&amp;lt;/code&amp;gt;.  The file &amp;lt;code&amp;gt;input_ypp2&amp;lt;/code&amp;gt; will generate a series of databases to plot different different aspects of the distribution.&lt;br /&gt;
&lt;br /&gt;
Plot for the distribution of electrons in conduction band and holes in the valence band generated by the &amp;lt;code&amp;gt;input_ypp1&amp;lt;/code&amp;gt; and data file made by &amp;lt;code&amp;gt;input_ypp2&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--[[File:Plot occupation kgrid8 neq silicon.png|900px|frameless|center]]--&amp;gt; &lt;br /&gt;
[[File:Plot occupation kgrid8 neq silicon 2.png|900px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
This plot can be generated from the &amp;lt;code&amp;gt;carriers&amp;lt;/code&amp;gt; folder using the following gnuplot script [[Gnuplot scripts|plot_occupations.gnu]]&lt;br /&gt;
== Plotting non-equilibrium carriers with YamboPy ==&lt;br /&gt;
&lt;br /&gt;
Non equilibrium carries can also be read and plotted using YamboPy.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; YamboPy plotting &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 from yambopy import *&lt;br /&gt;
 import matplotlib.pyplot as plt&lt;br /&gt;
 import numpy as np&lt;br /&gt;
 &lt;br /&gt;
 RT_db=YamboRT_Carriers_DB(calc=&#039;carriers&#039;,carriers_db=&#039;ndb.RT_carriers&#039;)&lt;br /&gt;
 &lt;br /&gt;
 RT_db.get_info() &lt;br /&gt;
 &lt;br /&gt;
 w,bare_carrier_dos=RT_db.build_f_bare_dos()&lt;br /&gt;
 w,carrier_dos=RT_db.build_delta_f_dos()&lt;br /&gt;
 fig = plt.figure(figsize=(15,5))&lt;br /&gt;
 plt.xlabel(&#039;Energy [eV]&#039;,fontsize=16)&lt;br /&gt;
 plt.ylabel(&#039;w-DOS&#039;,fontsize=16)&lt;br /&gt;
 plt.plot(w,bare_carrier_dos,color=&amp;quot;blue&amp;quot;, linewidth=2, linestyle=&amp;quot;-&amp;quot;,label=&amp;quot;equilibrium w-DOS&amp;quot;)&lt;br /&gt;
 plt.plot(w,carrier_dos,color=&amp;quot;red&amp;quot;, linewidth=2, linestyle=&amp;quot;-&amp;quot;,label=&amp;quot;excited carriers w-DOS&amp;quot;)&lt;br /&gt;
 plt.legend(fontsize=16)&lt;br /&gt;
 plt.show()&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here the plot of the Density of States, weighted for the occupation factors (w-DOS) for the equilibrium carries in blue and the excited carriers in red.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:W-dos.png|center| 1000px|w-DOS non-equilibrium]]&lt;br /&gt;
&lt;br /&gt;
= Energy shift in the band structure =&lt;br /&gt;
&lt;br /&gt;
The GW method is the standard approach to compute quasi-particle corrections. However, in presence of non-equilibrium carriers, or even at finite temperature the formulation of the GW self-energy needs to be refined. This is due to its frequency dependence, which results in extra terms when performing the analytic continuation from the Keldish contour&amp;lt;ref name=&amp;quot;thygesen2007&amp;quot;/&amp;gt; (non-equilibrium case) or from the Matsubara axis&amp;lt;ref name=&amp;quot;faleev2006&amp;quot;/&amp;gt; (finite temperature case) to the real time/frequency axis.&lt;br /&gt;
On the other hand the COHSEX self-energy, being static, avoids this complication. This is why we will compute changes in the QP corrections within the COHSEX approximation.&lt;br /&gt;
&lt;br /&gt;
To compute the Non-Equilibrium Absorption Spectra, we need to diagonalize a previously defined two-particle Hamiltonian. To account for the Non-Equilibrium effect, the Kohn-Sham energies, &amp;lt;math&amp;gt;\varepsilon_{c\mathbf{k}}, \varepsilon_{v\mathbf{k}}&amp;lt;/math&amp;gt;, calculated at the DFT level, need to be corrected. This requires calculating the following: COHSEX self-energy at equilibrium, COHSEX self-energy at non-equilibrium, and Equilibrium GW self-energy at Plasmon-Pole Approximation level.&lt;br /&gt;
&lt;br /&gt;
Using these, the energy correction, &amp;lt;math&amp;gt;\varepsilon^{corr,neq}&amp;lt;/math&amp;gt;, can be computed as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Large \varepsilon^{corr,neq}_{c\mathbf{k}} = \varepsilon^{GW,eq}_{c\mathbf{k}} + (\varepsilon^{cohsex,neq}_{c\mathbf{k}} - \varepsilon^{cohsex,eq}_{c\mathbf{k}})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The KS energies will be corrected as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Large \varepsilon^{KS,neq}_{c\mathbf{k}} = \varepsilon_{c\mathbf{k}} + \varepsilon^{corr,neq}_{c\mathbf{k}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These corrected KS energies will be used when diagonalizing the two-particle Hamiltonian.&lt;br /&gt;
&lt;br /&gt;
== COHSEX corrections at equilibrium ==&lt;br /&gt;
To make a COHSEX calculation at equilibrium, we do the following: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -p c -F 03_eq_cohsex.in &lt;br /&gt;
&lt;br /&gt;
which will create a file with the following content: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_eq_cohsex.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 gw0                              # [R] GW approximation&lt;br /&gt;
 cohsex                           # [R][Xp] COlumb Hole Screened EXchange&lt;br /&gt;
 dyson                            # [R] Dyson Equation solver&lt;br /&gt;
 el_el_corr                       # [R] Electron-Electron Correlation&lt;br /&gt;
 HF_and_locXC                     # [R] Hartree-Fock&lt;br /&gt;
 em1s                             # [R][Xs] Statically Screened Interaction&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 SE_Threads=0                     # [OPENMP/GW] Number of threads for self-energy&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 EXXRLvcs= 15             Ry    # [XX] Exchange    RL components&lt;br /&gt;
 VXCRLvcs= 15             Ry    # [XC] XCpotential RL components&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 Chimod= &amp;quot;HARTREE&amp;quot;                # [X] IP/Hartree/ALDA/LRC/PF/BSfxc&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 |  30 |                         # [Xs] Polarization function bands &lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 3                Ry    # [Xs] Response block size&lt;br /&gt;
 UseEbands&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
   1 | 40 |                   # [GW] G[W] bands range&lt;br /&gt;
 %&amp;lt;/span&amp;gt;&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;%QPkrange                        # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 1|1|2|7|&lt;br /&gt;
 %&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;EXXRLvcs&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;VXCRLvcs&amp;lt;/code&amp;gt; were increased up to 15 Ry, due to the fact that computation of terms to which those cut-offs correspond, is not computationally demanding. The number of Polarization function bands, &amp;lt;code&amp;gt;BndsRnXs&amp;lt;/code&amp;gt; was changed to &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt;, and the quasi-particles generalized Kpoint and Band indices,&amp;lt;code&amp;gt;QPkrange&amp;lt;/code&amp;gt;, was changed from &amp;lt;code&amp;gt;1|29|1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1|1|2|7&amp;lt;/code&amp;gt;. Additionally the following lines were added &lt;br /&gt;
 UseEbands&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
   1 | 40 |                   # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
to force Yambo to do a calculation where self-energy depends on the conduction bands too, or this is also known as [https://wiki.yambo-code.eu/wiki/index.php?title=Silicon COHSEX with empty bands]. Alternatively, an option option &amp;lt;code&amp;gt;-V qp&amp;lt;/code&amp;gt; can be added when generating the file, but it will include a lot of redundant variables. &lt;br /&gt;
&lt;br /&gt;
And after it we run the file with the following command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 03_eq_cohsex.in -J cohsex_eq_emp -C cohsex_eq_emp&lt;br /&gt;
&lt;br /&gt;
We can plot the &amp;lt;code&amp;gt;o-cohsex_eq_emp.qp&amp;lt;/code&amp;gt; file from the &amp;lt;code&amp;gt;cohsex_eq_emp&amp;lt;/code&amp;gt; folder, to find out the gap opening due to the COHSEX correction. The plot can be done using the [[Gnuplot scripts|plot_qp_energies.gnu]]. &lt;br /&gt;
&lt;br /&gt;
[[File:Band opening eq cohsex plot.png|800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The points used to calculate band opening are: (0.000000, -1.034067) and (1.608910, -0.449499), which corresponds to an opening of 0.584568 eV.&lt;br /&gt;
&lt;br /&gt;
== COHSEX corrections in presence of non-equilibrium carriers ==&lt;br /&gt;
Before making a COHSEX calculation, we need to recalculate the static screening in the presence of non-equilibrium carriers. After it, we can make a COHSEX calculation in the presence of non-equilibrium carriers using the &amp;lt;code&amp;gt;ndb.RT_carriers&amp;lt;/code&amp;gt; database generated in the previous step with the &amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt; module. To do this, we do the following: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -p c -F 03_neq_cohsex.in &lt;br /&gt;
&lt;br /&gt;
where we need to add the following lines: &lt;br /&gt;
&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 GfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
&lt;br /&gt;
and the resulting file is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_neq_cohsex.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 gw0                              # [R] GW approximation&lt;br /&gt;
 cohsex                           # [R][Xp] COlumb Hole Screened EXchange&lt;br /&gt;
 dyson                            # [R] Dyson Equation solver&lt;br /&gt;
 el_el_corr                       # [R] Electron-Electron Correlation&lt;br /&gt;
 HF_and_locXC                     # [R] Hartree-Fock&lt;br /&gt;
 em1s                             # [R][Xs] Statically Screened Interaction&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 SE_Threads=0                     # [OPENMP/GW] Number of threads for self-energy&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 EXXRLvcs= 15             Ry    # [XX] Exchange    RL components&lt;br /&gt;
 VXCRLvcs= 15             Ry    # [XC] XCpotential RL components&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 Chimod= &amp;quot;HARTREE&amp;quot;                # [X] IP/Hartree/ALDA/LRC/PF/BSfxc&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 |  30 |                         # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 UseEbands&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
   1 | 40 |                   # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 GfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 NGsBlkXs= 3                Ry    # [Xs] Response block size&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 %QPkrange                        # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 1|1|2|7|&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we added the respective two lines with &amp;lt;code&amp;gt;XfnRTdb&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;GfnRTdb&amp;lt;/code&amp;gt;, and made changes to &amp;lt;code&amp;gt;BndsRnXs&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;QPkrange&amp;lt;/code&amp;gt; similar to the equilibrium case. Additionally, we added the lines to force Yambo to do a COHSEX calculation with empty bands. &lt;br /&gt;
&lt;br /&gt;
The line &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; em1s                             # [R][Xs] Statically Screened Interaction&lt;br /&gt;
&lt;br /&gt;
will tell Yambo to make the static screening calculation, and the lines:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; gw0                              # [R] GW approximation&lt;br /&gt;
 &amp;gt; cohsex                           # [R][Xp] COlumb Hole Screened EXchange&lt;br /&gt;
&lt;br /&gt;
will tell Yambo to do make a COHSEX calculation. &lt;br /&gt;
&lt;br /&gt;
After it we can run the file with the command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 03_neq_cohsex.in -J cohsex_neq -C cohsex_neq&lt;br /&gt;
&lt;br /&gt;
We can plot &amp;lt;code&amp;gt;o-cohsex_neq.qp&amp;lt;/code&amp;gt; file from the &amp;lt;code&amp;gt;cohsex_neq&amp;lt;/code&amp;gt; folder, to find the gap opening due the COHSEX correction and the non-equilibrium distribution of the carriers. The plot can be done using the [[Gnuplot scripts|plot_qp_energies.gnu]].&lt;br /&gt;
&lt;br /&gt;
[[File:Band opening neq cohsex plot.png .png|800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The points to calculate band opening are (0.000000, -0.882580), and (1.608910, -0.535269), which correspond to an opening of 0.347311 eV.&lt;br /&gt;
&lt;br /&gt;
== GW PPA corrections for the equilibrium case ==&lt;br /&gt;
&lt;br /&gt;
This subchapter can be skipped, and replaced by using scissors operator when diagonalizing the two particle Hamiltonian. &lt;br /&gt;
&lt;br /&gt;
To get accurate values for the band gap value we need to go beyond COHSEX approximation. Therefore we will obtain the Quasi-particle corrections in the plasmon pole approximation for equilibrium case, and in next steps, to this value we will add the correction calculated at COHSEX approximation to account for the non-equilibrium state of the system. &lt;br /&gt;
&lt;br /&gt;
To make this calculation, we do the following: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -p p -F 03_eq_qp_ppa.in &lt;br /&gt;
&lt;br /&gt;
which will create a file with the following content: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_eq_qp_ppa.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 gw0                              # [R] GW approximation&lt;br /&gt;
 ppa                              # [R][Xp] Plasmon Pole Approximation for the Screened Interaction&lt;br /&gt;
 el_el_corr                       # [R] Electron-Electron Correlation&lt;br /&gt;
 HF_and_locXC                     # [R] Hartree-Fock&lt;br /&gt;
 em1d                             # [R][X] Dynamically Screened Interaction&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 SE_Threads=0                     # [OPENMP/GW] Number of threads for self-energy&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 EXXRLvcs= 15             Ry    # [XX] Exchange    Ry components&lt;br /&gt;
 VXCRLvcs= 15             Ry    # [XC] XCpotential Ry components&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 Chimod= &amp;quot;HARTREE&amp;quot;                # [X] IP/Hartree/ALDA/LRC/PF/BSfxc&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
    1 |  30 |                         # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt; &lt;br /&gt;
 NGsBlkXp= 3                Ry    # [Xp] Response block size&lt;br /&gt;
 % LongDrXp&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [Xp] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 PPAPntXp= 27.21138         eV    # [Xp] PPA imaginary energy&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;  &lt;br /&gt;
 % GbndRnge&lt;br /&gt;
    1 |  40 |                         # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt; &lt;br /&gt;
 GTermKind= &amp;quot;none&amp;quot;                # [GW] GW terminator (&amp;quot;none&amp;quot;,&amp;quot;BG&amp;quot; Bruneval-Gonze,&amp;quot;BRS&amp;quot; Berger-Reining-Sottile)&lt;br /&gt;
 DysSolver= &amp;quot;n&amp;quot;                   # [GW] Dyson Equation solver (&amp;quot;n&amp;quot;,&amp;quot;s&amp;quot;,&amp;quot;g&amp;quot;,&amp;quot;q&amp;quot;)&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 %QPkrange                        # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 1|1|2|7|&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;       &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the following changes have been made: the number of polarization function bands, &amp;lt;code&amp;gt;BndsRnXp&amp;lt;/code&amp;gt; was changed to &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt;, the G[W] bands range, &amp;lt;code&amp;gt;GbndRnge&amp;lt;/code&amp;gt; was changed from &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1|40&amp;lt;/code&amp;gt;, and quasi-particle generalized k points  and band indices, &amp;lt;code&amp;gt;QPkrange&amp;lt;/code&amp;gt; was changed from &amp;lt;code&amp;gt;1|29|1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1|1|2|7&amp;lt;/code&amp;gt;. And after it we run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 03_eq_qp_ppa.in -J gw_eq -C gw_eq&lt;br /&gt;
&lt;br /&gt;
We can plot the &amp;lt;code&amp;gt;o-gw_eq.qp&amp;lt;/code&amp;gt; file from the &amp;lt;code&amp;gt;eq_gw_bse&amp;lt;/code&amp;gt; folder, to find out the gap opening due to the plasmon-pole approximation. The plot can be done using the [[Gnuplot scripts|plot_qp_energies.gnu]]. &lt;br /&gt;
&lt;br /&gt;
[[File:O gw eq qp plot.png|800px|frameless]]&lt;br /&gt;
&lt;br /&gt;
The points used to calculated band opening are (0, -0.045932), and (1.608910, 0.456526), which correspond to an opening of 0.502458 eV. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;(OPTIONAL)&#039;&#039;&#039; Additionally, after computing the QP corrections those can be used during the BSE corrections.  To do it, we create file similar to the [[Nonequilibrium absorption in bulk silicon|Solving the Bethe-Salpeter equation]], where we do not add the scissors line, but we add &amp;lt;code&amp;gt;KfnQPdb= &amp;quot;E &amp;lt; gw_eq/ndb.QP&amp;quot;&amp;lt;/code&amp;gt;. &lt;br /&gt;
The final file will look like &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_eq_bse.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 15             Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 #WehCpl                        # [BSK] eh interaction included also in coupling&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %  &lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 % BSEBands&lt;br /&gt;
   2 |  7 |                           # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 % BEnRange&lt;br /&gt;
  2.200000 | 5.000000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt; &lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 % &lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; gw_eq/ndb.QP&amp;quot;&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
 #WRbsWF                        # [BSS] Write to disk excitonic the WFs     &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and we run this file by typing: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 03_eq_bse.in -J &amp;quot;eq_gw_bse,gw_eq&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Data post-processing ==&lt;br /&gt;
Now after obtaining all the energy components that we need to calculate corrections to Kohn-Sham energies for the Non-Equilibrium case, we can manipulate them using the yambo&#039;s real time post processing module, &amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt;. We want to obtain energies defined by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Large \varepsilon^{corr,neq}_{c\mathbf{k}} = \varepsilon^{GW,eq}_{c\mathbf{k}} + (\varepsilon^{cohsex,neq}_{c\mathbf{k}} - \varepsilon^{cohsex,eq}_{c\mathbf{k}})&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Therefore we create a yambo post processing file with the following contents: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp3 (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
QPDBs                      	# [R] Quasi-particle databases&lt;br /&gt;
QPDB_merge                 	# [R] Mergering&lt;br /&gt;
%Actions_and_names       	# [QPDB] QP databases and Actions (format is &amp;quot;what&amp;quot;|&amp;quot;OP&amp;quot;|&amp;quot;prefactor&amp;quot;|&amp;quot;DB&amp;quot;|). OP can be ±/x.&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_neq/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;-&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_eq_emp/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;Z&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;gw_eq/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;gw_eq/ndb.QP&amp;quot; |&lt;br /&gt;
%       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we tell ypp to take from the quasi particle correction databases the values of &amp;lt;math&amp;gt;\varepsilon^{cohsex,neq}_{c\mathbf{k}}&amp;lt;/math&amp;gt; subtract from them &amp;lt;math&amp;gt;\varepsilon^{cohsex,eq}_{c\mathbf{k}}&amp;lt;/math&amp;gt;, multiply the resulting value by &amp;lt;code&amp;gt;?????&amp;lt;/code&amp;gt;  and add it to &amp;lt;math&amp;gt;\varepsilon^{GW,eq}_{c\mathbf{k}}&amp;lt;/math&amp;gt; and save them in the the new database &amp;lt;code&amp;gt;ndb.QP_merged_1_gw_cohsex_gw_ppa&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
We run the file by the following command: &lt;br /&gt;
&lt;br /&gt;
 $ ypp_rt -F input_ypp3 -J QP_merge -C QP_merge&lt;br /&gt;
&lt;br /&gt;
Or alternatively, if no calculation for the quasiparticle correction has been made (except the COHSEX calculation), and a scissors operator is going to be used, we can use the following yambo post processing file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp3_scissors (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
QPDBs                      	# [R] Quasi-particle databases&lt;br /&gt;
QPDB_merge                 	# [R] Mergering&lt;br /&gt;
%Actions_and_names       	# [QPDB] QP databases and Actions (format is &amp;quot;what&amp;quot;|&amp;quot;OP&amp;quot;|&amp;quot;prefactor&amp;quot;|&amp;quot;DB&amp;quot;|). OP can be ±/x.&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_neq/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;-&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_eq_emp/ndb.QP&amp;quot; |&lt;br /&gt;
%  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which will just take from the quasi particle correction databases the values of &amp;lt;math&amp;gt;\varepsilon^{cohsex,neq}_{c\mathbf{k}}&amp;lt;/math&amp;gt; subtract from them &amp;lt;math&amp;gt;\varepsilon^{cohsex,eq}_{c\mathbf{k}}&amp;lt;/math&amp;gt;. And we run this file by: &lt;br /&gt;
&lt;br /&gt;
 $ ypp_rt -F input_ypp3_scissors -J QP_merge_scissor -C QP_merge_scissor&lt;br /&gt;
&lt;br /&gt;
= Renormalization of the exciton binding energy =&lt;br /&gt;
&lt;br /&gt;
We finally perform a BSE calculation loading both the nonequilibrium carriers and the quasi-particle energy shifts. The Non-Equilibrium Hamiltonian is: &lt;br /&gt;
&lt;br /&gt;
[[File:Neq h.png|310px|frameless|left]] &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Where quantities entering into the hamiltonian are the non-equilibrium counterparts of the quantities discussion for the EQ Hamiltonian, and &amp;lt;math&amp;gt;\tau&amp;lt;/math&amp;gt; is the pump probe delay. The &amp;lt;math&amp;gt;\Delta \epsilon^{\tau}_l&amp;lt;/math&amp;gt; is the difference between non-equilibrium COHSEX and equilibrium COHSEX energy (calculated in the COHSEX chapter). &lt;br /&gt;
&lt;br /&gt;
We create a file using the following command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -o b -y h -F 04_neq_bse.in&lt;br /&gt;
&lt;br /&gt;
== With GW qp corrections ==&lt;br /&gt;
&lt;br /&gt;
Compared to the equilibrium case we add the lines:&lt;br /&gt;
&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge/ndb.QP_merged_1_gw_cohsex_gw_ppa&amp;quot;&lt;br /&gt;
&lt;br /&gt;
the resulting structure of the file is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 04_neq_bse.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions &lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 3             Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 #WehCpl                        # [BSK] eh interaction included also in coupling&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   2 |  7 |                           # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BEnRange&lt;br /&gt;
  2.200000 | 5.000000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge/ndb.QP_merged_1_gw_cohsex_gw_ppa&amp;quot;&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
 #WRbsWF                        # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we added the lines, and changed the bands range, &amp;lt;code&amp;gt;BSEBands&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2|7&amp;lt;/code&amp;gt;, energy range, &amp;lt;code&amp;gt;BEnRange&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;0.00000 | 10.00000 &amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2.00000 | 10.00000 |&amp;lt;/code&amp;gt; and energy steps, &amp;lt;code&amp;gt;BEnSteps&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;100&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;200&amp;lt;/code&amp;gt;. And we run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 04_neq_bse.in -J &amp;quot;neq_bse,gw_eq&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Alternatively, when scissors are used, the lines can be added, to account for the lack of a proper GW correction.&lt;br /&gt;
&lt;br /&gt;
The final plot from the calculations presented in this tutorial, for k-grid 8x8x8, with NEQ BSE with QP corrections, EQ BSE with QP corrections (not presented in this tutorial), and Experimental Data looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--[[File:NEQ2 abs bulk silicon tutorial plot results kgrid8.png|800px|frameless|center]]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[[File:Plot results kgrid8 7ry.png|800px|frameless|center]]--&amp;gt;&lt;br /&gt;
[[File:Plot results kgrid8 15 3ry.png||800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
In case, a better convergence is needed, a 16x16x16 k-grid can be used. To decrease computational time, the GW corrections can be done on lower grid, whereas solving the BSE equation can be done on higher k-grids. And for the 16x16x16 k-grid the plot looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Neq abs bulk silicon plot kgrid16.png|800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The plots can be done using [[Gnuplot scripts|plot_absorbance.gnu]] gnuplot script.&lt;br /&gt;
&lt;br /&gt;
== With scissor corrections ==&lt;br /&gt;
&lt;br /&gt;
Compared to the equilibrium case we just add the lines below:&lt;br /&gt;
&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge_scissor/ndb.QP_merged_1_gw_cohsex&amp;quot;&lt;br /&gt;
&lt;br /&gt;
the resulting structure of the file is (lines for nonequilibrium simulations added in red):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 04_neq_bse_scissors.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 3             Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 #WehCpl                        # [BSK] eh interaction included also in coupling&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  0.700000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge/ndb.QP_merged_1_gw_cohsex&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot; &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
    2 |  7 |                         # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BEnRange&lt;br /&gt;
   2.20000 | 5.00000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&amp;lt;/span&amp;gt;&lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 %&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
 #WRbsWF                        # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we added the lines, and changed the bands range, &amp;lt;code&amp;gt;BSEBands&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2|7&amp;lt;/code&amp;gt;, energy range, &amp;lt;code&amp;gt;BEnRange&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;0.00000 | 10.00000 &amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2.20000 | 5.00000 |&amp;lt;/code&amp;gt; and energy steps, &amp;lt;code&amp;gt;BEnSteps&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;100&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;200&amp;lt;/code&amp;gt;.  And we run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 04_neq_bse_sciss.in -J &amp;quot;neq_bse,gw_eq&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;sangalli2016&amp;quot;&amp;gt;D. Sangalli, S. Dal Conte, C. Manzoni, G. Cerullo, and A. Marini, [https://doi.org/10.1103/PhysRevB.93.195205 Phis. Rev. &#039;&#039;&#039;B 93&#039;&#039;&#039;, 195205 (2016)] ([https://arxiv.org/abs/1603.00225 arXiv1603.00225])&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;faleev2006&amp;quot;&amp;gt;S. V. Faleev, M. van Schilfgaarde, T. Kotani, F. Léonard, and M. P. Desjarlais, [https://doi.org/10.1103/PhysRevB.74.033101 Phys. Rev. &#039;&#039;&#039;B 74&#039;&#039;&#039;, 033101 (2006)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;thygesen2007&amp;quot;&amp;gt;K. S. Thygesen, and A. Rubio, [https://doi.org/10.1063/1.2565690 J. Chem. Phys. &#039;&#039;&#039;126&#039;&#039;&#039;, 091101 (2007)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=9011</id>
		<title>SOC</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=9011"/>
		<updated>2025-09-08T09:37:05Z</updated>

		<summary type="html">&lt;p&gt;Davide: Commented part on perturbative SOC. To check&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Effect of spin-orbit interaction =&lt;br /&gt;
&lt;br /&gt;
Spin–orbit coupling (SOC) is a relativistic interaction between an electron’s spin and its orbital motion in the crystal potential. Presently, SOC can be included withing GW-BSE approach either perturbatively, or fully, considering the spinorial nature of the electronic wave-function. In this tutorial, we will use both approaches. More details on the theory and comparison between full spinorial GW-BSE and perturbative approach to SOC can be found in the following paper &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;, and in the Wikipedia article&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;/&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To include the spin-orbit coupling we start with many–body total Hamiltonian of the system including first order relativistic corrections. &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 1 many body rel hamiltonian.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where, &amp;lt;math&amp;gt;\hat{H}^{0}&amp;lt;/math&amp;gt; is the non-relativistic one body hamiltonian, &amp;lt;math&amp;gt;\hat{H}^{(e-e)}&amp;lt;/math&amp;gt; is the e-e Coulomb interaction, and &amp;lt;math&amp;gt;\hat{H}^{(RK)} + \hat{H}^{(SOI)}&amp;lt;/math&amp;gt; are the first order relativistic correction, and the last term is the spin-orbit interaction (SOI) in which we are interested in this tutorial. &lt;br /&gt;
&lt;br /&gt;
The SOI term itself is composed of three different components, &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 2 soi term.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; are many-body terms, called &amp;quot;two-electron spin-orbit&amp;quot;, and &amp;quot;spin-other-orbit&amp;quot;, respectively. And,  &amp;lt;math&amp;gt; \hat{H}^{(SOI)} = \hat{H}^{SO(N)} &amp;lt;/math&amp;gt; is &amp;quot;one electron spin-orbit&amp;quot; is a one body term, which is given by: &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 3 one electron spin orbit.png|250px|frameless]]&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;math&amp;gt;\underline{\nu}&amp;lt;/math&amp;gt; a 2x2 matrix in the &amp;lt;math&amp;gt;\uparrow&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\downarrow&amp;lt;/math&amp;gt; spin space, and:&lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 4 v soc.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;\mathbf{\sigma}&amp;lt;/math&amp;gt; is the three dimensional vector whose components are the Pauli matrices. In a plane wave representation the SOC is, in practice, accounted for by the use of pseudopotentials. The SOC contribution from the pseudopotential captures what is called “local SOC”, which is due to the electrons orbiting around the nuclei, it neglects instead the itinerant SOC which can- not be easily captured in periodic boundary conditions. When relativistic corrections are taken into account instead, one should in principle account for the effects of the many–body terms &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt;. A shortcut is to add a term constructed replacing &amp;lt;math&amp;gt;v^{ext}&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;v^{Hxc}&amp;lt;/math&amp;gt; into previous equation. Doing so partially account for &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt;, while &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; is neglected.&lt;br /&gt;
&lt;br /&gt;
= Introduction = &lt;br /&gt;
&lt;br /&gt;
The scope of this tutorial is to calculate the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; corrections to the DFT-LDA band-structure and the BSE optical spectrum for a bulk semiconducting material, gallium antimonide (GaSb) &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;wiki&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;kim&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;rem&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan1&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan2&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan3&amp;quot;/&amp;gt;. We will compare the results with and without the spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DFT band structure =&lt;br /&gt;
&lt;br /&gt;
For this tutorial we provide two state (GS) databases (DBs), one contains the GS-DBs with the effect of SOC included and one without. The idea is to repeat the same calculation for both database and compare the results and the performances of the code. GaSb input files can be downloaded from the following link [https://media.yambo-code.eu/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz], and can be unarchived using the following command: &lt;br /&gt;
&lt;br /&gt;
 $ tar -xzf GaSb.tar.gz&lt;br /&gt;
&lt;br /&gt;
As in the other tutorials, you will find two main folders:&lt;br /&gt;
&lt;br /&gt;
* WSCF – contains the input files for Quantum ESPRESSO, in case you prefer to generate the ground-state databases (GS-DBs) yourself.&lt;br /&gt;
* YAMBO – contains the pre-generated GS-DBs&lt;br /&gt;
* Input - Example of input files &lt;br /&gt;
* References - Example of yambo output files&lt;br /&gt;
&lt;br /&gt;
To avoid continuously switching between the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;With_SOC&amp;lt;/code&amp;gt; directories, we recommend opening two terminals: keep one terminal for the without SOC case and the other for the with SOC case.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s have a look to the content of the folders. For example we can enter in the &amp;lt;code&amp;gt;GaSb/With_SOC/&amp;lt;/code&amp;gt; folder &lt;br /&gt;
 $ cd GaSb/With_SOC/YAMBO&lt;br /&gt;
 $ ls &lt;br /&gt;
 4x4x4_shifted+GAMMA 6x6x6_shifted 10x10x10_shifted 14x14x14_shifted Inputs  Reference_Outputs&lt;br /&gt;
&lt;br /&gt;
Inside the YAMBO folder there are indeed four folders corresponding to four different k-points meshes. In this tutorial we will use the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; folder for the computation of the QP corrections within the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; approximation. It is a k-points grid obtained as the sum of a 4x4x4 k-points grid centered in Gamma and a 4x4x4 grid shifted. Instead for the computation of the optical properties we will use the &amp;lt;code&amp;gt;6x6x6_shifted&amp;lt;/code&amp;gt; folder. It is a 6x6x6 k-points grid shifted from Gamma. The other two folders, &amp;lt;code&amp;gt;10x10x10_shifted&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;14x14x14_shifted&amp;lt;/code&amp;gt; can be used to do a minimum convergence of the optical properties against the number of k-points (pay attention that the BSE calculations with bigger grids will be very memory and time demanding!).&lt;br /&gt;
&lt;br /&gt;
The first part of the tutorial is on the computation of the QP corrections. So let&#039;s enter the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; grid and, as seen in other tutorials run the Initialization:&lt;br /&gt;
&lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA/ &lt;br /&gt;
 $ yambo &lt;br /&gt;
Now compare the result of the two setup runs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; With_SOC Energies and Occupations (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  [02.05] Energies &amp;amp; Occupations&lt;br /&gt;
  ==============================&lt;br /&gt;
&lt;br /&gt;
  [X] === General ===&lt;br /&gt;
  [X] Electronic Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Bosonic    Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Finite Temperature mode                       : no&lt;br /&gt;
  [X] El. density                                   :  0.14622E+24 [cm-3]&lt;br /&gt;
  [X] Fermi Level                                   :  5.085716 [eV]&lt;br /&gt;
&lt;br /&gt;
  [X] === Gaps and Widths ===&lt;br /&gt;
  [X] Conduction Band Min                           :  0.095395 [eV]&lt;br /&gt;
  [X] Valence Band Max                              :  0.000000 [eV]&lt;br /&gt;
  [X] Filled Bands                                  :   8&lt;br /&gt;
  [X] Empty Bands                                   :    9  200&lt;br /&gt;
  [X] Direct Gap                                    :  0.095395 [eV]&lt;br /&gt;
  [X] Direct Gap localized at k                     :  29&lt;br /&gt;
  [X] Indirect Gap                                  :  0.095395 [eV]&lt;br /&gt;
  [X] Indirect Gap between kpts                     :  29  29&lt;br /&gt;
  [X] Last valence band width                       :  3.508355 [eV]&lt;br /&gt;
  [X] 1st conduction band width                     :  3.413699 [eV]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; Without_SOC Energies and Occupations (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  [02.05] Energies &amp;amp; Occupations&lt;br /&gt;
  ==============================&lt;br /&gt;
&lt;br /&gt;
  [X] === General ===&lt;br /&gt;
  [X] Electronic Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Bosonic    Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Finite Temperature mode                       : no&lt;br /&gt;
  [X] El. density                                   :  0.14622E+24 [cm-3]&lt;br /&gt;
  [X] Fermi Level                                   :  4.815616 [eV]&lt;br /&gt;
&lt;br /&gt;
  [X] === Gaps and Widths ===&lt;br /&gt;
  [X] Conduction Band Min                           :  0.367929 [eV]&lt;br /&gt;
  [X] Valence Band Max                              :  0.000000 [eV]&lt;br /&gt;
  [X] Filled Bands                                  :   4&lt;br /&gt;
  [X] Empty Bands                                   :    5  200&lt;br /&gt;
  [X] Direct Gap                                    :  0.367929 [eV]&lt;br /&gt;
  [X] Direct Gap localized at k                     :  29&lt;br /&gt;
  [X] Indirect Gap                                  :  0.367929 [eV]&lt;br /&gt;
  [X] Indirect Gap between kpts                     :  29  29&lt;br /&gt;
  [X] Last valence band width                       :  3.276561 [eV]&lt;br /&gt;
  [X] 1st conduction band width                     :  3.649610 [eV]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A clear shrink of the DFT-LDA gap due to spin-orbit occurs. Note that, having 8 electrons in the fundamental cell, due to the spinorial nature of the wavefunction, with SOC we have 8 occupied bands, while only 4 without. Here a picture of the DFT band structure for the two cases.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_pwscf.png|500px|center|GaSb bands DFT]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the band structure of GaSb =&lt;br /&gt;
 &lt;br /&gt;
Now we will perform a G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; calculation to correct the DFT-LDA bandstructure. We assume that you are already familiar with the concept of screening needed to build up the GW self-energy and thus the QP corrections. Create a local folder &#039;&#039;My_inputs&#039;&#039; and generate the input for a G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; calculation within the plasmon-pole approximation using the following command: &lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA&lt;br /&gt;
 $ mkdir My_inputs&lt;br /&gt;
 $ yambo -p p -g n -V RL -F My_inputs/02_GW.in&lt;br /&gt;
However we also provide an input file with suggested parameters for this calculations inside the folder &#039;&#039;Solid_GaSb/Without_SOC/Yambo/Inputs&#039;&#039;. Remember: these parameters are system dependent and should be converged as you can see other GW tutorials (e.g. [[Silicon|GW on bulk Silicon]] or [[GW on h-BN (standalone)]]). Here we provide reasonable (but not fully converged) parameters to have a low computational cost but yet qualitatively meaningful results.&lt;br /&gt;
&lt;br /&gt;
The plane-waves cutoff for the wavefunctions and exchange part of the self-energy are set to 10 Ry. &lt;br /&gt;
 FFTGvecs =  10 Ry   # [FFT] Plane-waves&lt;br /&gt;
 EXXRLvcs=   10 Ry   # [XX] Exchange RL components&lt;br /&gt;
while we will use 40 bands, a plane-wave cut-off of 1 Ry, and a plasmon-pole energy of 20 eV to build up the screening matrix &lt;br /&gt;
 NGsBlkXp=    1 Ry  # [Xp] Response block size &lt;br /&gt;
 PPAPntXp= 20.  eV  # [Xp] PPA imaginary energy &lt;br /&gt;
 % BndsRnXp    &lt;br /&gt;
 1 | 40 |        # [Xp] Polarization function bands &lt;br /&gt;
 % &lt;br /&gt;
 % LongDrXp  &lt;br /&gt;
 1.000000 | 1.000000 | 1.000000 |        # [Xp] [cc] Electric Field &lt;br /&gt;
 %&lt;br /&gt;
The number of bands in the green function G to build up the GW self-energy is also 40 &lt;br /&gt;
 % GbndRnge    &lt;br /&gt;
 1 | 40 |                 # [GW] G[W] bands range &lt;br /&gt;
 %&lt;br /&gt;
with those parameters we will compute the correction only in the last 2 points of our grid, 28 and 29 and for the states from 3 to 6, setting the input variable &lt;br /&gt;
 %QPkrange                      &lt;br /&gt;
 28 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
You can now run the code using either your input file or the one provided in the Inputs folder &lt;br /&gt;
 $ yambo -F My_inputs/02_GW.in -J GW -C GW&lt;br /&gt;
The run will take some time. Indeed the code has first to compute the dipoles, then the screening within the plasmon pole approximation and finally the self-energy, first the exchange part Gv and then the correlation part G(W-v). &lt;br /&gt;
In the &amp;lt;code&amp;gt;GW&amp;lt;/code&amp;gt; folder you will find the &amp;lt;code&amp;gt;o-GW.qp&amp;lt;/code&amp;gt; file containing the GW corrections.&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &lt;br /&gt;
 #&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #&lt;br /&gt;
  ...&lt;br /&gt;
      29        4      0.000000      0.182291    0.992707 &lt;br /&gt;
      29        5      0.367929      0.597428    -2.431549&lt;br /&gt;
  ...&lt;br /&gt;
Thus it is about 0.60-0.18=0.42  eV (not fully converged).&lt;br /&gt;
&lt;br /&gt;
We can also compute the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; correction for all the k-point of the database. To this end open the input file &#039;&#039;My_inputs/02_GW.in&#039;&#039; (or your own) and edit the number of k-point to be computed &lt;br /&gt;
 %&lt;br /&gt;
 QPkrange                      1 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
Remember to use the same name after the -J option, so that the code will be able to use the informations from the previous run and avoid many calculations. &lt;br /&gt;
 $ yambo -F My_inputs/02_GW.in -J GW -C GW&lt;br /&gt;
In the &#039;&#039;GW&#039;&#039; folder you will find now also the &#039;&#039;o-GW.qp_01&#039;&#039; file containg the GW corrections for all the k-points.&lt;br /&gt;
&lt;br /&gt;
Now you can enter the folder of the 4x4x4 shifted grid&lt;br /&gt;
 cd Solid_GaSb/With_SOC/Yambo/4x4x4_shifted+GAMMA&lt;br /&gt;
and repeat the same calculations. Remember that in the input file you will generate you should change all the band ranges doubling the number of states (do you understand why?) &lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
    1 | 80 |        # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
    1 | 80 |        # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 % QPkrange&lt;br /&gt;
   29 | 29 |   5 | 12|  # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band.&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #  &lt;br /&gt;
   ...   &lt;br /&gt;
       29         8       0.000000    0.251074           0.896306&lt;br /&gt;
       29         9       0.095395    0.647108          -2.334492&lt;br /&gt;
   ...&lt;br /&gt;
Thus it is about 0.65-0.25=0.43 eV (not fully converged). Indeed the same result obtained without SOC. The resulting electronic gap is about 0.49 eV reasonably close to the experimental band gap of 0.72 eV. It is also a big improvement compared to the LDA band gap (approximatively 0.09 eV). This correction will be used, in the form of a scissor operator, as a starting point to compute the optical spectra.&lt;br /&gt;
&lt;br /&gt;
Again we can also compute the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; correction for all the k-point of the database. You can plot column 4 of the output file against column 3 to obtain a picture of the QP corrections. In the following figure we show the plot of the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; correction (E_G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;-E_LDA) vs the LDA eigenvalues. The corrections at the Gamma and the L point are marked with bigger red spots.&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=400px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_GoWo_corrections.png|GaSb QP corrections without SOC &lt;br /&gt;
Image:GaSb GoWo corrections SOC.png|GaSb GoWo corrections with SOC&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
[[File:SOC_GaSb_GoWo_corrections.png|500px|frameless|center]]&lt;br /&gt;
[[File:GaSb GoWo corrections SOC.png|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;scissor operator approach&amp;amp;quot; does not seem a very good approximation for GaSb. Indeed the quasi particle corrections are not constant, especially in the conduction band. For example the correction to the Gamma point is bigger than the corrections to all other k-points. This result however maybe due to the poor covergence parameters. If you would like to better investigate these results you should try do convergence tests. Since QP corrections are poorly sensitive to the spin-orbit interaction it is probably a good idea to do convergence without SOC.&lt;br /&gt;
&lt;br /&gt;
Here we also provide a plot of the band-structure at different levels of approximation: DFT, DFT+scissor, QP. The band structures are obtained from an interpolation of our k-points mesh and it is not very precise since, again, we are using a quite coarse sampling of the brillouine zone. Indeed we can see that already the interpolated DFT band structure deviates from the exact DFT band-structure, which has also been reported. In particular in the region nearby Gamma. However it gives quite nicely an overview of how the QP band structure compares with the DFT band stucture. The main effect is indeed an opening of the band-gap which can be described in terms of a scissor operator.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_yambo.png|500px|center|GaSb QP bands]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the optical properties of GaSb =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--{|&lt;br /&gt;
| [[File:SOC_GaSb_bands.png|600px|center|GaSb bands 1]]&lt;br /&gt;
| [[File:SOC_GaSb_absorption.png|600px|center|GaSb bands 2]]&lt;br /&gt;
|} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now turn our attention on the optical properties of the system. Here we will compute the dielectric function at different levels of approximations:&amp;lt;br /&amp;gt;&lt;br /&gt;
# at the IP-RPA level, thus using the Fermi golden rule with the KS energies and wave-functions&amp;lt;br /&amp;gt;&lt;br /&gt;
# at the RPA level, thus also including the effect of the local fields&amp;lt;br /&amp;gt;&lt;br /&gt;
# at the BSE level, thus including many-body effects, both correcting the KS energies (we will introduce a scissor obtained from the GW calculation) and considering the statically screened electron-hole interaction&lt;br /&gt;
# Run the simulations with SOC using screening databases computed without SOC.&lt;br /&gt;
# Run the simulations in perturbative SOC approach  &lt;br /&gt;
&lt;br /&gt;
First, setup the calculation (initialisation) in the usual way in the folder without SOC&lt;br /&gt;
 $ cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 $ yambo&lt;br /&gt;
and repeat the same inside the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; before continuing.&lt;br /&gt;
&lt;br /&gt;
== RPA-IP absorption ==&lt;br /&gt;
&lt;br /&gt;
Create a local folder inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; which you will call &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt;, and create the input file:&lt;br /&gt;
 &amp;gt;cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o c -V RL -F My_inputs/03_IP-RPA.in&lt;br /&gt;
&lt;br /&gt;
As before, we also provide an input file with suggested parameters for this calculations. The kind of calculation is controlled by the input variable&lt;br /&gt;
 Chimod= &amp;quot;IP&amp;quot;                 # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1            RL    # [Xd] Response block size&lt;br /&gt;
These tells you that we are building up the dielectric function in G-space considering only on G vector, i.e. the G=0 component. The string Chimod= &amp;amp;quot;IP&amp;amp;quot; recalls us that this means we are neglecting the local fields effect.&lt;br /&gt;
&lt;br /&gt;
We set the plane-waves cutoff for the wavefunctions to&lt;br /&gt;
 FFTGvecs=  10  Ry   # [FFT] Plane-waves&lt;br /&gt;
Since we are interested into the optical spectrum calculation, only the Q=0 term, i.e. the first Q-point, is calculated&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
The number of bands we use is 10. This is a reasonable number of states to converge the IP-RPA optical spectrum in the VIS-UV range. (If you wish to calculate the EELS spectrum for q different from 0 probably more bands will be required.)&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 10 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
As you learned the dielectric function is a tensor and in principle three calculations for light polarized along x,y,z chould be done depending on the experimental setup. However GaSb is a system with cubic symmetry, thus any direction is equivalent. Here we decide to compute epsilon along the &amp;amp;quot;(1 1 1)&amp;amp;quot; direction.&lt;br /&gt;
 % LongDrXd&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation using either your input file or the one provided in the Inputs folder&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/03_IP-RPA.in  -J 03_IP-RPA -C 03_IP-RPA&lt;br /&gt;
&lt;br /&gt;
Inside the &amp;lt;code&amp;gt;03_IP-RPA&amp;lt;/code&amp;gt; folder you will find the databases created by the code (in this case just the dipoles), the report file and the output files for the dielectric function which describes the absorption (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;) and for its inverse (&amp;lt;code&amp;gt;o-03_IP-RPA.eel*&amp;lt;/code&amp;gt;), which describes the electron energy loss. You can plot them with your favorite software (for example gnuplot or xmgrace). The real and imaginary parts of the IP-RPA dielectric function are column 3 and 2 respectively of the file (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;). Using also the reference output file in the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; folder you can compare the spectrum with and without SOC.&lt;br /&gt;
&lt;br /&gt;
Now repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 20 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.jpg|600px|center|GaSb absorption RPA]]&lt;br /&gt;
If you wish to obtain a reasonable spectrum however the 6x6x6 kpts grid is not enough. In order to check the convergence with the number of k-points you should run the same kind of calculations on other k-points meshes, either using the ones we provided ot creating new ones using the input files in the Pwscf folder (see section [[more.php|More on GaSb]] for more advanced calculations).&lt;br /&gt;
&lt;br /&gt;
In the directories Reference_Outputs several RPA dielectric functions are saved with the dielectric function calculated with the 10x10x10 and the 14x14x14 k-grid. You will learn that within RPA spectra the lowest energy peak is under-estimated. Also the spectra with and without SOC look very similar and the SO splitting is almost not present. This is clearly due to the excitonic nature of the E1 peak which can be correctly described only including the electron-hole interaction.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== RPA absorption with local fields ==&lt;br /&gt;
&lt;br /&gt;
To also include the local fields effect you can generate the input with the command: &lt;br /&gt;
 &amp;gt;yambo -o c -k hartree -F My_inputs/04_RPA_LF.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
In the input file we provide you will see that now the chimod and size of the dynamical matrix are set to&lt;br /&gt;
 Chimod= &amp;amp;quot;Hartree&amp;amp;quot;       # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1       Ry    # [Xd] Response block size&lt;br /&gt;
&lt;br /&gt;
Including local fields the poles of absorption will move from KS transitions to many-electrons transitions (although we are still neglecting the electron-hole interaction). As a result you will need more states to converge the absorption spectrum. This is why we set the number of bands to 15:&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 15 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
while as before we will have&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 %&lt;br /&gt;
 LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/04_RPA_LF.in -J 04_RPA_LF -C 04_RPA_LF_out&lt;br /&gt;
&lt;br /&gt;
In the 04_RPA+LF_out folder you will fine the report and the output files as before. The real and imaginary parts of the RPA+LF dielectric function with local fields are column 3 and 2 respectively of the .eps file. While the corresponding IP-RPA spectra is reported in columns 5 and 4.&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 30 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
In the following picture we compare the result of IP-RPA and RPA+LF with SOC.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA_IP_vs_LF.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== BSE absorption with QP corrections ==&lt;br /&gt;
&lt;br /&gt;
A more detailed description of BSE in Yambo is available in the following tutorial: &lt;br /&gt;
[https://wiki.yambo-code.eu/wiki/index.php?title=Calculating%20optical%20spectra%20including%20excitonic%20effects:%20a%20step-by-step%20guide BSE in hBN].&lt;br /&gt;
&lt;br /&gt;
=== Static Screening ===&lt;br /&gt;
&lt;br /&gt;
First we need to obtain the static screening. &lt;br /&gt;
&lt;br /&gt;
This can be done using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s -F My_inputs/05_screening.in&lt;br /&gt;
&lt;br /&gt;
In the resulting input file you can also see the parameters used to compute the static dielectric function needed for the screened Coulomb term (W) of the BSE kernel. Here we use 20 bands and an energy cut-off of 1 Ry.&lt;br /&gt;
&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 20 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 1            Ry    # [Xs] Response block size&lt;br /&gt;
&lt;br /&gt;
Remember to double the number of bands for the case with spin-oribit coupling included. &lt;br /&gt;
&lt;br /&gt;
Then run the file &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F My_inputs/05_screening.in -J screening -C screening&lt;br /&gt;
&lt;br /&gt;
=== BS Kernel and Solver ===&lt;br /&gt;
&lt;br /&gt;
Now we build the BS kernel, and specify the BS kernel solver. Overview of the BSE solvers is available using the following link: [[BSE solvers overview]]. In this tutorial we will use Haydock solver because it is computationally cheaper.&lt;br /&gt;
&lt;br /&gt;
As you probably know the inclusion of the electron-hole interaction makes the approach in G space not feasible. We have thus to compute the dielectric function in the electron-hole space, building up the excitonic hamiltonian. Thus to create the input file you can run the command:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y h -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder. As before you, in the directory Inputs, you can find an example with suggested parameters. The plane-wave cutoffs used to expand wavefunctions is set to 10 Ry, the cut-off on the exchange interaction between the electron and the hole (i.e. for the local-fields) is set to 10 Ry (here we use a much higer value compared to the previous run since the computational cost of increasing this variable in the electron-hole space is very low). and, finally, the cut-off on the direct electron-hole interaction is set to 1 Ry (to build up this term, where the interaction is screened, we need to compute the static dielectric constant in G-space, thus increasing this value is computationally demanding).&lt;br /&gt;
 FFTGvecs= 10     Ry    # [FFT] Plane-waves&lt;br /&gt;
 BSENGexx= 10     Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=  1     Ry    # [BSK] Screened interaction block size&lt;br /&gt;
&lt;br /&gt;
The input variable &amp;amp;quot;KfnQP_E&amp;amp;quot; can be used to include a scissor operator, i.e a opening of the DFT band gap. The value 0.53 eV is the coverged correction at Gamma obtained in the GW run. Here we will calculate the BSE assuming that the &amp;amp;quot;scissor operator approximation&amp;amp;quot; is valid for GaSb (to be checked in principle!) .&lt;br /&gt;
&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 0.530000 &amp;lt;/span&amp;gt; | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
To build up the excitonic matrix we consider the states from 3 to 6, i.e. we are using 2 occupied and 2 unoccupied bands.&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and we will build up the dielectric function using a grid of 200 point in frequency space&lt;br /&gt;
 BEnSteps= 200                # [BSS] Energy steps&lt;br /&gt;
Finally, similarly as before, we will have&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
Remember that the BS kernel is written in the electron-hole space and its size is given by the relation&amp;lt;br /&amp;gt;&lt;br /&gt;
BS kernel size = Valence Bands × Conduction Bands × K-points in the whole BZ.&amp;lt;br /&amp;gt;&lt;br /&gt;
This means that in the case with SO we are building up a matrix 2x2=4 times larger of the corresponding calculation without spin-orbit (you can compare the input in With_SO/Yambo/Inputs / Without_SO/Yambo/Inputs and reference outputs in With_SO/Yambo/Reference_Outputs / With_SO/Yambo/Reference_Outputs)&lt;br /&gt;
&lt;br /&gt;
We are ready to run the BSE calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J &amp;quot;05_BSE,screening&amp;quot; -C 05_BSE&lt;br /&gt;
&lt;br /&gt;
We specify to Yambo the folder which contains calculated static screening, and in &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; the two response files &amp;lt;code&amp;gt; o-05_BSE.eel_q1_haydock_bse &amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-05_BSE.eps_q1_haydock_bse&amp;lt;/code&amp;gt; can be found. In the &#039;&#039;eps file&#039;&#039; the real and imaginary parts of the BSE dielectric function are column 3 and 2 respectively, while the corresponding GW spectra are column 5 and 4.&lt;br /&gt;
&lt;br /&gt;
In the folder &amp;lt;code&amp;gt;screening&amp;lt;/code&amp;gt; you will find instead the DBs of the static screening (W) needed to build up the BSE kernel (&amp;lt;code&amp;gt;ndb.em1s&amp;lt;/code&amp;gt;) and in the folder &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; the BSE matrix (&amp;lt;code&amp;gt;ndb.BS*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 40 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   5 | 12 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
If you do the corresponding calculations for the case without spin-orbits using the databases in the directory GaSb_nSO/YAMBO and inputs in GaSb_nSO/Inputs, the two BSE spectra should look like in this figure:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE_few_kpts.jpg|500px|center|GaSb absorption BSE gew kpts]]&lt;br /&gt;
As mentioned before the two spectra present spurious peaks ( as the first peak!) due to uncoverged k-point sampling. Nevertheless the splitting due to spin-orbit interaction is already visible in the peak around 2.1 eV.&lt;br /&gt;
A more converged (yet not fully converged calculation) would give the following results which compares very nicely with the experimental data:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE.png|500px|center|GaSb absorption BSE]]&lt;br /&gt;
&lt;br /&gt;
=== Using Static Screening without SOC, for the SOC case === &lt;br /&gt;
&lt;br /&gt;
Additionally, a BSE run for the spin-orbit coupling case can be done using the screening computed for the case without spin-orbit coupling. &lt;br /&gt;
&lt;br /&gt;
To do it we can make a symlink from the no-SOC folder:&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt; cd Path/GaSb/With_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt; ln -s Path/GaSb/Without_SOC/YAMBO/6x6x6_shifted/screening screening_no_soc&lt;br /&gt;
&lt;br /&gt;
The BSE kernel can be build and solved using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s -o b -k sex -y h -V qp -F 06_BSE_using_nosoc_screening.in&lt;br /&gt;
&lt;br /&gt;
Here we combined the screening part (-X s) and BSE part (-o b -k sex -y h -V qp). All of the input parameters have been discussed previously. Although, it is important to keep the right matching behind the screening bands used for the no SOC and SOC case.&lt;br /&gt;
&lt;br /&gt;
If for the SOC case the specified screening bands are n1, n2 then for the no-SOC screening the bands should be ((n1-1)/2+1, n2/2). &lt;br /&gt;
&lt;br /&gt;
 # No SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   1 | 20 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and &lt;br /&gt;
 # SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   1 | 40 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The results for the BSE solved using screening used from SOC and no SOC databases is presented below. As we can see, there is almost no difference between them. &lt;br /&gt;
&lt;br /&gt;
[[File:GaSb screening w and wo soc second.png|600px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
= Exciton analysis =&lt;br /&gt;
&lt;br /&gt;
In this part of the tutorial we show how to analyze the origin of the E1 peak in GaSb. Since the calculation with the SOC case is very demanding we will do that only for the case without SOC. So first of all enter the &lt;br /&gt;
&amp;lt;code&amp;gt;Without_SOC/YAMBO/6x6x6_shifted&amp;lt;/code&amp;gt; folder and, if you didn&#039;t before, run the setup:&lt;br /&gt;
 &amp;gt;cd Without_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt;ls SAVE&lt;br /&gt;
 &amp;gt;yambo -J 01_init&lt;br /&gt;
 &amp;gt;ls SAVE r-01_init_setup&lt;br /&gt;
&lt;br /&gt;
Similar to previous section we need to compute the static screening first, and then solve the BSE equation.&lt;br /&gt;
This time we will use the full diagonalization solver to calculate all exciton energies and composition in terms of electron-hole pairs. See [[BSE solvers overview]] for more details. &lt;br /&gt;
&lt;br /&gt;
Then create the &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; folder and the input file for a BSE&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -X s -F My_inputs/05_screening.in&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_screening.in -J screening -C screening &lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y d -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the same parameters you used to compute the absorption with SOC previously. The number of bands will be the half of the case without SOC&lt;br /&gt;
 % BSEBands&lt;br /&gt;
  3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
Also this time you will use the to &amp;lt;code&amp;gt;&amp;amp;quot;d&amp;amp;quot;&amp;lt;/code&amp;gt; and uncomment the variable needed to Write to disk excitonic the WFs:&lt;br /&gt;
 BSSmod= &amp;amp;quot;d&amp;amp;quot;              # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft`&lt;br /&gt;
 WRbsWF                   # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
Then you have to run the BSE calculation (notice that, in case you already computed the BSE spectrum also for the case without SOC, the code can read the results from the provious BSE run skipping many steps)&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J 05_BSE -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; folder you will now find a new database file called &amp;lt;code&amp;gt;ndb.BS_diago_Q01&amp;lt;/code&amp;gt;. This is what you need to analyze the exciton peaks running the post-processing code ypp.&lt;br /&gt;
&lt;br /&gt;
First of all you can run:&lt;br /&gt;
 &amp;gt;ypp -e s -J 05_BSE -C BSE_out&lt;br /&gt;
This run will sort in energy the excitonic eigenvalues writing their oscillator strenghts (see &amp;lt;code&amp;gt;o-06_bse.exc_E_sorted&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Then you can create the ypp input required to analize how each excitonic state is build up in terms of single-particle states:&lt;br /&gt;
 &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE&lt;br /&gt;
Put the index &amp;lt;code&amp;gt;#N&amp;lt;/code&amp;gt; of the exciton with higher strenght in the E_1 peak region&lt;br /&gt;
 &amp;gt;ypp -F My_inputs/05_BSE_ypp.in -J 05_BSE -C 06_BSE_out&lt;br /&gt;
You will find the two files &amp;lt;code&amp;gt;o-06_bse.exc_weights_at_#N&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-06_bse.exc_amplitude_at_#N&amp;lt;/code&amp;gt;. In these files you will find informations on the highest strenght exciton in the E1 peak region.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
= Perturbative SOC approach =&lt;br /&gt;
&lt;br /&gt;
It is possible to include the spin-orbit coupling perturbatively in Yambo.&lt;br /&gt;
&lt;br /&gt;
To first order the perturbation just gives a correction to the DFT eigenvalues and does not touch the wave–functions. Numerically the perturbation need to be applied by mapping the solution of the DFT calculation without SOC into the solution of the DFT calculation with SOC. Once a mapping is defined, the SOC perturbation could be directly applied to the KS energies before solving both the GW scheme and/or the BSE.&lt;br /&gt;
&lt;br /&gt;
All we need is to computed a SOC mapping database given by the following equation (eq 68 in the referenced paper):&lt;br /&gt;
&lt;br /&gt;
EQUATION &lt;br /&gt;
&lt;br /&gt;
Where x, y, z are ... &lt;br /&gt;
&lt;br /&gt;
To build this map, in the folder without spin-orbit coupling we do the following:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; cd Solid_GaSb/Without_SOC/Yambo/6x6xWi6_shifted&lt;br /&gt;
 &amp;gt; mkdir SOC_DBs&lt;br /&gt;
 &amp;gt; cp -r Path/SAVE_GaSb_k6_w_soc SOC_DBs/SAVE&lt;br /&gt;
 &amp;gt; ypp -w &lt;br /&gt;
 &amp;gt; ypp -F map_wfs.in -J SOC_map -C SOC_map&lt;br /&gt;
&lt;br /&gt;
With the following input for &amp;lt;code&amp;gt;map_wfs.in&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 WFs_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 WFs_SOC_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 SOC_DBs= &amp;quot;SOC_DBs&amp;quot;        # Path to the folder containing the DB with SOC&lt;br /&gt;
 SOC_splitting= 0.01 eV    # SOC splitting between the levels&lt;br /&gt;
 % bands_to_map&lt;br /&gt;
   5 | 12 |                # Number of bands to map&lt;br /&gt;
 %&lt;br /&gt;
 bands_buffer=1&lt;br /&gt;
&lt;br /&gt;
Where the SAVE folder with spin-orbit coupling should be saved in a separate folder, and in this case it is in the &amp;lt;code&amp;gt; SOC_DBs &amp;lt;/code&amp;gt; folder. &lt;br /&gt;
Then, the BSE can be computed using the following command &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F 05_BSE+scissor.in -J &amp;quot;BSE_soc_perturbative,screening,SOC_map&amp;quot; -C BSE_soc_perturbative&lt;br /&gt;
&lt;br /&gt;
Where screening was precomputed, and the SOC_map is the one generated in this section. Check BSE section for more details on setting a BSE calculation.&lt;br /&gt;
Not converged results are presented below. &lt;br /&gt;
[[File:GaSb perturbative soc 1.png|600px|thumb|center]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Other excercises =&lt;br /&gt;
&lt;br /&gt;
# Try to converge the G0W0 increasing the polarization RL size, the polarization bands, the number of bands in the Green function and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Try to converge the absorption spectra increasing the polarization RL size, the polarization bands, the number of bands to construct the excitonic matrix and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Plot the EELS spectrum obtained within IP-RPA and RPA with local fields. Also in this case you can check the effect of increasing the polarization bands. You may also try to do a resonant only calculation to see that the EELS cannot be described using only the resonant part of the response function.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;&amp;gt;M. Marsili, A. Molina-Sánchez, M. Palummo, D. Sangalli, A. Marini, [https://doi.org/10.1103/PhysRevB.103.155152  Phys. Rev. B &#039;&#039;&#039;103&#039;&#039;&#039;, 155152 (2021)] ([https://arxiv.org/abs/2103.02266 arXiv 2103.02266])&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wiki&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Gallium_antimonide GaSb on wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;&amp;gt; [https://en.wikipedia.org/wiki/Spin%E2%80%93orbit_interaction#In_atomic_energy_levels Spin-Orbit Interaction on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kim&amp;quot;&amp;gt; Y.S. Kim et al. Phys. Rev. B &#039;&#039;&#039;82&#039;&#039;&#039;, 205212 (2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;rem&amp;quot;&amp;gt; I. N. Remediakis and Efthimios Kaxiras, Phys. Rev. B &#039;&#039;&#039;59&#039;&#039;&#039;, 5336 (1999).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan1&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1002/pssb.200983959 Phys. Sol. State B &#039;&#039;&#039;247&#039;&#039;&#039;, 1960 (2010)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan2&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1103/PhysRevLett.104.157402 Phys. Rev. Lett. &#039;&#039;&#039;104&#039;&#039;&#039;, 157402 (2010)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan3&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1103/PhysRevB.83.155421 Phys. Rev. B 83, &#039;&#039;&#039;155421&#039;&#039;&#039; (2011)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=9010</id>
		<title>SOC</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=9010"/>
		<updated>2025-09-08T09:04:30Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* RPA absorption with local fieldds */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Effect of spin-orbit interaction =&lt;br /&gt;
&lt;br /&gt;
Spin–orbit coupling (SOC) is a relativistic interaction between an electron’s spin and its orbital motion in the crystal potential. Presently, SOC can be included withing GW-BSE approach either perturbatively, or fully, considering the spinorial nature of the electronic wave-function. In this tutorial, we will use both approaches. More details on the theory and comparison between full spinorial GW-BSE and perturbative approach to SOC can be found in the following paper &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;, and in the Wikipedia article&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;/&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To include the spin-orbit coupling we start with many–body total Hamiltonian of the system including first order relativistic corrections. &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 1 many body rel hamiltonian.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where, &amp;lt;math&amp;gt;\hat{H}^{0}&amp;lt;/math&amp;gt; is the non-relativistic one body hamiltonian, &amp;lt;math&amp;gt;\hat{H}^{(e-e)}&amp;lt;/math&amp;gt; is the e-e Coulomb interaction, and &amp;lt;math&amp;gt;\hat{H}^{(RK)} + \hat{H}^{(SOI)}&amp;lt;/math&amp;gt; are the first order relativistic correction, and the last term is the spin-orbit interaction (SOI) in which we are interested in this tutorial. &lt;br /&gt;
&lt;br /&gt;
The SOI term itself is composed of three different components, &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 2 soi term.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; are many-body terms, called &amp;quot;two-electron spin-orbit&amp;quot;, and &amp;quot;spin-other-orbit&amp;quot;, respectively. And,  &amp;lt;math&amp;gt; \hat{H}^{(SOI)} = \hat{H}^{SO(N)} &amp;lt;/math&amp;gt; is &amp;quot;one electron spin-orbit&amp;quot; is a one body term, which is given by: &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 3 one electron spin orbit.png|250px|frameless]]&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;math&amp;gt;\underline{\nu}&amp;lt;/math&amp;gt; a 2x2 matrix in the &amp;lt;math&amp;gt;\uparrow&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\downarrow&amp;lt;/math&amp;gt; spin space, and:&lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 4 v soc.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;\mathbf{\sigma}&amp;lt;/math&amp;gt; is the three dimensional vector whose components are the Pauli matrices. In a plane wave representation the SOC is, in practice, accounted for by the use of pseudopotentials. The SOC contribution from the pseudopotential captures what is called “local SOC”, which is due to the electrons orbiting around the nuclei, it neglects instead the itinerant SOC which can- not be easily captured in periodic boundary conditions. When relativistic corrections are taken into account instead, one should in principle account for the effects of the many–body terms &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt;. A shortcut is to add a term constructed replacing &amp;lt;math&amp;gt;v^{ext}&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;v^{Hxc}&amp;lt;/math&amp;gt; into previous equation. Doing so partially account for &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt;, while &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; is neglected.&lt;br /&gt;
&lt;br /&gt;
= Introduction = &lt;br /&gt;
&lt;br /&gt;
The scope of this tutorial is to calculate the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; corrections to the DFT-LDA band-structure and the BSE optical spectrum for a bulk semiconducting material, gallium antimonide (GaSb) &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;wiki&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;kim&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;rem&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan1&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan2&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan3&amp;quot;/&amp;gt;. We will compare the results with and without the spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DFT band structure =&lt;br /&gt;
&lt;br /&gt;
For this tutorial we provide two state (GS) databases (DBs), one contains the GS-DBs with the effect of SOC included and one without. The idea is to repeat the same calculation for both database and compare the results and the performances of the code. GaSb input files can be downloaded from the following link [https://media.yambo-code.eu/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz], and can be unarchived using the following command: &lt;br /&gt;
&lt;br /&gt;
 $ tar -xzf GaSb.tar.gz&lt;br /&gt;
&lt;br /&gt;
As in the other tutorials, you will find two main folders:&lt;br /&gt;
&lt;br /&gt;
* WSCF – contains the input files for Quantum ESPRESSO, in case you prefer to generate the ground-state databases (GS-DBs) yourself.&lt;br /&gt;
* YAMBO – contains the pre-generated GS-DBs&lt;br /&gt;
* Input - Example of input files &lt;br /&gt;
* References - Example of yambo output files&lt;br /&gt;
&lt;br /&gt;
To avoid continuously switching between the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;With_SOC&amp;lt;/code&amp;gt; directories, we recommend opening two terminals: keep one terminal for the without SOC case and the other for the with SOC case.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s have a look to the content of the folders. For example we can enter in the &amp;lt;code&amp;gt;GaSb/With_SOC/&amp;lt;/code&amp;gt; folder &lt;br /&gt;
 $ cd GaSb/With_SOC/YAMBO&lt;br /&gt;
 $ ls &lt;br /&gt;
 4x4x4_shifted+GAMMA 6x6x6_shifted 10x10x10_shifted 14x14x14_shifted Inputs  Reference_Outputs&lt;br /&gt;
&lt;br /&gt;
Inside the YAMBO folder there are indeed four folders corresponding to four different k-points meshes. In this tutorial we will use the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; folder for the computation of the QP corrections within the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; approximation. It is a k-points grid obtained as the sum of a 4x4x4 k-points grid centered in Gamma and a 4x4x4 grid shifted. Instead for the computation of the optical properties we will use the &amp;lt;code&amp;gt;6x6x6_shifted&amp;lt;/code&amp;gt; folder. It is a 6x6x6 k-points grid shifted from Gamma. The other two folders, &amp;lt;code&amp;gt;10x10x10_shifted&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;14x14x14_shifted&amp;lt;/code&amp;gt; can be used to do a minimum convergence of the optical properties against the number of k-points (pay attention that the BSE calculations with bigger grids will be very memory and time demanding!).&lt;br /&gt;
&lt;br /&gt;
The first part of the tutorial is on the computation of the QP corrections. So let&#039;s enter the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; grid and, as seen in other tutorials run the Initialization:&lt;br /&gt;
&lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA/ &lt;br /&gt;
 $ yambo &lt;br /&gt;
Now compare the result of the two setup runs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; With_SOC Energies and Occupations (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  [02.05] Energies &amp;amp; Occupations&lt;br /&gt;
  ==============================&lt;br /&gt;
&lt;br /&gt;
  [X] === General ===&lt;br /&gt;
  [X] Electronic Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Bosonic    Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Finite Temperature mode                       : no&lt;br /&gt;
  [X] El. density                                   :  0.14622E+24 [cm-3]&lt;br /&gt;
  [X] Fermi Level                                   :  5.085716 [eV]&lt;br /&gt;
&lt;br /&gt;
  [X] === Gaps and Widths ===&lt;br /&gt;
  [X] Conduction Band Min                           :  0.095395 [eV]&lt;br /&gt;
  [X] Valence Band Max                              :  0.000000 [eV]&lt;br /&gt;
  [X] Filled Bands                                  :   8&lt;br /&gt;
  [X] Empty Bands                                   :    9  200&lt;br /&gt;
  [X] Direct Gap                                    :  0.095395 [eV]&lt;br /&gt;
  [X] Direct Gap localized at k                     :  29&lt;br /&gt;
  [X] Indirect Gap                                  :  0.095395 [eV]&lt;br /&gt;
  [X] Indirect Gap between kpts                     :  29  29&lt;br /&gt;
  [X] Last valence band width                       :  3.508355 [eV]&lt;br /&gt;
  [X] 1st conduction band width                     :  3.413699 [eV]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; Without_SOC Energies and Occupations (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  [02.05] Energies &amp;amp; Occupations&lt;br /&gt;
  ==============================&lt;br /&gt;
&lt;br /&gt;
  [X] === General ===&lt;br /&gt;
  [X] Electronic Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Bosonic    Temperature                        :  0.000000  0.000000 [eV K]&lt;br /&gt;
  [X] Finite Temperature mode                       : no&lt;br /&gt;
  [X] El. density                                   :  0.14622E+24 [cm-3]&lt;br /&gt;
  [X] Fermi Level                                   :  4.815616 [eV]&lt;br /&gt;
&lt;br /&gt;
  [X] === Gaps and Widths ===&lt;br /&gt;
  [X] Conduction Band Min                           :  0.367929 [eV]&lt;br /&gt;
  [X] Valence Band Max                              :  0.000000 [eV]&lt;br /&gt;
  [X] Filled Bands                                  :   4&lt;br /&gt;
  [X] Empty Bands                                   :    5  200&lt;br /&gt;
  [X] Direct Gap                                    :  0.367929 [eV]&lt;br /&gt;
  [X] Direct Gap localized at k                     :  29&lt;br /&gt;
  [X] Indirect Gap                                  :  0.367929 [eV]&lt;br /&gt;
  [X] Indirect Gap between kpts                     :  29  29&lt;br /&gt;
  [X] Last valence band width                       :  3.276561 [eV]&lt;br /&gt;
  [X] 1st conduction band width                     :  3.649610 [eV]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A clear shrink of the DFT-LDA gap due to spin-orbit occurs. Note that, having 8 electrons in the fundamental cell, due to the spinorial nature of the wavefunction, with SOC we have 8 occupied bands, while only 4 without. Here a picture of the DFT band structure for the two cases.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_pwscf.png|500px|center|GaSb bands DFT]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the band structure of GaSb =&lt;br /&gt;
 &lt;br /&gt;
Now we will perform a G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; calculation to correct the DFT-LDA bandstructure. We assume that you are already familiar with the concept of screening needed to build up the GW self-energy and thus the QP corrections. Create a local folder &#039;&#039;My_inputs&#039;&#039; and generate the input for a G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; calculation within the plasmon-pole approximation using the following command: &lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA&lt;br /&gt;
 $ mkdir My_inputs&lt;br /&gt;
 $ yambo -p p -g n -V RL -F My_inputs/02_GW.in&lt;br /&gt;
However we also provide an input file with suggested parameters for this calculations inside the folder &#039;&#039;Solid_GaSb/Without_SOC/Yambo/Inputs&#039;&#039;. Remember: these parameters are system dependent and should be converged as you can see other GW tutorials (e.g. [[Silicon|GW on bulk Silicon]] or [[GW on h-BN (standalone)]]). Here we provide reasonable (but not fully converged) parameters to have a low computational cost but yet qualitatively meaningful results.&lt;br /&gt;
&lt;br /&gt;
The plane-waves cutoff for the wavefunctions and exchange part of the self-energy are set to 10 Ry. &lt;br /&gt;
 FFTGvecs =  10 Ry   # [FFT] Plane-waves&lt;br /&gt;
 EXXRLvcs=   10 Ry   # [XX] Exchange RL components&lt;br /&gt;
while we will use 40 bands, a plane-wave cut-off of 1 Ry, and a plasmon-pole energy of 20 eV to build up the screening matrix &lt;br /&gt;
 NGsBlkXp=    1 Ry  # [Xp] Response block size &lt;br /&gt;
 PPAPntXp= 20.  eV  # [Xp] PPA imaginary energy &lt;br /&gt;
 % BndsRnXp    &lt;br /&gt;
 1 | 40 |        # [Xp] Polarization function bands &lt;br /&gt;
 % &lt;br /&gt;
 % LongDrXp  &lt;br /&gt;
 1.000000 | 1.000000 | 1.000000 |        # [Xp] [cc] Electric Field &lt;br /&gt;
 %&lt;br /&gt;
The number of bands in the green function G to build up the GW self-energy is also 40 &lt;br /&gt;
 % GbndRnge    &lt;br /&gt;
 1 | 40 |                 # [GW] G[W] bands range &lt;br /&gt;
 %&lt;br /&gt;
with those parameters we will compute the correction only in the last 2 points of our grid, 28 and 29 and for the states from 3 to 6, setting the input variable &lt;br /&gt;
 %QPkrange                      &lt;br /&gt;
 28 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
You can now run the code using either your input file or the one provided in the Inputs folder &lt;br /&gt;
 $ yambo -F My_inputs/02_GW.in -J GW -C GW&lt;br /&gt;
The run will take some time. Indeed the code has first to compute the dipoles, then the screening within the plasmon pole approximation and finally the self-energy, first the exchange part Gv and then the correlation part G(W-v). &lt;br /&gt;
In the &amp;lt;code&amp;gt;GW&amp;lt;/code&amp;gt; folder you will find the &amp;lt;code&amp;gt;o-GW.qp&amp;lt;/code&amp;gt; file containing the GW corrections.&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &lt;br /&gt;
 #&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #&lt;br /&gt;
  ...&lt;br /&gt;
      29        4      0.000000      0.182291    0.992707 &lt;br /&gt;
      29        5      0.367929      0.597428    -2.431549&lt;br /&gt;
  ...&lt;br /&gt;
Thus it is about 0.60-0.18=0.42  eV (not fully converged).&lt;br /&gt;
&lt;br /&gt;
We can also compute the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; correction for all the k-point of the database. To this end open the input file &#039;&#039;My_inputs/02_GW.in&#039;&#039; (or your own) and edit the number of k-point to be computed &lt;br /&gt;
 %&lt;br /&gt;
 QPkrange                      1 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
Remember to use the same name after the -J option, so that the code will be able to use the informations from the previous run and avoid many calculations. &lt;br /&gt;
 $ yambo -F My_inputs/02_GW.in -J GW -C GW&lt;br /&gt;
In the &#039;&#039;GW&#039;&#039; folder you will find now also the &#039;&#039;o-GW.qp_01&#039;&#039; file containg the GW corrections for all the k-points.&lt;br /&gt;
&lt;br /&gt;
Now you can enter the folder of the 4x4x4 shifted grid&lt;br /&gt;
 cd Solid_GaSb/With_SOC/Yambo/4x4x4_shifted+GAMMA&lt;br /&gt;
and repeat the same calculations. Remember that in the input file you will generate you should change all the band ranges doubling the number of states (do you understand why?) &lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
    1 | 80 |        # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
    1 | 80 |        # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 % QPkrange&lt;br /&gt;
   29 | 29 |   5 | 12|  # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band.&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #  &lt;br /&gt;
   ...   &lt;br /&gt;
       29         8       0.000000    0.251074           0.896306&lt;br /&gt;
       29         9       0.095395    0.647108          -2.334492&lt;br /&gt;
   ...&lt;br /&gt;
Thus it is about 0.65-0.25=0.43 eV (not fully converged). Indeed the same result obtained without SOC. The resulting electronic gap is about 0.49 eV reasonably close to the experimental band gap of 0.72 eV. It is also a big improvement compared to the LDA band gap (approximatively 0.09 eV). This correction will be used, in the form of a scissor operator, as a starting point to compute the optical spectra.&lt;br /&gt;
&lt;br /&gt;
Again we can also compute the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; correction for all the k-point of the database. You can plot column 4 of the output file against column 3 to obtain a picture of the QP corrections. In the following figure we show the plot of the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; correction (E_G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;-E_LDA) vs the LDA eigenvalues. The corrections at the Gamma and the L point are marked with bigger red spots.&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=400px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_GoWo_corrections.png|GaSb QP corrections without SOC &lt;br /&gt;
Image:GaSb GoWo corrections SOC.png|GaSb GoWo corrections with SOC&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
[[File:SOC_GaSb_GoWo_corrections.png|500px|frameless|center]]&lt;br /&gt;
[[File:GaSb GoWo corrections SOC.png|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;scissor operator approach&amp;amp;quot; does not seem a very good approximation for GaSb. Indeed the quasi particle corrections are not constant, especially in the conduction band. For example the correction to the Gamma point is bigger than the corrections to all other k-points. This result however maybe due to the poor covergence parameters. If you would like to better investigate these results you should try do convergence tests. Since QP corrections are poorly sensitive to the spin-orbit interaction it is probably a good idea to do convergence without SOC.&lt;br /&gt;
&lt;br /&gt;
Here we also provide a plot of the band-structure at different levels of approximation: DFT, DFT+scissor, QP. The band structures are obtained from an interpolation of our k-points mesh and it is not very precise since, again, we are using a quite coarse sampling of the brillouine zone. Indeed we can see that already the interpolated DFT band structure deviates from the exact DFT band-structure, which has also been reported. In particular in the region nearby Gamma. However it gives quite nicely an overview of how the QP band structure compares with the DFT band stucture. The main effect is indeed an opening of the band-gap which can be described in terms of a scissor operator.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_yambo.png|500px|center|GaSb QP bands]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the optical properties of GaSb =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--{|&lt;br /&gt;
| [[File:SOC_GaSb_bands.png|600px|center|GaSb bands 1]]&lt;br /&gt;
| [[File:SOC_GaSb_absorption.png|600px|center|GaSb bands 2]]&lt;br /&gt;
|} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now turn our attention on the optical properties of the system. Here we will compute the dielectric function at different levels of approximations:&amp;lt;br /&amp;gt;&lt;br /&gt;
# at the IP-RPA level, thus using the Fermi golden rule with the KS energies and wave-functions&amp;lt;br /&amp;gt;&lt;br /&gt;
# at the RPA level, thus also including the effect of the local fields&amp;lt;br /&amp;gt;&lt;br /&gt;
# at the BSE level, thus including many-body effects, both correcting the KS energies (we will introduce a scissor obtained from the GW calculation) and considering the statically screened electron-hole interaction&lt;br /&gt;
# Run the simulations with SOC using screening databases computed without SOC.&lt;br /&gt;
# Run the simulations in perturbative SOC approach  &lt;br /&gt;
&lt;br /&gt;
First, setup the calculation (initialisation) in the usual way in the folder without SOC&lt;br /&gt;
 $ cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 $ yambo&lt;br /&gt;
and repeat the same inside the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; before continuing.&lt;br /&gt;
&lt;br /&gt;
== RPA-IP absorption ==&lt;br /&gt;
&lt;br /&gt;
Create a local folder inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; which you will call &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt;, and create the input file:&lt;br /&gt;
 &amp;gt;cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o c -V RL -F My_inputs/03_IP-RPA.in&lt;br /&gt;
&lt;br /&gt;
As before, we also provide an input file with suggested parameters for this calculations. The kind of calculation is controlled by the input variable&lt;br /&gt;
 Chimod= &amp;quot;IP&amp;quot;                 # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1            RL    # [Xd] Response block size&lt;br /&gt;
These tells you that we are building up the dielectric function in G-space considering only on G vector, i.e. the G=0 component. The string Chimod= &amp;amp;quot;IP&amp;amp;quot; recalls us that this means we are neglecting the local fields effect.&lt;br /&gt;
&lt;br /&gt;
We set the plane-waves cutoff for the wavefunctions to&lt;br /&gt;
 FFTGvecs=  10  Ry   # [FFT] Plane-waves&lt;br /&gt;
Since we are interested into the optical spectrum calculation, only the Q=0 term, i.e. the first Q-point, is calculated&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
The number of bands we use is 10. This is a reasonable number of states to converge the IP-RPA optical spectrum in the VIS-UV range. (If you wish to calculate the EELS spectrum for q different from 0 probably more bands will be required.)&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 10 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
As you learned the dielectric function is a tensor and in principle three calculations for light polarized along x,y,z chould be done depending on the experimental setup. However GaSb is a system with cubic symmetry, thus any direction is equivalent. Here we decide to compute epsilon along the &amp;amp;quot;(1 1 1)&amp;amp;quot; direction.&lt;br /&gt;
 % LongDrXd&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation using either your input file or the one provided in the Inputs folder&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/03_IP-RPA.in  -J 03_IP-RPA -C 03_IP-RPA&lt;br /&gt;
&lt;br /&gt;
Inside the &amp;lt;code&amp;gt;03_IP-RPA&amp;lt;/code&amp;gt; folder you will find the databases created by the code (in this case just the dipoles), the report file and the output files for the dielectric function which describes the absorption (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;) and for its inverse (&amp;lt;code&amp;gt;o-03_IP-RPA.eel*&amp;lt;/code&amp;gt;), which describes the electron energy loss. You can plot them with your favorite software (for example gnuplot or xmgrace). The real and imaginary parts of the IP-RPA dielectric function are column 3 and 2 respectively of the file (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;). Using also the reference output file in the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; folder you can compare the spectrum with and without SOC.&lt;br /&gt;
&lt;br /&gt;
Now repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 20 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.jpg|600px|center|GaSb absorption RPA]]&lt;br /&gt;
If you wish to obtain a reasonable spectrum however the 6x6x6 kpts grid is not enough. In order to check the convergence with the number of k-points you should run the same kind of calculations on other k-points meshes, either using the ones we provided ot creating new ones using the input files in the Pwscf folder (see section [[more.php|More on GaSb]] for more advanced calculations).&lt;br /&gt;
&lt;br /&gt;
In the directories Reference_Outputs several RPA dielectric functions are saved with the dielectric function calculated with the 10x10x10 and the 14x14x14 k-grid. You will learn that within RPA spectra the lowest energy peak is under-estimated. Also the spectra with and without SOC look very similar and the SO splitting is almost not present. This is clearly due to the excitonic nature of the E1 peak which can be correctly described only including the electron-hole interaction.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== RPA absorption with local fields ==&lt;br /&gt;
&lt;br /&gt;
To also include the local fields effect you can generate the input with the command: &lt;br /&gt;
 &amp;gt;yambo -o c -k hartree -F My_inputs/04_RPA_LF.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
In the input file we provide you will see that now the chimod and size of the dynamical matrix are set to&lt;br /&gt;
 Chimod= &amp;amp;quot;Hartree&amp;amp;quot;       # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1       Ry    # [Xd] Response block size&lt;br /&gt;
&lt;br /&gt;
Including local fields the poles of absorption will move from KS transitions to many-electrons transitions (although we are still neglecting the electron-hole interaction). As a result you will need more states to converge the absorption spectrum. This is why we set the number of bands to 15:&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 15 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
while as before we will have&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 %&lt;br /&gt;
 LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/04_RPA_LF.in -J 04_RPA_LF -C 04_RPA_LF_out&lt;br /&gt;
&lt;br /&gt;
In the 04_RPA+LF_out folder you will fine the report and the output files as before. The real and imaginary parts of the RPA+LF dielectric function with local fields are column 3 and 2 respectively of the .eps file. While the corresponding IP-RPA spectra is reported in columns 5 and 4.&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 30 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
In the following picture we compare the result of IP-RPA and RPA+LF with SOC.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA_IP_vs_LF.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== BSE absorption with QP corrections ==&lt;br /&gt;
&lt;br /&gt;
A more detailed description of BSE in Yambo is available in the following tutorial: &lt;br /&gt;
[https://wiki.yambo-code.eu/wiki/index.php?title=Calculating%20optical%20spectra%20including%20excitonic%20effects:%20a%20step-by-step%20guide BSE in hBN].&lt;br /&gt;
&lt;br /&gt;
=== Static Screening ===&lt;br /&gt;
&lt;br /&gt;
First we need to obtain the static screening. &lt;br /&gt;
&lt;br /&gt;
This can be done using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s -F My_inputs/05_screening.in&lt;br /&gt;
&lt;br /&gt;
In the resulting input file you can also see the parameters used to compute the static dielectric function needed for the screened Coulomb term (W) of the BSE kernel. Here we use 20 bands and an energy cut-off of 1 Ry.&lt;br /&gt;
&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 20 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 1            Ry    # [Xs] Response block size&lt;br /&gt;
&lt;br /&gt;
Remember to double the number of bands for the case with spin-oribit coupling included. &lt;br /&gt;
&lt;br /&gt;
Then run the file &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F My_inputs/05_screening.in -J screening -C screening&lt;br /&gt;
&lt;br /&gt;
=== BS Kernel and Solver ===&lt;br /&gt;
&lt;br /&gt;
Now we build the BS kernel, and specify the BS kernel solver. Overview of the BSE solvers is available using the following link: [[BSE solvers overview]]. In this tutorial we will use Haydock solver because it is computationally cheaper.&lt;br /&gt;
&lt;br /&gt;
As you probably know the inclusion of the electron-hole interaction makes the approach in G space not feasible. We have thus to compute the dielectric function in the electron-hole space, building up the excitonic hamiltonian. Thus to create the input file you can run the command:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y h -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder. As before you, in the directory Inputs, you can find an example with suggested parameters. The plane-wave cutoffs used to expand wavefunctions is set to 10 Ry, the cut-off on the exchange interaction between the electron and the hole (i.e. for the local-fields) is set to 10 Ry (here we use a much higer value compared to the previous run since the computational cost of increasing this variable in the electron-hole space is very low). and, finally, the cut-off on the direct electron-hole interaction is set to 1 Ry (to build up this term, where the interaction is screened, we need to compute the static dielectric constant in G-space, thus increasing this value is computationally demanding).&lt;br /&gt;
 FFTGvecs= 10     Ry    # [FFT] Plane-waves&lt;br /&gt;
 BSENGexx= 10     Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=  1     Ry    # [BSK] Screened interaction block size&lt;br /&gt;
&lt;br /&gt;
The input variable &amp;amp;quot;KfnQP_E&amp;amp;quot; can be used to include a scissor operator, i.e a opening of the DFT band gap. The value 0.53 eV is the coverged correction at Gamma obtained in the GW run. Here we will calculate the BSE assuming that the &amp;amp;quot;scissor operator approximation&amp;amp;quot; is valid for GaSb (to be checked in principle!) .&lt;br /&gt;
&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 0.530000 &amp;lt;/span&amp;gt; | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
To build up the excitonic matrix we consider the states from 3 to 6, i.e. we are using 2 occupied and 2 unoccupied bands.&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and we will build up the dielectric function using a grid of 200 point in frequency space&lt;br /&gt;
 BEnSteps= 200                # [BSS] Energy steps&lt;br /&gt;
Finally, similarly as before, we will have&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
Remember that the BS kernel is written in the electron-hole space and its size is given by the relation&amp;lt;br /&amp;gt;&lt;br /&gt;
BS kernel size = Valence Bands × Conduction Bands × K-points in the whole BZ.&amp;lt;br /&amp;gt;&lt;br /&gt;
This means that in the case with SO we are building up a matrix 2x2=4 times larger of the corresponding calculation without spin-orbit (you can compare the input in With_SO/Yambo/Inputs / Without_SO/Yambo/Inputs and reference outputs in With_SO/Yambo/Reference_Outputs / With_SO/Yambo/Reference_Outputs)&lt;br /&gt;
&lt;br /&gt;
We are ready to run the BSE calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J &amp;quot;05_BSE,screening&amp;quot; -C 05_BSE&lt;br /&gt;
&lt;br /&gt;
We specify to Yambo the folder which contains calculated static screening, and in &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; the two response files &amp;lt;code&amp;gt; o-05_BSE.eel_q1_haydock_bse &amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-05_BSE.eps_q1_haydock_bse&amp;lt;/code&amp;gt; can be found. In the &#039;&#039;eps file&#039;&#039; the real and imaginary parts of the BSE dielectric function are column 3 and 2 respectively, while the corresponding GW spectra are column 5 and 4.&lt;br /&gt;
&lt;br /&gt;
In the folder &amp;lt;code&amp;gt;screening&amp;lt;/code&amp;gt; you will find instead the DBs of the static screening (W) needed to build up the BSE kernel (&amp;lt;code&amp;gt;ndb.em1s&amp;lt;/code&amp;gt;) and in the folder &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; the BSE matrix (&amp;lt;code&amp;gt;ndb.BS*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 40 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   5 | 12 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
If you do the corresponding calculations for the case without spin-orbits using the databases in the directory GaSb_nSO/YAMBO and inputs in GaSb_nSO/Inputs, the two BSE spectra should look like in this figure:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE_few_kpts.jpg|500px|center|GaSb absorption BSE gew kpts]]&lt;br /&gt;
As mentioned before the two spectra present spurious peaks ( as the first peak!) due to uncoverged k-point sampling. Nevertheless the splitting due to spin-orbit interaction is already visible in the peak around 2.1 eV.&lt;br /&gt;
A more converged (yet not fully converged calculation) would give the following results which compares very nicely with the experimental data:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE.png|500px|center|GaSb absorption BSE]]&lt;br /&gt;
&lt;br /&gt;
=== Using Static Screening without SOC, for the SOC case === &lt;br /&gt;
&lt;br /&gt;
Additionally, a BSE run for the spin-orbit coupling case can be done using the screening computed for the case without spin-orbit coupling. &lt;br /&gt;
&lt;br /&gt;
To do it we can make a symlink from the no-SOC folder:&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt; cd Path/GaSb/With_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt; ln -s Path/GaSb/Without_SOC/YAMBO/6x6x6_shifted/screening screening_no_soc&lt;br /&gt;
&lt;br /&gt;
The BSE kernel can be build and solved using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s -o b -k sex -y h -V qp -F 06_BSE_using_nosoc_screening.in&lt;br /&gt;
&lt;br /&gt;
Here we combined the screening part (-X s) and BSE part (-o b -k sex -y h -V qp). All of the input parameters have been discussed previously. Although, it is important to keep the right matching behind the screening bands used for the no SOC and SOC case.&lt;br /&gt;
&lt;br /&gt;
If for the SOC case the specified screening bands are n1, n2 then for the no-SOC screening the bands should be ((n1-1)/2+1, n2/2). &lt;br /&gt;
&lt;br /&gt;
 # No SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   1 | 20 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and &lt;br /&gt;
 # SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   1 | 40 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The results for the BSE solved using screening used from SOC and no SOC databases is presented below. As we can see, there is almost no difference between them. &lt;br /&gt;
&lt;br /&gt;
[[File:GaSb screening w and wo soc second.png|600px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
= Exciton analysis =&lt;br /&gt;
&lt;br /&gt;
In this part of the tutorial we show how to analyze the origin of the E1 peak in GaSb. Since the calculation with the SOC case is very demanding we will do that only for the case without SOC. So first of all enter the &lt;br /&gt;
&amp;lt;code&amp;gt;Without_SOC/YAMBO/6x6x6_shifted&amp;lt;/code&amp;gt; folder and, if you didn&#039;t before, run the setup:&lt;br /&gt;
 &amp;gt;cd Without_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt;ls SAVE&lt;br /&gt;
 &amp;gt;yambo -J 01_init&lt;br /&gt;
 &amp;gt;ls SAVE r-01_init_setup&lt;br /&gt;
&lt;br /&gt;
Similar to previous section we need to compute the static screening first, and then solve the BSE equation.&lt;br /&gt;
This time we will use the full diagonalization solver to calculate all exciton energies and composition in terms of electron-hole pairs. See [[BSE solvers overview]] for more details. &lt;br /&gt;
&lt;br /&gt;
Then create the &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; folder and the input file for a BSE&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -X s -F My_inputs/05_screening.in&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_screening.in -J screening -C screening &lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y d -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the same parameters you used to compute the absorption with SOC previously. The number of bands will be the half of the case without SOC&lt;br /&gt;
 % BSEBands&lt;br /&gt;
  3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
Also this time you will use the to &amp;lt;code&amp;gt;&amp;amp;quot;d&amp;amp;quot;&amp;lt;/code&amp;gt; and uncomment the variable needed to Write to disk excitonic the WFs:&lt;br /&gt;
 BSSmod= &amp;amp;quot;d&amp;amp;quot;              # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft`&lt;br /&gt;
 WRbsWF                   # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
Then you have to run the BSE calculation (notice that, in case you already computed the BSE spectrum also for the case without SOC, the code can read the results from the provious BSE run skipping many steps)&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J 05_BSE -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; folder you will now find a new database file called &amp;lt;code&amp;gt;ndb.BS_diago_Q01&amp;lt;/code&amp;gt;. This is what you need to analyze the exciton peaks running the post-processing code ypp.&lt;br /&gt;
&lt;br /&gt;
First of all you can run:&lt;br /&gt;
 &amp;gt;ypp -e s -J 05_BSE -C BSE_out&lt;br /&gt;
This run will sort in energy the excitonic eigenvalues writing their oscillator strenghts (see &amp;lt;code&amp;gt;o-06_bse.exc_E_sorted&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Then you can create the ypp input required to analize how each excitonic state is build up in terms of single-particle states:&lt;br /&gt;
 &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE&lt;br /&gt;
Put the index &amp;lt;code&amp;gt;#N&amp;lt;/code&amp;gt; of the exciton with higher strenght in the E_1 peak region&lt;br /&gt;
 &amp;gt;ypp -F My_inputs/05_BSE_ypp.in -J 05_BSE -C 06_BSE_out&lt;br /&gt;
You will find the two files &amp;lt;code&amp;gt;o-06_bse.exc_weights_at_#N&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-06_bse.exc_amplitude_at_#N&amp;lt;/code&amp;gt;. In these files you will find informations on the highest strenght exciton in the E1 peak region.&lt;br /&gt;
&lt;br /&gt;
= Perturbative SOC approach =&lt;br /&gt;
&lt;br /&gt;
It is possible to include the spin-orbit coupling perturbatively in Yambo.&lt;br /&gt;
&lt;br /&gt;
To first order the perturbation just gives a correction to the DFT eigenvalues and does not touch the wave–functions. Numerically the perturbation need to be applied by mapping the solution of the DFT calculation without SOC into the solution of the DFT calculation with SOC. Once a mapping is defined, the SOC perturbation could be directly applied to the KS energies before solving both the GW scheme and/or the BSE.&lt;br /&gt;
&lt;br /&gt;
All we need is to computed a SOC mapping database given by the following equation (eq 68 in the referenced paper):&lt;br /&gt;
&lt;br /&gt;
EQUATION &lt;br /&gt;
&lt;br /&gt;
Where x, y, z are ... &lt;br /&gt;
&lt;br /&gt;
To build this map, in the folder without spin-orbit coupling we do the following:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; cd Solid_GaSb/Without_SOC/Yambo/6x6xWi6_shifted&lt;br /&gt;
 &amp;gt; mkdir SOC_DBs&lt;br /&gt;
 &amp;gt; cp -r Path/SAVE_GaSb_k6_w_soc SOC_DBs/SAVE&lt;br /&gt;
 &amp;gt; ypp -w &lt;br /&gt;
 &amp;gt; ypp -F map_wfs.in -J SOC_map -C SOC_map&lt;br /&gt;
&lt;br /&gt;
With the following input for &amp;lt;code&amp;gt;map_wfs.in&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 WFs_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 WFs_SOC_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 SOC_DBs= &amp;quot;SOC_DBs&amp;quot;        # Path to the folder containing the DB with SOC&lt;br /&gt;
 SOC_splitting= 0.01 eV    # SOC splitting between the levels&lt;br /&gt;
 % bands_to_map&lt;br /&gt;
   5 | 12 |                # Number of bands to map&lt;br /&gt;
 %&lt;br /&gt;
 bands_buffer=1&lt;br /&gt;
&lt;br /&gt;
Where the SAVE folder with spin-orbit coupling should be saved in a separate folder, and in this case it is in the &amp;lt;code&amp;gt; SOC_DBs &amp;lt;/code&amp;gt; folder. &lt;br /&gt;
Then, the BSE can be computed using the following command &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F 05_BSE+scissor.in -J &amp;quot;BSE_soc_perturbative,screening,SOC_map&amp;quot; -C BSE_soc_perturbative&lt;br /&gt;
&lt;br /&gt;
Where screening was precomputed, and the SOC_map is the one generated in this section. Check BSE section for more details on setting a BSE calculation.&lt;br /&gt;
Not converged results are presented below. &lt;br /&gt;
[[File:GaSb perturbative soc 1.png|600px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
= Other excercises =&lt;br /&gt;
&lt;br /&gt;
# Try to converge the G0W0 increasing the polarization RL size, the polarization bands, the number of bands in the Green function and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Try to converge the absorption spectra increasing the polarization RL size, the polarization bands, the number of bands to construct the excitonic matrix and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Plot the EELS spectrum obtained within IP-RPA and RPA with local fields. Also in this case you can check the effect of increasing the polarization bands. You may also try to do a resonant only calculation to see that the EELS cannot be described using only the resonant part of the response function.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;&amp;gt;M. Marsili, A. Molina-Sánchez, M. Palummo, D. Sangalli, A. Marini, [https://doi.org/10.1103/PhysRevB.103.155152  Phys. Rev. B &#039;&#039;&#039;103&#039;&#039;&#039;, 155152 (2021)] ([https://arxiv.org/abs/2103.02266 arXiv 2103.02266])&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wiki&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Gallium_antimonide GaSb on wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;&amp;gt; [https://en.wikipedia.org/wiki/Spin%E2%80%93orbit_interaction#In_atomic_energy_levels Spin-Orbit Interaction on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kim&amp;quot;&amp;gt; Y.S. Kim et al. Phys. Rev. B &#039;&#039;&#039;82&#039;&#039;&#039;, 205212 (2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;rem&amp;quot;&amp;gt; I. N. Remediakis and Efthimios Kaxiras, Phys. Rev. B &#039;&#039;&#039;59&#039;&#039;&#039;, 5336 (1999).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan1&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1002/pssb.200983959 Phys. Sol. State B &#039;&#039;&#039;247&#039;&#039;&#039;, 1960 (2010)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan2&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1103/PhysRevLett.104.157402 Phys. Rev. Lett. &#039;&#039;&#039;104&#039;&#039;&#039;, 157402 (2010)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan3&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1103/PhysRevB.83.155421 Phys. Rev. B 83, &#039;&#039;&#039;155421&#039;&#039;&#039; (2011)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8974</id>
		<title>SOC</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8974"/>
		<updated>2025-08-24T15:22:13Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* BSE absorption with QP corrections */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Effect of spin-orbit interaction =&lt;br /&gt;
&lt;br /&gt;
Spin–orbit coupling (SOC) is a relativistic interaction between an electron’s spin and its orbital motion in the crystal potential. Presently, SOC can be included withing GW-BSE approach either perturbatively, or fully, considering the spinorial nature of the electronic wave-function. In this tutorial, we will use both approaches. More details on the theory and comparison between full spinorial GW-BSE and perturbative approach to SOC can be found in the following paper &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;, and in the Wikipedia article&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;/&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To include the spin-orbit coupling we start with many–body total Hamiltonian of the system including first order relativistic corrections. &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 1 many body rel hamiltonian.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where, &amp;lt;math&amp;gt;\hat{H}^{0}&amp;lt;/math&amp;gt; is the non-relativistic one body hamiltonian, &amp;lt;math&amp;gt;\hat{H}^{(e-e)}&amp;lt;/math&amp;gt; is the e-e Coulomb interaction, and &amp;lt;math&amp;gt;\hat{H}^{(RK)} + \hat{H}^{(SOI)}&amp;lt;/math&amp;gt; are the first order relativistic correction, and the last term is the spin-orbit interaction (SOI) in which we are interested in this tutorial. &lt;br /&gt;
&lt;br /&gt;
The SOI term itself is composed of three different components, &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 2 soi term.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; are many-body terms, called &amp;quot;two-electron spin-orbit&amp;quot;, and &amp;quot;spin-other-orbit&amp;quot;, respectively. And,  &amp;lt;math&amp;gt; \hat{H}^{(SOI)} = \hat{H}^{SO(N)} &amp;lt;/math&amp;gt; is &amp;quot;one electron spin-orbit&amp;quot; is a one body term, which is given by: &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 3 one electron spin orbit.png|250px|frameless]]&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;math&amp;gt;\underline{\nu}&amp;lt;/math&amp;gt; a 2x2 matrix in the &amp;lt;math&amp;gt;\uparrow&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\downarrow&amp;lt;/math&amp;gt; spin space, and:&lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 4 v soc.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;\mathbf{\sigma}&amp;lt;/math&amp;gt; is the three dimensional vector whose components are the Pauli matrices. In a plane wave representation the SOC is, in practice, accounted for by the use of pseudopotentials. The SOC contribution from the pseudopotential captures what is called “local SOC”, which is due to the electrons orbiting around the nuclei, it neglects instead the itinerant SOC which can- not be easily captured in periodic boundary conditions. When relativistic corrections are taken into account instead, one should in principle account for the effects of the many–body terms &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt;. A shortcut is to add a term constructed replacing &amp;lt;math&amp;gt;v^{ext}&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;v^{Hxc}&amp;lt;/math&amp;gt; into previous equation. Doing so partially account for &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt;, while &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; is neglected.&lt;br /&gt;
&lt;br /&gt;
= Introduction = &lt;br /&gt;
&lt;br /&gt;
The scope of this tutorial is to calculate the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; corrections to the DFT-LDA band-structure and the BSE optical spectrum for a bulk semiconducting material, gallium antimonide (GaSb) &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;wiki&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;kim&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;rem&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan1&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan2&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan3&amp;quot;/&amp;gt;. We will compare the results with and without the spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DFT band structure =&lt;br /&gt;
&lt;br /&gt;
For this tutorial we provide two state (GS) databases (DBs), one contains the GS-DBs with the effect of SOC included and one without. The idea is to repeat the same calculation for both database and compare the results and the performances of the code. GaSb input files can be downloaded from the following link [https://media.yambo-code.eu/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz], and can be unarchived using the following command: &lt;br /&gt;
&lt;br /&gt;
 $ tar -xzf GaSb.tar.gz&lt;br /&gt;
&lt;br /&gt;
As in other tutorials you can find the folder containing the input files for the pwscf code (PWSCF, in case you prefer to generate the GS-DBs by yourself) and the folder containing the GS-DBs, the reference input files and the reference output files for the yambo code (YAMBO). Instead of continuously jumping back and forth from the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;With_SOC&amp;lt;/code&amp;gt; folder we advice to open two terminals and keep one for the without SOC case and another for the with SOC case.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s have a look to the content of the folders. For example we can enter in the &amp;lt;code&amp;gt;GaSb/With_SOC/&amp;lt;/code&amp;gt; folder &lt;br /&gt;
 $ cd GaSb/With_SOC/&lt;br /&gt;
 $ ls Pwscf YAMBO&lt;br /&gt;
 $ cd YAMBO&lt;br /&gt;
 $ ls 4x4x4_shifted+GAMMA &lt;br /&gt;
 6x6x6_shifted  10x10x10_shifted 14x14x14_shifted   Inputs  Reference_Outputs&lt;br /&gt;
&lt;br /&gt;
Inside the YAMBO folder there are indeed four folders corresponding to four different k-points meshes. In this tutorial we will use the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; folder for the computation of the QP corrections within the GoWo approximation. It is a k-points grid obtained as the sum of a 4x4x4 k-points grid centered in Gamma and a 4x4x4 grid shifted. Instead for the computation of the optical properties we will use the &amp;lt;code&amp;gt;6x6x6_shifted&amp;lt;/code&amp;gt; folder. It is a 6x6x6 k-points grid shifted from Gamma. The other two folders, &amp;lt;code&amp;gt;10x10x10_shifted&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;14x14x14_shifted&amp;lt;/code&amp;gt; can be used to do a minimum convergence of the optical properties against the number of k-points (pay attention that the BSE calculations with bigger grids will be very memory and time demanding!).&lt;br /&gt;
&lt;br /&gt;
The first part of the tutorial is on the computation of the QP corrections. So let&#039;s enter the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; grid and, as seen in other tutorials run the Initialization:&lt;br /&gt;
&lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA/ &lt;br /&gt;
 $ yambo -J 01_init &lt;br /&gt;
Now compare the result of the two setup runs.&lt;br /&gt;
&lt;br /&gt;
With_SOC case:&lt;br /&gt;
&amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  5.046557&lt;br /&gt;
  VBM / CBm          [ev]:   0.00000   0.06025&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0008               0009-0200&lt;br /&gt;
  Indirect Gaps      [ev]:  0.06025   3.57546&amp;lt;/pre&amp;gt;&lt;br /&gt;
Without_SOC case:&lt;br /&gt;
 &amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  4.777401&lt;br /&gt;
  VBM / CBm          [ev]:  0.000000  0.332282&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0004               0005-0100&lt;br /&gt;
  Indirect Gaps      [ev]: 0.332282  3.620628&lt;br /&gt;
  Direct Gaps        [ev]: 0.332282  7.137342&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A clear shrink of the DFT-LDA gap due to spin-orbit occurs. Note that, having 8 electrons in the fundamental cell, due to the spinorial nature of the wavefunction, with SOC we have 8 occupied bands, while only 4 without. Here a picture of the DFT band structure for the two cases.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_pwscf.png|500px|center|GaSb bands DFT]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the band structure of GaSb =&lt;br /&gt;
 &lt;br /&gt;
Now we will perform a G0W0 calculation to correct the DFT-LDA bandstructure. We assume that you are already familiar with the concept of screening needed to build up the GW self-energy and thus the QP corrections. Create a local folder &#039;&#039;My_inputs&#039;&#039; and generate the input for a G0W0 calculation within the plasmon-pole approximation using the following command: &lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA&lt;br /&gt;
 $ mkdir My_inputs&lt;br /&gt;
 $ yambo -p p -g n -V RL -F My_inputs/02_GW.in&lt;br /&gt;
However we also provide an input file with suggested parameters for this calculations inside the folder &#039;&#039;Solid_GaSb/Without_SOC/Yambo/Inputs&#039;&#039;. Remember: these parameters are system dependent and should be converged as you can see other GW tutorials (e.g. [[GW]] or [[GW convergence]]). Here we provide reasonable (but not fully converged) parameters to have a low computational cost but yet qualitatively meaningful results.&lt;br /&gt;
&lt;br /&gt;
The plane-waves cutoff for the wavefunctions and exchange part of the self-energy are set to 10 Ry. &lt;br /&gt;
 FFTGvecs =  10 Ry   # [FFT] Plane-waves&lt;br /&gt;
 EXXRLvcs=   10 Ry   # [XX] Exchange RL components&lt;br /&gt;
while we will use 40 bands, a plane-wave cut-off of 1 Ry, and a plasmon-pole energy of 20 eV to build up the screening matrix &lt;br /&gt;
 NGsBlkXp=    1 Ry  # [Xp] Response block size &lt;br /&gt;
 PPAPntXp= 20.  eV  # [Xp] PPA imaginary energy &lt;br /&gt;
 % BndsRnXp    &lt;br /&gt;
 1 | 40 |        # [Xp] Polarization function bands &lt;br /&gt;
 % &lt;br /&gt;
 % LongDrXp  &lt;br /&gt;
 1.000000 | 1.000000 | 1.000000 |        # [Xp] [cc] Electric Field &lt;br /&gt;
 %&lt;br /&gt;
The number of bands in the green function G to build up the GW self-energy is also 40 &lt;br /&gt;
 % GbndRnge    &lt;br /&gt;
 1 | 40 |                 # [GW] G[W] bands range &lt;br /&gt;
 %&lt;br /&gt;
with those parameters we will compute the correction only in the last 2 points of our grid, 28 and 29 and for the states from 3 to 6, setting the input variable &lt;br /&gt;
 %QPkrange                      &lt;br /&gt;
 28 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
As you can verify from your &#039;&#039;r-01_init_setup&#039;&#039; file 28 and 29 are the L and the Gamma point of the Brillouin zone. &lt;br /&gt;
 *X* K [28] :-0.500000 -0.500000 -0.500000 (rlu) * Comp.s 476 * weight    0.0078   &lt;br /&gt;
 ...   &lt;br /&gt;
 *X* K [29] : 0.000000  0.000000  0.000000 (rlu)  * Comp.s 531 * weight    0.0020   &lt;br /&gt;
 ...&lt;br /&gt;
You can now run the code using either your input file or the one provided in the Inputs folder &lt;br /&gt;
 $ yambo -F ../Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
The run will take some time. Indeed the code has first to compute the dipoles, then the screening within the plasmon pole approximation and finally the self-energy, first the exchange part Gv and then the correlation part G(W-v). &lt;br /&gt;
In the &amp;lt;code&amp;gt;GW_out&amp;lt;/code&amp;gt; folder you will find the &amp;lt;code&amp;gt;o-GW.qp&amp;lt;/code&amp;gt; file containing the GW corrections.&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &lt;br /&gt;
 #&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #&lt;br /&gt;
  ...&lt;br /&gt;
  29.00000    4.00000    0.00000    0.22802    1.07276&lt;br /&gt;
  29.00000    5.00000    0.33228    0.66303   -2.39219&lt;br /&gt;
  ...&lt;br /&gt;
Thus it is about 0.66-0.23=0.43 eV (not fully converged).&lt;br /&gt;
&lt;br /&gt;
We can also compute the G0W0 correction for all the k-point of the database. To this end open the input file &#039;&#039;../Inputs/02_GW.in&#039;&#039; (or your own) and edit the number of k-point to be computed &lt;br /&gt;
 %&lt;br /&gt;
 QPkrange                      1 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
If you have learned how to run the code in parallel you may also set the parallel environment input variables:&lt;br /&gt;
 X_all_q_CPU= &amp;amp;quot;2&amp;amp;quot;              # [PARALLEL] CPUs for each role &lt;br /&gt;
 X_all_q_ROLEs= &amp;amp;quot;q&amp;amp;quot;            # [PARALLEL] CPUs roles (q,k,c,v) &lt;br /&gt;
 SE_CPU= &amp;amp;quot;2&amp;amp;quot;                   # [PARALLEL] CPUs for each role &lt;br /&gt;
 SE_ROLEs= &amp;amp;quot;q&amp;amp;quot;                 # [PARALLEL] CPUs roles (q,qp,b)&lt;br /&gt;
Remember to use the same name after the -J option, so that the code will be able to use the informations from the previous run and avoid many calculations. &lt;br /&gt;
 $ mpirun -np 2 yambo -F Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
In the &#039;&#039;GW_out&#039;&#039; folder you will find now also the &#039;&#039;o-GW.qp_01&#039;&#039; file containg the GW corrections for all the k-points.&lt;br /&gt;
&lt;br /&gt;
Now you can enter the folder of the 4x4x4 shifted grid&lt;br /&gt;
 cd Solid_GaSb/With_SOC/Yambo/4x4x4_shifted+GAMMA&lt;br /&gt;
and repeat the same calculations. Remember that in the input file you will generate you should change all the band ranges doubling the number of states (do you understand why?) &lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
    1 | 80 |        # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
    1 | 80 |        # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 % QPkrange&lt;br /&gt;
   29 | 29 |   5 | 12|  # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band.&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #  &lt;br /&gt;
   ...   &lt;br /&gt;
   29.00000    8.00000    0.00000    0.21758    0.95843&lt;br /&gt;
   29.00000    9.00000    0.06025    0.65362   -2.36544&lt;br /&gt;
   ...&lt;br /&gt;
Thus it is about 0.65-0.22=0.43 eV (not fully converged). Indeed the same result obtained without SOC. The resulting electronic gap is about 0.46 eV reasonably close to the experimental band gap of 0.72 eV. It is also a big improvment compared to the LDA band gap (less than 0.03 eV). This correction (indeed the slightly bigger value of 0.53 eV) will be used, in the form of a scissor operator, as a starting point to compute the optical spectra.&lt;br /&gt;
&lt;br /&gt;
Again we can also compute the G0W0 correction for all the k-point of the database. You can plot column 4 of the output file against column 3 to obtain a picture of the QP corrections. In the following figure we show the plot of the G0W0 correction (E_GoWo-E_LDA) vs the LDA eigenvalues. The corrections at the Gamma and the L point are marked with bigger red spots.&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=400px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_GoWo_corrections.png|GaSb QP corrections without SOC &lt;br /&gt;
Image:GaSb GoWo corrections SOC.png|GaSb GoWo corrections with SOC&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
[[File:SOC_GaSb_GoWo_corrections.png|500px|frameless|center]]&lt;br /&gt;
[[File:GaSb GoWo corrections SOC.png|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;scissor operator approach&amp;amp;quot; does not seem a very good approximation for GaSb. Indeed the quasi particle corrections are not constant, especially in the conduction band. For example the correction to the Gamma point is bigger than the corrections to all other k-points. This result however maybe due to the poor covergence parameters. If you would like to better investigate these results you should try do convergence tests. Since QP corrections are poorly sensitive to the spin-orbit interaction it is probably a good idea to do convergence without SOC.&lt;br /&gt;
&lt;br /&gt;
Here we also provide a plot of the band-structure at different levels of approximation: DFT, DFT+scissor, QP. The band structures are obtained from an interpolation of our k-points mesh and it is not very precise since, again, we are using a quite coarse sampling of the brillouine zone. Indeed we can see that already the interpolated DFT band structure deviates from the exact DFT band-structure, which has also been reported. In particular in the region nearby Gamma. However it gives quite nicely an overview of how the QP band structure compares with the DFT band stucture. The main effect is indeed an opening of the band-gap which can be described in terms of a scissor operator.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_yambo.png|500px|center|GaSb QP bands]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the optical properties of GaSb =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--{|&lt;br /&gt;
| [[File:SOC_GaSb_bands.png|600px|center|GaSb bands 1]]&lt;br /&gt;
| [[File:SOC_GaSb_absorption.png|600px|center|GaSb bands 2]]&lt;br /&gt;
|} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now turn our attention on the optical properties of the system. Here we will compute the dielectric function at different levels of approximations:&amp;lt;br /&amp;gt;&lt;br /&gt;
(i) at the IP-RPA level, thus using the Fermi golden rule with the KS energies and wave-functions&amp;lt;br /&amp;gt;&lt;br /&gt;
(ii) at the RPA level, thus also including the effect of the local fields&amp;lt;br /&amp;gt;&lt;br /&gt;
(iii) at the BSE level, thus including many-body effects, both correcting the KS energies (we will introduce a scissor obtained from the GW calculation) and considering the statically screened electron-hole interaction&lt;br /&gt;
&lt;br /&gt;
First, setup the calculation (initialization) in the usual way in the folder without SOC&lt;br /&gt;
 $ cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 $ yambo -J 01_init&lt;br /&gt;
and repeat the same inside the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; before continuing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;(to be finalized) The yambo code can also run simulations in the perturbative SOC approach. To this end first generate the SOC mapping database in the Without SOC folder following these instructions. After that you will be able to compute optical properties at all levels within the perturbative approach by linking the mapping database. We  will show below how to do that.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;(to be finalized) Finally, for the BSE run with SOC (and for the GW run?), it is also possible to solve the fully spinorial equations, but using the screening databases computed without SOC. In the BSE (and GW?) runs we will discuss how to do that.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RPA-IP absorption ==&lt;br /&gt;
&lt;br /&gt;
Create a local folder inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; which you will call &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt;, and create the input file:&lt;br /&gt;
 &amp;gt;cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o c -V RL -F My_inputs/03_IP-RPA.in&lt;br /&gt;
&lt;br /&gt;
As before, we also provide an input file with suggested parameters for this calculations. The kind of calculation is controlled by the input variable&lt;br /&gt;
 Chimod= &amp;quot;IP&amp;quot;                 # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1            RL    # [Xd] Response block size&lt;br /&gt;
These tells you that we are building up the dielectric function in G-space considering only on G vector, i.e. the G=0 component. The string Chimod= &amp;amp;quot;IP&amp;amp;quot; recalls us that this means we are neglecting the local fields effect.&lt;br /&gt;
&lt;br /&gt;
We set the plane-waves cutoff for the wavefunctions to&lt;br /&gt;
 FFTGvecs=  10  Ry   # [FFT] Plane-waves&lt;br /&gt;
Since we are interested into the optical spectrum calculation, only the Q=0 term, i.e. the first Q-point, is calculated&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
The number of bands we use is 20. This is a reasonable number of states to converge the IP-RPA optical spectrum in the VIS-UV range. (If you wish to calculate the EELS spectrum for q different from 0 probably more bands will be required.)&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 10 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
As you learned the dielectric function is a tensor and in principle three calculations for light polarized along x,y,z chould be done depending on the experimental setup. However GaSb is a system with cubic symmetry, thus any direction is equivalent. Here we decide to compute epsilon along the &amp;amp;quot;(1 1 1)&amp;amp;quot; direction.&lt;br /&gt;
 % LongDrXd&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation using either your input file or the one provided in the Inputs folder&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/03_IP-RPA.in  -J 03_IP-RPA -C 03_IP-RPA_out&lt;br /&gt;
&lt;br /&gt;
Inside the &amp;lt;code&amp;gt;03_IP-RPA&amp;lt;/code&amp;gt; folder you will find the databases created by the code (in this case just the dipoles), while in the &amp;lt;code&amp;gt;03_IP-RPA_out&amp;lt;/code&amp;gt; the report file and the output files for the dielectric function which describes the absorption (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;) and for its inverse (&amp;lt;code&amp;gt;o-03_IP-RPA.eel*&amp;lt;/code&amp;gt;), which describes the electron energy loss. You can plot them with your favorite software (for example gnuplot or xmgrace). The real and imaginary parts of the IP-RPA dielectric function are column 3 and 2 respectively of the file (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;). Using also the reference output file in the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; folder you can compare the spectrum with and without SOC.&lt;br /&gt;
&lt;br /&gt;
Now repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 20 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.jpg|600px|center|GaSb absorption RPA]]&lt;br /&gt;
If you wish to obtain a reasonable spectrum however the 6x6x6 kpts grid is not enough. In order to check the convergence with the number of k-points you should run the same kind of calculations on other k-points meshes, either using the ones we provided ot creating new ones using the input files in the Pwscf folder (see section [[more.php|More on GaSb]] for more advanced calculations).&lt;br /&gt;
&lt;br /&gt;
In the directories Reference_Outputs several RPA dielectric functions are saved with the dielectric function calculated with the 10x10x10 and the 14x14x14 k-grid. You will learn that within RPA spectra the lowest energy peak is under-estimated. Also the spectra with and without SOC look very similar and the SO splitting is almost not present. This is clearly due to the excitonic nature of the E1 peak which can be correctly described only including the electron-hole interaction.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== RPA absorption with local fieldds ==&lt;br /&gt;
&lt;br /&gt;
To also include the local fields effect you can generate the input with the command: &lt;br /&gt;
 &amp;gt;yambo -o c -k hartree -F My_inputs/04_RPA_LF.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
In the input file we provide you will see that now the chimod and size of the dynamical matrix are set to&lt;br /&gt;
 Chimod= &amp;amp;quot;Hartree&amp;amp;quot;       # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1       Ry    # [Xd] Response block size&lt;br /&gt;
&lt;br /&gt;
Including local fields the poles of absorption will move from KS transitions to many-electrons transitions (although we are still neglecting the electron-hole interaction). As a result you will need more states to converge the absorption spectrum. This is why we set the number of bands to 15:&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 15 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
while as before we will have&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 %&lt;br /&gt;
 LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/04_RPA_LF.in -J 04_RPA_LF -C 04_RPA_LF_out&lt;br /&gt;
&lt;br /&gt;
In the 04_RPA+LF_out folder you will fine the report and the output files as before. The real and imaginary parts of the RPA+LF dielectric function with local fields are column 3 and 2 respectively of the .eps file. While the corresponding IP-RPA spectra is reported in columns 5 and 4.&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 30 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
In the following picture we compare the result of IP-RPA and RPA+LF with SOC.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA_IP_vs_LF.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== BSE absorption with QP corrections ==&lt;br /&gt;
&lt;br /&gt;
A more detailed description of BSE in Yambo is available in the following tutorial: &lt;br /&gt;
[https://wiki.yambo-code.eu/wiki/index.php?title=Calculating%20optical%20spectra%20including%20excitonic%20effects:%20a%20step-by-step%20guide BSE in hBN].&lt;br /&gt;
&lt;br /&gt;
=== Static Screening ===&lt;br /&gt;
&lt;br /&gt;
First we need to obtain the static screening. &lt;br /&gt;
&lt;br /&gt;
This can be done using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s My_inputs/05_screening.in&lt;br /&gt;
&lt;br /&gt;
In the resulting input file you can also see the parameters used to compute the static dielectric function needed for the screened Coulomb term (W) of the BSE kernel. Here we use 20 bands and an energy cut-off of 1 Ry.&lt;br /&gt;
&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 20 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 1            Ry    # [Xs] Response block size&lt;br /&gt;
&lt;br /&gt;
Remember to double the number of bands for the case with spin-oribit coupling included. &lt;br /&gt;
&lt;br /&gt;
Then run the file &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F My_inputs/05_screening.in -J screening -C screening&lt;br /&gt;
&lt;br /&gt;
=== BS Kernel and Solver ===&lt;br /&gt;
&lt;br /&gt;
Now we build the BS kernel, and specify the BS kernel solver. Overview of the BSE solvers is available using the following link: [[BSE solvers overview]]. In this tutorial we will use Haydock solver because it is computationally cheaper.&lt;br /&gt;
&lt;br /&gt;
As you probably know the inclusion of the electron-hole interaction makes the approach in G space not feasible. We have thus to compute the dielectric function in the electron-hole space, building up the excitonic hamiltonian. Thus to create the input file you can run the command:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y h -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder. As before you, in the directory Inputs, you can find an example with suggested parameters. The plane-wave cutoffs used to expand wavefunctions is set to 10 Ry, the cut-off on the exchange interaction between the electron and the hole (i.e. for the local-fields) is set to 10 Ry (here we use a much higer value compared to the previous run since the computational cost of increasing this variable in the electron-hole space is very low). and, finally, the cut-off on the direct electron-hole interaction is set to 1 Ry (to build up this term, where the interaction is screened, we need to compute the static dielectric constant in G-space, thus increasing this value is computationally demanding).&lt;br /&gt;
 FFTGvecs= 10     Ry    # [FFT] Plane-waves&lt;br /&gt;
 BSENGexx= 10     Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=  1     Ry    # [BSK] Screened interaction block size&lt;br /&gt;
&lt;br /&gt;
The input variable &amp;amp;quot;KfnQP_E&amp;amp;quot; can be used to include a scissor operator, i.e a opening of the DFT band gap. The value 0.53 eV is the coverged correction at Gamma obtained in the GW run. Here we will calculate the BSE assuming that the &amp;amp;quot;scissor operator approximation&amp;amp;quot; is valid for GaSb (to be checked in principle!) .&lt;br /&gt;
&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 0.530000 &amp;lt;/span&amp;gt; | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
To build up the excitonic matrix we consider the states from 5 to 12, i.e. we are using 4 occupied and 4 unoccupied bands.&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and we will build up the dielectric function using a grid of 200 point in frequency space&lt;br /&gt;
 BEnSteps= 200                # [BSS] Energy steps&lt;br /&gt;
Finally, similarly as before, we will have&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
Remember that the BS kernel is written in the electron-hole space and its size is given by the relation&amp;lt;br /&amp;gt;&lt;br /&gt;
BS kernel size = Valence Bands × Conduction Bands × K-points in the whole BZ.&amp;lt;br /&amp;gt;&lt;br /&gt;
This means that in the case with SO we are building up a matrix 2x2=4 times larger of the corresponding calculation without spin-orbit (you can compare the input in With_SO/Yambo/Inputs / Without_SO/Yambo/Inputs and reference outputs in With_SO/Yambo/Reference_Outputs / With_SO/Yambo/Reference_Outputs)&lt;br /&gt;
&lt;br /&gt;
We are ready to run the BSE calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J &amp;quot;05_BSE,screening&amp;quot; -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
We specify to Yambo the folder which contains calculated static screening, and in &amp;lt;code&amp;gt;05_BSE_out&amp;lt;/code&amp;gt; the two response files &amp;lt;code&amp;gt; o-05_BSE.eel_q1_haydock_bse &amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-05_BSE.eps_q1_haydock_bse&amp;lt;/code&amp;gt; can be found. In the &#039;&#039;eps file&#039;&#039; the real and imaginary parts of the BSE dielectric function are column 3 and 2 respectively, while the corresponding GW spectra are column 5 and 4.&lt;br /&gt;
&lt;br /&gt;
In the folder &amp;lt;code&amp;gt;screening&amp;lt;/code&amp;gt; you will find instead the DBs of the static screening (W) needed to build up the BSE kernel (&amp;lt;code&amp;gt;ndb.em1s&amp;lt;/code&amp;gt;) and in the folder &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; the BSE matrix (&amp;lt;code&amp;gt;ndb.BS*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 40 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   5 | 12 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
If you do the corresponding calculations for the case without spin-orbits using the databases in the directory GaSb_nSO/YAMBO and inputs in GaSb_nSO/Inputs, the two BSE spectra should look like in this figure:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE_few_kpts.jpg|500px|center|GaSb absorption BSE gew kpts]]&lt;br /&gt;
As mentioned before the two spectra present spurious peaks ( as the first peak!) due to uncoverged k-point sampling. Nevertheless the splitting due to spin-orbit interaction is already visible in the peak around 2.1 eV.&lt;br /&gt;
A more converged (yet not fully converged calculation) would give the following results which compares very nicely with the experimental data:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE.png|500px|center|GaSb absorption BSE]]&lt;br /&gt;
&lt;br /&gt;
=== Using Static Screening without SOC, for the SOC case === &lt;br /&gt;
&lt;br /&gt;
Additionally, a BSE run for the spin-orbit coupling case can be done using the screening computed for the case without spin-orbit coupling. &lt;br /&gt;
&lt;br /&gt;
To do it we can make a symlink from the no-SOC folder:&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt; cd Path/GaSb/With_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt; ln -s Path/GaSb/Without_SOC/YAMBO/6x6x6_shifted/screening screening_no_soc&lt;br /&gt;
&lt;br /&gt;
The BSE kernel can be build and solved using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s -o b -k sex -y h -V qp -F 06_BSE_using_nosoc_screening.in&lt;br /&gt;
&lt;br /&gt;
Here we combined the screening part (-X s) and BSE part (-o b -k sex -y h -V qp). All of the input parameters have been discussed previously. Although, it is important to keep the right matching behind the screening bands used for the no SOC and SOC case.&lt;br /&gt;
&lt;br /&gt;
If for the SOC case the specified screening bands are n1, n2 then for the no-SOC screening the bands should be ((n1-1)/2+1, n2/2). &lt;br /&gt;
&lt;br /&gt;
 # No SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   3 | 20 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and &lt;br /&gt;
 # SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   5 | 40 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The results for the BSE solved using screening used from SOC and no SOC databases is presented below. As we can see, there is almost no difference between them. &lt;br /&gt;
&lt;br /&gt;
[[File:GaSb screening w and wo soc.png|600px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
= Exciton analysis =&lt;br /&gt;
&lt;br /&gt;
In this part of the tutorial we show how to analyze the origin of the E1 peak in GaSb. Since the calculation with the SOC case is very demanding we will do that only for the case without SOC. So first of all enter the &lt;br /&gt;
&amp;lt;code&amp;gt;Without_SOC/YAMBO/6x6x6_shifted&amp;lt;/code&amp;gt; folder and, if you didn&#039;t before, run the setup:&lt;br /&gt;
 &amp;gt;cd Without_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt;ls SAVE&lt;br /&gt;
 &amp;gt;yambo -J 01_init&lt;br /&gt;
 &amp;gt;ls SAVE r-01_init_setup&lt;br /&gt;
&lt;br /&gt;
Similar to previous section we need to compute the static screening first, and then solve the BSE equation.&lt;br /&gt;
This time we will use the full diagonalization solver to calculate all exciton energies and composition in terms of electron-hole pairs. See [[BSE solvers overview]] for more details. &lt;br /&gt;
&lt;br /&gt;
Then create the &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; folder and the input file for a BSE&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -X s -F My_inputs/05_screening.in&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_screening.in -J screening -C screening &lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y d -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the same parameters you used to compute the absorption with SOC previously. The number of bands will be the half of the case without SOC&lt;br /&gt;
 % BSEBands&lt;br /&gt;
  3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
Also this time you will use the to &amp;lt;code&amp;gt;&amp;amp;quot;d&amp;amp;quot;&amp;lt;/code&amp;gt; and uncomment the variable needed to Write to disk excitonic the WFs:&lt;br /&gt;
 BSSmod= &amp;amp;quot;d&amp;amp;quot;              # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft`&lt;br /&gt;
 WRbsWF                   # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
Then you have to run the BSE calculation (notice that, in case you already computed the BSE spectrum also for the case without SOC, the code can read the results from the provious BSE run skipping many steps)&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J 05_BSE -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; folder you will now find a new database file called &amp;lt;code&amp;gt;ndb.BS_diago_Q01&amp;lt;/code&amp;gt;. This is what you need to analyze the exciton peaks running the post-processing code ypp.&lt;br /&gt;
&lt;br /&gt;
First of all you can run:&lt;br /&gt;
 &amp;gt;ypp -e s -J 05_BSE -C BSE_out&lt;br /&gt;
This run will sort in energy the excitonic eigenvalues writing their oscillator strenghts (see &amp;lt;code&amp;gt;o-06_bse.exc_E_sorted&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Then you can create the ypp input required to analize how each excitonic state is build up in terms of single-particle states:&lt;br /&gt;
 &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE&lt;br /&gt;
Put the index &amp;lt;code&amp;gt;#N&amp;lt;/code&amp;gt; of the exciton with higher strenght in the E_1 peak region&lt;br /&gt;
 &amp;gt;ypp -F My_inputs/05_BSE_ypp.in -J 05_BSE -C 06_BSE_out&lt;br /&gt;
You will find the two files &amp;lt;code&amp;gt;o-06_bse.exc_weights_at_#N&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-06_bse.exc_amplitude_at_#N&amp;lt;/code&amp;gt;. In these files you will find informations on the highest strenght exciton in the E1 peak region.&lt;br /&gt;
&lt;br /&gt;
= Perturbative SOC approach =&lt;br /&gt;
&lt;br /&gt;
It is possible to include the spin-orbit coupling perturbatively in Yambo.&lt;br /&gt;
&lt;br /&gt;
To first order the perturbation just gives a correction to the DFT eigenvalues and does not touch the wave–functions. Numerically the perturbation need to be applied by mapping the solution of the DFT calculation without SOC into the solution of the DFT calculation with SOC. Once a mapping is defined, the SOC perturbation could be directly applied to the KS energies before solving both the GW scheme and/or the BSE.&lt;br /&gt;
&lt;br /&gt;
All we need is to computed a SOC mapping database given by the following equation (eq 68 in the referenced paper):&lt;br /&gt;
&lt;br /&gt;
EQUATION &lt;br /&gt;
&lt;br /&gt;
Where x, y, z are ... &lt;br /&gt;
&lt;br /&gt;
To build this map, in the folder without spin-orbit coupling we do the following:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; cd Solid_GaSb/Without_SOC/Yambo/6x6xWi6_shifted&lt;br /&gt;
 &amp;gt; mkdir SOC_DBs&lt;br /&gt;
 &amp;gt; cp -r Path/SAVE_GaSb_k6_w_soc SOC_DBs/SAVE&lt;br /&gt;
 &amp;gt; ypp -w &lt;br /&gt;
 &amp;gt; ypp -F map_wfs.in -J SOC_map -C SOC_map&lt;br /&gt;
&lt;br /&gt;
With the following input for &amp;lt;code&amp;gt;map_wfs.in&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 WFs_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 WFs_SOC_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 SOC_DBs= &amp;quot;SOC_DBs&amp;quot;        # Path to the folder containing the DB with SOC&lt;br /&gt;
 SOC_splitting= 0.01 eV    # SOC splitting between the levels&lt;br /&gt;
 % bands_to_map&lt;br /&gt;
   7 | 12 |                # Number of bands to map&lt;br /&gt;
 %&lt;br /&gt;
 bands_buffer=1&lt;br /&gt;
&lt;br /&gt;
Where the SAVE folder with spin-orbit coupling should be saved in a separate folder, and in this case it is in the &amp;lt;code&amp;gt; SOC_DBs &amp;lt;/code&amp;gt; folder. &lt;br /&gt;
Then, the BSE can be computed using the following command &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F 05_BSE+scissor.in -J &amp;quot;BSE_soc_perturbative,screening,SOC_map&amp;quot; -C BSE_soc_perturbative&lt;br /&gt;
&lt;br /&gt;
Where screening was precomputed, and the SOC_map is the one generated in this section. Check BSE section for more details on setting a BSE calculation.&lt;br /&gt;
Not converged results are presented below. &lt;br /&gt;
[[File:GaSb perturbative soc 1.png|600px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
= Other excercises =&lt;br /&gt;
&lt;br /&gt;
# Try to converge the G0W0 increasing the polarization RL size, the polarization bands, the number of bands in the Green function and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Try to converge the absorption spectra increasing the polarization RL size, the polarization bands, the number of bands to construct the excitonic matrix and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Plot the EELS spectrum obtained within IP-RPA and RPA with local fields. Also in this case you can check the effect of increasing the polarization bands. You may also try to do a resonant only calculation to see that the EELS cannot be described using only the resonant part of the response function.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;&amp;gt;M. Marsili, A. Molina-Sánchez, M. Palummo, D. Sangalli, A. Marini, [https://doi.org/10.1103/PhysRevB.103.155152  Phys. Rev. B &#039;&#039;&#039;103&#039;&#039;&#039;, 155152 (2021)] ([https://arxiv.org/abs/2103.02266 arXiv 2103.02266])&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wiki&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Gallium_antimonide GaSb on wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;&amp;gt; [https://en.wikipedia.org/wiki/Spin%E2%80%93orbit_interaction#In_atomic_energy_levels Spin-Orbit Interaction on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kim&amp;quot;&amp;gt; Y.S. Kim et al. Phys. Rev. B &#039;&#039;&#039;82&#039;&#039;&#039;, 205212 (2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;rem&amp;quot;&amp;gt; I. N. Remediakis and Efthimios Kaxiras, Phys. Rev. B &#039;&#039;&#039;59&#039;&#039;&#039;, 5336 (1999).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan1&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1002/pssb.200983959 Phys. Sol. State B &#039;&#039;&#039;247&#039;&#039;&#039;, 1960 (2010)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan2&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1103/PhysRevLett.104.157402 Phys. Rev. Lett. &#039;&#039;&#039;104&#039;&#039;&#039;, 157402 (2010)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan3&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1103/PhysRevB.83.155421 Phys. Rev. B 83, &#039;&#039;&#039;155421&#039;&#039;&#039; (2011)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8973</id>
		<title>SOC</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8973"/>
		<updated>2025-08-24T15:11:54Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Effect of spin-orbit interaction =&lt;br /&gt;
&lt;br /&gt;
Spin–orbit coupling (SOC) is a relativistic interaction between an electron’s spin and its orbital motion in the crystal potential. Presently, SOC can be included withing GW-BSE approach either perturbatively, or fully, considering the spinorial nature of the electronic wave-function. In this tutorial, we will use both approaches. More details on the theory and comparison between full spinorial GW-BSE and perturbative approach to SOC can be found in the following paper &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;, and in the Wikipedia article&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;/&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To include the spin-orbit coupling we start with many–body total Hamiltonian of the system including first order relativistic corrections. &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 1 many body rel hamiltonian.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where, &amp;lt;math&amp;gt;\hat{H}^{0}&amp;lt;/math&amp;gt; is the non-relativistic one body hamiltonian, &amp;lt;math&amp;gt;\hat{H}^{(e-e)}&amp;lt;/math&amp;gt; is the e-e Coulomb interaction, and &amp;lt;math&amp;gt;\hat{H}^{(RK)} + \hat{H}^{(SOI)}&amp;lt;/math&amp;gt; are the first order relativistic correction, and the last term is the spin-orbit interaction (SOI) in which we are interested in this tutorial. &lt;br /&gt;
&lt;br /&gt;
The SOI term itself is composed of three different components, &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 2 soi term.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; are many-body terms, called &amp;quot;two-electron spin-orbit&amp;quot;, and &amp;quot;spin-other-orbit&amp;quot;, respectively. And,  &amp;lt;math&amp;gt; \hat{H}^{(SOI)} = \hat{H}^{SO(N)} &amp;lt;/math&amp;gt; is &amp;quot;one electron spin-orbit&amp;quot; is a one body term, which is given by: &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 3 one electron spin orbit.png|250px|frameless]]&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;math&amp;gt;\underline{\nu}&amp;lt;/math&amp;gt; a 2x2 matrix in the &amp;lt;math&amp;gt;\uparrow&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\downarrow&amp;lt;/math&amp;gt; spin space, and:&lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 4 v soc.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;\mathbf{\sigma}&amp;lt;/math&amp;gt; is the three dimensional vector whose components are the Pauli matrices. In a plane wave representation the SOC is, in practice, accounted for by the use of pseudopotentials. The SOC contribution from the pseudopotential captures what is called “local SOC”, which is due to the electrons orbiting around the nuclei, it neglects instead the itinerant SOC which can- not be easily captured in periodic boundary conditions. When relativistic corrections are taken into account instead, one should in principle account for the effects of the many–body terms &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt;. A shortcut is to add a term constructed replacing &amp;lt;math&amp;gt;v^{ext}&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;v^{Hxc}&amp;lt;/math&amp;gt; into previous equation. Doing so partially account for &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt;, while &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; is neglected.&lt;br /&gt;
&lt;br /&gt;
= Introduction = &lt;br /&gt;
&lt;br /&gt;
The scope of this tutorial is to calculate the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; corrections to the DFT-LDA band-structure and the BSE optical spectrum for a bulk semiconducting material, gallium antimonide (GaSb) &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;wiki&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;kim&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;rem&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan1&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan2&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan3&amp;quot;/&amp;gt;. We will compare the results with and without the spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DFT band structure =&lt;br /&gt;
&lt;br /&gt;
For this tutorial we provide two state (GS) databases (DBs), one contains the GS-DBs with the effect of SOC included and one without. The idea is to repeat the same calculation for both database and compare the results and the performances of the code. GaSb input files can be downloaded from the following link [https://media.yambo-code.eu/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz], and can be unarchived using the following command: &lt;br /&gt;
&lt;br /&gt;
 $ tar -xzf GaSb.tar.gz&lt;br /&gt;
&lt;br /&gt;
As in other tutorials you can find the folder containing the input files for the pwscf code (PWSCF, in case you prefer to generate the GS-DBs by yourself) and the folder containing the GS-DBs, the reference input files and the reference output files for the yambo code (YAMBO). Instead of continuously jumping back and forth from the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;With_SOC&amp;lt;/code&amp;gt; folder we advice to open two terminals and keep one for the without SOC case and another for the with SOC case.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s have a look to the content of the folders. For example we can enter in the &amp;lt;code&amp;gt;GaSb/With_SOC/&amp;lt;/code&amp;gt; folder &lt;br /&gt;
 $ cd GaSb/With_SOC/&lt;br /&gt;
 $ ls Pwscf YAMBO&lt;br /&gt;
 $ cd YAMBO&lt;br /&gt;
 $ ls 4x4x4_shifted+GAMMA &lt;br /&gt;
 6x6x6_shifted  10x10x10_shifted 14x14x14_shifted   Inputs  Reference_Outputs&lt;br /&gt;
&lt;br /&gt;
Inside the YAMBO folder there are indeed four folders corresponding to four different k-points meshes. In this tutorial we will use the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; folder for the computation of the QP corrections within the GoWo approximation. It is a k-points grid obtained as the sum of a 4x4x4 k-points grid centered in Gamma and a 4x4x4 grid shifted. Instead for the computation of the optical properties we will use the &amp;lt;code&amp;gt;6x6x6_shifted&amp;lt;/code&amp;gt; folder. It is a 6x6x6 k-points grid shifted from Gamma. The other two folders, &amp;lt;code&amp;gt;10x10x10_shifted&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;14x14x14_shifted&amp;lt;/code&amp;gt; can be used to do a minimum convergence of the optical properties against the number of k-points (pay attention that the BSE calculations with bigger grids will be very memory and time demanding!).&lt;br /&gt;
&lt;br /&gt;
The first part of the tutorial is on the computation of the QP corrections. So let&#039;s enter the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; grid and, as seen in other tutorials run the Initialization:&lt;br /&gt;
&lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA/ &lt;br /&gt;
 $ yambo -J 01_init &lt;br /&gt;
Now compare the result of the two setup runs.&lt;br /&gt;
&lt;br /&gt;
With_SOC case:&lt;br /&gt;
&amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  5.046557&lt;br /&gt;
  VBM / CBm          [ev]:   0.00000   0.06025&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0008               0009-0200&lt;br /&gt;
  Indirect Gaps      [ev]:  0.06025   3.57546&amp;lt;/pre&amp;gt;&lt;br /&gt;
Without_SOC case:&lt;br /&gt;
 &amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  4.777401&lt;br /&gt;
  VBM / CBm          [ev]:  0.000000  0.332282&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0004               0005-0100&lt;br /&gt;
  Indirect Gaps      [ev]: 0.332282  3.620628&lt;br /&gt;
  Direct Gaps        [ev]: 0.332282  7.137342&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A clear shrink of the DFT-LDA gap due to spin-orbit occurs. Note that, having 8 electrons in the fundamental cell, due to the spinorial nature of the wavefunction, with SOC we have 8 occupied bands, while only 4 without. Here a picture of the DFT band structure for the two cases.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_pwscf.png|500px|center|GaSb bands DFT]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the band structure of GaSb =&lt;br /&gt;
 &lt;br /&gt;
Now we will perform a G0W0 calculation to correct the DFT-LDA bandstructure. We assume that you are already familiar with the concept of screening needed to build up the GW self-energy and thus the QP corrections. Create a local folder &#039;&#039;My_inputs&#039;&#039; and generate the input for a G0W0 calculation within the plasmon-pole approximation using the following command: &lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA&lt;br /&gt;
 $ mkdir My_inputs&lt;br /&gt;
 $ yambo -p p -g n -V RL -F My_inputs/02_GW.in&lt;br /&gt;
However we also provide an input file with suggested parameters for this calculations inside the folder &#039;&#039;Solid_GaSb/Without_SOC/Yambo/Inputs&#039;&#039;. Remember: these parameters are system dependent and should be converged as you can see other GW tutorials (e.g. [[GW]] or [[GW convergence]]). Here we provide reasonable (but not fully converged) parameters to have a low computational cost but yet qualitatively meaningful results.&lt;br /&gt;
&lt;br /&gt;
The plane-waves cutoff for the wavefunctions and exchange part of the self-energy are set to 10 Ry. &lt;br /&gt;
 FFTGvecs =  10 Ry   # [FFT] Plane-waves&lt;br /&gt;
 EXXRLvcs=   10 Ry   # [XX] Exchange RL components&lt;br /&gt;
while we will use 40 bands, a plane-wave cut-off of 1 Ry, and a plasmon-pole energy of 20 eV to build up the screening matrix &lt;br /&gt;
 NGsBlkXp=    1 Ry  # [Xp] Response block size &lt;br /&gt;
 PPAPntXp= 20.  eV  # [Xp] PPA imaginary energy &lt;br /&gt;
 % BndsRnXp    &lt;br /&gt;
 1 | 40 |        # [Xp] Polarization function bands &lt;br /&gt;
 % &lt;br /&gt;
 % LongDrXp  &lt;br /&gt;
 1.000000 | 1.000000 | 1.000000 |        # [Xp] [cc] Electric Field &lt;br /&gt;
 %&lt;br /&gt;
The number of bands in the green function G to build up the GW self-energy is also 40 &lt;br /&gt;
 % GbndRnge    &lt;br /&gt;
 1 | 40 |                 # [GW] G[W] bands range &lt;br /&gt;
 %&lt;br /&gt;
with those parameters we will compute the correction only in the last 2 points of our grid, 28 and 29 and for the states from 3 to 6, setting the input variable &lt;br /&gt;
 %QPkrange                      &lt;br /&gt;
 28 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
As you can verify from your &#039;&#039;r-01_init_setup&#039;&#039; file 28 and 29 are the L and the Gamma point of the Brillouin zone. &lt;br /&gt;
 *X* K [28] :-0.500000 -0.500000 -0.500000 (rlu) * Comp.s 476 * weight    0.0078   &lt;br /&gt;
 ...   &lt;br /&gt;
 *X* K [29] : 0.000000  0.000000  0.000000 (rlu)  * Comp.s 531 * weight    0.0020   &lt;br /&gt;
 ...&lt;br /&gt;
You can now run the code using either your input file or the one provided in the Inputs folder &lt;br /&gt;
 $ yambo -F ../Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
The run will take some time. Indeed the code has first to compute the dipoles, then the screening within the plasmon pole approximation and finally the self-energy, first the exchange part Gv and then the correlation part G(W-v). &lt;br /&gt;
In the &amp;lt;code&amp;gt;GW_out&amp;lt;/code&amp;gt; folder you will find the &amp;lt;code&amp;gt;o-GW.qp&amp;lt;/code&amp;gt; file containing the GW corrections.&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &lt;br /&gt;
 #&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #&lt;br /&gt;
  ...&lt;br /&gt;
  29.00000    4.00000    0.00000    0.22802    1.07276&lt;br /&gt;
  29.00000    5.00000    0.33228    0.66303   -2.39219&lt;br /&gt;
  ...&lt;br /&gt;
Thus it is about 0.66-0.23=0.43 eV (not fully converged).&lt;br /&gt;
&lt;br /&gt;
We can also compute the G0W0 correction for all the k-point of the database. To this end open the input file &#039;&#039;../Inputs/02_GW.in&#039;&#039; (or your own) and edit the number of k-point to be computed &lt;br /&gt;
 %&lt;br /&gt;
 QPkrange                      1 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
If you have learned how to run the code in parallel you may also set the parallel environment input variables:&lt;br /&gt;
 X_all_q_CPU= &amp;amp;quot;2&amp;amp;quot;              # [PARALLEL] CPUs for each role &lt;br /&gt;
 X_all_q_ROLEs= &amp;amp;quot;q&amp;amp;quot;            # [PARALLEL] CPUs roles (q,k,c,v) &lt;br /&gt;
 SE_CPU= &amp;amp;quot;2&amp;amp;quot;                   # [PARALLEL] CPUs for each role &lt;br /&gt;
 SE_ROLEs= &amp;amp;quot;q&amp;amp;quot;                 # [PARALLEL] CPUs roles (q,qp,b)&lt;br /&gt;
Remember to use the same name after the -J option, so that the code will be able to use the informations from the previous run and avoid many calculations. &lt;br /&gt;
 $ mpirun -np 2 yambo -F Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
In the &#039;&#039;GW_out&#039;&#039; folder you will find now also the &#039;&#039;o-GW.qp_01&#039;&#039; file containg the GW corrections for all the k-points.&lt;br /&gt;
&lt;br /&gt;
Now you can enter the folder of the 4x4x4 shifted grid&lt;br /&gt;
 cd Solid_GaSb/With_SOC/Yambo/4x4x4_shifted+GAMMA&lt;br /&gt;
and repeat the same calculations. Remember that in the input file you will generate you should change all the band ranges doubling the number of states (do you understand why?) &lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
    1 | 80 |        # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
    1 | 80 |        # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 % QPkrange&lt;br /&gt;
   29 | 29 |   5 | 12|  # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band.&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #  &lt;br /&gt;
   ...   &lt;br /&gt;
   29.00000    8.00000    0.00000    0.21758    0.95843&lt;br /&gt;
   29.00000    9.00000    0.06025    0.65362   -2.36544&lt;br /&gt;
   ...&lt;br /&gt;
Thus it is about 0.65-0.22=0.43 eV (not fully converged). Indeed the same result obtained without SOC. The resulting electronic gap is about 0.46 eV reasonably close to the experimental band gap of 0.72 eV. It is also a big improvment compared to the LDA band gap (less than 0.03 eV). This correction (indeed the slightly bigger value of 0.53 eV) will be used, in the form of a scissor operator, as a starting point to compute the optical spectra.&lt;br /&gt;
&lt;br /&gt;
Again we can also compute the G0W0 correction for all the k-point of the database. You can plot column 4 of the output file against column 3 to obtain a picture of the QP corrections. In the following figure we show the plot of the G0W0 correction (E_GoWo-E_LDA) vs the LDA eigenvalues. The corrections at the Gamma and the L point are marked with bigger red spots.&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=400px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_GoWo_corrections.png|GaSb QP corrections without SOC &lt;br /&gt;
Image:GaSb GoWo corrections SOC.png|GaSb GoWo corrections with SOC&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
[[File:SOC_GaSb_GoWo_corrections.png|500px|frameless|center]]&lt;br /&gt;
[[File:GaSb GoWo corrections SOC.png|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;scissor operator approach&amp;amp;quot; does not seem a very good approximation for GaSb. Indeed the quasi particle corrections are not constant, especially in the conduction band. For example the correction to the Gamma point is bigger than the corrections to all other k-points. This result however maybe due to the poor covergence parameters. If you would like to better investigate these results you should try do convergence tests. Since QP corrections are poorly sensitive to the spin-orbit interaction it is probably a good idea to do convergence without SOC.&lt;br /&gt;
&lt;br /&gt;
Here we also provide a plot of the band-structure at different levels of approximation: DFT, DFT+scissor, QP. The band structures are obtained from an interpolation of our k-points mesh and it is not very precise since, again, we are using a quite coarse sampling of the brillouine zone. Indeed we can see that already the interpolated DFT band structure deviates from the exact DFT band-structure, which has also been reported. In particular in the region nearby Gamma. However it gives quite nicely an overview of how the QP band structure compares with the DFT band stucture. The main effect is indeed an opening of the band-gap which can be described in terms of a scissor operator.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_yambo.png|500px|center|GaSb QP bands]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the optical properties of GaSb =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--{|&lt;br /&gt;
| [[File:SOC_GaSb_bands.png|600px|center|GaSb bands 1]]&lt;br /&gt;
| [[File:SOC_GaSb_absorption.png|600px|center|GaSb bands 2]]&lt;br /&gt;
|} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now turn our attention on the optical properties of the system. Here we will compute the dielectric function at different levels of approximations:&amp;lt;br /&amp;gt;&lt;br /&gt;
(i) at the IP-RPA level, thus using the Fermi golden rule with the KS energies and wave-functions&amp;lt;br /&amp;gt;&lt;br /&gt;
(ii) at the RPA level, thus also including the effect of the local fields&amp;lt;br /&amp;gt;&lt;br /&gt;
(iii) at the BSE level, thus including many-body effects, both correcting the KS energies (we will introduce a scissor obtained from the GW calculation) and considering the statically screened electron-hole interaction&lt;br /&gt;
&lt;br /&gt;
First, setup the calculation (initialization) in the usual way in the folder without SOC&lt;br /&gt;
 $ cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 $ yambo -J 01_init&lt;br /&gt;
and repeat the same inside the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; before continuing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;(to be finalized) The yambo code can also run simulations in the perturbative SOC approach. To this end first generate the SOC mapping database in the Without SOC folder following these instructions. After that you will be able to compute optical properties at all levels within the perturbative approach by linking the mapping database. We  will show below how to do that.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;(to be finalized) Finally, for the BSE run with SOC (and for the GW run?), it is also possible to solve the fully spinorial equations, but using the screening databases computed without SOC. In the BSE (and GW?) runs we will discuss how to do that.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RPA-IP absorption ==&lt;br /&gt;
&lt;br /&gt;
Create a local folder inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; which you will call &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt;, and create the input file:&lt;br /&gt;
 &amp;gt;cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o c -V RL -F My_inputs/03_IP-RPA.in&lt;br /&gt;
&lt;br /&gt;
As before, we also provide an input file with suggested parameters for this calculations. The kind of calculation is controlled by the input variable&lt;br /&gt;
 Chimod= &amp;quot;IP&amp;quot;                 # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1            RL    # [Xd] Response block size&lt;br /&gt;
These tells you that we are building up the dielectric function in G-space considering only on G vector, i.e. the G=0 component. The string Chimod= &amp;amp;quot;IP&amp;amp;quot; recalls us that this means we are neglecting the local fields effect.&lt;br /&gt;
&lt;br /&gt;
We set the plane-waves cutoff for the wavefunctions to&lt;br /&gt;
 FFTGvecs=  10  Ry   # [FFT] Plane-waves&lt;br /&gt;
Since we are interested into the optical spectrum calculation, only the Q=0 term, i.e. the first Q-point, is calculated&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
The number of bands we use is 20. This is a reasonable number of states to converge the IP-RPA optical spectrum in the VIS-UV range. (If you wish to calculate the EELS spectrum for q different from 0 probably more bands will be required.)&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 10 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
As you learned the dielectric function is a tensor and in principle three calculations for light polarized along x,y,z chould be done depending on the experimental setup. However GaSb is a system with cubic symmetry, thus any direction is equivalent. Here we decide to compute epsilon along the &amp;amp;quot;(1 1 1)&amp;amp;quot; direction.&lt;br /&gt;
 % LongDrXd&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation using either your input file or the one provided in the Inputs folder&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/03_IP-RPA.in  -J 03_IP-RPA -C 03_IP-RPA_out&lt;br /&gt;
&lt;br /&gt;
Inside the &amp;lt;code&amp;gt;03_IP-RPA&amp;lt;/code&amp;gt; folder you will find the databases created by the code (in this case just the dipoles), while in the &amp;lt;code&amp;gt;03_IP-RPA_out&amp;lt;/code&amp;gt; the report file and the output files for the dielectric function which describes the absorption (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;) and for its inverse (&amp;lt;code&amp;gt;o-03_IP-RPA.eel*&amp;lt;/code&amp;gt;), which describes the electron energy loss. You can plot them with your favorite software (for example gnuplot or xmgrace). The real and imaginary parts of the IP-RPA dielectric function are column 3 and 2 respectively of the file (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;). Using also the reference output file in the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; folder you can compare the spectrum with and without SOC.&lt;br /&gt;
&lt;br /&gt;
Now repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 20 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.jpg|600px|center|GaSb absorption RPA]]&lt;br /&gt;
If you wish to obtain a reasonable spectrum however the 6x6x6 kpts grid is not enough. In order to check the convergence with the number of k-points you should run the same kind of calculations on other k-points meshes, either using the ones we provided ot creating new ones using the input files in the Pwscf folder (see section [[more.php|More on GaSb]] for more advanced calculations).&lt;br /&gt;
&lt;br /&gt;
In the directories Reference_Outputs several RPA dielectric functions are saved with the dielectric function calculated with the 10x10x10 and the 14x14x14 k-grid. You will learn that within RPA spectra the lowest energy peak is under-estimated. Also the spectra with and without SOC look very similar and the SO splitting is almost not present. This is clearly due to the excitonic nature of the E1 peak which can be correctly described only including the electron-hole interaction.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== RPA absorption with local fieldds ==&lt;br /&gt;
&lt;br /&gt;
To also include the local fields effect you can generate the input with the command: &lt;br /&gt;
 &amp;gt;yambo -o c -k hartree -F My_inputs/04_RPA_LF.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
In the input file we provide you will see that now the chimod and size of the dynamical matrix are set to&lt;br /&gt;
 Chimod= &amp;amp;quot;Hartree&amp;amp;quot;       # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1       Ry    # [Xd] Response block size&lt;br /&gt;
&lt;br /&gt;
Including local fields the poles of absorption will move from KS transitions to many-electrons transitions (although we are still neglecting the electron-hole interaction). As a result you will need more states to converge the absorption spectrum. This is why we set the number of bands to 15:&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 15 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
while as before we will have&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 %&lt;br /&gt;
 LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/04_RPA_LF.in -J 04_RPA_LF -C 04_RPA_LF_out&lt;br /&gt;
&lt;br /&gt;
In the 04_RPA+LF_out folder you will fine the report and the output files as before. The real and imaginary parts of the RPA+LF dielectric function with local fields are column 3 and 2 respectively of the .eps file. While the corresponding IP-RPA spectra is reported in columns 5 and 4.&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 30 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
In the following picture we compare the result of IP-RPA and RPA+LF with SOC.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA_IP_vs_LF.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== BSE absorption with QP corrections ==&lt;br /&gt;
&lt;br /&gt;
A more detailed description of BSE in Yambo is available in the following tutorial: &lt;br /&gt;
[https://wiki.yambo-code.eu/wiki/index.php?title=Calculating%20optical%20spectra%20including%20excitonic%20effects:%20a%20step-by-step%20guide BSE in hBN].&lt;br /&gt;
&lt;br /&gt;
=== Static Screening ===&lt;br /&gt;
&lt;br /&gt;
First we need to obtain the static screening. &lt;br /&gt;
&lt;br /&gt;
This can be done using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s My_inputs/05_screening.in&lt;br /&gt;
&lt;br /&gt;
In the resulting input file you can also see the parameters used to compute the static dielectric function needed for the screened Coulomb term (W) of the BSE kernel. Here we use 20 bands and an energy cut-off of 1 Ry.&lt;br /&gt;
&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 20 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 1            Ry    # [Xs] Response block size&lt;br /&gt;
&lt;br /&gt;
Remember to double the number of bands for the case with spin-oribit coupling included. &lt;br /&gt;
&lt;br /&gt;
Then run the file &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F My_inputs/05_screening.in -J screening -C screening&lt;br /&gt;
&lt;br /&gt;
=== BS Kernel and Solver ===&lt;br /&gt;
&lt;br /&gt;
Now we build the BS kernel, and specify the BS kernel solver. Overview of the BSE solvers is available using the following link: [[BSE solvers overview]]. In this tutorial we will use Haydock solver because it is computationally cheaper.&lt;br /&gt;
&lt;br /&gt;
As you probably know the inclusion of the electron-hole interaction makes the approach in G space not feasible. We have thus to compute the dielectric function in the electron-hole space, building up the excitonic hamiltonian. Thus to create the input file you can run the command:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y h -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder. As before you, in the directory Inputs, you can find an example with suggested parameters. The plane-wave cutoffs used to expand wavefunctions is set to 10 Ry, the cut-off on the exchange interaction between the electron and the hole (i.e. for the local-fields) is set to 10 Ry (here we use a much higer value compared to the previous run since the computational cost of increasing this variable in the electron-hole space is very low). and, finally, the cut-off on the direct electron-hole interaction is set to 1 Ry (to build up this term, where the interaction is screened, we need to compute the static dielectric constant in G-space, thus increasing this value is computationally demanding).&lt;br /&gt;
 FFTGvecs= 10     Ry    # [FFT] Plane-waves&lt;br /&gt;
 BSENGexx= 10     Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=  1     Ry    # [BSK] Screened interaction block size&lt;br /&gt;
&lt;br /&gt;
The input variable &amp;amp;quot;KfnQP_E&amp;amp;quot; can be used to include a scissor operator, i.e a opening of the DFT band gap. The value 0.53 eV is the coverged correction at Gamma obtained in the GW run. Here we will calculate the BSE assuming that the &amp;amp;quot;scissor operator approximation&amp;amp;quot; is valid for GaSb (to be checked in principle!) .&lt;br /&gt;
&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 0.530000 &amp;lt;/span&amp;gt; | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
To build up the excitonic matrix we consider the states from 5 to 12, i.e. we are using 4 occupied and 4 unoccupied bands.&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and we will build up the dielectric function using a grid of 200 point in frequency space&lt;br /&gt;
 BEnSteps= 200                # [BSS] Energy steps&lt;br /&gt;
Finally, similarly as before, we will have&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
Remember that the BS kernel is written in the electron-hole space and its size is given by the relation&amp;lt;br /&amp;gt;&lt;br /&gt;
BS kernel size = Valence Bands × Conduction Bands × K-points in the whole BZ.&amp;lt;br /&amp;gt;&lt;br /&gt;
This means that in the case with SO we are building up a matrix 2x2=4 times larger of the corresponding calculation without spin-orbit (you can compare the input in With_SO/Yambo/Inputs / Without_SO/Yambo/Inputs and reference outputs in With_SO/Yambo/Reference_Outputs / With_SO/Yambo/Reference_Outputs)&lt;br /&gt;
&lt;br /&gt;
We are ready to run the BSE calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J &amp;quot;05_BSE,screening&amp;quot; -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
We specify to Yambo the folder which contains calculated static screening, and in &amp;lt;code&amp;gt;05_BSE_out&amp;lt;/code&amp;gt; the two response files &amp;lt;code&amp;gt; o-05_BSE.eel_q1_haydock_bse &amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-05_BSE.eps_q1_haydock_bse&amp;lt;/code&amp;gt; can be found. In the &#039;&#039;eps file&#039;&#039; the real and imaginary parts of the BSE dielectric function are column 3 and 2 respectively, while the corresponding GW spectra are column 5 and 4.&lt;br /&gt;
&lt;br /&gt;
In the folder &amp;lt;code&amp;gt;screening&amp;lt;/code&amp;gt; you will find instead the DBs of the static screening (W) needed to build up the BSE kernel (&amp;lt;code&amp;gt;ndb.em1s&amp;lt;/code&amp;gt;) and in the folder &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; the BSE matrix (&amp;lt;code&amp;gt;ndb.BS*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 40 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   5 | 12 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
If you do the corresponding calculations for the case without spin-orbits using the databases in the directory GaSb_nSO/YAMBO and inputs in GaSb_nSO/Inputs, the two BSE spectra should look like in this figure:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE_few_kpts.jpg|500px|center|GaSb absorption BSE gew kpts]]&lt;br /&gt;
As mentioned before the two spectra present spurious peaks ( as the first peak!) due to uncoverged k-point sampling. Nevertheless the splitting due to spin-orbit interaction is already visible in the peak around 2.1 eV.&lt;br /&gt;
A more converged (yet not fully converged calculation) would give the following results which compares very nicely with the experimental data:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE.png|500px|center|GaSb absorption BSE]]&lt;br /&gt;
&lt;br /&gt;
=== More on Static Screening === &lt;br /&gt;
&lt;br /&gt;
Additionally, a BSE run for the spin-orbit coupling case can be done using the screening computed for the case without spin-orbit coupling. &lt;br /&gt;
&lt;br /&gt;
To do it we can make a symlink from the no-SOC folder:&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt; cd Path/GaSb/With_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt; ln -s Path/GaSb/Without_SOC/YAMBO/6x6x6_shifted/screening screening_no_soc&lt;br /&gt;
&lt;br /&gt;
The BSE kernel can be build and solved using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s -o b -k sex -y h -V qp -F 06_BSE_using_nosoc_screening.in&lt;br /&gt;
&lt;br /&gt;
Here we combined the screening part (-X s) and BSE part (-o b -k sex -y h -V qp). All of the input parameters have been discussed previously. Although, it is important to keep the right matching behind the screening bands used for the no SOC and SOC case.&lt;br /&gt;
&lt;br /&gt;
If for the SOC case the specified screening bands are n1, n2 then for the no-SOC screening the bands should be ((n1-1)/2+1, n2/2). &lt;br /&gt;
&lt;br /&gt;
 # No SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   3 | 20 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and &lt;br /&gt;
 # SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   5 | 40 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The results for the BSE solved using screening used from SOC and no SOC databases is presented below. As we can see, there is almost no difference between them. &lt;br /&gt;
&lt;br /&gt;
[[File:GaSb screening w and wo soc.png|600px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
= Exciton analysis =&lt;br /&gt;
&lt;br /&gt;
In this part of the tutorial we show how to analyze the origin of the E1 peak in GaSb. Since the calculation with the SOC case is very demanding we will do that only for the case without SOC. So first of all enter the &lt;br /&gt;
&amp;lt;code&amp;gt;Without_SOC/YAMBO/6x6x6_shifted&amp;lt;/code&amp;gt; folder and, if you didn&#039;t before, run the setup:&lt;br /&gt;
 &amp;gt;cd Without_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt;ls SAVE&lt;br /&gt;
 &amp;gt;yambo -J 01_init&lt;br /&gt;
 &amp;gt;ls SAVE r-01_init_setup&lt;br /&gt;
&lt;br /&gt;
Similar to previous section we need to compute the static screening first, and then solve the BSE equation.&lt;br /&gt;
This time we will use the full diagonalization solver to calculate all exciton energies and composition in terms of electron-hole pairs. See [[BSE solvers overview]] for more details. &lt;br /&gt;
&lt;br /&gt;
Then create the &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; folder and the input file for a BSE&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -X s -F My_inputs/05_screening.in&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_screening.in -J screening -C screening &lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y d -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the same parameters you used to compute the absorption with SOC previously. The number of bands will be the half of the case without SOC&lt;br /&gt;
 % BSEBands&lt;br /&gt;
  3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
Also this time you will use the to &amp;lt;code&amp;gt;&amp;amp;quot;d&amp;amp;quot;&amp;lt;/code&amp;gt; and uncomment the variable needed to Write to disk excitonic the WFs:&lt;br /&gt;
 BSSmod= &amp;amp;quot;d&amp;amp;quot;              # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft`&lt;br /&gt;
 WRbsWF                   # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
Then you have to run the BSE calculation (notice that, in case you already computed the BSE spectrum also for the case without SOC, the code can read the results from the provious BSE run skipping many steps)&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J 05_BSE -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; folder you will now find a new database file called &amp;lt;code&amp;gt;ndb.BS_diago_Q01&amp;lt;/code&amp;gt;. This is what you need to analyze the exciton peaks running the post-processing code ypp.&lt;br /&gt;
&lt;br /&gt;
First of all you can run:&lt;br /&gt;
 &amp;gt;ypp -e s -J 05_BSE -C BSE_out&lt;br /&gt;
This run will sort in energy the excitonic eigenvalues writing their oscillator strenghts (see &amp;lt;code&amp;gt;o-06_bse.exc_E_sorted&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Then you can create the ypp input required to analize how each excitonic state is build up in terms of single-particle states:&lt;br /&gt;
 &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE&lt;br /&gt;
Put the index &amp;lt;code&amp;gt;#N&amp;lt;/code&amp;gt; of the exciton with higher strenght in the E_1 peak region&lt;br /&gt;
 &amp;gt;ypp -F My_inputs/05_BSE_ypp.in -J 05_BSE -C 06_BSE_out&lt;br /&gt;
You will find the two files &amp;lt;code&amp;gt;o-06_bse.exc_weights_at_#N&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-06_bse.exc_amplitude_at_#N&amp;lt;/code&amp;gt;. In these files you will find informations on the highest strenght exciton in the E1 peak region.&lt;br /&gt;
&lt;br /&gt;
= Perturbative SOC approach =&lt;br /&gt;
&lt;br /&gt;
It is possible to include the spin-orbit coupling perturbatively in Yambo.&lt;br /&gt;
&lt;br /&gt;
To first order the perturbation just gives a correction to the DFT eigenvalues and does not touch the wave–functions. Numerically the perturbation need to be applied by mapping the solution of the DFT calculation without SOC into the solution of the DFT calculation with SOC. Once a mapping is defined, the SOC perturbation could be directly applied to the KS energies before solving both the GW scheme and/or the BSE.&lt;br /&gt;
&lt;br /&gt;
All we need is to computed a SOC mapping database given by the following equation (eq 68 in the referenced paper):&lt;br /&gt;
&lt;br /&gt;
EQUATION &lt;br /&gt;
&lt;br /&gt;
Where x, y, z are ... &lt;br /&gt;
&lt;br /&gt;
To build this map, in the folder without spin-orbit coupling we do the following:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; cd Solid_GaSb/Without_SOC/Yambo/6x6xWi6_shifted&lt;br /&gt;
 &amp;gt; mkdir SOC_DBs&lt;br /&gt;
 &amp;gt; cp -r Path/SAVE_GaSb_k6_w_soc SOC_DBs/SAVE&lt;br /&gt;
 &amp;gt; ypp -w &lt;br /&gt;
 &amp;gt; ypp -F map_wfs.in -J SOC_map -C SOC_map&lt;br /&gt;
&lt;br /&gt;
With the following input for &amp;lt;code&amp;gt;map_wfs.in&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 WFs_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 WFs_SOC_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 SOC_DBs= &amp;quot;SOC_DBs&amp;quot;        # Path to the folder containing the DB with SOC&lt;br /&gt;
 SOC_splitting= 0.01 eV    # SOC splitting between the levels&lt;br /&gt;
 % bands_to_map&lt;br /&gt;
   7 | 12 |                # Number of bands to map&lt;br /&gt;
 %&lt;br /&gt;
 bands_buffer=1&lt;br /&gt;
&lt;br /&gt;
Where the SAVE folder with spin-orbit coupling should be saved in a separate folder, and in this case it is in the &amp;lt;code&amp;gt; SOC_DBs &amp;lt;/code&amp;gt; folder. &lt;br /&gt;
Then, the BSE can be computed using the following command &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F 05_BSE+scissor.in -J &amp;quot;BSE_soc_perturbative,screening,SOC_map&amp;quot; -C BSE_soc_perturbative&lt;br /&gt;
&lt;br /&gt;
Where screening was precomputed, and the SOC_map is the one generated in this section. Check BSE section for more details on setting a BSE calculation.&lt;br /&gt;
Not converged results are presented below. &lt;br /&gt;
[[File:GaSb perturbative soc 1.png|600px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
= Other excercises =&lt;br /&gt;
&lt;br /&gt;
# Try to converge the G0W0 increasing the polarization RL size, the polarization bands, the number of bands in the Green function and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Try to converge the absorption spectra increasing the polarization RL size, the polarization bands, the number of bands to construct the excitonic matrix and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Plot the EELS spectrum obtained within IP-RPA and RPA with local fields. Also in this case you can check the effect of increasing the polarization bands. You may also try to do a resonant only calculation to see that the EELS cannot be described using only the resonant part of the response function.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;&amp;gt;M. Marsili, A. Molina-Sánchez, M. Palummo, D. Sangalli, A. Marini, [https://doi.org/10.1103/PhysRevB.103.155152  Phys. Rev. B &#039;&#039;&#039;103&#039;&#039;&#039;, 155152 (2021)] ([https://arxiv.org/abs/2103.02266 arXiv 2103.02266])&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wiki&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Gallium_antimonide GaSb on wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;&amp;gt; [https://en.wikipedia.org/wiki/Spin%E2%80%93orbit_interaction#In_atomic_energy_levels Spin-Orbit Interaction on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kim&amp;quot;&amp;gt; Y.S. Kim et al. Phys. Rev. B &#039;&#039;&#039;82&#039;&#039;&#039;, 205212 (2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;rem&amp;quot;&amp;gt; I. N. Remediakis and Efthimios Kaxiras, Phys. Rev. B &#039;&#039;&#039;59&#039;&#039;&#039;, 5336 (1999).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan1&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1002/pssb.200983959 Phys. Sol. State B &#039;&#039;&#039;247&#039;&#039;&#039;, 1960 (2010)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan2&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1103/PhysRevLett.104.157402 Phys. Rev. Lett. &#039;&#039;&#039;104&#039;&#039;&#039;, 157402 (2010)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan3&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1103/PhysRevB.83.155421 Phys. Rev. B 83, &#039;&#039;&#039;155421&#039;&#039;&#039; (2011)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8972</id>
		<title>SOC</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8972"/>
		<updated>2025-08-24T15:06:45Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Effect of spin-orbit interaction =&lt;br /&gt;
&lt;br /&gt;
Spin–orbit coupling (SOC) is a relativistic interaction between an electron’s spin and its orbital motion in the crystal potential. Presently, SOC can be included withing GW-BSE approach either perturbatively, or fully, considering the spinorial nature of the electronic wave-function. In this tutorial, we will use both approaches. More details on the theory and comparison between full spinorial GW-BSE and perturbative approach to SOC can be found in the following paper &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;, and in the Wikipedia article&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;/&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To include the spin-orbit coupling we start with many–body total Hamiltonian of the system including first order relativistic corrections. &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 1 many body rel hamiltonian.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where, &amp;lt;math&amp;gt;\hat{H}^{0}&amp;lt;/math&amp;gt; is the non-relativistic one body hamiltonian, &amp;lt;math&amp;gt;\hat{H}^{(e-e)}&amp;lt;/math&amp;gt; is the e-e Coulomb interaction, and &amp;lt;math&amp;gt;\hat{H}^{(RK)} + \hat{H}^{(SOI)}&amp;lt;/math&amp;gt; are the first order relativistic correction, and the last term is the spin-orbit interaction (SOI) in which we are interested in this tutorial. &lt;br /&gt;
&lt;br /&gt;
The SOI term itself is composed of three different components, &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 2 soi term.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; are many-body terms, called &amp;quot;two-electron spin-orbit&amp;quot;, and &amp;quot;spin-other-orbit&amp;quot;, respectively. And,  &amp;lt;math&amp;gt; \hat{H}^{(SOI)} = \hat{H}^{SO(N)} &amp;lt;/math&amp;gt; is &amp;quot;one electron spin-orbit&amp;quot; is a one body term, which is given by: &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 3 one electron spin orbit.png|250px|frameless]]&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;math&amp;gt;\underline{\nu}&amp;lt;/math&amp;gt; a 2x2 matrix in the &amp;lt;math&amp;gt;\uparrow&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\downarrow&amp;lt;/math&amp;gt; spin space, and:&lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 4 v soc.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;\mathbf{\sigma}&amp;lt;/math&amp;gt; is the three dimensional vector whose components are the Pauli matrices. In a plane wave representation the SOC is, in practice, accounted for by the use of pseudopotentials. The SOC contribution from the pseudopotential captures what is called “local SOC”, which is due to the electrons orbiting around the nuclei, it neglects instead the itinerant SOC which can- not be easily captured in periodic boundary conditions. When relativistic corrections are taken into account instead, one should in principle account for the effects of the many–body terms &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt;. A shortcut is to add a term constructed replacing &amp;lt;math&amp;gt;v^{ext}&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;v^{Hxc}&amp;lt;/math&amp;gt; into previous equation. Doing so partially account for &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt;, while &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; is neglected.&lt;br /&gt;
&lt;br /&gt;
= Introduction = &lt;br /&gt;
&lt;br /&gt;
The scope of this tutorial is to calculate the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; corrections to the DFT-LDA band-structure and the BSE optical spectrum for a bulk semiconducting material, gallium antimonide (GaSb) &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;wiki&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;kim&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;rem&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan1&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan2&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;hogan3&amp;quot;/&amp;gt;. We will compare the results with and without the spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DFT band structure =&lt;br /&gt;
&lt;br /&gt;
For this tutorial we provide two state (GS) databases (DBs), one contains the GS-DBs with the effect of SOC included and one without. The idea is to repeat the same calculation for both database and compare the results and the performances of the code. GaSb input files can be downloaded from the following link [https://media.yambo-code.eu/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz], and can be unarchived using the following command: &lt;br /&gt;
&lt;br /&gt;
 $ tar -xzf GaSb.tar.gz&lt;br /&gt;
&lt;br /&gt;
As in other tutorials you can find the folder containing the input files for the pwscf code (PWSCF, in case you prefer to generate the GS-DBs by yourself) and the folder containing the GS-DBs, the reference input files and the reference output files for the yambo code (YAMBO). Instead of continuously jumping back and forth from the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;With_SOC&amp;lt;/code&amp;gt; folder we advice to open two terminals and keep one for the without SOC case and another for the with SOC case.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s have a look to the content of the folders. For example we can enter in the &amp;lt;code&amp;gt;GaSb/With_SOC/&amp;lt;/code&amp;gt; folder &lt;br /&gt;
 $ cd GaSb/With_SOC/&lt;br /&gt;
 $ ls Pwscf YAMBO&lt;br /&gt;
 $ cd YAMBO&lt;br /&gt;
 $ ls 4x4x4_shifted+GAMMA &lt;br /&gt;
 6x6x6_shifted  10x10x10_shifted 14x14x14_shifted   Inputs  Reference_Outputs&lt;br /&gt;
&lt;br /&gt;
Inside the YAMBO folder there are indeed four folders corresponding to four different k-points meshes. In this tutorial we will use the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; folder for the computation of the QP corrections within the GoWo approximation. It is a k-points grid obtained as the sum of a 4x4x4 k-points grid centered in Gamma and a 4x4x4 grid shifted. Instead for the computation of the optical properties we will use the &amp;lt;code&amp;gt;6x6x6_shifted&amp;lt;/code&amp;gt; folder. It is a 6x6x6 k-points grid shifted from Gamma. The other two folders, &amp;lt;code&amp;gt;10x10x10_shifted&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;14x14x14_shifted&amp;lt;/code&amp;gt; can be used to do a minimum convergence of the optical properties against the number of k-points (pay attention that the BSE calculations with bigger grids will be very memory and time demanding!).&lt;br /&gt;
&lt;br /&gt;
The first part of the tutorial is on the computation of the QP corrections. So let&#039;s enter the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; grid and, as seen in other tutorials run the Initialization:&lt;br /&gt;
&lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA/ &lt;br /&gt;
 $ yambo -J 01_init &lt;br /&gt;
Now compare the result of the two setup runs.&lt;br /&gt;
&lt;br /&gt;
With_SOC case:&lt;br /&gt;
&amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  5.046557&lt;br /&gt;
  VBM / CBm          [ev]:   0.00000   0.06025&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0008               0009-0200&lt;br /&gt;
  Indirect Gaps      [ev]:  0.06025   3.57546&amp;lt;/pre&amp;gt;&lt;br /&gt;
Without_SOC case:&lt;br /&gt;
 &amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  4.777401&lt;br /&gt;
  VBM / CBm          [ev]:  0.000000  0.332282&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0004               0005-0100&lt;br /&gt;
  Indirect Gaps      [ev]: 0.332282  3.620628&lt;br /&gt;
  Direct Gaps        [ev]: 0.332282  7.137342&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A clear shrink of the DFT-LDA gap due to spin-orbit occurs. Note that, having 8 electrons in the fundamental cell, due to the spinorial nature of the wavefunction, with SOC we have 8 occupied bands, while only 4 without. Here a picture of the DFT band structure for the two cases.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_pwscf.png|500px|center|GaSb bands DFT]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the band structure of GaSb =&lt;br /&gt;
 &lt;br /&gt;
Now we will perform a G0W0 calculation to correct the DFT-LDA bandstructure. We assume that you are already familiar with the concept of screening needed to build up the GW self-energy and thus the QP corrections. Create a local folder &#039;&#039;My_inputs&#039;&#039; and generate the input for a G0W0 calculation within the plasmon-pole approximation using the following command: &lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA&lt;br /&gt;
 $ mkdir My_inputs&lt;br /&gt;
 $ yambo -p p -g n -V RL -F My_inputs/02_GW.in&lt;br /&gt;
However we also provide an input file with suggested parameters for this calculations inside the folder &#039;&#039;Solid_GaSb/Without_SOC/Yambo/Inputs&#039;&#039;. Remember: these parameters are system dependent and should be converged as you can see other GW tutorials (e.g. [[GW]] or [[GW convergence]]). Here we provide reasonable (but not fully converged) parameters to have a low computational cost but yet qualitatively meaningful results.&lt;br /&gt;
&lt;br /&gt;
The plane-waves cutoff for the wavefunctions and exchange part of the self-energy are set to 10 Ry. &lt;br /&gt;
 FFTGvecs =  10 Ry   # [FFT] Plane-waves&lt;br /&gt;
 EXXRLvcs=   10 Ry   # [XX] Exchange RL components&lt;br /&gt;
while we will use 40 bands, a plane-wave cut-off of 1 Ry, and a plasmon-pole energy of 20 eV to build up the screening matrix &lt;br /&gt;
 NGsBlkXp=    1 Ry  # [Xp] Response block size &lt;br /&gt;
 PPAPntXp= 20.  eV  # [Xp] PPA imaginary energy &lt;br /&gt;
 % BndsRnXp    &lt;br /&gt;
 1 | 40 |        # [Xp] Polarization function bands &lt;br /&gt;
 % &lt;br /&gt;
 % LongDrXp  &lt;br /&gt;
 1.000000 | 1.000000 | 1.000000 |        # [Xp] [cc] Electric Field &lt;br /&gt;
 %&lt;br /&gt;
The number of bands in the green function G to build up the GW self-energy is also 40 &lt;br /&gt;
 % GbndRnge    &lt;br /&gt;
 1 | 40 |                 # [GW] G[W] bands range &lt;br /&gt;
 %&lt;br /&gt;
with those parameters we will compute the correction only in the last 2 points of our grid, 28 and 29 and for the states from 3 to 6, setting the input variable &lt;br /&gt;
 %QPkrange                      &lt;br /&gt;
 28 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
As you can verify from your &#039;&#039;r-01_init_setup&#039;&#039; file 28 and 29 are the L and the Gamma point of the Brillouin zone. &lt;br /&gt;
 *X* K [28] :-0.500000 -0.500000 -0.500000 (rlu) * Comp.s 476 * weight    0.0078   &lt;br /&gt;
 ...   &lt;br /&gt;
 *X* K [29] : 0.000000  0.000000  0.000000 (rlu)  * Comp.s 531 * weight    0.0020   &lt;br /&gt;
 ...&lt;br /&gt;
You can now run the code using either your input file or the one provided in the Inputs folder &lt;br /&gt;
 $ yambo -F ../Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
The run will take some time. Indeed the code has first to compute the dipoles, then the screening within the plasmon pole approximation and finally the self-energy, first the exchange part Gv and then the correlation part G(W-v). &lt;br /&gt;
In the &amp;lt;code&amp;gt;GW_out&amp;lt;/code&amp;gt; folder you will find the &amp;lt;code&amp;gt;o-GW.qp&amp;lt;/code&amp;gt; file containing the GW corrections.&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &lt;br /&gt;
 #&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #&lt;br /&gt;
  ...&lt;br /&gt;
  29.00000    4.00000    0.00000    0.22802    1.07276&lt;br /&gt;
  29.00000    5.00000    0.33228    0.66303   -2.39219&lt;br /&gt;
  ...&lt;br /&gt;
Thus it is about 0.66-0.23=0.43 eV (not fully converged).&lt;br /&gt;
&lt;br /&gt;
We can also compute the G0W0 correction for all the k-point of the database. To this end open the input file &#039;&#039;../Inputs/02_GW.in&#039;&#039; (or your own) and edit the number of k-point to be computed &lt;br /&gt;
 %&lt;br /&gt;
 QPkrange                      1 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
If you have learned how to run the code in parallel you may also set the parallel environment input variables:&lt;br /&gt;
 X_all_q_CPU= &amp;amp;quot;2&amp;amp;quot;              # [PARALLEL] CPUs for each role &lt;br /&gt;
 X_all_q_ROLEs= &amp;amp;quot;q&amp;amp;quot;            # [PARALLEL] CPUs roles (q,k,c,v) &lt;br /&gt;
 SE_CPU= &amp;amp;quot;2&amp;amp;quot;                   # [PARALLEL] CPUs for each role &lt;br /&gt;
 SE_ROLEs= &amp;amp;quot;q&amp;amp;quot;                 # [PARALLEL] CPUs roles (q,qp,b)&lt;br /&gt;
Remember to use the same name after the -J option, so that the code will be able to use the informations from the previous run and avoid many calculations. &lt;br /&gt;
 $ mpirun -np 2 yambo -F Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
In the &#039;&#039;GW_out&#039;&#039; folder you will find now also the &#039;&#039;o-GW.qp_01&#039;&#039; file containg the GW corrections for all the k-points.&lt;br /&gt;
&lt;br /&gt;
Now you can enter the folder of the 4x4x4 shifted grid&lt;br /&gt;
 cd Solid_GaSb/With_SOC/Yambo/4x4x4_shifted+GAMMA&lt;br /&gt;
and repeat the same calculations. Remember that in the input file you will generate you should change all the band ranges doubling the number of states (do you understand why?) &lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
    1 | 80 |        # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
    1 | 80 |        # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 % QPkrange&lt;br /&gt;
   29 | 29 |   5 | 12|  # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band.&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #  &lt;br /&gt;
   ...   &lt;br /&gt;
   29.00000    8.00000    0.00000    0.21758    0.95843&lt;br /&gt;
   29.00000    9.00000    0.06025    0.65362   -2.36544&lt;br /&gt;
   ...&lt;br /&gt;
Thus it is about 0.65-0.22=0.43 eV (not fully converged). Indeed the same result obtained without SOC. The resulting electronic gap is about 0.46 eV reasonably close to the experimental band gap of 0.72 eV. It is also a big improvment compared to the LDA band gap (less than 0.03 eV). This correction (indeed the slightly bigger value of 0.53 eV) will be used, in the form of a scissor operator, as a starting point to compute the optical spectra.&lt;br /&gt;
&lt;br /&gt;
Again we can also compute the G0W0 correction for all the k-point of the database. You can plot column 4 of the output file against column 3 to obtain a picture of the QP corrections. In the following figure we show the plot of the G0W0 correction (E_GoWo-E_LDA) vs the LDA eigenvalues. The corrections at the Gamma and the L point are marked with bigger red spots.&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=400px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_GoWo_corrections.png|GaSb QP corrections without SOC &lt;br /&gt;
Image:GaSb GoWo corrections SOC.png|GaSb GoWo corrections with SOC&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
[[File:SOC_GaSb_GoWo_corrections.png|500px|frameless|center]]&lt;br /&gt;
[[File:GaSb GoWo corrections SOC.png|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;scissor operator approach&amp;amp;quot; does not seem a very good approximation for GaSb. Indeed the quasi particle corrections are not constant, especially in the conduction band. For example the correction to the Gamma point is bigger than the corrections to all other k-points. This result however maybe due to the poor covergence parameters. If you would like to better investigate these results you should try do convergence tests. Since QP corrections are poorly sensitive to the spin-orbit interaction it is probably a good idea to do convergence without SOC.&lt;br /&gt;
&lt;br /&gt;
Here we also provide a plot of the band-structure at different levels of approximation: DFT, DFT+scissor, QP. The band structures are obtained from an interpolation of our k-points mesh and it is not very precise since, again, we are using a quite coarse sampling of the brillouine zone. Indeed we can see that already the interpolated DFT band structure deviates from the exact DFT band-structure, which has also been reported. In particular in the region nearby Gamma. However it gives quite nicely an overview of how the QP band structure compares with the DFT band stucture. The main effect is indeed an opening of the band-gap which can be described in terms of a scissor operator.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_yambo.png|500px|center|GaSb QP bands]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the optical properties of GaSb =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--{|&lt;br /&gt;
| [[File:SOC_GaSb_bands.png|600px|center|GaSb bands 1]]&lt;br /&gt;
| [[File:SOC_GaSb_absorption.png|600px|center|GaSb bands 2]]&lt;br /&gt;
|} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now turn our attention on the optical properties of the system. Here we will compute the dielectric function at different levels of approximations:&amp;lt;br /&amp;gt;&lt;br /&gt;
(i) at the IP-RPA level, thus using the Fermi golden rule with the KS energies and wave-functions&amp;lt;br /&amp;gt;&lt;br /&gt;
(ii) at the RPA level, thus also including the effect of the local fields&amp;lt;br /&amp;gt;&lt;br /&gt;
(iii) at the BSE level, thus including many-body effects, both correcting the KS energies (we will introduce a scissor obtained from the GW calculation) and considering the statically screened electron-hole interaction&lt;br /&gt;
&lt;br /&gt;
First, setup the calculation (initialization) in the usual way in the folder without SOC&lt;br /&gt;
 $ cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 $ yambo -J 01_init&lt;br /&gt;
and repeat the same inside the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; before continuing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;(to be finalized) The yambo code can also run simulations in the perturbative SOC approach. To this end first generate the SOC mapping database in the Without SOC folder following these instructions. After that you will be able to compute optical properties at all levels within the perturbative approach by linking the mapping database. We  will show below how to do that.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;(to be finalized) Finally, for the BSE run with SOC (and for the GW run?), it is also possible to solve the fully spinorial equations, but using the screening databases computed without SOC. In the BSE (and GW?) runs we will discuss how to do that.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RPA-IP absorption ==&lt;br /&gt;
&lt;br /&gt;
Create a local folder inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; which you will call &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt;, and create the input file:&lt;br /&gt;
 &amp;gt;cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o c -V RL -F My_inputs/03_IP-RPA.in&lt;br /&gt;
&lt;br /&gt;
As before, we also provide an input file with suggested parameters for this calculations. The kind of calculation is controlled by the input variable&lt;br /&gt;
 Chimod= &amp;quot;IP&amp;quot;                 # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1            RL    # [Xd] Response block size&lt;br /&gt;
These tells you that we are building up the dielectric function in G-space considering only on G vector, i.e. the G=0 component. The string Chimod= &amp;amp;quot;IP&amp;amp;quot; recalls us that this means we are neglecting the local fields effect.&lt;br /&gt;
&lt;br /&gt;
We set the plane-waves cutoff for the wavefunctions to&lt;br /&gt;
 FFTGvecs=  10  Ry   # [FFT] Plane-waves&lt;br /&gt;
Since we are interested into the optical spectrum calculation, only the Q=0 term, i.e. the first Q-point, is calculated&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
The number of bands we use is 20. This is a reasonable number of states to converge the IP-RPA optical spectrum in the VIS-UV range. (If you wish to calculate the EELS spectrum for q different from 0 probably more bands will be required.)&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 10 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
As you learned the dielectric function is a tensor and in principle three calculations for light polarized along x,y,z chould be done depending on the experimental setup. However GaSb is a system with cubic symmetry, thus any direction is equivalent. Here we decide to compute epsilon along the &amp;amp;quot;(1 1 1)&amp;amp;quot; direction.&lt;br /&gt;
 % LongDrXd&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation using either your input file or the one provided in the Inputs folder&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/03_IP-RPA.in  -J 03_IP-RPA -C 03_IP-RPA_out&lt;br /&gt;
&lt;br /&gt;
Inside the &amp;lt;code&amp;gt;03_IP-RPA&amp;lt;/code&amp;gt; folder you will find the databases created by the code (in this case just the dipoles), while in the &amp;lt;code&amp;gt;03_IP-RPA_out&amp;lt;/code&amp;gt; the report file and the output files for the dielectric function which describes the absorption (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;) and for its inverse (&amp;lt;code&amp;gt;o-03_IP-RPA.eel*&amp;lt;/code&amp;gt;), which describes the electron energy loss. You can plot them with your favorite software (for example gnuplot or xmgrace). The real and imaginary parts of the IP-RPA dielectric function are column 3 and 2 respectively of the file (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;). Using also the reference output file in the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; folder you can compare the spectrum with and without SOC.&lt;br /&gt;
&lt;br /&gt;
Now repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 20 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.jpg|600px|center|GaSb absorption RPA]]&lt;br /&gt;
If you wish to obtain a reasonable spectrum however the 6x6x6 kpts grid is not enough. In order to check the convergence with the number of k-points you should run the same kind of calculations on other k-points meshes, either using the ones we provided ot creating new ones using the input files in the Pwscf folder (see section [[more.php|More on GaSb]] for more advanced calculations).&lt;br /&gt;
&lt;br /&gt;
In the directories Reference_Outputs several RPA dielectric functions are saved with the dielectric function calculated with the 10x10x10 and the 14x14x14 k-grid. You will learn that within RPA spectra the lowest energy peak is under-estimated. Also the spectra with and without SOC look very similar and the SO splitting is almost not present. This is clearly due to the excitonic nature of the E1 peak which can be correctly described only including the electron-hole interaction.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== RPA absorption with local fieldds ==&lt;br /&gt;
&lt;br /&gt;
To also include the local fields effect you can generate the input with the command: &lt;br /&gt;
 &amp;gt;yambo -o c -k hartree -F My_inputs/04_RPA_LF.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
In the input file we provide you will see that now the chimod and size of the dynamical matrix are set to&lt;br /&gt;
 Chimod= &amp;amp;quot;Hartree&amp;amp;quot;       # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1       Ry    # [Xd] Response block size&lt;br /&gt;
&lt;br /&gt;
Including local fields the poles of absorption will move from KS transitions to many-electrons transitions (although we are still neglecting the electron-hole interaction). As a result you will need more states to converge the absorption spectrum. This is why we set the number of bands to 15:&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 15 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
while as before we will have&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 %&lt;br /&gt;
 LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/04_RPA_LF.in -J 04_RPA_LF -C 04_RPA_LF_out&lt;br /&gt;
&lt;br /&gt;
In the 04_RPA+LF_out folder you will fine the report and the output files as before. The real and imaginary parts of the RPA+LF dielectric function with local fields are column 3 and 2 respectively of the .eps file. While the corresponding IP-RPA spectra is reported in columns 5 and 4.&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 30 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
In the following picture we compare the result of IP-RPA and RPA+LF with SOC.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA_IP_vs_LF.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== BSE absorption with QP corrections ==&lt;br /&gt;
&lt;br /&gt;
A more detailed description of BSE in Yambo is available in the following tutorial: &lt;br /&gt;
[https://wiki.yambo-code.eu/wiki/index.php?title=Calculating%20optical%20spectra%20including%20excitonic%20effects:%20a%20step-by-step%20guide BSE in hBN].&lt;br /&gt;
&lt;br /&gt;
=== Static Screening ===&lt;br /&gt;
&lt;br /&gt;
First we need to obtain the static screening. &lt;br /&gt;
&lt;br /&gt;
This can be done using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s My_inputs/05_screening.in&lt;br /&gt;
&lt;br /&gt;
In the resulting input file you can also see the parameters used to compute the static dielectric function needed for the screened Coulomb term (W) of the BSE kernel. Here we use 20 bands and an energy cut-off of 1 Ry.&lt;br /&gt;
&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 20 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 1            Ry    # [Xs] Response block size&lt;br /&gt;
&lt;br /&gt;
Remember to double the number of bands for the case with spin-oribit coupling included. &lt;br /&gt;
&lt;br /&gt;
Then run the file &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F My_inputs/05_screening.in -J screening -C screening&lt;br /&gt;
&lt;br /&gt;
=== BS Kernel and Solver ===&lt;br /&gt;
&lt;br /&gt;
Now we build the BS kernel, and specify the BS kernel solver. Overview of the BSE solvers is available using the following link: [[BSE solvers overview]]. In this tutorial we will use Haydock solver because it is computationally cheaper.&lt;br /&gt;
&lt;br /&gt;
As you probably know the inclusion of the electron-hole interaction makes the approach in G space not feasible. We have thus to compute the dielectric function in the electron-hole space, building up the excitonic hamiltonian. Thus to create the input file you can run the command:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y h -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder. As before you, in the directory Inputs, you can find an example with suggested parameters. The plane-wave cutoffs used to expand wavefunctions is set to 10 Ry, the cut-off on the exchange interaction between the electron and the hole (i.e. for the local-fields) is set to 10 Ry (here we use a much higer value compared to the previous run since the computational cost of increasing this variable in the electron-hole space is very low). and, finally, the cut-off on the direct electron-hole interaction is set to 1 Ry (to build up this term, where the interaction is screened, we need to compute the static dielectric constant in G-space, thus increasing this value is computationally demanding).&lt;br /&gt;
 FFTGvecs= 10     Ry    # [FFT] Plane-waves&lt;br /&gt;
 BSENGexx= 10     Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=  1     Ry    # [BSK] Screened interaction block size&lt;br /&gt;
&lt;br /&gt;
The input variable &amp;amp;quot;KfnQP_E&amp;amp;quot; can be used to include a scissor operator, i.e a opening of the DFT band gap. The value 0.53 eV is the coverged correction at Gamma obtained in the GW run. Here we will calculate the BSE assuming that the &amp;amp;quot;scissor operator approximation&amp;amp;quot; is valid for GaSb (to be checked in principle!) .&lt;br /&gt;
&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 0.530000 &amp;lt;/span&amp;gt; | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
To build up the excitonic matrix we consider the states from 5 to 12, i.e. we are using 4 occupied and 4 unoccupied bands.&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and we will build up the dielectric function using a grid of 200 point in frequency space&lt;br /&gt;
 BEnSteps= 200                # [BSS] Energy steps&lt;br /&gt;
Finally, similarly as before, we will have&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
Remember that the BS kernel is written in the electron-hole space and its size is given by the relation&amp;lt;br /&amp;gt;&lt;br /&gt;
BS kernel size = Valence Bands × Conduction Bands × K-points in the whole BZ.&amp;lt;br /&amp;gt;&lt;br /&gt;
This means that in the case with SO we are building up a matrix 2x2=4 times larger of the corresponding calculation without spin-orbit (you can compare the input in With_SO/Yambo/Inputs / Without_SO/Yambo/Inputs and reference outputs in With_SO/Yambo/Reference_Outputs / With_SO/Yambo/Reference_Outputs)&lt;br /&gt;
&lt;br /&gt;
We are ready to run the BSE calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J &amp;quot;05_BSE,screening&amp;quot; -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
We specify to Yambo the folder which contains calculated static screening, and in &amp;lt;code&amp;gt;05_BSE_out&amp;lt;/code&amp;gt; the two response files &amp;lt;code&amp;gt; o-05_BSE.eel_q1_haydock_bse &amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-05_BSE.eps_q1_haydock_bse&amp;lt;/code&amp;gt; can be found. In the &#039;&#039;eps file&#039;&#039; the real and imaginary parts of the BSE dielectric function are column 3 and 2 respectively, while the corresponding GW spectra are column 5 and 4.&lt;br /&gt;
&lt;br /&gt;
In the folder &amp;lt;code&amp;gt;screening&amp;lt;/code&amp;gt; you will find instead the DBs of the static screening (W) needed to build up the BSE kernel (&amp;lt;code&amp;gt;ndb.em1s&amp;lt;/code&amp;gt;) and in the folder &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; the BSE matrix (&amp;lt;code&amp;gt;ndb.BS*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 40 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   5 | 12 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
If you do the corresponding calculations for the case without spin-orbits using the databases in the directory GaSb_nSO/YAMBO and inputs in GaSb_nSO/Inputs, the two BSE spectra should look like in this figure:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE_few_kpts.jpg|500px|center|GaSb absorption BSE gew kpts]]&lt;br /&gt;
As mentioned before the two spectra present spurious peaks ( as the first peak!) due to uncoverged k-point sampling. Nevertheless the splitting due to spin-orbit interaction is already visible in the peak around 2.1 eV.&lt;br /&gt;
A more converged (yet not fully converged calculation) would give the following results which compares very nicely with the experimental data:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE.png|500px|center|GaSb absorption BSE]]&lt;br /&gt;
&lt;br /&gt;
=== More on Static Screening === &lt;br /&gt;
&lt;br /&gt;
Additionally, a BSE run for the spin-orbit coupling case can be done using the screening computed for the case without spin-orbit coupling. &lt;br /&gt;
&lt;br /&gt;
To do it we can make a symlink from the no-SOC folder:&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt; cd Path/GaSb/With_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt; ln -s Path/GaSb/Without_SOC/YAMBO/6x6x6_shifted/screening screening_no_soc&lt;br /&gt;
&lt;br /&gt;
The BSE kernel can be build and solved using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s -o b -k sex -y h -V qp -F 06_BSE_using_nosoc_screening.in&lt;br /&gt;
&lt;br /&gt;
Here we combined the screening part (-X s) and BSE part (-o b -k sex -y h -V qp). All of the input parameters have been discussed previously. Although, it is important to keep the right matching behind the screening bands used for the no SOC and SOC case.&lt;br /&gt;
&lt;br /&gt;
If for the SOC case the specified screening bands are n1, n2 then for the no-SOC screening the bands should be ((n1-1)/2+1, n2/2). &lt;br /&gt;
&lt;br /&gt;
 # No SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   3 | 20 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and &lt;br /&gt;
 # SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   5 | 40 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The results for the BSE solved using screening used from SOC and no SOC databases is presented below. As we can see, there is almost no difference between them. &lt;br /&gt;
&lt;br /&gt;
[[File:GaSb screening w and wo soc.png|600px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
= Exciton analysis =&lt;br /&gt;
&lt;br /&gt;
In this part of the tutorial we show how to analyze the origin of the E1 peak in GaSb. Since the calculation with the SOC case is very demanding we will do that only for the case without SOC. So first of all enter the &lt;br /&gt;
&amp;lt;code&amp;gt;Without_SOC/YAMBO/6x6x6_shifted&amp;lt;/code&amp;gt; folder and, if you didn&#039;t before, run the setup:&lt;br /&gt;
 &amp;gt;cd Without_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt;ls SAVE&lt;br /&gt;
 &amp;gt;yambo -J 01_init&lt;br /&gt;
 &amp;gt;ls SAVE r-01_init_setup&lt;br /&gt;
&lt;br /&gt;
Similar to previous section we need to compute the static screening first, and then solve the BSE equation.&lt;br /&gt;
This time we will use the full diagonalization solver to calculate all exciton energies and composition in terms of electron-hole pairs. See [[BSE solvers overview]] for more details. &lt;br /&gt;
&lt;br /&gt;
Then create the &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; folder and the input file for a BSE&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -X s -F My_inputs/05_screening.in&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_screening.in -J screening -C screening &lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y d -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the same parameters you used to compute the absorption with SOC previously. The number of bands will be the half of the case without SOC&lt;br /&gt;
 % BSEBands&lt;br /&gt;
  3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
Also this time you will use the to &amp;lt;code&amp;gt;&amp;amp;quot;d&amp;amp;quot;&amp;lt;/code&amp;gt; and uncomment the variable needed to Write to disk excitonic the WFs:&lt;br /&gt;
 BSSmod= &amp;amp;quot;d&amp;amp;quot;              # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft`&lt;br /&gt;
 WRbsWF                   # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
Then you have to run the BSE calculation (notice that, in case you already computed the BSE spectrum also for the case without SOC, the code can read the results from the provious BSE run skipping many steps)&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J 05_BSE -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; folder you will now find a new database file called &amp;lt;code&amp;gt;ndb.BS_diago_Q01&amp;lt;/code&amp;gt;. This is what you need to analyze the exciton peaks running the post-processing code ypp.&lt;br /&gt;
&lt;br /&gt;
First of all you can run:&lt;br /&gt;
 &amp;gt;ypp -e s -J 05_BSE -C BSE_out&lt;br /&gt;
This run will sort in energy the excitonic eigenvalues writing their oscillator strenghts (see &amp;lt;code&amp;gt;o-06_bse.exc_E_sorted&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Then you can create the ypp input required to analize how each excitonic state is build up in terms of single-particle states:&lt;br /&gt;
 &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE&lt;br /&gt;
Put the index &amp;lt;code&amp;gt;#N&amp;lt;/code&amp;gt; of the exciton with higher strenght in the E_1 peak region&lt;br /&gt;
 &amp;gt;ypp -F My_inputs/05_BSE_ypp.in -J 05_BSE -C 06_BSE_out&lt;br /&gt;
You will find the two files &amp;lt;code&amp;gt;o-06_bse.exc_weights_at_#N&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-06_bse.exc_amplitude_at_#N&amp;lt;/code&amp;gt;. In these files you will find informations on the highest strenght exciton in the E1 peak region.&lt;br /&gt;
&lt;br /&gt;
= Perturbative SOC approach =&lt;br /&gt;
&lt;br /&gt;
It is possible to include the spin-orbit coupling perturbatively in Yambo.&lt;br /&gt;
&lt;br /&gt;
To first order the perturbation just gives a correction to the DFT eigenvalues and does not touch the wave–functions. Numerically the perturbation need to be applied by mapping the solution of the DFT calculation without SOC into the solution of the DFT calculation with SOC. Once a mapping is defined, the SOC perturbation could be directly applied to the KS energies before solving both the GW scheme and/or the BSE.&lt;br /&gt;
&lt;br /&gt;
All we need is to computed a SOC mapping database given by the following equation (eq 68 in the referenced paper):&lt;br /&gt;
&lt;br /&gt;
EQUATION &lt;br /&gt;
&lt;br /&gt;
Where x, y, z are ... &lt;br /&gt;
&lt;br /&gt;
To build this map, in the folder without spin-orbit coupling we do the following:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; cd Solid_GaSb/Without_SOC/Yambo/6x6xWi6_shifted&lt;br /&gt;
 &amp;gt; mkdir SOC_DBs&lt;br /&gt;
 &amp;gt; cp -r Path/SAVE_GaSb_k6_w_soc SOC_DBs/SAVE&lt;br /&gt;
 &amp;gt; ypp -w &lt;br /&gt;
 &amp;gt; ypp -F map_wfs.in -J SOC_map -C SOC_map&lt;br /&gt;
&lt;br /&gt;
With the following input for &amp;lt;code&amp;gt;map_wfs.in&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 WFs_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 WFs_SOC_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 SOC_DBs= &amp;quot;SOC_DBs&amp;quot;        # Path to the folder containing the DB with SOC&lt;br /&gt;
 SOC_splitting= 0.01 eV    # SOC splitting between the levels&lt;br /&gt;
 % bands_to_map&lt;br /&gt;
   7 | 12 |                # Number of bands to map&lt;br /&gt;
 %&lt;br /&gt;
 bands_buffer=1&lt;br /&gt;
&lt;br /&gt;
Where the SAVE folder with spin-orbit coupling should be saved in a separate folder, and in this case it is in the &amp;lt;code&amp;gt; SOC_DBs &amp;lt;/code&amp;gt; folder. &lt;br /&gt;
Then, the BSE can be computed using the following command &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F 05_BSE+scissor.in -J &amp;quot;BSE_soc_perturbative,screening,SOC_map&amp;quot; -C BSE_soc_perturbative&lt;br /&gt;
&lt;br /&gt;
Where screening was precomputed, and the SOC_map is the one generated in this section. Check BSE section for more details on setting a BSE calculation.&lt;br /&gt;
Not converged results are presented below. &lt;br /&gt;
[[File:GaSb perturbative soc 1.png|600px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
= Other excercises =&lt;br /&gt;
&lt;br /&gt;
# Try to converge the G0W0 increasing the polarization RL size, the polarization bands, the number of bands in the Green function and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Try to converge the absorption spectra increasing the polarization RL size, the polarization bands, the number of bands to construct the excitonic matrix and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Plot the EELS spectrum obtained within IP-RPA and RPA with local fields. Also in this case you can check the effect of increasing the polarization bands. You may also try to do a resonant only calculation to see that the EELS cannot be described using only the resonant part of the response function.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;&amp;gt;M. Marsili, A. Molina-Sánchez, M. Palummo, D. Sangalli, A. Marini, [https://doi.org/10.1103/PhysRevB.103.155152  Phys. Rev. B &#039;&#039;&#039;103&#039;&#039;&#039;, 155152 (2021)] ([https://arxiv.org/pdf/2103.02266 arXiv 2103.02266])&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wiki&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Gallium_antimonide GaSb on wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;&amp;gt; [https://en.wikipedia.org/wiki/Spin%E2%80%93orbit_interaction#In_atomic_energy_levels Spin-Orbit Interaction on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kim&amp;quot;&amp;gt; Y.S. Kim et al. Phys. Rev. B &#039;&#039;&#039;82&#039;&#039;&#039;, 205212 (2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;rem&amp;quot;&amp;gt; I. N. Remediakis and Efthimios Kaxiras, Phys. Rev. B &#039;&#039;&#039;59&#039;&#039;&#039;, 5336 (1999).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan1&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1002/pssb.200983959 Phys. Sol. State B &#039;&#039;&#039;247&#039;&#039;&#039;, 1960 (2010)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan2&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1103/PhysRevLett.104.157402 Phys. Rev. Lett. &#039;&#039;&#039;104&#039;&#039;&#039;, 157402 (2010)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan3&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1103/PhysRevB.83.155421 Phys. Rev. B 83, &#039;&#039;&#039;155421&#039;&#039;&#039; (2011)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8971</id>
		<title>SOC</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8971"/>
		<updated>2025-08-24T15:05:59Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Effect of spin-orbit interaction =&lt;br /&gt;
&lt;br /&gt;
Spin–orbit coupling (SOC) is a relativistic interaction between an electron’s spin and its orbital motion in the crystal potential. Presently, SOC can be included withing GW-BSE approach either perturbatively, or fully, considering the spinorial nature of the electronic wave-function. In this tutorial, we will use both approaches. More details on the theory and comparison between full spinorial GW-BSE and perturbative approach to SOC can be found in the following paper &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;, and in the Wikipedia article&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;/&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To include the spin-orbit coupling we start with many–body total Hamiltonian of the system including first order relativistic corrections. &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 1 many body rel hamiltonian.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where, &amp;lt;math&amp;gt;\hat{H}^{0}&amp;lt;/math&amp;gt; is the non-relativistic one body hamiltonian, &amp;lt;math&amp;gt;\hat{H}^{(e-e)}&amp;lt;/math&amp;gt; is the e-e Coulomb interaction, and &amp;lt;math&amp;gt;\hat{H}^{(RK)} + \hat{H}^{(SOI)}&amp;lt;/math&amp;gt; are the first order relativistic correction, and the last term is the spin-orbit interaction (SOI) in which we are interested in this tutorial. &lt;br /&gt;
&lt;br /&gt;
The SOI term itself is composed of three different components, &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 2 soi term.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; are many-body terms, called &amp;quot;two-electron spin-orbit&amp;quot;, and &amp;quot;spin-other-orbit&amp;quot;, respectively. And,  &amp;lt;math&amp;gt; \hat{H}^{(SOI)} = \hat{H}^{SO(N)} &amp;lt;/math&amp;gt; is &amp;quot;one electron spin-orbit&amp;quot; is a one body term, which is given by: &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 3 one electron spin orbit.png|250px|frameless]]&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;math&amp;gt;\underline{\nu}&amp;lt;/math&amp;gt; a 2x2 matrix in the &amp;lt;math&amp;gt;\uparrow&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\downarrow&amp;lt;/math&amp;gt; spin space, and:&lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 4 v soc.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;\mathbf{\sigma}&amp;lt;/math&amp;gt; is the three dimensional vector whose components are the Pauli matrices. In a plane wave representation the SOC is, in practice, accounted for by the use of pseudopotentials. The SOC contribution from the pseudopotential captures what is called “local SOC”, which is due to the electrons orbiting around the nuclei, it neglects instead the itinerant SOC which can- not be easily captured in periodic boundary conditions. When relativistic corrections are taken into account instead, one should in principle account for the effects of the many–body terms &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt;. A shortcut is to add a term constructed replacing &amp;lt;math&amp;gt;v^{ext}&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;v^{Hxc}&amp;lt;/math&amp;gt; into previous equation. Doing so partially account for &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt;, while &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; is neglected.&lt;br /&gt;
&lt;br /&gt;
= Introduction = &lt;br /&gt;
&lt;br /&gt;
The scope of this tutorial is to calculate the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; corrections to the DFT-LDA band-structure and the BSE optical spectrum for a bulk semiconducting material, gallium antimonide (GaSb) &amp;lt;ref name=&amp;quot;wiki&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;kim&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;rem&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;. We will compare the results with and without the spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DFT band structure =&lt;br /&gt;
&lt;br /&gt;
For this tutorial we provide two state (GS) databases (DBs), one contains the GS-DBs with the effect of SOC included and one without. The idea is to repeat the same calculation for both database and compare the results and the performances of the code. GaSb input files can be downloaded from the following link [https://media.yambo-code.eu/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz], and can be unarchived using the following command: &lt;br /&gt;
&lt;br /&gt;
 $ tar -xzf GaSb.tar.gz&lt;br /&gt;
&lt;br /&gt;
As in other tutorials you can find the folder containing the input files for the pwscf code (PWSCF, in case you prefer to generate the GS-DBs by yourself) and the folder containing the GS-DBs, the reference input files and the reference output files for the yambo code (YAMBO). Instead of continuously jumping back and forth from the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;With_SOC&amp;lt;/code&amp;gt; folder we advice to open two terminals and keep one for the without SOC case and another for the with SOC case.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s have a look to the content of the folders. For example we can enter in the &amp;lt;code&amp;gt;GaSb/With_SOC/&amp;lt;/code&amp;gt; folder &lt;br /&gt;
 $ cd GaSb/With_SOC/&lt;br /&gt;
 $ ls Pwscf YAMBO&lt;br /&gt;
 $ cd YAMBO&lt;br /&gt;
 $ ls 4x4x4_shifted+GAMMA &lt;br /&gt;
 6x6x6_shifted  10x10x10_shifted 14x14x14_shifted   Inputs  Reference_Outputs&lt;br /&gt;
&lt;br /&gt;
Inside the YAMBO folder there are indeed four folders corresponding to four different k-points meshes. In this tutorial we will use the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; folder for the computation of the QP corrections within the GoWo approximation. It is a k-points grid obtained as the sum of a 4x4x4 k-points grid centered in Gamma and a 4x4x4 grid shifted. Instead for the computation of the optical properties we will use the &amp;lt;code&amp;gt;6x6x6_shifted&amp;lt;/code&amp;gt; folder. It is a 6x6x6 k-points grid shifted from Gamma. The other two folders, &amp;lt;code&amp;gt;10x10x10_shifted&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;14x14x14_shifted&amp;lt;/code&amp;gt; can be used to do a minimum convergence of the optical properties against the number of k-points (pay attention that the BSE calculations with bigger grids will be very memory and time demanding!).&lt;br /&gt;
&lt;br /&gt;
The first part of the tutorial is on the computation of the QP corrections. So let&#039;s enter the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; grid and, as seen in other tutorials run the Initialization:&lt;br /&gt;
&lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA/ &lt;br /&gt;
 $ yambo -J 01_init &lt;br /&gt;
Now compare the result of the two setup runs.&lt;br /&gt;
&lt;br /&gt;
With_SOC case:&lt;br /&gt;
&amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  5.046557&lt;br /&gt;
  VBM / CBm          [ev]:   0.00000   0.06025&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0008               0009-0200&lt;br /&gt;
  Indirect Gaps      [ev]:  0.06025   3.57546&amp;lt;/pre&amp;gt;&lt;br /&gt;
Without_SOC case:&lt;br /&gt;
 &amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  4.777401&lt;br /&gt;
  VBM / CBm          [ev]:  0.000000  0.332282&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0004               0005-0100&lt;br /&gt;
  Indirect Gaps      [ev]: 0.332282  3.620628&lt;br /&gt;
  Direct Gaps        [ev]: 0.332282  7.137342&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A clear shrink of the DFT-LDA gap due to spin-orbit occurs. Note that, having 8 electrons in the fundamental cell, due to the spinorial nature of the wavefunction, with SOC we have 8 occupied bands, while only 4 without. Here a picture of the DFT band structure for the two cases.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_pwscf.png|500px|center|GaSb bands DFT]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the band structure of GaSb =&lt;br /&gt;
 &lt;br /&gt;
Now we will perform a G0W0 calculation to correct the DFT-LDA bandstructure. We assume that you are already familiar with the concept of screening needed to build up the GW self-energy and thus the QP corrections. Create a local folder &#039;&#039;My_inputs&#039;&#039; and generate the input for a G0W0 calculation within the plasmon-pole approximation using the following command: &lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA&lt;br /&gt;
 $ mkdir My_inputs&lt;br /&gt;
 $ yambo -p p -g n -V RL -F My_inputs/02_GW.in&lt;br /&gt;
However we also provide an input file with suggested parameters for this calculations inside the folder &#039;&#039;Solid_GaSb/Without_SOC/Yambo/Inputs&#039;&#039;. Remember: these parameters are system dependent and should be converged as you can see other GW tutorials (e.g. [[GW]] or [[GW convergence]]). Here we provide reasonable (but not fully converged) parameters to have a low computational cost but yet qualitatively meaningful results.&lt;br /&gt;
&lt;br /&gt;
The plane-waves cutoff for the wavefunctions and exchange part of the self-energy are set to 10 Ry. &lt;br /&gt;
 FFTGvecs =  10 Ry   # [FFT] Plane-waves&lt;br /&gt;
 EXXRLvcs=   10 Ry   # [XX] Exchange RL components&lt;br /&gt;
while we will use 40 bands, a plane-wave cut-off of 1 Ry, and a plasmon-pole energy of 20 eV to build up the screening matrix &lt;br /&gt;
 NGsBlkXp=    1 Ry  # [Xp] Response block size &lt;br /&gt;
 PPAPntXp= 20.  eV  # [Xp] PPA imaginary energy &lt;br /&gt;
 % BndsRnXp    &lt;br /&gt;
 1 | 40 |        # [Xp] Polarization function bands &lt;br /&gt;
 % &lt;br /&gt;
 % LongDrXp  &lt;br /&gt;
 1.000000 | 1.000000 | 1.000000 |        # [Xp] [cc] Electric Field &lt;br /&gt;
 %&lt;br /&gt;
The number of bands in the green function G to build up the GW self-energy is also 40 &lt;br /&gt;
 % GbndRnge    &lt;br /&gt;
 1 | 40 |                 # [GW] G[W] bands range &lt;br /&gt;
 %&lt;br /&gt;
with those parameters we will compute the correction only in the last 2 points of our grid, 28 and 29 and for the states from 3 to 6, setting the input variable &lt;br /&gt;
 %QPkrange                      &lt;br /&gt;
 28 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
As you can verify from your &#039;&#039;r-01_init_setup&#039;&#039; file 28 and 29 are the L and the Gamma point of the Brillouin zone. &lt;br /&gt;
 *X* K [28] :-0.500000 -0.500000 -0.500000 (rlu) * Comp.s 476 * weight    0.0078   &lt;br /&gt;
 ...   &lt;br /&gt;
 *X* K [29] : 0.000000  0.000000  0.000000 (rlu)  * Comp.s 531 * weight    0.0020   &lt;br /&gt;
 ...&lt;br /&gt;
You can now run the code using either your input file or the one provided in the Inputs folder &lt;br /&gt;
 $ yambo -F ../Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
The run will take some time. Indeed the code has first to compute the dipoles, then the screening within the plasmon pole approximation and finally the self-energy, first the exchange part Gv and then the correlation part G(W-v). &lt;br /&gt;
In the &amp;lt;code&amp;gt;GW_out&amp;lt;/code&amp;gt; folder you will find the &amp;lt;code&amp;gt;o-GW.qp&amp;lt;/code&amp;gt; file containing the GW corrections.&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &lt;br /&gt;
 #&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #&lt;br /&gt;
  ...&lt;br /&gt;
  29.00000    4.00000    0.00000    0.22802    1.07276&lt;br /&gt;
  29.00000    5.00000    0.33228    0.66303   -2.39219&lt;br /&gt;
  ...&lt;br /&gt;
Thus it is about 0.66-0.23=0.43 eV (not fully converged).&lt;br /&gt;
&lt;br /&gt;
We can also compute the G0W0 correction for all the k-point of the database. To this end open the input file &#039;&#039;../Inputs/02_GW.in&#039;&#039; (or your own) and edit the number of k-point to be computed &lt;br /&gt;
 %&lt;br /&gt;
 QPkrange                      1 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
If you have learned how to run the code in parallel you may also set the parallel environment input variables:&lt;br /&gt;
 X_all_q_CPU= &amp;amp;quot;2&amp;amp;quot;              # [PARALLEL] CPUs for each role &lt;br /&gt;
 X_all_q_ROLEs= &amp;amp;quot;q&amp;amp;quot;            # [PARALLEL] CPUs roles (q,k,c,v) &lt;br /&gt;
 SE_CPU= &amp;amp;quot;2&amp;amp;quot;                   # [PARALLEL] CPUs for each role &lt;br /&gt;
 SE_ROLEs= &amp;amp;quot;q&amp;amp;quot;                 # [PARALLEL] CPUs roles (q,qp,b)&lt;br /&gt;
Remember to use the same name after the -J option, so that the code will be able to use the informations from the previous run and avoid many calculations. &lt;br /&gt;
 $ mpirun -np 2 yambo -F Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
In the &#039;&#039;GW_out&#039;&#039; folder you will find now also the &#039;&#039;o-GW.qp_01&#039;&#039; file containg the GW corrections for all the k-points.&lt;br /&gt;
&lt;br /&gt;
Now you can enter the folder of the 4x4x4 shifted grid&lt;br /&gt;
 cd Solid_GaSb/With_SOC/Yambo/4x4x4_shifted+GAMMA&lt;br /&gt;
and repeat the same calculations. Remember that in the input file you will generate you should change all the band ranges doubling the number of states (do you understand why?) &lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
    1 | 80 |        # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
    1 | 80 |        # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 % QPkrange&lt;br /&gt;
   29 | 29 |   5 | 12|  # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band.&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #  &lt;br /&gt;
   ...   &lt;br /&gt;
   29.00000    8.00000    0.00000    0.21758    0.95843&lt;br /&gt;
   29.00000    9.00000    0.06025    0.65362   -2.36544&lt;br /&gt;
   ...&lt;br /&gt;
Thus it is about 0.65-0.22=0.43 eV (not fully converged). Indeed the same result obtained without SOC. The resulting electronic gap is about 0.46 eV reasonably close to the experimental band gap of 0.72 eV. It is also a big improvment compared to the LDA band gap (less than 0.03 eV). This correction (indeed the slightly bigger value of 0.53 eV) will be used, in the form of a scissor operator, as a starting point to compute the optical spectra.&lt;br /&gt;
&lt;br /&gt;
Again we can also compute the G0W0 correction for all the k-point of the database. You can plot column 4 of the output file against column 3 to obtain a picture of the QP corrections. In the following figure we show the plot of the G0W0 correction (E_GoWo-E_LDA) vs the LDA eigenvalues. The corrections at the Gamma and the L point are marked with bigger red spots.&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=400px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_GoWo_corrections.png|GaSb QP corrections without SOC &lt;br /&gt;
Image:GaSb GoWo corrections SOC.png|GaSb GoWo corrections with SOC&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
[[File:SOC_GaSb_GoWo_corrections.png|500px|frameless|center]]&lt;br /&gt;
[[File:GaSb GoWo corrections SOC.png|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;scissor operator approach&amp;amp;quot; does not seem a very good approximation for GaSb. Indeed the quasi particle corrections are not constant, especially in the conduction band. For example the correction to the Gamma point is bigger than the corrections to all other k-points. This result however maybe due to the poor covergence parameters. If you would like to better investigate these results you should try do convergence tests. Since QP corrections are poorly sensitive to the spin-orbit interaction it is probably a good idea to do convergence without SOC.&lt;br /&gt;
&lt;br /&gt;
Here we also provide a plot of the band-structure at different levels of approximation: DFT, DFT+scissor, QP. The band structures are obtained from an interpolation of our k-points mesh and it is not very precise since, again, we are using a quite coarse sampling of the brillouine zone. Indeed we can see that already the interpolated DFT band structure deviates from the exact DFT band-structure, which has also been reported. In particular in the region nearby Gamma. However it gives quite nicely an overview of how the QP band structure compares with the DFT band stucture. The main effect is indeed an opening of the band-gap which can be described in terms of a scissor operator.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_yambo.png|500px|center|GaSb QP bands]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the optical properties of GaSb =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--{|&lt;br /&gt;
| [[File:SOC_GaSb_bands.png|600px|center|GaSb bands 1]]&lt;br /&gt;
| [[File:SOC_GaSb_absorption.png|600px|center|GaSb bands 2]]&lt;br /&gt;
|} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now turn our attention on the optical properties of the system. Here we will compute the dielectric function at different levels of approximations:&amp;lt;br /&amp;gt;&lt;br /&gt;
(i) at the IP-RPA level, thus using the Fermi golden rule with the KS energies and wave-functions&amp;lt;br /&amp;gt;&lt;br /&gt;
(ii) at the RPA level, thus also including the effect of the local fields&amp;lt;br /&amp;gt;&lt;br /&gt;
(iii) at the BSE level, thus including many-body effects, both correcting the KS energies (we will introduce a scissor obtained from the GW calculation) and considering the statically screened electron-hole interaction&lt;br /&gt;
&lt;br /&gt;
First, setup the calculation (initialization) in the usual way in the folder without SOC&lt;br /&gt;
 $ cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 $ yambo -J 01_init&lt;br /&gt;
and repeat the same inside the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; before continuing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;(to be finalized) The yambo code can also run simulations in the perturbative SOC approach. To this end first generate the SOC mapping database in the Without SOC folder following these instructions. After that you will be able to compute optical properties at all levels within the perturbative approach by linking the mapping database. We  will show below how to do that.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;(to be finalized) Finally, for the BSE run with SOC (and for the GW run?), it is also possible to solve the fully spinorial equations, but using the screening databases computed without SOC. In the BSE (and GW?) runs we will discuss how to do that.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RPA-IP absorption ==&lt;br /&gt;
&lt;br /&gt;
Create a local folder inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; which you will call &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt;, and create the input file:&lt;br /&gt;
 &amp;gt;cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o c -V RL -F My_inputs/03_IP-RPA.in&lt;br /&gt;
&lt;br /&gt;
As before, we also provide an input file with suggested parameters for this calculations. The kind of calculation is controlled by the input variable&lt;br /&gt;
 Chimod= &amp;quot;IP&amp;quot;                 # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1            RL    # [Xd] Response block size&lt;br /&gt;
These tells you that we are building up the dielectric function in G-space considering only on G vector, i.e. the G=0 component. The string Chimod= &amp;amp;quot;IP&amp;amp;quot; recalls us that this means we are neglecting the local fields effect.&lt;br /&gt;
&lt;br /&gt;
We set the plane-waves cutoff for the wavefunctions to&lt;br /&gt;
 FFTGvecs=  10  Ry   # [FFT] Plane-waves&lt;br /&gt;
Since we are interested into the optical spectrum calculation, only the Q=0 term, i.e. the first Q-point, is calculated&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
The number of bands we use is 20. This is a reasonable number of states to converge the IP-RPA optical spectrum in the VIS-UV range. (If you wish to calculate the EELS spectrum for q different from 0 probably more bands will be required.)&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 10 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
As you learned the dielectric function is a tensor and in principle three calculations for light polarized along x,y,z chould be done depending on the experimental setup. However GaSb is a system with cubic symmetry, thus any direction is equivalent. Here we decide to compute epsilon along the &amp;amp;quot;(1 1 1)&amp;amp;quot; direction.&lt;br /&gt;
 % LongDrXd&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation using either your input file or the one provided in the Inputs folder&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/03_IP-RPA.in  -J 03_IP-RPA -C 03_IP-RPA_out&lt;br /&gt;
&lt;br /&gt;
Inside the &amp;lt;code&amp;gt;03_IP-RPA&amp;lt;/code&amp;gt; folder you will find the databases created by the code (in this case just the dipoles), while in the &amp;lt;code&amp;gt;03_IP-RPA_out&amp;lt;/code&amp;gt; the report file and the output files for the dielectric function which describes the absorption (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;) and for its inverse (&amp;lt;code&amp;gt;o-03_IP-RPA.eel*&amp;lt;/code&amp;gt;), which describes the electron energy loss. You can plot them with your favorite software (for example gnuplot or xmgrace). The real and imaginary parts of the IP-RPA dielectric function are column 3 and 2 respectively of the file (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;). Using also the reference output file in the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; folder you can compare the spectrum with and without SOC.&lt;br /&gt;
&lt;br /&gt;
Now repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 20 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.jpg|600px|center|GaSb absorption RPA]]&lt;br /&gt;
If you wish to obtain a reasonable spectrum however the 6x6x6 kpts grid is not enough. In order to check the convergence with the number of k-points you should run the same kind of calculations on other k-points meshes, either using the ones we provided ot creating new ones using the input files in the Pwscf folder (see section [[more.php|More on GaSb]] for more advanced calculations).&lt;br /&gt;
&lt;br /&gt;
In the directories Reference_Outputs several RPA dielectric functions are saved with the dielectric function calculated with the 10x10x10 and the 14x14x14 k-grid. You will learn that within RPA spectra the lowest energy peak is under-estimated. Also the spectra with and without SOC look very similar and the SO splitting is almost not present. This is clearly due to the excitonic nature of the E1 peak which can be correctly described only including the electron-hole interaction.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== RPA absorption with local fieldds ==&lt;br /&gt;
&lt;br /&gt;
To also include the local fields effect you can generate the input with the command: &lt;br /&gt;
 &amp;gt;yambo -o c -k hartree -F My_inputs/04_RPA_LF.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
In the input file we provide you will see that now the chimod and size of the dynamical matrix are set to&lt;br /&gt;
 Chimod= &amp;amp;quot;Hartree&amp;amp;quot;       # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1       Ry    # [Xd] Response block size&lt;br /&gt;
&lt;br /&gt;
Including local fields the poles of absorption will move from KS transitions to many-electrons transitions (although we are still neglecting the electron-hole interaction). As a result you will need more states to converge the absorption spectrum. This is why we set the number of bands to 15:&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 15 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
while as before we will have&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 %&lt;br /&gt;
 LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/04_RPA_LF.in -J 04_RPA_LF -C 04_RPA_LF_out&lt;br /&gt;
&lt;br /&gt;
In the 04_RPA+LF_out folder you will fine the report and the output files as before. The real and imaginary parts of the RPA+LF dielectric function with local fields are column 3 and 2 respectively of the .eps file. While the corresponding IP-RPA spectra is reported in columns 5 and 4.&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 30 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
In the following picture we compare the result of IP-RPA and RPA+LF with SOC.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA_IP_vs_LF.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== BSE absorption with QP corrections ==&lt;br /&gt;
&lt;br /&gt;
A more detailed description of BSE in Yambo is available in the following tutorial: &lt;br /&gt;
[https://wiki.yambo-code.eu/wiki/index.php?title=Calculating%20optical%20spectra%20including%20excitonic%20effects:%20a%20step-by-step%20guide BSE in hBN].&lt;br /&gt;
&lt;br /&gt;
=== Static Screening ===&lt;br /&gt;
&lt;br /&gt;
First we need to obtain the static screening. &lt;br /&gt;
&lt;br /&gt;
This can be done using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s My_inputs/05_screening.in&lt;br /&gt;
&lt;br /&gt;
In the resulting input file you can also see the parameters used to compute the static dielectric function needed for the screened Coulomb term (W) of the BSE kernel. Here we use 20 bands and an energy cut-off of 1 Ry.&lt;br /&gt;
&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 20 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 1            Ry    # [Xs] Response block size&lt;br /&gt;
&lt;br /&gt;
Remember to double the number of bands for the case with spin-oribit coupling included. &lt;br /&gt;
&lt;br /&gt;
Then run the file &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F My_inputs/05_screening.in -J screening -C screening&lt;br /&gt;
&lt;br /&gt;
=== BS Kernel and Solver ===&lt;br /&gt;
&lt;br /&gt;
Now we build the BS kernel, and specify the BS kernel solver. Overview of the BSE solvers is available using the following link: [[BSE solvers overview]]. In this tutorial we will use Haydock solver because it is computationally cheaper.&lt;br /&gt;
&lt;br /&gt;
As you probably know the inclusion of the electron-hole interaction makes the approach in G space not feasible. We have thus to compute the dielectric function in the electron-hole space, building up the excitonic hamiltonian. Thus to create the input file you can run the command:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y h -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder. As before you, in the directory Inputs, you can find an example with suggested parameters. The plane-wave cutoffs used to expand wavefunctions is set to 10 Ry, the cut-off on the exchange interaction between the electron and the hole (i.e. for the local-fields) is set to 10 Ry (here we use a much higer value compared to the previous run since the computational cost of increasing this variable in the electron-hole space is very low). and, finally, the cut-off on the direct electron-hole interaction is set to 1 Ry (to build up this term, where the interaction is screened, we need to compute the static dielectric constant in G-space, thus increasing this value is computationally demanding).&lt;br /&gt;
 FFTGvecs= 10     Ry    # [FFT] Plane-waves&lt;br /&gt;
 BSENGexx= 10     Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=  1     Ry    # [BSK] Screened interaction block size&lt;br /&gt;
&lt;br /&gt;
The input variable &amp;amp;quot;KfnQP_E&amp;amp;quot; can be used to include a scissor operator, i.e a opening of the DFT band gap. The value 0.53 eV is the coverged correction at Gamma obtained in the GW run. Here we will calculate the BSE assuming that the &amp;amp;quot;scissor operator approximation&amp;amp;quot; is valid for GaSb (to be checked in principle!) .&lt;br /&gt;
&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 0.530000 &amp;lt;/span&amp;gt; | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
To build up the excitonic matrix we consider the states from 5 to 12, i.e. we are using 4 occupied and 4 unoccupied bands.&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and we will build up the dielectric function using a grid of 200 point in frequency space&lt;br /&gt;
 BEnSteps= 200                # [BSS] Energy steps&lt;br /&gt;
Finally, similarly as before, we will have&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
Remember that the BS kernel is written in the electron-hole space and its size is given by the relation&amp;lt;br /&amp;gt;&lt;br /&gt;
BS kernel size = Valence Bands × Conduction Bands × K-points in the whole BZ.&amp;lt;br /&amp;gt;&lt;br /&gt;
This means that in the case with SO we are building up a matrix 2x2=4 times larger of the corresponding calculation without spin-orbit (you can compare the input in With_SO/Yambo/Inputs / Without_SO/Yambo/Inputs and reference outputs in With_SO/Yambo/Reference_Outputs / With_SO/Yambo/Reference_Outputs)&lt;br /&gt;
&lt;br /&gt;
We are ready to run the BSE calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J &amp;quot;05_BSE,screening&amp;quot; -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
We specify to Yambo the folder which contains calculated static screening, and in &amp;lt;code&amp;gt;05_BSE_out&amp;lt;/code&amp;gt; the two response files &amp;lt;code&amp;gt; o-05_BSE.eel_q1_haydock_bse &amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-05_BSE.eps_q1_haydock_bse&amp;lt;/code&amp;gt; can be found. In the &#039;&#039;eps file&#039;&#039; the real and imaginary parts of the BSE dielectric function are column 3 and 2 respectively, while the corresponding GW spectra are column 5 and 4.&lt;br /&gt;
&lt;br /&gt;
In the folder &amp;lt;code&amp;gt;screening&amp;lt;/code&amp;gt; you will find instead the DBs of the static screening (W) needed to build up the BSE kernel (&amp;lt;code&amp;gt;ndb.em1s&amp;lt;/code&amp;gt;) and in the folder &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; the BSE matrix (&amp;lt;code&amp;gt;ndb.BS*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 40 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   5 | 12 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
If you do the corresponding calculations for the case without spin-orbits using the databases in the directory GaSb_nSO/YAMBO and inputs in GaSb_nSO/Inputs, the two BSE spectra should look like in this figure:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE_few_kpts.jpg|500px|center|GaSb absorption BSE gew kpts]]&lt;br /&gt;
As mentioned before the two spectra present spurious peaks ( as the first peak!) due to uncoverged k-point sampling. Nevertheless the splitting due to spin-orbit interaction is already visible in the peak around 2.1 eV.&lt;br /&gt;
A more converged (yet not fully converged calculation) would give the following results which compares very nicely with the experimental data:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE.png|500px|center|GaSb absorption BSE]]&lt;br /&gt;
&lt;br /&gt;
=== More on Static Screening === &lt;br /&gt;
&lt;br /&gt;
Additionally, a BSE run for the spin-orbit coupling case can be done using the screening computed for the case without spin-orbit coupling. &lt;br /&gt;
&lt;br /&gt;
To do it we can make a symlink from the no-SOC folder:&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt; cd Path/GaSb/With_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt; ln -s Path/GaSb/Without_SOC/YAMBO/6x6x6_shifted/screening screening_no_soc&lt;br /&gt;
&lt;br /&gt;
The BSE kernel can be build and solved using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s -o b -k sex -y h -V qp -F 06_BSE_using_nosoc_screening.in&lt;br /&gt;
&lt;br /&gt;
Here we combined the screening part (-X s) and BSE part (-o b -k sex -y h -V qp). All of the input parameters have been discussed previously. Although, it is important to keep the right matching behind the screening bands used for the no SOC and SOC case.&lt;br /&gt;
&lt;br /&gt;
If for the SOC case the specified screening bands are n1, n2 then for the no-SOC screening the bands should be ((n1-1)/2+1, n2/2). &lt;br /&gt;
&lt;br /&gt;
 # No SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   3 | 20 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and &lt;br /&gt;
 # SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   5 | 40 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The results for the BSE solved using screening used from SOC and no SOC databases is presented below. As we can see, there is almost no difference between them. &lt;br /&gt;
&lt;br /&gt;
[[File:GaSb screening w and wo soc.png|600px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
= Exciton analysis =&lt;br /&gt;
&lt;br /&gt;
In this part of the tutorial we show how to analyze the origin of the E1 peak in GaSb. Since the calculation with the SOC case is very demanding we will do that only for the case without SOC. So first of all enter the &lt;br /&gt;
&amp;lt;code&amp;gt;Without_SOC/YAMBO/6x6x6_shifted&amp;lt;/code&amp;gt; folder and, if you didn&#039;t before, run the setup:&lt;br /&gt;
 &amp;gt;cd Without_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt;ls SAVE&lt;br /&gt;
 &amp;gt;yambo -J 01_init&lt;br /&gt;
 &amp;gt;ls SAVE r-01_init_setup&lt;br /&gt;
&lt;br /&gt;
Similar to previous section we need to compute the static screening first, and then solve the BSE equation.&lt;br /&gt;
This time we will use the full diagonalization solver to calculate all exciton energies and composition in terms of electron-hole pairs. See [[BSE solvers overview]] for more details. &lt;br /&gt;
&lt;br /&gt;
Then create the &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; folder and the input file for a BSE&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -X s -F My_inputs/05_screening.in&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_screening.in -J screening -C screening &lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y d -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the same parameters you used to compute the absorption with SOC previously. The number of bands will be the half of the case without SOC&lt;br /&gt;
 % BSEBands&lt;br /&gt;
  3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
Also this time you will use the to &amp;lt;code&amp;gt;&amp;amp;quot;d&amp;amp;quot;&amp;lt;/code&amp;gt; and uncomment the variable needed to Write to disk excitonic the WFs:&lt;br /&gt;
 BSSmod= &amp;amp;quot;d&amp;amp;quot;              # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft`&lt;br /&gt;
 WRbsWF                   # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
Then you have to run the BSE calculation (notice that, in case you already computed the BSE spectrum also for the case without SOC, the code can read the results from the provious BSE run skipping many steps)&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J 05_BSE -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; folder you will now find a new database file called &amp;lt;code&amp;gt;ndb.BS_diago_Q01&amp;lt;/code&amp;gt;. This is what you need to analyze the exciton peaks running the post-processing code ypp.&lt;br /&gt;
&lt;br /&gt;
First of all you can run:&lt;br /&gt;
 &amp;gt;ypp -e s -J 05_BSE -C BSE_out&lt;br /&gt;
This run will sort in energy the excitonic eigenvalues writing their oscillator strenghts (see &amp;lt;code&amp;gt;o-06_bse.exc_E_sorted&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Then you can create the ypp input required to analize how each excitonic state is build up in terms of single-particle states:&lt;br /&gt;
 &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE&lt;br /&gt;
Put the index &amp;lt;code&amp;gt;#N&amp;lt;/code&amp;gt; of the exciton with higher strenght in the E_1 peak region&lt;br /&gt;
 &amp;gt;ypp -F My_inputs/05_BSE_ypp.in -J 05_BSE -C 06_BSE_out&lt;br /&gt;
You will find the two files &amp;lt;code&amp;gt;o-06_bse.exc_weights_at_#N&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-06_bse.exc_amplitude_at_#N&amp;lt;/code&amp;gt;. In these files you will find informations on the highest strenght exciton in the E1 peak region.&lt;br /&gt;
&lt;br /&gt;
= Perturbative SOC approach =&lt;br /&gt;
&lt;br /&gt;
It is possible to include the spin-orbit coupling perturbatively in Yambo.&lt;br /&gt;
&lt;br /&gt;
To first order the perturbation just gives a correction to the DFT eigenvalues and does not touch the wave–functions. Numerically the perturbation need to be applied by mapping the solution of the DFT calculation without SOC into the solution of the DFT calculation with SOC. Once a mapping is defined, the SOC perturbation could be directly applied to the KS energies before solving both the GW scheme and/or the BSE.&lt;br /&gt;
&lt;br /&gt;
All we need is to computed a SOC mapping database given by the following equation (eq 68 in the referenced paper):&lt;br /&gt;
&lt;br /&gt;
EQUATION &lt;br /&gt;
&lt;br /&gt;
Where x, y, z are ... &lt;br /&gt;
&lt;br /&gt;
To build this map, in the folder without spin-orbit coupling we do the following:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; cd Solid_GaSb/Without_SOC/Yambo/6x6xWi6_shifted&lt;br /&gt;
 &amp;gt; mkdir SOC_DBs&lt;br /&gt;
 &amp;gt; cp -r Path/SAVE_GaSb_k6_w_soc SOC_DBs/SAVE&lt;br /&gt;
 &amp;gt; ypp -w &lt;br /&gt;
 &amp;gt; ypp -F map_wfs.in -J SOC_map -C SOC_map&lt;br /&gt;
&lt;br /&gt;
With the following input for &amp;lt;code&amp;gt;map_wfs.in&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 WFs_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 WFs_SOC_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 SOC_DBs= &amp;quot;SOC_DBs&amp;quot;        # Path to the folder containing the DB with SOC&lt;br /&gt;
 SOC_splitting= 0.01 eV    # SOC splitting between the levels&lt;br /&gt;
 % bands_to_map&lt;br /&gt;
   7 | 12 |                # Number of bands to map&lt;br /&gt;
 %&lt;br /&gt;
 bands_buffer=1&lt;br /&gt;
&lt;br /&gt;
Where the SAVE folder with spin-orbit coupling should be saved in a separate folder, and in this case it is in the &amp;lt;code&amp;gt; SOC_DBs &amp;lt;/code&amp;gt; folder. &lt;br /&gt;
Then, the BSE can be computed using the following command &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F 05_BSE+scissor.in -J &amp;quot;BSE_soc_perturbative,screening,SOC_map&amp;quot; -C BSE_soc_perturbative&lt;br /&gt;
&lt;br /&gt;
Where screening was precomputed, and the SOC_map is the one generated in this section. Check BSE section for more details on setting a BSE calculation.&lt;br /&gt;
Not converged results are presented below. &lt;br /&gt;
[[File:GaSb perturbative soc 1.png|600px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
= Other excercises =&lt;br /&gt;
&lt;br /&gt;
# Try to converge the G0W0 increasing the polarization RL size, the polarization bands, the number of bands in the Green function and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Try to converge the absorption spectra increasing the polarization RL size, the polarization bands, the number of bands to construct the excitonic matrix and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Plot the EELS spectrum obtained within IP-RPA and RPA with local fields. Also in this case you can check the effect of increasing the polarization bands. You may also try to do a resonant only calculation to see that the EELS cannot be described using only the resonant part of the response function.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;&amp;gt;M. Marsili, A. Molina-Sánchez, M. Palummo, D. Sangalli, A. Marini, [https://doi.org/10.1103/PhysRevB.103.155152  Phys. Rev. B &#039;&#039;&#039;103&#039;&#039;&#039;, 155152 (2021)] ([https://arxiv.org/pdf/2103.02266 arXiv 2103.02266])&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wiki&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Gallium_antimonide GaSb on wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;&amp;gt; [https://en.wikipedia.org/wiki/Spin%E2%80%93orbit_interaction#In_atomic_energy_levels Spin-Orbit Interaction on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kim&amp;quot;&amp;gt; Y.S. Kim et al. Phys. Rev. B &#039;&#039;&#039;82&#039;&#039;&#039;, 205212 (2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;rem&amp;quot;&amp;gt; I. N. Remediakis and Efthimios Kaxiras, Phys. Rev. B &#039;&#039;&#039;59&#039;&#039;&#039;, 5336 (1999).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan1&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1002/pssb.200983959 Phys. Sol. State B &#039;&#039;&#039;247&#039;&#039;&#039;, 1960 (2010)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan2&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1103/PhysRevLett.104.157402 Phys. Rev. Lett. &#039;&#039;&#039;104&#039;&#039;&#039;, 157402 (2010)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hogan3&amp;quot;&amp;gt;C. Hogan, R. Magri, R. Del Sole, [https://doi.org/10.1103/PhysRevB.83.155421 Phys. Rev. B 83, &#039;&#039;&#039;155421&#039;&#039;&#039; (2011)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8970</id>
		<title>SOC</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8970"/>
		<updated>2025-08-24T14:58:28Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* Effect of spin-orbit interaction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Effect of spin-orbit interaction =&lt;br /&gt;
&lt;br /&gt;
Spin–orbit coupling (SOC) is a relativistic interaction between an electron’s spin and its orbital motion in the crystal potential. Presently, SOC can be included withing GW-BSE approach either perturbatively, or fully, considering the spinorial nature of the electronic wave-function. In this tutorial, we will use both approaches. More details on the theory and comparison between full spinorial GW-BSE and perturbative approach to SOC can be found in the following paper &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;, and in the Wikipedia article&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;/&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To include the spin-orbit coupling we start with many–body total Hamiltonian of the system including first order relativistic corrections. &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 1 many body rel hamiltonian.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where, &amp;lt;math&amp;gt;\hat{H}^{0}&amp;lt;/math&amp;gt; is the non-relativistic one body hamiltonian, &amp;lt;math&amp;gt;\hat{H}^{(e-e)}&amp;lt;/math&amp;gt; is the e-e Coulomb interaction, and &amp;lt;math&amp;gt;\hat{H}^{(RK)} + \hat{H}^{(SOI)}&amp;lt;/math&amp;gt; are the first order relativistic correction, and the last term is the spin-orbit interaction (SOI) in which we are interested in this tutorial. &lt;br /&gt;
&lt;br /&gt;
The SOI term itself is composed of three different components, &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 2 soi term.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; are many-body terms, called &amp;quot;two-electron spin-orbit&amp;quot;, and &amp;quot;spin-other-orbit&amp;quot;, respectively. And,  &amp;lt;math&amp;gt; \hat{H}^{(SOI)} = \hat{H}^{SO(N)} &amp;lt;/math&amp;gt; is &amp;quot;one electron spin-orbit&amp;quot; is a one body term, which is given by: &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 3 one electron spin orbit.png|250px|frameless]]&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;math&amp;gt;\underline{\nu}&amp;lt;/math&amp;gt; a 2x2 matrix in the &amp;lt;math&amp;gt;\uparrow&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\downarrow&amp;lt;/math&amp;gt; spin space, and:&lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 4 v soc.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;\mathbf{\sigma}&amp;lt;/math&amp;gt; is the three dimensional vector whose components are the Pauli matrices. In a plane wave representation the SOC is, in practice, accounted for by the use of pseudopotentials. The SOC contribution from the pseudopotential captures what is called “local SOC”, which is due to the electrons orbiting around the nuclei, it neglects instead the itinerant SOC which can- not be easily captured in periodic boundary conditions. When relativistic corrections are taken into account instead, one should in principle account for the effects of the many–body terms &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt;. A shortcut is to add a term constructed replacing &amp;lt;math&amp;gt;v^{ext}&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;v^{Hxc}&amp;lt;/math&amp;gt; into previous equation. Doing so partially account for &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt;, while &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; is neglected.&lt;br /&gt;
&lt;br /&gt;
= Introduction = &lt;br /&gt;
&lt;br /&gt;
The scope of this tutorial is to calculate the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; corrections to the DFT-LDA band-structure and the BSE optical spectrum for a bulk semiconducting material, gallium antimonide (GaSb) &amp;lt;ref name=&amp;quot;wiki&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;kim&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;rem&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;. We will compare the results with and without the spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DFT band structure =&lt;br /&gt;
&lt;br /&gt;
For this tutorial we provide two state (GS) databases (DBs), one contains the GS-DBs with the effect of SOC included and one without. The idea is to repeat the same calculation for both database and compare the results and the performances of the code. GaSb input files can be downloaded from the following link [https://media.yambo-code.eu/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz], and can be unarchived using the following command: &lt;br /&gt;
&lt;br /&gt;
 $ tar -xzf GaSb.tar.gz&lt;br /&gt;
&lt;br /&gt;
As in other tutorials you can find the folder containing the input files for the pwscf code (PWSCF, in case you prefer to generate the GS-DBs by yourself) and the folder containing the GS-DBs, the reference input files and the reference output files for the yambo code (YAMBO). Instead of continuously jumping back and forth from the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;With_SOC&amp;lt;/code&amp;gt; folder we advice to open two terminals and keep one for the without SOC case and another for the with SOC case.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s have a look to the content of the folders. For example we can enter in the &amp;lt;code&amp;gt;GaSb/With_SOC/&amp;lt;/code&amp;gt; folder &lt;br /&gt;
 $ cd GaSb/With_SOC/&lt;br /&gt;
 $ ls Pwscf YAMBO&lt;br /&gt;
 $ cd YAMBO&lt;br /&gt;
 $ ls 4x4x4_shifted+GAMMA &lt;br /&gt;
 6x6x6_shifted  10x10x10_shifted 14x14x14_shifted   Inputs  Reference_Outputs&lt;br /&gt;
&lt;br /&gt;
Inside the YAMBO folder there are indeed four folders corresponding to four different k-points meshes. In this tutorial we will use the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; folder for the computation of the QP corrections within the GoWo approximation. It is a k-points grid obtained as the sum of a 4x4x4 k-points grid centered in Gamma and a 4x4x4 grid shifted. Instead for the computation of the optical properties we will use the &amp;lt;code&amp;gt;6x6x6_shifted&amp;lt;/code&amp;gt; folder. It is a 6x6x6 k-points grid shifted from Gamma. The other two folders, &amp;lt;code&amp;gt;10x10x10_shifted&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;14x14x14_shifted&amp;lt;/code&amp;gt; can be used to do a minimum convergence of the optical properties against the number of k-points (pay attention that the BSE calculations with bigger grids will be very memory and time demanding!).&lt;br /&gt;
&lt;br /&gt;
The first part of the tutorial is on the computation of the QP corrections. So let&#039;s enter the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; grid and, as seen in other tutorials run the Initialization:&lt;br /&gt;
&lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA/ &lt;br /&gt;
 $ yambo -J 01_init &lt;br /&gt;
Now compare the result of the two setup runs.&lt;br /&gt;
&lt;br /&gt;
With_SOC case:&lt;br /&gt;
&amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  5.046557&lt;br /&gt;
  VBM / CBm          [ev]:   0.00000   0.06025&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0008               0009-0200&lt;br /&gt;
  Indirect Gaps      [ev]:  0.06025   3.57546&amp;lt;/pre&amp;gt;&lt;br /&gt;
Without_SOC case:&lt;br /&gt;
 &amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  4.777401&lt;br /&gt;
  VBM / CBm          [ev]:  0.000000  0.332282&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0004               0005-0100&lt;br /&gt;
  Indirect Gaps      [ev]: 0.332282  3.620628&lt;br /&gt;
  Direct Gaps        [ev]: 0.332282  7.137342&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A clear shrink of the DFT-LDA gap due to spin-orbit occurs. Note that, having 8 electrons in the fundamental cell, due to the spinorial nature of the wavefunction, with SOC we have 8 occupied bands, while only 4 without. Here a picture of the DFT band structure for the two cases.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_pwscf.png|500px|center|GaSb bands DFT]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the band structure of GaSb =&lt;br /&gt;
 &lt;br /&gt;
Now we will perform a G0W0 calculation to correct the DFT-LDA bandstructure. We assume that you are already familiar with the concept of screening needed to build up the GW self-energy and thus the QP corrections. Create a local folder &#039;&#039;My_inputs&#039;&#039; and generate the input for a G0W0 calculation within the plasmon-pole approximation using the following command: &lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA&lt;br /&gt;
 $ mkdir My_inputs&lt;br /&gt;
 $ yambo -p p -g n -V RL -F My_inputs/02_GW.in&lt;br /&gt;
However we also provide an input file with suggested parameters for this calculations inside the folder &#039;&#039;Solid_GaSb/Without_SOC/Yambo/Inputs&#039;&#039;. Remember: these parameters are system dependent and should be converged as you can see other GW tutorials (e.g. [[GW]] or [[GW convergence]]). Here we provide reasonable (but not fully converged) parameters to have a low computational cost but yet qualitatively meaningful results.&lt;br /&gt;
&lt;br /&gt;
The plane-waves cutoff for the wavefunctions and exchange part of the self-energy are set to 10 Ry. &lt;br /&gt;
 FFTGvecs =  10 Ry   # [FFT] Plane-waves&lt;br /&gt;
 EXXRLvcs=   10 Ry   # [XX] Exchange RL components&lt;br /&gt;
while we will use 40 bands, a plane-wave cut-off of 1 Ry, and a plasmon-pole energy of 20 eV to build up the screening matrix &lt;br /&gt;
 NGsBlkXp=    1 Ry  # [Xp] Response block size &lt;br /&gt;
 PPAPntXp= 20.  eV  # [Xp] PPA imaginary energy &lt;br /&gt;
 % BndsRnXp    &lt;br /&gt;
 1 | 40 |        # [Xp] Polarization function bands &lt;br /&gt;
 % &lt;br /&gt;
 % LongDrXp  &lt;br /&gt;
 1.000000 | 1.000000 | 1.000000 |        # [Xp] [cc] Electric Field &lt;br /&gt;
 %&lt;br /&gt;
The number of bands in the green function G to build up the GW self-energy is also 40 &lt;br /&gt;
 % GbndRnge    &lt;br /&gt;
 1 | 40 |                 # [GW] G[W] bands range &lt;br /&gt;
 %&lt;br /&gt;
with those parameters we will compute the correction only in the last 2 points of our grid, 28 and 29 and for the states from 3 to 6, setting the input variable &lt;br /&gt;
 %QPkrange                      &lt;br /&gt;
 28 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
As you can verify from your &#039;&#039;r-01_init_setup&#039;&#039; file 28 and 29 are the L and the Gamma point of the Brillouin zone. &lt;br /&gt;
 *X* K [28] :-0.500000 -0.500000 -0.500000 (rlu) * Comp.s 476 * weight    0.0078   &lt;br /&gt;
 ...   &lt;br /&gt;
 *X* K [29] : 0.000000  0.000000  0.000000 (rlu)  * Comp.s 531 * weight    0.0020   &lt;br /&gt;
 ...&lt;br /&gt;
You can now run the code using either your input file or the one provided in the Inputs folder &lt;br /&gt;
 $ yambo -F ../Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
The run will take some time. Indeed the code has first to compute the dipoles, then the screening within the plasmon pole approximation and finally the self-energy, first the exchange part Gv and then the correlation part G(W-v). &lt;br /&gt;
In the &amp;lt;code&amp;gt;GW_out&amp;lt;/code&amp;gt; folder you will find the &amp;lt;code&amp;gt;o-GW.qp&amp;lt;/code&amp;gt; file containing the GW corrections.&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &lt;br /&gt;
 #&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #&lt;br /&gt;
  ...&lt;br /&gt;
  29.00000    4.00000    0.00000    0.22802    1.07276&lt;br /&gt;
  29.00000    5.00000    0.33228    0.66303   -2.39219&lt;br /&gt;
  ...&lt;br /&gt;
Thus it is about 0.66-0.23=0.43 eV (not fully converged).&lt;br /&gt;
&lt;br /&gt;
We can also compute the G0W0 correction for all the k-point of the database. To this end open the input file &#039;&#039;../Inputs/02_GW.in&#039;&#039; (or your own) and edit the number of k-point to be computed &lt;br /&gt;
 %&lt;br /&gt;
 QPkrange                      1 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
If you have learned how to run the code in parallel you may also set the parallel environment input variables:&lt;br /&gt;
 X_all_q_CPU= &amp;amp;quot;2&amp;amp;quot;              # [PARALLEL] CPUs for each role &lt;br /&gt;
 X_all_q_ROLEs= &amp;amp;quot;q&amp;amp;quot;            # [PARALLEL] CPUs roles (q,k,c,v) &lt;br /&gt;
 SE_CPU= &amp;amp;quot;2&amp;amp;quot;                   # [PARALLEL] CPUs for each role &lt;br /&gt;
 SE_ROLEs= &amp;amp;quot;q&amp;amp;quot;                 # [PARALLEL] CPUs roles (q,qp,b)&lt;br /&gt;
Remember to use the same name after the -J option, so that the code will be able to use the informations from the previous run and avoid many calculations. &lt;br /&gt;
 $ mpirun -np 2 yambo -F Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
In the &#039;&#039;GW_out&#039;&#039; folder you will find now also the &#039;&#039;o-GW.qp_01&#039;&#039; file containg the GW corrections for all the k-points.&lt;br /&gt;
&lt;br /&gt;
Now you can enter the folder of the 4x4x4 shifted grid&lt;br /&gt;
 cd Solid_GaSb/With_SOC/Yambo/4x4x4_shifted+GAMMA&lt;br /&gt;
and repeat the same calculations. Remember that in the input file you will generate you should change all the band ranges doubling the number of states (do you understand why?) &lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
    1 | 80 |        # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
    1 | 80 |        # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 % QPkrange&lt;br /&gt;
   29 | 29 |   5 | 12|  # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band.&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #  &lt;br /&gt;
   ...   &lt;br /&gt;
   29.00000    8.00000    0.00000    0.21758    0.95843&lt;br /&gt;
   29.00000    9.00000    0.06025    0.65362   -2.36544&lt;br /&gt;
   ...&lt;br /&gt;
Thus it is about 0.65-0.22=0.43 eV (not fully converged). Indeed the same result obtained without SOC. The resulting electronic gap is about 0.46 eV reasonably close to the experimental band gap of 0.72 eV. It is also a big improvment compared to the LDA band gap (less than 0.03 eV). This correction (indeed the slightly bigger value of 0.53 eV) will be used, in the form of a scissor operator, as a starting point to compute the optical spectra.&lt;br /&gt;
&lt;br /&gt;
Again we can also compute the G0W0 correction for all the k-point of the database. You can plot column 4 of the output file against column 3 to obtain a picture of the QP corrections. In the following figure we show the plot of the G0W0 correction (E_GoWo-E_LDA) vs the LDA eigenvalues. The corrections at the Gamma and the L point are marked with bigger red spots.&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=400px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_GoWo_corrections.png|GaSb QP corrections without SOC &lt;br /&gt;
Image:GaSb GoWo corrections SOC.png|GaSb GoWo corrections with SOC&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
[[File:SOC_GaSb_GoWo_corrections.png|500px|frameless|center]]&lt;br /&gt;
[[File:GaSb GoWo corrections SOC.png|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;scissor operator approach&amp;amp;quot; does not seem a very good approximation for GaSb. Indeed the quasi particle corrections are not constant, especially in the conduction band. For example the correction to the Gamma point is bigger than the corrections to all other k-points. This result however maybe due to the poor covergence parameters. If you would like to better investigate these results you should try do convergence tests. Since QP corrections are poorly sensitive to the spin-orbit interaction it is probably a good idea to do convergence without SOC.&lt;br /&gt;
&lt;br /&gt;
Here we also provide a plot of the band-structure at different levels of approximation: DFT, DFT+scissor, QP. The band structures are obtained from an interpolation of our k-points mesh and it is not very precise since, again, we are using a quite coarse sampling of the brillouine zone. Indeed we can see that already the interpolated DFT band structure deviates from the exact DFT band-structure, which has also been reported. In particular in the region nearby Gamma. However it gives quite nicely an overview of how the QP band structure compares with the DFT band stucture. The main effect is indeed an opening of the band-gap which can be described in terms of a scissor operator.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_yambo.png|500px|center|GaSb QP bands]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the optical properties of GaSb =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--{|&lt;br /&gt;
| [[File:SOC_GaSb_bands.png|600px|center|GaSb bands 1]]&lt;br /&gt;
| [[File:SOC_GaSb_absorption.png|600px|center|GaSb bands 2]]&lt;br /&gt;
|} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now turn our attention on the optical properties of the system. Here we will compute the dielectric function at different levels of approximations:&amp;lt;br /&amp;gt;&lt;br /&gt;
(i) at the IP-RPA level, thus using the Fermi golden rule with the KS energies and wave-functions&amp;lt;br /&amp;gt;&lt;br /&gt;
(ii) at the RPA level, thus also including the effect of the local fields&amp;lt;br /&amp;gt;&lt;br /&gt;
(iii) at the BSE level, thus including many-body effects, both correcting the KS energies (we will introduce a scissor obtained from the GW calculation) and considering the statically screened electron-hole interaction&lt;br /&gt;
&lt;br /&gt;
First, setup the calculation (initialization) in the usual way in the folder without SOC&lt;br /&gt;
 $ cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 $ yambo -J 01_init&lt;br /&gt;
and repeat the same inside the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; before continuing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;(to be finalized) The yambo code can also run simulations in the perturbative SOC approach. To this end first generate the SOC mapping database in the Without SOC folder following these instructions. After that you will be able to compute optical properties at all levels within the perturbative approach by linking the mapping database. We  will show below how to do that.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;(to be finalized) Finally, for the BSE run with SOC (and for the GW run?), it is also possible to solve the fully spinorial equations, but using the screening databases computed without SOC. In the BSE (and GW?) runs we will discuss how to do that.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RPA-IP absorption ==&lt;br /&gt;
&lt;br /&gt;
Create a local folder inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; which you will call &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt;, and create the input file:&lt;br /&gt;
 &amp;gt;cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o c -V RL -F My_inputs/03_IP-RPA.in&lt;br /&gt;
&lt;br /&gt;
As before, we also provide an input file with suggested parameters for this calculations. The kind of calculation is controlled by the input variable&lt;br /&gt;
 Chimod= &amp;quot;IP&amp;quot;                 # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1            RL    # [Xd] Response block size&lt;br /&gt;
These tells you that we are building up the dielectric function in G-space considering only on G vector, i.e. the G=0 component. The string Chimod= &amp;amp;quot;IP&amp;amp;quot; recalls us that this means we are neglecting the local fields effect.&lt;br /&gt;
&lt;br /&gt;
We set the plane-waves cutoff for the wavefunctions to&lt;br /&gt;
 FFTGvecs=  10  Ry   # [FFT] Plane-waves&lt;br /&gt;
Since we are interested into the optical spectrum calculation, only the Q=0 term, i.e. the first Q-point, is calculated&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
The number of bands we use is 20. This is a reasonable number of states to converge the IP-RPA optical spectrum in the VIS-UV range. (If you wish to calculate the EELS spectrum for q different from 0 probably more bands will be required.)&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 10 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
As you learned the dielectric function is a tensor and in principle three calculations for light polarized along x,y,z chould be done depending on the experimental setup. However GaSb is a system with cubic symmetry, thus any direction is equivalent. Here we decide to compute epsilon along the &amp;amp;quot;(1 1 1)&amp;amp;quot; direction.&lt;br /&gt;
 % LongDrXd&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation using either your input file or the one provided in the Inputs folder&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/03_IP-RPA.in  -J 03_IP-RPA -C 03_IP-RPA_out&lt;br /&gt;
&lt;br /&gt;
Inside the &amp;lt;code&amp;gt;03_IP-RPA&amp;lt;/code&amp;gt; folder you will find the databases created by the code (in this case just the dipoles), while in the &amp;lt;code&amp;gt;03_IP-RPA_out&amp;lt;/code&amp;gt; the report file and the output files for the dielectric function which describes the absorption (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;) and for its inverse (&amp;lt;code&amp;gt;o-03_IP-RPA.eel*&amp;lt;/code&amp;gt;), which describes the electron energy loss. You can plot them with your favorite software (for example gnuplot or xmgrace). The real and imaginary parts of the IP-RPA dielectric function are column 3 and 2 respectively of the file (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;). Using also the reference output file in the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; folder you can compare the spectrum with and without SOC.&lt;br /&gt;
&lt;br /&gt;
Now repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 20 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.jpg|600px|center|GaSb absorption RPA]]&lt;br /&gt;
If you wish to obtain a reasonable spectrum however the 6x6x6 kpts grid is not enough. In order to check the convergence with the number of k-points you should run the same kind of calculations on other k-points meshes, either using the ones we provided ot creating new ones using the input files in the Pwscf folder (see section [[more.php|More on GaSb]] for more advanced calculations).&lt;br /&gt;
&lt;br /&gt;
In the directories Reference_Outputs several RPA dielectric functions are saved with the dielectric function calculated with the 10x10x10 and the 14x14x14 k-grid. You will learn that within RPA spectra the lowest energy peak is under-estimated. Also the spectra with and without SOC look very similar and the SO splitting is almost not present. This is clearly due to the excitonic nature of the E1 peak which can be correctly described only including the electron-hole interaction.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== RPA absorption with local fieldds ==&lt;br /&gt;
&lt;br /&gt;
To also include the local fields effect you can generate the input with the command: &lt;br /&gt;
 &amp;gt;yambo -o c -k hartree -F My_inputs/04_RPA_LF.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
In the input file we provide you will see that now the chimod and size of the dynamical matrix are set to&lt;br /&gt;
 Chimod= &amp;amp;quot;Hartree&amp;amp;quot;       # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1       Ry    # [Xd] Response block size&lt;br /&gt;
&lt;br /&gt;
Including local fields the poles of absorption will move from KS transitions to many-electrons transitions (although we are still neglecting the electron-hole interaction). As a result you will need more states to converge the absorption spectrum. This is why we set the number of bands to 15:&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 15 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
while as before we will have&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 %&lt;br /&gt;
 LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/04_RPA_LF.in -J 04_RPA_LF -C 04_RPA_LF_out&lt;br /&gt;
&lt;br /&gt;
In the 04_RPA+LF_out folder you will fine the report and the output files as before. The real and imaginary parts of the RPA+LF dielectric function with local fields are column 3 and 2 respectively of the .eps file. While the corresponding IP-RPA spectra is reported in columns 5 and 4.&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 30 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
In the following picture we compare the result of IP-RPA and RPA+LF with SOC.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA_IP_vs_LF.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== BSE absorption with QP corrections ==&lt;br /&gt;
&lt;br /&gt;
A more detailed description of BSE in Yambo is available in the following tutorial: &lt;br /&gt;
[https://wiki.yambo-code.eu/wiki/index.php?title=Calculating%20optical%20spectra%20including%20excitonic%20effects:%20a%20step-by-step%20guide BSE in hBN].&lt;br /&gt;
&lt;br /&gt;
=== Static Screening ===&lt;br /&gt;
&lt;br /&gt;
First we need to obtain the static screening. &lt;br /&gt;
&lt;br /&gt;
This can be done using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s My_inputs/05_screening.in&lt;br /&gt;
&lt;br /&gt;
In the resulting input file you can also see the parameters used to compute the static dielectric function needed for the screened Coulomb term (W) of the BSE kernel. Here we use 20 bands and an energy cut-off of 1 Ry.&lt;br /&gt;
&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 20 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 1            Ry    # [Xs] Response block size&lt;br /&gt;
&lt;br /&gt;
Remember to double the number of bands for the case with spin-oribit coupling included. &lt;br /&gt;
&lt;br /&gt;
Then run the file &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F My_inputs/05_screening.in -J screening -C screening&lt;br /&gt;
&lt;br /&gt;
=== BS Kernel and Solver ===&lt;br /&gt;
&lt;br /&gt;
Now we build the BS kernel, and specify the BS kernel solver. Overview of the BSE solvers is available using the following link: [[BSE solvers overview]]. In this tutorial we will use Haydock solver because it is computationally cheaper.&lt;br /&gt;
&lt;br /&gt;
As you probably know the inclusion of the electron-hole interaction makes the approach in G space not feasible. We have thus to compute the dielectric function in the electron-hole space, building up the excitonic hamiltonian. Thus to create the input file you can run the command:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y h -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder. As before you, in the directory Inputs, you can find an example with suggested parameters. The plane-wave cutoffs used to expand wavefunctions is set to 10 Ry, the cut-off on the exchange interaction between the electron and the hole (i.e. for the local-fields) is set to 10 Ry (here we use a much higer value compared to the previous run since the computational cost of increasing this variable in the electron-hole space is very low). and, finally, the cut-off on the direct electron-hole interaction is set to 1 Ry (to build up this term, where the interaction is screened, we need to compute the static dielectric constant in G-space, thus increasing this value is computationally demanding).&lt;br /&gt;
 FFTGvecs= 10     Ry    # [FFT] Plane-waves&lt;br /&gt;
 BSENGexx= 10     Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=  1     Ry    # [BSK] Screened interaction block size&lt;br /&gt;
&lt;br /&gt;
The input variable &amp;amp;quot;KfnQP_E&amp;amp;quot; can be used to include a scissor operator, i.e a opening of the DFT band gap. The value 0.53 eV is the coverged correction at Gamma obtained in the GW run. Here we will calculate the BSE assuming that the &amp;amp;quot;scissor operator approximation&amp;amp;quot; is valid for GaSb (to be checked in principle!) .&lt;br /&gt;
&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 0.530000 &amp;lt;/span&amp;gt; | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
To build up the excitonic matrix we consider the states from 5 to 12, i.e. we are using 4 occupied and 4 unoccupied bands.&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and we will build up the dielectric function using a grid of 200 point in frequency space&lt;br /&gt;
 BEnSteps= 200                # [BSS] Energy steps&lt;br /&gt;
Finally, similarly as before, we will have&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
Remember that the BS kernel is written in the electron-hole space and its size is given by the relation&amp;lt;br /&amp;gt;&lt;br /&gt;
BS kernel size = Valence Bands × Conduction Bands × K-points in the whole BZ.&amp;lt;br /&amp;gt;&lt;br /&gt;
This means that in the case with SO we are building up a matrix 2x2=4 times larger of the corresponding calculation without spin-orbit (you can compare the input in With_SO/Yambo/Inputs / Without_SO/Yambo/Inputs and reference outputs in With_SO/Yambo/Reference_Outputs / With_SO/Yambo/Reference_Outputs)&lt;br /&gt;
&lt;br /&gt;
We are ready to run the BSE calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J &amp;quot;05_BSE,screening&amp;quot; -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
We specify to Yambo the folder which contains calculated static screening, and in &amp;lt;code&amp;gt;05_BSE_out&amp;lt;/code&amp;gt; the two response files &amp;lt;code&amp;gt; o-05_BSE.eel_q1_haydock_bse &amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-05_BSE.eps_q1_haydock_bse&amp;lt;/code&amp;gt; can be found. In the &#039;&#039;eps file&#039;&#039; the real and imaginary parts of the BSE dielectric function are column 3 and 2 respectively, while the corresponding GW spectra are column 5 and 4.&lt;br /&gt;
&lt;br /&gt;
In the folder &amp;lt;code&amp;gt;screening&amp;lt;/code&amp;gt; you will find instead the DBs of the static screening (W) needed to build up the BSE kernel (&amp;lt;code&amp;gt;ndb.em1s&amp;lt;/code&amp;gt;) and in the folder &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; the BSE matrix (&amp;lt;code&amp;gt;ndb.BS*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 40 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   5 | 12 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
If you do the corresponding calculations for the case without spin-orbits using the databases in the directory GaSb_nSO/YAMBO and inputs in GaSb_nSO/Inputs, the two BSE spectra should look like in this figure:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE_few_kpts.jpg|500px|center|GaSb absorption BSE gew kpts]]&lt;br /&gt;
As mentioned before the two spectra present spurious peaks ( as the first peak!) due to uncoverged k-point sampling. Nevertheless the splitting due to spin-orbit interaction is already visible in the peak around 2.1 eV.&lt;br /&gt;
A more converged (yet not fully converged calculation) would give the following results which compares very nicely with the experimental data:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE.png|500px|center|GaSb absorption BSE]]&lt;br /&gt;
&lt;br /&gt;
=== More on Static Screening === &lt;br /&gt;
&lt;br /&gt;
Additionally, a BSE run for the spin-orbit coupling case can be done using the screening computed for the case without spin-orbit coupling. &lt;br /&gt;
&lt;br /&gt;
To do it we can make a symlink from the no-SOC folder:&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt; cd Path/GaSb/With_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt; ln -s Path/GaSb/Without_SOC/YAMBO/6x6x6_shifted/screening screening_no_soc&lt;br /&gt;
&lt;br /&gt;
The BSE kernel can be build and solved using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s -o b -k sex -y h -V qp -F 06_BSE_using_nosoc_screening.in&lt;br /&gt;
&lt;br /&gt;
Here we combined the screening part (-X s) and BSE part (-o b -k sex -y h -V qp). All of the input parameters have been discussed previously. Although, it is important to keep the right matching behind the screening bands used for the no SOC and SOC case.&lt;br /&gt;
&lt;br /&gt;
If for the SOC case the specified screening bands are n1, n2 then for the no-SOC screening the bands should be ((n1-1)/2+1, n2/2). &lt;br /&gt;
&lt;br /&gt;
 # No SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   3 | 20 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and &lt;br /&gt;
 # SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   5 | 40 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The results for the BSE solved using screening used from SOC and no SOC databases is presented below. As we can see, there is almost no difference between them. &lt;br /&gt;
&lt;br /&gt;
[[File:GaSb screening w and wo soc.png|600px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
= Exciton analysis =&lt;br /&gt;
&lt;br /&gt;
In this part of the tutorial we show how to analyze the origin of the E1 peak in GaSb. Since the calculation with the SOC case is very demanding we will do that only for the case without SOC. So first of all enter the &lt;br /&gt;
&amp;lt;code&amp;gt;Without_SOC/YAMBO/6x6x6_shifted&amp;lt;/code&amp;gt; folder and, if you didn&#039;t before, run the setup:&lt;br /&gt;
 &amp;gt;cd Without_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt;ls SAVE&lt;br /&gt;
 &amp;gt;yambo -J 01_init&lt;br /&gt;
 &amp;gt;ls SAVE r-01_init_setup&lt;br /&gt;
&lt;br /&gt;
Similar to previous section we need to compute the static screening first, and then solve the BSE equation.&lt;br /&gt;
This time we will use the full diagonalization solver to calculate all exciton energies and composition in terms of electron-hole pairs. See [[BSE solvers overview]] for more details. &lt;br /&gt;
&lt;br /&gt;
Then create the &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; folder and the input file for a BSE&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -X s -F My_inputs/05_screening.in&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_screening.in -J screening -C screening &lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y d -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the same parameters you used to compute the absorption with SOC previously. The number of bands will be the half of the case without SOC&lt;br /&gt;
 % BSEBands&lt;br /&gt;
  3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
Also this time you will use the to &amp;lt;code&amp;gt;&amp;amp;quot;d&amp;amp;quot;&amp;lt;/code&amp;gt; and uncomment the variable needed to Write to disk excitonic the WFs:&lt;br /&gt;
 BSSmod= &amp;amp;quot;d&amp;amp;quot;              # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft`&lt;br /&gt;
 WRbsWF                   # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
Then you have to run the BSE calculation (notice that, in case you already computed the BSE spectrum also for the case without SOC, the code can read the results from the provious BSE run skipping many steps)&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J 05_BSE -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; folder you will now find a new database file called &amp;lt;code&amp;gt;ndb.BS_diago_Q01&amp;lt;/code&amp;gt;. This is what you need to analyze the exciton peaks running the post-processing code ypp.&lt;br /&gt;
&lt;br /&gt;
First of all you can run:&lt;br /&gt;
 &amp;gt;ypp -e s -J 05_BSE -C BSE_out&lt;br /&gt;
This run will sort in energy the excitonic eigenvalues writing their oscillator strenghts (see &amp;lt;code&amp;gt;o-06_bse.exc_E_sorted&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Then you can create the ypp input required to analize how each excitonic state is build up in terms of single-particle states:&lt;br /&gt;
 &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE&lt;br /&gt;
Put the index &amp;lt;code&amp;gt;#N&amp;lt;/code&amp;gt; of the exciton with higher strenght in the E_1 peak region&lt;br /&gt;
 &amp;gt;ypp -F My_inputs/05_BSE_ypp.in -J 05_BSE -C 06_BSE_out&lt;br /&gt;
You will find the two files &amp;lt;code&amp;gt;o-06_bse.exc_weights_at_#N&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-06_bse.exc_amplitude_at_#N&amp;lt;/code&amp;gt;. In these files you will find informations on the highest strenght exciton in the E1 peak region.&lt;br /&gt;
&lt;br /&gt;
= Perturbative SOC approach =&lt;br /&gt;
&lt;br /&gt;
It is possible to include the spin-orbit coupling perturbatively in Yambo.&lt;br /&gt;
&lt;br /&gt;
To first order the perturbation just gives a correction to the DFT eigenvalues and does not touch the wave–functions. Numerically the perturbation need to be applied by mapping the solution of the DFT calculation without SOC into the solution of the DFT calculation with SOC. Once a mapping is defined, the SOC perturbation could be directly applied to the KS energies before solving both the GW scheme and/or the BSE.&lt;br /&gt;
&lt;br /&gt;
All we need is to computed a SOC mapping database given by the following equation (eq 68 in the referenced paper):&lt;br /&gt;
&lt;br /&gt;
EQUATION &lt;br /&gt;
&lt;br /&gt;
Where x, y, z are ... &lt;br /&gt;
&lt;br /&gt;
To build this map, in the folder without spin-orbit coupling we do the following:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; cd Solid_GaSb/Without_SOC/Yambo/6x6xWi6_shifted&lt;br /&gt;
 &amp;gt; mkdir SOC_DBs&lt;br /&gt;
 &amp;gt; cp -r Path/SAVE_GaSb_k6_w_soc SOC_DBs/SAVE&lt;br /&gt;
 &amp;gt; ypp -w &lt;br /&gt;
 &amp;gt; ypp -F map_wfs.in -J SOC_map -C SOC_map&lt;br /&gt;
&lt;br /&gt;
With the following input for &amp;lt;code&amp;gt;map_wfs.in&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 WFs_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 WFs_SOC_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 SOC_DBs= &amp;quot;SOC_DBs&amp;quot;        # Path to the folder containing the DB with SOC&lt;br /&gt;
 SOC_splitting= 0.01 eV    # SOC splitting between the levels&lt;br /&gt;
 % bands_to_map&lt;br /&gt;
   7 | 12 |                # Number of bands to map&lt;br /&gt;
 %&lt;br /&gt;
 bands_buffer=1&lt;br /&gt;
&lt;br /&gt;
Where the SAVE folder with spin-orbit coupling should be saved in a separate folder, and in this case it is in the &amp;lt;code&amp;gt; SOC_DBs &amp;lt;/code&amp;gt; folder. &lt;br /&gt;
Then, the BSE can be computed using the following command &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F 05_BSE+scissor.in -J &amp;quot;BSE_soc_perturbative,screening,SOC_map&amp;quot; -C BSE_soc_perturbative&lt;br /&gt;
&lt;br /&gt;
Where screening was precomputed, and the SOC_map is the one generated in this section. Check BSE section for more details on setting a BSE calculation.&lt;br /&gt;
Not converged results are presented below. &lt;br /&gt;
[[File:GaSb perturbative soc 1.png|600px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
= Other excercises =&lt;br /&gt;
&lt;br /&gt;
# Try to converge the G0W0 increasing the polarization RL size, the polarization bands, the number of bands in the Green function and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Try to converge the absorption spectra increasing the polarization RL size, the polarization bands, the number of bands to construct the excitonic matrix and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Plot the EELS spectrum obtained within IP-RPA and RPA with local fields. Also in this case you can check the effect of increasing the polarization bands. You may also try to do a resonant only calculation to see that the EELS cannot be described using only the resonant part of the response function.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;&amp;gt;M. Marsili, A. Molina-Sánchez, M. Palummo, D. Sangalli, A. Marini, [https://doi.org/10.1103/PhysRevB.103.155152  Phys. Rev. B &#039;&#039;&#039;103&#039;&#039;&#039;, 155152 (2021)] ([https://arxiv.org/pdf/2103.02266 arXiv 2103.02266])&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wiki&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Gallium_antimonide GaSb on wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;&amp;gt; [https://en.wikipedia.org/wiki/Spin%E2%80%93orbit_interaction#In_atomic_energy_levels Spin-Orbit Interaction on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kim&amp;quot;&amp;gt; Y.S. Kim et al. Phys. Rev. B &#039;&#039;&#039;82&#039;&#039;&#039;, 205212 (2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;rem&amp;quot;&amp;gt; I. N. Remediakis and Efthimios Kaxiras Phys. Rev. B &#039;&#039;&#039;59&#039;&#039;&#039;, 5336 (1999).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8969</id>
		<title>SOC</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8969"/>
		<updated>2025-08-24T14:58:03Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Effect of spin-orbit interaction =&lt;br /&gt;
&lt;br /&gt;
Spin–orbit coupling (SOC) is a relativistic interaction between an electron’s spin and its orbital motion in the crystal potential. Presently, SOC can be included withing GW-BSE approach either perturbatively, or fully, considering the spinorial nature of the electronic wave-function. In this tutorial, we will use both approaches. More details on the theory and comparison between full spinorial GW-BSE and perturbative approach to SOC can be found in the following paper &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;. and in the Wikipedia article&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;/&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To include the spin-orbit coupling we start with many–body total Hamiltonian of the system including first order relativistic corrections. &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 1 many body rel hamiltonian.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where, &amp;lt;math&amp;gt;\hat{H}^{0}&amp;lt;/math&amp;gt; is the non-relativistic one body hamiltonian, &amp;lt;math&amp;gt;\hat{H}^{(e-e)}&amp;lt;/math&amp;gt; is the e-e Coulomb interaction, and &amp;lt;math&amp;gt;\hat{H}^{(RK)} + \hat{H}^{(SOI)}&amp;lt;/math&amp;gt; are the first order relativistic correction, and the last term is the spin-orbit interaction (SOI) in which we are interested in this tutorial. &lt;br /&gt;
&lt;br /&gt;
The SOI term itself is composed of three different components, &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 2 soi term.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; are many-body terms, called &amp;quot;two-electron spin-orbit&amp;quot;, and &amp;quot;spin-other-orbit&amp;quot;, respectively. And,  &amp;lt;math&amp;gt; \hat{H}^{(SOI)} = \hat{H}^{SO(N)} &amp;lt;/math&amp;gt; is &amp;quot;one electron spin-orbit&amp;quot; is a one body term, which is given by: &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 3 one electron spin orbit.png|250px|frameless]]&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;math&amp;gt;\underline{\nu}&amp;lt;/math&amp;gt; a 2x2 matrix in the &amp;lt;math&amp;gt;\uparrow&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\downarrow&amp;lt;/math&amp;gt; spin space, and:&lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 4 v soc.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;\mathbf{\sigma}&amp;lt;/math&amp;gt; is the three dimensional vector whose components are the Pauli matrices. In a plane wave representation the SOC is, in practice, accounted for by the use of pseudopotentials. The SOC contribution from the pseudopotential captures what is called “local SOC”, which is due to the electrons orbiting around the nuclei, it neglects instead the itinerant SOC which can- not be easily captured in periodic boundary conditions. When relativistic corrections are taken into account instead, one should in principle account for the effects of the many–body terms &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt;. A shortcut is to add a term constructed replacing &amp;lt;math&amp;gt;v^{ext}&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;v^{Hxc}&amp;lt;/math&amp;gt; into previous equation. Doing so partially account for &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt;, while &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; is neglected.&lt;br /&gt;
&lt;br /&gt;
= Introduction = &lt;br /&gt;
&lt;br /&gt;
The scope of this tutorial is to calculate the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; corrections to the DFT-LDA band-structure and the BSE optical spectrum for a bulk semiconducting material, gallium antimonide (GaSb) &amp;lt;ref name=&amp;quot;wiki&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;kim&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;rem&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;. We will compare the results with and without the spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DFT band structure =&lt;br /&gt;
&lt;br /&gt;
For this tutorial we provide two state (GS) databases (DBs), one contains the GS-DBs with the effect of SOC included and one without. The idea is to repeat the same calculation for both database and compare the results and the performances of the code. GaSb input files can be downloaded from the following link [https://media.yambo-code.eu/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz], and can be unarchived using the following command: &lt;br /&gt;
&lt;br /&gt;
 $ tar -xzf GaSb.tar.gz&lt;br /&gt;
&lt;br /&gt;
As in other tutorials you can find the folder containing the input files for the pwscf code (PWSCF, in case you prefer to generate the GS-DBs by yourself) and the folder containing the GS-DBs, the reference input files and the reference output files for the yambo code (YAMBO). Instead of continuously jumping back and forth from the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;With_SOC&amp;lt;/code&amp;gt; folder we advice to open two terminals and keep one for the without SOC case and another for the with SOC case.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s have a look to the content of the folders. For example we can enter in the &amp;lt;code&amp;gt;GaSb/With_SOC/&amp;lt;/code&amp;gt; folder &lt;br /&gt;
 $ cd GaSb/With_SOC/&lt;br /&gt;
 $ ls Pwscf YAMBO&lt;br /&gt;
 $ cd YAMBO&lt;br /&gt;
 $ ls 4x4x4_shifted+GAMMA &lt;br /&gt;
 6x6x6_shifted  10x10x10_shifted 14x14x14_shifted   Inputs  Reference_Outputs&lt;br /&gt;
&lt;br /&gt;
Inside the YAMBO folder there are indeed four folders corresponding to four different k-points meshes. In this tutorial we will use the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; folder for the computation of the QP corrections within the GoWo approximation. It is a k-points grid obtained as the sum of a 4x4x4 k-points grid centered in Gamma and a 4x4x4 grid shifted. Instead for the computation of the optical properties we will use the &amp;lt;code&amp;gt;6x6x6_shifted&amp;lt;/code&amp;gt; folder. It is a 6x6x6 k-points grid shifted from Gamma. The other two folders, &amp;lt;code&amp;gt;10x10x10_shifted&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;14x14x14_shifted&amp;lt;/code&amp;gt; can be used to do a minimum convergence of the optical properties against the number of k-points (pay attention that the BSE calculations with bigger grids will be very memory and time demanding!).&lt;br /&gt;
&lt;br /&gt;
The first part of the tutorial is on the computation of the QP corrections. So let&#039;s enter the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; grid and, as seen in other tutorials run the Initialization:&lt;br /&gt;
&lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA/ &lt;br /&gt;
 $ yambo -J 01_init &lt;br /&gt;
Now compare the result of the two setup runs.&lt;br /&gt;
&lt;br /&gt;
With_SOC case:&lt;br /&gt;
&amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  5.046557&lt;br /&gt;
  VBM / CBm          [ev]:   0.00000   0.06025&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0008               0009-0200&lt;br /&gt;
  Indirect Gaps      [ev]:  0.06025   3.57546&amp;lt;/pre&amp;gt;&lt;br /&gt;
Without_SOC case:&lt;br /&gt;
 &amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  4.777401&lt;br /&gt;
  VBM / CBm          [ev]:  0.000000  0.332282&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0004               0005-0100&lt;br /&gt;
  Indirect Gaps      [ev]: 0.332282  3.620628&lt;br /&gt;
  Direct Gaps        [ev]: 0.332282  7.137342&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A clear shrink of the DFT-LDA gap due to spin-orbit occurs. Note that, having 8 electrons in the fundamental cell, due to the spinorial nature of the wavefunction, with SOC we have 8 occupied bands, while only 4 without. Here a picture of the DFT band structure for the two cases.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_pwscf.png|500px|center|GaSb bands DFT]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the band structure of GaSb =&lt;br /&gt;
 &lt;br /&gt;
Now we will perform a G0W0 calculation to correct the DFT-LDA bandstructure. We assume that you are already familiar with the concept of screening needed to build up the GW self-energy and thus the QP corrections. Create a local folder &#039;&#039;My_inputs&#039;&#039; and generate the input for a G0W0 calculation within the plasmon-pole approximation using the following command: &lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA&lt;br /&gt;
 $ mkdir My_inputs&lt;br /&gt;
 $ yambo -p p -g n -V RL -F My_inputs/02_GW.in&lt;br /&gt;
However we also provide an input file with suggested parameters for this calculations inside the folder &#039;&#039;Solid_GaSb/Without_SOC/Yambo/Inputs&#039;&#039;. Remember: these parameters are system dependent and should be converged as you can see other GW tutorials (e.g. [[GW]] or [[GW convergence]]). Here we provide reasonable (but not fully converged) parameters to have a low computational cost but yet qualitatively meaningful results.&lt;br /&gt;
&lt;br /&gt;
The plane-waves cutoff for the wavefunctions and exchange part of the self-energy are set to 10 Ry. &lt;br /&gt;
 FFTGvecs =  10 Ry   # [FFT] Plane-waves&lt;br /&gt;
 EXXRLvcs=   10 Ry   # [XX] Exchange RL components&lt;br /&gt;
while we will use 40 bands, a plane-wave cut-off of 1 Ry, and a plasmon-pole energy of 20 eV to build up the screening matrix &lt;br /&gt;
 NGsBlkXp=    1 Ry  # [Xp] Response block size &lt;br /&gt;
 PPAPntXp= 20.  eV  # [Xp] PPA imaginary energy &lt;br /&gt;
 % BndsRnXp    &lt;br /&gt;
 1 | 40 |        # [Xp] Polarization function bands &lt;br /&gt;
 % &lt;br /&gt;
 % LongDrXp  &lt;br /&gt;
 1.000000 | 1.000000 | 1.000000 |        # [Xp] [cc] Electric Field &lt;br /&gt;
 %&lt;br /&gt;
The number of bands in the green function G to build up the GW self-energy is also 40 &lt;br /&gt;
 % GbndRnge    &lt;br /&gt;
 1 | 40 |                 # [GW] G[W] bands range &lt;br /&gt;
 %&lt;br /&gt;
with those parameters we will compute the correction only in the last 2 points of our grid, 28 and 29 and for the states from 3 to 6, setting the input variable &lt;br /&gt;
 %QPkrange                      &lt;br /&gt;
 28 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
As you can verify from your &#039;&#039;r-01_init_setup&#039;&#039; file 28 and 29 are the L and the Gamma point of the Brillouin zone. &lt;br /&gt;
 *X* K [28] :-0.500000 -0.500000 -0.500000 (rlu) * Comp.s 476 * weight    0.0078   &lt;br /&gt;
 ...   &lt;br /&gt;
 *X* K [29] : 0.000000  0.000000  0.000000 (rlu)  * Comp.s 531 * weight    0.0020   &lt;br /&gt;
 ...&lt;br /&gt;
You can now run the code using either your input file or the one provided in the Inputs folder &lt;br /&gt;
 $ yambo -F ../Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
The run will take some time. Indeed the code has first to compute the dipoles, then the screening within the plasmon pole approximation and finally the self-energy, first the exchange part Gv and then the correlation part G(W-v). &lt;br /&gt;
In the &amp;lt;code&amp;gt;GW_out&amp;lt;/code&amp;gt; folder you will find the &amp;lt;code&amp;gt;o-GW.qp&amp;lt;/code&amp;gt; file containing the GW corrections.&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &lt;br /&gt;
 #&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #&lt;br /&gt;
  ...&lt;br /&gt;
  29.00000    4.00000    0.00000    0.22802    1.07276&lt;br /&gt;
  29.00000    5.00000    0.33228    0.66303   -2.39219&lt;br /&gt;
  ...&lt;br /&gt;
Thus it is about 0.66-0.23=0.43 eV (not fully converged).&lt;br /&gt;
&lt;br /&gt;
We can also compute the G0W0 correction for all the k-point of the database. To this end open the input file &#039;&#039;../Inputs/02_GW.in&#039;&#039; (or your own) and edit the number of k-point to be computed &lt;br /&gt;
 %&lt;br /&gt;
 QPkrange                      1 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
If you have learned how to run the code in parallel you may also set the parallel environment input variables:&lt;br /&gt;
 X_all_q_CPU= &amp;amp;quot;2&amp;amp;quot;              # [PARALLEL] CPUs for each role &lt;br /&gt;
 X_all_q_ROLEs= &amp;amp;quot;q&amp;amp;quot;            # [PARALLEL] CPUs roles (q,k,c,v) &lt;br /&gt;
 SE_CPU= &amp;amp;quot;2&amp;amp;quot;                   # [PARALLEL] CPUs for each role &lt;br /&gt;
 SE_ROLEs= &amp;amp;quot;q&amp;amp;quot;                 # [PARALLEL] CPUs roles (q,qp,b)&lt;br /&gt;
Remember to use the same name after the -J option, so that the code will be able to use the informations from the previous run and avoid many calculations. &lt;br /&gt;
 $ mpirun -np 2 yambo -F Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
In the &#039;&#039;GW_out&#039;&#039; folder you will find now also the &#039;&#039;o-GW.qp_01&#039;&#039; file containg the GW corrections for all the k-points.&lt;br /&gt;
&lt;br /&gt;
Now you can enter the folder of the 4x4x4 shifted grid&lt;br /&gt;
 cd Solid_GaSb/With_SOC/Yambo/4x4x4_shifted+GAMMA&lt;br /&gt;
and repeat the same calculations. Remember that in the input file you will generate you should change all the band ranges doubling the number of states (do you understand why?) &lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
    1 | 80 |        # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
    1 | 80 |        # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 % QPkrange&lt;br /&gt;
   29 | 29 |   5 | 12|  # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band.&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #  &lt;br /&gt;
   ...   &lt;br /&gt;
   29.00000    8.00000    0.00000    0.21758    0.95843&lt;br /&gt;
   29.00000    9.00000    0.06025    0.65362   -2.36544&lt;br /&gt;
   ...&lt;br /&gt;
Thus it is about 0.65-0.22=0.43 eV (not fully converged). Indeed the same result obtained without SOC. The resulting electronic gap is about 0.46 eV reasonably close to the experimental band gap of 0.72 eV. It is also a big improvment compared to the LDA band gap (less than 0.03 eV). This correction (indeed the slightly bigger value of 0.53 eV) will be used, in the form of a scissor operator, as a starting point to compute the optical spectra.&lt;br /&gt;
&lt;br /&gt;
Again we can also compute the G0W0 correction for all the k-point of the database. You can plot column 4 of the output file against column 3 to obtain a picture of the QP corrections. In the following figure we show the plot of the G0W0 correction (E_GoWo-E_LDA) vs the LDA eigenvalues. The corrections at the Gamma and the L point are marked with bigger red spots.&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=400px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_GoWo_corrections.png|GaSb QP corrections without SOC &lt;br /&gt;
Image:GaSb GoWo corrections SOC.png|GaSb GoWo corrections with SOC&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
[[File:SOC_GaSb_GoWo_corrections.png|500px|frameless|center]]&lt;br /&gt;
[[File:GaSb GoWo corrections SOC.png|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;scissor operator approach&amp;amp;quot; does not seem a very good approximation for GaSb. Indeed the quasi particle corrections are not constant, especially in the conduction band. For example the correction to the Gamma point is bigger than the corrections to all other k-points. This result however maybe due to the poor covergence parameters. If you would like to better investigate these results you should try do convergence tests. Since QP corrections are poorly sensitive to the spin-orbit interaction it is probably a good idea to do convergence without SOC.&lt;br /&gt;
&lt;br /&gt;
Here we also provide a plot of the band-structure at different levels of approximation: DFT, DFT+scissor, QP. The band structures are obtained from an interpolation of our k-points mesh and it is not very precise since, again, we are using a quite coarse sampling of the brillouine zone. Indeed we can see that already the interpolated DFT band structure deviates from the exact DFT band-structure, which has also been reported. In particular in the region nearby Gamma. However it gives quite nicely an overview of how the QP band structure compares with the DFT band stucture. The main effect is indeed an opening of the band-gap which can be described in terms of a scissor operator.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_yambo.png|500px|center|GaSb QP bands]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the optical properties of GaSb =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--{|&lt;br /&gt;
| [[File:SOC_GaSb_bands.png|600px|center|GaSb bands 1]]&lt;br /&gt;
| [[File:SOC_GaSb_absorption.png|600px|center|GaSb bands 2]]&lt;br /&gt;
|} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now turn our attention on the optical properties of the system. Here we will compute the dielectric function at different levels of approximations:&amp;lt;br /&amp;gt;&lt;br /&gt;
(i) at the IP-RPA level, thus using the Fermi golden rule with the KS energies and wave-functions&amp;lt;br /&amp;gt;&lt;br /&gt;
(ii) at the RPA level, thus also including the effect of the local fields&amp;lt;br /&amp;gt;&lt;br /&gt;
(iii) at the BSE level, thus including many-body effects, both correcting the KS energies (we will introduce a scissor obtained from the GW calculation) and considering the statically screened electron-hole interaction&lt;br /&gt;
&lt;br /&gt;
First, setup the calculation (initialization) in the usual way in the folder without SOC&lt;br /&gt;
 $ cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 $ yambo -J 01_init&lt;br /&gt;
and repeat the same inside the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; before continuing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;(to be finalized) The yambo code can also run simulations in the perturbative SOC approach. To this end first generate the SOC mapping database in the Without SOC folder following these instructions. After that you will be able to compute optical properties at all levels within the perturbative approach by linking the mapping database. We  will show below how to do that.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;(to be finalized) Finally, for the BSE run with SOC (and for the GW run?), it is also possible to solve the fully spinorial equations, but using the screening databases computed without SOC. In the BSE (and GW?) runs we will discuss how to do that.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RPA-IP absorption ==&lt;br /&gt;
&lt;br /&gt;
Create a local folder inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; which you will call &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt;, and create the input file:&lt;br /&gt;
 &amp;gt;cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o c -V RL -F My_inputs/03_IP-RPA.in&lt;br /&gt;
&lt;br /&gt;
As before, we also provide an input file with suggested parameters for this calculations. The kind of calculation is controlled by the input variable&lt;br /&gt;
 Chimod= &amp;quot;IP&amp;quot;                 # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1            RL    # [Xd] Response block size&lt;br /&gt;
These tells you that we are building up the dielectric function in G-space considering only on G vector, i.e. the G=0 component. The string Chimod= &amp;amp;quot;IP&amp;amp;quot; recalls us that this means we are neglecting the local fields effect.&lt;br /&gt;
&lt;br /&gt;
We set the plane-waves cutoff for the wavefunctions to&lt;br /&gt;
 FFTGvecs=  10  Ry   # [FFT] Plane-waves&lt;br /&gt;
Since we are interested into the optical spectrum calculation, only the Q=0 term, i.e. the first Q-point, is calculated&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
The number of bands we use is 20. This is a reasonable number of states to converge the IP-RPA optical spectrum in the VIS-UV range. (If you wish to calculate the EELS spectrum for q different from 0 probably more bands will be required.)&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 10 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
As you learned the dielectric function is a tensor and in principle three calculations for light polarized along x,y,z chould be done depending on the experimental setup. However GaSb is a system with cubic symmetry, thus any direction is equivalent. Here we decide to compute epsilon along the &amp;amp;quot;(1 1 1)&amp;amp;quot; direction.&lt;br /&gt;
 % LongDrXd&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation using either your input file or the one provided in the Inputs folder&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/03_IP-RPA.in  -J 03_IP-RPA -C 03_IP-RPA_out&lt;br /&gt;
&lt;br /&gt;
Inside the &amp;lt;code&amp;gt;03_IP-RPA&amp;lt;/code&amp;gt; folder you will find the databases created by the code (in this case just the dipoles), while in the &amp;lt;code&amp;gt;03_IP-RPA_out&amp;lt;/code&amp;gt; the report file and the output files for the dielectric function which describes the absorption (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;) and for its inverse (&amp;lt;code&amp;gt;o-03_IP-RPA.eel*&amp;lt;/code&amp;gt;), which describes the electron energy loss. You can plot them with your favorite software (for example gnuplot or xmgrace). The real and imaginary parts of the IP-RPA dielectric function are column 3 and 2 respectively of the file (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;). Using also the reference output file in the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; folder you can compare the spectrum with and without SOC.&lt;br /&gt;
&lt;br /&gt;
Now repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 20 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.jpg|600px|center|GaSb absorption RPA]]&lt;br /&gt;
If you wish to obtain a reasonable spectrum however the 6x6x6 kpts grid is not enough. In order to check the convergence with the number of k-points you should run the same kind of calculations on other k-points meshes, either using the ones we provided ot creating new ones using the input files in the Pwscf folder (see section [[more.php|More on GaSb]] for more advanced calculations).&lt;br /&gt;
&lt;br /&gt;
In the directories Reference_Outputs several RPA dielectric functions are saved with the dielectric function calculated with the 10x10x10 and the 14x14x14 k-grid. You will learn that within RPA spectra the lowest energy peak is under-estimated. Also the spectra with and without SOC look very similar and the SO splitting is almost not present. This is clearly due to the excitonic nature of the E1 peak which can be correctly described only including the electron-hole interaction.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== RPA absorption with local fieldds ==&lt;br /&gt;
&lt;br /&gt;
To also include the local fields effect you can generate the input with the command: &lt;br /&gt;
 &amp;gt;yambo -o c -k hartree -F My_inputs/04_RPA_LF.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
In the input file we provide you will see that now the chimod and size of the dynamical matrix are set to&lt;br /&gt;
 Chimod= &amp;amp;quot;Hartree&amp;amp;quot;       # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1       Ry    # [Xd] Response block size&lt;br /&gt;
&lt;br /&gt;
Including local fields the poles of absorption will move from KS transitions to many-electrons transitions (although we are still neglecting the electron-hole interaction). As a result you will need more states to converge the absorption spectrum. This is why we set the number of bands to 15:&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 15 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
while as before we will have&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 %&lt;br /&gt;
 LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/04_RPA_LF.in -J 04_RPA_LF -C 04_RPA_LF_out&lt;br /&gt;
&lt;br /&gt;
In the 04_RPA+LF_out folder you will fine the report and the output files as before. The real and imaginary parts of the RPA+LF dielectric function with local fields are column 3 and 2 respectively of the .eps file. While the corresponding IP-RPA spectra is reported in columns 5 and 4.&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 30 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
In the following picture we compare the result of IP-RPA and RPA+LF with SOC.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA_IP_vs_LF.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== BSE absorption with QP corrections ==&lt;br /&gt;
&lt;br /&gt;
A more detailed description of BSE in Yambo is available in the following tutorial: &lt;br /&gt;
[https://wiki.yambo-code.eu/wiki/index.php?title=Calculating%20optical%20spectra%20including%20excitonic%20effects:%20a%20step-by-step%20guide BSE in hBN].&lt;br /&gt;
&lt;br /&gt;
=== Static Screening ===&lt;br /&gt;
&lt;br /&gt;
First we need to obtain the static screening. &lt;br /&gt;
&lt;br /&gt;
This can be done using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s My_inputs/05_screening.in&lt;br /&gt;
&lt;br /&gt;
In the resulting input file you can also see the parameters used to compute the static dielectric function needed for the screened Coulomb term (W) of the BSE kernel. Here we use 20 bands and an energy cut-off of 1 Ry.&lt;br /&gt;
&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 20 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 1            Ry    # [Xs] Response block size&lt;br /&gt;
&lt;br /&gt;
Remember to double the number of bands for the case with spin-oribit coupling included. &lt;br /&gt;
&lt;br /&gt;
Then run the file &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F My_inputs/05_screening.in -J screening -C screening&lt;br /&gt;
&lt;br /&gt;
=== BS Kernel and Solver ===&lt;br /&gt;
&lt;br /&gt;
Now we build the BS kernel, and specify the BS kernel solver. Overview of the BSE solvers is available using the following link: [[BSE solvers overview]]. In this tutorial we will use Haydock solver because it is computationally cheaper.&lt;br /&gt;
&lt;br /&gt;
As you probably know the inclusion of the electron-hole interaction makes the approach in G space not feasible. We have thus to compute the dielectric function in the electron-hole space, building up the excitonic hamiltonian. Thus to create the input file you can run the command:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y h -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder. As before you, in the directory Inputs, you can find an example with suggested parameters. The plane-wave cutoffs used to expand wavefunctions is set to 10 Ry, the cut-off on the exchange interaction between the electron and the hole (i.e. for the local-fields) is set to 10 Ry (here we use a much higer value compared to the previous run since the computational cost of increasing this variable in the electron-hole space is very low). and, finally, the cut-off on the direct electron-hole interaction is set to 1 Ry (to build up this term, where the interaction is screened, we need to compute the static dielectric constant in G-space, thus increasing this value is computationally demanding).&lt;br /&gt;
 FFTGvecs= 10     Ry    # [FFT] Plane-waves&lt;br /&gt;
 BSENGexx= 10     Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=  1     Ry    # [BSK] Screened interaction block size&lt;br /&gt;
&lt;br /&gt;
The input variable &amp;amp;quot;KfnQP_E&amp;amp;quot; can be used to include a scissor operator, i.e a opening of the DFT band gap. The value 0.53 eV is the coverged correction at Gamma obtained in the GW run. Here we will calculate the BSE assuming that the &amp;amp;quot;scissor operator approximation&amp;amp;quot; is valid for GaSb (to be checked in principle!) .&lt;br /&gt;
&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 0.530000 &amp;lt;/span&amp;gt; | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
To build up the excitonic matrix we consider the states from 5 to 12, i.e. we are using 4 occupied and 4 unoccupied bands.&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and we will build up the dielectric function using a grid of 200 point in frequency space&lt;br /&gt;
 BEnSteps= 200                # [BSS] Energy steps&lt;br /&gt;
Finally, similarly as before, we will have&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
Remember that the BS kernel is written in the electron-hole space and its size is given by the relation&amp;lt;br /&amp;gt;&lt;br /&gt;
BS kernel size = Valence Bands × Conduction Bands × K-points in the whole BZ.&amp;lt;br /&amp;gt;&lt;br /&gt;
This means that in the case with SO we are building up a matrix 2x2=4 times larger of the corresponding calculation without spin-orbit (you can compare the input in With_SO/Yambo/Inputs / Without_SO/Yambo/Inputs and reference outputs in With_SO/Yambo/Reference_Outputs / With_SO/Yambo/Reference_Outputs)&lt;br /&gt;
&lt;br /&gt;
We are ready to run the BSE calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J &amp;quot;05_BSE,screening&amp;quot; -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
We specify to Yambo the folder which contains calculated static screening, and in &amp;lt;code&amp;gt;05_BSE_out&amp;lt;/code&amp;gt; the two response files &amp;lt;code&amp;gt; o-05_BSE.eel_q1_haydock_bse &amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-05_BSE.eps_q1_haydock_bse&amp;lt;/code&amp;gt; can be found. In the &#039;&#039;eps file&#039;&#039; the real and imaginary parts of the BSE dielectric function are column 3 and 2 respectively, while the corresponding GW spectra are column 5 and 4.&lt;br /&gt;
&lt;br /&gt;
In the folder &amp;lt;code&amp;gt;screening&amp;lt;/code&amp;gt; you will find instead the DBs of the static screening (W) needed to build up the BSE kernel (&amp;lt;code&amp;gt;ndb.em1s&amp;lt;/code&amp;gt;) and in the folder &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; the BSE matrix (&amp;lt;code&amp;gt;ndb.BS*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 40 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   5 | 12 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
If you do the corresponding calculations for the case without spin-orbits using the databases in the directory GaSb_nSO/YAMBO and inputs in GaSb_nSO/Inputs, the two BSE spectra should look like in this figure:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE_few_kpts.jpg|500px|center|GaSb absorption BSE gew kpts]]&lt;br /&gt;
As mentioned before the two spectra present spurious peaks ( as the first peak!) due to uncoverged k-point sampling. Nevertheless the splitting due to spin-orbit interaction is already visible in the peak around 2.1 eV.&lt;br /&gt;
A more converged (yet not fully converged calculation) would give the following results which compares very nicely with the experimental data:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE.png|500px|center|GaSb absorption BSE]]&lt;br /&gt;
&lt;br /&gt;
=== More on Static Screening === &lt;br /&gt;
&lt;br /&gt;
Additionally, a BSE run for the spin-orbit coupling case can be done using the screening computed for the case without spin-orbit coupling. &lt;br /&gt;
&lt;br /&gt;
To do it we can make a symlink from the no-SOC folder:&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt; cd Path/GaSb/With_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt; ln -s Path/GaSb/Without_SOC/YAMBO/6x6x6_shifted/screening screening_no_soc&lt;br /&gt;
&lt;br /&gt;
The BSE kernel can be build and solved using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s -o b -k sex -y h -V qp -F 06_BSE_using_nosoc_screening.in&lt;br /&gt;
&lt;br /&gt;
Here we combined the screening part (-X s) and BSE part (-o b -k sex -y h -V qp). All of the input parameters have been discussed previously. Although, it is important to keep the right matching behind the screening bands used for the no SOC and SOC case.&lt;br /&gt;
&lt;br /&gt;
If for the SOC case the specified screening bands are n1, n2 then for the no-SOC screening the bands should be ((n1-1)/2+1, n2/2). &lt;br /&gt;
&lt;br /&gt;
 # No SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   3 | 20 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and &lt;br /&gt;
 # SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   5 | 40 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The results for the BSE solved using screening used from SOC and no SOC databases is presented below. As we can see, there is almost no difference between them. &lt;br /&gt;
&lt;br /&gt;
[[File:GaSb screening w and wo soc.png|600px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
= Exciton analysis =&lt;br /&gt;
&lt;br /&gt;
In this part of the tutorial we show how to analyze the origin of the E1 peak in GaSb. Since the calculation with the SOC case is very demanding we will do that only for the case without SOC. So first of all enter the &lt;br /&gt;
&amp;lt;code&amp;gt;Without_SOC/YAMBO/6x6x6_shifted&amp;lt;/code&amp;gt; folder and, if you didn&#039;t before, run the setup:&lt;br /&gt;
 &amp;gt;cd Without_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt;ls SAVE&lt;br /&gt;
 &amp;gt;yambo -J 01_init&lt;br /&gt;
 &amp;gt;ls SAVE r-01_init_setup&lt;br /&gt;
&lt;br /&gt;
Similar to previous section we need to compute the static screening first, and then solve the BSE equation.&lt;br /&gt;
This time we will use the full diagonalization solver to calculate all exciton energies and composition in terms of electron-hole pairs. See [[BSE solvers overview]] for more details. &lt;br /&gt;
&lt;br /&gt;
Then create the &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; folder and the input file for a BSE&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -X s -F My_inputs/05_screening.in&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_screening.in -J screening -C screening &lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y d -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the same parameters you used to compute the absorption with SOC previously. The number of bands will be the half of the case without SOC&lt;br /&gt;
 % BSEBands&lt;br /&gt;
  3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
Also this time you will use the to &amp;lt;code&amp;gt;&amp;amp;quot;d&amp;amp;quot;&amp;lt;/code&amp;gt; and uncomment the variable needed to Write to disk excitonic the WFs:&lt;br /&gt;
 BSSmod= &amp;amp;quot;d&amp;amp;quot;              # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft`&lt;br /&gt;
 WRbsWF                   # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
Then you have to run the BSE calculation (notice that, in case you already computed the BSE spectrum also for the case without SOC, the code can read the results from the provious BSE run skipping many steps)&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J 05_BSE -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; folder you will now find a new database file called &amp;lt;code&amp;gt;ndb.BS_diago_Q01&amp;lt;/code&amp;gt;. This is what you need to analyze the exciton peaks running the post-processing code ypp.&lt;br /&gt;
&lt;br /&gt;
First of all you can run:&lt;br /&gt;
 &amp;gt;ypp -e s -J 05_BSE -C BSE_out&lt;br /&gt;
This run will sort in energy the excitonic eigenvalues writing their oscillator strenghts (see &amp;lt;code&amp;gt;o-06_bse.exc_E_sorted&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Then you can create the ypp input required to analize how each excitonic state is build up in terms of single-particle states:&lt;br /&gt;
 &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE&lt;br /&gt;
Put the index &amp;lt;code&amp;gt;#N&amp;lt;/code&amp;gt; of the exciton with higher strenght in the E_1 peak region&lt;br /&gt;
 &amp;gt;ypp -F My_inputs/05_BSE_ypp.in -J 05_BSE -C 06_BSE_out&lt;br /&gt;
You will find the two files &amp;lt;code&amp;gt;o-06_bse.exc_weights_at_#N&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-06_bse.exc_amplitude_at_#N&amp;lt;/code&amp;gt;. In these files you will find informations on the highest strenght exciton in the E1 peak region.&lt;br /&gt;
&lt;br /&gt;
= Perturbative SOC approach =&lt;br /&gt;
&lt;br /&gt;
It is possible to include the spin-orbit coupling perturbatively in Yambo.&lt;br /&gt;
&lt;br /&gt;
To first order the perturbation just gives a correction to the DFT eigenvalues and does not touch the wave–functions. Numerically the perturbation need to be applied by mapping the solution of the DFT calculation without SOC into the solution of the DFT calculation with SOC. Once a mapping is defined, the SOC perturbation could be directly applied to the KS energies before solving both the GW scheme and/or the BSE.&lt;br /&gt;
&lt;br /&gt;
All we need is to computed a SOC mapping database given by the following equation (eq 68 in the referenced paper):&lt;br /&gt;
&lt;br /&gt;
EQUATION &lt;br /&gt;
&lt;br /&gt;
Where x, y, z are ... &lt;br /&gt;
&lt;br /&gt;
To build this map, in the folder without spin-orbit coupling we do the following:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; cd Solid_GaSb/Without_SOC/Yambo/6x6xWi6_shifted&lt;br /&gt;
 &amp;gt; mkdir SOC_DBs&lt;br /&gt;
 &amp;gt; cp -r Path/SAVE_GaSb_k6_w_soc SOC_DBs/SAVE&lt;br /&gt;
 &amp;gt; ypp -w &lt;br /&gt;
 &amp;gt; ypp -F map_wfs.in -J SOC_map -C SOC_map&lt;br /&gt;
&lt;br /&gt;
With the following input for &amp;lt;code&amp;gt;map_wfs.in&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 WFs_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 WFs_SOC_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 SOC_DBs= &amp;quot;SOC_DBs&amp;quot;        # Path to the folder containing the DB with SOC&lt;br /&gt;
 SOC_splitting= 0.01 eV    # SOC splitting between the levels&lt;br /&gt;
 % bands_to_map&lt;br /&gt;
   7 | 12 |                # Number of bands to map&lt;br /&gt;
 %&lt;br /&gt;
 bands_buffer=1&lt;br /&gt;
&lt;br /&gt;
Where the SAVE folder with spin-orbit coupling should be saved in a separate folder, and in this case it is in the &amp;lt;code&amp;gt; SOC_DBs &amp;lt;/code&amp;gt; folder. &lt;br /&gt;
Then, the BSE can be computed using the following command &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F 05_BSE+scissor.in -J &amp;quot;BSE_soc_perturbative,screening,SOC_map&amp;quot; -C BSE_soc_perturbative&lt;br /&gt;
&lt;br /&gt;
Where screening was precomputed, and the SOC_map is the one generated in this section. Check BSE section for more details on setting a BSE calculation.&lt;br /&gt;
Not converged results are presented below. &lt;br /&gt;
[[File:GaSb perturbative soc 1.png|600px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
= Other excercises =&lt;br /&gt;
&lt;br /&gt;
# Try to converge the G0W0 increasing the polarization RL size, the polarization bands, the number of bands in the Green function and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Try to converge the absorption spectra increasing the polarization RL size, the polarization bands, the number of bands to construct the excitonic matrix and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Plot the EELS spectrum obtained within IP-RPA and RPA with local fields. Also in this case you can check the effect of increasing the polarization bands. You may also try to do a resonant only calculation to see that the EELS cannot be described using only the resonant part of the response function.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;&amp;gt;M. Marsili, A. Molina-Sánchez, M. Palummo, D. Sangalli, A. Marini, [https://doi.org/10.1103/PhysRevB.103.155152  Phys. Rev. B &#039;&#039;&#039;103&#039;&#039;&#039;, 155152 (2021)] ([https://arxiv.org/pdf/2103.02266 arXiv 2103.02266])&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wiki&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Gallium_antimonide GaSb on wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;&amp;gt; [https://en.wikipedia.org/wiki/Spin%E2%80%93orbit_interaction#In_atomic_energy_levels Spin-Orbit Interaction on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kim&amp;quot;&amp;gt; Y.S. Kim et al. Phys. Rev. B &#039;&#039;&#039;82&#039;&#039;&#039;, 205212 (2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;rem&amp;quot;&amp;gt; I. N. Remediakis and Efthimios Kaxiras Phys. Rev. B &#039;&#039;&#039;59&#039;&#039;&#039;, 5336 (1999).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8968</id>
		<title>SOC</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8968"/>
		<updated>2025-08-24T14:57:10Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* Effect of spin-orbit interaction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Effect of spin-orbit interaction =&lt;br /&gt;
&lt;br /&gt;
Spin–orbit coupling (SOC) is a relativistic interaction between an electron’s spin and its orbital motion in the crystal potential. Presently, SOC can be included withing GW-BSE approach either perturbatively, or fully, considering the spinorial nature of the electronic wave-function. In this tutorial, we will use both approaches. More details on the theory and comparison between full spinorial GW-BSE and perturbative approach to SOC can be found in the following paper &amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;. and in the Wikipedia article&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;/&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To include the spin-orbit coupling we start with many–body total Hamiltonian of the system including first order relativistic corrections. &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 1 many body rel hamiltonian.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where, &amp;lt;math&amp;gt;\hat{H}^{0}&amp;lt;/math&amp;gt; is the non-relativistic one body hamiltonian, &amp;lt;math&amp;gt;\hat{H}^{(e-e)}&amp;lt;/math&amp;gt; is the e-e Coulomb interaction, and &amp;lt;math&amp;gt;\hat{H}^{(RK)} + \hat{H}^{(SOI)}&amp;lt;/math&amp;gt; are the first order relativistic correction, and the last term is the spin-orbit interaction (SOI) in which we are interested in this tutorial. &lt;br /&gt;
&lt;br /&gt;
The SOI term itself is composed of three different components, &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 2 soi term.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; are many-body terms, called &amp;quot;two-electron spin-orbit&amp;quot;, and &amp;quot;spin-other-orbit&amp;quot;, respectively. And,  &amp;lt;math&amp;gt; \hat{H}^{(SOI)} = \hat{H}^{SO(N)} &amp;lt;/math&amp;gt; is &amp;quot;one electron spin-orbit&amp;quot; is a one body term, which is given by: &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 3 one electron spin orbit.png|250px|frameless]]&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;math&amp;gt;\underline{\nu}&amp;lt;/math&amp;gt; a 2x2 matrix in the &amp;lt;math&amp;gt;\uparrow&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\downarrow&amp;lt;/math&amp;gt; spin space, and:&lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 4 v soc.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;\mathbf{\sigma}&amp;lt;/math&amp;gt; is the three dimensional vector whose components are the Pauli matrices. In a plane wave representation the SOC is, in practice, accounted for by the use of pseudopotentials. The SOC contribution from the pseudopotential captures what is called “local SOC”, which is due to the electrons orbiting around the nuclei, it neglects instead the itinerant SOC which can- not be easily captured in periodic boundary conditions. When relativistic corrections are taken into account instead, one should in principle account for the effects of the many–body terms &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt;. A shortcut is to add a term constructed replacing &amp;lt;math&amp;gt;v^{ext}&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;v^{Hxc}&amp;lt;/math&amp;gt; into previous equation. Doing so partially account for &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt;, while &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; is neglected.&lt;br /&gt;
&lt;br /&gt;
= Introduction = &lt;br /&gt;
&lt;br /&gt;
The scope of this tutorial is to calculate the G&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;W&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; corrections to the DFT-LDA band-structure and the BSE optical spectrum for a bulk semiconducting material, gallium antimonide (GaSb) &amp;lt;ref name=&amp;quot;wiki&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;kim&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;rem&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;. We will compare the results with and without the spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DFT band structure =&lt;br /&gt;
&lt;br /&gt;
For this tutorial we provide two state (GS) databases (DBs), one contains the GS-DBs with the effect of SOC included and one without. The idea is to repeat the same calculation for both database and compare the results and the performances of the code. GaSb input files can be downloaded from the following link [https://media.yambo-code.eu/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz], and can be unarchived using the following command: &lt;br /&gt;
&lt;br /&gt;
 $ tar -xzf GaSb.tar.gz&lt;br /&gt;
&lt;br /&gt;
As in other tutorials you can find the folder containing the input files for the pwscf code (PWSCF, in case you prefer to generate the GS-DBs by yourself) and the folder containing the GS-DBs, the reference input files and the reference output files for the yambo code (YAMBO). Instead of continuously jumping back and forth from the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;With_SOC&amp;lt;/code&amp;gt; folder we advice to open two terminals and keep one for the without SOC case and another for the with SOC case.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s have a look to the content of the folders. For example we can enter in the &amp;lt;code&amp;gt;GaSb/With_SOC/&amp;lt;/code&amp;gt; folder &lt;br /&gt;
 $ cd GaSb/With_SOC/&lt;br /&gt;
 $ ls Pwscf YAMBO&lt;br /&gt;
 $ cd YAMBO&lt;br /&gt;
 $ ls 4x4x4_shifted+GAMMA &lt;br /&gt;
 6x6x6_shifted  10x10x10_shifted 14x14x14_shifted   Inputs  Reference_Outputs&lt;br /&gt;
&lt;br /&gt;
Inside the YAMBO folder there are indeed four folders corresponding to four different k-points meshes. In this tutorial we will use the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; folder for the computation of the QP corrections within the GoWo approximation. It is a k-points grid obtained as the sum of a 4x4x4 k-points grid centered in Gamma and a 4x4x4 grid shifted. Instead for the computation of the optical properties we will use the &amp;lt;code&amp;gt;6x6x6_shifted&amp;lt;/code&amp;gt; folder. It is a 6x6x6 k-points grid shifted from Gamma. The other two folders, &amp;lt;code&amp;gt;10x10x10_shifted&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;14x14x14_shifted&amp;lt;/code&amp;gt; can be used to do a minimum convergence of the optical properties against the number of k-points (pay attention that the BSE calculations with bigger grids will be very memory and time demanding!).&lt;br /&gt;
&lt;br /&gt;
The first part of the tutorial is on the computation of the QP corrections. So let&#039;s enter the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; grid and, as seen in other tutorials run the Initialization:&lt;br /&gt;
&lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA/ &lt;br /&gt;
 $ yambo -J 01_init &lt;br /&gt;
Now compare the result of the two setup runs.&lt;br /&gt;
&lt;br /&gt;
With_SOC case:&lt;br /&gt;
&amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  5.046557&lt;br /&gt;
  VBM / CBm          [ev]:   0.00000   0.06025&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0008               0009-0200&lt;br /&gt;
  Indirect Gaps      [ev]:  0.06025   3.57546&amp;lt;/pre&amp;gt;&lt;br /&gt;
Without_SOC case:&lt;br /&gt;
 &amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  4.777401&lt;br /&gt;
  VBM / CBm          [ev]:  0.000000  0.332282&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0004               0005-0100&lt;br /&gt;
  Indirect Gaps      [ev]: 0.332282  3.620628&lt;br /&gt;
  Direct Gaps        [ev]: 0.332282  7.137342&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A clear shrink of the DFT-LDA gap due to spin-orbit occurs. Note that, having 8 electrons in the fundamental cell, due to the spinorial nature of the wavefunction, with SOC we have 8 occupied bands, while only 4 without. Here a picture of the DFT band structure for the two cases.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_pwscf.png|500px|center|GaSb bands DFT]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the band structure of GaSb =&lt;br /&gt;
 &lt;br /&gt;
Now we will perform a G0W0 calculation to correct the DFT-LDA bandstructure. We assume that you are already familiar with the concept of screening needed to build up the GW self-energy and thus the QP corrections. Create a local folder &#039;&#039;My_inputs&#039;&#039; and generate the input for a G0W0 calculation within the plasmon-pole approximation using the following command: &lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA&lt;br /&gt;
 $ mkdir My_inputs&lt;br /&gt;
 $ yambo -p p -g n -V RL -F My_inputs/02_GW.in&lt;br /&gt;
However we also provide an input file with suggested parameters for this calculations inside the folder &#039;&#039;Solid_GaSb/Without_SOC/Yambo/Inputs&#039;&#039;. Remember: these parameters are system dependent and should be converged as you can see other GW tutorials (e.g. [[GW]] or [[GW convergence]]). Here we provide reasonable (but not fully converged) parameters to have a low computational cost but yet qualitatively meaningful results.&lt;br /&gt;
&lt;br /&gt;
The plane-waves cutoff for the wavefunctions and exchange part of the self-energy are set to 10 Ry. &lt;br /&gt;
 FFTGvecs =  10 Ry   # [FFT] Plane-waves&lt;br /&gt;
 EXXRLvcs=   10 Ry   # [XX] Exchange RL components&lt;br /&gt;
while we will use 40 bands, a plane-wave cut-off of 1 Ry, and a plasmon-pole energy of 20 eV to build up the screening matrix &lt;br /&gt;
 NGsBlkXp=    1 Ry  # [Xp] Response block size &lt;br /&gt;
 PPAPntXp= 20.  eV  # [Xp] PPA imaginary energy &lt;br /&gt;
 % BndsRnXp    &lt;br /&gt;
 1 | 40 |        # [Xp] Polarization function bands &lt;br /&gt;
 % &lt;br /&gt;
 % LongDrXp  &lt;br /&gt;
 1.000000 | 1.000000 | 1.000000 |        # [Xp] [cc] Electric Field &lt;br /&gt;
 %&lt;br /&gt;
The number of bands in the green function G to build up the GW self-energy is also 40 &lt;br /&gt;
 % GbndRnge    &lt;br /&gt;
 1 | 40 |                 # [GW] G[W] bands range &lt;br /&gt;
 %&lt;br /&gt;
with those parameters we will compute the correction only in the last 2 points of our grid, 28 and 29 and for the states from 3 to 6, setting the input variable &lt;br /&gt;
 %QPkrange                      &lt;br /&gt;
 28 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
As you can verify from your &#039;&#039;r-01_init_setup&#039;&#039; file 28 and 29 are the L and the Gamma point of the Brillouin zone. &lt;br /&gt;
 *X* K [28] :-0.500000 -0.500000 -0.500000 (rlu) * Comp.s 476 * weight    0.0078   &lt;br /&gt;
 ...   &lt;br /&gt;
 *X* K [29] : 0.000000  0.000000  0.000000 (rlu)  * Comp.s 531 * weight    0.0020   &lt;br /&gt;
 ...&lt;br /&gt;
You can now run the code using either your input file or the one provided in the Inputs folder &lt;br /&gt;
 $ yambo -F ../Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
The run will take some time. Indeed the code has first to compute the dipoles, then the screening within the plasmon pole approximation and finally the self-energy, first the exchange part Gv and then the correlation part G(W-v). &lt;br /&gt;
In the &amp;lt;code&amp;gt;GW_out&amp;lt;/code&amp;gt; folder you will find the &amp;lt;code&amp;gt;o-GW.qp&amp;lt;/code&amp;gt; file containing the GW corrections.&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &lt;br /&gt;
 #&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #&lt;br /&gt;
  ...&lt;br /&gt;
  29.00000    4.00000    0.00000    0.22802    1.07276&lt;br /&gt;
  29.00000    5.00000    0.33228    0.66303   -2.39219&lt;br /&gt;
  ...&lt;br /&gt;
Thus it is about 0.66-0.23=0.43 eV (not fully converged).&lt;br /&gt;
&lt;br /&gt;
We can also compute the G0W0 correction for all the k-point of the database. To this end open the input file &#039;&#039;../Inputs/02_GW.in&#039;&#039; (or your own) and edit the number of k-point to be computed &lt;br /&gt;
 %&lt;br /&gt;
 QPkrange                      1 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
If you have learned how to run the code in parallel you may also set the parallel environment input variables:&lt;br /&gt;
 X_all_q_CPU= &amp;amp;quot;2&amp;amp;quot;              # [PARALLEL] CPUs for each role &lt;br /&gt;
 X_all_q_ROLEs= &amp;amp;quot;q&amp;amp;quot;            # [PARALLEL] CPUs roles (q,k,c,v) &lt;br /&gt;
 SE_CPU= &amp;amp;quot;2&amp;amp;quot;                   # [PARALLEL] CPUs for each role &lt;br /&gt;
 SE_ROLEs= &amp;amp;quot;q&amp;amp;quot;                 # [PARALLEL] CPUs roles (q,qp,b)&lt;br /&gt;
Remember to use the same name after the -J option, so that the code will be able to use the informations from the previous run and avoid many calculations. &lt;br /&gt;
 $ mpirun -np 2 yambo -F Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
In the &#039;&#039;GW_out&#039;&#039; folder you will find now also the &#039;&#039;o-GW.qp_01&#039;&#039; file containg the GW corrections for all the k-points.&lt;br /&gt;
&lt;br /&gt;
Now you can enter the folder of the 4x4x4 shifted grid&lt;br /&gt;
 cd Solid_GaSb/With_SOC/Yambo/4x4x4_shifted+GAMMA&lt;br /&gt;
and repeat the same calculations. Remember that in the input file you will generate you should change all the band ranges doubling the number of states (do you understand why?) &lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
    1 | 80 |        # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
    1 | 80 |        # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 % QPkrange&lt;br /&gt;
   29 | 29 |   5 | 12|  # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band.&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #  &lt;br /&gt;
   ...   &lt;br /&gt;
   29.00000    8.00000    0.00000    0.21758    0.95843&lt;br /&gt;
   29.00000    9.00000    0.06025    0.65362   -2.36544&lt;br /&gt;
   ...&lt;br /&gt;
Thus it is about 0.65-0.22=0.43 eV (not fully converged). Indeed the same result obtained without SOC. The resulting electronic gap is about 0.46 eV reasonably close to the experimental band gap of 0.72 eV. It is also a big improvment compared to the LDA band gap (less than 0.03 eV). This correction (indeed the slightly bigger value of 0.53 eV) will be used, in the form of a scissor operator, as a starting point to compute the optical spectra.&lt;br /&gt;
&lt;br /&gt;
Again we can also compute the G0W0 correction for all the k-point of the database. You can plot column 4 of the output file against column 3 to obtain a picture of the QP corrections. In the following figure we show the plot of the G0W0 correction (E_GoWo-E_LDA) vs the LDA eigenvalues. The corrections at the Gamma and the L point are marked with bigger red spots.&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=400px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_GoWo_corrections.png|GaSb QP corrections without SOC &lt;br /&gt;
Image:GaSb GoWo corrections SOC.png|GaSb GoWo corrections with SOC&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
[[File:SOC_GaSb_GoWo_corrections.png|500px|frameless|center]]&lt;br /&gt;
[[File:GaSb GoWo corrections SOC.png|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;scissor operator approach&amp;amp;quot; does not seem a very good approximation for GaSb. Indeed the quasi particle corrections are not constant, especially in the conduction band. For example the correction to the Gamma point is bigger than the corrections to all other k-points. This result however maybe due to the poor covergence parameters. If you would like to better investigate these results you should try do convergence tests. Since QP corrections are poorly sensitive to the spin-orbit interaction it is probably a good idea to do convergence without SOC.&lt;br /&gt;
&lt;br /&gt;
Here we also provide a plot of the band-structure at different levels of approximation: DFT, DFT+scissor, QP. The band structures are obtained from an interpolation of our k-points mesh and it is not very precise since, again, we are using a quite coarse sampling of the brillouine zone. Indeed we can see that already the interpolated DFT band structure deviates from the exact DFT band-structure, which has also been reported. In particular in the region nearby Gamma. However it gives quite nicely an overview of how the QP band structure compares with the DFT band stucture. The main effect is indeed an opening of the band-gap which can be described in terms of a scissor operator.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_yambo.png|500px|center|GaSb QP bands]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the optical properties of GaSb =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--{|&lt;br /&gt;
| [[File:SOC_GaSb_bands.png|600px|center|GaSb bands 1]]&lt;br /&gt;
| [[File:SOC_GaSb_absorption.png|600px|center|GaSb bands 2]]&lt;br /&gt;
|} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now turn our attention on the optical properties of the system. Here we will compute the dielectric function at different levels of approximations:&amp;lt;br /&amp;gt;&lt;br /&gt;
(i) at the IP-RPA level, thus using the Fermi golden rule with the KS energies and wave-functions&amp;lt;br /&amp;gt;&lt;br /&gt;
(ii) at the RPA level, thus also including the effect of the local fields&amp;lt;br /&amp;gt;&lt;br /&gt;
(iii) at the BSE level, thus including many-body effects, both correcting the KS energies (we will introduce a scissor obtained from the GW calculation) and considering the statically screened electron-hole interaction&lt;br /&gt;
&lt;br /&gt;
First, setup the calculation (initialization) in the usual way in the folder without SOC&lt;br /&gt;
 $ cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 $ yambo -J 01_init&lt;br /&gt;
and repeat the same inside the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; before continuing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;(to be finalized) The yambo code can also run simulations in the perturbative SOC approach. To this end first generate the SOC mapping database in the Without SOC folder following these instructions. After that you will be able to compute optical properties at all levels within the perturbative approach by linking the mapping database. We  will show below how to do that.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;(to be finalized) Finally, for the BSE run with SOC (and for the GW run?), it is also possible to solve the fully spinorial equations, but using the screening databases computed without SOC. In the BSE (and GW?) runs we will discuss how to do that.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RPA-IP absorption ==&lt;br /&gt;
&lt;br /&gt;
Create a local folder inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; which you will call &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt;, and create the input file:&lt;br /&gt;
 &amp;gt;cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o c -V RL -F My_inputs/03_IP-RPA.in&lt;br /&gt;
&lt;br /&gt;
As before, we also provide an input file with suggested parameters for this calculations. The kind of calculation is controlled by the input variable&lt;br /&gt;
 Chimod= &amp;quot;IP&amp;quot;                 # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1            RL    # [Xd] Response block size&lt;br /&gt;
These tells you that we are building up the dielectric function in G-space considering only on G vector, i.e. the G=0 component. The string Chimod= &amp;amp;quot;IP&amp;amp;quot; recalls us that this means we are neglecting the local fields effect.&lt;br /&gt;
&lt;br /&gt;
We set the plane-waves cutoff for the wavefunctions to&lt;br /&gt;
 FFTGvecs=  10  Ry   # [FFT] Plane-waves&lt;br /&gt;
Since we are interested into the optical spectrum calculation, only the Q=0 term, i.e. the first Q-point, is calculated&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
The number of bands we use is 20. This is a reasonable number of states to converge the IP-RPA optical spectrum in the VIS-UV range. (If you wish to calculate the EELS spectrum for q different from 0 probably more bands will be required.)&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 10 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
As you learned the dielectric function is a tensor and in principle three calculations for light polarized along x,y,z chould be done depending on the experimental setup. However GaSb is a system with cubic symmetry, thus any direction is equivalent. Here we decide to compute epsilon along the &amp;amp;quot;(1 1 1)&amp;amp;quot; direction.&lt;br /&gt;
 % LongDrXd&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation using either your input file or the one provided in the Inputs folder&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/03_IP-RPA.in  -J 03_IP-RPA -C 03_IP-RPA_out&lt;br /&gt;
&lt;br /&gt;
Inside the &amp;lt;code&amp;gt;03_IP-RPA&amp;lt;/code&amp;gt; folder you will find the databases created by the code (in this case just the dipoles), while in the &amp;lt;code&amp;gt;03_IP-RPA_out&amp;lt;/code&amp;gt; the report file and the output files for the dielectric function which describes the absorption (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;) and for its inverse (&amp;lt;code&amp;gt;o-03_IP-RPA.eel*&amp;lt;/code&amp;gt;), which describes the electron energy loss. You can plot them with your favorite software (for example gnuplot or xmgrace). The real and imaginary parts of the IP-RPA dielectric function are column 3 and 2 respectively of the file (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;). Using also the reference output file in the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; folder you can compare the spectrum with and without SOC.&lt;br /&gt;
&lt;br /&gt;
Now repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 20 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.jpg|600px|center|GaSb absorption RPA]]&lt;br /&gt;
If you wish to obtain a reasonable spectrum however the 6x6x6 kpts grid is not enough. In order to check the convergence with the number of k-points you should run the same kind of calculations on other k-points meshes, either using the ones we provided ot creating new ones using the input files in the Pwscf folder (see section [[more.php|More on GaSb]] for more advanced calculations).&lt;br /&gt;
&lt;br /&gt;
In the directories Reference_Outputs several RPA dielectric functions are saved with the dielectric function calculated with the 10x10x10 and the 14x14x14 k-grid. You will learn that within RPA spectra the lowest energy peak is under-estimated. Also the spectra with and without SOC look very similar and the SO splitting is almost not present. This is clearly due to the excitonic nature of the E1 peak which can be correctly described only including the electron-hole interaction.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== RPA absorption with local fieldds ==&lt;br /&gt;
&lt;br /&gt;
To also include the local fields effect you can generate the input with the command: &lt;br /&gt;
 &amp;gt;yambo -o c -k hartree -F My_inputs/04_RPA_LF.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
In the input file we provide you will see that now the chimod and size of the dynamical matrix are set to&lt;br /&gt;
 Chimod= &amp;amp;quot;Hartree&amp;amp;quot;       # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1       Ry    # [Xd] Response block size&lt;br /&gt;
&lt;br /&gt;
Including local fields the poles of absorption will move from KS transitions to many-electrons transitions (although we are still neglecting the electron-hole interaction). As a result you will need more states to converge the absorption spectrum. This is why we set the number of bands to 15:&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 15 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
while as before we will have&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 %&lt;br /&gt;
 LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/04_RPA_LF.in -J 04_RPA_LF -C 04_RPA_LF_out&lt;br /&gt;
&lt;br /&gt;
In the 04_RPA+LF_out folder you will fine the report and the output files as before. The real and imaginary parts of the RPA+LF dielectric function with local fields are column 3 and 2 respectively of the .eps file. While the corresponding IP-RPA spectra is reported in columns 5 and 4.&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 30 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
In the following picture we compare the result of IP-RPA and RPA+LF with SOC.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA_IP_vs_LF.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== BSE absorption with QP corrections ==&lt;br /&gt;
&lt;br /&gt;
A more detailed description of BSE in Yambo is available in the following tutorial: &lt;br /&gt;
[https://wiki.yambo-code.eu/wiki/index.php?title=Calculating%20optical%20spectra%20including%20excitonic%20effects:%20a%20step-by-step%20guide BSE in hBN].&lt;br /&gt;
&lt;br /&gt;
=== Static Screening ===&lt;br /&gt;
&lt;br /&gt;
First we need to obtain the static screening. &lt;br /&gt;
&lt;br /&gt;
This can be done using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s My_inputs/05_screening.in&lt;br /&gt;
&lt;br /&gt;
In the resulting input file you can also see the parameters used to compute the static dielectric function needed for the screened Coulomb term (W) of the BSE kernel. Here we use 20 bands and an energy cut-off of 1 Ry.&lt;br /&gt;
&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 20 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 1            Ry    # [Xs] Response block size&lt;br /&gt;
&lt;br /&gt;
Remember to double the number of bands for the case with spin-oribit coupling included. &lt;br /&gt;
&lt;br /&gt;
Then run the file &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F My_inputs/05_screening.in -J screening -C screening&lt;br /&gt;
&lt;br /&gt;
=== BS Kernel and Solver ===&lt;br /&gt;
&lt;br /&gt;
Now we build the BS kernel, and specify the BS kernel solver. Overview of the BSE solvers is available using the following link: [[BSE solvers overview]]. In this tutorial we will use Haydock solver because it is computationally cheaper.&lt;br /&gt;
&lt;br /&gt;
As you probably know the inclusion of the electron-hole interaction makes the approach in G space not feasible. We have thus to compute the dielectric function in the electron-hole space, building up the excitonic hamiltonian. Thus to create the input file you can run the command:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y h -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder. As before you, in the directory Inputs, you can find an example with suggested parameters. The plane-wave cutoffs used to expand wavefunctions is set to 10 Ry, the cut-off on the exchange interaction between the electron and the hole (i.e. for the local-fields) is set to 10 Ry (here we use a much higer value compared to the previous run since the computational cost of increasing this variable in the electron-hole space is very low). and, finally, the cut-off on the direct electron-hole interaction is set to 1 Ry (to build up this term, where the interaction is screened, we need to compute the static dielectric constant in G-space, thus increasing this value is computationally demanding).&lt;br /&gt;
 FFTGvecs= 10     Ry    # [FFT] Plane-waves&lt;br /&gt;
 BSENGexx= 10     Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=  1     Ry    # [BSK] Screened interaction block size&lt;br /&gt;
&lt;br /&gt;
The input variable &amp;amp;quot;KfnQP_E&amp;amp;quot; can be used to include a scissor operator, i.e a opening of the DFT band gap. The value 0.53 eV is the coverged correction at Gamma obtained in the GW run. Here we will calculate the BSE assuming that the &amp;amp;quot;scissor operator approximation&amp;amp;quot; is valid for GaSb (to be checked in principle!) .&lt;br /&gt;
&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 0.530000 &amp;lt;/span&amp;gt; | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
To build up the excitonic matrix we consider the states from 5 to 12, i.e. we are using 4 occupied and 4 unoccupied bands.&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and we will build up the dielectric function using a grid of 200 point in frequency space&lt;br /&gt;
 BEnSteps= 200                # [BSS] Energy steps&lt;br /&gt;
Finally, similarly as before, we will have&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
Remember that the BS kernel is written in the electron-hole space and its size is given by the relation&amp;lt;br /&amp;gt;&lt;br /&gt;
BS kernel size = Valence Bands × Conduction Bands × K-points in the whole BZ.&amp;lt;br /&amp;gt;&lt;br /&gt;
This means that in the case with SO we are building up a matrix 2x2=4 times larger of the corresponding calculation without spin-orbit (you can compare the input in With_SO/Yambo/Inputs / Without_SO/Yambo/Inputs and reference outputs in With_SO/Yambo/Reference_Outputs / With_SO/Yambo/Reference_Outputs)&lt;br /&gt;
&lt;br /&gt;
We are ready to run the BSE calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J &amp;quot;05_BSE,screening&amp;quot; -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
We specify to Yambo the folder which contains calculated static screening, and in &amp;lt;code&amp;gt;05_BSE_out&amp;lt;/code&amp;gt; the two response files &amp;lt;code&amp;gt; o-05_BSE.eel_q1_haydock_bse &amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-05_BSE.eps_q1_haydock_bse&amp;lt;/code&amp;gt; can be found. In the &#039;&#039;eps file&#039;&#039; the real and imaginary parts of the BSE dielectric function are column 3 and 2 respectively, while the corresponding GW spectra are column 5 and 4.&lt;br /&gt;
&lt;br /&gt;
In the folder &amp;lt;code&amp;gt;screening&amp;lt;/code&amp;gt; you will find instead the DBs of the static screening (W) needed to build up the BSE kernel (&amp;lt;code&amp;gt;ndb.em1s&amp;lt;/code&amp;gt;) and in the folder &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; the BSE matrix (&amp;lt;code&amp;gt;ndb.BS*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 40 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   5 | 12 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
If you do the corresponding calculations for the case without spin-orbits using the databases in the directory GaSb_nSO/YAMBO and inputs in GaSb_nSO/Inputs, the two BSE spectra should look like in this figure:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE_few_kpts.jpg|500px|center|GaSb absorption BSE gew kpts]]&lt;br /&gt;
As mentioned before the two spectra present spurious peaks ( as the first peak!) due to uncoverged k-point sampling. Nevertheless the splitting due to spin-orbit interaction is already visible in the peak around 2.1 eV.&lt;br /&gt;
A more converged (yet not fully converged calculation) would give the following results which compares very nicely with the experimental data:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE.png|500px|center|GaSb absorption BSE]]&lt;br /&gt;
&lt;br /&gt;
=== More on Static Screening === &lt;br /&gt;
&lt;br /&gt;
Additionally, a BSE run for the spin-orbit coupling case can be done using the screening computed for the case without spin-orbit coupling. &lt;br /&gt;
&lt;br /&gt;
To do it we can make a symlink from the no-SOC folder:&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt; cd Path/GaSb/With_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt; ln -s Path/GaSb/Without_SOC/YAMBO/6x6x6_shifted/screening screening_no_soc&lt;br /&gt;
&lt;br /&gt;
The BSE kernel can be build and solved using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s -o b -k sex -y h -V qp -F 06_BSE_using_nosoc_screening.in&lt;br /&gt;
&lt;br /&gt;
Here we combined the screening part (-X s) and BSE part (-o b -k sex -y h -V qp). All of the input parameters have been discussed previously. Although, it is important to keep the right matching behind the screening bands used for the no SOC and SOC case.&lt;br /&gt;
&lt;br /&gt;
If for the SOC case the specified screening bands are n1, n2 then for the no-SOC screening the bands should be ((n1-1)/2+1, n2/2). &lt;br /&gt;
&lt;br /&gt;
 # No SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   3 | 20 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and &lt;br /&gt;
 # SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   5 | 40 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The results for the BSE solved using screening used from SOC and no SOC databases is presented below. As we can see, there is almost no difference between them. &lt;br /&gt;
&lt;br /&gt;
[[File:GaSb screening w and wo soc.png|600px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
= Exciton analysis =&lt;br /&gt;
&lt;br /&gt;
In this part of the tutorial we show how to analyze the origin of the E1 peak in GaSb. Since the calculation with the SOC case is very demanding we will do that only for the case without SOC. So first of all enter the &lt;br /&gt;
&amp;lt;code&amp;gt;Without_SOC/YAMBO/6x6x6_shifted&amp;lt;/code&amp;gt; folder and, if you didn&#039;t before, run the setup:&lt;br /&gt;
 &amp;gt;cd Without_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt;ls SAVE&lt;br /&gt;
 &amp;gt;yambo -J 01_init&lt;br /&gt;
 &amp;gt;ls SAVE r-01_init_setup&lt;br /&gt;
&lt;br /&gt;
Similar to previous section we need to compute the static screening first, and then solve the BSE equation.&lt;br /&gt;
This time we will use the full diagonalization solver to calculate all exciton energies and composition in terms of electron-hole pairs. See [[BSE solvers overview]] for more details. &lt;br /&gt;
&lt;br /&gt;
Then create the &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; folder and the input file for a BSE&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -X s -F My_inputs/05_screening.in&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_screening.in -J screening -C screening &lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y d -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the same parameters you used to compute the absorption with SOC previously. The number of bands will be the half of the case without SOC&lt;br /&gt;
 % BSEBands&lt;br /&gt;
  3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
Also this time you will use the to &amp;lt;code&amp;gt;&amp;amp;quot;d&amp;amp;quot;&amp;lt;/code&amp;gt; and uncomment the variable needed to Write to disk excitonic the WFs:&lt;br /&gt;
 BSSmod= &amp;amp;quot;d&amp;amp;quot;              # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft`&lt;br /&gt;
 WRbsWF                   # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
Then you have to run the BSE calculation (notice that, in case you already computed the BSE spectrum also for the case without SOC, the code can read the results from the provious BSE run skipping many steps)&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J 05_BSE -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; folder you will now find a new database file called &amp;lt;code&amp;gt;ndb.BS_diago_Q01&amp;lt;/code&amp;gt;. This is what you need to analyze the exciton peaks running the post-processing code ypp.&lt;br /&gt;
&lt;br /&gt;
First of all you can run:&lt;br /&gt;
 &amp;gt;ypp -e s -J 05_BSE -C BSE_out&lt;br /&gt;
This run will sort in energy the excitonic eigenvalues writing their oscillator strenghts (see &amp;lt;code&amp;gt;o-06_bse.exc_E_sorted&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Then you can create the ypp input required to analize how each excitonic state is build up in terms of single-particle states:&lt;br /&gt;
 &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE&lt;br /&gt;
Put the index &amp;lt;code&amp;gt;#N&amp;lt;/code&amp;gt; of the exciton with higher strenght in the E_1 peak region&lt;br /&gt;
 &amp;gt;ypp -F My_inputs/05_BSE_ypp.in -J 05_BSE -C 06_BSE_out&lt;br /&gt;
You will find the two files &amp;lt;code&amp;gt;o-06_bse.exc_weights_at_#N&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-06_bse.exc_amplitude_at_#N&amp;lt;/code&amp;gt;. In these files you will find informations on the highest strenght exciton in the E1 peak region.&lt;br /&gt;
&lt;br /&gt;
= Perturbative SOC approach =&lt;br /&gt;
&lt;br /&gt;
It is possible to include the spin-orbit coupling perturbatively in Yambo.&lt;br /&gt;
&lt;br /&gt;
To first order the perturbation just gives a correction to the DFT eigenvalues and does not touch the wave–functions. Numerically the perturbation need to be applied by mapping the solution of the DFT calculation without SOC into the solution of the DFT calculation with SOC. Once a mapping is defined, the SOC perturbation could be directly applied to the KS energies before solving both the GW scheme and/or the BSE.&lt;br /&gt;
&lt;br /&gt;
All we need is to computed a SOC mapping database given by the following equation (eq 68 in the referenced paper):&lt;br /&gt;
&lt;br /&gt;
EQUATION &lt;br /&gt;
&lt;br /&gt;
Where x, y, z are ... &lt;br /&gt;
&lt;br /&gt;
To build this map, in the folder without spin-orbit coupling we do the following:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; cd Solid_GaSb/Without_SOC/Yambo/6x6xWi6_shifted&lt;br /&gt;
 &amp;gt; mkdir SOC_DBs&lt;br /&gt;
 &amp;gt; cp -r Path/SAVE_GaSb_k6_w_soc SOC_DBs/SAVE&lt;br /&gt;
 &amp;gt; ypp -w &lt;br /&gt;
 &amp;gt; ypp -F map_wfs.in -J SOC_map -C SOC_map&lt;br /&gt;
&lt;br /&gt;
With the following input for &amp;lt;code&amp;gt;map_wfs.in&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 WFs_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 WFs_SOC_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 SOC_DBs= &amp;quot;SOC_DBs&amp;quot;        # Path to the folder containing the DB with SOC&lt;br /&gt;
 SOC_splitting= 0.01 eV    # SOC splitting between the levels&lt;br /&gt;
 % bands_to_map&lt;br /&gt;
   7 | 12 |                # Number of bands to map&lt;br /&gt;
 %&lt;br /&gt;
 bands_buffer=1&lt;br /&gt;
&lt;br /&gt;
Where the SAVE folder with spin-orbit coupling should be saved in a separate folder, and in this case it is in the &amp;lt;code&amp;gt; SOC_DBs &amp;lt;/code&amp;gt; folder. &lt;br /&gt;
Then, the BSE can be computed using the following command &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F 05_BSE+scissor.in -J &amp;quot;BSE_soc_perturbative,screening,SOC_map&amp;quot; -C BSE_soc_perturbative&lt;br /&gt;
&lt;br /&gt;
Where screening was precomputed, and the SOC_map is the one generated in this section. Check BSE section for more details on setting a BSE calculation.&lt;br /&gt;
Not converged results are presented below. &lt;br /&gt;
[[File:GaSb perturbative soc 1.png|600px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
= Other excercises =&lt;br /&gt;
&lt;br /&gt;
# Try to converge the G0W0 increasing the polarization RL size, the polarization bands, the number of bands in the Green function and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Try to converge the absorption spectra increasing the polarization RL size, the polarization bands, the number of bands to construct the excitonic matrix and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Plot the EELS spectrum obtained within IP-RPA and RPA with local fields. Also in this case you can check the effect of increasing the polarization bands. You may also try to do a resonant only calculation to see that the EELS cannot be described using only the resonant part of the response function.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;&amp;gt;M. Marsili, A. Molina-Sánchez, M. Palummo, D. Sangalli, A. Marini, [https://doi.org/10.1103/PhysRevB.103.155152  Phys. Rev. B &#039;&#039;&#039;103&#039;&#039;&#039;, 155152 (2021)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wiki&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Gallium_antimonide GaSb on wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;spin_orbit_interaction_wiki&amp;quot;&amp;gt; [https://en.wikipedia.org/wiki/Spin%E2%80%93orbit_interaction#In_atomic_energy_levels Spin-Orbit Interaction on Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kim&amp;quot;&amp;gt; Y.S. Kim et al. Phys. Rev. B &#039;&#039;&#039;82&#039;&#039;&#039;, 205212 (2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;rem&amp;quot;&amp;gt; I. N. Remediakis and Efthimios Kaxiras Phys. Rev. B &#039;&#039;&#039;59&#039;&#039;&#039;, 5336 (1999).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8959</id>
		<title>SOC</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8959"/>
		<updated>2025-08-24T14:25:50Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* Effect of spin-orbit interaction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Effect of spin-orbit interaction =&lt;br /&gt;
&lt;br /&gt;
Spin–orbit coupling (SOC) is a relativistic interaction between an electron’s spin and its orbital motion in the crystal potential. Presently, SOC can be included withing GW-BSE approach either perturbatively, or fully, considering the spinorial nature of the electronic wave-function. In this tutorial, we will use both approaches. More details on the theory and comparison between full spinorial GW-BSE and perturbative approach to SOC can be found in the following paper [https://arxiv.org/pdf/2103.02266 Phys. Rev. B 103, 155152. ]&lt;br /&gt;
&lt;br /&gt;
To include the spin-orbit coupling we start with many–body total Hamiltonian of the system including first order relativistic corrections. &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 1 many body rel hamiltonian.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where, &amp;lt;math&amp;gt;\hat{H}^{0}&amp;lt;/math&amp;gt; is the non-relativistic one body hamiltonian, &amp;lt;math&amp;gt;\hat{H}^{(e-e)}&amp;lt;/math&amp;gt; is the e-e Coulomb interaction, and &amp;lt;math&amp;gt;\hat{H}^{(RK)} + \hat{H}^{(SOI)}&amp;lt;/math&amp;gt; are the first order relativistic correction, and the last term is the spin-orbit interaction (SOI) in which we are interested in this tutorial. &lt;br /&gt;
&lt;br /&gt;
The SOI term itself is composed of three different components, &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 2 soi term.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;math&amp;gt;\hat{H}^{SO(2e)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{H}^{SOO}&amp;lt;/math&amp;gt; are many-body terms, called &amp;quot;two-electron spin-orbit&amp;quot;, and &amp;quot;spin-other-orbit&amp;quot;, respectively. And,  &amp;lt;math&amp;gt; \hat{H}^{(SOI)} = \hat{H}^{SO(N)} &amp;lt;/math&amp;gt; is &amp;quot;one electron spin-orbit&amp;quot; is a one body term, which is given by: &lt;br /&gt;
&lt;br /&gt;
[[File:Soc tutorial eq 3 one electron spin orbit.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;math&amp;gt;\underline{\nu}&amp;lt;/math&amp;gt; a 2x2 matrix in the &amp;lt;math&amp;gt;\uparrow&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\downarrow&amp;lt;/math&amp;gt; spin space.&lt;br /&gt;
&lt;br /&gt;
= Introduction = &lt;br /&gt;
&lt;br /&gt;
The scope of this tutorial is to calculate the G0W0 corrections to the DFT-LDA band-structure and the BSE optical spectrum for a bulk semiconducting material, gallium antimonide (GaSb) &amp;lt;ref name=&amp;quot;wiki&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;kim&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;rem&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;. We will compare the results with and without the spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DFT band structure =&lt;br /&gt;
&lt;br /&gt;
For this tutorial we provide two state (GS) databases (DBs), one contains the GS-DBs with the effect of SOC included and one without. The idea is to repeat the same calculation for both database and compare the results and the performances of the code. GaSb input files can be downloaded from the following link [https://media.yambo-code.eu/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz], and can be unarchived using the following command: &lt;br /&gt;
&lt;br /&gt;
 $ tar -xzf GaSb.tar.gz&lt;br /&gt;
&lt;br /&gt;
As in other tutorials you can find the folder containing the input files for the pwscf code (PWSCF, in case you prefer to generate the GS-DBs by yourself) and the folder containing the GS-DBs, the reference input files and the reference output files for the yambo code (YAMBO). Instead of continuously jumping back and forth from the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;With_SOC&amp;lt;/code&amp;gt; folder we advice to open two terminals and keep one for the without SOC case and another for the with SOC case.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s have a look to the content of the folders. For example we can enter in the &amp;lt;code&amp;gt;GaSb/With_SOC/&amp;lt;/code&amp;gt; folder &lt;br /&gt;
 $ cd GaSb/With_SOC/&lt;br /&gt;
 $ ls Pwscf YAMBO&lt;br /&gt;
 $ cd YAMBO&lt;br /&gt;
 $ ls 4x4x4_shifted+GAMMA &lt;br /&gt;
 6x6x6_shifted  10x10x10_shifted 14x14x14_shifted   Inputs  Reference_Outputs&lt;br /&gt;
&lt;br /&gt;
Inside the YAMBO folder there are indeed four folders corresponding to four different k-points meshes. In this tutorial we will use the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; folder for the computation of the QP corrections within the GoWo approximation. It is a k-points grid obtained as the sum of a 4x4x4 k-points grid centered in Gamma and a 4x4x4 grid shifted. Instead for the computation of the optical properties we will use the &amp;lt;code&amp;gt;6x6x6_shifted&amp;lt;/code&amp;gt; folder. It is a 6x6x6 k-points grid shifted from Gamma. The other two folders, &amp;lt;code&amp;gt;10x10x10_shifted&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;14x14x14_shifted&amp;lt;/code&amp;gt; can be used to do a minimum convergence of the optical properties against the number of k-points (pay attention that the BSE calculations with bigger grids will be very memory and time demanding!).&lt;br /&gt;
&lt;br /&gt;
The first part of the tutorial is on the computation of the QP corrections. So let&#039;s enter the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; grid and, as seen in other tutorials run the Initialization:&lt;br /&gt;
&lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA/ &lt;br /&gt;
 $ yambo -J 01_init &lt;br /&gt;
Now compare the result of the two setup runs.&lt;br /&gt;
&lt;br /&gt;
With_SOC case:&lt;br /&gt;
&amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  5.046557&lt;br /&gt;
  VBM / CBm          [ev]:   0.00000   0.06025&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0008               0009-0200&lt;br /&gt;
  Indirect Gaps      [ev]:  0.06025   3.57546&amp;lt;/pre&amp;gt;&lt;br /&gt;
Without_SOC case:&lt;br /&gt;
 &amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  4.777401&lt;br /&gt;
  VBM / CBm          [ev]:  0.000000  0.332282&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0004               0005-0100&lt;br /&gt;
  Indirect Gaps      [ev]: 0.332282  3.620628&lt;br /&gt;
  Direct Gaps        [ev]: 0.332282  7.137342&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A clear shrink of the DFT-LDA gap due to spin-orbit occurs. Note that, having 8 electrons in the fundamental cell, due to the spinorial nature of the wavefunction, with SOC we have 8 occupied bands, while only 4 without. Here a picture of the DFT band structure for the two cases.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_pwscf.png|500px|center|GaSb bands DFT]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the band structure of GaSb =&lt;br /&gt;
 &lt;br /&gt;
Now we will perform a G0W0 calculation to correct the DFT-LDA bandstructure. We assume that you are already familiar with the concept of screening needed to build up the GW self-energy and thus the QP corrections. Create a local folder &#039;&#039;My_inputs&#039;&#039; and generate the input for a G0W0 calculation within the plasmon-pole approximation using the following command: &lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA&lt;br /&gt;
 $ mkdir My_inputs&lt;br /&gt;
 $ yambo -p p -g n -V RL -F My_inputs/02_GW.in&lt;br /&gt;
However we also provide an input file with suggested parameters for this calculations inside the folder &#039;&#039;Solid_GaSb/Without_SOC/Yambo/Inputs&#039;&#039;. Remember: these parameters are system dependent and should be converged as you can see other GW tutorials (e.g. [[GW]] or [[GW convergence]]). Here we provide reasonable (but not fully converged) parameters to have a low computational cost but yet qualitatively meaningful results.&lt;br /&gt;
&lt;br /&gt;
The plane-waves cutoff for the wavefunctions and exchange part of the self-energy are set to 10 Ry. &lt;br /&gt;
 FFTGvecs =  10 Ry   # [FFT] Plane-waves&lt;br /&gt;
 EXXRLvcs=   10 Ry   # [XX] Exchange RL components&lt;br /&gt;
while we will use 40 bands, a plane-wave cut-off of 1 Ry, and a plasmon-pole energy of 20 eV to build up the screening matrix &lt;br /&gt;
 NGsBlkXp=    1 Ry  # [Xp] Response block size &lt;br /&gt;
 PPAPntXp= 20.  eV  # [Xp] PPA imaginary energy &lt;br /&gt;
 % BndsRnXp    &lt;br /&gt;
 1 | 40 |        # [Xp] Polarization function bands &lt;br /&gt;
 % &lt;br /&gt;
 % LongDrXp  &lt;br /&gt;
 1.000000 | 1.000000 | 1.000000 |        # [Xp] [cc] Electric Field &lt;br /&gt;
 %&lt;br /&gt;
The number of bands in the green function G to build up the GW self-energy is also 40 &lt;br /&gt;
 % GbndRnge    &lt;br /&gt;
 1 | 40 |                 # [GW] G[W] bands range &lt;br /&gt;
 %&lt;br /&gt;
with those parameters we will compute the correction only in the last 2 points of our grid, 28 and 29 and for the states from 3 to 6, setting the input variable &lt;br /&gt;
 %QPkrange                      &lt;br /&gt;
 28 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
As you can verify from your &#039;&#039;r-01_init_setup&#039;&#039; file 28 and 29 are the L and the Gamma point of the Brillouin zone. &lt;br /&gt;
 *X* K [28] :-0.500000 -0.500000 -0.500000 (rlu) * Comp.s 476 * weight    0.0078   &lt;br /&gt;
 ...   &lt;br /&gt;
 *X* K [29] : 0.000000  0.000000  0.000000 (rlu)  * Comp.s 531 * weight    0.0020   &lt;br /&gt;
 ...&lt;br /&gt;
You can now run the code using either your input file or the one provided in the Inputs folder &lt;br /&gt;
 $ yambo -F ../Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
The run will take some time. Indeed the code has first to compute the dipoles, then the screening within the plasmon pole approximation and finally the self-energy, first the exchange part Gv and then the correlation part G(W-v). &lt;br /&gt;
In the &amp;lt;code&amp;gt;GW_out&amp;lt;/code&amp;gt; folder you will find the &amp;lt;code&amp;gt;o-GW.qp&amp;lt;/code&amp;gt; file containing the GW corrections.&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &lt;br /&gt;
 #&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #&lt;br /&gt;
  ...&lt;br /&gt;
  29.00000    4.00000    0.00000    0.22802    1.07276&lt;br /&gt;
  29.00000    5.00000    0.33228    0.66303   -2.39219&lt;br /&gt;
  ...&lt;br /&gt;
Thus it is about 0.66-0.23=0.43 eV (not fully converged).&lt;br /&gt;
&lt;br /&gt;
We can also compute the G0W0 correction for all the k-point of the database. To this end open the input file &#039;&#039;../Inputs/02_GW.in&#039;&#039; (or your own) and edit the number of k-point to be computed &lt;br /&gt;
 %&lt;br /&gt;
 QPkrange                      1 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
If you have learned how to run the code in parallel you may also set the parallel environment input variables:&lt;br /&gt;
 X_all_q_CPU= &amp;amp;quot;2&amp;amp;quot;              # [PARALLEL] CPUs for each role &lt;br /&gt;
 X_all_q_ROLEs= &amp;amp;quot;q&amp;amp;quot;            # [PARALLEL] CPUs roles (q,k,c,v) &lt;br /&gt;
 SE_CPU= &amp;amp;quot;2&amp;amp;quot;                   # [PARALLEL] CPUs for each role &lt;br /&gt;
 SE_ROLEs= &amp;amp;quot;q&amp;amp;quot;                 # [PARALLEL] CPUs roles (q,qp,b)&lt;br /&gt;
Remember to use the same name after the -J option, so that the code will be able to use the informations from the previous run and avoid many calculations. &lt;br /&gt;
 $ mpirun -np 2 yambo -F Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
In the &#039;&#039;GW_out&#039;&#039; folder you will find now also the &#039;&#039;o-GW.qp_01&#039;&#039; file containg the GW corrections for all the k-points.&lt;br /&gt;
&lt;br /&gt;
Now you can enter the folder of the 4x4x4 shifted grid&lt;br /&gt;
 cd Solid_GaSb/With_SOC/Yambo/4x4x4_shifted+GAMMA&lt;br /&gt;
and repeat the same calculations. Remember that in the input file you will generate you should change all the band ranges doubling the number of states (do you understand why?) &lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
    1 | 80 |        # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
    1 | 80 |        # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 % QPkrange&lt;br /&gt;
   29 | 29 |   5 | 12|  # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band.&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #  &lt;br /&gt;
   ...   &lt;br /&gt;
   29.00000    8.00000    0.00000    0.21758    0.95843&lt;br /&gt;
   29.00000    9.00000    0.06025    0.65362   -2.36544&lt;br /&gt;
   ...&lt;br /&gt;
Thus it is about 0.65-0.22=0.43 eV (not fully converged). Indeed the same result obtained without SOC. The resulting electronic gap is about 0.46 eV reasonably close to the experimental band gap of 0.72 eV. It is also a big improvment compared to the LDA band gap (less than 0.03 eV). This correction (indeed the slightly bigger value of 0.53 eV) will be used, in the form of a scissor operator, as a starting point to compute the optical spectra.&lt;br /&gt;
&lt;br /&gt;
Again we can also compute the G0W0 correction for all the k-point of the database. You can plot column 4 of the output file against column 3 to obtain a picture of the QP corrections. In the following figure we show the plot of the G0W0 correction (E_GoWo-E_LDA) vs the LDA eigenvalues. The corrections at the Gamma and the L point are marked with bigger red spots.&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=400px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_GoWo_corrections.png|GaSb QP corrections without SOC &lt;br /&gt;
Image:GaSb GoWo corrections SOC.png|GaSb GoWo corrections with SOC&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
[[File:SOC_GaSb_GoWo_corrections.png|500px|frameless|center]]&lt;br /&gt;
[[File:GaSb GoWo corrections SOC.png|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;scissor operator approach&amp;amp;quot; does not seem a very good approximation for GaSb. Indeed the quasi particle corrections are not constant, especially in the conduction band. For example the correction to the Gamma point is bigger than the corrections to all other k-points. This result however maybe due to the poor covergence parameters. If you would like to better investigate these results you should try do convergence tests. Since QP corrections are poorly sensitive to the spin-orbit interaction it is probably a good idea to do convergence without SOC.&lt;br /&gt;
&lt;br /&gt;
Here we also provide a plot of the band-structure at different levels of approximation: DFT, DFT+scissor, QP. The band structures are obtained from an interpolation of our k-points mesh and it is not very precise since, again, we are using a quite coarse sampling of the brillouine zone. Indeed we can see that already the interpolated DFT band structure deviates from the exact DFT band-structure, which has also been reported. In particular in the region nearby Gamma. However it gives quite nicely an overview of how the QP band structure compares with the DFT band stucture. The main effect is indeed an opening of the band-gap which can be described in terms of a scissor operator.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_yambo.png|500px|center|GaSb QP bands]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the optical properties of GaSb =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--{|&lt;br /&gt;
| [[File:SOC_GaSb_bands.png|600px|center|GaSb bands 1]]&lt;br /&gt;
| [[File:SOC_GaSb_absorption.png|600px|center|GaSb bands 2]]&lt;br /&gt;
|} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now turn our attention on the optical properties of the system. Here we will compute the dielectric function at different levels of approximations:&amp;lt;br /&amp;gt;&lt;br /&gt;
(i) at the IP-RPA level, thus using the Fermi golden rule with the KS energies and wave-functions&amp;lt;br /&amp;gt;&lt;br /&gt;
(ii) at the RPA level, thus also including the effect of the local fields&amp;lt;br /&amp;gt;&lt;br /&gt;
(iii) at the BSE level, thus including many-body effects, both correcting the KS energies (we will introduce a scissor obtained from the GW calculation) and considering the statically screened electron-hole interaction&lt;br /&gt;
&lt;br /&gt;
First, setup the calculation (initialization) in the usual way in the folder without SOC&lt;br /&gt;
 $ cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 $ yambo -J 01_init&lt;br /&gt;
and repeat the same inside the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; before continuing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;(to be finalized) The yambo code can also run simulations in the perturbative SOC approach. To this end first generate the SOC mapping database in the Without SOC folder following these instructions. After that you will be able to compute optical properties at all levels within the perturbative approach by linking the mapping database. We  will show below how to do that.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;(to be finalized) Finally, for the BSE run with SOC (and for the GW run?), it is also possible to solve the fully spinorial equations, but using the screening databases computed without SOC. In the BSE (and GW?) runs we will discuss how to do that.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RPA-IP absorption ==&lt;br /&gt;
&lt;br /&gt;
Create a local folder inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; which you will call &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt;, and create the input file:&lt;br /&gt;
 &amp;gt;cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o c -V RL -F My_inputs/03_IP-RPA.in&lt;br /&gt;
&lt;br /&gt;
As before, we also provide an input file with suggested parameters for this calculations. The kind of calculation is controlled by the input variable&lt;br /&gt;
 Chimod= &amp;quot;IP&amp;quot;                 # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1            RL    # [Xd] Response block size&lt;br /&gt;
These tells you that we are building up the dielectric function in G-space considering only on G vector, i.e. the G=0 component. The string Chimod= &amp;amp;quot;IP&amp;amp;quot; recalls us that this means we are neglecting the local fields effect.&lt;br /&gt;
&lt;br /&gt;
We set the plane-waves cutoff for the wavefunctions to&lt;br /&gt;
 FFTGvecs=  10  Ry   # [FFT] Plane-waves&lt;br /&gt;
Since we are interested into the optical spectrum calculation, only the Q=0 term, i.e. the first Q-point, is calculated&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
The number of bands we use is 20. This is a reasonable number of states to converge the IP-RPA optical spectrum in the VIS-UV range. (If you wish to calculate the EELS spectrum for q different from 0 probably more bands will be required.)&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 10 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
As you learned the dielectric function is a tensor and in principle three calculations for light polarized along x,y,z chould be done depending on the experimental setup. However GaSb is a system with cubic symmetry, thus any direction is equivalent. Here we decide to compute epsilon along the &amp;amp;quot;(1 1 1)&amp;amp;quot; direction.&lt;br /&gt;
 % LongDrXd&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation using either your input file or the one provided in the Inputs folder&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/03_IP-RPA.in  -J 03_IP-RPA -C 03_IP-RPA_out&lt;br /&gt;
&lt;br /&gt;
Inside the &amp;lt;code&amp;gt;03_IP-RPA&amp;lt;/code&amp;gt; folder you will find the databases created by the code (in this case just the dipoles), while in the &amp;lt;code&amp;gt;03_IP-RPA_out&amp;lt;/code&amp;gt; the report file and the output files for the dielectric function which describes the absorption (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;) and for its inverse (&amp;lt;code&amp;gt;o-03_IP-RPA.eel*&amp;lt;/code&amp;gt;), which describes the electron energy loss. You can plot them with your favorite software (for example gnuplot or xmgrace). The real and imaginary parts of the IP-RPA dielectric function are column 3 and 2 respectively of the file (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;). Using also the reference output file in the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; folder you can compare the spectrum with and without SOC.&lt;br /&gt;
&lt;br /&gt;
Now repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 20 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.jpg|600px|center|GaSb absorption RPA]]&lt;br /&gt;
If you wish to obtain a reasonable spectrum however the 6x6x6 kpts grid is not enough. In order to check the convergence with the number of k-points you should run the same kind of calculations on other k-points meshes, either using the ones we provided ot creating new ones using the input files in the Pwscf folder (see section [[more.php|More on GaSb]] for more advanced calculations).&lt;br /&gt;
&lt;br /&gt;
In the directories Reference_Outputs several RPA dielectric functions are saved with the dielectric function calculated with the 10x10x10 and the 14x14x14 k-grid. You will learn that within RPA spectra the lowest energy peak is under-estimated. Also the spectra with and without SOC look very similar and the SO splitting is almost not present. This is clearly due to the excitonic nature of the E1 peak which can be correctly described only including the electron-hole interaction.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== RPA absorption with local fieldds ==&lt;br /&gt;
&lt;br /&gt;
To also include the local fields effect you can generate the input with the command: &lt;br /&gt;
 &amp;gt;yambo -o c -k hartree -F My_inputs/04_RPA_LF.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
In the input file we provide you will see that now the chimod and size of the dynamical matrix are set to&lt;br /&gt;
 Chimod= &amp;amp;quot;Hartree&amp;amp;quot;       # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1       Ry    # [Xd] Response block size&lt;br /&gt;
&lt;br /&gt;
Including local fields the poles of absorption will move from KS transitions to many-electrons transitions (although we are still neglecting the electron-hole interaction). As a result you will need more states to converge the absorption spectrum. This is why we set the number of bands to 15:&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 15 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
while as before we will have&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 %&lt;br /&gt;
 LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/04_RPA_LF.in -J 04_RPA_LF -C 04_RPA_LF_out&lt;br /&gt;
&lt;br /&gt;
In the 04_RPA+LF_out folder you will fine the report and the output files as before. The real and imaginary parts of the RPA+LF dielectric function with local fields are column 3 and 2 respectively of the .eps file. While the corresponding IP-RPA spectra is reported in columns 5 and 4.&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 30 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
In the following picture we compare the result of IP-RPA and RPA+LF with SOC.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA_IP_vs_LF.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== BSE absorption with QP corrections ==&lt;br /&gt;
&lt;br /&gt;
A more detailed description of BSE in Yambo is available in the following tutorial: &lt;br /&gt;
[https://wiki.yambo-code.eu/wiki/index.php?title=Calculating%20optical%20spectra%20including%20excitonic%20effects:%20a%20step-by-step%20guide BSE in hBN].&lt;br /&gt;
&lt;br /&gt;
=== Static Screening ===&lt;br /&gt;
&lt;br /&gt;
First we need to obtain the static screening. &lt;br /&gt;
&lt;br /&gt;
This can be done using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s My_inputs/05_screening.in&lt;br /&gt;
&lt;br /&gt;
In the resulting input file you can also see the parameters used to compute the static dielectric function needed for the screened Coulomb term (W) of the BSE kernel. Here we use 20 bands and an energy cut-off of 1 Ry.&lt;br /&gt;
&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 20 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 1            Ry    # [Xs] Response block size&lt;br /&gt;
&lt;br /&gt;
Remember to double the number of bands for the case with spin-oribit coupling included. &lt;br /&gt;
&lt;br /&gt;
Then run the file &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F My_inputs/05_screening.in -J screening -C screening&lt;br /&gt;
&lt;br /&gt;
=== BS Kernel and Solver ===&lt;br /&gt;
&lt;br /&gt;
Now we build the BS kernel, and specify the BS kernel solver. Overview of the BSE solvers is available using the following link: [[BSE solvers overview]]. In this tutorial we will use Haydock solver because it is computationally cheaper.&lt;br /&gt;
&lt;br /&gt;
As you probably know the inclusion of the electron-hole interaction makes the approach in G space not feasible. We have thus to compute the dielectric function in the electron-hole space, building up the excitonic hamiltonian. Thus to create the input file you can run the command:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y h -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder. As before you, in the directory Inputs, you can find an example with suggested parameters. The plane-wave cutoffs used to expand wavefunctions is set to 10 Ry, the cut-off on the exchange interaction between the electron and the hole (i.e. for the local-fields) is set to 10 Ry (here we use a much higer value compared to the previous run since the computational cost of increasing this variable in the electron-hole space is very low). and, finally, the cut-off on the direct electron-hole interaction is set to 1 Ry (to build up this term, where the interaction is screened, we need to compute the static dielectric constant in G-space, thus increasing this value is computationally demanding).&lt;br /&gt;
 FFTGvecs= 10     Ry    # [FFT] Plane-waves&lt;br /&gt;
 BSENGexx= 10     Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=  1     Ry    # [BSK] Screened interaction block size&lt;br /&gt;
&lt;br /&gt;
The input variable &amp;amp;quot;KfnQP_E&amp;amp;quot; can be used to include a scissor operator, i.e a opening of the DFT band gap. The value 0.53 eV is the coverged correction at Gamma obtained in the GW run. Here we will calculate the BSE assuming that the &amp;amp;quot;scissor operator approximation&amp;amp;quot; is valid for GaSb (to be checked in principle!) .&lt;br /&gt;
&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 0.530000 &amp;lt;/span&amp;gt; | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
To build up the excitonic matrix we consider the states from 5 to 12, i.e. we are using 4 occupied and 4 unoccupied bands.&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and we will build up the dielectric function using a grid of 200 point in frequency space&lt;br /&gt;
 BEnSteps= 200                # [BSS] Energy steps&lt;br /&gt;
Finally, similarly as before, we will have&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
Remember that the BS kernel is written in the electron-hole space and its size is given by the relation&amp;lt;br /&amp;gt;&lt;br /&gt;
BS kernel size = Valence Bands × Conduction Bands × K-points in the whole BZ.&amp;lt;br /&amp;gt;&lt;br /&gt;
This means that in the case with SO we are building up a matrix 2x2=4 times larger of the corresponding calculation without spin-orbit (you can compare the input in With_SO/Yambo/Inputs / Without_SO/Yambo/Inputs and reference outputs in With_SO/Yambo/Reference_Outputs / With_SO/Yambo/Reference_Outputs)&lt;br /&gt;
&lt;br /&gt;
We are ready to run the BSE calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J &amp;quot;05_BSE,screening&amp;quot; -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
We specify to Yambo the folder which contains calculated static screening, and in &amp;lt;code&amp;gt;05_BSE_out&amp;lt;/code&amp;gt; the two response files &amp;lt;code&amp;gt; o-05_BSE.eel_q1_haydock_bse &amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-05_BSE.eps_q1_haydock_bse&amp;lt;/code&amp;gt; can be found. In the &#039;&#039;eps file&#039;&#039; the real and imaginary parts of the BSE dielectric function are column 3 and 2 respectively, while the corresponding GW spectra are column 5 and 4.&lt;br /&gt;
&lt;br /&gt;
In the folder &amp;lt;code&amp;gt;screening&amp;lt;/code&amp;gt; you will find instead the DBs of the static screening (W) needed to build up the BSE kernel (&amp;lt;code&amp;gt;ndb.em1s&amp;lt;/code&amp;gt;) and in the folder &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; the BSE matrix (&amp;lt;code&amp;gt;ndb.BS*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 40 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   5 | 12 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
If you do the corresponding calculations for the case without spin-orbits using the databases in the directory GaSb_nSO/YAMBO and inputs in GaSb_nSO/Inputs, the two BSE spectra should look like in this figure:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE_few_kpts.jpg|500px|center|GaSb absorption BSE gew kpts]]&lt;br /&gt;
As mentioned before the two spectra present spurious peaks ( as the first peak!) due to uncoverged k-point sampling. Nevertheless the splitting due to spin-orbit interaction is already visible in the peak around 2.1 eV.&lt;br /&gt;
A more converged (yet not fully converged calculation) would give the following results which compares very nicely with the experimental data:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE.png|500px|center|GaSb absorption BSE]]&lt;br /&gt;
&lt;br /&gt;
=== More on Static Screening === &lt;br /&gt;
&lt;br /&gt;
Additionally, a BSE run for the spin-orbit coupling case can be done using the screening computed for the case without spin-orbit coupling. &lt;br /&gt;
&lt;br /&gt;
To do it we can make a symlink from the no-SOC folder:&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt; cd Path/GaSb/With_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt; ln -s Path/GaSb/Without_SOC/YAMBO/6x6x6_shifted/screening screening_no_soc&lt;br /&gt;
&lt;br /&gt;
The BSE kernel can be build and solved using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s -o b -k sex -y h -V qp -F 06_BSE_using_nosoc_screening.in&lt;br /&gt;
&lt;br /&gt;
Here we combined the screening part (-X s) and BSE part (-o b -k sex -y h -V qp). All of the input parameters have been discussed previously. Although, it is important to keep the right matching behind the screening bands used for the no SOC and SOC case.&lt;br /&gt;
&lt;br /&gt;
If for the SOC case the specified screening bands are n1, n2 then for the no-SOC screening the bands should be ((n1-1)/2+1, n2/2). &lt;br /&gt;
&lt;br /&gt;
 # No SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   3 | 20 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and &lt;br /&gt;
 # SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   5 | 40 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The results for the BSE solved using screening used from SOC and no SOC databases is presented below. As we can see, there is almost no difference between them. &lt;br /&gt;
&lt;br /&gt;
[[File:GaSb screening w and wo soc.png|600px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
= Exciton analysis =&lt;br /&gt;
&lt;br /&gt;
In this part of the tutorial we show how to analyze the origin of the E1 peak in GaSb. Since the calculation with the SOC case is very demanding we will do that only for the case without SOC. So first of all enter the &lt;br /&gt;
&amp;lt;code&amp;gt;Without_SOC/YAMBO/6x6x6_shifted&amp;lt;/code&amp;gt; folder and, if you didn&#039;t before, run the setup:&lt;br /&gt;
 &amp;gt;cd Without_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt;ls SAVE&lt;br /&gt;
 &amp;gt;yambo -J 01_init&lt;br /&gt;
 &amp;gt;ls SAVE r-01_init_setup&lt;br /&gt;
&lt;br /&gt;
Similar to previous section we need to compute the static screening first, and then solve the BSE equation.&lt;br /&gt;
This time we will use the full diagonalization solver to calculate all exciton energies and composition in terms of electron-hole pairs. See [[BSE solvers overview]] for more details. &lt;br /&gt;
&lt;br /&gt;
Then create the &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; folder and the input file for a BSE&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -X s -F My_inputs/05_screening.in&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_screening.in -J screening -C screening &lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y d -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the same parameters you used to compute the absorption with SOC previously. The number of bands will be the half of the case without SOC&lt;br /&gt;
 % BSEBands&lt;br /&gt;
  3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
Also this time you will use the to &amp;lt;code&amp;gt;&amp;amp;quot;d&amp;amp;quot;&amp;lt;/code&amp;gt; and uncomment the variable needed to Write to disk excitonic the WFs:&lt;br /&gt;
 BSSmod= &amp;amp;quot;d&amp;amp;quot;              # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft`&lt;br /&gt;
 WRbsWF                   # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
Then you have to run the BSE calculation (notice that, in case you already computed the BSE spectrum also for the case without SOC, the code can read the results from the provious BSE run skipping many steps)&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J 05_BSE -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; folder you will now find a new database file called &amp;lt;code&amp;gt;ndb.BS_diago_Q01&amp;lt;/code&amp;gt;. This is what you need to analyze the exciton peaks running the post-processing code ypp.&lt;br /&gt;
&lt;br /&gt;
First of all you can run:&lt;br /&gt;
 &amp;gt;ypp -e s -J 05_BSE -C BSE_out&lt;br /&gt;
This run will sort in energy the excitonic eigenvalues writing their oscillator strenghts (see &amp;lt;code&amp;gt;o-06_bse.exc_E_sorted&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Then you can create the ypp input required to analize how each excitonic state is build up in terms of single-particle states:&lt;br /&gt;
 &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE&lt;br /&gt;
Put the index &amp;lt;code&amp;gt;#N&amp;lt;/code&amp;gt; of the exciton with higher strenght in the E_1 peak region&lt;br /&gt;
 &amp;gt;ypp -F My_inputs/05_BSE_ypp.in -J 05_BSE -C 06_BSE_out&lt;br /&gt;
You will find the two files &amp;lt;code&amp;gt;o-06_bse.exc_weights_at_#N&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-06_bse.exc_amplitude_at_#N&amp;lt;/code&amp;gt;. In these files you will find informations on the highest strenght exciton in the E1 peak region.&lt;br /&gt;
&lt;br /&gt;
= Perturbative SOC approach =&lt;br /&gt;
&lt;br /&gt;
It is possible to include the spin-orbit coupling perturbatively in Yambo.&lt;br /&gt;
&lt;br /&gt;
To first order the perturbation just gives a correction to the DFT eigenvalues and does not touch the wave–functions. Numerically the perturbation need to be applied by mapping the solution of the DFT calculation without SOC into the solution of the DFT calculation with SOC. Once a mapping is defined, the SOC perturbation could be directly applied to the KS energies before solving both the GW scheme and/or the BSE.&lt;br /&gt;
&lt;br /&gt;
All we need is to computed a SOC mapping database given by the following equation (eq 68 in the referenced paper):&lt;br /&gt;
&lt;br /&gt;
EQUATION &lt;br /&gt;
&lt;br /&gt;
Where x, y, z are ... &lt;br /&gt;
&lt;br /&gt;
To build this map, in the folder without spin-orbit coupling we do the following:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; cd Solid_GaSb/Without_SOC/Yambo/6x6xWi6_shifted&lt;br /&gt;
 &amp;gt; mkdir SOC_DBs&lt;br /&gt;
 &amp;gt; cp -r Path/SAVE_GaSb_k6_w_soc SOC_DBs/SAVE&lt;br /&gt;
 &amp;gt; ypp -w &lt;br /&gt;
 &amp;gt; ypp -F map_wfs.in -J SOC_map -C SOC_map&lt;br /&gt;
&lt;br /&gt;
With the following input for &amp;lt;code&amp;gt;map_wfs.in&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 WFs_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 WFs_SOC_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 SOC_DBs= &amp;quot;SOC_DBs&amp;quot;        # Path to the folder containing the DB with SOC&lt;br /&gt;
 SOC_splitting= 0.01 eV    # SOC splitting between the levels&lt;br /&gt;
 % bands_to_map&lt;br /&gt;
   7 | 12 |                # Number of bands to map&lt;br /&gt;
 %&lt;br /&gt;
 bands_buffer=1&lt;br /&gt;
&lt;br /&gt;
Where the SAVE folder with spin-orbit coupling should be saved in a separate folder, and in this case it is in the &amp;lt;code&amp;gt; SOC_DBs &amp;lt;/code&amp;gt; folder. &lt;br /&gt;
Then, the BSE can be computed using the following command &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F 05_BSE+scissor.in -J &amp;quot;BSE_soc_perturbative,screening,SOC_map&amp;quot; -C BSE_soc_perturbative&lt;br /&gt;
&lt;br /&gt;
Where screening was precomputed, and the SOC_map is the one generated in this section. Check BSE section for more details on setting a BSE calculation.&lt;br /&gt;
Not converged results are presented below. &lt;br /&gt;
[[File:GaSb perturbative soc 1.png|600px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
= Other excercises =&lt;br /&gt;
&lt;br /&gt;
# Try to converge the G0W0 increasing the polarization RL size, the polarization bands, the number of bands in the Green function and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Try to converge the absorption spectra increasing the polarization RL size, the polarization bands, the number of bands to construct the excitonic matrix and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Plot the EELS spectrum obtained within IP-RPA and RPA with local fields. Also in this case you can check the effect of increasing the polarization bands. You may also try to do a resonant only calculation to see that the EELS cannot be described using only the resonant part of the response function.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;&amp;gt;M. Marsili, A. Molina-Sánchez, M. Palummo, D. Sangalli, A. Marini, [https://doi.org/10.1103/PhysRevB.103.155152  Phys. Rev. B &#039;&#039;&#039;103&#039;&#039;&#039;, 155152 (2021)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wiki&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Gallium_antimonide GaSb on wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kim&amp;quot;&amp;gt; Y.S. Kim et al. Phys. Rev. B &#039;&#039;&#039;82&#039;&#039;&#039;, 205212 (2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;rem&amp;quot;&amp;gt; I. N. Remediakis and Efthimios Kaxiras Phys. Rev. B &#039;&#039;&#039;59&#039;&#039;&#039;, 5336 (1999).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8949</id>
		<title>SOC</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8949"/>
		<updated>2025-08-20T13:41:54Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* Effect of spin-orbit interaction on the band structure of GaSb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Effect of spin-orbit interaction =&lt;br /&gt;
&lt;br /&gt;
= Introduction = &lt;br /&gt;
&lt;br /&gt;
The scope of this tutorial is to calculate the G0W0 corrections to the DFT-LDA band-structure and the BSE optical spectrum for a bulk semiconducting material, gallium antimonide (GaSb) &amp;lt;ref name=&amp;quot;wiki&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;kim&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;rem&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;. We will compare the results with and without the spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=200px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DFT band structure =&lt;br /&gt;
&lt;br /&gt;
For this tutorial we provide two state (GS) databases (DBs), one contains the GS-DBs with the effect of SOC included and one without. The idea is to repeat the same calculation for both database and compare the results and the performances of the code. GaSB input files can be downloaded from the following link [https://media.yambo-code.eu/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz], and can be unarchived using the following command: &lt;br /&gt;
&lt;br /&gt;
 $ tar -xzf GaSb.tar.gz&lt;br /&gt;
&lt;br /&gt;
As in other tutorials you can find the folder containing the input files for the pwscf code (PWSCF, in case you prefer to generate the GS-DBs by yourself) and the folder containing the GS-DBs, the reference input files and the reference output files for the yambo code (YAMBO). Instead of continuously jumping back and forth from the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;With_SOC&amp;lt;/code&amp;gt; folder we advice to open two terminals and keep one for the without SOC case and another for the with SOC case.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s have a look to the content of the folders. For example we can enter in the &amp;lt;code&amp;gt;GaSb/With_SOC/&amp;lt;/code&amp;gt; folder &lt;br /&gt;
 $ cd GaSb/With_SOC/&lt;br /&gt;
 $ ls Pwscf YAMBO&lt;br /&gt;
 $ cd YAMBO&lt;br /&gt;
 $ ls 4x4x4_shifted+GAMMA &lt;br /&gt;
 6x6x6_shifted  10x10x10_shifted 14x14x14_shifted   Inputs  Reference_Outputs&lt;br /&gt;
&lt;br /&gt;
Inside the YAMBO folder there are indeed four folders corresponding to four different k-points meshes. In this tutorial we will use the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; folder for the computation of the QP corrections within the GoWo approximation. It is a k-points grid obtained as the sum of a 4x4x4 k-points grid centered in Gamma and a 4x4x4 grid shifted. Instead for the computation of the optical properties we will use the &amp;lt;code&amp;gt;6x6x6_shifted&amp;lt;/code&amp;gt; folder. It is a 6x6x6 k-points grid shifted from Gamma. The other two folders, &amp;lt;code&amp;gt;10x10x10_shifted&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;14x14x14_shifted&amp;lt;/code&amp;gt; can be used to do a minimum convergence of the optical properties against the number of k-points (pay attention that the BSE calculations with bigger grids will be very memory and time demanding!).&lt;br /&gt;
&lt;br /&gt;
The first part of the tutorial is on the computation of the QP corrections. So let&#039;s enter the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; grid and, as seen in other tutorials run the Initialization:&lt;br /&gt;
&lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA/ &lt;br /&gt;
 $ yambo -J 01_init &lt;br /&gt;
Now compare the result of the two setup runs.&lt;br /&gt;
&lt;br /&gt;
With_SOC case:&lt;br /&gt;
&amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  5.046557&lt;br /&gt;
  VBM / CBm          [ev]:   0.00000   0.06025&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0008               0009-0200&lt;br /&gt;
  Indirect Gaps      [ev]:  0.06025   3.57546&amp;lt;/pre&amp;gt;&lt;br /&gt;
Without_SOC case:&lt;br /&gt;
 &amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  4.777401&lt;br /&gt;
  VBM / CBm          [ev]:  0.000000  0.332282&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0004               0005-0100&lt;br /&gt;
  Indirect Gaps      [ev]: 0.332282  3.620628&lt;br /&gt;
  Direct Gaps        [ev]: 0.332282  7.137342&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A clear shrink of the DFT-LDA gap due to spin-orbit occurs. Note that, having 8 electrons in the fundamental cell, due to the spinorial nature of the wavefunction, with SOC we have 8 occupied bands, while only 4 without. Here a picture of the DFT band structure for the two cases.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_pwscf.png|500px|center|GaSb bands DFT]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the band structure of GaSb =&lt;br /&gt;
 &lt;br /&gt;
Now we will perform a G0W0 calculation to correct the DFT-LDA bandstructure. We assume that you are already familiar with the concept of screening needed to build up the GW self-energy and thus the QP corrections. Create a local folder &#039;&#039;My_inputs&#039;&#039; and generate the input for a G0W0 calculation within the plasmon-pole approximation using the following command: &lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA&lt;br /&gt;
 $ mkdir My_inputs&lt;br /&gt;
 $ yambo -p p -g n -V RL -F My_inputs/02_GW.in&lt;br /&gt;
However we also provide an input file with suggested parameters for this calculations inside the folder &#039;&#039;Solid_GaSb/Without_SOC/Yambo/Inputs&#039;&#039;. Remember: these parameters are system dependent and should be converged as you can see other GW tutorials (e.g. [[GW]] or [[GW convergence]]). Here we provide reasonable (but not fully converged) parameters to have a low computational cost but yet qualitatively meaningful results.&lt;br /&gt;
&lt;br /&gt;
The plane-waves cutoff for the wavefunctions and exchange part of the self-energy are set to 10 Ry. &lt;br /&gt;
 FFTGvecs =  10 Ry   # [FFT] Plane-waves&lt;br /&gt;
 EXXRLvcs=   10 Ry   # [XX] Exchange RL components&lt;br /&gt;
while we will use 40 bands, a plane-wave cut-off of 1 Ry, and a plasmon-pole energy of 20 eV to build up the screening matrix &lt;br /&gt;
 NGsBlkXp=    1 Ry  # [Xp] Response block size &lt;br /&gt;
 PPAPntXp= 20.  eV  # [Xp] PPA imaginary energy &lt;br /&gt;
 % BndsRnXp    &lt;br /&gt;
 1 | 40 |        # [Xp] Polarization function bands &lt;br /&gt;
 % &lt;br /&gt;
 % LongDrXp  &lt;br /&gt;
 1.000000 | 1.000000 | 1.000000 |        # [Xp] [cc] Electric Field &lt;br /&gt;
 %&lt;br /&gt;
The number of bands in the green function G to build up the GW self-energy is also 40 &lt;br /&gt;
 % GbndRnge    &lt;br /&gt;
 1 | 40 |                 # [GW] G[W] bands range &lt;br /&gt;
 %&lt;br /&gt;
with those parameters we will compute the correction only in the last 2 points of our grid, 28 and 29 and for the states from 3 to 6, setting the input variable &lt;br /&gt;
 %QPkrange                      &lt;br /&gt;
 28 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
As you can verify from your &#039;&#039;r-01_init_setup&#039;&#039; file 28 and 29 are the L and the Gamma point of the Brillouin zone. &lt;br /&gt;
 *X* K [28] :-0.500000 -0.500000 -0.500000 (rlu) * Comp.s 476 * weight    0.0078   &lt;br /&gt;
 ...   &lt;br /&gt;
 *X* K [29] : 0.000000  0.000000  0.000000 (rlu)  * Comp.s 531 * weight    0.0020   &lt;br /&gt;
 ...&lt;br /&gt;
You can now run the code using either your input file or the one provided in the Inputs folder &lt;br /&gt;
 $ yambo -F ../Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
The run will take some time. Indeed the code has first to compute the dipoles, then the screening within the plasmon pole approximation and finally the self-energy, first the exchange part Gv and then the correlation part G(W-v). &lt;br /&gt;
In the &amp;lt;code&amp;gt;GW_out&amp;lt;/code&amp;gt; folder you will find the &amp;lt;code&amp;gt;o-GW.qp&amp;lt;/code&amp;gt; file containing the GW corrections.&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &lt;br /&gt;
 #&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #&lt;br /&gt;
  ...&lt;br /&gt;
  29.00000    4.00000    0.00000    0.22802    1.07276&lt;br /&gt;
  29.00000    5.00000    0.33228    0.66303   -2.39219&lt;br /&gt;
  ...&lt;br /&gt;
Thus it is about 0.66-0.23=0.43 eV (not fully converged).&lt;br /&gt;
&lt;br /&gt;
We can also compute the G0W0 correction for all the k-point of the database. To this end open the input file &#039;&#039;../Inputs/02_GW.in&#039;&#039; (or your own) and edit the number of k-point to be computed &lt;br /&gt;
 %&lt;br /&gt;
 QPkrange                      1 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
If you have learned how to run the code in parallel you may also set the parallel environment input variables:&lt;br /&gt;
 X_all_q_CPU= &amp;amp;quot;2&amp;amp;quot;              # [PARALLEL] CPUs for each role &lt;br /&gt;
 X_all_q_ROLEs= &amp;amp;quot;q&amp;amp;quot;            # [PARALLEL] CPUs roles (q,k,c,v) &lt;br /&gt;
 SE_CPU= &amp;amp;quot;2&amp;amp;quot;                   # [PARALLEL] CPUs for each role &lt;br /&gt;
 SE_ROLEs= &amp;amp;quot;q&amp;amp;quot;                 # [PARALLEL] CPUs roles (q,qp,b)&lt;br /&gt;
Remember to use the same name after the -J option, so that the code will be able to use the informations from the previous run and avoid many calculations. &lt;br /&gt;
 $ mpirun -np 2 yambo -F Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
In the &#039;&#039;GW_out&#039;&#039; folder you will find now also the &#039;&#039;o-GW.qp_01&#039;&#039; file containg the GW corrections for all the k-points.&lt;br /&gt;
&lt;br /&gt;
Now you can enter the folder of the 4x4x4 shifted grid&lt;br /&gt;
 cd Solid_GaSb/With_SOC/Yambo/4x4x4_shifted+GAMMA&lt;br /&gt;
and repeat the same calculations. Remember that in the input file you will generate you should change all the band ranges doubling the number of states (do you understand why?) &lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
    1 | 80 |        # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
    1 | 80 |        # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 % QPkrange&lt;br /&gt;
   29 | 29 |   5 | 12|  # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band.&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #  &lt;br /&gt;
   ...   &lt;br /&gt;
   29.00000    8.00000    0.00000    0.21758    0.95843&lt;br /&gt;
   29.00000    9.00000    0.06025    0.65362   -2.36544&lt;br /&gt;
   ...&lt;br /&gt;
Thus it is about 0.65-0.22=0.43 eV (not fully converged). Indeed the same result obtained without SOC. The resulting electronic gap is about 0.46 eV reasonably close to the experimental band gap of 0.72 eV. It is also a big improvment compared to the LDA band gap (less than 0.03 eV). This correction (indeed the slightly bigger value of 0.53 eV) will be used, in the form of a scissor operator, as a starting point to compute the optical spectra.&lt;br /&gt;
&lt;br /&gt;
Again we can also compute the G0W0 correction for all the k-point of the database. You can plot column 4 of the output file against column 3 to obtain a picture of the QP corrections. In the following figure we show the plot of the G0W0 correction (E_GoWo-E_LDA) vs the LDA eigenvalues. The corrections at the Gamma and the L point are marked with bigger red spots.&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=400px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_GoWo_corrections.png|GaSb QP corrections without SOC &lt;br /&gt;
Image:GaSb GoWo corrections SOC.png|GaSb GoWo corrections with SOC&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
[[File:SOC_GaSb_GoWo_corrections.png|500px|frameless|center]]&lt;br /&gt;
[[File:GaSb GoWo corrections SOC.png|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;scissor operator approach&amp;amp;quot; does not seem a very good approximation for GaSb. Indeed the quasi particle corrections are not constant, especially in the conduction band. For example the correction to the Gamma point is bigger than the corrections to all other k-points. This result however maybe due to the poor covergence parameters. If you would like to better investigate these results you should try do convergence tests. Since QP corrections are poorly sensitive to the spin-orbit interaction it is probably a good idea to do convergence without SOC.&lt;br /&gt;
&lt;br /&gt;
Here we also provide a plot of the band-structure at different levels of approximation: DFT, DFT+scissor, QP. The band structures are obtained from an interpolation of our k-points mesh and it is not very precise since, again, we are using a quite coarse sampling of the brillouine zone. Indeed we can see that already the interpolated DFT band structure deviates from the exact DFT band-structure, which has also been reported. In particular in the region nearby Gamma. However it gives quite nicely an overview of how the QP band structure compares with the DFT band stucture. The main effect is indeed an opening of the band-gap which can be described in terms of a scissor operator.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_yambo.png|500px|center|GaSb QP bands]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the optical properties of GaSb =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--{|&lt;br /&gt;
| [[File:SOC_GaSb_bands.png|600px|center|GaSb bands 1]]&lt;br /&gt;
| [[File:SOC_GaSb_absorption.png|600px|center|GaSb bands 2]]&lt;br /&gt;
|} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now turn our attention on the optical properties of the system. Here we will compute the dielectric function at different levels of approximations:&amp;lt;br /&amp;gt;&lt;br /&gt;
(i) at the IP-RPA level, thus using the Fermi golden rule with the KS energies and wave-functions&amp;lt;br /&amp;gt;&lt;br /&gt;
(ii) at the RPA level, thus also including the effect of the local fields&amp;lt;br /&amp;gt;&lt;br /&gt;
(iii) at the BSE level, thus including many-body effects, both correcting the KS energies (we will introduce a scissor obtained from the GW calculation) and considering the statically screened electron-hole interaction&lt;br /&gt;
&lt;br /&gt;
First, setup the calculation (initialization) in the usual way in the folder without SOC&lt;br /&gt;
 $ cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 $ yambo -J 01_init&lt;br /&gt;
and repeat the same inside the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; before continuing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;(to be finalized) The yambo code can also run simulations in the perturbative SOC approach. To this end first generate the SOC mapping database in the Without SOC folder following these instructions. After that you will be able to compute optical properties at all levels within the perturbative approach by linking the mapping database. We  will show below how to do that.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;(to be finalized) Finally, for the BSE run with SOC (and for the GW run?), it is also possible to solve the fully spinorial equations, but using the screening databases computed without SOC. In the BSE (and GW?) runs we will discuss how to do that.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RPA-IP absorption ==&lt;br /&gt;
&lt;br /&gt;
Create a local folder inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; which you will call &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt;, and create the input file:&lt;br /&gt;
 &amp;gt;cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o c -V RL -F My_inputs/03_IP-RPA.in&lt;br /&gt;
&lt;br /&gt;
As before, we also provide an input file with suggested parameters for this calculations. The kind of calculation is controlled by the input variable&lt;br /&gt;
 Chimod= &amp;quot;IP&amp;quot;                 # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1            RL    # [Xd] Response block size&lt;br /&gt;
These tells you that we are building up the dielectric function in G-space considering only on G vector, i.e. the G=0 component. The string Chimod= &amp;amp;quot;IP&amp;amp;quot; recalls us that this means we are neglecting the local fields effect.&lt;br /&gt;
&lt;br /&gt;
We set the plane-waves cutoff for the wavefunctions to&lt;br /&gt;
 FFTGvecs=  10  Ry   # [FFT] Plane-waves&lt;br /&gt;
Since we are interested into the optical spectrum calculation, only the Q=0 term, i.e. the first Q-point, is calculated&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
The number of bands we use is 20. This is a reasonable number of states to converge the IP-RPA optical spectrum in the VIS-UV range. (If you wish to calculate the EELS spectrum for q different from 0 probably more bands will be required.)&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 10 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
As you learned the dielectric function is a tensor and in principle three calculations for light polarized along x,y,z chould be done depending on the experimental setup. However GaSb is a system with cubic symmetry, thus any direction is equivalent. Here we decide to compute epsilon along the &amp;amp;quot;(1 1 1)&amp;amp;quot; direction.&lt;br /&gt;
 % LongDrXd&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation using either your input file or the one provided in the Inputs folder&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/03_IP-RPA.in  -J 03_IP-RPA -C 03_IP-RPA_out&lt;br /&gt;
&lt;br /&gt;
Inside the &amp;lt;code&amp;gt;03_IP-RPA&amp;lt;/code&amp;gt; folder you will find the databases created by the code (in this case just the dipoles), while in the &amp;lt;code&amp;gt;03_IP-RPA_out&amp;lt;/code&amp;gt; the report file and the output files for the dielectric function which describes the absorption (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;) and for its inverse (&amp;lt;code&amp;gt;o-03_IP-RPA.eel*&amp;lt;/code&amp;gt;), which describes the electron energy loss. You can plot them with your favorite software (for example gnuplot or xmgrace). The real and imaginary parts of the IP-RPA dielectric function are column 3 and 2 respectively of the file (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;). Using also the reference output file in the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; folder you can compare the spectrum with and without SOC.&lt;br /&gt;
&lt;br /&gt;
Now repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 20 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.jpg|600px|center|GaSb absorption RPA]]&lt;br /&gt;
If you wish to obtain a reasonable spectrum however the 6x6x6 kpts grid is not enough. In order to check the convergence with the number of k-points you should run the same kind of calculations on other k-points meshes, either using the ones we provided ot creating new ones using the input files in the Pwscf folder (see section [[more.php|More on GaSb]] for more advanced calculations).&lt;br /&gt;
&lt;br /&gt;
In the directories Reference_Outputs several RPA dielectric functions are saved with the dielectric function calculated with the 10x10x10 and the 14x14x14 k-grid. You will learn that within RPA spectra the lowest energy peak is under-estimated. Also the spectra with and without SOC look very similar and the SO splitting is almost not present. This is clearly due to the excitonic nature of the E1 peak which can be correctly described only including the electron-hole interaction.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== RPA absorption with local fieldds ==&lt;br /&gt;
&lt;br /&gt;
To also include the local fields effect you can generate the input with the command: &lt;br /&gt;
 &amp;gt;yambo -o c -k hartree -F My_inputs/04_RPA_LF.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
In the input file we provide you will see that now the chimod and size of the dynamical matrix are set to&lt;br /&gt;
 Chimod= &amp;amp;quot;Hartree&amp;amp;quot;       # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1       Ry    # [Xd] Response block size&lt;br /&gt;
&lt;br /&gt;
Including local fields the poles of absorption will move from KS transitions to many-electrons transitions (although we are still neglecting the electron-hole interaction). As a result you will need more states to converge the absorption spectrum. This is why we set the number of bands to 15:&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 15 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
while as before we will have&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 %&lt;br /&gt;
 LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/04_RPA_LF.in -J 04_RPA_LF -C 04_RPA_LF_out&lt;br /&gt;
&lt;br /&gt;
In the 04_RPA+LF_out folder you will fine the report and the output files as before. The real and imaginary parts of the RPA+LF dielectric function with local fields are column 3 and 2 respectively of the .eps file. While the corresponding IP-RPA spectra is reported in columns 5 and 4.&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 30 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
In the following picture we compare the result of IP-RPA and RPA+LF with SOC.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA_IP_vs_LF.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== BSE absorption with QP corrections ==&lt;br /&gt;
&lt;br /&gt;
A more detailed description of BSE in Yambo is available in the following tutorial: &lt;br /&gt;
[https://wiki.yambo-code.eu/wiki/index.php?title=Calculating%20optical%20spectra%20including%20excitonic%20effects:%20a%20step-by-step%20guide BSE in hBN].&lt;br /&gt;
&lt;br /&gt;
=== Static Screening ===&lt;br /&gt;
&lt;br /&gt;
First we need to obtain the static screening. &lt;br /&gt;
&lt;br /&gt;
This can be done using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s My_inputs/05_screening.in&lt;br /&gt;
&lt;br /&gt;
In the resulting input file you can also see the parameters used to compute the static dielectric function needed for the screened Coulomb term (W) of the BSE kernel. Here we use 20 bands and an energy cut-off of 1 Ry.&lt;br /&gt;
&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 20 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 1            Ry    # [Xs] Response block size&lt;br /&gt;
&lt;br /&gt;
Remember to double the number of bands for the case with spin-oribit coupling included. &lt;br /&gt;
&lt;br /&gt;
Then run the file &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F My_inputs/05_screening.in -J screening -C screening&lt;br /&gt;
&lt;br /&gt;
=== BS Kernel and Solver ===&lt;br /&gt;
&lt;br /&gt;
Now we build the BS kernel, and specify the BS kernel solver. Overview of the BSE solvers is available using the following link: [[BSE solvers overview]]. In this tutorial we will use Haydock solver because it is computationally cheaper.&lt;br /&gt;
&lt;br /&gt;
As you probably know the inclusion of the electron-hole interaction makes the approach in G space not feasible. We have thus to compute the dielectric function in the electron-hole space, building up the excitonic hamiltonian. Thus to create the input file you can run the command:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y h -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder. As before you, in the directory Inputs, you can find an example with suggested parameters. The plane-wave cutoffs used to expand wavefunctions is set to 10 Ry, the cut-off on the exchange interaction between the electron and the hole (i.e. for the local-fields) is set to 10 Ry (here we use a much higer value compared to the previous run since the computational cost of increasing this variable in the electron-hole space is very low). and, finally, the cut-off on the direct electron-hole interaction is set to 1 Ry (to build up this term, where the interaction is screened, we need to compute the static dielectric constant in G-space, thus increasing this value is computationally demanding).&lt;br /&gt;
 FFTGvecs= 10     Ry    # [FFT] Plane-waves&lt;br /&gt;
 BSENGexx= 10     Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=  1     Ry    # [BSK] Screened interaction block size&lt;br /&gt;
&lt;br /&gt;
The input variable &amp;amp;quot;KfnQP_E&amp;amp;quot; can be used to include a scissor operator, i.e a opening of the DFT band gap. The value 0.53 eV is the coverged correction at Gamma obtained in the GW run. Here we will calculate the BSE assuming that the &amp;amp;quot;scissor operator approximation&amp;amp;quot; is valid for GaSb (to be checked in principle!) .&lt;br /&gt;
&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; 0.530000 &amp;lt;/span&amp;gt; | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
To build up the excitonic matrix we consider the states from 5 to 12, i.e. we are using 4 occupied and 4 unoccupied bands.&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and we will build up the dielectric function using a grid of 200 point in frequency space&lt;br /&gt;
 BEnSteps= 200                # [BSS] Energy steps&lt;br /&gt;
Finally, similarly as before, we will have&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
Remember that the BS kernel is written in the electron-hole space and its size is given by the relation&amp;lt;br /&amp;gt;&lt;br /&gt;
BS kernel size = Valence Bands × Conduction Bands × K-points in the whole BZ.&amp;lt;br /&amp;gt;&lt;br /&gt;
This means that in the case with SO we are building up a matrix 2x2=4 times larger of the corresponding calculation without spin-orbit (you can compare the input in With_SO/Yambo/Inputs / Without_SO/Yambo/Inputs and reference outputs in With_SO/Yambo/Reference_Outputs / With_SO/Yambo/Reference_Outputs)&lt;br /&gt;
&lt;br /&gt;
We are ready to run the BSE calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J &amp;quot;05_BSE,screening&amp;quot; -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
We specify to Yambo the folder which contains calculated static screening, and in &amp;lt;code&amp;gt;05_BSE_out&amp;lt;/code&amp;gt; the two response files &amp;lt;code&amp;gt; o-05_BSE.eel_q1_haydock_bse &amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-05_BSE.eps_q1_haydock_bse&amp;lt;/code&amp;gt; can be found. In the &#039;&#039;eps file&#039;&#039; the real and imaginary parts of the BSE dielectric function are column 3 and 2 respectively, while the corresponding GW spectra are column 5 and 4.&lt;br /&gt;
&lt;br /&gt;
In the folder &amp;lt;code&amp;gt;screening&amp;lt;/code&amp;gt; you will find instead the DBs of the static screening (W) needed to build up the BSE kernel (&amp;lt;code&amp;gt;ndb.em1s&amp;lt;/code&amp;gt;) and in the folder &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; the BSE matrix (&amp;lt;code&amp;gt;ndb.BS*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 40 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   5 | 12 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
If you do the corresponding calculations for the case without spin-orbits using the databases in the directory GaSb_nSO/YAMBO and inputs in GaSb_nSO/Inputs, the two BSE spectra should look like in this figure:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE_few_kpts.jpg|500px|center|GaSb absorption BSE gew kpts]]&lt;br /&gt;
As mentioned before the two spectra present spurious peaks ( as the first peak!) due to uncoverged k-point sampling. Nevertheless the splitting due to spin-orbit interaction is already visible in the peak around 2.1 eV.&lt;br /&gt;
A more converged (yet not fully converged calculation) would give the following results which compares very nicely with the experimental data:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE.png|500px|center|GaSb absorption BSE]]&lt;br /&gt;
&lt;br /&gt;
=== More on Static Screening === &lt;br /&gt;
&lt;br /&gt;
Additionally, a BSE run for the spin-orbit coupling case can be done using the screening computed for the case without spin-orbit coupling. &lt;br /&gt;
&lt;br /&gt;
To do it we can make a symlink from the no-SOC folder:&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt; cd Path/GaSb/With_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt; ln -s Path/GaSb/Without_SOC/YAMBO/6x6x6_shifted/screening screening_no_soc&lt;br /&gt;
&lt;br /&gt;
The BSE kernel can be build and solved using the following command: &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -X s -o b -k sex -y h -V qp -F 06_BSE_using_nosoc_screening.in&lt;br /&gt;
&lt;br /&gt;
Here we combined the screening part (-X s) and BSE part (-o b -k sex -y h -V qp). All of the input parameters have been discussed previously. Although, it is important to keep the right matching behind the screening bands used for the no SOC and SOC case.&lt;br /&gt;
&lt;br /&gt;
If for the SOC case the specified screening bands are n1, n2 then for the no-SOC screening the bands should be ((n1-1)/2+1, n2/2). &lt;br /&gt;
&lt;br /&gt;
 # No SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   3 | 20 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and &lt;br /&gt;
 # SOC case&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
   5 | 40 |                           # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
The results for the BSE solved using screening used from SOC and no SOC databases is presented below. As we can see, there is almost no difference between them. &lt;br /&gt;
&lt;br /&gt;
[[File:GaSb screening w and wo soc.png|600px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
= Exciton analysis =&lt;br /&gt;
&lt;br /&gt;
In this part of the tutorial we show how to analyze the origin of the E1 peak in GaSb. Since the calculation with the SOC case is very demanding we will do that only for the case without SOC. So first of all enter the &lt;br /&gt;
&amp;lt;code&amp;gt;Without_SOC/YAMBO/6x6x6_shifted&amp;lt;/code&amp;gt; folder and, if you didn&#039;t before, run the setup:&lt;br /&gt;
 &amp;gt;cd Without_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt;ls SAVE&lt;br /&gt;
 &amp;gt;yambo -J 01_init&lt;br /&gt;
 &amp;gt;ls SAVE r-01_init_setup&lt;br /&gt;
&lt;br /&gt;
Similar to previous section we need to compute the static screening first, and then solve the BSE equation.&lt;br /&gt;
This time we will use the full diagonalization solver to calculate all exciton energies and composition in terms of electron-hole pairs. See [[BSE solvers overview]] for more details. &lt;br /&gt;
&lt;br /&gt;
Then create the &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; folder and the input file for a BSE&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -X s -F My_inputs/05_screening.in&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_screening.in -J screening -C screening &lt;br /&gt;
 &amp;gt;yambo -o b -k sex -y d -V qp -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the same parameters you used to compute the absorption with SOC previously. The number of bands will be the half of the case without SOC&lt;br /&gt;
 % BSEBands&lt;br /&gt;
  3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
Also this time you will use the to &amp;lt;code&amp;gt;&amp;amp;quot;d&amp;amp;quot;&amp;lt;/code&amp;gt; and uncomment the variable needed to Write to disk excitonic the WFs:&lt;br /&gt;
 BSSmod= &amp;amp;quot;d&amp;amp;quot;              # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft`&lt;br /&gt;
 WRbsWF                   # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
Then you have to run the BSE calculation (notice that, in case you already computed the BSE spectrum also for the case without SOC, the code can read the results from the provious BSE run skipping many steps)&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/05_BSE+scissor.in  -J 05_BSE -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; folder you will now find a new database file called &amp;lt;code&amp;gt;ndb.BS_diago_Q01&amp;lt;/code&amp;gt;. This is what you need to analyze the exciton peaks running the post-processing code ypp.&lt;br /&gt;
&lt;br /&gt;
First of all you can run:&lt;br /&gt;
 &amp;gt;ypp -e s -J 05_BSE -C BSE_out&lt;br /&gt;
This run will sort in energy the excitonic eigenvalues writing their oscillator strenghts (see &amp;lt;code&amp;gt;o-06_bse.exc_E_sorted&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Then you can create the ypp input required to analize how each excitonic state is build up in terms of single-particle states:&lt;br /&gt;
 &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE&lt;br /&gt;
Put the index &amp;lt;code&amp;gt;#N&amp;lt;/code&amp;gt; of the exciton with higher strenght in the E_1 peak region&lt;br /&gt;
 &amp;gt;ypp -F My_inputs/05_BSE_ypp.in -J 05_BSE -C 06_BSE_out&lt;br /&gt;
You will find the two files &amp;lt;code&amp;gt;o-06_bse.exc_weights_at_#N&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-06_bse.exc_amplitude_at_#N&amp;lt;/code&amp;gt;. In these files you will find informations on the highest strenght exciton in the E1 peak region.&lt;br /&gt;
&lt;br /&gt;
= Perturbative SOC approach =&lt;br /&gt;
&lt;br /&gt;
It is possible to include the spin-orbit coupling perturbatively in Yambo. More details on the theory and comparison with full spinorial GW-BSE can be found in the following paper [https://arxiv.org/pdf/2103.02266 Phys. Rev. B 103, 155152. ]&lt;br /&gt;
&lt;br /&gt;
To first order the perturbation just gives a correction to the DFT eigenvalues and does not touch the wave–functions. Numerically the perturbation need to be applied by mapping the solution of the DFT calculation without SOC into the solution of the DFT calculation with SOC. Once a mapping is defined, the SOC perturbation could be directly applied to the KS energies before solving both the GW scheme and/or the BSE.&lt;br /&gt;
&lt;br /&gt;
All we need is to computed a SOC mapping database given by the following equation (eq 68 in the referenced paper):&lt;br /&gt;
&lt;br /&gt;
EQUATION &lt;br /&gt;
&lt;br /&gt;
Where x, y, z are ... &lt;br /&gt;
&lt;br /&gt;
To build this map, in the folder without spin-orbit coupling we do the following:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; cd Solid_GaSb/Without_SOC/Yambo/6x6xWi6_shifted&lt;br /&gt;
 &amp;gt; mkdir SOC_DBs&lt;br /&gt;
 &amp;gt; cp -r Path/SAVE_GaSb_k6_w_soc SOC_DBs/SAVE&lt;br /&gt;
 &amp;gt; ypp -w &lt;br /&gt;
 &amp;gt; ypp -F map_wfs.in -J SOC_map -C SOC_map&lt;br /&gt;
&lt;br /&gt;
With the following input for &amp;lt;code&amp;gt;map_wfs.in&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 WFs_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 WFs_SOC_map                   # [R] WF map WFs with SOC to present WFs&lt;br /&gt;
 SOC_DBs= &amp;quot;SOC_DBs&amp;quot;        # Path to the folder containing the DB with SOC&lt;br /&gt;
 SOC_splitting= 0.01 eV    # SOC splitting between the levels&lt;br /&gt;
 % bands_to_map&lt;br /&gt;
   7 | 12 |                # Number of bands to map&lt;br /&gt;
 %&lt;br /&gt;
 bands_buffer=1&lt;br /&gt;
&lt;br /&gt;
Where the SAVE folder with spin-orbit coupling should be saved in a separate folder, and in this case it is in the &amp;lt;code&amp;gt; SOC_DBs &amp;lt;/code&amp;gt; folder. &lt;br /&gt;
Then, the BSE can be computed using the following command &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F 05_BSE+scissor.in -J &amp;quot;BSE_soc_perturbative,screening,SOC_map&amp;quot; -C BSE_soc_perturbative&lt;br /&gt;
&lt;br /&gt;
Where screening was precomputed, and the SOC_map is the one generated in this section. Check BSE section for more details on setting a BSE calculation.&lt;br /&gt;
Not converged results are presented below. &lt;br /&gt;
[[File:GaSb perturbative soc 1.png|600px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
= Other excercises =&lt;br /&gt;
&lt;br /&gt;
# Try to converge the G0W0 increasing the polarization RL size, the polarization bands, the number of bands in the Green function and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Try to converge the absorption spectra increasing the polarization RL size, the polarization bands, the number of bands to construct the excitonic matrix and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Plot the EELS spectrum obtained within IP-RPA and RPA with local fields. Also in this case you can check the effect of increasing the polarization bands. You may also try to do a resonant only calculation to see that the EELS cannot be described using only the resonant part of the response function.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;&amp;gt;M. Marsili, A. Molina-Sánchez, M. Palummo, D. Sangalli, A. Marini, [https://doi.org/10.1103/PhysRevB.103.155152  Phys. Rev. B &#039;&#039;&#039;103&#039;&#039;&#039;, 155152 (2021)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wiki&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Gallium_antimonide GaSb on wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kim&amp;quot;&amp;gt; Y.S. Kim et al. Phys. Rev. B &#039;&#039;&#039;82&#039;&#039;&#039;, 205212 (2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;rem&amp;quot;&amp;gt; I. N. Remediakis and Efthimios Kaxiras Phys. Rev. B &#039;&#039;&#039;59&#039;&#039;&#039;, 5336 (1999).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8919</id>
		<title>SOC</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8919"/>
		<updated>2025-07-31T13:17:44Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* Effect of spin-orbit interaction on the optical properties of GaSb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Effect of spin-orbit interaction =&lt;br /&gt;
&lt;br /&gt;
= Introduction = &lt;br /&gt;
&lt;br /&gt;
The scope of this tutorial is to calculate the G0W0 corrections to the DFT-LDA band-structure and the BSE optical spectrum for a bulk semiconducting material, gallium antimonide (GaSb) &amp;lt;ref name=&amp;quot;wiki&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;kim&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;rem&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;. We will compare the results with and without the spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=250px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DFT band structure =&lt;br /&gt;
&lt;br /&gt;
For this tutorial we provide two state (GS) databases (DBs), one contains the GS-DBs with the effect of SOC included and one without. The idea is to repeat the same calculation for both database and compare the results and the performances of the code. As in other tutorials you can find the folder containing the input files for the pwscf code (Pwscf, in case you prefer to generate the GS-DBs by yourself) and the folder containing the GS-DBs, the reference input files and the reference output files for the yambo code (YAMBO). Instead of continuously jumping back and forth from the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;With_SOC&amp;lt;/code&amp;gt; folder we advice to open two terminals and keep one for the without SOC case and another for the with SOC case.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s have a look to the content of the folders. For example we can enter in the &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/&amp;lt;/code&amp;gt; folder &lt;br /&gt;
 $ cd Solid_GaSb/With_SOC/&lt;br /&gt;
 $ ls Pwscf YAMBO&lt;br /&gt;
 $ cd YAMBO&lt;br /&gt;
 $ ls 4x4x4_shifted+GAMMA &lt;br /&gt;
 6x6x6_shifted  10x10x10_shifted 14x14x14_shifted   Inputs  Reference_Outputs&lt;br /&gt;
&lt;br /&gt;
Inside the YAMBO folder there are indeed four folders corresponding to four differet k-points meshes. In this tutorial we will use the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; folder for the computation of the QP corrections within the GoWo approximation. It is a kpts grid obtained as the sum of a 4x4x4 k-points grid centered in Gamma and a 4x4x4 grid shifted. Instead for the computation of the optical properties we will use the &amp;lt;code&amp;gt;6x6x6_shifted&amp;lt;/code&amp;gt; folder. It is a 6x6x6 k-points grid shifted from Gamma. The other two folders, &amp;lt;code&amp;gt;10x10x10_shifted&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;14x14x14_shifted&amp;lt;/code&amp;gt; can be used to do a minimum convergence of the optical properties against the number of k-points (pay attention that the BSE calculations with bigger grids will be very memory and time demanding!).&lt;br /&gt;
&lt;br /&gt;
The first part of the tutorial is on the computation of the QP corrections. So let&#039;s enter the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; grid and, as seen in other tutorials run the Initialization:&lt;br /&gt;
&lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA/ &lt;br /&gt;
 $ yambo -J 01_init &lt;br /&gt;
Now compare the result of the two setup runs.&lt;br /&gt;
&lt;br /&gt;
With_SOC case:&lt;br /&gt;
&amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  5.046557&lt;br /&gt;
  VBM / CBm          [ev]:   0.00000   0.06025&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0008               0009-0200&lt;br /&gt;
  Indirect Gaps      [ev]:  0.06025   3.57546&amp;lt;/pre&amp;gt;&lt;br /&gt;
Without_SOC case:&lt;br /&gt;
 &amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  4.777401&lt;br /&gt;
  VBM / CBm          [ev]:  0.000000  0.332282&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0004               0005-0100&lt;br /&gt;
  Indirect Gaps      [ev]: 0.332282  3.620628&lt;br /&gt;
  Direct Gaps        [ev]: 0.332282  7.137342&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A clear shrink of the DFT-LDA gap due to spin-orbit occurs. Note that, having 8 electrons in the fundamental cell, due to the spinorial nature of the wavefunction, with SOC we have 8 occupied bands, while only 4 without. Here a picture of the DFT band structure for the two cases.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_pwscf.png|600px|center|GaSb bands DFT]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the band structure of GaSb =&lt;br /&gt;
 &lt;br /&gt;
Now we will perform a G0W0 calculation to correct the DFT-LDA bandstructure. We assume that you are already familiar with the concept of screening needed to build up the GW self-energy and thus the QP corrections. Create a local folder &#039;&#039;My_inputs&#039;&#039; and generate the input for a G0W0 calculation within the plasmon-pole approximation using the following command: &lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA&lt;br /&gt;
 $ mkdir My_inputs&lt;br /&gt;
 $ yambo -p p -g n -V RL -F My_inputs/02_GW.in&lt;br /&gt;
However we also provide an input file with suggested parameters for this calculations inside the folder &#039;&#039;Solid_GaSb/Without_SOC/Yambo/Inputs&#039;&#039;. Remember: these parameters are system dependent and should be converged as you can see other GW tutorials (e.g. [[GW]] or [[GW convergence]]). Here we provide reasonable (but not fully converged) parameters to have a low computational cost but yet qualitatively meaningful results.&lt;br /&gt;
&lt;br /&gt;
The plane-waves cutoff for the wavefunctions and exchange part of the self-energy are set to 10 Ry. &lt;br /&gt;
 FFTGvecs =  10 Ry   # [FFT] Plane-waves&lt;br /&gt;
 EXXRLvcs=   10 Ry   # [XX] Exchange RL components&lt;br /&gt;
while we will use 40 bands, a plane-wave cut-off of 1 Ry, and a plasmon-pole energy of 20 eV to build up the screening matrix &lt;br /&gt;
 NGsBlkXp=    1 Ry  # [Xp] Response block size &lt;br /&gt;
 PPAPntXp= 20.  eV  # [Xp] PPA imaginary energy &lt;br /&gt;
 % BndsRnXp    &lt;br /&gt;
 1 | 40 |        # [Xp] Polarization function bands &lt;br /&gt;
 % &lt;br /&gt;
 % LongDrXp  &lt;br /&gt;
 1.000000 | 1.000000 | 1.000000 |        # [Xp] [cc] Electric Field &lt;br /&gt;
 %&lt;br /&gt;
The number of bands in the green function G to build up the GW self-energy is also 40 &lt;br /&gt;
 % GbndRnge    &lt;br /&gt;
 1 | 40 |                 # [GW] G[W] bands range &lt;br /&gt;
 %&lt;br /&gt;
with those parameters we will compute the correction only in the last 2 points of our grid, 28 and 29 and for the states from 3 to 6, setting the input variable &lt;br /&gt;
 %QPkrange                      &lt;br /&gt;
 28 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
As you can verify from your &#039;&#039;r-01_init_setup&#039;&#039; file 28 and 29 are the L and the Gamma point of the Brillouin zone. &lt;br /&gt;
 *X* K [28] :-0.500000 -0.500000 -0.500000 (rlu) * Comp.s 476 * weight    0.0078   &lt;br /&gt;
 ...   &lt;br /&gt;
 *X* K [29] : 0.000000  0.000000  0.000000 (rlu)  * Comp.s 531 * weight    0.0020   &lt;br /&gt;
 ...&lt;br /&gt;
You can now run the code using either your input file or the one provided in the Inputs folder &lt;br /&gt;
 $ yambo -F ../Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
The run will take some time. Indeed the code has first to compute the dipoles, then the screening within the plasmon pole approximation and finally the self-energy, first the exchange part Gv and then the correlation part G(W-v). &lt;br /&gt;
In the &amp;lt;code&amp;gt;GW_out&amp;lt;/code&amp;gt; folder you will find the &amp;lt;code&amp;gt;o-GW.qp&amp;lt;/code&amp;gt; file containing the GW corrections.&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &lt;br /&gt;
 #&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #&lt;br /&gt;
  ...&lt;br /&gt;
  29.00000    4.00000    0.00000    0.22802    1.07276&lt;br /&gt;
  29.00000    5.00000    0.33228    0.66303   -2.39219&lt;br /&gt;
  ...&lt;br /&gt;
Thus it is about 0.66-0.23=0.43 eV (not fully converged).&lt;br /&gt;
&lt;br /&gt;
We can also compute the G0W0 correction for all the k-point of the database. To this end open the input file &#039;&#039;../Inputs/02_GW.in&#039;&#039; (or your own) and edit the number of k-point to be computed &lt;br /&gt;
 %&lt;br /&gt;
 QPkrange                      1 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
If you have learned how to run the code in parallel you may also set the parallel environment input variables:&lt;br /&gt;
 X_all_q_CPU= &amp;amp;quot;2&amp;amp;quot;              # [PARALLEL] CPUs for each role &lt;br /&gt;
 X_all_q_ROLEs= &amp;amp;quot;q&amp;amp;quot;            # [PARALLEL] CPUs roles (q,k,c,v) &lt;br /&gt;
 SE_CPU= &amp;amp;quot;2&amp;amp;quot;                   # [PARALLEL] CPUs for each role &lt;br /&gt;
 SE_ROLEs= &amp;amp;quot;q&amp;amp;quot;                 # [PARALLEL] CPUs roles (q,qp,b)&lt;br /&gt;
Remember to use the same name after the -J option, so that the code will be able to use the informations from the previous run and avoid many calculations. &lt;br /&gt;
 $ mpirun -np 2 yambo -F Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
In the &#039;&#039;GW_out&#039;&#039; folder you will find now also the &#039;&#039;o-GW.qp_01&#039;&#039; file containg the GW corrections for all the k-points.&lt;br /&gt;
&lt;br /&gt;
Now you can enter the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; and repeat the same calculations. Remember that in the input file you will generate you should change all the band ranges doubling the number of states (do you understand why?) &amp;lt;code&amp;gt; % BndsRnXp    1 | 80 |        # [Xp] Polarization function bands % % GbndRnge    1 | 80 |                 # [GW] G[W] bands range % %QPkrange                      29 | 29 |   5 | 12|  # [GW] QP generalized Kpoint/Band indices %&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &amp;lt;code&amp;gt; # #  K-point    Band       Eo         E-Eo       Sc(Eo) #   ...   29.00000    8.00000    0.00000    0.21758    0.95843   29.00000    9.00000    0.06025    0.65362   -2.36544   ...&amp;lt;/code&amp;gt; Thus it is about 0.65-0.22=0.43 eV (not fully converged). Indeed the same result obtained without SOC. The resulting electronic gap is about 0.46 eV reasonably close to the experimental band gap of 0.72 eV. It is also a big improvment compared to the LDA band gap (less than 0.03 eV). This correction (indeed the slightly bigger value of 0.53 eV) will be used, in the form of a scissor operator, as a starting point to compute the optical spectra.&lt;br /&gt;
&lt;br /&gt;
Again we can also compute the G0W0 correction for all the k-point of the database. You can plot column 4 of the output file against column 3 to obtain a picture of the QP corrections. In the following figure we show the plot of the G0W0 correction (E_GoWo-E_LDA) vs the LDA eigenvalues. The corrections at the Gamma and the L point are marked with bigger red spots.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=400px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_GoWo_corrections.png|GaSb QP corrections without SOC &lt;br /&gt;
Image:GaSb GoWo corrections SOC.png|GaSb GoWo corrections with SOC&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
The &amp;amp;quot;scissor operator approach&amp;amp;quot; does not seem a very good approximation for GaSb. Indeed the quasi particle corrections are not constant, especially in the conduction band. For example the correction to the Gamma point is bigger than the corrections to all other k-points. This result however maybe due to the poor covergence parameters. If you would like to better investigate these results you should try do convergence tests. Since QP corrections are poorly sensitive to the spin-orbit interaction it is probably a good idea to do convergence without SOC.&lt;br /&gt;
&lt;br /&gt;
Here we also provide a plot of the band-structure at different levels of approximation: DFT, DFT+scissor, QP. The band structures are obtained from an interpolation of our k-points mesh and it is not very precise since, again, we are using a quite coarse sampling of the brillouine zone. Indeed we can see that already the interpolated DFT band structure deviates from the exact DFT band-structure, which has also been reported. In particular in the region nearby Gamma. However it gives quite nicely an overview of how the QP band structure compares with the DFT band stucture. The main effect is indeed an opening of the band-gap which can be described in terms of a scissor operator.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_yambo.png|600px|center|GaSb QP bands]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the optical properties of GaSb =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--{|&lt;br /&gt;
| [[File:SOC_GaSb_bands.png|600px|center|GaSb bands 1]]&lt;br /&gt;
| [[File:SOC_GaSb_absorption.png|600px|center|GaSb bands 2]]&lt;br /&gt;
|} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now turn our attention on the optical properties of the system. Here we will compute the dielectric function at different levels of approximations:&amp;lt;br /&amp;gt;&lt;br /&gt;
(i) at the IP-RPA level, thus using the Fermi golden rule with the KS energies and wave-functions&amp;lt;br /&amp;gt;&lt;br /&gt;
(ii) at the RPA level, thus also including the effect of the local fields&amp;lt;br /&amp;gt;&lt;br /&gt;
(iii) at the BSE level, thus including many-body effects, both correcting the KS energies (we will introduce a scissor obtained from the GW calculation) and considering the statically screened electron-hole interaction&lt;br /&gt;
&lt;br /&gt;
First, setup the calculation (initialization) in the usual way in the folder without SOC&lt;br /&gt;
 $ cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 $ yambo -J 01_init&lt;br /&gt;
and repeat the same inside the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; before continuing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;(to be finalized) The yambo code can also run simulations in the perturbative SOC approach. To this end first generate the SOC mapping database in the Without SOC folder following these instructions. After that you will be able to compute optical properties at all levels within the perturbative approach by linking the mapping database. We  will show below how to do that.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;(to be finalized) Finally, for the BSE run with SOC (and for the GW run?), it is also possible to solve the fully spinorial equations, but using the screening databases computed without SOC. In the BSE (and GW?) runs we will discuss how to do that.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RPA-IP absorption ==&lt;br /&gt;
&lt;br /&gt;
Create a local folder inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; which you will call &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt;, and create the input file:&lt;br /&gt;
 &amp;gt;cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o c -V RL -F My_inputs/03_IP-RPA.in&lt;br /&gt;
&lt;br /&gt;
As before, we also provide an input file with suggested parameters for this calculations. The kind of calculation is controlled by the input variable&lt;br /&gt;
 Chimod= &amp;quot;IP&amp;quot;                 # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1            RL    # [Xd] Response block size&lt;br /&gt;
These tells you that we are building up the dielectric function in G-space considering only on G vector, i.e. the G=0 component. The string Chimod= &amp;amp;quot;IP&amp;amp;quot; recalls us that this means we are neglecting the local fields effect.&lt;br /&gt;
&lt;br /&gt;
We set the plane-waves cutoff for the wavefunctions to&lt;br /&gt;
 FFTGvecs=  10  Ry   # [FFT] Plane-waves&lt;br /&gt;
Since we are interested into the optical spectrum calculation, only the Q=0 term, i.e. the first Q-point, is calculated&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
The number of bands we use is 20. This is a reasonable number of states to converge the IP-RPA optical spectrum in the VIS-UV range. (If you wish to calculate the EELS spectrum for q different from 0 probably more bands will be required.)&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 10 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
As you learned the dielectric function is a tensir and in principle three calculations for light polarized along x,y,z chould be done depending on the experimental setup. However GaSb is a system with cubic symmetry, thus any direction is equivalent. Here we decide to compute epsilon along the &amp;amp;quot;(1 1 1)&amp;amp;quot; direction.&lt;br /&gt;
 % LongDrXd&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation using either your input file or the one provided in the Inputs folder&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/03_IP-RPA.in  -J 03_IP-RPA -C 03_IP-RPA_out&lt;br /&gt;
&lt;br /&gt;
Inside the &amp;lt;code&amp;gt;03_IP-RPA&amp;lt;/code&amp;gt; folder you will find the databases created by the code (in this case just the dipoles), while in the &amp;lt;code&amp;gt;03_IP-RPA_out&amp;lt;/code&amp;gt; the report file and the output files for the dielectric function which describes the absorption (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;) and for its inverse (&amp;lt;code&amp;gt;o-03_IP-RPA.eel*&amp;lt;/code&amp;gt;), which describes the electron energy loss. You can plot them with your favorite software (for example gnuplot or xmgrace). The real and imaginary parts of the IP-RPA dielectric function are column 3 and 2 respectively of the file (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;). Using also the reference output file in the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; folder you can compare the spectrum with and without SOC.&lt;br /&gt;
&lt;br /&gt;
Now repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 20 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.jpg|600px|center|GaSb absorption RPA]]&lt;br /&gt;
If you wish to obtain a reasonable spectrum however the 6x6x6 kpts grid is not enough. In order to check the convergence with the number of k-points you should run the same kind of calculations on other k-points meshes, either using the ones we provided ot creating new ones using the input files in the Pwscf folder (see section [[more.php|More on GaSb]] for more advanced calculations).&lt;br /&gt;
&lt;br /&gt;
In the directories Reference_Outputs several RPA dielectric functions are saved with the dielectric function calculated with the 10x10x10 and the 14x14x14 k-grid. You will learn that within RPA spectra the lowest energy peak is under-estimated. Also the spectra with and without SOC look very similar and the SO splitting is almost not present. This is clearly due to the excitonic nature of the E1 peak which can be correctly described only including the electron-hole interaction.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== RPA absorption with local fieldds ==&lt;br /&gt;
&lt;br /&gt;
To also include the local fields effect you can generate the input with the command: &lt;br /&gt;
 &amp;gt;yambo -o c -k hartree -F My_inputs/04_RPA_LF.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
In the input file we provide you will see that now the chimod and size of the dynamical matrix are set to&lt;br /&gt;
 Chimod= &amp;amp;quot;Hartree&amp;amp;quot;       # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1       Ry    # [Xd] Response block size&lt;br /&gt;
&lt;br /&gt;
Including local fields the poles of absorption will move from KS transitions to many-electrons transitions (although we are still neglecting the electron-hole interaction). As a result you will need more states to converge the absorption spectrum. This is why we set the number of bands to 15:&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 15 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
while as before we will have&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 %&lt;br /&gt;
 LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/04_RPA_LF.in -J 04_RPA_LF -C 04_RPA_LF_out&lt;br /&gt;
&lt;br /&gt;
In the 04_RPA+LF_out folder you will fine the report and the output files as before. The real and imaginary parts of the RPA+LF dielectric function with local fields are column 3 and 2 respectively of the .eps file. While the corresponding IP-RPA spectra is reported in columns 5 and 4.&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 30 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
In the following picture we compare the result of IP-RPA and RPA+LF with SOC.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA_IP_vs_LF.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== BSE absorption with QP corrections ==&lt;br /&gt;
&lt;br /&gt;
As you probably know the inclusion of the electron-hole interaction makes the approach in G space not feasible. We have thus to compute the dielectric function in the electron-hole space, building up the excitonic hamiltonian. Thus to create the input file you can run the command:&lt;br /&gt;
 &amp;gt;yambo -o b -k sex -b -y h -V all -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder. As before you, in the directory Inputs, you can find an example with suggested parameters. The plane-wave cutoffs used to expand wavefunctions is set to 10 Ry, the cut-off on the exchange interaction between the electron and the hole (i.e. for the local-fields) is set to 10 Ry (here we use a much higer value compared to the previous run since the computational cost of increasing this variable in the electron-hole space is very low). and, finally, the cut-off on the direct electron-hole interaction is set to 1 Ry (to build up this term, where the interaction is screened, we need to compute the static dielectric constant in G-space, thus increasing this value is computationally demanding).&lt;br /&gt;
 FFTGvecs= 10     Ry    # [FFT] Plane-waves&lt;br /&gt;
 BSENGexx= 10     Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=  1     Ry    # [BSK] Screened interaction block size&lt;br /&gt;
&lt;br /&gt;
Indeed in the input file you can also see the parameters used to compute the static dielectric function needed for the screened Coulomb term (W) of the BSE kernel. Here we use 40 bands and an energy cut-off of 1 Ry.&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 20 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 1            Ry    # [Xs] Response block size&lt;br /&gt;
&lt;br /&gt;
The input variable &amp;amp;quot;KfnQP_E&amp;amp;quot; can be used to include a scissor operator, i.e a opening of the DFT band gap. The value 0.53 eV is the coverged correction at Gamma obtained in the GW run. Here we will calculate the BSE assuming that the &amp;amp;quot;scissor operator approximation&amp;amp;quot; is valid for GaSb (to be checked in principle!) .&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  0.530000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
To build up the excitonic matrix we consider the states from 5 to 12, i.e. we are using 4 occupied and 4 unoccupied bands.&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and we will build up the dielectric function using a grid of 200 point in frequency space&lt;br /&gt;
 BEnSteps= 200                # [BSS] Energy steps&lt;br /&gt;
Finally, similarly as before, we will have&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
Remember that the BS kernel is written in the electron-hole space and its size is given by the relation&amp;lt;br /&amp;gt;&lt;br /&gt;
BS kernel size = Valence Bands × Conduction Bands × K-points in the whole BZ.&amp;lt;br /&amp;gt;&lt;br /&gt;
This means that in the case with SO we are building up a matrix 2x2=4 times larger of the corresponding calculation without spin-orbit (you can compare the input in With_SO/Yambo/Inputs / Without_SO/Yambo/Inputs and reference outputs in With_SO/Yambo/Reference_Outputs / With_SO/Yambo/Reference_Outputs)&lt;br /&gt;
&lt;br /&gt;
We are ready to run the BSE calculation:&lt;br /&gt;
 &amp;gt;yambo -F 05_BSE+scissor.in  -J 05_BSE -C 05_BSE_out&lt;br /&gt;
Inside the folder &amp;lt;code&amp;gt;05_BSE_out&amp;lt;/code&amp;gt; you should find the report file &amp;lt;code&amp;gt;r-05_BSE_optics_bse_bsk_bss_em1s&amp;lt;/code&amp;gt; ( Open it and look if everything is ok! ) and the two response files &amp;lt;code&amp;gt; o-05_BSE.eel_q1_haydock_bse &amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-05_BSE.eps_q1_haydock_bse&amp;lt;/code&amp;gt;. Again the real and imaginary parts of the BSE dielectric function are column 3 and 2 respectively, while the corresponding GW spectra are column 5 and 4.&lt;br /&gt;
&lt;br /&gt;
In the folder &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; you will find instead the DBs of the static screening (W) needed to build up the BSE kernel (&amp;lt;code&amp;gt;ndb.em1s&amp;lt;/code&amp;gt;) and the BSE matrix (&amp;lt;code&amp;gt;ndb.BS*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 20 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   5 | 12 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
If you do the corresponding calculations for the case without spin-orbits using the databases in the directory GaSb_nSO/YAMBO and inputs in GaSb_nSO/Inputs, the two BSE spectra should look like in this figure:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE_few_kpts.jpg|600px|center|GaSb absorption BSE gew kpts]]&lt;br /&gt;
As mentioned before the two spectra present spurious peaks ( as the first peak!) due to uncoverged k-point sampling. Nevertheless the splitting due to spin-orbit interaction is already visible in the peak around 2.1 eV.&lt;br /&gt;
A more converged (yet not fully converged calculation) would give the following results which compares very nicely with the experimental data:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE.png|600px|center|GaSb absorption BSE]]&lt;br /&gt;
&lt;br /&gt;
= Exciton analysis =&lt;br /&gt;
&lt;br /&gt;
In this part of the tutorial we show how to analyze the origin of the E1 peak in GaSb. Since the calculation with the SOC case is very demanding we will do that only for the case without SOC. So first of all enter the &amp;lt;code&amp;gt;Without_SOC/YAMBO/6x6x6_shifted&amp;lt;/code&amp;gt; folder and, if you didn&#039;t before, run the setup:&lt;br /&gt;
 &amp;gt;cd Without_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt;ls SAVE&lt;br /&gt;
 &amp;gt;yambo -J 01_init&lt;br /&gt;
 &amp;gt;ls SAVE r-01_init_setup&lt;br /&gt;
&lt;br /&gt;
Then create the &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; folder and the input file for a BSE&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o b -k sex -b -y d -V all -F My_inputs/05_BSE+shissor.in&lt;br /&gt;
&lt;br /&gt;
You can use the same parameters you used to compute the absorption with SOC previously. The number of bands will be the half of the case without SOC&lt;br /&gt;
 % BSEBands&lt;br /&gt;
  3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
Also this time you will use the to &amp;lt;code&amp;gt;&amp;amp;quot;d&amp;amp;quot;&amp;lt;/code&amp;gt; and uncomment the variable needed to Write to disk excitonic the WFs:&lt;br /&gt;
 BSSmod= &amp;amp;quot;d&amp;amp;quot;              # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft`&lt;br /&gt;
 WRbsWF                   # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
Then you have to run the BSE calculation (notice that, in case you already computed the BSE spectrum also for the case without SOC, the code can read the results from the provious BSE run skipping many steps)&lt;br /&gt;
 &amp;gt;yambo -F My_inuts/05_BSE+shissor.in  -J 05_BSE -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; folder you will now find a new database file called &amp;lt;code&amp;gt;ndb.BS_diago_Q01&amp;lt;/code&amp;gt;. This is what you need to analyze the exciton peaks running the post-processing code ypp.&lt;br /&gt;
&lt;br /&gt;
First of all you can run:&lt;br /&gt;
 &amp;gt;ypp -e s -J 05_BSE -C BSE_out&lt;br /&gt;
This run will sort in energy the excitonic eigenvalues writing their oscillator strenghts (see &amp;lt;code&amp;gt;o-06_bse.exc_E_sorted&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Then you can create the ypp input required to analize how each excitonic state is build up in terms of single-particle states:&lt;br /&gt;
 &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE&lt;br /&gt;
Put the index &amp;lt;code&amp;gt;#N&amp;lt;/code&amp;gt; of the exciton with higher strenght in the E_1 peak region&lt;br /&gt;
 &amp;gt;ypp -F My_inputs/05_BSE_ypp.in -J 05_BSE -C 06_BSE_out&lt;br /&gt;
You will find the two files &amp;lt;code&amp;gt;o-06_bse.exc_weights_at_#N&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-06_bse.exc_amplitude_at_#N&amp;lt;/code&amp;gt;. In these files you will find informations on the highest strenght exciton in the E1 peak region.&lt;br /&gt;
&lt;br /&gt;
= Other excercises =&lt;br /&gt;
&lt;br /&gt;
# Try to converge the G0W0 increasing the polarization RL size, the polarization bands, the number of bands in the Green function and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Try to converge the absorption spectra increasing the polarization RL size, the polarization bands, the number of bands to construct the excitonic matrix and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Plot the EELS spectrum obtained within IP-RPA and RPA with local fields. Also in this case you can check the effect of increasing the polarization bands. You may also try to do a resonant only calculation to see that the EELS cannot be described using only the resonant part of the response function.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;&amp;gt;M. Marsili, A. Molina-Sánchez, M. Palummo, D. Sangalli, A. Marini, [https://doi.org/10.1103/PhysRevB.103.155152  Phys. Rev. B &#039;&#039;&#039;103&#039;&#039;&#039;, 155152 (2021)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wiki&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Gallium_antimonide GaSb on wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kim&amp;quot;&amp;gt; Y.S. Kim et al. Phys. Rev. B &#039;&#039;&#039;82&#039;&#039;&#039;, 205212 (2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;rem&amp;quot;&amp;gt; I. N. Remediakis and Efthimios Kaxiras Phys. Rev. B &#039;&#039;&#039;59&#039;&#039;&#039;, 5336 (1999).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8918</id>
		<title>SOC</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8918"/>
		<updated>2025-07-31T13:10:35Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* Effect of spin-orbit interaction on the optical properties of GaSb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Effect of spin-orbit interaction =&lt;br /&gt;
&lt;br /&gt;
= Introduction = &lt;br /&gt;
&lt;br /&gt;
The scope of this tutorial is to calculate the G0W0 corrections to the DFT-LDA band-structure and the BSE optical spectrum for a bulk semiconducting material, gallium antimonide (GaSb) &amp;lt;ref name=&amp;quot;wiki&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;kim&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;rem&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;. We will compare the results with and without the spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=250px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DFT band structure =&lt;br /&gt;
&lt;br /&gt;
For this tutorial we provide two state (GS) databases (DBs), one contains the GS-DBs with the effect of SOC included and one without. The idea is to repeat the same calculation for both database and compare the results and the performances of the code. As in other tutorials you can find the folder containing the input files for the pwscf code (Pwscf, in case you prefer to generate the GS-DBs by yourself) and the folder containing the GS-DBs, the reference input files and the reference output files for the yambo code (YAMBO). Instead of continuously jumping back and forth from the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;With_SOC&amp;lt;/code&amp;gt; folder we advice to open two terminals and keep one for the without SOC case and another for the with SOC case.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s have a look to the content of the folders. For example we can enter in the &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/&amp;lt;/code&amp;gt; folder &lt;br /&gt;
 $ cd Solid_GaSb/With_SOC/&lt;br /&gt;
 $ ls Pwscf YAMBO&lt;br /&gt;
 $ cd YAMBO&lt;br /&gt;
 $ ls 4x4x4_shifted+GAMMA &lt;br /&gt;
 6x6x6_shifted  10x10x10_shifted 14x14x14_shifted   Inputs  Reference_Outputs&lt;br /&gt;
&lt;br /&gt;
Inside the YAMBO folder there are indeed four folders corresponding to four differet k-points meshes. In this tutorial we will use the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; folder for the computation of the QP corrections within the GoWo approximation. It is a kpts grid obtained as the sum of a 4x4x4 k-points grid centered in Gamma and a 4x4x4 grid shifted. Instead for the computation of the optical properties we will use the &amp;lt;code&amp;gt;6x6x6_shifted&amp;lt;/code&amp;gt; folder. It is a 6x6x6 k-points grid shifted from Gamma. The other two folders, &amp;lt;code&amp;gt;10x10x10_shifted&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;14x14x14_shifted&amp;lt;/code&amp;gt; can be used to do a minimum convergence of the optical properties against the number of k-points (pay attention that the BSE calculations with bigger grids will be very memory and time demanding!).&lt;br /&gt;
&lt;br /&gt;
The first part of the tutorial is on the computation of the QP corrections. So let&#039;s enter the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; grid and, as seen in other tutorials run the Initialization:&lt;br /&gt;
&lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA/ &lt;br /&gt;
 $ yambo -J 01_init &lt;br /&gt;
Now compare the result of the two setup runs.&lt;br /&gt;
&lt;br /&gt;
With_SOC case:&lt;br /&gt;
&amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  5.046557&lt;br /&gt;
  VBM / CBm          [ev]:   0.00000   0.06025&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0008               0009-0200&lt;br /&gt;
  Indirect Gaps      [ev]:  0.06025   3.57546&amp;lt;/pre&amp;gt;&lt;br /&gt;
Without_SOC case:&lt;br /&gt;
 &amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  4.777401&lt;br /&gt;
  VBM / CBm          [ev]:  0.000000  0.332282&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0004               0005-0100&lt;br /&gt;
  Indirect Gaps      [ev]: 0.332282  3.620628&lt;br /&gt;
  Direct Gaps        [ev]: 0.332282  7.137342&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A clear shrink of the DFT-LDA gap due to spin-orbit occurs. Note that, having 8 electrons in the fundamental cell, due to the spinorial nature of the wavefunction, with SOC we have 8 occupied bands, while only 4 without. Here a picture of the DFT band structure for the two cases.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_pwscf.png|600px|center|GaSb bands DFT]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the band structure of GaSb =&lt;br /&gt;
 &lt;br /&gt;
Now we will perform a G0W0 calculation to correct the DFT-LDA bandstructure. We assume that you are already familiar with the concept of screening needed to build up the GW self-energy and thus the QP corrections. Create a local folder &#039;&#039;My_inputs&#039;&#039; and generate the input for a G0W0 calculation within the plasmon-pole approximation using the following command: &lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA&lt;br /&gt;
 $ mkdir My_inputs&lt;br /&gt;
 $ yambo -p p -g n -V RL -F My_inputs/02_GW.in&lt;br /&gt;
However we also provide an input file with suggested parameters for this calculations inside the folder &#039;&#039;Solid_GaSb/Without_SOC/Yambo/Inputs&#039;&#039;. Remember: these parameters are system dependent and should be converged as you can see other GW tutorials (e.g. [[GW]] or [[GW convergence]]). Here we provide reasonable (but not fully converged) parameters to have a low computational cost but yet qualitatively meaningful results.&lt;br /&gt;
&lt;br /&gt;
The plane-waves cutoff for the wavefunctions and exchange part of the self-energy are set to 10 Ry. &lt;br /&gt;
 FFTGvecs =  10 Ry   # [FFT] Plane-waves&lt;br /&gt;
 EXXRLvcs=   10 Ry   # [XX] Exchange RL components&lt;br /&gt;
while we will use 40 bands, a plane-wave cut-off of 1 Ry, and a plasmon-pole energy of 20 eV to build up the screening matrix &lt;br /&gt;
 NGsBlkXp=    1 Ry  # [Xp] Response block size &lt;br /&gt;
 PPAPntXp= 20.  eV  # [Xp] PPA imaginary energy &lt;br /&gt;
 % BndsRnXp    &lt;br /&gt;
 1 | 40 |        # [Xp] Polarization function bands &lt;br /&gt;
 % &lt;br /&gt;
 % LongDrXp  &lt;br /&gt;
 1.000000 | 1.000000 | 1.000000 |        # [Xp] [cc] Electric Field &lt;br /&gt;
 %&lt;br /&gt;
The number of bands in the green function G to build up the GW self-energy is also 40 &lt;br /&gt;
 % GbndRnge    &lt;br /&gt;
 1 | 40 |                 # [GW] G[W] bands range &lt;br /&gt;
 %&lt;br /&gt;
with those parameters we will compute the correction only in the last 2 points of our grid, 28 and 29 and for the states from 3 to 6, setting the input variable &lt;br /&gt;
 %QPkrange                      &lt;br /&gt;
 28 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
As you can verify from your &#039;&#039;r-01_init_setup&#039;&#039; file 28 and 29 are the L and the Gamma point of the Brillouin zone. &lt;br /&gt;
 *X* K [28] :-0.500000 -0.500000 -0.500000 (rlu) * Comp.s 476 * weight    0.0078   &lt;br /&gt;
 ...   &lt;br /&gt;
 *X* K [29] : 0.000000  0.000000  0.000000 (rlu)  * Comp.s 531 * weight    0.0020   &lt;br /&gt;
 ...&lt;br /&gt;
You can now run the code using either your input file or the one provided in the Inputs folder &lt;br /&gt;
 $ yambo -F ../Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
The run will take some time. Indeed the code has first to compute the dipoles, then the screening within the plasmon pole approximation and finally the self-energy, first the exchange part Gv and then the correlation part G(W-v). &lt;br /&gt;
In the &amp;lt;code&amp;gt;GW_out&amp;lt;/code&amp;gt; folder you will find the &amp;lt;code&amp;gt;o-GW.qp&amp;lt;/code&amp;gt; file containing the GW corrections.&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &lt;br /&gt;
 #&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #&lt;br /&gt;
  ...&lt;br /&gt;
  29.00000    4.00000    0.00000    0.22802    1.07276&lt;br /&gt;
  29.00000    5.00000    0.33228    0.66303   -2.39219&lt;br /&gt;
  ...&lt;br /&gt;
Thus it is about 0.66-0.23=0.43 eV (not fully converged).&lt;br /&gt;
&lt;br /&gt;
We can also compute the G0W0 correction for all the k-point of the database. To this end open the input file &#039;&#039;../Inputs/02_GW.in&#039;&#039; (or your own) and edit the number of k-point to be computed &lt;br /&gt;
 %&lt;br /&gt;
 QPkrange                      1 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
If you have learned how to run the code in parallel you may also set the parallel environment input variables:&lt;br /&gt;
 X_all_q_CPU= &amp;amp;quot;2&amp;amp;quot;              # [PARALLEL] CPUs for each role &lt;br /&gt;
 X_all_q_ROLEs= &amp;amp;quot;q&amp;amp;quot;            # [PARALLEL] CPUs roles (q,k,c,v) &lt;br /&gt;
 SE_CPU= &amp;amp;quot;2&amp;amp;quot;                   # [PARALLEL] CPUs for each role &lt;br /&gt;
 SE_ROLEs= &amp;amp;quot;q&amp;amp;quot;                 # [PARALLEL] CPUs roles (q,qp,b)&lt;br /&gt;
Remember to use the same name after the -J option, so that the code will be able to use the informations from the previous run and avoid many calculations. &lt;br /&gt;
 $ mpirun -np 2 yambo -F Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
In the &#039;&#039;GW_out&#039;&#039; folder you will find now also the &#039;&#039;o-GW.qp_01&#039;&#039; file containg the GW corrections for all the k-points.&lt;br /&gt;
&lt;br /&gt;
Now you can enter the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; and repeat the same calculations. Remember that in the input file you will generate you should change all the band ranges doubling the number of states (do you understand why?) &amp;lt;code&amp;gt; % BndsRnXp    1 | 80 |        # [Xp] Polarization function bands % % GbndRnge    1 | 80 |                 # [GW] G[W] bands range % %QPkrange                      29 | 29 |   5 | 12|  # [GW] QP generalized Kpoint/Band indices %&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &amp;lt;code&amp;gt; # #  K-point    Band       Eo         E-Eo       Sc(Eo) #   ...   29.00000    8.00000    0.00000    0.21758    0.95843   29.00000    9.00000    0.06025    0.65362   -2.36544   ...&amp;lt;/code&amp;gt; Thus it is about 0.65-0.22=0.43 eV (not fully converged). Indeed the same result obtained without SOC. The resulting electronic gap is about 0.46 eV reasonably close to the experimental band gap of 0.72 eV. It is also a big improvment compared to the LDA band gap (less than 0.03 eV). This correction (indeed the slightly bigger value of 0.53 eV) will be used, in the form of a scissor operator, as a starting point to compute the optical spectra.&lt;br /&gt;
&lt;br /&gt;
Again we can also compute the G0W0 correction for all the k-point of the database. You can plot column 4 of the output file against column 3 to obtain a picture of the QP corrections. In the following figure we show the plot of the G0W0 correction (E_GoWo-E_LDA) vs the LDA eigenvalues. The corrections at the Gamma and the L point are marked with bigger red spots.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=400px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_GoWo_corrections.png|GaSb QP corrections without SOC &lt;br /&gt;
Image:GaSb GoWo corrections SOC.png|GaSb GoWo corrections with SOC&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
The &amp;amp;quot;scissor operator approach&amp;amp;quot; does not seem a very good approximation for GaSb. Indeed the quasi particle corrections are not constant, especially in the conduction band. For example the correction to the Gamma point is bigger than the corrections to all other k-points. This result however maybe due to the poor covergence parameters. If you would like to better investigate these results you should try do convergence tests. Since QP corrections are poorly sensitive to the spin-orbit interaction it is probably a good idea to do convergence without SOC.&lt;br /&gt;
&lt;br /&gt;
Here we also provide a plot of the band-structure at different levels of approximation: DFT, DFT+scissor, QP. The band structures are obtained from an interpolation of our k-points mesh and it is not very precise since, again, we are using a quite coarse sampling of the brillouine zone. Indeed we can see that already the interpolated DFT band structure deviates from the exact DFT band-structure, which has also been reported. In particular in the region nearby Gamma. However it gives quite nicely an overview of how the QP band structure compares with the DFT band stucture. The main effect is indeed an opening of the band-gap which can be described in terms of a scissor operator.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_yambo.png|600px|center|GaSb QP bands]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the optical properties of GaSb =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--{|&lt;br /&gt;
| [[File:SOC_GaSb_bands.png|600px|center|GaSb bands 1]]&lt;br /&gt;
| [[File:SOC_GaSb_absorption.png|600px|center|GaSb bands 2]]&lt;br /&gt;
|} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now turn our attention on the optical properties of the system. Here we will compute the dielectric function at different levels of approximations:&amp;lt;br /&amp;gt;&lt;br /&gt;
(i) at the IP-RPA level, thus using the Fermi golden rule with the KS energies and wave-functions&amp;lt;br /&amp;gt;&lt;br /&gt;
(ii) at the RPA level, thus also including the effect of the local fields&amp;lt;br /&amp;gt;&lt;br /&gt;
(iii) at the BSE level, thus including many-body effects, both correcting the KS energies (we will introduce a scissor obtained from the GW calculation) and considering the statically screened electron-hole interaction&lt;br /&gt;
&lt;br /&gt;
First, setup the calculation (initialization) in the usual way in the folder without SOC&lt;br /&gt;
 $ cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 $ yambo -J 01_init&lt;br /&gt;
and repeat the same inside the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; before continuing.&lt;br /&gt;
&lt;br /&gt;
== RPA-IP absorption ==&lt;br /&gt;
&lt;br /&gt;
Create a local folder inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; which you will call &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt;, and create the input file:&lt;br /&gt;
 &amp;gt;cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o c -V RL -F My_inputs/03_IP-RPA.in&lt;br /&gt;
&lt;br /&gt;
As before, we also provide an input file with suggested parameters for this calculations. The kind of calculation is controlled by the input variable&lt;br /&gt;
 Chimod= &amp;quot;IP&amp;quot;                 # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1            RL    # [Xd] Response block size&lt;br /&gt;
These tells you that we are building up the dielectric function in G-space considering only on G vector, i.e. the G=0 component. The string Chimod= &amp;amp;quot;IP&amp;amp;quot; recalls us that this means we are neglecting the local fields effect.&lt;br /&gt;
&lt;br /&gt;
We set the plane-waves cutoff for the wavefunctions to&lt;br /&gt;
 FFTGvecs=  10  Ry   # [FFT] Plane-waves&lt;br /&gt;
Since we are interested into the optical spectrum calculation, only the Q=0 term, i.e. the first Q-point, is calculated&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
The number of bands we use is 20. This is a reasonable number of states to converge the IP-RPA optical spectrum in the VIS-UV range. (If you wish to calculate the EELS spectrum for q different from 0 probably more bands will be required.)&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 10 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
As you learned the dielectric function is a tensir and in principle three calculations for light polarized along x,y,z chould be done depending on the experimental setup. However GaSb is a system with cubic symmetry, thus any direction is equivalent. Here we decide to compute epsilon along the &amp;amp;quot;(1 1 1)&amp;amp;quot; direction.&lt;br /&gt;
 % LongDrXd&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation using either your input file or the one provided in the Inputs folder&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/03_IP-RPA.in  -J 03_IP-RPA -C 03_IP-RPA_out&lt;br /&gt;
&lt;br /&gt;
Inside the &amp;lt;code&amp;gt;03_IP-RPA&amp;lt;/code&amp;gt; folder you will find the databases created by the code (in this case just the dipoles), while in the &amp;lt;code&amp;gt;03_IP-RPA_out&amp;lt;/code&amp;gt; the report file and the output files for the dielectric function which describes the absorption (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;) and for its inverse (&amp;lt;code&amp;gt;o-03_IP-RPA.eel*&amp;lt;/code&amp;gt;), which describes the electron energy loss. You can plot them with your favorite software (for example gnuplot or xmgrace). The real and imaginary parts of the IP-RPA dielectric function are column 3 and 2 respectively of the file (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;). Using also the reference output file in the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; folder you can compare the spectrum with and without SOC.&lt;br /&gt;
&lt;br /&gt;
Now repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 20 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.jpg|600px|center|GaSb absorption RPA]]&lt;br /&gt;
If you wish to obtain a reasonable spectrum however the 6x6x6 kpts grid is not enough. In order to check the convergence with the number of k-points you should run the same kind of calculations on other k-points meshes, either using the ones we provided ot creating new ones using the input files in the Pwscf folder (see section [[more.php|More on GaSb]] for more advanced calculations).&lt;br /&gt;
&lt;br /&gt;
In the directories Reference_Outputs several RPA dielectric functions are saved with the dielectric function calculated with the 10x10x10 and the 14x14x14 k-grid. You will learn that within RPA spectra the lowest energy peak is under-estimated. Also the spectra with and without SOC look very similar and the SO splitting is almost not present. This is clearly due to the excitonic nature of the E1 peak which can be correctly described only including the electron-hole interaction.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== RPA absorption with local fieldds ==&lt;br /&gt;
&lt;br /&gt;
To also include the local fields effect you can generate the input with the command: &lt;br /&gt;
 &amp;gt;yambo -o c -k hartree -F My_inputs/04_RPA_LF.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
In the input file we provide you will see that now the chimod and size of the dynamical matrix are set to&lt;br /&gt;
 Chimod= &amp;amp;quot;Hartree&amp;amp;quot;       # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1       Ry    # [Xd] Response block size&lt;br /&gt;
&lt;br /&gt;
Including local fields the poles of absorption will move from KS transitions to many-electrons transitions (although we are still neglecting the electron-hole interaction). As a result you will need more states to converge the absorption spectrum. This is why we set the number of bands to 15:&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 15 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
while as before we will have&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 %&lt;br /&gt;
 LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/04_RPA_LF.in -J 04_RPA_LF -C 04_RPA_LF_out&lt;br /&gt;
&lt;br /&gt;
In the 04_RPA+LF_out folder you will fine the report and the output files as before. The real and imaginary parts of the RPA+LF dielectric function with local fields are column 3 and 2 respectively of the .eps file. While the corresponding IP-RPA spectra is reported in columns 5 and 4.&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 30 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
In the following picture we compare the result of IP-RPA and RPA+LF with SOC.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA_IP_vs_LF.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== BSE absorption with QP corrections ==&lt;br /&gt;
&lt;br /&gt;
As you probably know the inclusion of the electron-hole interaction makes the approach in G space not feasible. We have thus to compute the dielectric function in the electron-hole space, building up the excitonic hamiltonian. Thus to create the input file you can run the command:&lt;br /&gt;
 &amp;gt;yambo -o b -k sex -b -y h -V all -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder. As before you, in the directory Inputs, you can find an example with suggested parameters. The plane-wave cutoffs used to expand wavefunctions is set to 10 Ry, the cut-off on the exchange interaction between the electron and the hole (i.e. for the local-fields) is set to 10 Ry (here we use a much higer value compared to the previous run since the computational cost of increasing this variable in the electron-hole space is very low). and, finally, the cut-off on the direct electron-hole interaction is set to 1 Ry (to build up this term, where the interaction is screened, we need to compute the static dielectric constant in G-space, thus increasing this value is computationally demanding).&lt;br /&gt;
 FFTGvecs= 10     Ry    # [FFT] Plane-waves&lt;br /&gt;
 BSENGexx= 10     Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=  1     Ry    # [BSK] Screened interaction block size&lt;br /&gt;
&lt;br /&gt;
Indeed in the input file you can also see the parameters used to compute the static dielectric function needed for the screened Coulomb term (W) of the BSE kernel. Here we use 40 bands and an energy cut-off of 1 Ry.&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 20 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 1            Ry    # [Xs] Response block size&lt;br /&gt;
&lt;br /&gt;
The input variable &amp;amp;quot;KfnQP_E&amp;amp;quot; can be used to include a scissor operator, i.e a opening of the DFT band gap. The value 0.53 eV is the coverged correction at Gamma obtained in the GW run. Here we will calculate the BSE assuming that the &amp;amp;quot;scissor operator approximation&amp;amp;quot; is valid for GaSb (to be checked in principle!) .&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  0.530000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
To build up the excitonic matrix we consider the states from 5 to 12, i.e. we are using 4 occupied and 4 unoccupied bands.&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and we will build up the dielectric function using a grid of 200 point in frequency space&lt;br /&gt;
 BEnSteps= 200                # [BSS] Energy steps&lt;br /&gt;
Finally, similarly as before, we will have&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
Remember that the BS kernel is written in the electron-hole space and its size is given by the relation&amp;lt;br /&amp;gt;&lt;br /&gt;
BS kernel size = Valence Bands × Conduction Bands × K-points in the whole BZ.&amp;lt;br /&amp;gt;&lt;br /&gt;
This means that in the case with SO we are building up a matrix 2x2=4 times larger of the corresponding calculation without spin-orbit (you can compare the input in With_SO/Yambo/Inputs / Without_SO/Yambo/Inputs and reference outputs in With_SO/Yambo/Reference_Outputs / With_SO/Yambo/Reference_Outputs)&lt;br /&gt;
&lt;br /&gt;
We are ready to run the BSE calculation:&lt;br /&gt;
 &amp;gt;yambo -F 05_BSE+scissor.in  -J 05_BSE -C 05_BSE_out&lt;br /&gt;
Inside the folder &amp;lt;code&amp;gt;05_BSE_out&amp;lt;/code&amp;gt; you should find the report file &amp;lt;code&amp;gt;r-05_BSE_optics_bse_bsk_bss_em1s&amp;lt;/code&amp;gt; ( Open it and look if everything is ok! ) and the two response files &amp;lt;code&amp;gt; o-05_BSE.eel_q1_haydock_bse &amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-05_BSE.eps_q1_haydock_bse&amp;lt;/code&amp;gt;. Again the real and imaginary parts of the BSE dielectric function are column 3 and 2 respectively, while the corresponding GW spectra are column 5 and 4.&lt;br /&gt;
&lt;br /&gt;
In the folder &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; you will find instead the DBs of the static screening (W) needed to build up the BSE kernel (&amp;lt;code&amp;gt;ndb.em1s&amp;lt;/code&amp;gt;) and the BSE matrix (&amp;lt;code&amp;gt;ndb.BS*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 20 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   5 | 12 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
If you do the corresponding calculations for the case without spin-orbits using the databases in the directory GaSb_nSO/YAMBO and inputs in GaSb_nSO/Inputs, the two BSE spectra should look like in this figure:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE_few_kpts.jpg|600px|center|GaSb absorption BSE gew kpts]]&lt;br /&gt;
As mentioned before the two spectra present spurious peaks ( as the first peak!) due to uncoverged k-point sampling. Nevertheless the splitting due to spin-orbit interaction is already visible in the peak around 2.1 eV.&lt;br /&gt;
A more converged (yet not fully converged calculation) would give the following results which compares very nicely with the experimental data:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE.png|600px|center|GaSb absorption BSE]]&lt;br /&gt;
&lt;br /&gt;
= Exciton analysis =&lt;br /&gt;
&lt;br /&gt;
In this part of the tutorial we show how to analyze the origin of the E1 peak in GaSb. Since the calculation with the SOC case is very demanding we will do that only for the case without SOC. So first of all enter the &amp;lt;code&amp;gt;Without_SOC/YAMBO/6x6x6_shifted&amp;lt;/code&amp;gt; folder and, if you didn&#039;t before, run the setup:&lt;br /&gt;
 &amp;gt;cd Without_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt;ls SAVE&lt;br /&gt;
 &amp;gt;yambo -J 01_init&lt;br /&gt;
 &amp;gt;ls SAVE r-01_init_setup&lt;br /&gt;
&lt;br /&gt;
Then create the &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; folder and the input file for a BSE&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o b -k sex -b -y d -V all -F My_inputs/05_BSE+shissor.in&lt;br /&gt;
&lt;br /&gt;
You can use the same parameters you used to compute the absorption with SOC previously. The number of bands will be the half of the case without SOC&lt;br /&gt;
 % BSEBands&lt;br /&gt;
  3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
Also this time you will use the to &amp;lt;code&amp;gt;&amp;amp;quot;d&amp;amp;quot;&amp;lt;/code&amp;gt; and uncomment the variable needed to Write to disk excitonic the WFs:&lt;br /&gt;
 BSSmod= &amp;amp;quot;d&amp;amp;quot;              # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft`&lt;br /&gt;
 WRbsWF                   # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
Then you have to run the BSE calculation (notice that, in case you already computed the BSE spectrum also for the case without SOC, the code can read the results from the provious BSE run skipping many steps)&lt;br /&gt;
 &amp;gt;yambo -F My_inuts/05_BSE+shissor.in  -J 05_BSE -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; folder you will now find a new database file called &amp;lt;code&amp;gt;ndb.BS_diago_Q01&amp;lt;/code&amp;gt;. This is what you need to analyze the exciton peaks running the post-processing code ypp.&lt;br /&gt;
&lt;br /&gt;
First of all you can run:&lt;br /&gt;
 &amp;gt;ypp -e s -J 05_BSE -C BSE_out&lt;br /&gt;
This run will sort in energy the excitonic eigenvalues writing their oscillator strenghts (see &amp;lt;code&amp;gt;o-06_bse.exc_E_sorted&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Then you can create the ypp input required to analize how each excitonic state is build up in terms of single-particle states:&lt;br /&gt;
 &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE&lt;br /&gt;
Put the index &amp;lt;code&amp;gt;#N&amp;lt;/code&amp;gt; of the exciton with higher strenght in the E_1 peak region&lt;br /&gt;
 &amp;gt;ypp -F My_inputs/05_BSE_ypp.in -J 05_BSE -C 06_BSE_out&lt;br /&gt;
You will find the two files &amp;lt;code&amp;gt;o-06_bse.exc_weights_at_#N&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-06_bse.exc_amplitude_at_#N&amp;lt;/code&amp;gt;. In these files you will find informations on the highest strenght exciton in the E1 peak region.&lt;br /&gt;
&lt;br /&gt;
= Other excercises =&lt;br /&gt;
&lt;br /&gt;
# Try to converge the G0W0 increasing the polarization RL size, the polarization bands, the number of bands in the Green function and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Try to converge the absorption spectra increasing the polarization RL size, the polarization bands, the number of bands to construct the excitonic matrix and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Plot the EELS spectrum obtained within IP-RPA and RPA with local fields. Also in this case you can check the effect of increasing the polarization bands. You may also try to do a resonant only calculation to see that the EELS cannot be described using only the resonant part of the response function.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;&amp;gt;M. Marsili, A. Molina-Sánchez, M. Palummo, D. Sangalli, A. Marini, [https://doi.org/10.1103/PhysRevB.103.155152  Phys. Rev. B &#039;&#039;&#039;103&#039;&#039;&#039;, 155152 (2021)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wiki&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Gallium_antimonide GaSb on wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kim&amp;quot;&amp;gt; Y.S. Kim et al. Phys. Rev. B &#039;&#039;&#039;82&#039;&#039;&#039;, 205212 (2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;rem&amp;quot;&amp;gt; I. N. Remediakis and Efthimios Kaxiras Phys. Rev. B &#039;&#039;&#039;59&#039;&#039;&#039;, 5336 (1999).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8917</id>
		<title>SOC</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8917"/>
		<updated>2025-07-31T13:08:37Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* BSE absorption with QP corrections */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Effect of spin-orbit interaction =&lt;br /&gt;
&lt;br /&gt;
= Introduction = &lt;br /&gt;
&lt;br /&gt;
The scope of this tutorial is to calculate the G0W0 corrections to the DFT-LDA band-structure and the BSE optical spectrum for a bulk semiconducting material, gallium antimonide (GaSb) &amp;lt;ref name=&amp;quot;wiki&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;kim&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;rem&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;. We will compare the results with and without the spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=250px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DFT band structure =&lt;br /&gt;
&lt;br /&gt;
For this tutorial we provide two state (GS) databases (DBs), one contains the GS-DBs with the effect of SOC included and one without. The idea is to repeat the same calculation for both database and compare the results and the performances of the code. As in other tutorials you can find the folder containing the input files for the pwscf code (Pwscf, in case you prefer to generate the GS-DBs by yourself) and the folder containing the GS-DBs, the reference input files and the reference output files for the yambo code (YAMBO). Instead of continuously jumping back and forth from the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;With_SOC&amp;lt;/code&amp;gt; folder we advice to open two terminals and keep one for the without SOC case and another for the with SOC case.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s have a look to the content of the folders. For example we can enter in the &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/&amp;lt;/code&amp;gt; folder &lt;br /&gt;
 $ cd Solid_GaSb/With_SOC/&lt;br /&gt;
 $ ls Pwscf YAMBO&lt;br /&gt;
 $ cd YAMBO&lt;br /&gt;
 $ ls 4x4x4_shifted+GAMMA &lt;br /&gt;
 6x6x6_shifted  10x10x10_shifted 14x14x14_shifted   Inputs  Reference_Outputs&lt;br /&gt;
&lt;br /&gt;
Inside the YAMBO folder there are indeed four folders corresponding to four differet k-points meshes. In this tutorial we will use the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; folder for the computation of the QP corrections within the GoWo approximation. It is a kpts grid obtained as the sum of a 4x4x4 k-points grid centered in Gamma and a 4x4x4 grid shifted. Instead for the computation of the optical properties we will use the &amp;lt;code&amp;gt;6x6x6_shifted&amp;lt;/code&amp;gt; folder. It is a 6x6x6 k-points grid shifted from Gamma. The other two folders, &amp;lt;code&amp;gt;10x10x10_shifted&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;14x14x14_shifted&amp;lt;/code&amp;gt; can be used to do a minimum convergence of the optical properties against the number of k-points (pay attention that the BSE calculations with bigger grids will be very memory and time demanding!).&lt;br /&gt;
&lt;br /&gt;
The first part of the tutorial is on the computation of the QP corrections. So let&#039;s enter the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; grid and, as seen in other tutorials run the Initialization:&lt;br /&gt;
&lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA/ &lt;br /&gt;
 $ yambo -J 01_init &lt;br /&gt;
Now compare the result of the two setup runs.&lt;br /&gt;
&lt;br /&gt;
With_SOC case:&lt;br /&gt;
&amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  5.046557&lt;br /&gt;
  VBM / CBm          [ev]:   0.00000   0.06025&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0008               0009-0200&lt;br /&gt;
  Indirect Gaps      [ev]:  0.06025   3.57546&amp;lt;/pre&amp;gt;&lt;br /&gt;
Without_SOC case:&lt;br /&gt;
 &amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  4.777401&lt;br /&gt;
  VBM / CBm          [ev]:  0.000000  0.332282&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0004               0005-0100&lt;br /&gt;
  Indirect Gaps      [ev]: 0.332282  3.620628&lt;br /&gt;
  Direct Gaps        [ev]: 0.332282  7.137342&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A clear shrink of the DFT-LDA gap due to spin-orbit occurs. Note that, having 8 electrons in the fundamental cell, due to the spinorial nature of the wavefunction, with SOC we have 8 occupied bands, while only 4 without. Here a picture of the DFT band structure for the two cases.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_pwscf.png|600px|center|GaSb bands DFT]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the band structure of GaSb =&lt;br /&gt;
 &lt;br /&gt;
Now we will perform a G0W0 calculation to correct the DFT-LDA bandstructure. We assume that you are already familiar with the concept of screening needed to build up the GW self-energy and thus the QP corrections. Create a local folder &#039;&#039;My_inputs&#039;&#039; and generate the input for a G0W0 calculation within the plasmon-pole approximation using the following command: &lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA&lt;br /&gt;
 $ mkdir My_inputs&lt;br /&gt;
 $ yambo -p p -g n -V RL -F My_inputs/02_GW.in&lt;br /&gt;
However we also provide an input file with suggested parameters for this calculations inside the folder &#039;&#039;Solid_GaSb/Without_SOC/Yambo/Inputs&#039;&#039;. Remember: these parameters are system dependent and should be converged as you can see other GW tutorials (e.g. [[GW]] or [[GW convergence]]). Here we provide reasonable (but not fully converged) parameters to have a low computational cost but yet qualitatively meaningful results.&lt;br /&gt;
&lt;br /&gt;
The plane-waves cutoff for the wavefunctions and exchange part of the self-energy are set to 10 Ry. &lt;br /&gt;
 FFTGvecs =  10 Ry   # [FFT] Plane-waves&lt;br /&gt;
 EXXRLvcs=   10 Ry   # [XX] Exchange RL components&lt;br /&gt;
while we will use 40 bands, a plane-wave cut-off of 1 Ry, and a plasmon-pole energy of 20 eV to build up the screening matrix &lt;br /&gt;
 NGsBlkXp=    1 Ry  # [Xp] Response block size &lt;br /&gt;
 PPAPntXp= 20.  eV  # [Xp] PPA imaginary energy &lt;br /&gt;
 % BndsRnXp    &lt;br /&gt;
 1 | 40 |        # [Xp] Polarization function bands &lt;br /&gt;
 % &lt;br /&gt;
 % LongDrXp  &lt;br /&gt;
 1.000000 | 1.000000 | 1.000000 |        # [Xp] [cc] Electric Field &lt;br /&gt;
 %&lt;br /&gt;
The number of bands in the green function G to build up the GW self-energy is also 40 &lt;br /&gt;
 % GbndRnge    &lt;br /&gt;
 1 | 40 |                 # [GW] G[W] bands range &lt;br /&gt;
 %&lt;br /&gt;
with those parameters we will compute the correction only in the last 2 points of our grid, 28 and 29 and for the states from 3 to 6, setting the input variable &lt;br /&gt;
 %QPkrange                      &lt;br /&gt;
 28 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
As you can verify from your &#039;&#039;r-01_init_setup&#039;&#039; file 28 and 29 are the L and the Gamma point of the Brillouin zone. &lt;br /&gt;
 *X* K [28] :-0.500000 -0.500000 -0.500000 (rlu) * Comp.s 476 * weight    0.0078   &lt;br /&gt;
 ...   &lt;br /&gt;
 *X* K [29] : 0.000000  0.000000  0.000000 (rlu)  * Comp.s 531 * weight    0.0020   &lt;br /&gt;
 ...&lt;br /&gt;
You can now run the code using either your input file or the one provided in the Inputs folder &lt;br /&gt;
 $ yambo -F ../Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
The run will take some time. Indeed the code has first to compute the dipoles, then the screening within the plasmon pole approximation and finally the self-energy, first the exchange part Gv and then the correlation part G(W-v). &lt;br /&gt;
In the &amp;lt;code&amp;gt;GW_out&amp;lt;/code&amp;gt; folder you will find the &amp;lt;code&amp;gt;o-GW.qp&amp;lt;/code&amp;gt; file containing the GW corrections.&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &lt;br /&gt;
 #&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #&lt;br /&gt;
  ...&lt;br /&gt;
  29.00000    4.00000    0.00000    0.22802    1.07276&lt;br /&gt;
  29.00000    5.00000    0.33228    0.66303   -2.39219&lt;br /&gt;
  ...&lt;br /&gt;
Thus it is about 0.66-0.23=0.43 eV (not fully converged).&lt;br /&gt;
&lt;br /&gt;
We can also compute the G0W0 correction for all the k-point of the database. To this end open the input file &#039;&#039;../Inputs/02_GW.in&#039;&#039; (or your own) and edit the number of k-point to be computed &lt;br /&gt;
 %&lt;br /&gt;
 QPkrange                      1 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
If you have learned how to run the code in parallel you may also set the parallel environment input variables:&lt;br /&gt;
 X_all_q_CPU= &amp;amp;quot;2&amp;amp;quot;              # [PARALLEL] CPUs for each role &lt;br /&gt;
 X_all_q_ROLEs= &amp;amp;quot;q&amp;amp;quot;            # [PARALLEL] CPUs roles (q,k,c,v) &lt;br /&gt;
 SE_CPU= &amp;amp;quot;2&amp;amp;quot;                   # [PARALLEL] CPUs for each role &lt;br /&gt;
 SE_ROLEs= &amp;amp;quot;q&amp;amp;quot;                 # [PARALLEL] CPUs roles (q,qp,b)&lt;br /&gt;
Remember to use the same name after the -J option, so that the code will be able to use the informations from the previous run and avoid many calculations. &lt;br /&gt;
 $ mpirun -np 2 yambo -F Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
In the &#039;&#039;GW_out&#039;&#039; folder you will find now also the &#039;&#039;o-GW.qp_01&#039;&#039; file containg the GW corrections for all the k-points.&lt;br /&gt;
&lt;br /&gt;
Now you can enter the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; and repeat the same calculations. Remember that in the input file you will generate you should change all the band ranges doubling the number of states (do you understand why?) &amp;lt;code&amp;gt; % BndsRnXp    1 | 80 |        # [Xp] Polarization function bands % % GbndRnge    1 | 80 |                 # [GW] G[W] bands range % %QPkrange                      29 | 29 |   5 | 12|  # [GW] QP generalized Kpoint/Band indices %&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &amp;lt;code&amp;gt; # #  K-point    Band       Eo         E-Eo       Sc(Eo) #   ...   29.00000    8.00000    0.00000    0.21758    0.95843   29.00000    9.00000    0.06025    0.65362   -2.36544   ...&amp;lt;/code&amp;gt; Thus it is about 0.65-0.22=0.43 eV (not fully converged). Indeed the same result obtained without SOC. The resulting electronic gap is about 0.46 eV reasonably close to the experimental band gap of 0.72 eV. It is also a big improvment compared to the LDA band gap (less than 0.03 eV). This correction (indeed the slightly bigger value of 0.53 eV) will be used, in the form of a scissor operator, as a starting point to compute the optical spectra.&lt;br /&gt;
&lt;br /&gt;
Again we can also compute the G0W0 correction for all the k-point of the database. You can plot column 4 of the output file against column 3 to obtain a picture of the QP corrections. In the following figure we show the plot of the G0W0 correction (E_GoWo-E_LDA) vs the LDA eigenvalues. The corrections at the Gamma and the L point are marked with bigger red spots.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=400px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_GoWo_corrections.png|GaSb QP corrections without SOC &lt;br /&gt;
Image:GaSb GoWo corrections SOC.png|GaSb GoWo corrections with SOC&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
The &amp;amp;quot;scissor operator approach&amp;amp;quot; does not seem a very good approximation for GaSb. Indeed the quasi particle corrections are not constant, especially in the conduction band. For example the correction to the Gamma point is bigger than the corrections to all other k-points. This result however maybe due to the poor covergence parameters. If you would like to better investigate these results you should try do convergence tests. Since QP corrections are poorly sensitive to the spin-orbit interaction it is probably a good idea to do convergence without SOC.&lt;br /&gt;
&lt;br /&gt;
Here we also provide a plot of the band-structure at different levels of approximation: DFT, DFT+scissor, QP. The band structures are obtained from an interpolation of our k-points mesh and it is not very precise since, again, we are using a quite coarse sampling of the brillouine zone. Indeed we can see that already the interpolated DFT band structure deviates from the exact DFT band-structure, which has also been reported. In particular in the region nearby Gamma. However it gives quite nicely an overview of how the QP band structure compares with the DFT band stucture. The main effect is indeed an opening of the band-gap which can be described in terms of a scissor operator.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_yambo.png|600px|center|GaSb QP bands]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the optical properties of GaSb =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--{|&lt;br /&gt;
| [[File:SOC_GaSb_bands.png|600px|center|GaSb bands 1]]&lt;br /&gt;
| [[File:SOC_GaSb_absorption.png|600px|center|GaSb bands 2]]&lt;br /&gt;
|} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now turn our attention on the optical properties of the system. Here we will compute the dielectric function at different levels of approximations:&amp;lt;br /&amp;gt;&lt;br /&gt;
(i) at the IP-RPA level, thus using the Fermi golden rule with the KS energies and wave-functions&amp;lt;br /&amp;gt;&lt;br /&gt;
(ii) at the RPA level, thus also including the effect of the local fields&amp;lt;br /&amp;gt;&lt;br /&gt;
(iii) at the BSE level, thus including many-body effects, both correcting the KS energies (we will introduce a scissor obtained from the GW calculation) and considering the statically screened electron-hole interaction&lt;br /&gt;
&lt;br /&gt;
First, setup the calculation (initialization) in the usual way in the folder without SOC&lt;br /&gt;
 $ cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 $ yambo -J 01_init&lt;br /&gt;
and repeat the same inside the folder &#039;&#039;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&#039;&#039; before continuing.&lt;br /&gt;
&lt;br /&gt;
== RPA-IP absorption ==&lt;br /&gt;
&lt;br /&gt;
Create a local folder inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; which you will call &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt;, and create the input file:&lt;br /&gt;
 &amp;gt;cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o c -V RL -F My_inputs/03_IP-RPA.in&lt;br /&gt;
&lt;br /&gt;
As before, we also provide an input file with suggested parameters for this calculations. The kind of calculation is controlled by the input variable&lt;br /&gt;
 Chimod= &amp;quot;IP&amp;quot;                 # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1            RL    # [Xd] Response block size&lt;br /&gt;
These tells you that we are building up the dielectric function in G-space considering only on G vector, i.e. the G=0 component. The string Chimod= &amp;amp;quot;IP&amp;amp;quot; recalls us that this means we are neglecting the local fields effect.&lt;br /&gt;
&lt;br /&gt;
We set the plane-waves cutoff for the wavefunctions to&lt;br /&gt;
 FFTGvecs=  10  Ry   # [FFT] Plane-waves&lt;br /&gt;
Since we are interested into the optical spectrum calculation, only the Q=0 term, i.e. the first Q-point, is calculated&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
The number of bands we use is 20. This is a reasonable number of states to converge the IP-RPA optical spectrum in the VIS-UV range. (If you wish to calculate the EELS spectrum for q different from 0 probably more bands will be required.)&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 10 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
As you learned the dielectric function is a tensir and in principle three calculations for light polarized along x,y,z chould be done depending on the experimental setup. However GaSb is a system with cubic symmetry, thus any direction is equivalent. Here we decide to compute epsilon along the &amp;amp;quot;(1 1 1)&amp;amp;quot; direction.&lt;br /&gt;
 % LongDrXd&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation using either your input file or the one provided in the Inputs folder&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/03_IP-RPA.in  -J 03_IP-RPA -C 03_IP-RPA_out&lt;br /&gt;
&lt;br /&gt;
Inside the &amp;lt;code&amp;gt;03_IP-RPA&amp;lt;/code&amp;gt; folder you will find the databases created by the code (in this case just the dipoles), while in the &amp;lt;code&amp;gt;03_IP-RPA_out&amp;lt;/code&amp;gt; the report file and the output files for the dielectric function which describes the absorption (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;) and for its inverse (&amp;lt;code&amp;gt;o-03_IP-RPA.eel*&amp;lt;/code&amp;gt;), which describes the electron energy loss. You can plot them with your favorite software (for example gnuplot or xmgrace). The real and imaginary parts of the IP-RPA dielectric function are column 3 and 2 respectively of the file (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;). Using also the reference output file in the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; folder you can compare the spectrum with and without SOC.&lt;br /&gt;
&lt;br /&gt;
Now repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 20 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.jpg|600px|center|GaSb absorption RPA]]&lt;br /&gt;
If you wish to obtain a reasonable spectrum however the 6x6x6 kpts grid is not enough. In order to check the convergence with the number of k-points you should run the same kind of calculations on other k-points meshes, either using the ones we provided ot creating new ones using the input files in the Pwscf folder (see section [[more.php|More on GaSb]] for more advanced calculations).&lt;br /&gt;
&lt;br /&gt;
In the directories Reference_Outputs several RPA dielectric functions are saved with the dielectric function calculated with the 10x10x10 and the 14x14x14 k-grid. You will learn that within RPA spectra the lowest energy peak is under-estimated. Also the spectra with and without SOC look very similar and the SO splitting is almost not present. This is clearly due to the excitonic nature of the E1 peak which can be correctly described only including the electron-hole interaction.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== RPA absorption with local fieldds ==&lt;br /&gt;
&lt;br /&gt;
To also include the local fields effect you can generate the input with the command: &lt;br /&gt;
 &amp;gt;yambo -o c -k hartree -F My_inputs/04_RPA_LF.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
In the input file we provide you will see that now the chimod and size of the dynamical matrix are set to&lt;br /&gt;
 Chimod= &amp;amp;quot;Hartree&amp;amp;quot;       # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1       Ry    # [Xd] Response block size&lt;br /&gt;
&lt;br /&gt;
Including local fields the poles of absorption will move from KS transitions to many-electrons transitions (although we are still neglecting the electron-hole interaction). As a result you will need more states to converge the absorption spectrum. This is why we set the number of bands to 15:&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 15 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
while as before we will have&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 %&lt;br /&gt;
 LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/04_RPA_LF.in -J 04_RPA_LF -C 04_RPA_LF_out&lt;br /&gt;
&lt;br /&gt;
In the 04_RPA+LF_out folder you will fine the report and the output files as before. The real and imaginary parts of the RPA+LF dielectric function with local fields are column 3 and 2 respectively of the .eps file. While the corresponding IP-RPA spectra is reported in columns 5 and 4.&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 30 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
In the following picture we compare the result of IP-RPA and RPA+LF with SOC.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA_IP_vs_LF.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== BSE absorption with QP corrections ==&lt;br /&gt;
&lt;br /&gt;
As you probably know the inclusion of the electron-hole interaction makes the approach in G space not feasible. We have thus to compute the dielectric function in the electron-hole space, building up the excitonic hamiltonian. Thus to create the input file you can run the command:&lt;br /&gt;
 &amp;gt;yambo -o b -k sex -b -y h -V all -F My_inputs/05_BSE+scissor.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder. As before you, in the directory Inputs, you can find an example with suggested parameters. The plane-wave cutoffs used to expand wavefunctions is set to 10 Ry, the cut-off on the exchange interaction between the electron and the hole (i.e. for the local-fields) is set to 10 Ry (here we use a much higer value compared to the previous run since the computational cost of increasing this variable in the electron-hole space is very low). and, finally, the cut-off on the direct electron-hole interaction is set to 1 Ry (to build up this term, where the interaction is screened, we need to compute the static dielectric constant in G-space, thus increasing this value is computationally demanding).&lt;br /&gt;
 FFTGvecs= 10     Ry    # [FFT] Plane-waves&lt;br /&gt;
 BSENGexx= 10     Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=  1     Ry    # [BSK] Screened interaction block size&lt;br /&gt;
&lt;br /&gt;
Indeed in the input file you can also see the parameters used to compute the static dielectric function needed for the screened Coulomb term (W) of the BSE kernel. Here we use 40 bands and an energy cut-off of 1 Ry.&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 20 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 1            Ry    # [Xs] Response block size&lt;br /&gt;
&lt;br /&gt;
The input variable &amp;amp;quot;KfnQP_E&amp;amp;quot; can be used to include a scissor operator, i.e a opening of the DFT band gap. The value 0.53 eV is the coverged correction at Gamma obtained in the GW run. Here we will calculate the BSE assuming that the &amp;amp;quot;scissor operator approximation&amp;amp;quot; is valid for GaSb (to be checked in principle!) .&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  0.530000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
To build up the excitonic matrix we consider the states from 5 to 12, i.e. we are using 4 occupied and 4 unoccupied bands.&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and we will build up the dielectric function using a grid of 200 point in frequency space&lt;br /&gt;
 BEnSteps= 200                # [BSS] Energy steps&lt;br /&gt;
Finally, similarly as before, we will have&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
Remember that the BS kernel is written in the electron-hole space and its size is given by the relation&amp;lt;br /&amp;gt;&lt;br /&gt;
BS kernel size = Valence Bands × Conduction Bands × K-points in the whole BZ.&amp;lt;br /&amp;gt;&lt;br /&gt;
This means that in the case with SO we are building up a matrix 2x2=4 times larger of the corresponding calculation without spin-orbit (you can compare the input in With_SO/Yambo/Inputs / Without_SO/Yambo/Inputs and reference outputs in With_SO/Yambo/Reference_Outputs / With_SO/Yambo/Reference_Outputs)&lt;br /&gt;
&lt;br /&gt;
We are ready to run the BSE calculation:&lt;br /&gt;
 &amp;gt;yambo -F 05_BSE+scissor.in  -J 05_BSE -C 05_BSE_out&lt;br /&gt;
Inside the folder &amp;lt;code&amp;gt;05_BSE_out&amp;lt;/code&amp;gt; you should find the report file &amp;lt;code&amp;gt;r-05_BSE_optics_bse_bsk_bss_em1s&amp;lt;/code&amp;gt; ( Open it and look if everything is ok! ) and the two response files &amp;lt;code&amp;gt; o-05_BSE.eel_q1_haydock_bse &amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-05_BSE.eps_q1_haydock_bse&amp;lt;/code&amp;gt;. Again the real and imaginary parts of the BSE dielectric function are column 3 and 2 respectively, while the corresponding GW spectra are column 5 and 4.&lt;br /&gt;
&lt;br /&gt;
In the folder &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; you will find instead the DBs of the static screening (W) needed to build up the BSE kernel (&amp;lt;code&amp;gt;ndb.em1s&amp;lt;/code&amp;gt;) and the BSE matrix (&amp;lt;code&amp;gt;ndb.BS*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 | 20 |                 # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   5 | 12 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
If you do the corresponding calculations for the case without spin-orbits using the databases in the directory GaSb_nSO/YAMBO and inputs in GaSb_nSO/Inputs, the two BSE spectra should look like in this figure:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE_few_kpts.jpg|600px|center|GaSb absorption BSE gew kpts]]&lt;br /&gt;
As mentioned before the two spectra present spurious peaks ( as the first peak!) due to uncoverged k-point sampling. Nevertheless the splitting due to spin-orbit interaction is already visible in the peak around 2.1 eV.&lt;br /&gt;
A more converged (yet not fully converged calculation) would give the following results which compares very nicely with the experimental data:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE.png|600px|center|GaSb absorption BSE]]&lt;br /&gt;
&lt;br /&gt;
= Exciton analysis =&lt;br /&gt;
&lt;br /&gt;
In this part of the tutorial we show how to analyze the origin of the E1 peak in GaSb. Since the calculation with the SOC case is very demanding we will do that only for the case without SOC. So first of all enter the &amp;lt;code&amp;gt;Without_SOC/YAMBO/6x6x6_shifted&amp;lt;/code&amp;gt; folder and, if you didn&#039;t before, run the setup:&lt;br /&gt;
 &amp;gt;cd Without_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt;ls SAVE&lt;br /&gt;
 &amp;gt;yambo -J 01_init&lt;br /&gt;
 &amp;gt;ls SAVE r-01_init_setup&lt;br /&gt;
&lt;br /&gt;
Then create the &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; folder and the input file for a BSE&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o b -k sex -b -y d -V all -F My_inputs/05_BSE+shissor.in&lt;br /&gt;
&lt;br /&gt;
You can use the same parameters you used to compute the absorption with SOC previously. The number of bands will be the half of the case without SOC&lt;br /&gt;
 % BSEBands&lt;br /&gt;
  3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
Also this time you will use the to &amp;lt;code&amp;gt;&amp;amp;quot;d&amp;amp;quot;&amp;lt;/code&amp;gt; and uncomment the variable needed to Write to disk excitonic the WFs:&lt;br /&gt;
 BSSmod= &amp;amp;quot;d&amp;amp;quot;              # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft`&lt;br /&gt;
 WRbsWF                   # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
Then you have to run the BSE calculation (notice that, in case you already computed the BSE spectrum also for the case without SOC, the code can read the results from the provious BSE run skipping many steps)&lt;br /&gt;
 &amp;gt;yambo -F My_inuts/05_BSE+shissor.in  -J 05_BSE -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; folder you will now find a new database file called &amp;lt;code&amp;gt;ndb.BS_diago_Q01&amp;lt;/code&amp;gt;. This is what you need to analyze the exciton peaks running the post-processing code ypp.&lt;br /&gt;
&lt;br /&gt;
First of all you can run:&lt;br /&gt;
 &amp;gt;ypp -e s -J 05_BSE -C BSE_out&lt;br /&gt;
This run will sort in energy the excitonic eigenvalues writing their oscillator strenghts (see &amp;lt;code&amp;gt;o-06_bse.exc_E_sorted&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Then you can create the ypp input required to analize how each excitonic state is build up in terms of single-particle states:&lt;br /&gt;
 &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE&lt;br /&gt;
Put the index &amp;lt;code&amp;gt;#N&amp;lt;/code&amp;gt; of the exciton with higher strenght in the E_1 peak region&lt;br /&gt;
 &amp;gt;ypp -F My_inputs/05_BSE_ypp.in -J 05_BSE -C 06_BSE_out&lt;br /&gt;
You will find the two files &amp;lt;code&amp;gt;o-06_bse.exc_weights_at_#N&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-06_bse.exc_amplitude_at_#N&amp;lt;/code&amp;gt;. In these files you will find informations on the highest strenght exciton in the E1 peak region.&lt;br /&gt;
&lt;br /&gt;
= Other excercises =&lt;br /&gt;
&lt;br /&gt;
# Try to converge the G0W0 increasing the polarization RL size, the polarization bands, the number of bands in the Green function and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Try to converge the absorption spectra increasing the polarization RL size, the polarization bands, the number of bands to construct the excitonic matrix and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Plot the EELS spectrum obtained within IP-RPA and RPA with local fields. Also in this case you can check the effect of increasing the polarization bands. You may also try to do a resonant only calculation to see that the EELS cannot be described using only the resonant part of the response function.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;&amp;gt;M. Marsili, A. Molina-Sánchez, M. Palummo, D. Sangalli, A. Marini, [https://doi.org/10.1103/PhysRevB.103.155152  Phys. Rev. B &#039;&#039;&#039;103&#039;&#039;&#039;, 155152 (2021)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wiki&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Gallium_antimonide GaSb on wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kim&amp;quot;&amp;gt; Y.S. Kim et al. Phys. Rev. B &#039;&#039;&#039;82&#039;&#039;&#039;, 205212 (2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;rem&amp;quot;&amp;gt; I. N. Remediakis and Efthimios Kaxiras Phys. Rev. B &#039;&#039;&#039;59&#039;&#039;&#039;, 5336 (1999).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8916</id>
		<title>SOC</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8916"/>
		<updated>2025-07-31T10:26:20Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* Exciton analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Effect of spin-orbit interaction =&lt;br /&gt;
&lt;br /&gt;
= Introduction = &lt;br /&gt;
&lt;br /&gt;
The scope of this tutorial is to calculate the G0W0 corrections to the DFT-LDA band-structure and the BSE optical spectrum for a bulk semiconducting material, gallium antimonide (GaSb) &amp;lt;ref name=&amp;quot;wiki&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;kim&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;rem&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;. We will compare the results with and without the spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=250px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DFT band structure =&lt;br /&gt;
&lt;br /&gt;
For this tutorial we provide two state (GS) databases (DBs), one contains the GS-DBs with the effect of SOC included and one without. The idea is to repeat the same calculation for both database and compare the results and the performances of the code. As in other tutorials you can find the folder containing the input files for the pwscf code (Pwscf, in case you prefer to generate the GS-DBs by yourself) and the folder containing the GS-DBs, the reference input files and the reference output files for the yambo code (YAMBO). Instead of continuously jumping back and forth from the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;With_SOC&amp;lt;/code&amp;gt; folder we advice to open two terminals and keep one for the without SOC case and another for the with SOC case.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s have a look to the content of the folders. For example we can enter in the &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/&amp;lt;/code&amp;gt; folder &lt;br /&gt;
 $ cd Solid_GaSb/With_SOC/&lt;br /&gt;
 $ ls Pwscf YAMBO&lt;br /&gt;
 $ cd YAMBO&lt;br /&gt;
 $ ls 4x4x4_shifted+GAMMA &lt;br /&gt;
 6x6x6_shifted  10x10x10_shifted 14x14x14_shifted   Inputs  Reference_Outputs&lt;br /&gt;
&lt;br /&gt;
Inside the YAMBO folder there are indeed four folders corresponding to four differet k-points meshes. In this tutorial we will use the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; folder for the computation of the QP corrections within the GoWo approximation. It is a kpts grid obtained as the sum of a 4x4x4 k-points grid centered in Gamma and a 4x4x4 grid shifted. Instead for the computation of the optical properties we will use the &amp;lt;code&amp;gt;6x6x6_shifted&amp;lt;/code&amp;gt; folder. It is a 6x6x6 k-points grid shifted from Gamma. The other two folders, &amp;lt;code&amp;gt;10x10x10_shifted&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;14x14x14_shifted&amp;lt;/code&amp;gt; can be used to do a minimum convergence of the optical properties against the number of k-points (pay attention that the BSE calculations with bigger grids will be very memory and time demanding!).&lt;br /&gt;
&lt;br /&gt;
The first part of the tutorial is on the computation of the QP corrections. So let&#039;s enter the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; grid and, as seen in other tutorials run the Initialization:&lt;br /&gt;
&lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA/ &lt;br /&gt;
 $ yambo -J 01_init &lt;br /&gt;
Now compare the result of the two setup runs.&lt;br /&gt;
&lt;br /&gt;
With_SOC case:&lt;br /&gt;
&amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  5.046557&lt;br /&gt;
  VBM / CBm          [ev]:   0.00000   0.06025&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0008               0009-0200&lt;br /&gt;
  Indirect Gaps      [ev]:  0.06025   3.57546&amp;lt;/pre&amp;gt;&lt;br /&gt;
Without_SOC case:&lt;br /&gt;
 &amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  4.777401&lt;br /&gt;
  VBM / CBm          [ev]:  0.000000  0.332282&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0004               0005-0100&lt;br /&gt;
  Indirect Gaps      [ev]: 0.332282  3.620628&lt;br /&gt;
  Direct Gaps        [ev]: 0.332282  7.137342&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A clear shrink of the DFT-LDA gap due to spin-orbit occurs. Note that, having 8 electrons in the fundamental cell, due to the spinorial nature of the wavefunction, with SOC we have 8 occupied bands, while only 4 without. Here a picture of the DFT band structure for the two cases.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_pwscf.png|600px|center|GaSb bands DFT]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the band structure of GaSb =&lt;br /&gt;
 &lt;br /&gt;
Now we will perform a G0W0 calculation to correct the DFT-LDA bandstructure. We assume that you are already familiar with the concept of screening needed to build up the GW self-energy and thus the QP corrections. Create a local folder &#039;&#039;My_inputs&#039;&#039; and generate the input for a G0W0 calculation within the plasmon-pole approximation using the following command: &lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA&lt;br /&gt;
 $ mkdir My_inputs&lt;br /&gt;
 $ yambo -p p -g n -V RL -F My_inputs/02_GW.in&lt;br /&gt;
However we also provide an input file with suggested parameters for this calculations inside the folder &#039;&#039;Solid_GaSb/Without_SOC/Yambo/Inputs&#039;&#039;. Remember: these parameters are system dependent and should be converged as you can see other GW tutorials (e.g. [[GW]] or [[GW convergence]]). Here we provide reasonable (but not fully converged) parameters to have a low computational cost but yet qualitatively meaningful results.&lt;br /&gt;
&lt;br /&gt;
The plane-waves cutoff for the wavefunctions and exchange part of the self-energy are set to 10 Ry. &lt;br /&gt;
 FFTGvecs =  10 Ry   # [FFT] Plane-waves&lt;br /&gt;
 EXXRLvcs=   10 Ry   # [XX] Exchange RL components&lt;br /&gt;
while we will use 40 bands, a plane-wave cut-off of 1 Ry, and a plasmon-pole energy of 20 eV to build up the screening matrix &lt;br /&gt;
 NGsBlkXp=    1 Ry  # [Xp] Response block size &lt;br /&gt;
 PPAPntXp= 20.  eV  # [Xp] PPA imaginary energy &lt;br /&gt;
 % BndsRnXp    &lt;br /&gt;
 1 | 40 |        # [Xp] Polarization function bands &lt;br /&gt;
 % &lt;br /&gt;
 % LongDrXp  &lt;br /&gt;
 1.000000 | 1.000000 | 1.000000 |        # [Xp] [cc] Electric Field &lt;br /&gt;
 %&lt;br /&gt;
The number of bands in the green function G to build up the GW self-energy is also 40 &lt;br /&gt;
 % GbndRnge    &lt;br /&gt;
 1 | 40 |                 # [GW] G[W] bands range &lt;br /&gt;
 %&lt;br /&gt;
with those parameters we will compute the correction only in the last 2 points of our grid, 28 and 29 and for the states from 3 to 6, setting the input variable &lt;br /&gt;
 %QPkrange                      &lt;br /&gt;
 28 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
As you can verify from your &#039;&#039;r-01_init_setup&#039;&#039; file 28 and 29 are the L and the Gamma point of the Brillouin zone. &lt;br /&gt;
 *X* K [28] :-0.500000 -0.500000 -0.500000 (rlu) * Comp.s 476 * weight    0.0078   &lt;br /&gt;
 ...   &lt;br /&gt;
 *X* K [29] : 0.000000  0.000000  0.000000 (rlu)  * Comp.s 531 * weight    0.0020   &lt;br /&gt;
 ...&lt;br /&gt;
You can now run the code using either your input file or the one provided in the Inputs folder &lt;br /&gt;
 $ yambo -F ../Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
The run will take some time. Indeed the code has first to compute the dipoles, then the screening within the plasmon pole approximation and finally the self-energy, first the exchange part Gv and then the correlation part G(W-v). &lt;br /&gt;
In the &amp;lt;code&amp;gt;GW_out&amp;lt;/code&amp;gt; folder you will find the &amp;lt;code&amp;gt;o-GW.qp&amp;lt;/code&amp;gt; file containing the GW corrections.&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &lt;br /&gt;
 #&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #&lt;br /&gt;
  ...&lt;br /&gt;
  29.00000    4.00000    0.00000    0.22802    1.07276&lt;br /&gt;
  29.00000    5.00000    0.33228    0.66303   -2.39219&lt;br /&gt;
  ...&lt;br /&gt;
Thus it is about 0.66-0.23=0.43 eV (not fully converged).&lt;br /&gt;
&lt;br /&gt;
We can also compute the G0W0 correction for all the k-point of the database. To this end open the input file &#039;&#039;../Inputs/02_GW.in&#039;&#039; (or your own) and edit the number of k-point to be computed &lt;br /&gt;
 %&lt;br /&gt;
 QPkrange                      1 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
If you have learned how to run the code in parallel you may also set the parallel environment input variables:&lt;br /&gt;
 X_all_q_CPU= &amp;amp;quot;2&amp;amp;quot;              # [PARALLEL] CPUs for each role &lt;br /&gt;
 X_all_q_ROLEs= &amp;amp;quot;q&amp;amp;quot;            # [PARALLEL] CPUs roles (q,k,c,v) &lt;br /&gt;
 SE_CPU= &amp;amp;quot;2&amp;amp;quot;                   # [PARALLEL] CPUs for each role &lt;br /&gt;
 SE_ROLEs= &amp;amp;quot;q&amp;amp;quot;                 # [PARALLEL] CPUs roles (q,qp,b)&lt;br /&gt;
Remember to use the same name after the -J option, so that the code will be able to use the informations from the previous run and avoid many calculations. &lt;br /&gt;
 $ mpirun -np 2 yambo -F Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
In the &#039;&#039;GW_out&#039;&#039; folder you will find now also the &#039;&#039;o-GW.qp_01&#039;&#039; file containg the GW corrections for all the k-points.&lt;br /&gt;
&lt;br /&gt;
Now you can enter the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; and repeat the same calculations. Remember that in the input file you will generate you should change all the band ranges doubling the number of states (do you understand why?) &amp;lt;code&amp;gt; % BndsRnXp    1 | 80 |        # [Xp] Polarization function bands % % GbndRnge    1 | 80 |                 # [GW] G[W] bands range % %QPkrange                      29 | 29 |   5 | 12|  # [GW] QP generalized Kpoint/Band indices %&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &amp;lt;code&amp;gt; # #  K-point    Band       Eo         E-Eo       Sc(Eo) #   ...   29.00000    8.00000    0.00000    0.21758    0.95843   29.00000    9.00000    0.06025    0.65362   -2.36544   ...&amp;lt;/code&amp;gt; Thus it is about 0.65-0.22=0.43 eV (not fully converged). Indeed the same result obtained without SOC. The resulting electronic gap is about 0.46 eV reasonably close to the experimental band gap of 0.72 eV. It is also a big improvment compared to the LDA band gap (less than 0.03 eV). This correction (indeed the slightly bigger value of 0.53 eV) will be used, in the form of a scissor operator, as a starting point to compute the optical spectra.&lt;br /&gt;
&lt;br /&gt;
Again we can also compute the G0W0 correction for all the k-point of the database. You can plot column 4 of the output file against column 3 to obtain a picture of the QP corrections. In the following figure we show the plot of the G0W0 correction (E_GoWo-E_LDA) vs the LDA eigenvalues. The corrections at the Gamma and the L point are marked with bigger red spots.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=400px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_GoWo_corrections.png|GaSb QP corrections without SOC &lt;br /&gt;
Image:GaSb GoWo corrections SOC.png|GaSb GoWo corrections with SOC&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
The &amp;amp;quot;scissor operator approach&amp;amp;quot; does not seem a very good approximation for GaSb. Indeed the quasi particle corrections are not constant, especially in the conduction band. For example the correction to the Gamma point is bigger than the corrections to all other k-points. This result however maybe due to the poor covergence parameters. If you would like to better investigate these results you should try do convergence tests. Since QP corrections are poorly sensitive to the spin-orbit interaction it is probably a good idea to do convergence without SOC.&lt;br /&gt;
&lt;br /&gt;
Here we also provide a plot of the band-structure at different levels of approximation: DFT, DFT+scissor, QP. The band structures are obtained from an interpolation of our k-points mesh and it is not very precise since, again, we are using a quite coarse sampling of the brillouine zone. Indeed we can see that already the interpolated DFT band structure deviates from the exact DFT band-structure, which has also been reported. In particular in the region nearby Gamma. However it gives quite nicely an overview of how the QP band structure compares with the DFT band stucture. The main effect is indeed an opening of the band-gap which can be described in terms of a scissor operator.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_yambo.png|600px|center|GaSb QP bands]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the optical properties of GaSb =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--{|&lt;br /&gt;
| [[File:SOC_GaSb_bands.png|600px|center|GaSb bands 1]]&lt;br /&gt;
| [[File:SOC_GaSb_absorption.png|600px|center|GaSb bands 2]]&lt;br /&gt;
|} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now turn our attention on the optical properties of the system. Here we will compute the dielectric function at different levels of approximations:&amp;lt;br /&amp;gt;&lt;br /&gt;
(i) at the IP-RPA level, thus using the Fermi golden rule with the KS energies and wave-functions&amp;lt;br /&amp;gt;&lt;br /&gt;
(ii) at the RPA level, thus also including the effect of the local fields&amp;lt;br /&amp;gt;&lt;br /&gt;
(iii) at the BSE level, thus including many-body effects, both correcting the KS energies (we will introduce a scissor obtained from the GW calculation) and considering the statically screened electron-hole interaction&lt;br /&gt;
&lt;br /&gt;
First, setup the calculation (initialization) in the usual way in the folder without SOC&lt;br /&gt;
 $ cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 $ yambo -J 01_init&lt;br /&gt;
and repeat the same inside the folder &#039;&#039;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&#039;&#039; before continuing.&lt;br /&gt;
&lt;br /&gt;
== RPA-IP absorption ==&lt;br /&gt;
&lt;br /&gt;
Create a local folder inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; which you will call &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt;, and create the input file:&lt;br /&gt;
 &amp;gt;cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o c -V RL -F My_inputs/03_IP-RPA.in&lt;br /&gt;
&lt;br /&gt;
As before, we also provide an input file with suggested parameters for this calculations. The kind of calculation is controlled by the input variable&lt;br /&gt;
 Chimod= &amp;quot;IP&amp;quot;                 # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1            RL    # [Xd] Response block size&lt;br /&gt;
These tells you that we are building up the dielectric function in G-space considering only on G vector, i.e. the G=0 component. The string Chimod= &amp;amp;quot;IP&amp;amp;quot; recalls us that this means we are neglecting the local fields effect.&lt;br /&gt;
&lt;br /&gt;
We set the plane-waves cutoff for the wavefunctions to&lt;br /&gt;
 FFTGvecs=  10  Ry   # [FFT] Plane-waves&lt;br /&gt;
Since we are interested into the optical spectrum calculation, only the Q=0 term, i.e. the first Q-point, is calculated&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
The number of bands we use is 20. This is a reasonable number of states to converge the IP-RPA optical spectrum in the VIS-UV range. (If you wish to calculate the EELS spectrum for q different from 0 probably more bands will be required.)&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 10 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
As you learned the dielectric function is a tensir and in principle three calculations for light polarized along x,y,z chould be done depending on the experimental setup. However GaSb is a system with cubic symmetry, thus any direction is equivalent. Here we decide to compute epsilon along the &amp;amp;quot;(1 1 1)&amp;amp;quot; direction.&lt;br /&gt;
 % LongDrXd&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation using either your input file or the one provided in the Inputs folder&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/03_IP-RPA.in  -J 03_IP-RPA -C 03_IP-RPA_out&lt;br /&gt;
&lt;br /&gt;
Inside the &amp;lt;code&amp;gt;03_IP-RPA&amp;lt;/code&amp;gt; folder you will find the databases created by the code (in this case just the dipoles), while in the &amp;lt;code&amp;gt;03_IP-RPA_out&amp;lt;/code&amp;gt; the report file and the output files for the dielectric function which describes the absorption (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;) and for its inverse (&amp;lt;code&amp;gt;o-03_IP-RPA.eel*&amp;lt;/code&amp;gt;), which describes the electron energy loss. You can plot them with your favorite software (for example gnuplot or xmgrace). The real and imaginary parts of the IP-RPA dielectric function are column 3 and 2 respectively of the file (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;). Using also the reference output file in the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; folder you can compare the spectrum with and without SOC.&lt;br /&gt;
&lt;br /&gt;
Now repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 20 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.jpg|600px|center|GaSb absorption RPA]]&lt;br /&gt;
If you wish to obtain a reasonable spectrum however the 6x6x6 kpts grid is not enough. In order to check the convergence with the number of k-points you should run the same kind of calculations on other k-points meshes, either using the ones we provided ot creating new ones using the input files in the Pwscf folder (see section [[more.php|More on GaSb]] for more advanced calculations).&lt;br /&gt;
&lt;br /&gt;
In the directories Reference_Outputs several RPA dielectric functions are saved with the dielectric function calculated with the 10x10x10 and the 14x14x14 k-grid. You will learn that within RPA spectra the lowest energy peak is under-estimated. Also the spectra with and without SOC look very similar and the SO splitting is almost not present. This is clearly due to the excitonic nature of the E1 peak which can be correctly described only including the electron-hole interaction.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== RPA absorption with local fieldds ==&lt;br /&gt;
&lt;br /&gt;
To also include the local fields effect you can generate the input with the command: &lt;br /&gt;
 &amp;gt;yambo -o c -k hartree -F My_inputs/04_RPA_LF.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
In the input file we provide you will see that now the chimod and size of the dynamical matrix are set to&lt;br /&gt;
 Chimod= &amp;amp;quot;Hartree&amp;amp;quot;       # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1       Ry    # [Xd] Response block size&lt;br /&gt;
&lt;br /&gt;
Including local fields the poles of absorption will move from KS transitions to many-electrons transitions (although we are still neglecting the electron-hole interaction). As a result you will need more states to converge the absorption spectrum. This is why we set the number of bands to 15:&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 15 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
while as before we will have&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 %&lt;br /&gt;
 LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/04_RPA_LF.in -J 04_RPA_LF -C 04_RPA_LF_out&lt;br /&gt;
&lt;br /&gt;
In the 04_RPA+LF_out folder you will fine the report and the output files as before. The real and imaginary parts of the RPA+LF dielectric function with local fields are column 3 and 2 respectively of the .eps file. While the corresponding IP-RPA spectra is reported in columns 5 and 4.&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 30 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
In the following picture we compare the result of IP-RPA and RPA+LF with SOC.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA_IP_vs_LF.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== BSE absorption with QP corrections ==&lt;br /&gt;
&lt;br /&gt;
As you probably know the inclusion of the electron-hole interaction makes the approach in G space not feaseble. We have thus to compute the dielectric function in the electron-hole space, building up the excitonic hamiltonian. Thus to create the input file you can run the command: &amp;lt;code&amp;gt; &amp;gt;yambo -o b -k sex -b -y h -V all -F My_inputs/05_BSE+scissor.in&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder. As before you, in the directory Inputs, you can find an example with suggested parameters. The plane-wave cutoffs used to expand wavefunctions is set to 10 Ry, the cut-off on the exchange interaction between the electron and the hole (i.e. for the local-fields) is set to 10 Ry (here we use a much higer value compared to the previous run since the computational cost of increasing this variable in the electron-hole space is very low). and, finally, the cut-off on the direct electron-hole interaction is set to 1 Ry (to build up this term, where the interaction is screened, we need to compute the static dielectric constant in G-space, thus increasing this value is computationally demanding). &amp;lt;code&amp;gt; FFTGvecs= 10     Ry    # [FFT] Plane-waves BSENGexx= 10     Ry    # [BSK] Exchange components BSENGBlk=  1     Ry    # [BSK] Screened interaction block size&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Indeed in the input file you can also see the parameters used to compute the static dielectric function needed for the screened Coulomb term (W) of the BSE kernel. Here we use 40 bands and an energy cut-off of 1 Ry. &amp;lt;code&amp;gt; % BndsRnXs    1 | 20 |                 # [Xs] Polarization function bands % NGsBlkXs= 1            Ry    # [Xs] Response block size&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
The input variable &amp;amp;quot;KfnQP_E&amp;amp;quot; can be used to include a scissor operator, i.e a opening of the DFT band gap. The value 0.53 eV is the coverged correction at Gamma obtained in the GW run. Here we will calculate the BSE assuming that the &amp;amp;quot;scissor operator approximation&amp;amp;quot; is valid for GaSb (to be checked in principle!) . &amp;lt;code&amp;gt; % KfnQP_E  0.530000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim %&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
To build up the excitonic matrix we consider the states from 5 to 12, i.e. we are using 4 occupied and 4 unoccupied bands. &amp;lt;code&amp;gt; % BSEBands   3 | 6 |          # [BSK] Bands range %&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
and we will build up the dielectric function using a grid of 200 point in frequency space &amp;lt;code&amp;gt; BEnSteps= 200                # [BSS] Energy steps&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Finally, similarly as before, we will have &amp;lt;code&amp;gt; % LongDrXs  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field %&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Remember that the BS kernel is written in the electron-hole space and its size is given by the relation&amp;lt;br /&amp;gt;&lt;br /&gt;
BS kernel size = Valence Bands × Conduction Bands × K-points in the whole BZ.&amp;lt;br /&amp;gt;&lt;br /&gt;
This means that in the case with SO we are building up a matrix 2x2=4 times larger of the corresponding calculation without spin-orbit (you can compare the input in With_SO/Yambo/Inputs / Without_SO/Yambo/Inputs and reference outputs in With_SO/Yambo/Reference_Outputs / With_SO/Yambo/Reference_Outputs)&lt;br /&gt;
&lt;br /&gt;
We are ready to run the BSE calculation: &amp;lt;code&amp;gt; &amp;gt;yambo -F 05_BSE+scissor.in  -J 05_BSE -C 05_BSE_out&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Inside the folder &amp;lt;code&amp;gt;05_BSE_out&amp;lt;/code&amp;gt; you should find the report file &amp;lt;code&amp;gt;r-05_BSE_optics_bse_bsk_bss_em1s&amp;lt;/code&amp;gt; ( Open it and look if everything is ok! ) and the two response files &amp;lt;code&amp;gt; o-05_BSE.eel_q1_haydock_bse &amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-05_BSE.eps_q1_haydock_bse&amp;lt;/code&amp;gt;. Again the real and imaginary parts of the BSE dielectric function are column 3 and 2 respectively, while the corresponding GW spectra are column 5 and 4.&lt;br /&gt;
&lt;br /&gt;
In the folder &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; you will find instead the DBs of the static screening (W) needed to build up the BSE kernel (&amp;lt;code&amp;gt;ndb.em1s&amp;lt;/code&amp;gt;) and the BSE matrix (&amp;lt;code&amp;gt;ndb.BS*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use &amp;lt;code&amp;gt; % BndsRnXs    1 | 20 |                 # [Xs] Polarization function bands % % BSEBands   5 | 12 |          # [BSK] Bands range %&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
If you do the corresponding calculations for the case without spin-orbits using the databases in the directory GaSb_nSO/YAMBO and inputs in GaSb_nSO/Inputs, the two BSE spectra should look like in this figure:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE_few_kpts.jpg|600px|center|GaSb absorption BSE gew kpts]]&lt;br /&gt;
As mentioned before the two spectra present spurious peaks ( as the first peak!) due to uncoverged k-point sampling. Nevertheless the splitting due to spin-orbit interaction is already visible in the peak around 2.1 eV.&lt;br /&gt;
A more converged (yet not fully converged calculation) would give the following results which compares very nicely with the experimental data:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE.png|600px|center|GaSb absorption BSE]]&lt;br /&gt;
&lt;br /&gt;
= Exciton analysis =&lt;br /&gt;
&lt;br /&gt;
In this part of the tutorial we show how to analyze the origin of the E1 peak in GaSb. Since the calculation with the SOC case is very demanding we will do that only for the case without SOC. So first of all enter the &amp;lt;code&amp;gt;Without_SOC/YAMBO/6x6x6_shifted&amp;lt;/code&amp;gt; folder and, if you didn&#039;t before, run the setup:&lt;br /&gt;
 &amp;gt;cd Without_SOC/YAMBO/6x6x6_shifted&lt;br /&gt;
 &amp;gt;ls SAVE&lt;br /&gt;
 &amp;gt;yambo -J 01_init&lt;br /&gt;
 &amp;gt;ls SAVE r-01_init_setup&lt;br /&gt;
&lt;br /&gt;
Then create the &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; folder and the input file for a BSE&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o b -k sex -b -y d -V all -F My_inputs/05_BSE+shissor.in&lt;br /&gt;
&lt;br /&gt;
You can use the same parameters you used to compute the absorption with SOC previously. The number of bands will be the half of the case without SOC&lt;br /&gt;
 % BSEBands&lt;br /&gt;
  3 | 6 |          # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
Also this time you will use the to &amp;lt;code&amp;gt;&amp;amp;quot;d&amp;amp;quot;&amp;lt;/code&amp;gt; and uncomment the variable needed to Write to disk excitonic the WFs:&lt;br /&gt;
 BSSmod= &amp;amp;quot;d&amp;amp;quot;              # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft`&lt;br /&gt;
 WRbsWF                   # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
Then you have to run the BSE calculation (notice that, in case you already computed the BSE spectrum also for the case without SOC, the code can read the results from the provious BSE run skipping many steps)&lt;br /&gt;
 &amp;gt;yambo -F My_inuts/05_BSE+shissor.in  -J 05_BSE -C 05_BSE_out&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; folder you will now find a new database file called &amp;lt;code&amp;gt;ndb.BS_diago_Q01&amp;lt;/code&amp;gt;. This is what you need to analyze the exciton peaks running the post-processing code ypp.&lt;br /&gt;
&lt;br /&gt;
First of all you can run:&lt;br /&gt;
 &amp;gt;ypp -e s -J 05_BSE -C BSE_out&lt;br /&gt;
This run will sort in energy the excitonic eigenvalues writing their oscillator strenghts (see &amp;lt;code&amp;gt;o-06_bse.exc_E_sorted&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Then you can create the ypp input required to analize how each excitonic state is build up in terms of single-particle states:&lt;br /&gt;
 &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE&lt;br /&gt;
Put the index &amp;lt;code&amp;gt;#N&amp;lt;/code&amp;gt; of the exciton with higher strenght in the E_1 peak region&lt;br /&gt;
 &amp;gt;ypp -F My_inputs/05_BSE_ypp.in -J 05_BSE -C 06_BSE_out&lt;br /&gt;
You will find the two files &amp;lt;code&amp;gt;o-06_bse.exc_weights_at_#N&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-06_bse.exc_amplitude_at_#N&amp;lt;/code&amp;gt;. In these files you will find informations on the highest strenght exciton in the E1 peak region.&lt;br /&gt;
&lt;br /&gt;
= Other excercises =&lt;br /&gt;
&lt;br /&gt;
# Try to converge the G0W0 increasing the polarization RL size, the polarization bands, the number of bands in the Green function and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Try to converge the absorption spectra increasing the polarization RL size, the polarization bands, the number of bands to construct the excitonic matrix and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Plot the EELS spectrum obtained within IP-RPA and RPA with local fields. Also in this case you can check the effect of increasing the polarization bands. You may also try to do a resonant only calculation to see that the EELS cannot be described using only the resonant part of the response function.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;&amp;gt;M. Marsili, A. Molina-Sánchez, M. Palummo, D. Sangalli, A. Marini, [https://doi.org/10.1103/PhysRevB.103.155152  Phys. Rev. B &#039;&#039;&#039;103&#039;&#039;&#039;, 155152 (2021)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wiki&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Gallium_antimonide GaSb on wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kim&amp;quot;&amp;gt; Y.S. Kim et al. Phys. Rev. B &#039;&#039;&#039;82&#039;&#039;&#039;, 205212 (2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;rem&amp;quot;&amp;gt; I. N. Remediakis and Efthimios Kaxiras Phys. Rev. B &#039;&#039;&#039;59&#039;&#039;&#039;, 5336 (1999).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8915</id>
		<title>SOC</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8915"/>
		<updated>2025-07-31T09:35:35Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* RPA-IP absorption */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Effect of spin-orbit interaction =&lt;br /&gt;
&lt;br /&gt;
= Introduction = &lt;br /&gt;
&lt;br /&gt;
The scope of this tutorial is to calculate the G0W0 corrections to the DFT-LDA band-structure and the BSE optical spectrum for a bulk semiconducting material, gallium antimonide (GaSb) &amp;lt;ref name=&amp;quot;wiki&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;kim&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;rem&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;. We will compare the results with and without the spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=250px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DFT band structure =&lt;br /&gt;
&lt;br /&gt;
For this tutorial we provide two state (GS) databases (DBs), one contains the GS-DBs with the effect of SOC included and one without. The idea is to repeat the same calculation for both database and compare the results and the performances of the code. As in other tutorials you can find the folder containing the input files for the pwscf code (Pwscf, in case you prefer to generate the GS-DBs by yourself) and the folder containing the GS-DBs, the reference input files and the reference output files for the yambo code (YAMBO). Instead of continuously jumping back and forth from the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;With_SOC&amp;lt;/code&amp;gt; folder we advice to open two terminals and keep one for the without SOC case and another for the with SOC case.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s have a look to the content of the folders. For example we can enter in the &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/&amp;lt;/code&amp;gt; folder &lt;br /&gt;
 $ cd Solid_GaSb/With_SOC/&lt;br /&gt;
 $ ls Pwscf YAMBO&lt;br /&gt;
 $ cd YAMBO&lt;br /&gt;
 $ ls 4x4x4_shifted+GAMMA &lt;br /&gt;
 6x6x6_shifted  10x10x10_shifted 14x14x14_shifted   Inputs  Reference_Outputs&lt;br /&gt;
&lt;br /&gt;
Inside the YAMBO folder there are indeed four folders corresponding to four differet k-points meshes. In this tutorial we will use the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; folder for the computation of the QP corrections within the GoWo approximation. It is a kpts grid obtained as the sum of a 4x4x4 k-points grid centered in Gamma and a 4x4x4 grid shifted. Instead for the computation of the optical properties we will use the &amp;lt;code&amp;gt;6x6x6_shifted&amp;lt;/code&amp;gt; folder. It is a 6x6x6 k-points grid shifted from Gamma. The other two folders, &amp;lt;code&amp;gt;10x10x10_shifted&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;14x14x14_shifted&amp;lt;/code&amp;gt; can be used to do a minimum convergence of the optical properties against the number of k-points (pay attention that the BSE calculations with bigger grids will be very memory and time demanding!).&lt;br /&gt;
&lt;br /&gt;
The first part of the tutorial is on the computation of the QP corrections. So let&#039;s enter the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; grid and, as seen in other tutorials run the Initialization:&lt;br /&gt;
&lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA/ &lt;br /&gt;
 $ yambo -J 01_init &lt;br /&gt;
Now compare the result of the two setup runs.&lt;br /&gt;
&lt;br /&gt;
With_SOC case:&lt;br /&gt;
&amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  5.046557&lt;br /&gt;
  VBM / CBm          [ev]:   0.00000   0.06025&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0008               0009-0200&lt;br /&gt;
  Indirect Gaps      [ev]:  0.06025   3.57546&amp;lt;/pre&amp;gt;&lt;br /&gt;
Without_SOC case:&lt;br /&gt;
 &amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  4.777401&lt;br /&gt;
  VBM / CBm          [ev]:  0.000000  0.332282&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0004               0005-0100&lt;br /&gt;
  Indirect Gaps      [ev]: 0.332282  3.620628&lt;br /&gt;
  Direct Gaps        [ev]: 0.332282  7.137342&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A clear shrink of the DFT-LDA gap due to spin-orbit occurs. Note that, having 8 electrons in the fundamental cell, due to the spinorial nature of the wavefunction, with SOC we have 8 occupied bands, while only 4 without. Here a picture of the DFT band structure for the two cases.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_pwscf.png|600px|center|GaSb bands DFT]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the band structure of GaSb =&lt;br /&gt;
 &lt;br /&gt;
Now we will perform a G0W0 calculation to correct the DFT-LDA bandstructure. We assume that you are already familiar with the concept of screening needed to build up the GW self-energy and thus the QP corrections. Create a local folder &#039;&#039;My_inputs&#039;&#039; and generate the input for a G0W0 calculation within the plasmon-pole approximation using the following command: &lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA&lt;br /&gt;
 $ mkdir My_inputs&lt;br /&gt;
 $ yambo -p p -g n -V RL -F My_inputs/02_GW.in&lt;br /&gt;
However we also provide an input file with suggested parameters for this calculations inside the folder &#039;&#039;Solid_GaSb/Without_SOC/Yambo/Inputs&#039;&#039;. Remember: these parameters are system dependent and should be converged as you can see other GW tutorials (e.g. [[GW]] or [[GW convergence]]). Here we provide reasonable (but not fully converged) parameters to have a low computational cost but yet qualitatively meaningful results.&lt;br /&gt;
&lt;br /&gt;
The plane-waves cutoff for the wavefunctions and exchange part of the self-energy are set to 10 Ry. &lt;br /&gt;
 FFTGvecs =  10 Ry   # [FFT] Plane-waves&lt;br /&gt;
 EXXRLvcs=   10 Ry   # [XX] Exchange RL components&lt;br /&gt;
while we will use 40 bands, a plane-wave cut-off of 1 Ry, and a plasmon-pole energy of 20 eV to build up the screening matrix &lt;br /&gt;
 NGsBlkXp=    1 Ry  # [Xp] Response block size &lt;br /&gt;
 PPAPntXp= 20.  eV  # [Xp] PPA imaginary energy &lt;br /&gt;
 % BndsRnXp    &lt;br /&gt;
 1 | 40 |        # [Xp] Polarization function bands &lt;br /&gt;
 % &lt;br /&gt;
 % LongDrXp  &lt;br /&gt;
 1.000000 | 1.000000 | 1.000000 |        # [Xp] [cc] Electric Field &lt;br /&gt;
 %&lt;br /&gt;
The number of bands in the green function G to build up the GW self-energy is also 40 &lt;br /&gt;
 % GbndRnge    &lt;br /&gt;
 1 | 40 |                 # [GW] G[W] bands range &lt;br /&gt;
 %&lt;br /&gt;
with those parameters we will compute the correction only in the last 2 points of our grid, 28 and 29 and for the states from 3 to 6, setting the input variable &lt;br /&gt;
 %QPkrange                      &lt;br /&gt;
 28 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
As you can verify from your &#039;&#039;r-01_init_setup&#039;&#039; file 28 and 29 are the L and the Gamma point of the Brillouin zone. &lt;br /&gt;
 *X* K [28] :-0.500000 -0.500000 -0.500000 (rlu) * Comp.s 476 * weight    0.0078   &lt;br /&gt;
 ...   &lt;br /&gt;
 *X* K [29] : 0.000000  0.000000  0.000000 (rlu)  * Comp.s 531 * weight    0.0020   &lt;br /&gt;
 ...&lt;br /&gt;
You can now run the code using either your input file or the one provided in the Inputs folder &lt;br /&gt;
 $ yambo -F ../Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
The run will take some time. Indeed the code has first to compute the dipoles, then the screening within the plasmon pole approximation and finally the self-energy, first the exchange part Gv and then the correlation part G(W-v). &lt;br /&gt;
In the &amp;lt;code&amp;gt;GW_out&amp;lt;/code&amp;gt; folder you will find the &amp;lt;code&amp;gt;o-GW.qp&amp;lt;/code&amp;gt; file containing the GW corrections.&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &lt;br /&gt;
 #&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #&lt;br /&gt;
  ...&lt;br /&gt;
  29.00000    4.00000    0.00000    0.22802    1.07276&lt;br /&gt;
  29.00000    5.00000    0.33228    0.66303   -2.39219&lt;br /&gt;
  ...&lt;br /&gt;
Thus it is about 0.66-0.23=0.43 eV (not fully converged).&lt;br /&gt;
&lt;br /&gt;
We can also compute the G0W0 correction for all the k-point of the database. To this end open the input file &#039;&#039;../Inputs/02_GW.in&#039;&#039; (or your own) and edit the number of k-point to be computed &lt;br /&gt;
 %&lt;br /&gt;
 QPkrange                      1 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
If you have learned how to run the code in parallel you may also set the parallel environment input variables:&lt;br /&gt;
 X_all_q_CPU= &amp;amp;quot;2&amp;amp;quot;              # [PARALLEL] CPUs for each role &lt;br /&gt;
 X_all_q_ROLEs= &amp;amp;quot;q&amp;amp;quot;            # [PARALLEL] CPUs roles (q,k,c,v) &lt;br /&gt;
 SE_CPU= &amp;amp;quot;2&amp;amp;quot;                   # [PARALLEL] CPUs for each role &lt;br /&gt;
 SE_ROLEs= &amp;amp;quot;q&amp;amp;quot;                 # [PARALLEL] CPUs roles (q,qp,b)&lt;br /&gt;
Remember to use the same name after the -J option, so that the code will be able to use the informations from the previous run and avoid many calculations. &lt;br /&gt;
 $ mpirun -np 2 yambo -F Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
In the &#039;&#039;GW_out&#039;&#039; folder you will find now also the &#039;&#039;o-GW.qp_01&#039;&#039; file containg the GW corrections for all the k-points.&lt;br /&gt;
&lt;br /&gt;
Now you can enter the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; and repeat the same calculations. Remember that in the input file you will generate you should change all the band ranges doubling the number of states (do you understand why?) &amp;lt;code&amp;gt; % BndsRnXp    1 | 80 |        # [Xp] Polarization function bands % % GbndRnge    1 | 80 |                 # [GW] G[W] bands range % %QPkrange                      29 | 29 |   5 | 12|  # [GW] QP generalized Kpoint/Band indices %&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &amp;lt;code&amp;gt; # #  K-point    Band       Eo         E-Eo       Sc(Eo) #   ...   29.00000    8.00000    0.00000    0.21758    0.95843   29.00000    9.00000    0.06025    0.65362   -2.36544   ...&amp;lt;/code&amp;gt; Thus it is about 0.65-0.22=0.43 eV (not fully converged). Indeed the same result obtained without SOC. The resulting electronic gap is about 0.46 eV reasonably close to the experimental band gap of 0.72 eV. It is also a big improvment compared to the LDA band gap (less than 0.03 eV). This correction (indeed the slightly bigger value of 0.53 eV) will be used, in the form of a scissor operator, as a starting point to compute the optical spectra.&lt;br /&gt;
&lt;br /&gt;
Again we can also compute the G0W0 correction for all the k-point of the database. You can plot column 4 of the output file against column 3 to obtain a picture of the QP corrections. In the following figure we show the plot of the G0W0 correction (E_GoWo-E_LDA) vs the LDA eigenvalues. The corrections at the Gamma and the L point are marked with bigger red spots.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=400px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_GoWo_corrections.png|GaSb QP corrections without SOC &lt;br /&gt;
Image:GaSb GoWo corrections SOC.png|GaSb GoWo corrections with SOC&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
The &amp;amp;quot;scissor operator approach&amp;amp;quot; does not seem a very good approximation for GaSb. Indeed the quasi particle corrections are not constant, especially in the conduction band. For example the correction to the Gamma point is bigger than the corrections to all other k-points. This result however maybe due to the poor covergence parameters. If you would like to better investigate these results you should try do convergence tests. Since QP corrections are poorly sensitive to the spin-orbit interaction it is probably a good idea to do convergence without SOC.&lt;br /&gt;
&lt;br /&gt;
Here we also provide a plot of the band-structure at different levels of approximation: DFT, DFT+scissor, QP. The band structures are obtained from an interpolation of our k-points mesh and it is not very precise since, again, we are using a quite coarse sampling of the brillouine zone. Indeed we can see that already the interpolated DFT band structure deviates from the exact DFT band-structure, which has also been reported. In particular in the region nearby Gamma. However it gives quite nicely an overview of how the QP band structure compares with the DFT band stucture. The main effect is indeed an opening of the band-gap which can be described in terms of a scissor operator.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_yambo.png|600px|center|GaSb QP bands]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the optical properties of GaSb =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--{|&lt;br /&gt;
| [[File:SOC_GaSb_bands.png|600px|center|GaSb bands 1]]&lt;br /&gt;
| [[File:SOC_GaSb_absorption.png|600px|center|GaSb bands 2]]&lt;br /&gt;
|} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now turn our attention on the optical properties of the system. Here we will compute the dielectric function at different levels of approximations:&amp;lt;br /&amp;gt;&lt;br /&gt;
(i) at the IP-RPA level, thus using the Fermi golden rule with the KS energies and wave-functions&amp;lt;br /&amp;gt;&lt;br /&gt;
(ii) at the RPA level, thus also including the effect of the local fields&amp;lt;br /&amp;gt;&lt;br /&gt;
(iii) at the BSE level, thus including many-body effects, both correcting the KS energies (we will introduce a scissor obtained from the GW calculation) and considering the statically screened electron-hole interaction&lt;br /&gt;
&lt;br /&gt;
First, setup the calculation (initialization) in the usual way in the folder without SOC&lt;br /&gt;
 $ cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 $ yambo -J 01_init&lt;br /&gt;
and repeat the same inside the folder &#039;&#039;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&#039;&#039; before continuing.&lt;br /&gt;
&lt;br /&gt;
== RPA-IP absorption ==&lt;br /&gt;
&lt;br /&gt;
Create a local folder inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; which you will call &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt;, and create the input file:&lt;br /&gt;
 &amp;gt;cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 &amp;gt;mkdir My_inputs&lt;br /&gt;
 &amp;gt;yambo -o c -V RL -F My_inputs/03_IP-RPA.in&lt;br /&gt;
&lt;br /&gt;
As before, we also provide an input file with suggested parameters for this calculations. The kind of calculation is controlled by the input variable&lt;br /&gt;
 Chimod= &amp;quot;IP&amp;quot;                 # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1            RL    # [Xd] Response block size&lt;br /&gt;
These tells you that we are building up the dielectric function in G-space considering only on G vector, i.e. the G=0 component. The string Chimod= &amp;amp;quot;IP&amp;amp;quot; recalls us that this means we are neglecting the local fields effect.&lt;br /&gt;
&lt;br /&gt;
We set the plane-waves cutoff for the wavefunctions to&lt;br /&gt;
 FFTGvecs=  10  Ry   # [FFT] Plane-waves&lt;br /&gt;
Since we are interested into the optical spectrum calculation, only the Q=0 term, i.e. the first Q-point, is calculated&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
The number of bands we use is 20. This is a reasonable number of states to converge the IP-RPA optical spectrum in the VIS-UV range. (If you wish to calculate the EELS spectrum for q different from 0 probably more bands will be required.)&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 10 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
As you learned the dielectric function is a tensir and in principle three calculations for light polarized along x,y,z chould be done depending on the experimental setup. However GaSb is a system with cubic symmetry, thus any direction is equivalent. Here we decide to compute epsilon along the &amp;amp;quot;(1 1 1)&amp;amp;quot; direction.&lt;br /&gt;
 % LongDrXd&lt;br /&gt;
  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation using either your input file or the one provided in the Inputs folder&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/03_IP-RPA.in  -J 03_IP-RPA -C 03_IP-RPA_out&lt;br /&gt;
&lt;br /&gt;
Inside the &amp;lt;code&amp;gt;03_IP-RPA&amp;lt;/code&amp;gt; folder you will find the databases created by the code (in this case just the dipoles), while in the &amp;lt;code&amp;gt;03_IP-RPA_out&amp;lt;/code&amp;gt; the report file and the output files for the dielectric function which describes the absorption (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;) and for its inverse (&amp;lt;code&amp;gt;o-03_IP-RPA.eel*&amp;lt;/code&amp;gt;), which describes the electron energy loss. You can plot them with your favorite software (for example gnuplot or xmgrace). The real and imaginary parts of the IP-RPA dielectric function are column 3 and 2 respectively of the file (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;). Using also the reference output file in the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; folder you can compare the spectrum with and without SOC.&lt;br /&gt;
&lt;br /&gt;
Now repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 20 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.jpg|600px|center|GaSb absorption RPA]]&lt;br /&gt;
If you wish to obtain a reasonable spectrum however the 6x6x6 kpts grid is not enough. In order to check the convergence with the number of k-points you should run the same kind of calculations on other k-points meshes, either using the ones we provided ot creating new ones using the input files in the Pwscf folder (see section [[more.php|More on GaSb]] for more advanced calculations).&lt;br /&gt;
&lt;br /&gt;
In the directories Reference_Outputs several RPA dielectric functions are saved with the dielectric function calculated with the 10x10x10 and the 14x14x14 k-grid. You will learn that within RPA spectra the lowest energy peak is under-estimated. Also the spectra with and without SOC look very similar and the SO splitting is almost not present. This is clearly due to the excitonic nature of the E1 peak which can be correctly described only including the electron-hole interaction.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== RPA absorption with local fieldds ==&lt;br /&gt;
&lt;br /&gt;
To also include the local fields effect you can generate the input with the command: &lt;br /&gt;
 &amp;gt;yambo -o c -k hartree -F My_inputs/04_RPA_LF.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
In the input file we provide you will see that now the chimod and size of the dynamical matrix are set to&lt;br /&gt;
 Chimod= &amp;amp;quot;Hartree&amp;amp;quot;       # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1       Ry    # [Xd] Response block size&lt;br /&gt;
&lt;br /&gt;
Including local fields the poles of absorption will move from KS transitions to many-electrons transitions (although we are still neglecting the electron-hole interaction). As a result you will need more states to converge the absorption spectrum. This is why we set the number of bands to 15:&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 15 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
while as before we will have&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 %&lt;br /&gt;
 LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/04_RPA_LF.in -J 04_RPA_LF -C 04_RPA_LF_out&lt;br /&gt;
&lt;br /&gt;
In the 04_RPA+LF_out folder you will fine the report and the output files as before. The real and imaginary parts of the RPA+LF dielectric function with local fields are column 3 and 2 respectively of the .eps file. While the corresponding IP-RPA spectra is reported in columns 5 and 4.&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 30 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
In the following picture we compare the result of IP-RPA and RPA+LF with SOC.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA_IP_vs_LF.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== BSE absorption with QP corrections ==&lt;br /&gt;
&lt;br /&gt;
As you probably know the inclusion of the electron-hole interaction makes the approach in G space not feaseble. We have thus to compute the dielectric function in the electron-hole space, building up the excitonic hamiltonian. Thus to create the input file you can run the command: &amp;lt;code&amp;gt; &amp;gt;yambo -o b -k sex -b -y h -V all -F My_inputs/05_BSE+scissor.in&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder. As before you, in the directory Inputs, you can find an example with suggested parameters. The plane-wave cutoffs used to expand wavefunctions is set to 10 Ry, the cut-off on the exchange interaction between the electron and the hole (i.e. for the local-fields) is set to 10 Ry (here we use a much higer value compared to the previous run since the computational cost of increasing this variable in the electron-hole space is very low). and, finally, the cut-off on the direct electron-hole interaction is set to 1 Ry (to build up this term, where the interaction is screened, we need to compute the static dielectric constant in G-space, thus increasing this value is computationally demanding). &amp;lt;code&amp;gt; FFTGvecs= 10     Ry    # [FFT] Plane-waves BSENGexx= 10     Ry    # [BSK] Exchange components BSENGBlk=  1     Ry    # [BSK] Screened interaction block size&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Indeed in the input file you can also see the parameters used to compute the static dielectric function needed for the screened Coulomb term (W) of the BSE kernel. Here we use 40 bands and an energy cut-off of 1 Ry. &amp;lt;code&amp;gt; % BndsRnXs    1 | 20 |                 # [Xs] Polarization function bands % NGsBlkXs= 1            Ry    # [Xs] Response block size&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
The input variable &amp;amp;quot;KfnQP_E&amp;amp;quot; can be used to include a scissor operator, i.e a opening of the DFT band gap. The value 0.53 eV is the coverged correction at Gamma obtained in the GW run. Here we will calculate the BSE assuming that the &amp;amp;quot;scissor operator approximation&amp;amp;quot; is valid for GaSb (to be checked in principle!) . &amp;lt;code&amp;gt; % KfnQP_E  0.530000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim %&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
To build up the excitonic matrix we consider the states from 5 to 12, i.e. we are using 4 occupied and 4 unoccupied bands. &amp;lt;code&amp;gt; % BSEBands   3 | 6 |          # [BSK] Bands range %&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
and we will build up the dielectric function using a grid of 200 point in frequency space &amp;lt;code&amp;gt; BEnSteps= 200                # [BSS] Energy steps&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Finally, similarly as before, we will have &amp;lt;code&amp;gt; % LongDrXs  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field %&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Remember that the BS kernel is written in the electron-hole space and its size is given by the relation&amp;lt;br /&amp;gt;&lt;br /&gt;
BS kernel size = Valence Bands × Conduction Bands × K-points in the whole BZ.&amp;lt;br /&amp;gt;&lt;br /&gt;
This means that in the case with SO we are building up a matrix 2x2=4 times larger of the corresponding calculation without spin-orbit (you can compare the input in With_SO/Yambo/Inputs / Without_SO/Yambo/Inputs and reference outputs in With_SO/Yambo/Reference_Outputs / With_SO/Yambo/Reference_Outputs)&lt;br /&gt;
&lt;br /&gt;
We are ready to run the BSE calculation: &amp;lt;code&amp;gt; &amp;gt;yambo -F 05_BSE+scissor.in  -J 05_BSE -C 05_BSE_out&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Inside the folder &amp;lt;code&amp;gt;05_BSE_out&amp;lt;/code&amp;gt; you should find the report file &amp;lt;code&amp;gt;r-05_BSE_optics_bse_bsk_bss_em1s&amp;lt;/code&amp;gt; ( Open it and look if everything is ok! ) and the two response files &amp;lt;code&amp;gt; o-05_BSE.eel_q1_haydock_bse &amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-05_BSE.eps_q1_haydock_bse&amp;lt;/code&amp;gt;. Again the real and imaginary parts of the BSE dielectric function are column 3 and 2 respectively, while the corresponding GW spectra are column 5 and 4.&lt;br /&gt;
&lt;br /&gt;
In the folder &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; you will find instead the DBs of the static screening (W) needed to build up the BSE kernel (&amp;lt;code&amp;gt;ndb.em1s&amp;lt;/code&amp;gt;) and the BSE matrix (&amp;lt;code&amp;gt;ndb.BS*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use &amp;lt;code&amp;gt; % BndsRnXs    1 | 20 |                 # [Xs] Polarization function bands % % BSEBands   5 | 12 |          # [BSK] Bands range %&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
If you do the corresponding calculations for the case without spin-orbits using the databases in the directory GaSb_nSO/YAMBO and inputs in GaSb_nSO/Inputs, the two BSE spectra should look like in this figure:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE_few_kpts.jpg|600px|center|GaSb absorption BSE gew kpts]]&lt;br /&gt;
As mentioned before the two spectra present spurious peaks ( as the first peak!) due to uncoverged k-point sampling. Nevertheless the splitting due to spin-orbit interaction is already visible in the peak around 2.1 eV.&lt;br /&gt;
A more converged (yet not fully converged calculation) would give the following results which compares very nicely with the experimental data:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE.png|600px|center|GaSb absorption BSE]]&lt;br /&gt;
&lt;br /&gt;
= Exciton analysis =&lt;br /&gt;
&lt;br /&gt;
In this part of the tutorial we show how to analyze the origin of the E1 peak in GaSb. Since the calculation with the SOC case is very demanding we will do that only for the case without SOC. So first of all enter the &amp;lt;code&amp;gt;Without_SOC/YAMBO/6x6x6_shifted&amp;lt;/code&amp;gt; folder and, if you didn&#039;t before, run the setup: &amp;lt;code&amp;gt; &amp;gt;cd Without_SOC/YAMBO/6x6x6_shifted &amp;gt;ls SAVE &amp;gt;yambo -J 01_init &amp;gt;ls SAVE r-01_init_setup&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then create the &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; folder and the input file for a BSE run &amp;lt;code&amp;gt; &amp;gt;yambo -o b -k sex -b -y d -V all -F My_inputs/05_BSE+shissor.in&amp;lt;/code&amp;gt; You can use the same parameters you used to compute the absorption with SOC previously. The number of bands will be the half of the case without SOC &amp;lt;code&amp;gt; % BSEBands  3 | 6 |          # [BSK] Bands range %&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Also this time you will use the to &amp;lt;code&amp;gt;&amp;amp;quot;d&amp;amp;quot;&amp;lt;/code&amp;gt; and uncomment the variable needed to Write to disk excitonic the WFs: &amp;lt;code&amp;gt; BSSmod= &amp;amp;quot;d&amp;amp;quot;              # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft` WRbsWF                   # [BSS] Write to disk excitonic the WFs&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Then you have to run the BSE calculation (notice that, in case you already computed the BSE spectrum also for the case without SOC, the code can read the results from the provious BSE run skipping many steps) &amp;lt;code&amp;gt; &amp;gt;yambo -F My_inuts/05_BSE+shissor.in  -J 05_BSE -C 05_BSE_out&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
In the &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; folder you will now find a new database file called &amp;lt;code&amp;gt;ndb.BS_diago_Q01&amp;lt;/code&amp;gt;. This is what you need to analyze the exciton peaks running the post-processing code ypp.&lt;br /&gt;
&lt;br /&gt;
First of all you can run: &amp;lt;code&amp;gt; &amp;gt;ypp -e s -J 05_BSE -C BSE_out&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
This run will sort in energy the excitonic eigenvalues writing their oscillator strenghts (see &amp;lt;code&amp;gt;o-06_bse.exc_E_sorted&amp;lt;/code&amp;gt;). Then you can create the ypp input required to analize how each excitonic state is build up in terms of single-particle states: &amp;lt;code&amp;gt; &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Put the index &amp;lt;code&amp;gt;#N&amp;lt;/code&amp;gt; of the exciton with higher strenght in the E_1 peak region &amp;lt;code&amp;gt; &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE -C 06_BSE_out&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
You will find the two files &amp;lt;code&amp;gt;o-06_bse.exc_weights_at_#N&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-06_bse.exc_amplitude_at_#N&amp;lt;/code&amp;gt;. In these files you will find informations on the highest strenght exciton in the E1 peak region.&lt;br /&gt;
&lt;br /&gt;
= Other excercises =&lt;br /&gt;
&lt;br /&gt;
# Try to converge the G0W0 increasing the polarization RL size, the polarization bands, the number of bands in the Green function and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Try to converge the absorption spectra increasing the polarization RL size, the polarization bands, the number of bands to construct the excitonic matrix and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Plot the EELS spectrum obtained within IP-RPA and RPA with local fields. Also in this case you can check the effect of increasing the polarization bands. You may also try to do a resonant only calculation to see that the EELS cannot be described using only the resonant part of the response function.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;&amp;gt;M. Marsili, A. Molina-Sánchez, M. Palummo, D. Sangalli, A. Marini, [https://doi.org/10.1103/PhysRevB.103.155152  Phys. Rev. B &#039;&#039;&#039;103&#039;&#039;&#039;, 155152 (2021)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wiki&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Gallium_antimonide GaSb on wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kim&amp;quot;&amp;gt; Y.S. Kim et al. Phys. Rev. B &#039;&#039;&#039;82&#039;&#039;&#039;, 205212 (2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;rem&amp;quot;&amp;gt; I. N. Remediakis and Efthimios Kaxiras Phys. Rev. B &#039;&#039;&#039;59&#039;&#039;&#039;, 5336 (1999).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8914</id>
		<title>SOC</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8914"/>
		<updated>2025-07-31T09:31:39Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* RPA absorption with local fieldds */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Effect of spin-orbit interaction =&lt;br /&gt;
&lt;br /&gt;
= Introduction = &lt;br /&gt;
&lt;br /&gt;
The scope of this tutorial is to calculate the G0W0 corrections to the DFT-LDA band-structure and the BSE optical spectrum for a bulk semiconducting material, gallium antimonide (GaSb) &amp;lt;ref name=&amp;quot;wiki&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;kim&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;rem&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;. We will compare the results with and without the spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=250px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DFT band structure =&lt;br /&gt;
&lt;br /&gt;
For this tutorial we provide two state (GS) databases (DBs), one contains the GS-DBs with the effect of SOC included and one without. The idea is to repeat the same calculation for both database and compare the results and the performances of the code. As in other tutorials you can find the folder containing the input files for the pwscf code (Pwscf, in case you prefer to generate the GS-DBs by yourself) and the folder containing the GS-DBs, the reference input files and the reference output files for the yambo code (YAMBO). Instead of continuously jumping back and forth from the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;With_SOC&amp;lt;/code&amp;gt; folder we advice to open two terminals and keep one for the without SOC case and another for the with SOC case.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s have a look to the content of the folders. For example we can enter in the &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/&amp;lt;/code&amp;gt; folder &lt;br /&gt;
 $ cd Solid_GaSb/With_SOC/&lt;br /&gt;
 $ ls Pwscf YAMBO&lt;br /&gt;
 $ cd YAMBO&lt;br /&gt;
 $ ls 4x4x4_shifted+GAMMA &lt;br /&gt;
 6x6x6_shifted  10x10x10_shifted 14x14x14_shifted   Inputs  Reference_Outputs&lt;br /&gt;
&lt;br /&gt;
Inside the YAMBO folder there are indeed four folders corresponding to four differet k-points meshes. In this tutorial we will use the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; folder for the computation of the QP corrections within the GoWo approximation. It is a kpts grid obtained as the sum of a 4x4x4 k-points grid centered in Gamma and a 4x4x4 grid shifted. Instead for the computation of the optical properties we will use the &amp;lt;code&amp;gt;6x6x6_shifted&amp;lt;/code&amp;gt; folder. It is a 6x6x6 k-points grid shifted from Gamma. The other two folders, &amp;lt;code&amp;gt;10x10x10_shifted&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;14x14x14_shifted&amp;lt;/code&amp;gt; can be used to do a minimum convergence of the optical properties against the number of k-points (pay attention that the BSE calculations with bigger grids will be very memory and time demanding!).&lt;br /&gt;
&lt;br /&gt;
The first part of the tutorial is on the computation of the QP corrections. So let&#039;s enter the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; grid and, as seen in other tutorials run the Initialization:&lt;br /&gt;
&lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA/ &lt;br /&gt;
 $ yambo -J 01_init &lt;br /&gt;
Now compare the result of the two setup runs.&lt;br /&gt;
&lt;br /&gt;
With_SOC case:&lt;br /&gt;
&amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  5.046557&lt;br /&gt;
  VBM / CBm          [ev]:   0.00000   0.06025&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0008               0009-0200&lt;br /&gt;
  Indirect Gaps      [ev]:  0.06025   3.57546&amp;lt;/pre&amp;gt;&lt;br /&gt;
Without_SOC case:&lt;br /&gt;
 &amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  4.777401&lt;br /&gt;
  VBM / CBm          [ev]:  0.000000  0.332282&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0004               0005-0100&lt;br /&gt;
  Indirect Gaps      [ev]: 0.332282  3.620628&lt;br /&gt;
  Direct Gaps        [ev]: 0.332282  7.137342&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A clear shrink of the DFT-LDA gap due to spin-orbit occurs. Note that, having 8 electrons in the fundamental cell, due to the spinorial nature of the wavefunction, with SOC we have 8 occupied bands, while only 4 without. Here a picture of the DFT band structure for the two cases.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_pwscf.png|600px|center|GaSb bands DFT]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the band structure of GaSb =&lt;br /&gt;
 &lt;br /&gt;
Now we will perform a G0W0 calculation to correct the DFT-LDA bandstructure. We assume that you are already familiar with the concept of screening needed to build up the GW self-energy and thus the QP corrections. Create a local folder &#039;&#039;My_inputs&#039;&#039; and generate the input for a G0W0 calculation within the plasmon-pole approximation using the following command: &lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA&lt;br /&gt;
 $ mkdir My_inputs&lt;br /&gt;
 $ yambo -p p -g n -V RL -F My_inputs/02_GW.in&lt;br /&gt;
However we also provide an input file with suggested parameters for this calculations inside the folder &#039;&#039;Solid_GaSb/Without_SOC/Yambo/Inputs&#039;&#039;. Remember: these parameters are system dependent and should be converged as you can see other GW tutorials (e.g. [[GW]] or [[GW convergence]]). Here we provide reasonable (but not fully converged) parameters to have a low computational cost but yet qualitatively meaningful results.&lt;br /&gt;
&lt;br /&gt;
The plane-waves cutoff for the wavefunctions and exchange part of the self-energy are set to 10 Ry. &lt;br /&gt;
 FFTGvecs =  10 Ry   # [FFT] Plane-waves&lt;br /&gt;
 EXXRLvcs=   10 Ry   # [XX] Exchange RL components&lt;br /&gt;
while we will use 40 bands, a plane-wave cut-off of 1 Ry, and a plasmon-pole energy of 20 eV to build up the screening matrix &lt;br /&gt;
 NGsBlkXp=    1 Ry  # [Xp] Response block size &lt;br /&gt;
 PPAPntXp= 20.  eV  # [Xp] PPA imaginary energy &lt;br /&gt;
 % BndsRnXp    &lt;br /&gt;
 1 | 40 |        # [Xp] Polarization function bands &lt;br /&gt;
 % &lt;br /&gt;
 % LongDrXp  &lt;br /&gt;
 1.000000 | 1.000000 | 1.000000 |        # [Xp] [cc] Electric Field &lt;br /&gt;
 %&lt;br /&gt;
The number of bands in the green function G to build up the GW self-energy is also 40 &lt;br /&gt;
 % GbndRnge    &lt;br /&gt;
 1 | 40 |                 # [GW] G[W] bands range &lt;br /&gt;
 %&lt;br /&gt;
with those parameters we will compute the correction only in the last 2 points of our grid, 28 and 29 and for the states from 3 to 6, setting the input variable &lt;br /&gt;
 %QPkrange                      &lt;br /&gt;
 28 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
As you can verify from your &#039;&#039;r-01_init_setup&#039;&#039; file 28 and 29 are the L and the Gamma point of the Brillouin zone. &lt;br /&gt;
 *X* K [28] :-0.500000 -0.500000 -0.500000 (rlu) * Comp.s 476 * weight    0.0078   &lt;br /&gt;
 ...   &lt;br /&gt;
 *X* K [29] : 0.000000  0.000000  0.000000 (rlu)  * Comp.s 531 * weight    0.0020   &lt;br /&gt;
 ...&lt;br /&gt;
You can now run the code using either your input file or the one provided in the Inputs folder &lt;br /&gt;
 $ yambo -F ../Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
The run will take some time. Indeed the code has first to compute the dipoles, then the screening within the plasmon pole approximation and finally the self-energy, first the exchange part Gv and then the correlation part G(W-v). &lt;br /&gt;
In the &amp;lt;code&amp;gt;GW_out&amp;lt;/code&amp;gt; folder you will find the &amp;lt;code&amp;gt;o-GW.qp&amp;lt;/code&amp;gt; file containing the GW corrections.&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &lt;br /&gt;
 #&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #&lt;br /&gt;
  ...&lt;br /&gt;
  29.00000    4.00000    0.00000    0.22802    1.07276&lt;br /&gt;
  29.00000    5.00000    0.33228    0.66303   -2.39219&lt;br /&gt;
  ...&lt;br /&gt;
Thus it is about 0.66-0.23=0.43 eV (not fully converged).&lt;br /&gt;
&lt;br /&gt;
We can also compute the G0W0 correction for all the k-point of the database. To this end open the input file &#039;&#039;../Inputs/02_GW.in&#039;&#039; (or your own) and edit the number of k-point to be computed &lt;br /&gt;
 %&lt;br /&gt;
 QPkrange                      1 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
If you have learned how to run the code in parallel you may also set the parallel environment input variables:&lt;br /&gt;
 X_all_q_CPU= &amp;amp;quot;2&amp;amp;quot;              # [PARALLEL] CPUs for each role &lt;br /&gt;
 X_all_q_ROLEs= &amp;amp;quot;q&amp;amp;quot;            # [PARALLEL] CPUs roles (q,k,c,v) &lt;br /&gt;
 SE_CPU= &amp;amp;quot;2&amp;amp;quot;                   # [PARALLEL] CPUs for each role &lt;br /&gt;
 SE_ROLEs= &amp;amp;quot;q&amp;amp;quot;                 # [PARALLEL] CPUs roles (q,qp,b)&lt;br /&gt;
Remember to use the same name after the -J option, so that the code will be able to use the informations from the previous run and avoid many calculations. &lt;br /&gt;
 $ mpirun -np 2 yambo -F Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
In the &#039;&#039;GW_out&#039;&#039; folder you will find now also the &#039;&#039;o-GW.qp_01&#039;&#039; file containg the GW corrections for all the k-points.&lt;br /&gt;
&lt;br /&gt;
Now you can enter the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; and repeat the same calculations. Remember that in the input file you will generate you should change all the band ranges doubling the number of states (do you understand why?) &amp;lt;code&amp;gt; % BndsRnXp    1 | 80 |        # [Xp] Polarization function bands % % GbndRnge    1 | 80 |                 # [GW] G[W] bands range % %QPkrange                      29 | 29 |   5 | 12|  # [GW] QP generalized Kpoint/Band indices %&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &amp;lt;code&amp;gt; # #  K-point    Band       Eo         E-Eo       Sc(Eo) #   ...   29.00000    8.00000    0.00000    0.21758    0.95843   29.00000    9.00000    0.06025    0.65362   -2.36544   ...&amp;lt;/code&amp;gt; Thus it is about 0.65-0.22=0.43 eV (not fully converged). Indeed the same result obtained without SOC. The resulting electronic gap is about 0.46 eV reasonably close to the experimental band gap of 0.72 eV. It is also a big improvment compared to the LDA band gap (less than 0.03 eV). This correction (indeed the slightly bigger value of 0.53 eV) will be used, in the form of a scissor operator, as a starting point to compute the optical spectra.&lt;br /&gt;
&lt;br /&gt;
Again we can also compute the G0W0 correction for all the k-point of the database. You can plot column 4 of the output file against column 3 to obtain a picture of the QP corrections. In the following figure we show the plot of the G0W0 correction (E_GoWo-E_LDA) vs the LDA eigenvalues. The corrections at the Gamma and the L point are marked with bigger red spots.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=400px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_GoWo_corrections.png|GaSb QP corrections without SOC &lt;br /&gt;
Image:GaSb GoWo corrections SOC.png|GaSb GoWo corrections with SOC&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
The &amp;amp;quot;scissor operator approach&amp;amp;quot; does not seem a very good approximation for GaSb. Indeed the quasi particle corrections are not constant, especially in the conduction band. For example the correction to the Gamma point is bigger than the corrections to all other k-points. This result however maybe due to the poor covergence parameters. If you would like to better investigate these results you should try do convergence tests. Since QP corrections are poorly sensitive to the spin-orbit interaction it is probably a good idea to do convergence without SOC.&lt;br /&gt;
&lt;br /&gt;
Here we also provide a plot of the band-structure at different levels of approximation: DFT, DFT+scissor, QP. The band structures are obtained from an interpolation of our k-points mesh and it is not very precise since, again, we are using a quite coarse sampling of the brillouine zone. Indeed we can see that already the interpolated DFT band structure deviates from the exact DFT band-structure, which has also been reported. In particular in the region nearby Gamma. However it gives quite nicely an overview of how the QP band structure compares with the DFT band stucture. The main effect is indeed an opening of the band-gap which can be described in terms of a scissor operator.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_yambo.png|600px|center|GaSb QP bands]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the optical properties of GaSb =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--{|&lt;br /&gt;
| [[File:SOC_GaSb_bands.png|600px|center|GaSb bands 1]]&lt;br /&gt;
| [[File:SOC_GaSb_absorption.png|600px|center|GaSb bands 2]]&lt;br /&gt;
|} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now turn our attention on the optical properties of the system. Here we will compute the dielectric function at different levels of approximations:&amp;lt;br /&amp;gt;&lt;br /&gt;
(i) at the IP-RPA level, thus using the Fermi golden rule with the KS energies and wave-functions&amp;lt;br /&amp;gt;&lt;br /&gt;
(ii) at the RPA level, thus also including the effect of the local fields&amp;lt;br /&amp;gt;&lt;br /&gt;
(iii) at the BSE level, thus including many-body effects, both correcting the KS energies (we will introduce a scissor obtained from the GW calculation) and considering the statically screened electron-hole interaction&lt;br /&gt;
&lt;br /&gt;
First, setup the calculation (initialization) in the usual way in the folder without SOC&lt;br /&gt;
 $ cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 $ yambo -J 01_init&lt;br /&gt;
and repeat the same inside the folder &#039;&#039;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&#039;&#039; before continuing.&lt;br /&gt;
&lt;br /&gt;
== RPA-IP absorption ==&lt;br /&gt;
&lt;br /&gt;
Create a local folder inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; which you will call &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; Then, to create the input file, you can run the command: &amp;lt;code&amp;gt; &amp;gt;yambo -o c -V RL -F My_inputs/03_IP-RPA.in&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
As before, we also provide an input file with suggested parameters for this calculations. The kind of calculation is controlled by the input variable &amp;lt;code&amp;gt; Chimod= &amp;amp;quot;IP&amp;amp;quot;                 # [X] IP/Hartree/ALDA/LRC/BSfxc NGsBlkXd= 1            RL    # [Xd] Response block size&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
These tells you that we are building up the dielectric function in G-space considering only on G vector, i.e. the G=0 component. The string Chimod= &amp;amp;quot;IP&amp;amp;quot; recalls us that this means we are neglecting the local fields effect. We set the plane-waves cutoff for the wavefunctions to &amp;lt;code&amp;gt; FFTGvecs=  10  Ry   # [FFT] Plane-waves&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Since we are interested into the optical spectrum calculation, only the Q=0 term, i.e. the first Q-point, is calculated &amp;lt;code&amp;gt; % QpntsRXd   1 | 1 |                   # [Xd] Transferred momenta %&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
The number of bands we use is 20. This is a reasonable number of states to converge the IP-RPA optical spectrum in the VIS-UV range. (If you wish to calculate the EELS spectrum for q different from 0 probably more bands will be required.) &amp;lt;code&amp;gt; % BndsRnXd    1 | 10 |                 # [Xd] Polarization function bands %&amp;lt;/code&amp;gt; As you learned the dielectric function is a tensir and in principle three calculations for light polarized along x,y,z chould be done depending on the experimental setup. However GaSb is a system with cubic symmetry, thus any direction is equivalent. Here we decide to compute epsilon along the &amp;amp;quot;(1 1 1)&amp;amp;quot; direction. &amp;lt;code&amp;gt; % LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field %&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation using either your input file or the one provided in the Inputs folder &amp;lt;code&amp;gt; &amp;gt;yambo -F My_inputs/03_IP-RPA.in  -J 03_IP-RPA -C 03_IP-RPA_out&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Inside the &amp;lt;code&amp;gt;03_IP-RPA&amp;lt;/code&amp;gt; folder you will find the databases created by the code (in this case just the dipoles), while in the &amp;lt;code&amp;gt;03_IP-RPA_out&amp;lt;/code&amp;gt; the report file and the output files for the dielectric function which describes the absorption (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;) and for its inverse (&amp;lt;code&amp;gt;o-03_IP-RPA.eel*&amp;lt;/code&amp;gt;), which describes the electron energy loss. You can plot them with your favorit software (for example gnuplot or xmgrace). The real and imaginary parts of the IP-RPA dielectric function are column 3 and 2 respectively of the file (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;). Using also the reference output file in the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; folder you can compare the spectrum with and without SOC.&lt;br /&gt;
&lt;br /&gt;
Now repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use &amp;lt;code&amp;gt; % BndsRnXd    1 | 20 |                 # [Xd] Polarization function bands %&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.jpg|600px|center|GaSb absorption RPA]]&lt;br /&gt;
If you wish to obtain a reasonable spectrum however the 6x6x6 kpts grid is not enough. In order to check the convergence with the number of k-points you should run the same kind of calculations on other k-points meshes, either using the ones we provided ot creating new ones using the input files in the Pwscf folder (see section [[more.php|More on GaSb]] for more advanced calculations).&lt;br /&gt;
&lt;br /&gt;
In the directories Reference_Outputs several RPA dielectric functions are saved with the dielectric function calculated with the 10x10x10 and the 14x14x14 k-grid. You will learn that within RPA spectra the lowest energy peak is under-estimated. Also the spectra with and without SOC look very similar and the SO splitting is almost not present. This is clearly due to the excitonic nature of the E1 peak which can be correctly described only including the electron-hole interaction.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
== RPA absorption with local fieldds ==&lt;br /&gt;
&lt;br /&gt;
To also include the local fields effect you can generate the input with the command: &lt;br /&gt;
 &amp;gt;yambo -o c -k hartree -F My_inputs/04_RPA_LF.in&lt;br /&gt;
&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
In the input file we provide you will see that now the chimod and size of the dynamical matrix are set to&lt;br /&gt;
 Chimod= &amp;amp;quot;Hartree&amp;amp;quot;       # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 NGsBlkXd= 1       Ry    # [Xd] Response block size&lt;br /&gt;
&lt;br /&gt;
Including local fields the poles of absorption will move from KS transitions to many-electrons transitions (although we are still neglecting the electron-hole interaction). As a result you will need more states to converge the absorption spectrum. This is why we set the number of bands to 15:&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 15 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
while as before we will have&lt;br /&gt;
 % QpntsRXd&lt;br /&gt;
   1 | 1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 %&lt;br /&gt;
 LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation:&lt;br /&gt;
 &amp;gt;yambo -F My_inputs/04_RPA_LF.in -J 04_RPA_LF -C 04_RPA_LF_out&lt;br /&gt;
&lt;br /&gt;
In the 04_RPA+LF_out folder you will fine the report and the output files as before. The real and imaginary parts of the RPA+LF dielectric function with local fields are column 3 and 2 respectively of the .eps file. While the corresponding IP-RPA spectra is reported in columns 5 and 4.&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use&lt;br /&gt;
 % BndsRnXd&lt;br /&gt;
    1 | 30 |                 # [Xd] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
In the following picture we compare the result of IP-RPA and RPA+LF with SOC.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA_IP_vs_LF.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
&lt;br /&gt;
== BSE absorption with QP corrections ==&lt;br /&gt;
&lt;br /&gt;
As you probably know the inclusion of the electron-hole interaction makes the approach in G space not feaseble. We have thus to compute the dielectric function in the electron-hole space, building up the excitonic hamiltonian. Thus to create the input file you can run the command: &amp;lt;code&amp;gt; &amp;gt;yambo -o b -k sex -b -y h -V all -F My_inputs/05_BSE+scissor.in&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder. As before you, in the directory Inputs, you can find an example with suggested parameters. The plane-wave cutoffs used to expand wavefunctions is set to 10 Ry, the cut-off on the exchange interaction between the electron and the hole (i.e. for the local-fields) is set to 10 Ry (here we use a much higer value compared to the previous run since the computational cost of increasing this variable in the electron-hole space is very low). and, finally, the cut-off on the direct electron-hole interaction is set to 1 Ry (to build up this term, where the interaction is screened, we need to compute the static dielectric constant in G-space, thus increasing this value is computationally demanding). &amp;lt;code&amp;gt; FFTGvecs= 10     Ry    # [FFT] Plane-waves BSENGexx= 10     Ry    # [BSK] Exchange components BSENGBlk=  1     Ry    # [BSK] Screened interaction block size&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Indeed in the input file you can also see the parameters used to compute the static dielectric function needed for the screened Coulomb term (W) of the BSE kernel. Here we use 40 bands and an energy cut-off of 1 Ry. &amp;lt;code&amp;gt; % BndsRnXs    1 | 20 |                 # [Xs] Polarization function bands % NGsBlkXs= 1            Ry    # [Xs] Response block size&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
The input variable &amp;amp;quot;KfnQP_E&amp;amp;quot; can be used to include a scissor operator, i.e a opening of the DFT band gap. The value 0.53 eV is the coverged correction at Gamma obtained in the GW run. Here we will calculate the BSE assuming that the &amp;amp;quot;scissor operator approximation&amp;amp;quot; is valid for GaSb (to be checked in principle!) . &amp;lt;code&amp;gt; % KfnQP_E  0.530000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim %&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
To build up the excitonic matrix we consider the states from 5 to 12, i.e. we are using 4 occupied and 4 unoccupied bands. &amp;lt;code&amp;gt; % BSEBands   3 | 6 |          # [BSK] Bands range %&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
and we will build up the dielectric function using a grid of 200 point in frequency space &amp;lt;code&amp;gt; BEnSteps= 200                # [BSS] Energy steps&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Finally, similarly as before, we will have &amp;lt;code&amp;gt; % LongDrXs  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field %&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Remember that the BS kernel is written in the electron-hole space and its size is given by the relation&amp;lt;br /&amp;gt;&lt;br /&gt;
BS kernel size = Valence Bands × Conduction Bands × K-points in the whole BZ.&amp;lt;br /&amp;gt;&lt;br /&gt;
This means that in the case with SO we are building up a matrix 2x2=4 times larger of the corresponding calculation without spin-orbit (you can compare the input in With_SO/Yambo/Inputs / Without_SO/Yambo/Inputs and reference outputs in With_SO/Yambo/Reference_Outputs / With_SO/Yambo/Reference_Outputs)&lt;br /&gt;
&lt;br /&gt;
We are ready to run the BSE calculation: &amp;lt;code&amp;gt; &amp;gt;yambo -F 05_BSE+scissor.in  -J 05_BSE -C 05_BSE_out&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Inside the folder &amp;lt;code&amp;gt;05_BSE_out&amp;lt;/code&amp;gt; you should find the report file &amp;lt;code&amp;gt;r-05_BSE_optics_bse_bsk_bss_em1s&amp;lt;/code&amp;gt; ( Open it and look if everything is ok! ) and the two response files &amp;lt;code&amp;gt; o-05_BSE.eel_q1_haydock_bse &amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-05_BSE.eps_q1_haydock_bse&amp;lt;/code&amp;gt;. Again the real and imaginary parts of the BSE dielectric function are column 3 and 2 respectively, while the corresponding GW spectra are column 5 and 4.&lt;br /&gt;
&lt;br /&gt;
In the folder &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; you will find instead the DBs of the static screening (W) needed to build up the BSE kernel (&amp;lt;code&amp;gt;ndb.em1s&amp;lt;/code&amp;gt;) and the BSE matrix (&amp;lt;code&amp;gt;ndb.BS*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use &amp;lt;code&amp;gt; % BndsRnXs    1 | 20 |                 # [Xs] Polarization function bands % % BSEBands   5 | 12 |          # [BSK] Bands range %&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
If you do the corresponding calculations for the case without spin-orbits using the databases in the directory GaSb_nSO/YAMBO and inputs in GaSb_nSO/Inputs, the two BSE spectra should look like in this figure:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE_few_kpts.jpg|600px|center|GaSb absorption BSE gew kpts]]&lt;br /&gt;
As mentioned before the two spectra present spurious peaks ( as the first peak!) due to uncoverged k-point sampling. Nevertheless the splitting due to spin-orbit interaction is already visible in the peak around 2.1 eV.&lt;br /&gt;
A more converged (yet not fully converged calculation) would give the following results which compares very nicely with the experimental data:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE.png|600px|center|GaSb absorption BSE]]&lt;br /&gt;
&lt;br /&gt;
= Exciton analysis =&lt;br /&gt;
&lt;br /&gt;
In this part of the tutorial we show how to analyze the origin of the E1 peak in GaSb. Since the calculation with the SOC case is very demanding we will do that only for the case without SOC. So first of all enter the &amp;lt;code&amp;gt;Without_SOC/YAMBO/6x6x6_shifted&amp;lt;/code&amp;gt; folder and, if you didn&#039;t before, run the setup: &amp;lt;code&amp;gt; &amp;gt;cd Without_SOC/YAMBO/6x6x6_shifted &amp;gt;ls SAVE &amp;gt;yambo -J 01_init &amp;gt;ls SAVE r-01_init_setup&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then create the &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; folder and the input file for a BSE run &amp;lt;code&amp;gt; &amp;gt;yambo -o b -k sex -b -y d -V all -F My_inputs/05_BSE+shissor.in&amp;lt;/code&amp;gt; You can use the same parameters you used to compute the absorption with SOC previously. The number of bands will be the half of the case without SOC &amp;lt;code&amp;gt; % BSEBands  3 | 6 |          # [BSK] Bands range %&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Also this time you will use the to &amp;lt;code&amp;gt;&amp;amp;quot;d&amp;amp;quot;&amp;lt;/code&amp;gt; and uncomment the variable needed to Write to disk excitonic the WFs: &amp;lt;code&amp;gt; BSSmod= &amp;amp;quot;d&amp;amp;quot;              # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft` WRbsWF                   # [BSS] Write to disk excitonic the WFs&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Then you have to run the BSE calculation (notice that, in case you already computed the BSE spectrum also for the case without SOC, the code can read the results from the provious BSE run skipping many steps) &amp;lt;code&amp;gt; &amp;gt;yambo -F My_inuts/05_BSE+shissor.in  -J 05_BSE -C 05_BSE_out&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
In the &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; folder you will now find a new database file called &amp;lt;code&amp;gt;ndb.BS_diago_Q01&amp;lt;/code&amp;gt;. This is what you need to analyze the exciton peaks running the post-processing code ypp.&lt;br /&gt;
&lt;br /&gt;
First of all you can run: &amp;lt;code&amp;gt; &amp;gt;ypp -e s -J 05_BSE -C BSE_out&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
This run will sort in energy the excitonic eigenvalues writing their oscillator strenghts (see &amp;lt;code&amp;gt;o-06_bse.exc_E_sorted&amp;lt;/code&amp;gt;). Then you can create the ypp input required to analize how each excitonic state is build up in terms of single-particle states: &amp;lt;code&amp;gt; &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Put the index &amp;lt;code&amp;gt;#N&amp;lt;/code&amp;gt; of the exciton with higher strenght in the E_1 peak region &amp;lt;code&amp;gt; &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE -C 06_BSE_out&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
You will find the two files &amp;lt;code&amp;gt;o-06_bse.exc_weights_at_#N&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-06_bse.exc_amplitude_at_#N&amp;lt;/code&amp;gt;. In these files you will find informations on the highest strenght exciton in the E1 peak region.&lt;br /&gt;
&lt;br /&gt;
= Other excercises =&lt;br /&gt;
&lt;br /&gt;
# Try to converge the G0W0 increasing the polarization RL size, the polarization bands, the number of bands in the Green function and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Try to converge the absorption spectra increasing the polarization RL size, the polarization bands, the number of bands to construct the excitonic matrix and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Plot the EELS spectrum obtained within IP-RPA and RPA with local fields. Also in this case you can check the effect of increasing the polarization bands. You may also try to do a resonant only calculation to see that the EELS cannot be described using only the resonant part of the response function.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;&amp;gt;M. Marsili, A. Molina-Sánchez, M. Palummo, D. Sangalli, A. Marini, [https://doi.org/10.1103/PhysRevB.103.155152  Phys. Rev. B &#039;&#039;&#039;103&#039;&#039;&#039;, 155152 (2021)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wiki&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Gallium_antimonide GaSb on wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kim&amp;quot;&amp;gt; Y.S. Kim et al. Phys. Rev. B &#039;&#039;&#039;82&#039;&#039;&#039;, 205212 (2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;rem&amp;quot;&amp;gt; I. N. Remediakis and Efthimios Kaxiras Phys. Rev. B &#039;&#039;&#039;59&#039;&#039;&#039;, 5336 (1999).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8913</id>
		<title>SOC</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=SOC&amp;diff=8913"/>
		<updated>2025-07-31T09:28:57Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* Other excercises */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Effect of spin-orbit interaction =&lt;br /&gt;
&lt;br /&gt;
= Introduction = &lt;br /&gt;
&lt;br /&gt;
The scope of this tutorial is to calculate the G0W0 corrections to the DFT-LDA band-structure and the BSE optical spectrum for a bulk semiconducting material, gallium antimonide (GaSb) &amp;lt;ref name=&amp;quot;wiki&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;kim&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;rem&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;/&amp;gt;. We will compare the results with and without the spin-orbit interaction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=250px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_structure.png|Zincblende crystalline structure. Two atoms per cell, Ga and Sb (8 electrons). Lattice constant 11.38 [a.u.]&lt;br /&gt;
Image:SOC_GaSb_bands_scheme.png|Ground state: plane waves cutoff 18 Ry Large spin-orbit splitting of highest occupied bands: ~ 0.7eV&lt;br /&gt;
Image:SOC_GaSb_absorption.png|Large spin-orbit splitting of the E1 optical peak (E1, E1+D1) visible in the experimental optical spectrum&lt;br /&gt;
Image:SOC_GaSb_bands.png|Origin in k-space of the E1 peak&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DFT band structure =&lt;br /&gt;
&lt;br /&gt;
For this tutorial we provide two state (GS) databases (DBs), one contains the GS-DBs with the effect of SOC included and one without. The idea is to repeat the same calculation for both database and compare the results and the performances of the code. As in other tutorials you can find the folder containing the input files for the pwscf code (Pwscf, in case you prefer to generate the GS-DBs by yourself) and the folder containing the GS-DBs, the reference input files and the reference output files for the yambo code (YAMBO). Instead of continuously jumping back and forth from the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;With_SOC&amp;lt;/code&amp;gt; folder we advice to open two terminals and keep one for the without SOC case and another for the with SOC case.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s have a look to the content of the folders. For example we can enter in the &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/&amp;lt;/code&amp;gt; folder &lt;br /&gt;
 $ cd Solid_GaSb/With_SOC/&lt;br /&gt;
 $ ls Pwscf YAMBO&lt;br /&gt;
 $ cd YAMBO&lt;br /&gt;
 $ ls 4x4x4_shifted+GAMMA &lt;br /&gt;
 6x6x6_shifted  10x10x10_shifted 14x14x14_shifted   Inputs  Reference_Outputs&lt;br /&gt;
&lt;br /&gt;
Inside the YAMBO folder there are indeed four folders corresponding to four differet k-points meshes. In this tutorial we will use the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; folder for the computation of the QP corrections within the GoWo approximation. It is a kpts grid obtained as the sum of a 4x4x4 k-points grid centered in Gamma and a 4x4x4 grid shifted. Instead for the computation of the optical properties we will use the &amp;lt;code&amp;gt;6x6x6_shifted&amp;lt;/code&amp;gt; folder. It is a 6x6x6 k-points grid shifted from Gamma. The other two folders, &amp;lt;code&amp;gt;10x10x10_shifted&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;14x14x14_shifted&amp;lt;/code&amp;gt; can be used to do a minimum convergence of the optical properties against the number of k-points (pay attention that the BSE calculations with bigger grids will be very memory and time demanding!).&lt;br /&gt;
&lt;br /&gt;
The first part of the tutorial is on the computation of the QP corrections. So let&#039;s enter the &amp;lt;code&amp;gt;4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; grid and, as seen in other tutorials run the Initialization:&lt;br /&gt;
&lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA/ &lt;br /&gt;
 $ yambo -J 01_init &lt;br /&gt;
Now compare the result of the two setup runs.&lt;br /&gt;
&lt;br /&gt;
With_SOC case:&lt;br /&gt;
&amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  5.046557&lt;br /&gt;
  VBM / CBm          [ev]:   0.00000   0.06025&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0008               0009-0200&lt;br /&gt;
  Indirect Gaps      [ev]:  0.06025   3.57546&amp;lt;/pre&amp;gt;&lt;br /&gt;
Without_SOC case:&lt;br /&gt;
 &amp;lt;pre&amp;gt;[02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
&lt;br /&gt;
  Fermi Level        [ev]:  4.777401&lt;br /&gt;
  VBM / CBm          [ev]:  0.000000  0.332282&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.146E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0004               0005-0100&lt;br /&gt;
  Indirect Gaps      [ev]: 0.332282  3.620628&lt;br /&gt;
  Direct Gaps        [ev]: 0.332282  7.137342&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A clear shrink of the DFT-LDA gap due to spin-orbit occurs. Note that, having 8 electrons in the fundamental cell, due to the spinorial nature of the wavefunction, with SOC we have 8 occupied bands, while only 4 without. Here a picture of the DFT band structure for the two cases.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_pwscf.png|600px|center|GaSb bands DFT]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the band structure of GaSb =&lt;br /&gt;
 &lt;br /&gt;
Now we will perform a G0W0 calculation to correct the DFT-LDA bandstructure. We assume that you are already familiar with the concept of screening needed to build up the GW self-energy and thus the QP corrections. Create a local folder &#039;&#039;My_inputs&#039;&#039; and generate the input for a G0W0 calculation within the plasmon-pole approximation using the following command: &lt;br /&gt;
 $ cd 4x4x4_shifted+GAMMA&lt;br /&gt;
 $ mkdir My_inputs&lt;br /&gt;
 $ yambo -p p -g n -V RL -F My_inputs/02_GW.in&lt;br /&gt;
However we also provide an input file with suggested parameters for this calculations inside the folder &#039;&#039;Solid_GaSb/Without_SOC/Yambo/Inputs&#039;&#039;. Remember: these parameters are system dependent and should be converged as you can see other GW tutorials (e.g. [[GW]] or [[GW convergence]]). Here we provide reasonable (but not fully converged) parameters to have a low computational cost but yet qualitatively meaningful results.&lt;br /&gt;
&lt;br /&gt;
The plane-waves cutoff for the wavefunctions and exchange part of the self-energy are set to 10 Ry. &lt;br /&gt;
 FFTGvecs =  10 Ry   # [FFT] Plane-waves&lt;br /&gt;
 EXXRLvcs=   10 Ry   # [XX] Exchange RL components&lt;br /&gt;
while we will use 40 bands, a plane-wave cut-off of 1 Ry, and a plasmon-pole energy of 20 eV to build up the screening matrix &lt;br /&gt;
 NGsBlkXp=    1 Ry  # [Xp] Response block size &lt;br /&gt;
 PPAPntXp= 20.  eV  # [Xp] PPA imaginary energy &lt;br /&gt;
 % BndsRnXp    &lt;br /&gt;
 1 | 40 |        # [Xp] Polarization function bands &lt;br /&gt;
 % &lt;br /&gt;
 % LongDrXp  &lt;br /&gt;
 1.000000 | 1.000000 | 1.000000 |        # [Xp] [cc] Electric Field &lt;br /&gt;
 %&lt;br /&gt;
The number of bands in the green function G to build up the GW self-energy is also 40 &lt;br /&gt;
 % GbndRnge    &lt;br /&gt;
 1 | 40 |                 # [GW] G[W] bands range &lt;br /&gt;
 %&lt;br /&gt;
with those parameters we will compute the correction only in the last 2 points of our grid, 28 and 29 and for the states from 3 to 6, setting the input variable &lt;br /&gt;
 %QPkrange                      &lt;br /&gt;
 28 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
As you can verify from your &#039;&#039;r-01_init_setup&#039;&#039; file 28 and 29 are the L and the Gamma point of the Brillouin zone. &lt;br /&gt;
 *X* K [28] :-0.500000 -0.500000 -0.500000 (rlu) * Comp.s 476 * weight    0.0078   &lt;br /&gt;
 ...   &lt;br /&gt;
 *X* K [29] : 0.000000  0.000000  0.000000 (rlu)  * Comp.s 531 * weight    0.0020   &lt;br /&gt;
 ...&lt;br /&gt;
You can now run the code using either your input file or the one provided in the Inputs folder &lt;br /&gt;
 $ yambo -F ../Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
The run will take some time. Indeed the code has first to compute the dipoles, then the screening within the plasmon pole approximation and finally the self-energy, first the exchange part Gv and then the correlation part G(W-v). &lt;br /&gt;
In the &amp;lt;code&amp;gt;GW_out&amp;lt;/code&amp;gt; folder you will find the &amp;lt;code&amp;gt;o-GW.qp&amp;lt;/code&amp;gt; file containing the GW corrections.&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &lt;br /&gt;
 #&lt;br /&gt;
 #  K-point    Band       Eo         E-Eo       Sc(Eo)&lt;br /&gt;
 #&lt;br /&gt;
  ...&lt;br /&gt;
  29.00000    4.00000    0.00000    0.22802    1.07276&lt;br /&gt;
  29.00000    5.00000    0.33228    0.66303   -2.39219&lt;br /&gt;
  ...&lt;br /&gt;
Thus it is about 0.66-0.23=0.43 eV (not fully converged).&lt;br /&gt;
&lt;br /&gt;
We can also compute the G0W0 correction for all the k-point of the database. To this end open the input file &#039;&#039;../Inputs/02_GW.in&#039;&#039; (or your own) and edit the number of k-point to be computed &lt;br /&gt;
 %&lt;br /&gt;
 QPkrange                      1 | 29 |   3 | 6|  # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 %&lt;br /&gt;
If you have learned how to run the code in parallel you may also set the parallel environment input variables:&lt;br /&gt;
 X_all_q_CPU= &amp;amp;quot;2&amp;amp;quot;              # [PARALLEL] CPUs for each role &lt;br /&gt;
 X_all_q_ROLEs= &amp;amp;quot;q&amp;amp;quot;            # [PARALLEL] CPUs roles (q,k,c,v) &lt;br /&gt;
 SE_CPU= &amp;amp;quot;2&amp;amp;quot;                   # [PARALLEL] CPUs for each role &lt;br /&gt;
 SE_ROLEs= &amp;amp;quot;q&amp;amp;quot;                 # [PARALLEL] CPUs roles (q,qp,b)&lt;br /&gt;
Remember to use the same name after the -J option, so that the code will be able to use the informations from the previous run and avoid many calculations. &lt;br /&gt;
 $ mpirun -np 2 yambo -F Inputs/02_GW.in -J GW -C GW_out&lt;br /&gt;
In the &#039;&#039;GW_out&#039;&#039; folder you will find now also the &#039;&#039;o-GW.qp_01&#039;&#039; file containg the GW corrections for all the k-points.&lt;br /&gt;
&lt;br /&gt;
Now you can enter the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/4x4x4_shifted+GAMMA&amp;lt;/code&amp;gt; and repeat the same calculations. Remember that in the input file you will generate you should change all the band ranges doubling the number of states (do you understand why?) &amp;lt;code&amp;gt; % BndsRnXp    1 | 80 |        # [Xp] Polarization function bands % % GbndRnge    1 | 80 |                 # [GW] G[W] bands range % %QPkrange                      29 | 29 |   5 | 12|  # [GW] QP generalized Kpoint/Band indices %&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The correction to the band gap is the difference between the correction at k 29 to the valence and the conduction band. &amp;lt;code&amp;gt; # #  K-point    Band       Eo         E-Eo       Sc(Eo) #   ...   29.00000    8.00000    0.00000    0.21758    0.95843   29.00000    9.00000    0.06025    0.65362   -2.36544   ...&amp;lt;/code&amp;gt; Thus it is about 0.65-0.22=0.43 eV (not fully converged). Indeed the same result obtained without SOC. The resulting electronic gap is about 0.46 eV reasonably close to the experimental band gap of 0.72 eV. It is also a big improvment compared to the LDA band gap (less than 0.03 eV). This correction (indeed the slightly bigger value of 0.53 eV) will be used, in the form of a scissor operator, as a starting point to compute the optical spectra.&lt;br /&gt;
&lt;br /&gt;
Again we can also compute the G0W0 correction for all the k-point of the database. You can plot column 4 of the output file against column 3 to obtain a picture of the QP corrections. In the following figure we show the plot of the G0W0 correction (E_GoWo-E_LDA) vs the LDA eigenvalues. The corrections at the Gamma and the L point are marked with bigger red spots.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=400px &amp;gt;&lt;br /&gt;
Image:SOC_GaSb_GoWo_corrections.png|GaSb QP corrections without SOC &lt;br /&gt;
Image:GaSb GoWo corrections SOC.png|GaSb GoWo corrections with SOC&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
The &amp;amp;quot;scissor operator approach&amp;amp;quot; does not seem a very good approximation for GaSb. Indeed the quasi particle corrections are not constant, especially in the conduction band. For example the correction to the Gamma point is bigger than the corrections to all other k-points. This result however maybe due to the poor covergence parameters. If you would like to better investigate these results you should try do convergence tests. Since QP corrections are poorly sensitive to the spin-orbit interaction it is probably a good idea to do convergence without SOC.&lt;br /&gt;
&lt;br /&gt;
Here we also provide a plot of the band-structure at different levels of approximation: DFT, DFT+scissor, QP. The band structures are obtained from an interpolation of our k-points mesh and it is not very precise since, again, we are using a quite coarse sampling of the brillouine zone. Indeed we can see that already the interpolated DFT band structure deviates from the exact DFT band-structure, which has also been reported. In particular in the region nearby Gamma. However it gives quite nicely an overview of how the QP band structure compares with the DFT band stucture. The main effect is indeed an opening of the band-gap which can be described in terms of a scissor operator.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_bands_yambo.png|600px|center|GaSb QP bands]]&lt;br /&gt;
&lt;br /&gt;
= Effect of spin-orbit interaction on the optical properties of GaSb =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--{|&lt;br /&gt;
| [[File:SOC_GaSb_bands.png|600px|center|GaSb bands 1]]&lt;br /&gt;
| [[File:SOC_GaSb_absorption.png|600px|center|GaSb bands 2]]&lt;br /&gt;
|} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now turn our attention on the optical properties of the system. Here we will compute the dielectric function at different levels of approximations:&amp;lt;br /&amp;gt;&lt;br /&gt;
(i) at the IP-RPA level, thus using the Fermi golden rule with the KS energies and wave-functions&amp;lt;br /&amp;gt;&lt;br /&gt;
(ii) at the RPA level, thus also including the effect of the local fields&amp;lt;br /&amp;gt;&lt;br /&gt;
(iii) at the BSE level, thus including many-body effects, both correcting the KS energies (we will introduce a scissor obtained from the GW calculation) and considering the statically screened electron-hole interaction&lt;br /&gt;
&lt;br /&gt;
First, setup the calculation (initialization) in the usual way in the folder without SOC&lt;br /&gt;
 $ cd Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 $ yambo -J 01_init&lt;br /&gt;
and repeat the same inside the folder &#039;&#039;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&#039;&#039; before continuing.&lt;br /&gt;
&lt;br /&gt;
== RPA-IP absorption ==&lt;br /&gt;
&lt;br /&gt;
Create a local folder inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; which you will call &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; Then, to create the input file, you can run the command: &amp;lt;code&amp;gt; &amp;gt;yambo -o c -V RL -F My_inputs/03_IP-RPA.in&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
As before, we also provide an input file with suggested parameters for this calculations. The kind of calculation is controlled by the input variable &amp;lt;code&amp;gt; Chimod= &amp;amp;quot;IP&amp;amp;quot;                 # [X] IP/Hartree/ALDA/LRC/BSfxc NGsBlkXd= 1            RL    # [Xd] Response block size&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
These tells you that we are building up the dielectric function in G-space considering only on G vector, i.e. the G=0 component. The string Chimod= &amp;amp;quot;IP&amp;amp;quot; recalls us that this means we are neglecting the local fields effect. We set the plane-waves cutoff for the wavefunctions to &amp;lt;code&amp;gt; FFTGvecs=  10  Ry   # [FFT] Plane-waves&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Since we are interested into the optical spectrum calculation, only the Q=0 term, i.e. the first Q-point, is calculated &amp;lt;code&amp;gt; % QpntsRXd   1 | 1 |                   # [Xd] Transferred momenta %&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
The number of bands we use is 20. This is a reasonable number of states to converge the IP-RPA optical spectrum in the VIS-UV range. (If you wish to calculate the EELS spectrum for q different from 0 probably more bands will be required.) &amp;lt;code&amp;gt; % BndsRnXd    1 | 10 |                 # [Xd] Polarization function bands %&amp;lt;/code&amp;gt; As you learned the dielectric function is a tensir and in principle three calculations for light polarized along x,y,z chould be done depending on the experimental setup. However GaSb is a system with cubic symmetry, thus any direction is equivalent. Here we decide to compute epsilon along the &amp;amp;quot;(1 1 1)&amp;amp;quot; direction. &amp;lt;code&amp;gt; % LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field %&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation using either your input file or the one provided in the Inputs folder &amp;lt;code&amp;gt; &amp;gt;yambo -F My_inputs/03_IP-RPA.in  -J 03_IP-RPA -C 03_IP-RPA_out&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Inside the &amp;lt;code&amp;gt;03_IP-RPA&amp;lt;/code&amp;gt; folder you will find the databases created by the code (in this case just the dipoles), while in the &amp;lt;code&amp;gt;03_IP-RPA_out&amp;lt;/code&amp;gt; the report file and the output files for the dielectric function which describes the absorption (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;) and for its inverse (&amp;lt;code&amp;gt;o-03_IP-RPA.eel*&amp;lt;/code&amp;gt;), which describes the electron energy loss. You can plot them with your favorit software (for example gnuplot or xmgrace). The real and imaginary parts of the IP-RPA dielectric function are column 3 and 2 respectively of the file (&amp;lt;code&amp;gt;o-03_IP-RPA.eps*&amp;lt;/code&amp;gt;). Using also the reference output file in the &amp;lt;code&amp;gt;Without_SOC&amp;lt;/code&amp;gt; folder you can compare the spectrum with and without SOC.&lt;br /&gt;
&lt;br /&gt;
Now repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use &amp;lt;code&amp;gt; % BndsRnXd    1 | 20 |                 # [Xd] Polarization function bands %&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.jpg|600px|center|GaSb absorption RPA]]&lt;br /&gt;
If you wish to obtain a reasonable spectrum however the 6x6x6 kpts grid is not enough. In order to check the convergence with the number of k-points you should run the same kind of calculations on other k-points meshes, either using the ones we provided ot creating new ones using the input files in the Pwscf folder (see section [[more.php|More on GaSb]] for more advanced calculations).&lt;br /&gt;
&lt;br /&gt;
In the directories Reference_Outputs several RPA dielectric functions are saved with the dielectric function calculated with the 10x10x10 and the 14x14x14 k-grid. You will learn that within RPA spectra the lowest energy peak is under-estimated. Also the spectra with and without SOC look very similar and the SO splitting is almost not present. This is clearly due to the excitonic nature of the E1 peak which can be correctly described only including the electron-hole interaction.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
== RPA absorption with local fieldds ==&lt;br /&gt;
&lt;br /&gt;
To also include the local fields effect you can generate the input with the command: &amp;lt;code&amp;gt; &amp;gt;yambo -o c -k hartree -F My_inputs/04_RPA_LF.in&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder. In the input file we provide you will see that now the chimod and size of the dynamical matrix are set to &amp;lt;code&amp;gt; Chimod= &amp;amp;quot;Hartree&amp;amp;quot;       # [X] IP/Hartree/ALDA/LRC/BSfxc NGsBlkXd= 1       Ry    # [Xd] Response block size&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Including local fields the poles of absorption will move from KS transitions to many-electrons transitions (although we are still neglecting the electron-hole interaction). As a result you will need more states to converge the absorption spectrum. This is why we set the number of bands to 15: &amp;lt;code&amp;gt; % BndsRnXd    1 | 15 |                 # [Xd] Polarization function bands %&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
while as before we will have &amp;lt;code&amp;gt; % QpntsRXd   1 | 1 |                   # [Xd] Transferred momenta % % LongDrXd  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field %&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We are ready to run the RPA calculation: &amp;lt;code&amp;gt; &amp;gt;yambo -F My_inputs/04_RPA_LF.in -J 04_RPA_LF -C 04_RPA_LF_out&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
In the 04_RPA+LF_out folder you will fine the report and the output files as before. The real and imaginary parts of the RPA+LF dielectric function with local fields are column 3 and 2 respectively of the .eps file. While the corresponding IP-RPA spectra is reported in columns 5 and 4.&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use &amp;lt;code&amp;gt; % BndsRnXd    1 | 30 |                 # [Xd] Polarization function bands %&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
In the follwing picture we compare the result of IP-RPA and RPA+LF with SOC.&lt;br /&gt;
&lt;br /&gt;
[[File:SOC_GaSb_absorption_RPA_IP_vs_LF.png|600px|center|GaSb absorption RPA]]&lt;br /&gt;
== BSE absorption with QP corrections ==&lt;br /&gt;
&lt;br /&gt;
As you probably know the inclusion of the electron-hole interaction makes the approach in G space not feaseble. We have thus to compute the dielectric function in the electron-hole space, building up the excitonic hamiltonian. Thus to create the input file you can run the command: &amp;lt;code&amp;gt; &amp;gt;yambo -o b -k sex -b -y h -V all -F My_inputs/05_BSE+scissor.in&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
inside the &amp;lt;code&amp;gt;Solid_GaSb/Without_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; folder. As before you, in the directory Inputs, you can find an example with suggested parameters. The plane-wave cutoffs used to expand wavefunctions is set to 10 Ry, the cut-off on the exchange interaction between the electron and the hole (i.e. for the local-fields) is set to 10 Ry (here we use a much higer value compared to the previous run since the computational cost of increasing this variable in the electron-hole space is very low). and, finally, the cut-off on the direct electron-hole interaction is set to 1 Ry (to build up this term, where the interaction is screened, we need to compute the static dielectric constant in G-space, thus increasing this value is computationally demanding). &amp;lt;code&amp;gt; FFTGvecs= 10     Ry    # [FFT] Plane-waves BSENGexx= 10     Ry    # [BSK] Exchange components BSENGBlk=  1     Ry    # [BSK] Screened interaction block size&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Indeed in the input file you can also see the parameters used to compute the static dielectric function needed for the screened Coulomb term (W) of the BSE kernel. Here we use 40 bands and an energy cut-off of 1 Ry. &amp;lt;code&amp;gt; % BndsRnXs    1 | 20 |                 # [Xs] Polarization function bands % NGsBlkXs= 1            Ry    # [Xs] Response block size&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
The input variable &amp;amp;quot;KfnQP_E&amp;amp;quot; can be used to include a scissor operator, i.e a opening of the DFT band gap. The value 0.53 eV is the coverged correction at Gamma obtained in the GW run. Here we will calculate the BSE assuming that the &amp;amp;quot;scissor operator approximation&amp;amp;quot; is valid for GaSb (to be checked in principle!) . &amp;lt;code&amp;gt; % KfnQP_E  0.530000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim %&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
To build up the excitonic matrix we consider the states from 5 to 12, i.e. we are using 4 occupied and 4 unoccupied bands. &amp;lt;code&amp;gt; % BSEBands   3 | 6 |          # [BSK] Bands range %&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
and we will build up the dielectric function using a grid of 200 point in frequency space &amp;lt;code&amp;gt; BEnSteps= 200                # [BSS] Energy steps&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Finally, similarly as before, we will have &amp;lt;code&amp;gt; % LongDrXs  1.000000 | 1.000000 | 1.000000 |        # [Xd] [cc] Electric Field %&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Remember that the BS kernel is written in the electron-hole space and its size is given by the relation&amp;lt;br /&amp;gt;&lt;br /&gt;
BS kernel size = Valence Bands × Conduction Bands × K-points in the whole BZ.&amp;lt;br /&amp;gt;&lt;br /&gt;
This means that in the case with SO we are building up a matrix 2x2=4 times larger of the corresponding calculation without spin-orbit (you can compare the input in With_SO/Yambo/Inputs / Without_SO/Yambo/Inputs and reference outputs in With_SO/Yambo/Reference_Outputs / With_SO/Yambo/Reference_Outputs)&lt;br /&gt;
&lt;br /&gt;
We are ready to run the BSE calculation: &amp;lt;code&amp;gt; &amp;gt;yambo -F 05_BSE+scissor.in  -J 05_BSE -C 05_BSE_out&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Inside the folder &amp;lt;code&amp;gt;05_BSE_out&amp;lt;/code&amp;gt; you should find the report file &amp;lt;code&amp;gt;r-05_BSE_optics_bse_bsk_bss_em1s&amp;lt;/code&amp;gt; ( Open it and look if everything is ok! ) and the two response files &amp;lt;code&amp;gt; o-05_BSE.eel_q1_haydock_bse &amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-05_BSE.eps_q1_haydock_bse&amp;lt;/code&amp;gt;. Again the real and imaginary parts of the BSE dielectric function are column 3 and 2 respectively, while the corresponding GW spectra are column 5 and 4.&lt;br /&gt;
&lt;br /&gt;
In the folder &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; you will find instead the DBs of the static screening (W) needed to build up the BSE kernel (&amp;lt;code&amp;gt;ndb.em1s&amp;lt;/code&amp;gt;) and the BSE matrix (&amp;lt;code&amp;gt;ndb.BS*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Repeat the same calculation going into the folder &amp;lt;code&amp;gt;Solid_GaSb/With_SOC/Yambo/6x6x6_shifted&amp;lt;/code&amp;gt; remembering to double the number of states you use &amp;lt;code&amp;gt; % BndsRnXs    1 | 20 |                 # [Xs] Polarization function bands % % BSEBands   5 | 12 |          # [BSK] Bands range %&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
and compare the results.&lt;br /&gt;
&lt;br /&gt;
If you do the corresponding calculations for the case without spin-orbits using the databases in the directory GaSb_nSO/YAMBO and inputs in GaSb_nSO/Inputs, the two BSE spectra should look like in this figure:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE_few_kpts.jpg|600px|center|GaSb absorption BSE gew kpts]]&lt;br /&gt;
As mentioned before the two spectra present spurious peaks ( as the first peak!) due to uncoverged k-point sampling. Nevertheless the splitting due to spin-orbit interaction is already visible in the peak around 2.1 eV.&lt;br /&gt;
A more converged (yet not fully converged calculation) would give the following results which compares very nicely with the experimental data:&lt;br /&gt;
[[File:SOC_GaSb_absorption_BSE.png|600px|center|GaSb absorption BSE]]&lt;br /&gt;
&lt;br /&gt;
= Exciton analysis =&lt;br /&gt;
&lt;br /&gt;
In this part of the tutorial we show how to analyze the origin of the E1 peak in GaSb. Since the calculation with the SOC case is very demanding we will do that only for the case without SOC. So first of all enter the &amp;lt;code&amp;gt;Without_SOC/YAMBO/6x6x6_shifted&amp;lt;/code&amp;gt; folder and, if you didn&#039;t before, run the setup: &amp;lt;code&amp;gt; &amp;gt;cd Without_SOC/YAMBO/6x6x6_shifted &amp;gt;ls SAVE &amp;gt;yambo -J 01_init &amp;gt;ls SAVE r-01_init_setup&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then create the &amp;lt;code&amp;gt;My_inputs&amp;lt;/code&amp;gt; folder and the input file for a BSE run &amp;lt;code&amp;gt; &amp;gt;yambo -o b -k sex -b -y d -V all -F My_inputs/05_BSE+shissor.in&amp;lt;/code&amp;gt; You can use the same parameters you used to compute the absorption with SOC previously. The number of bands will be the half of the case without SOC &amp;lt;code&amp;gt; % BSEBands  3 | 6 |          # [BSK] Bands range %&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Also this time you will use the to &amp;lt;code&amp;gt;&amp;amp;quot;d&amp;amp;quot;&amp;lt;/code&amp;gt; and uncomment the variable needed to Write to disk excitonic the WFs: &amp;lt;code&amp;gt; BSSmod= &amp;amp;quot;d&amp;amp;quot;              # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft` WRbsWF                   # [BSS] Write to disk excitonic the WFs&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Then you have to run the BSE calculation (notice that, in case you already computed the BSE spectrum also for the case without SOC, the code can read the results from the provious BSE run skipping many steps) &amp;lt;code&amp;gt; &amp;gt;yambo -F My_inuts/05_BSE+shissor.in  -J 05_BSE -C 05_BSE_out&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
In the &amp;lt;code&amp;gt;05_BSE&amp;lt;/code&amp;gt; folder you will now find a new database file called &amp;lt;code&amp;gt;ndb.BS_diago_Q01&amp;lt;/code&amp;gt;. This is what you need to analyze the exciton peaks running the post-processing code ypp.&lt;br /&gt;
&lt;br /&gt;
First of all you can run: &amp;lt;code&amp;gt; &amp;gt;ypp -e s -J 05_BSE -C BSE_out&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
This run will sort in energy the excitonic eigenvalues writing their oscillator strenghts (see &amp;lt;code&amp;gt;o-06_bse.exc_E_sorted&amp;lt;/code&amp;gt;). Then you can create the ypp input required to analize how each excitonic state is build up in terms of single-particle states: &amp;lt;code&amp;gt; &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Put the index &amp;lt;code&amp;gt;#N&amp;lt;/code&amp;gt; of the exciton with higher strenght in the E_1 peak region &amp;lt;code&amp;gt; &amp;gt;ypp -e a -F My_inputs/05_BSE_ypp.in -J 05_BSE -C 06_BSE_out&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
You will find the two files &amp;lt;code&amp;gt;o-06_bse.exc_weights_at_#N&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;o-06_bse.exc_amplitude_at_#N&amp;lt;/code&amp;gt;. In these files you will find informations on the highest strenght exciton in the E1 peak region.&lt;br /&gt;
&lt;br /&gt;
= Other excercises =&lt;br /&gt;
&lt;br /&gt;
# Try to converge the G0W0 increasing the polarization RL size, the polarization bands, the number of bands in the Green function and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Try to converge the absorption spectra increasing the polarization RL size, the polarization bands, the number of bands to construct the excitonic matrix and finally using denser sampling of the Brillouin zone.&lt;br /&gt;
# Plot the EELS spectrum obtained within IP-RPA and RPA with local fields. Also in this case you can check the effect of increasing the polarization bands. You may also try to do a resonant only calculation to see that the EELS cannot be described using only the resonant part of the response function.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;yambo_soc&amp;quot;&amp;gt;M. Marsili, A. Molina-Sánchez, M. Palummo, D. Sangalli, A. Marini, [https://doi.org/10.1103/PhysRevB.103.155152  Phys. Rev. B &#039;&#039;&#039;103&#039;&#039;&#039;, 155152 (2021)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wiki&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Gallium_antimonide GaSb on wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kim&amp;quot;&amp;gt; Y.S. Kim et al. Phys. Rev. B &#039;&#039;&#039;82&#039;&#039;&#039;, 205212 (2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;rem&amp;quot;&amp;gt; I. N. Remediakis and Efthimios Kaxiras Phys. Rev. B &#039;&#039;&#039;59&#039;&#039;&#039;, 5336 (1999).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Machine_specific_configure_scripts&amp;diff=8898</id>
		<title>Machine specific configure scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Machine_specific_configure_scripts&amp;diff=8898"/>
		<updated>2025-06-28T19:02:40Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* G100 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Yambo @ HPC machines ==&lt;br /&gt;
The GPL version of Yambo is already installed on different HPC systems around the world, here we report some of them:&lt;br /&gt;
* Leonardo at CINECA&lt;br /&gt;
* Eurora at CINECA&lt;br /&gt;
* Niflheim at Technical University of Denmark&lt;br /&gt;
* SP6 at CINECA&lt;br /&gt;
* Arina at SGI at Universidad del Pais Vasco.&lt;br /&gt;
* Core.Sam at University of Pittsburgh.&lt;br /&gt;
&lt;br /&gt;
Below are some configure options that have been used in the past. Of course, since compilers and architectures vary a lot, there are no guarantees that they will work on your system. Be particularly careful when specifying FCFLAGS, as you may override settings which are necessary for compilation, e.g. -nofor_main with ifort.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- CH: Suggest to list/group these in order of architecture, linux, IBM, Cray, OS/X, etc --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CINECA HPC centre ==&lt;br /&gt;
&lt;br /&gt;
=== M100 ===&lt;br /&gt;
 module ...&lt;br /&gt;
&lt;br /&gt;
=== G100 ===&lt;br /&gt;
 module purge&lt;br /&gt;
 module load autoload&lt;br /&gt;
 module load intel/oneapi-2021--binary&lt;br /&gt;
 module load mkl/oneapi-2021--binary&lt;br /&gt;
 module load intelmpi/oneapi-2021--binary&lt;br /&gt;
 module load intel-oneapi-compilers/2021.4.0&lt;br /&gt;
 module load intel-oneapi-mpi/2021.4.0&lt;br /&gt;
 module load intel-oneapi-mkl/2021.4.0&lt;br /&gt;
 module load hdf5/1.10.7--intel-oneapi-mpi--2021.4.0--intel--2021.4.0&lt;br /&gt;
 module load netcdf-c/4.8.1--intel-oneapi-mpi--2021.4.0--intel--2021.4.0&lt;br /&gt;
 module load netcdf-fortran/4.5.3--intel-oneapi-mpi--2021.4.0--intel--2021.4.0&lt;br /&gt;
 module load libxc/5.1.5--intel--oneapi-2021--binary&lt;br /&gt;
 &lt;br /&gt;
 export FC=ifort &lt;br /&gt;
 export F77=ifort&lt;br /&gt;
 export CPP=&amp;quot;icc -E -ansi&amp;quot;&lt;br /&gt;
 export CC=icc &lt;br /&gt;
 export FPP=&amp;quot;fpp -free -P&amp;quot;&lt;br /&gt;
 export F90SUFFIX=&amp;quot;.f90&amp;quot;&lt;br /&gt;
 export MPIFC=mpiifort&lt;br /&gt;
 export MPIF77=mpiifort&lt;br /&gt;
 export MPICC=mpiicc&lt;br /&gt;
 export MPICXX=mpiicpc&lt;br /&gt;
 &lt;br /&gt;
 ./configure \&lt;br /&gt;
    --enable-open-mp --enable-mpi --enable-slepc-linalg --enable-hdf5-par-io --enable-par-linalg \&lt;br /&gt;
    --enable-msgs-comps --enable-time-profile --enable-memory-profile \&lt;br /&gt;
    --with-blas-libs=&amp;quot;-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl&amp;quot; \&lt;br /&gt;
    --with-lapack-libs=&amp;quot;-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl&amp;quot; \&lt;br /&gt;
    --with-scalapack-libs=&amp;quot;-L${MKLROOT}/lib/intel64 -lmkl_scalapack_lp64&amp;quot; \&lt;br /&gt;
    --with-blacs-libs=&amp;quot;-L${MKLROOT}/lib/intel64 -lmkl_blacs_intelmpi_lp64&amp;quot; \&lt;br /&gt;
    --with-fft-includedir=&amp;quot;${MKLROOT}/include&amp;quot; \&lt;br /&gt;
    --with-fft-libs=&amp;quot;-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl&amp;quot; \&lt;br /&gt;
    --with-netcdf-path=$NETCDF_C_HOME \&lt;br /&gt;
    --with-netcdff-path=$NETCDF_FORTRAN_HOME \&lt;br /&gt;
    --with-hdf5-path=$HDF5_HOME \&lt;br /&gt;
    --with-libxc-path=$LIBXC_HOME \&lt;br /&gt;
    --with-extlibs-path=${HOME}/opt/ext-libs/oneapi-2021&lt;br /&gt;
&lt;br /&gt;
=== EURORA SP6 ===&lt;br /&gt;
&lt;br /&gt;
EURORA is a hybrid supercomputer, with Intel Xeon andyBridge processors and GPU NVIDIA Tesla K20 accelerators&lt;br /&gt;
&lt;br /&gt;
 module load autoload/0.1 intel/cs-xe-2013--binary intelmpi/4.1.0--binary mkl/11.0.1--binary gnu/4.6.3 cuda/5.0.35 qe/5.0.3 netcdf/4.1.3--intel--cs-xe-2013--binary hdf5/1.8.9_ser--intel--cs-xe-2013--binary szip/2.1--gnu--4.6.3 zlib/1.2.7--gnu--4.6.3&lt;br /&gt;
 ./configure --with-p2y=5.0 \&lt;br /&gt;
 --with-iotk=/cineca/prod/build/applications/qe/5.0.3/cuda--5.0.35/BA_WORK/espresso-5.0.3/iotk/ \&lt;br /&gt;
 --with-netcdf-lib=/cineca/prod/libraries/netcdf/4.1.3/intel--cs-xe-2013--binary/lib/ \&lt;br /&gt;
 --with-netcdf-include=/cineca/prod/libraries/netcdf/4.1.3/intel--cs-xe-2013--binary/include \&lt;br /&gt;
 --with-netcdf-link=&amp;quot;-L/cineca/prod/libraries/hdf5/1.8.9_ser/intel--cs-xe-2013--binary/lib -L/cineca/prod/libraries/szip/2.1/gnu--4.6.3/lib -lhdf5_fortran -lhdf5_hl -lhdf5 -lnetcdff -lnetcdf -lcurl -lsz -lz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== IBM AIX and xlf ===&lt;br /&gt;
Linking with netCDF, PWscf, FFTW. Production runs&lt;br /&gt;
 export CPP=cpp &lt;br /&gt;
 export CC=xlc_r&lt;br /&gt;
 export F77=xlf_r&lt;br /&gt;
 export FC=xlf90_r&lt;br /&gt;
 export FCFLAGS=&#039;-O2 -q64 -qstrict -qarch=pwr6 -qtune=pwr6 -qmaxmem=-1 -qsuffix=f=f&#039;&lt;br /&gt;
 ./configure --build=powerpc-ibm --with-fftw=/cineca/prod/libraries/fftw/3.2.2/xl--10.1/lib &lt;br /&gt;
 --with-netcdf-lib=/cineca/prod/libraries/netcdf/4.0.1/xl--10.1/lib &lt;br /&gt;
 --with-netcdf-include=/cineca/prod/libraries/netcdf/4.0.1/xl--10.1/include &lt;br /&gt;
 --with-iotk=/cineca/prod/build/applications/QuantumESPRESSO/4.1/xl--10.1/BA_WORK/QuantumESPRESSO-4.1/iotk &lt;br /&gt;
 --with-p2y=4.0&lt;br /&gt;
&lt;br /&gt;
== Other HPC centers ==&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Machine_specific_configure_scripts&amp;diff=8897</id>
		<title>Machine specific configure scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Machine_specific_configure_scripts&amp;diff=8897"/>
		<updated>2025-06-28T19:01:56Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* G100 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Yambo @ HPC machines ==&lt;br /&gt;
The GPL version of Yambo is already installed on different HPC systems around the world, here we report some of them:&lt;br /&gt;
* Leonardo at CINECA&lt;br /&gt;
* Eurora at CINECA&lt;br /&gt;
* Niflheim at Technical University of Denmark&lt;br /&gt;
* SP6 at CINECA&lt;br /&gt;
* Arina at SGI at Universidad del Pais Vasco.&lt;br /&gt;
* Core.Sam at University of Pittsburgh.&lt;br /&gt;
&lt;br /&gt;
Below are some configure options that have been used in the past. Of course, since compilers and architectures vary a lot, there are no guarantees that they will work on your system. Be particularly careful when specifying FCFLAGS, as you may override settings which are necessary for compilation, e.g. -nofor_main with ifort.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- CH: Suggest to list/group these in order of architecture, linux, IBM, Cray, OS/X, etc --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CINECA HPC centre ==&lt;br /&gt;
&lt;br /&gt;
=== M100 ===&lt;br /&gt;
 module ...&lt;br /&gt;
&lt;br /&gt;
=== G100 ===&lt;br /&gt;
 module purge&lt;br /&gt;
 module load autoload&lt;br /&gt;
 module load intel/oneapi-2021--binary&lt;br /&gt;
 module load mkl/oneapi-2021--binary&lt;br /&gt;
 module load intelmpi/oneapi-2021--binary&lt;br /&gt;
 module load intel-oneapi-compilers/2023.2.1&lt;br /&gt;
 module load intel-oneapi-mpi/2021.4.0&lt;br /&gt;
 module load intel-oneapi-mkl/2021.4.0&lt;br /&gt;
 module load hdf5/1.10.7--intel-oneapi-mpi--2021.4.0--intel--2021.4.0&lt;br /&gt;
 module load netcdf-c/4.8.1--intel-oneapi-mpi--2021.4.0--intel--2021.4.0&lt;br /&gt;
 module load netcdf-fortran/4.5.3--intel-oneapi-mpi--2021.4.0--intel--2021.4.0&lt;br /&gt;
 module load libxc/5.1.5--intel--oneapi-2021--binary&lt;br /&gt;
 &lt;br /&gt;
 export FC=ifort &lt;br /&gt;
 export F77=ifort&lt;br /&gt;
 export CPP=&amp;quot;icc -E -ansi&amp;quot;&lt;br /&gt;
 export CC=icc &lt;br /&gt;
 export FPP=&amp;quot;fpp -free -P&amp;quot;&lt;br /&gt;
 export F90SUFFIX=&amp;quot;.f90&amp;quot;&lt;br /&gt;
 export MPIFC=mpiifort&lt;br /&gt;
 export MPIF77=mpiifort&lt;br /&gt;
 export MPICC=mpiicc&lt;br /&gt;
 export MPICXX=mpiicpc&lt;br /&gt;
 &lt;br /&gt;
 ./configure \&lt;br /&gt;
    --enable-open-mp --enable-mpi --enable-slepc-linalg --enable-hdf5-par-io --enable-par-linalg \&lt;br /&gt;
    --enable-msgs-comps --enable-time-profile --enable-memory-profile \&lt;br /&gt;
    --with-blas-libs=&amp;quot;-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl&amp;quot; \&lt;br /&gt;
    --with-lapack-libs=&amp;quot;-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl&amp;quot; \&lt;br /&gt;
    --with-scalapack-libs=&amp;quot;-L${MKLROOT}/lib/intel64 -lmkl_scalapack_lp64&amp;quot; \&lt;br /&gt;
    --with-blacs-libs=&amp;quot;-L${MKLROOT}/lib/intel64 -lmkl_blacs_intelmpi_lp64&amp;quot; \&lt;br /&gt;
    --with-fft-includedir=&amp;quot;${MKLROOT}/include&amp;quot; \&lt;br /&gt;
    --with-fft-libs=&amp;quot;-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl&amp;quot; \&lt;br /&gt;
    --with-netcdf-path=$NETCDF_C_HOME \&lt;br /&gt;
    --with-netcdff-path=$NETCDF_FORTRAN_HOME \&lt;br /&gt;
    --with-hdf5-path=$HDF5_HOME \&lt;br /&gt;
    --with-libxc-path=$LIBXC_HOME \&lt;br /&gt;
    --with-extlibs-path=${HOME}/opt/ext-libs/oneapi-2021&lt;br /&gt;
&lt;br /&gt;
=== EURORA SP6 ===&lt;br /&gt;
&lt;br /&gt;
EURORA is a hybrid supercomputer, with Intel Xeon andyBridge processors and GPU NVIDIA Tesla K20 accelerators&lt;br /&gt;
&lt;br /&gt;
 module load autoload/0.1 intel/cs-xe-2013--binary intelmpi/4.1.0--binary mkl/11.0.1--binary gnu/4.6.3 cuda/5.0.35 qe/5.0.3 netcdf/4.1.3--intel--cs-xe-2013--binary hdf5/1.8.9_ser--intel--cs-xe-2013--binary szip/2.1--gnu--4.6.3 zlib/1.2.7--gnu--4.6.3&lt;br /&gt;
 ./configure --with-p2y=5.0 \&lt;br /&gt;
 --with-iotk=/cineca/prod/build/applications/qe/5.0.3/cuda--5.0.35/BA_WORK/espresso-5.0.3/iotk/ \&lt;br /&gt;
 --with-netcdf-lib=/cineca/prod/libraries/netcdf/4.1.3/intel--cs-xe-2013--binary/lib/ \&lt;br /&gt;
 --with-netcdf-include=/cineca/prod/libraries/netcdf/4.1.3/intel--cs-xe-2013--binary/include \&lt;br /&gt;
 --with-netcdf-link=&amp;quot;-L/cineca/prod/libraries/hdf5/1.8.9_ser/intel--cs-xe-2013--binary/lib -L/cineca/prod/libraries/szip/2.1/gnu--4.6.3/lib -lhdf5_fortran -lhdf5_hl -lhdf5 -lnetcdff -lnetcdf -lcurl -lsz -lz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== IBM AIX and xlf ===&lt;br /&gt;
Linking with netCDF, PWscf, FFTW. Production runs&lt;br /&gt;
 export CPP=cpp &lt;br /&gt;
 export CC=xlc_r&lt;br /&gt;
 export F77=xlf_r&lt;br /&gt;
 export FC=xlf90_r&lt;br /&gt;
 export FCFLAGS=&#039;-O2 -q64 -qstrict -qarch=pwr6 -qtune=pwr6 -qmaxmem=-1 -qsuffix=f=f&#039;&lt;br /&gt;
 ./configure --build=powerpc-ibm --with-fftw=/cineca/prod/libraries/fftw/3.2.2/xl--10.1/lib &lt;br /&gt;
 --with-netcdf-lib=/cineca/prod/libraries/netcdf/4.0.1/xl--10.1/lib &lt;br /&gt;
 --with-netcdf-include=/cineca/prod/libraries/netcdf/4.0.1/xl--10.1/include &lt;br /&gt;
 --with-iotk=/cineca/prod/build/applications/QuantumESPRESSO/4.1/xl--10.1/BA_WORK/QuantumESPRESSO-4.1/iotk &lt;br /&gt;
 --with-p2y=4.0&lt;br /&gt;
&lt;br /&gt;
== Other HPC centers ==&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Machine_specific_configure_scripts&amp;diff=8896</id>
		<title>Machine specific configure scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Machine_specific_configure_scripts&amp;diff=8896"/>
		<updated>2025-06-28T18:33:16Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* CINECA HPC centre */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Yambo @ HPC machines ==&lt;br /&gt;
The GPL version of Yambo is already installed on different HPC systems around the world, here we report some of them:&lt;br /&gt;
* Leonardo at CINECA&lt;br /&gt;
* Eurora at CINECA&lt;br /&gt;
* Niflheim at Technical University of Denmark&lt;br /&gt;
* SP6 at CINECA&lt;br /&gt;
* Arina at SGI at Universidad del Pais Vasco.&lt;br /&gt;
* Core.Sam at University of Pittsburgh.&lt;br /&gt;
&lt;br /&gt;
Below are some configure options that have been used in the past. Of course, since compilers and architectures vary a lot, there are no guarantees that they will work on your system. Be particularly careful when specifying FCFLAGS, as you may override settings which are necessary for compilation, e.g. -nofor_main with ifort.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- CH: Suggest to list/group these in order of architecture, linux, IBM, Cray, OS/X, etc --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CINECA HPC centre ==&lt;br /&gt;
&lt;br /&gt;
=== M100 ===&lt;br /&gt;
 module ...&lt;br /&gt;
&lt;br /&gt;
=== G100 ===&lt;br /&gt;
 module purge&lt;br /&gt;
 module load autoload&lt;br /&gt;
 module load intel-oneapi-compilers/2023.2.1&lt;br /&gt;
 module load intel-oneapi-mpi/2021.10.0&lt;br /&gt;
 module load intel-oneapi-mkl/2023.2.0--intel-oneapi-mpi--2021.10.0--8.4.1-scalapack&lt;br /&gt;
 module load hdf5&lt;br /&gt;
 module load netcdf-c&lt;br /&gt;
 module load netcdf-fortran&lt;br /&gt;
 module load libxc&lt;br /&gt;
 &lt;br /&gt;
 export FC=ifort &lt;br /&gt;
 export F77=ifort&lt;br /&gt;
 export CPP=&amp;quot;icc -E -ansi&amp;quot;&lt;br /&gt;
 export CC=icc &lt;br /&gt;
 export FPP=&amp;quot;fpp -free -P&amp;quot;&lt;br /&gt;
 export F90SUFFIX=&amp;quot;.f90&amp;quot;&lt;br /&gt;
 export MPIFC=mpiifort&lt;br /&gt;
 export MPIF77=mpiifort&lt;br /&gt;
 export MPICC=mpiicc&lt;br /&gt;
 export MPICXX=mpiicpc&lt;br /&gt;
 &lt;br /&gt;
 ./configure \&lt;br /&gt;
    --enable-open-mp --enable-mpi --enable-slepc-linalg --enable-hdf5-par-io --enable-par-linalg \&lt;br /&gt;
    --enable-msgs-comps --enable-time-profile --enable-memory-profile \&lt;br /&gt;
    --with-blas-libs=&amp;quot;-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl&amp;quot; \&lt;br /&gt;
    --with-lapack-libs=&amp;quot;-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl&amp;quot; \&lt;br /&gt;
    --with-scalapack-libs=&amp;quot;-L${MKLROOT}/lib/intel64 -lmkl_scalapack_lp64&amp;quot; \&lt;br /&gt;
    --with-blacs-libs=&amp;quot;-L${MKLROOT}/lib/intel64 -lmkl_blacs_intelmpi_lp64&amp;quot; \&lt;br /&gt;
    --with-fft-includedir=&amp;quot;${MKLROOT}/include&amp;quot; \&lt;br /&gt;
    --with-fft-libs=&amp;quot;-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl&amp;quot; \&lt;br /&gt;
    --with-netcdf-path=$NETCDF_C_HOME \&lt;br /&gt;
    --with-netcdff-path=$NETCDF_FORTRAN_HOME \&lt;br /&gt;
    --with-hdf5-path=$HDF5_HOME \&lt;br /&gt;
    --with-libxc-path=$LIBXC_HOME \&lt;br /&gt;
    --with-extlibs-path=${HOME}/opt/ext-libs/oneapi-2021&lt;br /&gt;
&lt;br /&gt;
=== EURORA SP6 ===&lt;br /&gt;
&lt;br /&gt;
EURORA is a hybrid supercomputer, with Intel Xeon andyBridge processors and GPU NVIDIA Tesla K20 accelerators&lt;br /&gt;
&lt;br /&gt;
 module load autoload/0.1 intel/cs-xe-2013--binary intelmpi/4.1.0--binary mkl/11.0.1--binary gnu/4.6.3 cuda/5.0.35 qe/5.0.3 netcdf/4.1.3--intel--cs-xe-2013--binary hdf5/1.8.9_ser--intel--cs-xe-2013--binary szip/2.1--gnu--4.6.3 zlib/1.2.7--gnu--4.6.3&lt;br /&gt;
 ./configure --with-p2y=5.0 \&lt;br /&gt;
 --with-iotk=/cineca/prod/build/applications/qe/5.0.3/cuda--5.0.35/BA_WORK/espresso-5.0.3/iotk/ \&lt;br /&gt;
 --with-netcdf-lib=/cineca/prod/libraries/netcdf/4.1.3/intel--cs-xe-2013--binary/lib/ \&lt;br /&gt;
 --with-netcdf-include=/cineca/prod/libraries/netcdf/4.1.3/intel--cs-xe-2013--binary/include \&lt;br /&gt;
 --with-netcdf-link=&amp;quot;-L/cineca/prod/libraries/hdf5/1.8.9_ser/intel--cs-xe-2013--binary/lib -L/cineca/prod/libraries/szip/2.1/gnu--4.6.3/lib -lhdf5_fortran -lhdf5_hl -lhdf5 -lnetcdff -lnetcdf -lcurl -lsz -lz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== IBM AIX and xlf ===&lt;br /&gt;
Linking with netCDF, PWscf, FFTW. Production runs&lt;br /&gt;
 export CPP=cpp &lt;br /&gt;
 export CC=xlc_r&lt;br /&gt;
 export F77=xlf_r&lt;br /&gt;
 export FC=xlf90_r&lt;br /&gt;
 export FCFLAGS=&#039;-O2 -q64 -qstrict -qarch=pwr6 -qtune=pwr6 -qmaxmem=-1 -qsuffix=f=f&#039;&lt;br /&gt;
 ./configure --build=powerpc-ibm --with-fftw=/cineca/prod/libraries/fftw/3.2.2/xl--10.1/lib &lt;br /&gt;
 --with-netcdf-lib=/cineca/prod/libraries/netcdf/4.0.1/xl--10.1/lib &lt;br /&gt;
 --with-netcdf-include=/cineca/prod/libraries/netcdf/4.0.1/xl--10.1/include &lt;br /&gt;
 --with-iotk=/cineca/prod/build/applications/QuantumESPRESSO/4.1/xl--10.1/BA_WORK/QuantumESPRESSO-4.1/iotk &lt;br /&gt;
 --with-p2y=4.0&lt;br /&gt;
&lt;br /&gt;
== Other HPC centers ==&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Machine_specific_configure_scripts&amp;diff=8895</id>
		<title>Machine specific configure scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Machine_specific_configure_scripts&amp;diff=8895"/>
		<updated>2025-06-28T18:32:43Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* G100 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Yambo @ HPC machines ==&lt;br /&gt;
The GPL version of Yambo is already installed on different HPC systems around the world, here we report some of them:&lt;br /&gt;
* Leonardo at CINECA&lt;br /&gt;
* Eurora at CINECA&lt;br /&gt;
* Niflheim at Technical University of Denmark&lt;br /&gt;
* SP6 at CINECA&lt;br /&gt;
* Arina at SGI at Universidad del Pais Vasco.&lt;br /&gt;
* Core.Sam at University of Pittsburgh.&lt;br /&gt;
&lt;br /&gt;
Below are some configure options that have been used in the past. Of course, since compilers and architectures vary a lot, there are no guarantees that they will work on your system. Be particularly careful when specifying FCFLAGS, as you may override settings which are necessary for compilation, e.g. -nofor_main with ifort.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- CH: Suggest to list/group these in order of architecture, linux, IBM, Cray, OS/X, etc --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CINECA HPC centre ==&lt;br /&gt;
&lt;br /&gt;
=== G100 ===&lt;br /&gt;
 module purge&lt;br /&gt;
 module load autoload&lt;br /&gt;
 module load intel-oneapi-compilers/2023.2.1&lt;br /&gt;
 module load intel-oneapi-mpi/2021.10.0&lt;br /&gt;
 module load intel-oneapi-mkl/2023.2.0--intel-oneapi-mpi--2021.10.0--8.4.1-scalapack&lt;br /&gt;
 module load hdf5&lt;br /&gt;
 module load netcdf-c&lt;br /&gt;
 module load netcdf-fortran&lt;br /&gt;
 module load libxc&lt;br /&gt;
 &lt;br /&gt;
 export FC=ifort &lt;br /&gt;
 export F77=ifort&lt;br /&gt;
 export CPP=&amp;quot;icc -E -ansi&amp;quot;&lt;br /&gt;
 export CC=icc &lt;br /&gt;
 export FPP=&amp;quot;fpp -free -P&amp;quot;&lt;br /&gt;
 export F90SUFFIX=&amp;quot;.f90&amp;quot;&lt;br /&gt;
 export MPIFC=mpiifort&lt;br /&gt;
 export MPIF77=mpiifort&lt;br /&gt;
 export MPICC=mpiicc&lt;br /&gt;
 export MPICXX=mpiicpc&lt;br /&gt;
 &lt;br /&gt;
 ./configure \&lt;br /&gt;
    --enable-open-mp --enable-mpi --enable-slepc-linalg --enable-hdf5-par-io --enable-par-linalg \&lt;br /&gt;
    --enable-msgs-comps --enable-time-profile --enable-memory-profile \&lt;br /&gt;
    --with-blas-libs=&amp;quot;-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl&amp;quot; \&lt;br /&gt;
    --with-lapack-libs=&amp;quot;-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl&amp;quot; \&lt;br /&gt;
    --with-scalapack-libs=&amp;quot;-L${MKLROOT}/lib/intel64 -lmkl_scalapack_lp64&amp;quot; \&lt;br /&gt;
    --with-blacs-libs=&amp;quot;-L${MKLROOT}/lib/intel64 -lmkl_blacs_intelmpi_lp64&amp;quot; \&lt;br /&gt;
    --with-fft-includedir=&amp;quot;${MKLROOT}/include&amp;quot; \&lt;br /&gt;
    --with-fft-libs=&amp;quot;-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl&amp;quot; \&lt;br /&gt;
    --with-netcdf-path=$NETCDF_C_HOME \&lt;br /&gt;
    --with-netcdff-path=$NETCDF_FORTRAN_HOME \&lt;br /&gt;
    --with-hdf5-path=$HDF5_HOME \&lt;br /&gt;
    --with-libxc-path=$LIBXC_HOME \&lt;br /&gt;
    --with-extlibs-path=${HOME}/opt/ext-libs/oneapi-2021&lt;br /&gt;
&lt;br /&gt;
=== EURORA SP6 ===&lt;br /&gt;
&lt;br /&gt;
EURORA is a hybrid supercomputer, with Intel Xeon andyBridge processors and GPU NVIDIA Tesla K20 accelerators&lt;br /&gt;
&lt;br /&gt;
 module load autoload/0.1 intel/cs-xe-2013--binary intelmpi/4.1.0--binary mkl/11.0.1--binary gnu/4.6.3 cuda/5.0.35 qe/5.0.3 netcdf/4.1.3--intel--cs-xe-2013--binary hdf5/1.8.9_ser--intel--cs-xe-2013--binary szip/2.1--gnu--4.6.3 zlib/1.2.7--gnu--4.6.3&lt;br /&gt;
 ./configure --with-p2y=5.0 \&lt;br /&gt;
 --with-iotk=/cineca/prod/build/applications/qe/5.0.3/cuda--5.0.35/BA_WORK/espresso-5.0.3/iotk/ \&lt;br /&gt;
 --with-netcdf-lib=/cineca/prod/libraries/netcdf/4.1.3/intel--cs-xe-2013--binary/lib/ \&lt;br /&gt;
 --with-netcdf-include=/cineca/prod/libraries/netcdf/4.1.3/intel--cs-xe-2013--binary/include \&lt;br /&gt;
 --with-netcdf-link=&amp;quot;-L/cineca/prod/libraries/hdf5/1.8.9_ser/intel--cs-xe-2013--binary/lib -L/cineca/prod/libraries/szip/2.1/gnu--4.6.3/lib -lhdf5_fortran -lhdf5_hl -lhdf5 -lnetcdff -lnetcdf -lcurl -lsz -lz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== IBM AIX and xlf ===&lt;br /&gt;
Linking with netCDF, PWscf, FFTW. Production runs&lt;br /&gt;
 export CPP=cpp &lt;br /&gt;
 export CC=xlc_r&lt;br /&gt;
 export F77=xlf_r&lt;br /&gt;
 export FC=xlf90_r&lt;br /&gt;
 export FCFLAGS=&#039;-O2 -q64 -qstrict -qarch=pwr6 -qtune=pwr6 -qmaxmem=-1 -qsuffix=f=f&#039;&lt;br /&gt;
 ./configure --build=powerpc-ibm --with-fftw=/cineca/prod/libraries/fftw/3.2.2/xl--10.1/lib &lt;br /&gt;
 --with-netcdf-lib=/cineca/prod/libraries/netcdf/4.0.1/xl--10.1/lib &lt;br /&gt;
 --with-netcdf-include=/cineca/prod/libraries/netcdf/4.0.1/xl--10.1/include &lt;br /&gt;
 --with-iotk=/cineca/prod/build/applications/QuantumESPRESSO/4.1/xl--10.1/BA_WORK/QuantumESPRESSO-4.1/iotk &lt;br /&gt;
 --with-p2y=4.0&lt;br /&gt;
&lt;br /&gt;
== Other HPC centers ==&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Machine_specific_configure_scripts&amp;diff=8894</id>
		<title>Machine specific configure scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Machine_specific_configure_scripts&amp;diff=8894"/>
		<updated>2025-06-27T17:00:24Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* CINECA HPC centre */  G100 receipt&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Yambo @ HPC machines ==&lt;br /&gt;
The GPL version of Yambo is already installed on different HPC systems around the world, here we report some of them:&lt;br /&gt;
* Leonardo at CINECA&lt;br /&gt;
* Eurora at CINECA&lt;br /&gt;
* Niflheim at Technical University of Denmark&lt;br /&gt;
* SP6 at CINECA&lt;br /&gt;
* Arina at SGI at Universidad del Pais Vasco.&lt;br /&gt;
* Core.Sam at University of Pittsburgh.&lt;br /&gt;
&lt;br /&gt;
Below are some configure options that have been used in the past. Of course, since compilers and architectures vary a lot, there are no guarantees that they will work on your system. Be particularly careful when specifying FCFLAGS, as you may override settings which are necessary for compilation, e.g. -nofor_main with ifort.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- CH: Suggest to list/group these in order of architecture, linux, IBM, Cray, OS/X, etc --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CINECA HPC centre ==&lt;br /&gt;
&lt;br /&gt;
=== G100 ===&lt;br /&gt;
 module purge&lt;br /&gt;
 module load autoload&lt;br /&gt;
 module load intel-oneapi-compilers/2023.2.1&lt;br /&gt;
 module load intel-oneapi-mpi/2021.10.0&lt;br /&gt;
 module load intel-oneapi-mkl/2023.2.0--intel-oneapi-mpi--2021.10.0--8.4.1-scalapack&lt;br /&gt;
 &lt;br /&gt;
 export FC=ifort &lt;br /&gt;
 export F77=ifort&lt;br /&gt;
 export CPP=&amp;quot;icc -E -ansi&amp;quot;&lt;br /&gt;
 export CC=icc &lt;br /&gt;
 export FPP=&amp;quot;fpp -free -P&amp;quot;&lt;br /&gt;
 export F90SUFFIX=&amp;quot;.f90&amp;quot;&lt;br /&gt;
 export MPIFC=mpiifort&lt;br /&gt;
 export MPIF77=mpiifort&lt;br /&gt;
 export MPICC=mpiicc&lt;br /&gt;
 export MPICXX=mpiicpc&lt;br /&gt;
 &lt;br /&gt;
 ./configure \&lt;br /&gt;
    --enable-open-mp --enable-mpi --enable-slepc-linalg --enable-hdf5-par-io --enable-par-linalg \&lt;br /&gt;
    --enable-msgs-comps --enable-time-profile --enable-memory-profile \&lt;br /&gt;
    --with-blas-libs=&amp;quot;-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl&amp;quot; \&lt;br /&gt;
    --with-lapack-libs=&amp;quot;-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl&amp;quot; \&lt;br /&gt;
    --with-scalapack-libs=&amp;quot;-L${MKLROOT}/lib/intel64 -lmkl_scalapack_lp64&amp;quot; \&lt;br /&gt;
    --with-blacs-libs=&amp;quot;-L${MKLROOT}/lib/intel64 -lmkl_blacs_intelmpi_lp64&amp;quot; \&lt;br /&gt;
    --with-fft-includedir=&amp;quot;${MKLROOT}/include&amp;quot; \&lt;br /&gt;
    --with-fft-libs=&amp;quot;-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl&amp;quot; \&lt;br /&gt;
    --with-extlibs-path=${HOME}/opt/ext-libs/oneapi-2021&lt;br /&gt;
&lt;br /&gt;
=== EURORA SP6 ===&lt;br /&gt;
&lt;br /&gt;
EURORA is a hybrid supercomputer, with Intel Xeon andyBridge processors and GPU NVIDIA Tesla K20 accelerators&lt;br /&gt;
&lt;br /&gt;
 module load autoload/0.1 intel/cs-xe-2013--binary intelmpi/4.1.0--binary mkl/11.0.1--binary gnu/4.6.3 cuda/5.0.35 qe/5.0.3 netcdf/4.1.3--intel--cs-xe-2013--binary hdf5/1.8.9_ser--intel--cs-xe-2013--binary szip/2.1--gnu--4.6.3 zlib/1.2.7--gnu--4.6.3&lt;br /&gt;
 ./configure --with-p2y=5.0 \&lt;br /&gt;
 --with-iotk=/cineca/prod/build/applications/qe/5.0.3/cuda--5.0.35/BA_WORK/espresso-5.0.3/iotk/ \&lt;br /&gt;
 --with-netcdf-lib=/cineca/prod/libraries/netcdf/4.1.3/intel--cs-xe-2013--binary/lib/ \&lt;br /&gt;
 --with-netcdf-include=/cineca/prod/libraries/netcdf/4.1.3/intel--cs-xe-2013--binary/include \&lt;br /&gt;
 --with-netcdf-link=&amp;quot;-L/cineca/prod/libraries/hdf5/1.8.9_ser/intel--cs-xe-2013--binary/lib -L/cineca/prod/libraries/szip/2.1/gnu--4.6.3/lib -lhdf5_fortran -lhdf5_hl -lhdf5 -lnetcdff -lnetcdf -lcurl -lsz -lz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== IBM AIX and xlf ===&lt;br /&gt;
Linking with netCDF, PWscf, FFTW. Production runs&lt;br /&gt;
 export CPP=cpp &lt;br /&gt;
 export CC=xlc_r&lt;br /&gt;
 export F77=xlf_r&lt;br /&gt;
 export FC=xlf90_r&lt;br /&gt;
 export FCFLAGS=&#039;-O2 -q64 -qstrict -qarch=pwr6 -qtune=pwr6 -qmaxmem=-1 -qsuffix=f=f&#039;&lt;br /&gt;
 ./configure --build=powerpc-ibm --with-fftw=/cineca/prod/libraries/fftw/3.2.2/xl--10.1/lib &lt;br /&gt;
 --with-netcdf-lib=/cineca/prod/libraries/netcdf/4.0.1/xl--10.1/lib &lt;br /&gt;
 --with-netcdf-include=/cineca/prod/libraries/netcdf/4.0.1/xl--10.1/include &lt;br /&gt;
 --with-iotk=/cineca/prod/build/applications/QuantumESPRESSO/4.1/xl--10.1/BA_WORK/QuantumESPRESSO-4.1/iotk &lt;br /&gt;
 --with-p2y=4.0&lt;br /&gt;
&lt;br /&gt;
== Other HPC centers ==&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Nonequilibrium_absorption_in_bulk_silicon&amp;diff=8893</id>
		<title>Nonequilibrium absorption in bulk silicon</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Nonequilibrium_absorption_in_bulk_silicon&amp;diff=8893"/>
		<updated>2025-06-24T15:17:44Z</updated>

		<summary type="html">&lt;p&gt;Davide: Fixed new reference&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will learn the basic concepts for computing changes in the optical properties of a semi-conductor in presence of a non-equilibrium electrons and holes distribution in conduction and valence band respectively. This tutorial is based on the results published in Phys. Rev. B&amp;lt;ref name=&amp;quot;sangalli2016&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Under construction&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= The material: Silicon =&lt;br /&gt;
&lt;br /&gt;
We will study nonequilibrium absorption in bulk silicon. The same material used for this [[Silicon|GW tutorial]] &lt;br /&gt;
&lt;br /&gt;
* [http://cst-www.nrl.navy.mil/lattice/struk/a1.html FCC] lattice&lt;br /&gt;
* Two atoms per cell (8 electrons)&lt;br /&gt;
* Lattice constant 10.183 [a.u.]&lt;br /&gt;
* Plane waves cutoff 15 Rydberg&lt;br /&gt;
* Direct gap   3.4 eV at Gamma&lt;br /&gt;
* Indirect gap 1.1 eV between Gamma= (0 0 0) and a point X&#039;, close to X=(0 1 0)&lt;br /&gt;
&lt;br /&gt;
[[File:si_banddiagram.gif|thumb|x400px|Silicon Band Structure]]&lt;br /&gt;
&lt;br /&gt;
= Tutorial files and Tutorial structure =&lt;br /&gt;
Follow the instructions in [[Tutorials download]] and download/unpack the &amp;lt;code&amp;gt;Silicon.tar.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
Once the tutorial archive file is unzipped the following folder structure will appear&lt;br /&gt;
 COPYING  README  Silicon/&lt;br /&gt;
&lt;br /&gt;
with the Solid_Si folder containing&lt;br /&gt;
 &amp;gt; ls Silicon/ &lt;br /&gt;
 PWSCF/  YAMBO/&lt;br /&gt;
&lt;br /&gt;
In the Pwscf folder  the student will find an input/output directory with input/output files for pw.x. The Silicon pseudopotential file is also provided.&lt;br /&gt;
 &amp;gt; ls PWSCF/&lt;br /&gt;
 convergence_scripts  input  output  psps&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;convergence_scripts&amp;lt;/code&amp;gt; you will find some useful shell scripts to run the ground state convergence runs for Silicon.&lt;br /&gt;
The YAMBO folder contains the Yambo input/output files and core databases.&lt;br /&gt;
 &amp;gt; ls YAMBO/&lt;br /&gt;
 2x2x2/  4x4x4/  6x6x6/  8x8x8/  Convergence_Plots_and_Scripts/  GAMMA/&lt;br /&gt;
&lt;br /&gt;
The core databases are provided for several k-points grids. In addition the folder &amp;lt;code&amp;gt;Convergence_Plots_and_Scripts&amp;lt;/code&amp;gt; contains some scripts used for the [Silicon|GW tutorial] .&lt;br /&gt;
Here we will just use the 8x8x8 (which is still very far from convergence) folder for computing (nonequilibrium) optical properties.&lt;br /&gt;
&lt;br /&gt;
To run the tutorial you will need the standard executables&lt;br /&gt;
 yambo&lt;br /&gt;
 ypp &lt;br /&gt;
plus the executables of the real time module of the Yambo code&lt;br /&gt;
 yambo_rt&lt;br /&gt;
 ypp_rt&lt;br /&gt;
&lt;br /&gt;
= Overview of the simulations in this tutorial= &lt;br /&gt;
We start from a density-functional theory (DFT) calculation as the foundation. As a first demonstrative step, we will solve the Bethe-Salpeter equation (BSE) for the equilibrium case without including quasiparticle (QP) corrections. Once this is completed, we will use the Yambo post-processing module, &amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt;, to generate a distribution of non-equilibrium carriers. This distribution will be used in all subsequent non-equilibrium (NEQ) calculations. It is important to note that solving the non-equilibrium BSE is not feasible within the GW plasmon pole approximation. To address this limitation, we will instead solve the BSE for the equilibrium case and apply corrections to the energy values using a non-equilibrium COHSEX calculation.&lt;br /&gt;
&lt;br /&gt;
The QP band structure will show the effect of the screened electron-electron interaction, while the absorption spectrum within the BSE accounts for the effect of the electron-hole interaction. When QP corrections are not available, they can be included using the scissor operator &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt;, and the numerical values for &amp;quot;corrections&amp;quot; can be deduced from a GW calculation. For more information about solving the Equilibrium BSE equation refer to the following tutorial: [https://wiki.yambo-code.eu/wiki/index.php/Calculating%20optical%20spectra%20including%20excitonic%20effects:%20a%20step-by-step%20guide Calculating optical spectra including excitonic effects: a step-by-step guide]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; List of Steps Executed in This Module (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
# Equilibrium BSE Calculation (Demonstrative)  &lt;br /&gt;
# Generating non-equilibrium carriers &lt;br /&gt;
# Equilibrium and non-equilibrium COHSEX calculations &lt;br /&gt;
# Calculation of QP-PPA corrections to Silicon (Optional) &lt;br /&gt;
# Non-Equilibrium BSE Calculation&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The run of all the files in this tutorial should take around 2-5 minutes in total. In case a faster run is needed, results from a lower kgrid can be used, or some converged criteria can be used, for example lowering the &amp;lt;code&amp;gt;NGsBlkXs&amp;lt;/code&amp;gt; and/or &amp;lt;code&amp;gt;NGsBlkXp&amp;lt;/code&amp;gt;, or lowering the number of conduction bands used in the calculations.&lt;br /&gt;
&lt;br /&gt;
= Equilibrium optical properties =&lt;br /&gt;
&lt;br /&gt;
In this part, we will solve the equilibrium BSE calculation without quasiparticle corrections. &lt;br /&gt;
&lt;br /&gt;
Enter the folder 8x8x8, and initialize yambo in the respective folder &lt;br /&gt;
 $ cd 8x8x8&lt;br /&gt;
 $ yambo&lt;br /&gt;
&lt;br /&gt;
== Static screening at equilibrium ==&lt;br /&gt;
&lt;br /&gt;
First, to solve the BSE equation we need to calculate the statically screened electron-electron interaction (W), which is related to static dielectric screening &amp;lt;math&amp;gt; \epsilon^{-1} &amp;lt;/math&amp;gt;. &lt;br /&gt;
&amp;lt;!--&amp;lt;math&amp;gt; \Large&lt;br /&gt;
\epsilon^{-1}_{\mathbf{G},\mathbf{G&#039;}} (\mathbf{q}, \omega = 0) = \delta_{\mathbf{G},\mathbf{G&#039;}} + v(\mathbf{v} + \mathbf{G}) \chi_{\mathbf{G},\mathbf{G&#039;}(\mathbf{q}}, \omega = 0)&amp;lt;/math&amp;gt;--&amp;gt;&lt;br /&gt;
[[File:Static dielectric screening.png|550px|frameless|left]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To do this create the following input file: &lt;br /&gt;
 $ yambo -X s -F 01_EQ_BSE_screening.in&lt;br /&gt;
&lt;br /&gt;
with the following contents: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 01_EQ_BSE_screening.in file (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 em1s                                 # [R][Xs] Statically Screened Interaction&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 |  30 |                         # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 3000                   mRy    # [Xs] Response block size&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |    # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where we changed the response block size &amp;lt;code&amp;gt;NGsBlkXs = 3000 mRy&amp;lt;/code&amp;gt; and number of polarization function bands &amp;lt;code&amp;gt;BndsRnXs&amp;lt;/code&amp;gt; to be in the range of 1 to 30. Now run the file:&lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 01_EQ_BSE_screening.in -J EQ_BSE&lt;br /&gt;
&lt;br /&gt;
== Solving the Bethe-Salpeter equation == &lt;br /&gt;
To solve the (equilibrium) Bethe-Salpeter equation, the latter is usually rewritten in the space of transitions between valence and conduction states as the (pseudo)eigenvalue problem for a two-particle Hamiltonian. In the &amp;lt;math&amp;gt; q = 0 &amp;lt;/math&amp;gt; limit, the two-particle Hamiltonian matrix elements are given by:&lt;br /&gt;
&amp;lt;!--&amp;lt;math&amp;gt; \widetilde{H}_{ll&#039;} = \widetilde{\varepsilon}_l - \sqrt{\widetilde{f}_l} \left( v_{ll&#039;} - \widetilde{W}^{s}_{ll&#039;} \right) \sqrt{\widetilde{f}_{l&#039;}} &amp;lt;/math&amp;gt; --&amp;gt;&lt;br /&gt;
[[File:H_eq_bse_2016.png|310px|frameless|left]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where compact notation  &amp;lt;math&amp;gt; l = \{mn\mathbf{k}\} &amp;lt;/math&amp;gt;, was introduced, and quantities with a tilde represent the corresponding quantity evaluated at equilibrium. &lt;br /&gt;
&lt;br /&gt;
For equilibrium occupation factor and energy (KS or QP corrected KS energies): &lt;br /&gt;
[[File:Equilibrium occ factor.png|160px|frameless|left|Equilibrium occupation factor]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Epsilon eng l.png|160px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Moreover, it was defined: &lt;br /&gt;
[[File:W ss.png|300px|frameless|left]] &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:V ss.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;math&amp;gt;\widetilde{W}_{GG&#039;}(\mathbf{q}, 0)&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;v_{G}(\mathbf{q})&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt; \rho_{nm\mathbf{k}, G}(\mathbf{q})&amp;lt;/math&amp;gt; are static approximation to the screened interaction, bare Coulomb interaction, and KS response function respectively. After calculating the equilibrium Bethe-Salpeter kernel, the resulting two-particle Hamiltonian can be diagonalized to compute the macroscopic dielectric function, which can be used to get absorption and EELS spectra. Calculation of BS kernel and diagonalization of Hamiltonian can be done in one step. For a more detailed description please consult  Phis. Rev. B 93, 195205 (2016). &lt;br /&gt;
&lt;br /&gt;
To generate the input file for the calculation of BSE kernel, run the following command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -o b -k sex -F 02_EQ_BSE_kernel_diag.in -y h -V qp -J EQ_BSE&lt;br /&gt;
&lt;br /&gt;
with the following input&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 02_EQ_BSE_kernel_diag.in file (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 15000            mRy    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BSEBands&lt;br /&gt;
    2 |  7 |                         # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 % BEnRange&lt;br /&gt;
   2.20000 | 5.00000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  0.70000 | 1.000000 | 1.000000 |      # [EXTQP BSK BSS] E parameters (c/v)&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/...&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where the value of &amp;lt;code&amp;gt;BSENGexx&amp;lt;/code&amp;gt; was changed for better convergence, &amp;lt;code&amp;gt;BSEBands&amp;lt;/code&amp;gt; was changed to include bands from 2 to 7, which defines the basis of quasiparticle pairs that are used to describe excitons. 3 degenerate valence and 3 degenerate conduction bands where included. &amp;lt;code&amp;gt;BEnRange&amp;lt;/code&amp;gt; was changed to 2.2-5.5 eV to match experimental data, and &amp;lt;code&amp;gt;BEnSteps&amp;lt;/code&amp;gt; was increased from 100 to 200. The scissors operator &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt; was used to match the possiton calculated spectra with experimental values. The Haydock BSE solver was chosen, &amp;lt;code&amp;gt;-y h&amp;lt;/code&amp;gt; option, because it is substantially cheaper than the full diagonalization (quadratic with the number of electron-hole pairs). However, this approach does not provide the individual exciton energies and composition in terms of electron-hole pairs. The [https://wiki.yambo-code.eu/wiki/index.php/BSE%20solvers%20overview BSE solvers overview] page can provide more info on the subject. &lt;br /&gt;
&lt;br /&gt;
To run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 02_EQ_BSE_kernel_diag.in -J EQ_BSE&lt;br /&gt;
&lt;br /&gt;
After the calculation has finished, the absorption spectra can be plotted with the following: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; gnuplot commands (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gnuplot&lt;br /&gt;
...&lt;br /&gt;
gnuplot&amp;gt; set xlabel &amp;quot;Energy (eV)&amp;quot;&lt;br /&gt;
gnuplot&amp;gt; set ylabel &amp;quot;Absorption&amp;quot; &lt;br /&gt;
gnuplot&amp;gt; plot &#039;o-EQ_BSE.eps_q1_haydock_bse&#039; u 1:2 w l t &#039;-k sex&#039;&lt;br /&gt;
gnuplot&amp;gt; rep  &#039;o-EQ_BSE.eps_q1_haydock_bse&#039; u 1:4 w l t &#039;-k ip&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the following plot will results (the &amp;quot;experimental&amp;quot; and &amp;quot;-k hartree&amp;quot; plots are added additionally for comparison) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; Plot of the computed spectra &amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:Plot of Si absorption spectra.png|900px|frameless|Plots of computed absorption spectra for the equilibrium case.]]&lt;br /&gt;
&lt;br /&gt;
= Generating non-equilibrium carriers =&lt;br /&gt;
To simulate non-equilibrium absorption, we need to define the number of non-equilibrium carriers, specifically electrons in the conduction band and holes in the valence band. These carriers follow the Fermi-Dirac distribution given by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&amp;lt;math&amp;gt;\Large f(E) = 1 / (exp((E - μ) / k_B T) + 1)&amp;lt;/math&amp;gt;--&amp;gt;&lt;br /&gt;
[[File:Fermi dirac distr.png|250px]]&lt;br /&gt;
&lt;br /&gt;
Here:&lt;br /&gt;
* 	E is the energy level,&lt;br /&gt;
* 	&amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt; is the chemical potential (specific to electrons or holes),&lt;br /&gt;
* 	&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; is the effective temperature,&lt;br /&gt;
* 	&amp;lt;math&amp;gt;k_B&amp;lt;/math&amp;gt; is the Boltzmann constant.&lt;br /&gt;
&lt;br /&gt;
For the simulation, both electrons and holes are characterized by their own &amp;lt;math&amp;gt;\mu_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;T_i&amp;lt;/math&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
The distribution of non-equilibrium carriers can be generated using Yambo’s post processing for real-time module (&amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt;), which allows modeling of these conditions.&lt;br /&gt;
&lt;br /&gt;
To generate to non-equilibrium carriers databases create &amp;lt;code&amp;gt;input_ypp1 input_ypp2&amp;lt;/code&amp;gt; files, with the following content: &lt;br /&gt;
&lt;br /&gt;
 ypp_rt -rtdb f -F input_ypp1&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp1 (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RTDBs                      	# [R] Real-Time databases&lt;br /&gt;
Select_Fermi               	# [R] NEQ DBs according to Fermi distribution&lt;br /&gt;
% RTBands&lt;br /&gt;
   1 | 30 |               	# [RT] Bands range&lt;br /&gt;
%&lt;br /&gt;
% RTmuEh&lt;br /&gt;
-0.223 | 0.10 | eV  	        # [RT] Chemical potentials hole | electron&lt;br /&gt;
%&lt;br /&gt;
% RTtempEh&lt;br /&gt;
 0.08 	| 0.08 	| eV  	    # [RT] Effective temperature hole | electron&lt;br /&gt;
%&lt;br /&gt;
RTautotuneThr= 0.000100    	# [RT] Threshold to match no. of pumped holes and electrons.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 ypp_rt -rtplot o -rtmode e -F input_ypp2&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp2 (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RealTime                   	# [R] Real-Time Post-Processing&lt;br /&gt;
RToccupations              	# [R] Analize time-dependent occupations&lt;br /&gt;
RTenergy                   	# [R] Post-Processing kind: function of energy&lt;br /&gt;
TimeStep= 0.000000 	fs  	# Time step&lt;br /&gt;
% TimeRange&lt;br /&gt;
-1.000000 |-1.000000 | fs  	# Time-window where processing is done&lt;br /&gt;
%&lt;br /&gt;
#IncludeEQocc              	# [NEGF] Include also equilibrium occupations&lt;br /&gt;
#SkipFermiFIT              	# [NEGF] Do a Fermi Fit of occupations (and lifetimes ratio)&lt;br /&gt;
%QPkrange                	#  generalized Kpoint/Band indices&lt;br /&gt;
  1| 1|  2|7|&lt;br /&gt;
%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And then run the files:&lt;br /&gt;
&lt;br /&gt;
 $ ypp_rt -F input_ypp1 -J carriers -C carriers &lt;br /&gt;
 $ ypp_rt -F input_ypp2 -J carriers -C carriers &lt;br /&gt;
&lt;br /&gt;
The file &amp;lt;code&amp;gt;input_ypp1&amp;lt;/code&amp;gt; will generate a &amp;lt;code&amp;gt;ndb.RT_carriers&amp;lt;/code&amp;gt; database which will contain the Fermi distribution of the electrons and the hole according to the specified chemical potential, &amp;lt;code&amp;gt;RTmuEh&amp;lt;/code&amp;gt;, and for a specific temperature given by &amp;lt;code&amp;gt;RTtempEh&amp;lt;/code&amp;gt;.  The file &amp;lt;code&amp;gt;input_ypp2&amp;lt;/code&amp;gt; will generate a series of databases to plot different different aspects of the distribution.&lt;br /&gt;
&lt;br /&gt;
Plot for the distribution of electrons in conduction band and holes in the valence band generated by the &amp;lt;code&amp;gt;input_ypp1&amp;lt;/code&amp;gt; and data file made by &amp;lt;code&amp;gt;input_ypp2&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--[[File:Plot occupation kgrid8 neq silicon.png|900px|frameless|center]]--&amp;gt; &lt;br /&gt;
[[File:Plot occupation kgrid8 neq silicon 2.png|900px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
This plot can be generated from the &amp;lt;code&amp;gt;carriers&amp;lt;/code&amp;gt; folder using the following gnuplot script [[Gnuplot scripts|plot_occupations.gnu]]&lt;br /&gt;
&lt;br /&gt;
= Energy shift in the band structure =&lt;br /&gt;
&lt;br /&gt;
The GW method is the standard approach to compute quasi-particle corrections. However, in presence of non-equilibrium carriers, or even at finite temperature the formulation of the GW self-energy needs to be refined. This is due to its frequency dependence, which results in extra terms when performing the analytic continuation from the Keldish contour&amp;lt;ref name=&amp;quot;thygesen2007&amp;quot;/&amp;gt; (non-equilibrium case) or from the Matsubara axis&amp;lt;ref name=&amp;quot;faleev2006&amp;quot;/&amp;gt; (finite temperature case) to the real time/frequency axis.&lt;br /&gt;
On the other hand the COHSEX self-energy, being static, avoids this complication. This is why we will compute changes in the QP corrections within the COHSEX approximation.&lt;br /&gt;
&lt;br /&gt;
To compute the Non-Equilibrium Absorption Spectra, we need to diagonalize a previously defined two-particle Hamiltonian. To account for the Non-Equilibrium effect, the Kohn-Sham energies, &amp;lt;math&amp;gt;\varepsilon_{c\mathbf{k}}, \varepsilon_{v\mathbf{k}}&amp;lt;/math&amp;gt;, calculated at the DFT level, need to be corrected. This requires calculating the following: COHSEX self-energy at equilibrium, COHSEX self-energy at non-equilibrium, and Equilibrium GW self-energy at Plasmon-Pole Approximation level.&lt;br /&gt;
&lt;br /&gt;
Using these, the energy correction, &amp;lt;math&amp;gt;\varepsilon^{corr,neq}&amp;lt;/math&amp;gt;, can be computed as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Large \varepsilon^{corr,neq}_{c\mathbf{k}} = \varepsilon^{GW,eq}_{c\mathbf{k}} + (\varepsilon^{cohsex,neq}_{c\mathbf{k}} - \varepsilon^{cohsex,eq}_{c\mathbf{k}})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The KS energies will be corrected as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Large \varepsilon^{KS,neq}_{c\mathbf{k}} = \varepsilon_{c\mathbf{k}} + \varepsilon^{corr,neq}_{c\mathbf{k}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These corrected KS energies will be used when diagonalizing the two-particle Hamiltonian.&lt;br /&gt;
&lt;br /&gt;
== COHSEX corrections at equilibrium ==&lt;br /&gt;
To make a COHSEX calculation at equilibrium, we do the following: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -p c -F 03_eq_cohsex.in &lt;br /&gt;
&lt;br /&gt;
which will create a file with the following content: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_eq_cohsex.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 gw0                              # [R] GW approximation&lt;br /&gt;
 cohsex                           # [R][Xp] COlumb Hole Screened EXchange&lt;br /&gt;
 dyson                            # [R] Dyson Equation solver&lt;br /&gt;
 el_el_corr                       # [R] Electron-Electron Correlation&lt;br /&gt;
 HF_and_locXC                     # [R] Hartree-Fock&lt;br /&gt;
 em1s                             # [R][Xs] Statically Screened Interaction&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 SE_Threads=0                     # [OPENMP/GW] Number of threads for self-energy&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 EXXRLvcs= 15             Ry    # [XX] Exchange    RL components&lt;br /&gt;
 VXCRLvcs= 15             Ry    # [XC] XCpotential RL components&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 Chimod= &amp;quot;HARTREE&amp;quot;                # [X] IP/Hartree/ALDA/LRC/PF/BSfxc&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 |  30 |                         # [Xs] Polarization function bands &lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 3                Ry    # [Xs] Response block size&lt;br /&gt;
 UseEbands&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
   1 | 40 |                   # [GW] G[W] bands range&lt;br /&gt;
 %&amp;lt;/span&amp;gt;&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;%QPkrange                        # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 1|1|2|7|&lt;br /&gt;
 %&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;EXXRLvcs&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;VXCRLvcs&amp;lt;/code&amp;gt; were increased up to 15 Ry, due to the fact that computation of terms to which those cut-offs correspond, is not computationally demanding. The number of Polarization function bands, &amp;lt;code&amp;gt;BndsRnXs&amp;lt;/code&amp;gt; was changed to &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt;, and the quasi-particles generalized Kpoint and Band indices,&amp;lt;code&amp;gt;QPkrange&amp;lt;/code&amp;gt;, was changed from &amp;lt;code&amp;gt;1|29|1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1|1|2|7&amp;lt;/code&amp;gt;. Additionally the following lines were added &lt;br /&gt;
 UseEbands&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
   1 | 40 |                   # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
to force Yambo to do a calculation where self-energy depends on the conduction bands too, or this is also known as [https://wiki.yambo-code.eu/wiki/index.php?title=Silicon COHSEX with empty bands]. Alternatively, an option option &amp;lt;code&amp;gt;-V qp&amp;lt;/code&amp;gt; can be added when generating the file, but it will include a lot of redundant variables. &lt;br /&gt;
&lt;br /&gt;
And after it we run the file with the following command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 03_eq_cohsex.in -J cohsex_eq_emp -C cohsex_eq_emp&lt;br /&gt;
&lt;br /&gt;
We can plot the &amp;lt;code&amp;gt;o-cohsex_eq_emp.qp&amp;lt;/code&amp;gt; file from the &amp;lt;code&amp;gt;cohsex_eq_emp&amp;lt;/code&amp;gt; folder, to find out the gap opening due to the COHSEX correction. The plot can be done using the [[Gnuplot scripts|plot_qp_energies.gnu]]. &lt;br /&gt;
&lt;br /&gt;
[[File:Band opening eq cohsex plot.png|800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The points used to calculate band opening are: (0.000000, -1.034067) and (1.608910, -0.449499), which corresponds to an opening of 0.584568 eV.&lt;br /&gt;
&lt;br /&gt;
== COHSEX corrections in presence of non-equilibrium carriers ==&lt;br /&gt;
Before making a COHSEX calculation, we need to recalculate the static screening in the presence of non-equilibrium carriers. After it, we can make a COHSEX calculation in the presence of non-equilibrium carriers using the &amp;lt;code&amp;gt;ndb.RT_carriers&amp;lt;/code&amp;gt; database generated in the previous step with the &amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt; module. To do this, we do the following: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -p c -F 03_neq_cohsex.in &lt;br /&gt;
&lt;br /&gt;
where we need to add the following lines: &lt;br /&gt;
&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 GfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
&lt;br /&gt;
and the resulting file is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_neq_cohsex.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 gw0                              # [R] GW approximation&lt;br /&gt;
 cohsex                           # [R][Xp] COlumb Hole Screened EXchange&lt;br /&gt;
 dyson                            # [R] Dyson Equation solver&lt;br /&gt;
 el_el_corr                       # [R] Electron-Electron Correlation&lt;br /&gt;
 HF_and_locXC                     # [R] Hartree-Fock&lt;br /&gt;
 em1s                             # [R][Xs] Statically Screened Interaction&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 SE_Threads=0                     # [OPENMP/GW] Number of threads for self-energy&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 EXXRLvcs= 15             Ry    # [XX] Exchange    RL components&lt;br /&gt;
 VXCRLvcs= 15             Ry    # [XC] XCpotential RL components&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 Chimod= &amp;quot;HARTREE&amp;quot;                # [X] IP/Hartree/ALDA/LRC/PF/BSfxc&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 |  30 |                         # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 UseEbands&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
   1 | 40 |                   # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 GfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 NGsBlkXs= 3                Ry    # [Xs] Response block size&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 %QPkrange                        # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 1|1|2|7|&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we added the respective two lines with &amp;lt;code&amp;gt;XfnRTdb&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;GfnRTdb&amp;lt;/code&amp;gt;, and made changes to &amp;lt;code&amp;gt;BndsRnXs&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;QPkrange&amp;lt;/code&amp;gt; similar to the equilibrium case. Additionally, we added the lines to force Yambo to do a COHSEX calculation with empty bands. &lt;br /&gt;
&lt;br /&gt;
The line &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; em1s                             # [R][Xs] Statically Screened Interaction&lt;br /&gt;
&lt;br /&gt;
will tell Yambo to make the static screening calculation, and the lines:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; gw0                              # [R] GW approximation&lt;br /&gt;
 &amp;gt; cohsex                           # [R][Xp] COlumb Hole Screened EXchange&lt;br /&gt;
&lt;br /&gt;
will tell Yambo to do make a COHSEX calculation. &lt;br /&gt;
&lt;br /&gt;
After it we can run the file with the command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 03_neq_cohsex.in -J cohsex_neq -C cohsex_neq&lt;br /&gt;
&lt;br /&gt;
We can plot &amp;lt;code&amp;gt;o-cohsex_neq.qp&amp;lt;/code&amp;gt; file from the &amp;lt;code&amp;gt;cohsex_neq&amp;lt;/code&amp;gt; folder, to find the gap opening due the COHSEX correction and the non-equilibrium distribution of the carriers. The plot can be done using the [[Gnuplot scripts|plot_qp_energies.gnu]].&lt;br /&gt;
&lt;br /&gt;
[[File:Band opening neq cohsex plot.png .png|800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The points to calculate band opening are (0.000000, -0.882580), and (1.608910, -0.535269), which correspond to an opening of 0.347311 eV.&lt;br /&gt;
&lt;br /&gt;
== GW PPA corrections for the equilibrium case ==&lt;br /&gt;
&lt;br /&gt;
This subchapter can be skipped, and replaced by using scissors operator when diagonalizing the two particle Hamiltonian. &lt;br /&gt;
&lt;br /&gt;
To get accurate values for the band gap value we need to go beyond COHSEX approximation. Therefore we will obtain the Quasi-particle corrections in the plasmon pole approximation for equilibrium case, and in next steps, to this value we will add the correction calculated at COHSEX approximation to account for the non-equilibrium state of the system. &lt;br /&gt;
&lt;br /&gt;
To make this calculation, we do the following: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -p p -F 03_eq_qp_ppa.in &lt;br /&gt;
&lt;br /&gt;
which will create a file with the following content: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_eq_qp_ppa.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 gw0                              # [R] GW approximation&lt;br /&gt;
 ppa                              # [R][Xp] Plasmon Pole Approximation for the Screened Interaction&lt;br /&gt;
 el_el_corr                       # [R] Electron-Electron Correlation&lt;br /&gt;
 HF_and_locXC                     # [R] Hartree-Fock&lt;br /&gt;
 em1d                             # [R][X] Dynamically Screened Interaction&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 SE_Threads=0                     # [OPENMP/GW] Number of threads for self-energy&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 EXXRLvcs= 15             Ry    # [XX] Exchange    Ry components&lt;br /&gt;
 VXCRLvcs= 15             Ry    # [XC] XCpotential Ry components&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 Chimod= &amp;quot;HARTREE&amp;quot;                # [X] IP/Hartree/ALDA/LRC/PF/BSfxc&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
    1 |  30 |                         # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt; &lt;br /&gt;
 NGsBlkXp= 3                Ry    # [Xp] Response block size&lt;br /&gt;
 % LongDrXp&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [Xp] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 PPAPntXp= 27.21138         eV    # [Xp] PPA imaginary energy&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;  &lt;br /&gt;
 % GbndRnge&lt;br /&gt;
    1 |  40 |                         # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt; &lt;br /&gt;
 GTermKind= &amp;quot;none&amp;quot;                # [GW] GW terminator (&amp;quot;none&amp;quot;,&amp;quot;BG&amp;quot; Bruneval-Gonze,&amp;quot;BRS&amp;quot; Berger-Reining-Sottile)&lt;br /&gt;
 DysSolver= &amp;quot;n&amp;quot;                   # [GW] Dyson Equation solver (&amp;quot;n&amp;quot;,&amp;quot;s&amp;quot;,&amp;quot;g&amp;quot;,&amp;quot;q&amp;quot;)&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 %QPkrange                        # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 1|1|2|7|&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;       &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the following changes have been made: the number of polarization function bands, &amp;lt;code&amp;gt;BndsRnXp&amp;lt;/code&amp;gt; was changed to &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt;, the G[W] bands range, &amp;lt;code&amp;gt;GbndRnge&amp;lt;/code&amp;gt; was changed from &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1|40&amp;lt;/code&amp;gt;, and quasi-particle generalized k points  and band indices, &amp;lt;code&amp;gt;QPkrange&amp;lt;/code&amp;gt; was changed from &amp;lt;code&amp;gt;1|29|1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1|1|2|7&amp;lt;/code&amp;gt;. And after it we run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 03_eq_qp_ppa.in -J gw_eq -C gw_eq&lt;br /&gt;
&lt;br /&gt;
We can plot the &amp;lt;code&amp;gt;o-gw_eq.qp&amp;lt;/code&amp;gt; file from the &amp;lt;code&amp;gt;eq_gw_bse&amp;lt;/code&amp;gt; folder, to find out the gap opening due to the plasmon-pole approximation. The plot can be done using the [[Gnuplot scripts|plot_qp_energies.gnu]]. &lt;br /&gt;
&lt;br /&gt;
[[File:O gw eq qp plot.png|800px|frameless]]&lt;br /&gt;
&lt;br /&gt;
The points used to calculated band opening are (0, -0.045932), and (1.608910, 0.456526), which correspond to an opening of 0.502458 eV. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;(OPTIONAL)&#039;&#039;&#039; Additionally, after computing the QP corrections those can be used during the BSE corrections.  To do it, we create file similar to the [[Nonequilibrium absorption in bulk silicon|Solving the Bethe-Salpeter equation]], where we do not add the scissors line, but we add &amp;lt;code&amp;gt;KfnQPdb= &amp;quot;E &amp;lt; gw_eq/ndb.QP&amp;quot;&amp;lt;/code&amp;gt;. &lt;br /&gt;
The final file will look like &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_eq_bse.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 15             Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 #WehCpl                        # [BSK] eh interaction included also in coupling&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %  &lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 % BSEBands&lt;br /&gt;
   2 |  7 |                           # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 % BEnRange&lt;br /&gt;
  2.200000 | 5.000000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt; &lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 % &lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; gw_eq/ndb.QP&amp;quot;&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
 #WRbsWF                        # [BSS] Write to disk excitonic the WFs     &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and we run this file by typing: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 03_eq_bse.in -J &amp;quot;eq_gw_bse,gw_eq&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Data post-processing ==&lt;br /&gt;
Now after obtaining all the energy components that we need to calculate corrections to Kohn-Sham energies for the Non-Equilibrium case, we can manipulate them using the yambo&#039;s real time post processing module, &amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt;. We want to obtain energies defined by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Large \varepsilon^{corr,neq}_{c\mathbf{k}} = \varepsilon^{GW,eq}_{c\mathbf{k}} + (\varepsilon^{cohsex,neq}_{c\mathbf{k}} - \varepsilon^{cohsex,eq}_{c\mathbf{k}})&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Therefore we create a yambo post processing file with the following contents: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp3 (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
QPDBs                      	# [R] Quasi-particle databases&lt;br /&gt;
QPDB_merge                 	# [R] Mergering&lt;br /&gt;
%Actions_and_names       	# [QPDB] QP databases and Actions (format is &amp;quot;what&amp;quot;|&amp;quot;OP&amp;quot;|&amp;quot;prefactor&amp;quot;|&amp;quot;DB&amp;quot;|). OP can be ±/x.&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_neq/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;-&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_eq_emp/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;Z&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;gw_eq/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;gw_eq/ndb.QP&amp;quot; |&lt;br /&gt;
%       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we tell ypp to take from the quasi particle correction databases the values of &amp;lt;math&amp;gt;\varepsilon^{cohsex,neq}_{c\mathbf{k}}&amp;lt;/math&amp;gt; subtract from them &amp;lt;math&amp;gt;\varepsilon^{cohsex,eq}_{c\mathbf{k}}&amp;lt;/math&amp;gt;, multiply the resulting value by &amp;lt;code&amp;gt;?????&amp;lt;/code&amp;gt;  and add it to &amp;lt;math&amp;gt;\varepsilon^{GW,eq}_{c\mathbf{k}}&amp;lt;/math&amp;gt; and save them in the the new database &amp;lt;code&amp;gt;ndb.QP_merged_1_gw_cohsex_gw_ppa&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
We run the file by the following command: &lt;br /&gt;
&lt;br /&gt;
 $ ypp_rt -F input_ypp3 -J QP_merge -C QP_merge&lt;br /&gt;
&lt;br /&gt;
Or alternatively, if no calculation for the quasiparticle correction has been made (except the COHSEX calculation), and a scissors operator is going to be used, we can use the following yambo post processing file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp3_scissors (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
QPDBs                      	# [R] Quasi-particle databases&lt;br /&gt;
QPDB_merge                 	# [R] Mergering&lt;br /&gt;
%Actions_and_names       	# [QPDB] QP databases and Actions (format is &amp;quot;what&amp;quot;|&amp;quot;OP&amp;quot;|&amp;quot;prefactor&amp;quot;|&amp;quot;DB&amp;quot;|). OP can be ±/x.&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_neq/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;-&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_eq_emp/ndb.QP&amp;quot; |&lt;br /&gt;
%  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which will just take from the quasi particle correction databases the values of &amp;lt;math&amp;gt;\varepsilon^{cohsex,neq}_{c\mathbf{k}}&amp;lt;/math&amp;gt; subtract from them &amp;lt;math&amp;gt;\varepsilon^{cohsex,eq}_{c\mathbf{k}}&amp;lt;/math&amp;gt;. And we run this file by: &lt;br /&gt;
&lt;br /&gt;
 $ ypp_rt -F input_ypp3_scissors -J QP_merge_scissor -C QP_merge_scissor&lt;br /&gt;
&lt;br /&gt;
= Renormalization of the exciton binding energy =&lt;br /&gt;
&lt;br /&gt;
We finally perform a BSE calculation loading both the nonequilibrium carriers and the quasi-particle energy shifts. The Non-Equilibrium Hamiltonian is: &lt;br /&gt;
&lt;br /&gt;
[[File:Neq h.png|310px|frameless|left]] &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Where quantities entering into the hamiltonian are the non-equilibrium counterparts of the quantities discussion for the EQ Hamiltonian, and &amp;lt;math&amp;gt;\tau&amp;lt;/math&amp;gt; is the pump probe delay. The &amp;lt;math&amp;gt;\Delta \epsilon^{\tau}_l&amp;lt;/math&amp;gt; is the difference between non-equilibrium COHSEX and equilibrium COHSEX energy (calculated in the COHSEX chapter). &lt;br /&gt;
&lt;br /&gt;
We create a file using the following command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -o b -y h -F 04_neq_bse.in&lt;br /&gt;
&lt;br /&gt;
== With GW qp corrections ==&lt;br /&gt;
&lt;br /&gt;
Compared to the equilibrium case we add the lines:&lt;br /&gt;
&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge/ndb.QP_merged_1_gw_cohsex_gw_ppa&amp;quot;&lt;br /&gt;
&lt;br /&gt;
the resulting structure of the file is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 04_neq_bse.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions &lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 3             Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 #WehCpl                        # [BSK] eh interaction included also in coupling&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   2 |  7 |                           # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BEnRange&lt;br /&gt;
  2.200000 | 5.000000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge/ndb.QP_merged_1_gw_cohsex_gw_ppa&amp;quot;&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
 #WRbsWF                        # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we added the lines, and changed the bands range, &amp;lt;code&amp;gt;BSEBands&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2|7&amp;lt;/code&amp;gt;, energy range, &amp;lt;code&amp;gt;BEnRange&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;0.00000 | 10.00000 &amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2.00000 | 10.00000 |&amp;lt;/code&amp;gt; and energy steps, &amp;lt;code&amp;gt;BEnSteps&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;100&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;200&amp;lt;/code&amp;gt;. And we run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 04_neq_bse.in -J &amp;quot;neq_bse,gw_eq&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Alternatively, when scissors are used, the lines can be added, to account for the lack of a proper GW correction.&lt;br /&gt;
&lt;br /&gt;
The final plot from the calculations presented in this tutorial, for k-grid 8x8x8, with NEQ BSE with QP corrections, EQ BSE with QP corrections (not presented in this tutorial), and Experimental Data looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--[[File:NEQ2 abs bulk silicon tutorial plot results kgrid8.png|800px|frameless|center]]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[[File:Plot results kgrid8 7ry.png|800px|frameless|center]]--&amp;gt;&lt;br /&gt;
[[File:Plot results kgrid8 15 3ry.png||800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
In case, a better convergence is needed, a 16x16x16 k-grid can be used. To decrease computational time, the GW corrections can be done on lower grid, whereas solving the BSE equation can be done on higher k-grids. And for the 16x16x16 k-grid the plot looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Neq abs bulk silicon plot kgrid16.png|800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The plots can be done using [[Gnuplot scripts|plot_absorbance.gnu]] gnuplot script.&lt;br /&gt;
&lt;br /&gt;
== With scissor corrections ==&lt;br /&gt;
&lt;br /&gt;
Compared to the equilibrium case we just add the lines below:&lt;br /&gt;
&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge_scissor/ndb.QP_merged_1_gw_cohsex&amp;quot;&lt;br /&gt;
&lt;br /&gt;
the resulting structure of the file is (lines for nonequilibrium simulations added in red):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 04_neq_bse_scissors.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 3             Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 #WehCpl                        # [BSK] eh interaction included also in coupling&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  0.700000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge/ndb.QP_merged_1_gw_cohsex&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot; &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
    2 |  7 |                         # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BEnRange&lt;br /&gt;
   2.20000 | 5.00000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&amp;lt;/span&amp;gt;&lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 %&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
 #WRbsWF                        # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we added the lines, and changed the bands range, &amp;lt;code&amp;gt;BSEBands&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2|7&amp;lt;/code&amp;gt;, energy range, &amp;lt;code&amp;gt;BEnRange&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;0.00000 | 10.00000 &amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2.20000 | 5.00000 |&amp;lt;/code&amp;gt; and energy steps, &amp;lt;code&amp;gt;BEnSteps&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;100&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;200&amp;lt;/code&amp;gt;.  And we run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 04_neq_bse_sciss.in -J &amp;quot;neq_bse,gw_eq&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;sangalli2016&amp;quot;&amp;gt;D. Sangalli, S. Dal Conte, C. Manzoni, G. Cerullo, and A. Marini, [https://doi.org/10.1103/PhysRevB.93.195205 Phis. Rev. &#039;&#039;&#039;B 93&#039;&#039;&#039;, 195205 (2016)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;faleev2006&amp;quot;&amp;gt;S. V. Faleev, M. van Schilfgaarde, T. Kotani, F. Léonard, and M. P. Desjarlais, [https://doi.org/10.1103/PhysRevB.74.033101 Phys. Rev. &#039;&#039;&#039;B 74&#039;&#039;&#039;, 033101 (2006)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;thygesen2007&amp;quot;&amp;gt;K. S. Thygesen, and A. Rubio, [https://doi.org/10.1063/1.2565690 J. Chem. Phys. &#039;&#039;&#039;126&#039;&#039;&#039;, 091101 (2007)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Nonequilibrium_absorption_in_bulk_silicon&amp;diff=8892</id>
		<title>Nonequilibrium absorption in bulk silicon</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Nonequilibrium_absorption_in_bulk_silicon&amp;diff=8892"/>
		<updated>2025-06-24T15:16:40Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* Energy shift in the band structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will learn the basic concepts for computing changes in the optical properties of a semi-conductor in presence of a non-equilibrium electrons and holes distribution in conduction and valence band respectively. This tutorial is based on the results published in Phys. Rev. B&amp;lt;ref name=&amp;quot;sangalli2016&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Under construction&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= The material: Silicon =&lt;br /&gt;
&lt;br /&gt;
We will study nonequilibrium absorption in bulk silicon. The same material used for this [[Silicon|GW tutorial]] &lt;br /&gt;
&lt;br /&gt;
* [http://cst-www.nrl.navy.mil/lattice/struk/a1.html FCC] lattice&lt;br /&gt;
* Two atoms per cell (8 electrons)&lt;br /&gt;
* Lattice constant 10.183 [a.u.]&lt;br /&gt;
* Plane waves cutoff 15 Rydberg&lt;br /&gt;
* Direct gap   3.4 eV at Gamma&lt;br /&gt;
* Indirect gap 1.1 eV between Gamma= (0 0 0) and a point X&#039;, close to X=(0 1 0)&lt;br /&gt;
&lt;br /&gt;
[[File:si_banddiagram.gif|thumb|x400px|Silicon Band Structure]]&lt;br /&gt;
&lt;br /&gt;
= Tutorial files and Tutorial structure =&lt;br /&gt;
Follow the instructions in [[Tutorials download]] and download/unpack the &amp;lt;code&amp;gt;Silicon.tar.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
Once the tutorial archive file is unzipped the following folder structure will appear&lt;br /&gt;
 COPYING  README  Silicon/&lt;br /&gt;
&lt;br /&gt;
with the Solid_Si folder containing&lt;br /&gt;
 &amp;gt; ls Silicon/ &lt;br /&gt;
 PWSCF/  YAMBO/&lt;br /&gt;
&lt;br /&gt;
In the Pwscf folder  the student will find an input/output directory with input/output files for pw.x. The Silicon pseudopotential file is also provided.&lt;br /&gt;
 &amp;gt; ls PWSCF/&lt;br /&gt;
 convergence_scripts  input  output  psps&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;convergence_scripts&amp;lt;/code&amp;gt; you will find some useful shell scripts to run the ground state convergence runs for Silicon.&lt;br /&gt;
The YAMBO folder contains the Yambo input/output files and core databases.&lt;br /&gt;
 &amp;gt; ls YAMBO/&lt;br /&gt;
 2x2x2/  4x4x4/  6x6x6/  8x8x8/  Convergence_Plots_and_Scripts/  GAMMA/&lt;br /&gt;
&lt;br /&gt;
The core databases are provided for several k-points grids. In addition the folder &amp;lt;code&amp;gt;Convergence_Plots_and_Scripts&amp;lt;/code&amp;gt; contains some scripts used for the [Silicon|GW tutorial] .&lt;br /&gt;
Here we will just use the 8x8x8 (which is still very far from convergence) folder for computing (nonequilibrium) optical properties.&lt;br /&gt;
&lt;br /&gt;
To run the tutorial you will need the standard executables&lt;br /&gt;
 yambo&lt;br /&gt;
 ypp &lt;br /&gt;
plus the executables of the real time module of the Yambo code&lt;br /&gt;
 yambo_rt&lt;br /&gt;
 ypp_rt&lt;br /&gt;
&lt;br /&gt;
= Overview of the simulations in this tutorial= &lt;br /&gt;
We start from a density-functional theory (DFT) calculation as the foundation. As a first demonstrative step, we will solve the Bethe-Salpeter equation (BSE) for the equilibrium case without including quasiparticle (QP) corrections. Once this is completed, we will use the Yambo post-processing module, &amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt;, to generate a distribution of non-equilibrium carriers. This distribution will be used in all subsequent non-equilibrium (NEQ) calculations. It is important to note that solving the non-equilibrium BSE is not feasible within the GW plasmon pole approximation. To address this limitation, we will instead solve the BSE for the equilibrium case and apply corrections to the energy values using a non-equilibrium COHSEX calculation.&lt;br /&gt;
&lt;br /&gt;
The QP band structure will show the effect of the screened electron-electron interaction, while the absorption spectrum within the BSE accounts for the effect of the electron-hole interaction. When QP corrections are not available, they can be included using the scissor operator &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt;, and the numerical values for &amp;quot;corrections&amp;quot; can be deduced from a GW calculation. For more information about solving the Equilibrium BSE equation refer to the following tutorial: [https://wiki.yambo-code.eu/wiki/index.php/Calculating%20optical%20spectra%20including%20excitonic%20effects:%20a%20step-by-step%20guide Calculating optical spectra including excitonic effects: a step-by-step guide]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; List of Steps Executed in This Module (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
# Equilibrium BSE Calculation (Demonstrative)  &lt;br /&gt;
# Generating non-equilibrium carriers &lt;br /&gt;
# Equilibrium and non-equilibrium COHSEX calculations &lt;br /&gt;
# Calculation of QP-PPA corrections to Silicon (Optional) &lt;br /&gt;
# Non-Equilibrium BSE Calculation&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The run of all the files in this tutorial should take around 2-5 minutes in total. In case a faster run is needed, results from a lower kgrid can be used, or some converged criteria can be used, for example lowering the &amp;lt;code&amp;gt;NGsBlkXs&amp;lt;/code&amp;gt; and/or &amp;lt;code&amp;gt;NGsBlkXp&amp;lt;/code&amp;gt;, or lowering the number of conduction bands used in the calculations.&lt;br /&gt;
&lt;br /&gt;
= Equilibrium optical properties =&lt;br /&gt;
&lt;br /&gt;
In this part, we will solve the equilibrium BSE calculation without quasiparticle corrections. &lt;br /&gt;
&lt;br /&gt;
Enter the folder 8x8x8, and initialize yambo in the respective folder &lt;br /&gt;
 $ cd 8x8x8&lt;br /&gt;
 $ yambo&lt;br /&gt;
&lt;br /&gt;
== Static screening at equilibrium ==&lt;br /&gt;
&lt;br /&gt;
First, to solve the BSE equation we need to calculate the statically screened electron-electron interaction (W), which is related to static dielectric screening &amp;lt;math&amp;gt; \epsilon^{-1} &amp;lt;/math&amp;gt;. &lt;br /&gt;
&amp;lt;!--&amp;lt;math&amp;gt; \Large&lt;br /&gt;
\epsilon^{-1}_{\mathbf{G},\mathbf{G&#039;}} (\mathbf{q}, \omega = 0) = \delta_{\mathbf{G},\mathbf{G&#039;}} + v(\mathbf{v} + \mathbf{G}) \chi_{\mathbf{G},\mathbf{G&#039;}(\mathbf{q}}, \omega = 0)&amp;lt;/math&amp;gt;--&amp;gt;&lt;br /&gt;
[[File:Static dielectric screening.png|550px|frameless|left]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To do this create the following input file: &lt;br /&gt;
 $ yambo -X s -F 01_EQ_BSE_screening.in&lt;br /&gt;
&lt;br /&gt;
with the following contents: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 01_EQ_BSE_screening.in file (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 em1s                                 # [R][Xs] Statically Screened Interaction&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 |  30 |                         # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 3000                   mRy    # [Xs] Response block size&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |    # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where we changed the response block size &amp;lt;code&amp;gt;NGsBlkXs = 3000 mRy&amp;lt;/code&amp;gt; and number of polarization function bands &amp;lt;code&amp;gt;BndsRnXs&amp;lt;/code&amp;gt; to be in the range of 1 to 30. Now run the file:&lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 01_EQ_BSE_screening.in -J EQ_BSE&lt;br /&gt;
&lt;br /&gt;
== Solving the Bethe-Salpeter equation == &lt;br /&gt;
To solve the (equilibrium) Bethe-Salpeter equation, the latter is usually rewritten in the space of transitions between valence and conduction states as the (pseudo)eigenvalue problem for a two-particle Hamiltonian. In the &amp;lt;math&amp;gt; q = 0 &amp;lt;/math&amp;gt; limit, the two-particle Hamiltonian matrix elements are given by:&lt;br /&gt;
&amp;lt;!--&amp;lt;math&amp;gt; \widetilde{H}_{ll&#039;} = \widetilde{\varepsilon}_l - \sqrt{\widetilde{f}_l} \left( v_{ll&#039;} - \widetilde{W}^{s}_{ll&#039;} \right) \sqrt{\widetilde{f}_{l&#039;}} &amp;lt;/math&amp;gt; --&amp;gt;&lt;br /&gt;
[[File:H_eq_bse_2016.png|310px|frameless|left]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where compact notation  &amp;lt;math&amp;gt; l = \{mn\mathbf{k}\} &amp;lt;/math&amp;gt;, was introduced, and quantities with a tilde represent the corresponding quantity evaluated at equilibrium. &lt;br /&gt;
&lt;br /&gt;
For equilibrium occupation factor and energy (KS or QP corrected KS energies): &lt;br /&gt;
[[File:Equilibrium occ factor.png|160px|frameless|left|Equilibrium occupation factor]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Epsilon eng l.png|160px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Moreover, it was defined: &lt;br /&gt;
[[File:W ss.png|300px|frameless|left]] &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:V ss.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;math&amp;gt;\widetilde{W}_{GG&#039;}(\mathbf{q}, 0)&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;v_{G}(\mathbf{q})&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt; \rho_{nm\mathbf{k}, G}(\mathbf{q})&amp;lt;/math&amp;gt; are static approximation to the screened interaction, bare Coulomb interaction, and KS response function respectively. After calculating the equilibrium Bethe-Salpeter kernel, the resulting two-particle Hamiltonian can be diagonalized to compute the macroscopic dielectric function, which can be used to get absorption and EELS spectra. Calculation of BS kernel and diagonalization of Hamiltonian can be done in one step. For a more detailed description please consult  Phis. Rev. B 93, 195205 (2016). &lt;br /&gt;
&lt;br /&gt;
To generate the input file for the calculation of BSE kernel, run the following command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -o b -k sex -F 02_EQ_BSE_kernel_diag.in -y h -V qp -J EQ_BSE&lt;br /&gt;
&lt;br /&gt;
with the following input&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 02_EQ_BSE_kernel_diag.in file (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 15000            mRy    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BSEBands&lt;br /&gt;
    2 |  7 |                         # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 % BEnRange&lt;br /&gt;
   2.20000 | 5.00000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  0.70000 | 1.000000 | 1.000000 |      # [EXTQP BSK BSS] E parameters (c/v)&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/...&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where the value of &amp;lt;code&amp;gt;BSENGexx&amp;lt;/code&amp;gt; was changed for better convergence, &amp;lt;code&amp;gt;BSEBands&amp;lt;/code&amp;gt; was changed to include bands from 2 to 7, which defines the basis of quasiparticle pairs that are used to describe excitons. 3 degenerate valence and 3 degenerate conduction bands where included. &amp;lt;code&amp;gt;BEnRange&amp;lt;/code&amp;gt; was changed to 2.2-5.5 eV to match experimental data, and &amp;lt;code&amp;gt;BEnSteps&amp;lt;/code&amp;gt; was increased from 100 to 200. The scissors operator &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt; was used to match the possiton calculated spectra with experimental values. The Haydock BSE solver was chosen, &amp;lt;code&amp;gt;-y h&amp;lt;/code&amp;gt; option, because it is substantially cheaper than the full diagonalization (quadratic with the number of electron-hole pairs). However, this approach does not provide the individual exciton energies and composition in terms of electron-hole pairs. The [https://wiki.yambo-code.eu/wiki/index.php/BSE%20solvers%20overview BSE solvers overview] page can provide more info on the subject. &lt;br /&gt;
&lt;br /&gt;
To run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 02_EQ_BSE_kernel_diag.in -J EQ_BSE&lt;br /&gt;
&lt;br /&gt;
After the calculation has finished, the absorption spectra can be plotted with the following: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; gnuplot commands (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gnuplot&lt;br /&gt;
...&lt;br /&gt;
gnuplot&amp;gt; set xlabel &amp;quot;Energy (eV)&amp;quot;&lt;br /&gt;
gnuplot&amp;gt; set ylabel &amp;quot;Absorption&amp;quot; &lt;br /&gt;
gnuplot&amp;gt; plot &#039;o-EQ_BSE.eps_q1_haydock_bse&#039; u 1:2 w l t &#039;-k sex&#039;&lt;br /&gt;
gnuplot&amp;gt; rep  &#039;o-EQ_BSE.eps_q1_haydock_bse&#039; u 1:4 w l t &#039;-k ip&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the following plot will results (the &amp;quot;experimental&amp;quot; and &amp;quot;-k hartree&amp;quot; plots are added additionally for comparison) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; Plot of the computed spectra &amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:Plot of Si absorption spectra.png|900px|frameless|Plots of computed absorption spectra for the equilibrium case.]]&lt;br /&gt;
&lt;br /&gt;
= Generating non-equilibrium carriers =&lt;br /&gt;
To simulate non-equilibrium absorption, we need to define the number of non-equilibrium carriers, specifically electrons in the conduction band and holes in the valence band. These carriers follow the Fermi-Dirac distribution given by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&amp;lt;math&amp;gt;\Large f(E) = 1 / (exp((E - μ) / k_B T) + 1)&amp;lt;/math&amp;gt;--&amp;gt;&lt;br /&gt;
[[File:Fermi dirac distr.png|250px]]&lt;br /&gt;
&lt;br /&gt;
Here:&lt;br /&gt;
* 	E is the energy level,&lt;br /&gt;
* 	&amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt; is the chemical potential (specific to electrons or holes),&lt;br /&gt;
* 	&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; is the effective temperature,&lt;br /&gt;
* 	&amp;lt;math&amp;gt;k_B&amp;lt;/math&amp;gt; is the Boltzmann constant.&lt;br /&gt;
&lt;br /&gt;
For the simulation, both electrons and holes are characterized by their own &amp;lt;math&amp;gt;\mu_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;T_i&amp;lt;/math&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
The distribution of non-equilibrium carriers can be generated using Yambo’s post processing for real-time module (&amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt;), which allows modeling of these conditions.&lt;br /&gt;
&lt;br /&gt;
To generate to non-equilibrium carriers databases create &amp;lt;code&amp;gt;input_ypp1 input_ypp2&amp;lt;/code&amp;gt; files, with the following content: &lt;br /&gt;
&lt;br /&gt;
 ypp_rt -rtdb f -F input_ypp1&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp1 (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RTDBs                      	# [R] Real-Time databases&lt;br /&gt;
Select_Fermi               	# [R] NEQ DBs according to Fermi distribution&lt;br /&gt;
% RTBands&lt;br /&gt;
   1 | 30 |               	# [RT] Bands range&lt;br /&gt;
%&lt;br /&gt;
% RTmuEh&lt;br /&gt;
-0.223 | 0.10 | eV  	        # [RT] Chemical potentials hole | electron&lt;br /&gt;
%&lt;br /&gt;
% RTtempEh&lt;br /&gt;
 0.08 	| 0.08 	| eV  	    # [RT] Effective temperature hole | electron&lt;br /&gt;
%&lt;br /&gt;
RTautotuneThr= 0.000100    	# [RT] Threshold to match no. of pumped holes and electrons.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 ypp_rt -rtplot o -rtmode e -F input_ypp2&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp2 (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RealTime                   	# [R] Real-Time Post-Processing&lt;br /&gt;
RToccupations              	# [R] Analize time-dependent occupations&lt;br /&gt;
RTenergy                   	# [R] Post-Processing kind: function of energy&lt;br /&gt;
TimeStep= 0.000000 	fs  	# Time step&lt;br /&gt;
% TimeRange&lt;br /&gt;
-1.000000 |-1.000000 | fs  	# Time-window where processing is done&lt;br /&gt;
%&lt;br /&gt;
#IncludeEQocc              	# [NEGF] Include also equilibrium occupations&lt;br /&gt;
#SkipFermiFIT              	# [NEGF] Do a Fermi Fit of occupations (and lifetimes ratio)&lt;br /&gt;
%QPkrange                	#  generalized Kpoint/Band indices&lt;br /&gt;
  1| 1|  2|7|&lt;br /&gt;
%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And then run the files:&lt;br /&gt;
&lt;br /&gt;
 $ ypp_rt -F input_ypp1 -J carriers -C carriers &lt;br /&gt;
 $ ypp_rt -F input_ypp2 -J carriers -C carriers &lt;br /&gt;
&lt;br /&gt;
The file &amp;lt;code&amp;gt;input_ypp1&amp;lt;/code&amp;gt; will generate a &amp;lt;code&amp;gt;ndb.RT_carriers&amp;lt;/code&amp;gt; database which will contain the Fermi distribution of the electrons and the hole according to the specified chemical potential, &amp;lt;code&amp;gt;RTmuEh&amp;lt;/code&amp;gt;, and for a specific temperature given by &amp;lt;code&amp;gt;RTtempEh&amp;lt;/code&amp;gt;.  The file &amp;lt;code&amp;gt;input_ypp2&amp;lt;/code&amp;gt; will generate a series of databases to plot different different aspects of the distribution.&lt;br /&gt;
&lt;br /&gt;
Plot for the distribution of electrons in conduction band and holes in the valence band generated by the &amp;lt;code&amp;gt;input_ypp1&amp;lt;/code&amp;gt; and data file made by &amp;lt;code&amp;gt;input_ypp2&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--[[File:Plot occupation kgrid8 neq silicon.png|900px|frameless|center]]--&amp;gt; &lt;br /&gt;
[[File:Plot occupation kgrid8 neq silicon 2.png|900px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
This plot can be generated from the &amp;lt;code&amp;gt;carriers&amp;lt;/code&amp;gt; folder using the following gnuplot script [[Gnuplot scripts|plot_occupations.gnu]]&lt;br /&gt;
&lt;br /&gt;
= Energy shift in the band structure =&lt;br /&gt;
&lt;br /&gt;
The GW method is the standard approach to compute quasi-particle corrections. However, in presence of non-equilibrium carriers, or even at finite temperature the formulation of the GW self-energy needs to be refined. This is due to its frequency dependence, which results in extra terms when performing the analytic continuation from the Keldish contour&amp;lt;ref name=&amp;quot;thygesen2007&amp;quot;&amp;gt; (non-equilibrium case) or from the Matsubara axis&amp;lt;ref name=&amp;quot;faleev2006&amp;quot;/&amp;gt; (finite temperature case) to the real time/frequency axis.&lt;br /&gt;
On the other hand the COHSEX self-energy, being static, avoids this complication. This is why we will compute changes in the QP corrections within the COHSEX approximation.&lt;br /&gt;
&lt;br /&gt;
To compute the Non-Equilibrium Absorption Spectra, we need to diagonalize a previously defined two-particle Hamiltonian. To account for the Non-Equilibrium effect, the Kohn-Sham energies, &amp;lt;math&amp;gt;\varepsilon_{c\mathbf{k}}, \varepsilon_{v\mathbf{k}}&amp;lt;/math&amp;gt;, calculated at the DFT level, need to be corrected. This requires calculating the following: COHSEX self-energy at equilibrium, COHSEX self-energy at non-equilibrium, and Equilibrium GW self-energy at Plasmon-Pole Approximation level.&lt;br /&gt;
&lt;br /&gt;
Using these, the energy correction, &amp;lt;math&amp;gt;\varepsilon^{corr,neq}&amp;lt;/math&amp;gt;, can be computed as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Large \varepsilon^{corr,neq}_{c\mathbf{k}} = \varepsilon^{GW,eq}_{c\mathbf{k}} + (\varepsilon^{cohsex,neq}_{c\mathbf{k}} - \varepsilon^{cohsex,eq}_{c\mathbf{k}})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The KS energies will be corrected as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Large \varepsilon^{KS,neq}_{c\mathbf{k}} = \varepsilon_{c\mathbf{k}} + \varepsilon^{corr,neq}_{c\mathbf{k}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These corrected KS energies will be used when diagonalizing the two-particle Hamiltonian.&lt;br /&gt;
&lt;br /&gt;
== COHSEX corrections at equilibrium ==&lt;br /&gt;
To make a COHSEX calculation at equilibrium, we do the following: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -p c -F 03_eq_cohsex.in &lt;br /&gt;
&lt;br /&gt;
which will create a file with the following content: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_eq_cohsex.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 gw0                              # [R] GW approximation&lt;br /&gt;
 cohsex                           # [R][Xp] COlumb Hole Screened EXchange&lt;br /&gt;
 dyson                            # [R] Dyson Equation solver&lt;br /&gt;
 el_el_corr                       # [R] Electron-Electron Correlation&lt;br /&gt;
 HF_and_locXC                     # [R] Hartree-Fock&lt;br /&gt;
 em1s                             # [R][Xs] Statically Screened Interaction&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 SE_Threads=0                     # [OPENMP/GW] Number of threads for self-energy&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 EXXRLvcs= 15             Ry    # [XX] Exchange    RL components&lt;br /&gt;
 VXCRLvcs= 15             Ry    # [XC] XCpotential RL components&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 Chimod= &amp;quot;HARTREE&amp;quot;                # [X] IP/Hartree/ALDA/LRC/PF/BSfxc&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 |  30 |                         # [Xs] Polarization function bands &lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 3                Ry    # [Xs] Response block size&lt;br /&gt;
 UseEbands&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
   1 | 40 |                   # [GW] G[W] bands range&lt;br /&gt;
 %&amp;lt;/span&amp;gt;&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;%QPkrange                        # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 1|1|2|7|&lt;br /&gt;
 %&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;EXXRLvcs&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;VXCRLvcs&amp;lt;/code&amp;gt; were increased up to 15 Ry, due to the fact that computation of terms to which those cut-offs correspond, is not computationally demanding. The number of Polarization function bands, &amp;lt;code&amp;gt;BndsRnXs&amp;lt;/code&amp;gt; was changed to &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt;, and the quasi-particles generalized Kpoint and Band indices,&amp;lt;code&amp;gt;QPkrange&amp;lt;/code&amp;gt;, was changed from &amp;lt;code&amp;gt;1|29|1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1|1|2|7&amp;lt;/code&amp;gt;. Additionally the following lines were added &lt;br /&gt;
 UseEbands&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
   1 | 40 |                   # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
to force Yambo to do a calculation where self-energy depends on the conduction bands too, or this is also known as [https://wiki.yambo-code.eu/wiki/index.php?title=Silicon COHSEX with empty bands]. Alternatively, an option option &amp;lt;code&amp;gt;-V qp&amp;lt;/code&amp;gt; can be added when generating the file, but it will include a lot of redundant variables. &lt;br /&gt;
&lt;br /&gt;
And after it we run the file with the following command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 03_eq_cohsex.in -J cohsex_eq_emp -C cohsex_eq_emp&lt;br /&gt;
&lt;br /&gt;
We can plot the &amp;lt;code&amp;gt;o-cohsex_eq_emp.qp&amp;lt;/code&amp;gt; file from the &amp;lt;code&amp;gt;cohsex_eq_emp&amp;lt;/code&amp;gt; folder, to find out the gap opening due to the COHSEX correction. The plot can be done using the [[Gnuplot scripts|plot_qp_energies.gnu]]. &lt;br /&gt;
&lt;br /&gt;
[[File:Band opening eq cohsex plot.png|800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The points used to calculate band opening are: (0.000000, -1.034067) and (1.608910, -0.449499), which corresponds to an opening of 0.584568 eV.&lt;br /&gt;
&lt;br /&gt;
== COHSEX corrections in presence of non-equilibrium carriers ==&lt;br /&gt;
Before making a COHSEX calculation, we need to recalculate the static screening in the presence of non-equilibrium carriers. After it, we can make a COHSEX calculation in the presence of non-equilibrium carriers using the &amp;lt;code&amp;gt;ndb.RT_carriers&amp;lt;/code&amp;gt; database generated in the previous step with the &amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt; module. To do this, we do the following: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -p c -F 03_neq_cohsex.in &lt;br /&gt;
&lt;br /&gt;
where we need to add the following lines: &lt;br /&gt;
&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 GfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
&lt;br /&gt;
and the resulting file is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_neq_cohsex.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 gw0                              # [R] GW approximation&lt;br /&gt;
 cohsex                           # [R][Xp] COlumb Hole Screened EXchange&lt;br /&gt;
 dyson                            # [R] Dyson Equation solver&lt;br /&gt;
 el_el_corr                       # [R] Electron-Electron Correlation&lt;br /&gt;
 HF_and_locXC                     # [R] Hartree-Fock&lt;br /&gt;
 em1s                             # [R][Xs] Statically Screened Interaction&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 SE_Threads=0                     # [OPENMP/GW] Number of threads for self-energy&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 EXXRLvcs= 15             Ry    # [XX] Exchange    RL components&lt;br /&gt;
 VXCRLvcs= 15             Ry    # [XC] XCpotential RL components&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 Chimod= &amp;quot;HARTREE&amp;quot;                # [X] IP/Hartree/ALDA/LRC/PF/BSfxc&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 |  30 |                         # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 UseEbands&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
   1 | 40 |                   # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 GfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 NGsBlkXs= 3                Ry    # [Xs] Response block size&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 %QPkrange                        # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 1|1|2|7|&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we added the respective two lines with &amp;lt;code&amp;gt;XfnRTdb&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;GfnRTdb&amp;lt;/code&amp;gt;, and made changes to &amp;lt;code&amp;gt;BndsRnXs&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;QPkrange&amp;lt;/code&amp;gt; similar to the equilibrium case. Additionally, we added the lines to force Yambo to do a COHSEX calculation with empty bands. &lt;br /&gt;
&lt;br /&gt;
The line &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; em1s                             # [R][Xs] Statically Screened Interaction&lt;br /&gt;
&lt;br /&gt;
will tell Yambo to make the static screening calculation, and the lines:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; gw0                              # [R] GW approximation&lt;br /&gt;
 &amp;gt; cohsex                           # [R][Xp] COlumb Hole Screened EXchange&lt;br /&gt;
&lt;br /&gt;
will tell Yambo to do make a COHSEX calculation. &lt;br /&gt;
&lt;br /&gt;
After it we can run the file with the command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 03_neq_cohsex.in -J cohsex_neq -C cohsex_neq&lt;br /&gt;
&lt;br /&gt;
We can plot &amp;lt;code&amp;gt;o-cohsex_neq.qp&amp;lt;/code&amp;gt; file from the &amp;lt;code&amp;gt;cohsex_neq&amp;lt;/code&amp;gt; folder, to find the gap opening due the COHSEX correction and the non-equilibrium distribution of the carriers. The plot can be done using the [[Gnuplot scripts|plot_qp_energies.gnu]].&lt;br /&gt;
&lt;br /&gt;
[[File:Band opening neq cohsex plot.png .png|800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The points to calculate band opening are (0.000000, -0.882580), and (1.608910, -0.535269), which correspond to an opening of 0.347311 eV.&lt;br /&gt;
&lt;br /&gt;
== GW PPA corrections for the equilibrium case ==&lt;br /&gt;
&lt;br /&gt;
This subchapter can be skipped, and replaced by using scissors operator when diagonalizing the two particle Hamiltonian. &lt;br /&gt;
&lt;br /&gt;
To get accurate values for the band gap value we need to go beyond COHSEX approximation. Therefore we will obtain the Quasi-particle corrections in the plasmon pole approximation for equilibrium case, and in next steps, to this value we will add the correction calculated at COHSEX approximation to account for the non-equilibrium state of the system. &lt;br /&gt;
&lt;br /&gt;
To make this calculation, we do the following: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -p p -F 03_eq_qp_ppa.in &lt;br /&gt;
&lt;br /&gt;
which will create a file with the following content: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_eq_qp_ppa.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 gw0                              # [R] GW approximation&lt;br /&gt;
 ppa                              # [R][Xp] Plasmon Pole Approximation for the Screened Interaction&lt;br /&gt;
 el_el_corr                       # [R] Electron-Electron Correlation&lt;br /&gt;
 HF_and_locXC                     # [R] Hartree-Fock&lt;br /&gt;
 em1d                             # [R][X] Dynamically Screened Interaction&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 SE_Threads=0                     # [OPENMP/GW] Number of threads for self-energy&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 EXXRLvcs= 15             Ry    # [XX] Exchange    Ry components&lt;br /&gt;
 VXCRLvcs= 15             Ry    # [XC] XCpotential Ry components&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 Chimod= &amp;quot;HARTREE&amp;quot;                # [X] IP/Hartree/ALDA/LRC/PF/BSfxc&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
    1 |  30 |                         # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt; &lt;br /&gt;
 NGsBlkXp= 3                Ry    # [Xp] Response block size&lt;br /&gt;
 % LongDrXp&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [Xp] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 PPAPntXp= 27.21138         eV    # [Xp] PPA imaginary energy&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;  &lt;br /&gt;
 % GbndRnge&lt;br /&gt;
    1 |  40 |                         # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt; &lt;br /&gt;
 GTermKind= &amp;quot;none&amp;quot;                # [GW] GW terminator (&amp;quot;none&amp;quot;,&amp;quot;BG&amp;quot; Bruneval-Gonze,&amp;quot;BRS&amp;quot; Berger-Reining-Sottile)&lt;br /&gt;
 DysSolver= &amp;quot;n&amp;quot;                   # [GW] Dyson Equation solver (&amp;quot;n&amp;quot;,&amp;quot;s&amp;quot;,&amp;quot;g&amp;quot;,&amp;quot;q&amp;quot;)&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 %QPkrange                        # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 1|1|2|7|&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;       &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the following changes have been made: the number of polarization function bands, &amp;lt;code&amp;gt;BndsRnXp&amp;lt;/code&amp;gt; was changed to &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt;, the G[W] bands range, &amp;lt;code&amp;gt;GbndRnge&amp;lt;/code&amp;gt; was changed from &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1|40&amp;lt;/code&amp;gt;, and quasi-particle generalized k points  and band indices, &amp;lt;code&amp;gt;QPkrange&amp;lt;/code&amp;gt; was changed from &amp;lt;code&amp;gt;1|29|1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1|1|2|7&amp;lt;/code&amp;gt;. And after it we run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 03_eq_qp_ppa.in -J gw_eq -C gw_eq&lt;br /&gt;
&lt;br /&gt;
We can plot the &amp;lt;code&amp;gt;o-gw_eq.qp&amp;lt;/code&amp;gt; file from the &amp;lt;code&amp;gt;eq_gw_bse&amp;lt;/code&amp;gt; folder, to find out the gap opening due to the plasmon-pole approximation. The plot can be done using the [[Gnuplot scripts|plot_qp_energies.gnu]]. &lt;br /&gt;
&lt;br /&gt;
[[File:O gw eq qp plot.png|800px|frameless]]&lt;br /&gt;
&lt;br /&gt;
The points used to calculated band opening are (0, -0.045932), and (1.608910, 0.456526), which correspond to an opening of 0.502458 eV. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;(OPTIONAL)&#039;&#039;&#039; Additionally, after computing the QP corrections those can be used during the BSE corrections.  To do it, we create file similar to the [[Nonequilibrium absorption in bulk silicon|Solving the Bethe-Salpeter equation]], where we do not add the scissors line, but we add &amp;lt;code&amp;gt;KfnQPdb= &amp;quot;E &amp;lt; gw_eq/ndb.QP&amp;quot;&amp;lt;/code&amp;gt;. &lt;br /&gt;
The final file will look like &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_eq_bse.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 15             Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 #WehCpl                        # [BSK] eh interaction included also in coupling&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %  &lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 % BSEBands&lt;br /&gt;
   2 |  7 |                           # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 % BEnRange&lt;br /&gt;
  2.200000 | 5.000000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt; &lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 % &lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; gw_eq/ndb.QP&amp;quot;&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
 #WRbsWF                        # [BSS] Write to disk excitonic the WFs     &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and we run this file by typing: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 03_eq_bse.in -J &amp;quot;eq_gw_bse,gw_eq&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Data post-processing ==&lt;br /&gt;
Now after obtaining all the energy components that we need to calculate corrections to Kohn-Sham energies for the Non-Equilibrium case, we can manipulate them using the yambo&#039;s real time post processing module, &amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt;. We want to obtain energies defined by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Large \varepsilon^{corr,neq}_{c\mathbf{k}} = \varepsilon^{GW,eq}_{c\mathbf{k}} + (\varepsilon^{cohsex,neq}_{c\mathbf{k}} - \varepsilon^{cohsex,eq}_{c\mathbf{k}})&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Therefore we create a yambo post processing file with the following contents: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp3 (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
QPDBs                      	# [R] Quasi-particle databases&lt;br /&gt;
QPDB_merge                 	# [R] Mergering&lt;br /&gt;
%Actions_and_names       	# [QPDB] QP databases and Actions (format is &amp;quot;what&amp;quot;|&amp;quot;OP&amp;quot;|&amp;quot;prefactor&amp;quot;|&amp;quot;DB&amp;quot;|). OP can be ±/x.&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_neq/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;-&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_eq_emp/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;Z&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;gw_eq/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;gw_eq/ndb.QP&amp;quot; |&lt;br /&gt;
%       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we tell ypp to take from the quasi particle correction databases the values of &amp;lt;math&amp;gt;\varepsilon^{cohsex,neq}_{c\mathbf{k}}&amp;lt;/math&amp;gt; subtract from them &amp;lt;math&amp;gt;\varepsilon^{cohsex,eq}_{c\mathbf{k}}&amp;lt;/math&amp;gt;, multiply the resulting value by &amp;lt;code&amp;gt;?????&amp;lt;/code&amp;gt;  and add it to &amp;lt;math&amp;gt;\varepsilon^{GW,eq}_{c\mathbf{k}}&amp;lt;/math&amp;gt; and save them in the the new database &amp;lt;code&amp;gt;ndb.QP_merged_1_gw_cohsex_gw_ppa&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
We run the file by the following command: &lt;br /&gt;
&lt;br /&gt;
 $ ypp_rt -F input_ypp3 -J QP_merge -C QP_merge&lt;br /&gt;
&lt;br /&gt;
Or alternatively, if no calculation for the quasiparticle correction has been made (except the COHSEX calculation), and a scissors operator is going to be used, we can use the following yambo post processing file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp3_scissors (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
QPDBs                      	# [R] Quasi-particle databases&lt;br /&gt;
QPDB_merge                 	# [R] Mergering&lt;br /&gt;
%Actions_and_names       	# [QPDB] QP databases and Actions (format is &amp;quot;what&amp;quot;|&amp;quot;OP&amp;quot;|&amp;quot;prefactor&amp;quot;|&amp;quot;DB&amp;quot;|). OP can be ±/x.&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_neq/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;-&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_eq_emp/ndb.QP&amp;quot; |&lt;br /&gt;
%  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which will just take from the quasi particle correction databases the values of &amp;lt;math&amp;gt;\varepsilon^{cohsex,neq}_{c\mathbf{k}}&amp;lt;/math&amp;gt; subtract from them &amp;lt;math&amp;gt;\varepsilon^{cohsex,eq}_{c\mathbf{k}}&amp;lt;/math&amp;gt;. And we run this file by: &lt;br /&gt;
&lt;br /&gt;
 $ ypp_rt -F input_ypp3_scissors -J QP_merge_scissor -C QP_merge_scissor&lt;br /&gt;
&lt;br /&gt;
= Renormalization of the exciton binding energy =&lt;br /&gt;
&lt;br /&gt;
We finally perform a BSE calculation loading both the nonequilibrium carriers and the quasi-particle energy shifts. The Non-Equilibrium Hamiltonian is: &lt;br /&gt;
&lt;br /&gt;
[[File:Neq h.png|310px|frameless|left]] &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Where quantities entering into the hamiltonian are the non-equilibrium counterparts of the quantities discussion for the EQ Hamiltonian, and &amp;lt;math&amp;gt;\tau&amp;lt;/math&amp;gt; is the pump probe delay. The &amp;lt;math&amp;gt;\Delta \epsilon^{\tau}_l&amp;lt;/math&amp;gt; is the difference between non-equilibrium COHSEX and equilibrium COHSEX energy (calculated in the COHSEX chapter). &lt;br /&gt;
&lt;br /&gt;
We create a file using the following command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -o b -y h -F 04_neq_bse.in&lt;br /&gt;
&lt;br /&gt;
== With GW qp corrections ==&lt;br /&gt;
&lt;br /&gt;
Compared to the equilibrium case we add the lines:&lt;br /&gt;
&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge/ndb.QP_merged_1_gw_cohsex_gw_ppa&amp;quot;&lt;br /&gt;
&lt;br /&gt;
the resulting structure of the file is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 04_neq_bse.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions &lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 3             Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 #WehCpl                        # [BSK] eh interaction included also in coupling&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   2 |  7 |                           # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BEnRange&lt;br /&gt;
  2.200000 | 5.000000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge/ndb.QP_merged_1_gw_cohsex_gw_ppa&amp;quot;&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
 #WRbsWF                        # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we added the lines, and changed the bands range, &amp;lt;code&amp;gt;BSEBands&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2|7&amp;lt;/code&amp;gt;, energy range, &amp;lt;code&amp;gt;BEnRange&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;0.00000 | 10.00000 &amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2.00000 | 10.00000 |&amp;lt;/code&amp;gt; and energy steps, &amp;lt;code&amp;gt;BEnSteps&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;100&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;200&amp;lt;/code&amp;gt;. And we run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 04_neq_bse.in -J &amp;quot;neq_bse,gw_eq&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Alternatively, when scissors are used, the lines can be added, to account for the lack of a proper GW correction.&lt;br /&gt;
&lt;br /&gt;
The final plot from the calculations presented in this tutorial, for k-grid 8x8x8, with NEQ BSE with QP corrections, EQ BSE with QP corrections (not presented in this tutorial), and Experimental Data looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--[[File:NEQ2 abs bulk silicon tutorial plot results kgrid8.png|800px|frameless|center]]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[[File:Plot results kgrid8 7ry.png|800px|frameless|center]]--&amp;gt;&lt;br /&gt;
[[File:Plot results kgrid8 15 3ry.png||800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
In case, a better convergence is needed, a 16x16x16 k-grid can be used. To decrease computational time, the GW corrections can be done on lower grid, whereas solving the BSE equation can be done on higher k-grids. And for the 16x16x16 k-grid the plot looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Neq abs bulk silicon plot kgrid16.png|800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The plots can be done using [[Gnuplot scripts|plot_absorbance.gnu]] gnuplot script.&lt;br /&gt;
&lt;br /&gt;
== With scissor corrections ==&lt;br /&gt;
&lt;br /&gt;
Compared to the equilibrium case we just add the lines below:&lt;br /&gt;
&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge_scissor/ndb.QP_merged_1_gw_cohsex&amp;quot;&lt;br /&gt;
&lt;br /&gt;
the resulting structure of the file is (lines for nonequilibrium simulations added in red):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 04_neq_bse_scissors.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 3             Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 #WehCpl                        # [BSK] eh interaction included also in coupling&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  0.700000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge/ndb.QP_merged_1_gw_cohsex&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot; &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
    2 |  7 |                         # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BEnRange&lt;br /&gt;
   2.20000 | 5.00000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&amp;lt;/span&amp;gt;&lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 %&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
 #WRbsWF                        # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we added the lines, and changed the bands range, &amp;lt;code&amp;gt;BSEBands&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2|7&amp;lt;/code&amp;gt;, energy range, &amp;lt;code&amp;gt;BEnRange&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;0.00000 | 10.00000 &amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2.20000 | 5.00000 |&amp;lt;/code&amp;gt; and energy steps, &amp;lt;code&amp;gt;BEnSteps&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;100&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;200&amp;lt;/code&amp;gt;.  And we run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 04_neq_bse_sciss.in -J &amp;quot;neq_bse,gw_eq&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;sangalli2016&amp;quot;&amp;gt;D. Sangalli, S. Dal Conte, C. Manzoni, G. Cerullo, and A. Marini, [https://doi.org/10.1103/PhysRevB.93.195205 Phis. Rev. &#039;&#039;&#039;B 93&#039;&#039;&#039;, 195205 (2016)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;faleev2006&amp;quot;&amp;gt;S. V. Faleev, M. van Schilfgaarde, T. Kotani, F. Léonard, and M. P. Desjarlais, [https://doi.org/10.1103/PhysRevB.74.033101 Phys. Rev. &#039;&#039;&#039;B 74&#039;&#039;&#039;, 033101 (2006)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;thygesen2007&amp;quot;&amp;gt;K. S. Thygesen, and A. Rubio, [https://doi.org/10.1063/1.2565690 J. Chem. Phys. &#039;&#039;&#039;126&#039;&#039;&#039;, 091101 (2007)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Nonequilibrium_absorption_in_bulk_silicon&amp;diff=8891</id>
		<title>Nonequilibrium absorption in bulk silicon</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Nonequilibrium_absorption_in_bulk_silicon&amp;diff=8891"/>
		<updated>2025-06-24T15:15:14Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will learn the basic concepts for computing changes in the optical properties of a semi-conductor in presence of a non-equilibrium electrons and holes distribution in conduction and valence band respectively. This tutorial is based on the results published in Phys. Rev. B&amp;lt;ref name=&amp;quot;sangalli2016&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Under construction&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= The material: Silicon =&lt;br /&gt;
&lt;br /&gt;
We will study nonequilibrium absorption in bulk silicon. The same material used for this [[Silicon|GW tutorial]] &lt;br /&gt;
&lt;br /&gt;
* [http://cst-www.nrl.navy.mil/lattice/struk/a1.html FCC] lattice&lt;br /&gt;
* Two atoms per cell (8 electrons)&lt;br /&gt;
* Lattice constant 10.183 [a.u.]&lt;br /&gt;
* Plane waves cutoff 15 Rydberg&lt;br /&gt;
* Direct gap   3.4 eV at Gamma&lt;br /&gt;
* Indirect gap 1.1 eV between Gamma= (0 0 0) and a point X&#039;, close to X=(0 1 0)&lt;br /&gt;
&lt;br /&gt;
[[File:si_banddiagram.gif|thumb|x400px|Silicon Band Structure]]&lt;br /&gt;
&lt;br /&gt;
= Tutorial files and Tutorial structure =&lt;br /&gt;
Follow the instructions in [[Tutorials download]] and download/unpack the &amp;lt;code&amp;gt;Silicon.tar.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
Once the tutorial archive file is unzipped the following folder structure will appear&lt;br /&gt;
 COPYING  README  Silicon/&lt;br /&gt;
&lt;br /&gt;
with the Solid_Si folder containing&lt;br /&gt;
 &amp;gt; ls Silicon/ &lt;br /&gt;
 PWSCF/  YAMBO/&lt;br /&gt;
&lt;br /&gt;
In the Pwscf folder  the student will find an input/output directory with input/output files for pw.x. The Silicon pseudopotential file is also provided.&lt;br /&gt;
 &amp;gt; ls PWSCF/&lt;br /&gt;
 convergence_scripts  input  output  psps&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;convergence_scripts&amp;lt;/code&amp;gt; you will find some useful shell scripts to run the ground state convergence runs for Silicon.&lt;br /&gt;
The YAMBO folder contains the Yambo input/output files and core databases.&lt;br /&gt;
 &amp;gt; ls YAMBO/&lt;br /&gt;
 2x2x2/  4x4x4/  6x6x6/  8x8x8/  Convergence_Plots_and_Scripts/  GAMMA/&lt;br /&gt;
&lt;br /&gt;
The core databases are provided for several k-points grids. In addition the folder &amp;lt;code&amp;gt;Convergence_Plots_and_Scripts&amp;lt;/code&amp;gt; contains some scripts used for the [Silicon|GW tutorial] .&lt;br /&gt;
Here we will just use the 8x8x8 (which is still very far from convergence) folder for computing (nonequilibrium) optical properties.&lt;br /&gt;
&lt;br /&gt;
To run the tutorial you will need the standard executables&lt;br /&gt;
 yambo&lt;br /&gt;
 ypp &lt;br /&gt;
plus the executables of the real time module of the Yambo code&lt;br /&gt;
 yambo_rt&lt;br /&gt;
 ypp_rt&lt;br /&gt;
&lt;br /&gt;
= Overview of the simulations in this tutorial= &lt;br /&gt;
We start from a density-functional theory (DFT) calculation as the foundation. As a first demonstrative step, we will solve the Bethe-Salpeter equation (BSE) for the equilibrium case without including quasiparticle (QP) corrections. Once this is completed, we will use the Yambo post-processing module, &amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt;, to generate a distribution of non-equilibrium carriers. This distribution will be used in all subsequent non-equilibrium (NEQ) calculations. It is important to note that solving the non-equilibrium BSE is not feasible within the GW plasmon pole approximation. To address this limitation, we will instead solve the BSE for the equilibrium case and apply corrections to the energy values using a non-equilibrium COHSEX calculation.&lt;br /&gt;
&lt;br /&gt;
The QP band structure will show the effect of the screened electron-electron interaction, while the absorption spectrum within the BSE accounts for the effect of the electron-hole interaction. When QP corrections are not available, they can be included using the scissor operator &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt;, and the numerical values for &amp;quot;corrections&amp;quot; can be deduced from a GW calculation. For more information about solving the Equilibrium BSE equation refer to the following tutorial: [https://wiki.yambo-code.eu/wiki/index.php/Calculating%20optical%20spectra%20including%20excitonic%20effects:%20a%20step-by-step%20guide Calculating optical spectra including excitonic effects: a step-by-step guide]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; List of Steps Executed in This Module (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
# Equilibrium BSE Calculation (Demonstrative)  &lt;br /&gt;
# Generating non-equilibrium carriers &lt;br /&gt;
# Equilibrium and non-equilibrium COHSEX calculations &lt;br /&gt;
# Calculation of QP-PPA corrections to Silicon (Optional) &lt;br /&gt;
# Non-Equilibrium BSE Calculation&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The run of all the files in this tutorial should take around 2-5 minutes in total. In case a faster run is needed, results from a lower kgrid can be used, or some converged criteria can be used, for example lowering the &amp;lt;code&amp;gt;NGsBlkXs&amp;lt;/code&amp;gt; and/or &amp;lt;code&amp;gt;NGsBlkXp&amp;lt;/code&amp;gt;, or lowering the number of conduction bands used in the calculations.&lt;br /&gt;
&lt;br /&gt;
= Equilibrium optical properties =&lt;br /&gt;
&lt;br /&gt;
In this part, we will solve the equilibrium BSE calculation without quasiparticle corrections. &lt;br /&gt;
&lt;br /&gt;
Enter the folder 8x8x8, and initialize yambo in the respective folder &lt;br /&gt;
 $ cd 8x8x8&lt;br /&gt;
 $ yambo&lt;br /&gt;
&lt;br /&gt;
== Static screening at equilibrium ==&lt;br /&gt;
&lt;br /&gt;
First, to solve the BSE equation we need to calculate the statically screened electron-electron interaction (W), which is related to static dielectric screening &amp;lt;math&amp;gt; \epsilon^{-1} &amp;lt;/math&amp;gt;. &lt;br /&gt;
&amp;lt;!--&amp;lt;math&amp;gt; \Large&lt;br /&gt;
\epsilon^{-1}_{\mathbf{G},\mathbf{G&#039;}} (\mathbf{q}, \omega = 0) = \delta_{\mathbf{G},\mathbf{G&#039;}} + v(\mathbf{v} + \mathbf{G}) \chi_{\mathbf{G},\mathbf{G&#039;}(\mathbf{q}}, \omega = 0)&amp;lt;/math&amp;gt;--&amp;gt;&lt;br /&gt;
[[File:Static dielectric screening.png|550px|frameless|left]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To do this create the following input file: &lt;br /&gt;
 $ yambo -X s -F 01_EQ_BSE_screening.in&lt;br /&gt;
&lt;br /&gt;
with the following contents: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 01_EQ_BSE_screening.in file (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 em1s                                 # [R][Xs] Statically Screened Interaction&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 |  30 |                         # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 3000                   mRy    # [Xs] Response block size&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |    # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where we changed the response block size &amp;lt;code&amp;gt;NGsBlkXs = 3000 mRy&amp;lt;/code&amp;gt; and number of polarization function bands &amp;lt;code&amp;gt;BndsRnXs&amp;lt;/code&amp;gt; to be in the range of 1 to 30. Now run the file:&lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 01_EQ_BSE_screening.in -J EQ_BSE&lt;br /&gt;
&lt;br /&gt;
== Solving the Bethe-Salpeter equation == &lt;br /&gt;
To solve the (equilibrium) Bethe-Salpeter equation, the latter is usually rewritten in the space of transitions between valence and conduction states as the (pseudo)eigenvalue problem for a two-particle Hamiltonian. In the &amp;lt;math&amp;gt; q = 0 &amp;lt;/math&amp;gt; limit, the two-particle Hamiltonian matrix elements are given by:&lt;br /&gt;
&amp;lt;!--&amp;lt;math&amp;gt; \widetilde{H}_{ll&#039;} = \widetilde{\varepsilon}_l - \sqrt{\widetilde{f}_l} \left( v_{ll&#039;} - \widetilde{W}^{s}_{ll&#039;} \right) \sqrt{\widetilde{f}_{l&#039;}} &amp;lt;/math&amp;gt; --&amp;gt;&lt;br /&gt;
[[File:H_eq_bse_2016.png|310px|frameless|left]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where compact notation  &amp;lt;math&amp;gt; l = \{mn\mathbf{k}\} &amp;lt;/math&amp;gt;, was introduced, and quantities with a tilde represent the corresponding quantity evaluated at equilibrium. &lt;br /&gt;
&lt;br /&gt;
For equilibrium occupation factor and energy (KS or QP corrected KS energies): &lt;br /&gt;
[[File:Equilibrium occ factor.png|160px|frameless|left|Equilibrium occupation factor]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Epsilon eng l.png|160px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Moreover, it was defined: &lt;br /&gt;
[[File:W ss.png|300px|frameless|left]] &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:V ss.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;math&amp;gt;\widetilde{W}_{GG&#039;}(\mathbf{q}, 0)&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;v_{G}(\mathbf{q})&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt; \rho_{nm\mathbf{k}, G}(\mathbf{q})&amp;lt;/math&amp;gt; are static approximation to the screened interaction, bare Coulomb interaction, and KS response function respectively. After calculating the equilibrium Bethe-Salpeter kernel, the resulting two-particle Hamiltonian can be diagonalized to compute the macroscopic dielectric function, which can be used to get absorption and EELS spectra. Calculation of BS kernel and diagonalization of Hamiltonian can be done in one step. For a more detailed description please consult  Phis. Rev. B 93, 195205 (2016). &lt;br /&gt;
&lt;br /&gt;
To generate the input file for the calculation of BSE kernel, run the following command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -o b -k sex -F 02_EQ_BSE_kernel_diag.in -y h -V qp -J EQ_BSE&lt;br /&gt;
&lt;br /&gt;
with the following input&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 02_EQ_BSE_kernel_diag.in file (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 15000            mRy    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BSEBands&lt;br /&gt;
    2 |  7 |                         # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 % BEnRange&lt;br /&gt;
   2.20000 | 5.00000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  0.70000 | 1.000000 | 1.000000 |      # [EXTQP BSK BSS] E parameters (c/v)&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/...&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where the value of &amp;lt;code&amp;gt;BSENGexx&amp;lt;/code&amp;gt; was changed for better convergence, &amp;lt;code&amp;gt;BSEBands&amp;lt;/code&amp;gt; was changed to include bands from 2 to 7, which defines the basis of quasiparticle pairs that are used to describe excitons. 3 degenerate valence and 3 degenerate conduction bands where included. &amp;lt;code&amp;gt;BEnRange&amp;lt;/code&amp;gt; was changed to 2.2-5.5 eV to match experimental data, and &amp;lt;code&amp;gt;BEnSteps&amp;lt;/code&amp;gt; was increased from 100 to 200. The scissors operator &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt; was used to match the possiton calculated spectra with experimental values. The Haydock BSE solver was chosen, &amp;lt;code&amp;gt;-y h&amp;lt;/code&amp;gt; option, because it is substantially cheaper than the full diagonalization (quadratic with the number of electron-hole pairs). However, this approach does not provide the individual exciton energies and composition in terms of electron-hole pairs. The [https://wiki.yambo-code.eu/wiki/index.php/BSE%20solvers%20overview BSE solvers overview] page can provide more info on the subject. &lt;br /&gt;
&lt;br /&gt;
To run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 02_EQ_BSE_kernel_diag.in -J EQ_BSE&lt;br /&gt;
&lt;br /&gt;
After the calculation has finished, the absorption spectra can be plotted with the following: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; gnuplot commands (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gnuplot&lt;br /&gt;
...&lt;br /&gt;
gnuplot&amp;gt; set xlabel &amp;quot;Energy (eV)&amp;quot;&lt;br /&gt;
gnuplot&amp;gt; set ylabel &amp;quot;Absorption&amp;quot; &lt;br /&gt;
gnuplot&amp;gt; plot &#039;o-EQ_BSE.eps_q1_haydock_bse&#039; u 1:2 w l t &#039;-k sex&#039;&lt;br /&gt;
gnuplot&amp;gt; rep  &#039;o-EQ_BSE.eps_q1_haydock_bse&#039; u 1:4 w l t &#039;-k ip&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the following plot will results (the &amp;quot;experimental&amp;quot; and &amp;quot;-k hartree&amp;quot; plots are added additionally for comparison) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; Plot of the computed spectra &amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:Plot of Si absorption spectra.png|900px|frameless|Plots of computed absorption spectra for the equilibrium case.]]&lt;br /&gt;
&lt;br /&gt;
= Generating non-equilibrium carriers =&lt;br /&gt;
To simulate non-equilibrium absorption, we need to define the number of non-equilibrium carriers, specifically electrons in the conduction band and holes in the valence band. These carriers follow the Fermi-Dirac distribution given by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&amp;lt;math&amp;gt;\Large f(E) = 1 / (exp((E - μ) / k_B T) + 1)&amp;lt;/math&amp;gt;--&amp;gt;&lt;br /&gt;
[[File:Fermi dirac distr.png|250px]]&lt;br /&gt;
&lt;br /&gt;
Here:&lt;br /&gt;
* 	E is the energy level,&lt;br /&gt;
* 	&amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt; is the chemical potential (specific to electrons or holes),&lt;br /&gt;
* 	&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; is the effective temperature,&lt;br /&gt;
* 	&amp;lt;math&amp;gt;k_B&amp;lt;/math&amp;gt; is the Boltzmann constant.&lt;br /&gt;
&lt;br /&gt;
For the simulation, both electrons and holes are characterized by their own &amp;lt;math&amp;gt;\mu_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;T_i&amp;lt;/math&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
The distribution of non-equilibrium carriers can be generated using Yambo’s post processing for real-time module (&amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt;), which allows modeling of these conditions.&lt;br /&gt;
&lt;br /&gt;
To generate to non-equilibrium carriers databases create &amp;lt;code&amp;gt;input_ypp1 input_ypp2&amp;lt;/code&amp;gt; files, with the following content: &lt;br /&gt;
&lt;br /&gt;
 ypp_rt -rtdb f -F input_ypp1&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp1 (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RTDBs                      	# [R] Real-Time databases&lt;br /&gt;
Select_Fermi               	# [R] NEQ DBs according to Fermi distribution&lt;br /&gt;
% RTBands&lt;br /&gt;
   1 | 30 |               	# [RT] Bands range&lt;br /&gt;
%&lt;br /&gt;
% RTmuEh&lt;br /&gt;
-0.223 | 0.10 | eV  	        # [RT] Chemical potentials hole | electron&lt;br /&gt;
%&lt;br /&gt;
% RTtempEh&lt;br /&gt;
 0.08 	| 0.08 	| eV  	    # [RT] Effective temperature hole | electron&lt;br /&gt;
%&lt;br /&gt;
RTautotuneThr= 0.000100    	# [RT] Threshold to match no. of pumped holes and electrons.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 ypp_rt -rtplot o -rtmode e -F input_ypp2&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp2 (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RealTime                   	# [R] Real-Time Post-Processing&lt;br /&gt;
RToccupations              	# [R] Analize time-dependent occupations&lt;br /&gt;
RTenergy                   	# [R] Post-Processing kind: function of energy&lt;br /&gt;
TimeStep= 0.000000 	fs  	# Time step&lt;br /&gt;
% TimeRange&lt;br /&gt;
-1.000000 |-1.000000 | fs  	# Time-window where processing is done&lt;br /&gt;
%&lt;br /&gt;
#IncludeEQocc              	# [NEGF] Include also equilibrium occupations&lt;br /&gt;
#SkipFermiFIT              	# [NEGF] Do a Fermi Fit of occupations (and lifetimes ratio)&lt;br /&gt;
%QPkrange                	#  generalized Kpoint/Band indices&lt;br /&gt;
  1| 1|  2|7|&lt;br /&gt;
%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And then run the files:&lt;br /&gt;
&lt;br /&gt;
 $ ypp_rt -F input_ypp1 -J carriers -C carriers &lt;br /&gt;
 $ ypp_rt -F input_ypp2 -J carriers -C carriers &lt;br /&gt;
&lt;br /&gt;
The file &amp;lt;code&amp;gt;input_ypp1&amp;lt;/code&amp;gt; will generate a &amp;lt;code&amp;gt;ndb.RT_carriers&amp;lt;/code&amp;gt; database which will contain the Fermi distribution of the electrons and the hole according to the specified chemical potential, &amp;lt;code&amp;gt;RTmuEh&amp;lt;/code&amp;gt;, and for a specific temperature given by &amp;lt;code&amp;gt;RTtempEh&amp;lt;/code&amp;gt;.  The file &amp;lt;code&amp;gt;input_ypp2&amp;lt;/code&amp;gt; will generate a series of databases to plot different different aspects of the distribution.&lt;br /&gt;
&lt;br /&gt;
Plot for the distribution of electrons in conduction band and holes in the valence band generated by the &amp;lt;code&amp;gt;input_ypp1&amp;lt;/code&amp;gt; and data file made by &amp;lt;code&amp;gt;input_ypp2&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--[[File:Plot occupation kgrid8 neq silicon.png|900px|frameless|center]]--&amp;gt; &lt;br /&gt;
[[File:Plot occupation kgrid8 neq silicon 2.png|900px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
This plot can be generated from the &amp;lt;code&amp;gt;carriers&amp;lt;/code&amp;gt; folder using the following gnuplot script [[Gnuplot scripts|plot_occupations.gnu]]&lt;br /&gt;
&lt;br /&gt;
= Energy shift in the band structure =&lt;br /&gt;
&lt;br /&gt;
The GW method is the standard approach to compute quasi-particle corrections. However, in presence of non-equilibrium carriers, or even at finite temperature the formulation of the GW self-energy needs to be refined. This is due to its frequency dependence, which results in extra terms when performing the analytic continuation from the Keldish contour (non-equilibrium case) or from the Matsubara axis (finite temperature case) to the real time/frequency axis. See for example this reference &amp;lt;ref name=&amp;quot;faleev2006&amp;quot;/&amp;gt; for the finite temperature case.&lt;br /&gt;
On the other hand the COHSEX self-energy, being static, avoids this complication. This is why we will compute changes in the QP corrections within the COHSEX approximation.&lt;br /&gt;
&lt;br /&gt;
To compute the Non-Equilibrium Absorption Spectra, we need to diagonalize a previously defined two-particle Hamiltonian. To account for the Non-Equilibrium effect, the Kohn-Sham energies, &amp;lt;math&amp;gt;\varepsilon_{c\mathbf{k}}, \varepsilon_{v\mathbf{k}}&amp;lt;/math&amp;gt;, calculated at the DFT level, need to be corrected. This requires calculating the following: COHSEX self-energy at equilibrium, COHSEX self-energy at non-equilibrium, and Equilibrium GW self-energy at Plasmon-Pole Approximation level.&lt;br /&gt;
&lt;br /&gt;
Using these, the energy correction, &amp;lt;math&amp;gt;\varepsilon^{corr,neq}&amp;lt;/math&amp;gt;, can be computed as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Large \varepsilon^{corr,neq}_{c\mathbf{k}} = \varepsilon^{GW,eq}_{c\mathbf{k}} + (\varepsilon^{cohsex,neq}_{c\mathbf{k}} - \varepsilon^{cohsex,eq}_{c\mathbf{k}})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The KS energies will be corrected as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Large \varepsilon^{KS,neq}_{c\mathbf{k}} = \varepsilon_{c\mathbf{k}} + \varepsilon^{corr,neq}_{c\mathbf{k}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These corrected KS energies will be used when diagonalizing the two-particle Hamiltonian.&lt;br /&gt;
&lt;br /&gt;
== COHSEX corrections at equilibrium ==&lt;br /&gt;
To make a COHSEX calculation at equilibrium, we do the following: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -p c -F 03_eq_cohsex.in &lt;br /&gt;
&lt;br /&gt;
which will create a file with the following content: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_eq_cohsex.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 gw0                              # [R] GW approximation&lt;br /&gt;
 cohsex                           # [R][Xp] COlumb Hole Screened EXchange&lt;br /&gt;
 dyson                            # [R] Dyson Equation solver&lt;br /&gt;
 el_el_corr                       # [R] Electron-Electron Correlation&lt;br /&gt;
 HF_and_locXC                     # [R] Hartree-Fock&lt;br /&gt;
 em1s                             # [R][Xs] Statically Screened Interaction&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 SE_Threads=0                     # [OPENMP/GW] Number of threads for self-energy&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 EXXRLvcs= 15             Ry    # [XX] Exchange    RL components&lt;br /&gt;
 VXCRLvcs= 15             Ry    # [XC] XCpotential RL components&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 Chimod= &amp;quot;HARTREE&amp;quot;                # [X] IP/Hartree/ALDA/LRC/PF/BSfxc&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 |  30 |                         # [Xs] Polarization function bands &lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 3                Ry    # [Xs] Response block size&lt;br /&gt;
 UseEbands&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
   1 | 40 |                   # [GW] G[W] bands range&lt;br /&gt;
 %&amp;lt;/span&amp;gt;&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;%QPkrange                        # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 1|1|2|7|&lt;br /&gt;
 %&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;EXXRLvcs&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;VXCRLvcs&amp;lt;/code&amp;gt; were increased up to 15 Ry, due to the fact that computation of terms to which those cut-offs correspond, is not computationally demanding. The number of Polarization function bands, &amp;lt;code&amp;gt;BndsRnXs&amp;lt;/code&amp;gt; was changed to &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt;, and the quasi-particles generalized Kpoint and Band indices,&amp;lt;code&amp;gt;QPkrange&amp;lt;/code&amp;gt;, was changed from &amp;lt;code&amp;gt;1|29|1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1|1|2|7&amp;lt;/code&amp;gt;. Additionally the following lines were added &lt;br /&gt;
 UseEbands&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
   1 | 40 |                   # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
to force Yambo to do a calculation where self-energy depends on the conduction bands too, or this is also known as [https://wiki.yambo-code.eu/wiki/index.php?title=Silicon COHSEX with empty bands]. Alternatively, an option option &amp;lt;code&amp;gt;-V qp&amp;lt;/code&amp;gt; can be added when generating the file, but it will include a lot of redundant variables. &lt;br /&gt;
&lt;br /&gt;
And after it we run the file with the following command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 03_eq_cohsex.in -J cohsex_eq_emp -C cohsex_eq_emp&lt;br /&gt;
&lt;br /&gt;
We can plot the &amp;lt;code&amp;gt;o-cohsex_eq_emp.qp&amp;lt;/code&amp;gt; file from the &amp;lt;code&amp;gt;cohsex_eq_emp&amp;lt;/code&amp;gt; folder, to find out the gap opening due to the COHSEX correction. The plot can be done using the [[Gnuplot scripts|plot_qp_energies.gnu]]. &lt;br /&gt;
&lt;br /&gt;
[[File:Band opening eq cohsex plot.png|800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The points used to calculate band opening are: (0.000000, -1.034067) and (1.608910, -0.449499), which corresponds to an opening of 0.584568 eV.&lt;br /&gt;
&lt;br /&gt;
== COHSEX corrections in presence of non-equilibrium carriers ==&lt;br /&gt;
Before making a COHSEX calculation, we need to recalculate the static screening in the presence of non-equilibrium carriers. After it, we can make a COHSEX calculation in the presence of non-equilibrium carriers using the &amp;lt;code&amp;gt;ndb.RT_carriers&amp;lt;/code&amp;gt; database generated in the previous step with the &amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt; module. To do this, we do the following: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -p c -F 03_neq_cohsex.in &lt;br /&gt;
&lt;br /&gt;
where we need to add the following lines: &lt;br /&gt;
&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 GfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
&lt;br /&gt;
and the resulting file is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_neq_cohsex.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 gw0                              # [R] GW approximation&lt;br /&gt;
 cohsex                           # [R][Xp] COlumb Hole Screened EXchange&lt;br /&gt;
 dyson                            # [R] Dyson Equation solver&lt;br /&gt;
 el_el_corr                       # [R] Electron-Electron Correlation&lt;br /&gt;
 HF_and_locXC                     # [R] Hartree-Fock&lt;br /&gt;
 em1s                             # [R][Xs] Statically Screened Interaction&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 SE_Threads=0                     # [OPENMP/GW] Number of threads for self-energy&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 EXXRLvcs= 15             Ry    # [XX] Exchange    RL components&lt;br /&gt;
 VXCRLvcs= 15             Ry    # [XC] XCpotential RL components&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 Chimod= &amp;quot;HARTREE&amp;quot;                # [X] IP/Hartree/ALDA/LRC/PF/BSfxc&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 |  30 |                         # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 UseEbands&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
   1 | 40 |                   # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 GfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 NGsBlkXs= 3                Ry    # [Xs] Response block size&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 %QPkrange                        # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 1|1|2|7|&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we added the respective two lines with &amp;lt;code&amp;gt;XfnRTdb&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;GfnRTdb&amp;lt;/code&amp;gt;, and made changes to &amp;lt;code&amp;gt;BndsRnXs&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;QPkrange&amp;lt;/code&amp;gt; similar to the equilibrium case. Additionally, we added the lines to force Yambo to do a COHSEX calculation with empty bands. &lt;br /&gt;
&lt;br /&gt;
The line &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; em1s                             # [R][Xs] Statically Screened Interaction&lt;br /&gt;
&lt;br /&gt;
will tell Yambo to make the static screening calculation, and the lines:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; gw0                              # [R] GW approximation&lt;br /&gt;
 &amp;gt; cohsex                           # [R][Xp] COlumb Hole Screened EXchange&lt;br /&gt;
&lt;br /&gt;
will tell Yambo to do make a COHSEX calculation. &lt;br /&gt;
&lt;br /&gt;
After it we can run the file with the command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 03_neq_cohsex.in -J cohsex_neq -C cohsex_neq&lt;br /&gt;
&lt;br /&gt;
We can plot &amp;lt;code&amp;gt;o-cohsex_neq.qp&amp;lt;/code&amp;gt; file from the &amp;lt;code&amp;gt;cohsex_neq&amp;lt;/code&amp;gt; folder, to find the gap opening due the COHSEX correction and the non-equilibrium distribution of the carriers. The plot can be done using the [[Gnuplot scripts|plot_qp_energies.gnu]].&lt;br /&gt;
&lt;br /&gt;
[[File:Band opening neq cohsex plot.png .png|800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The points to calculate band opening are (0.000000, -0.882580), and (1.608910, -0.535269), which correspond to an opening of 0.347311 eV.&lt;br /&gt;
&lt;br /&gt;
== GW PPA corrections for the equilibrium case ==&lt;br /&gt;
&lt;br /&gt;
This subchapter can be skipped, and replaced by using scissors operator when diagonalizing the two particle Hamiltonian. &lt;br /&gt;
&lt;br /&gt;
To get accurate values for the band gap value we need to go beyond COHSEX approximation. Therefore we will obtain the Quasi-particle corrections in the plasmon pole approximation for equilibrium case, and in next steps, to this value we will add the correction calculated at COHSEX approximation to account for the non-equilibrium state of the system. &lt;br /&gt;
&lt;br /&gt;
To make this calculation, we do the following: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -p p -F 03_eq_qp_ppa.in &lt;br /&gt;
&lt;br /&gt;
which will create a file with the following content: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_eq_qp_ppa.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 gw0                              # [R] GW approximation&lt;br /&gt;
 ppa                              # [R][Xp] Plasmon Pole Approximation for the Screened Interaction&lt;br /&gt;
 el_el_corr                       # [R] Electron-Electron Correlation&lt;br /&gt;
 HF_and_locXC                     # [R] Hartree-Fock&lt;br /&gt;
 em1d                             # [R][X] Dynamically Screened Interaction&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 SE_Threads=0                     # [OPENMP/GW] Number of threads for self-energy&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 EXXRLvcs= 15             Ry    # [XX] Exchange    Ry components&lt;br /&gt;
 VXCRLvcs= 15             Ry    # [XC] XCpotential Ry components&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 Chimod= &amp;quot;HARTREE&amp;quot;                # [X] IP/Hartree/ALDA/LRC/PF/BSfxc&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
    1 |  30 |                         # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt; &lt;br /&gt;
 NGsBlkXp= 3                Ry    # [Xp] Response block size&lt;br /&gt;
 % LongDrXp&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [Xp] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 PPAPntXp= 27.21138         eV    # [Xp] PPA imaginary energy&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;  &lt;br /&gt;
 % GbndRnge&lt;br /&gt;
    1 |  40 |                         # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt; &lt;br /&gt;
 GTermKind= &amp;quot;none&amp;quot;                # [GW] GW terminator (&amp;quot;none&amp;quot;,&amp;quot;BG&amp;quot; Bruneval-Gonze,&amp;quot;BRS&amp;quot; Berger-Reining-Sottile)&lt;br /&gt;
 DysSolver= &amp;quot;n&amp;quot;                   # [GW] Dyson Equation solver (&amp;quot;n&amp;quot;,&amp;quot;s&amp;quot;,&amp;quot;g&amp;quot;,&amp;quot;q&amp;quot;)&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 %QPkrange                        # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 1|1|2|7|&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;       &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the following changes have been made: the number of polarization function bands, &amp;lt;code&amp;gt;BndsRnXp&amp;lt;/code&amp;gt; was changed to &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt;, the G[W] bands range, &amp;lt;code&amp;gt;GbndRnge&amp;lt;/code&amp;gt; was changed from &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1|40&amp;lt;/code&amp;gt;, and quasi-particle generalized k points  and band indices, &amp;lt;code&amp;gt;QPkrange&amp;lt;/code&amp;gt; was changed from &amp;lt;code&amp;gt;1|29|1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1|1|2|7&amp;lt;/code&amp;gt;. And after it we run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 03_eq_qp_ppa.in -J gw_eq -C gw_eq&lt;br /&gt;
&lt;br /&gt;
We can plot the &amp;lt;code&amp;gt;o-gw_eq.qp&amp;lt;/code&amp;gt; file from the &amp;lt;code&amp;gt;eq_gw_bse&amp;lt;/code&amp;gt; folder, to find out the gap opening due to the plasmon-pole approximation. The plot can be done using the [[Gnuplot scripts|plot_qp_energies.gnu]]. &lt;br /&gt;
&lt;br /&gt;
[[File:O gw eq qp plot.png|800px|frameless]]&lt;br /&gt;
&lt;br /&gt;
The points used to calculated band opening are (0, -0.045932), and (1.608910, 0.456526), which correspond to an opening of 0.502458 eV. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;(OPTIONAL)&#039;&#039;&#039; Additionally, after computing the QP corrections those can be used during the BSE corrections.  To do it, we create file similar to the [[Nonequilibrium absorption in bulk silicon|Solving the Bethe-Salpeter equation]], where we do not add the scissors line, but we add &amp;lt;code&amp;gt;KfnQPdb= &amp;quot;E &amp;lt; gw_eq/ndb.QP&amp;quot;&amp;lt;/code&amp;gt;. &lt;br /&gt;
The final file will look like &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_eq_bse.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 15             Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 #WehCpl                        # [BSK] eh interaction included also in coupling&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %  &lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 % BSEBands&lt;br /&gt;
   2 |  7 |                           # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 % BEnRange&lt;br /&gt;
  2.200000 | 5.000000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt; &lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 % &lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; gw_eq/ndb.QP&amp;quot;&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
 #WRbsWF                        # [BSS] Write to disk excitonic the WFs     &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and we run this file by typing: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 03_eq_bse.in -J &amp;quot;eq_gw_bse,gw_eq&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Data post-processing ==&lt;br /&gt;
Now after obtaining all the energy components that we need to calculate corrections to Kohn-Sham energies for the Non-Equilibrium case, we can manipulate them using the yambo&#039;s real time post processing module, &amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt;. We want to obtain energies defined by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Large \varepsilon^{corr,neq}_{c\mathbf{k}} = \varepsilon^{GW,eq}_{c\mathbf{k}} + (\varepsilon^{cohsex,neq}_{c\mathbf{k}} - \varepsilon^{cohsex,eq}_{c\mathbf{k}})&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Therefore we create a yambo post processing file with the following contents: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp3 (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
QPDBs                      	# [R] Quasi-particle databases&lt;br /&gt;
QPDB_merge                 	# [R] Mergering&lt;br /&gt;
%Actions_and_names       	# [QPDB] QP databases and Actions (format is &amp;quot;what&amp;quot;|&amp;quot;OP&amp;quot;|&amp;quot;prefactor&amp;quot;|&amp;quot;DB&amp;quot;|). OP can be ±/x.&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_neq/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;-&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_eq_emp/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;Z&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;gw_eq/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;gw_eq/ndb.QP&amp;quot; |&lt;br /&gt;
%       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we tell ypp to take from the quasi particle correction databases the values of &amp;lt;math&amp;gt;\varepsilon^{cohsex,neq}_{c\mathbf{k}}&amp;lt;/math&amp;gt; subtract from them &amp;lt;math&amp;gt;\varepsilon^{cohsex,eq}_{c\mathbf{k}}&amp;lt;/math&amp;gt;, multiply the resulting value by &amp;lt;code&amp;gt;?????&amp;lt;/code&amp;gt;  and add it to &amp;lt;math&amp;gt;\varepsilon^{GW,eq}_{c\mathbf{k}}&amp;lt;/math&amp;gt; and save them in the the new database &amp;lt;code&amp;gt;ndb.QP_merged_1_gw_cohsex_gw_ppa&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
We run the file by the following command: &lt;br /&gt;
&lt;br /&gt;
 $ ypp_rt -F input_ypp3 -J QP_merge -C QP_merge&lt;br /&gt;
&lt;br /&gt;
Or alternatively, if no calculation for the quasiparticle correction has been made (except the COHSEX calculation), and a scissors operator is going to be used, we can use the following yambo post processing file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp3_scissors (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
QPDBs                      	# [R] Quasi-particle databases&lt;br /&gt;
QPDB_merge                 	# [R] Mergering&lt;br /&gt;
%Actions_and_names       	# [QPDB] QP databases and Actions (format is &amp;quot;what&amp;quot;|&amp;quot;OP&amp;quot;|&amp;quot;prefactor&amp;quot;|&amp;quot;DB&amp;quot;|). OP can be ±/x.&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_neq/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;-&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_eq_emp/ndb.QP&amp;quot; |&lt;br /&gt;
%  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which will just take from the quasi particle correction databases the values of &amp;lt;math&amp;gt;\varepsilon^{cohsex,neq}_{c\mathbf{k}}&amp;lt;/math&amp;gt; subtract from them &amp;lt;math&amp;gt;\varepsilon^{cohsex,eq}_{c\mathbf{k}}&amp;lt;/math&amp;gt;. And we run this file by: &lt;br /&gt;
&lt;br /&gt;
 $ ypp_rt -F input_ypp3_scissors -J QP_merge_scissor -C QP_merge_scissor&lt;br /&gt;
&lt;br /&gt;
= Renormalization of the exciton binding energy =&lt;br /&gt;
&lt;br /&gt;
We finally perform a BSE calculation loading both the nonequilibrium carriers and the quasi-particle energy shifts. The Non-Equilibrium Hamiltonian is: &lt;br /&gt;
&lt;br /&gt;
[[File:Neq h.png|310px|frameless|left]] &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Where quantities entering into the hamiltonian are the non-equilibrium counterparts of the quantities discussion for the EQ Hamiltonian, and &amp;lt;math&amp;gt;\tau&amp;lt;/math&amp;gt; is the pump probe delay. The &amp;lt;math&amp;gt;\Delta \epsilon^{\tau}_l&amp;lt;/math&amp;gt; is the difference between non-equilibrium COHSEX and equilibrium COHSEX energy (calculated in the COHSEX chapter). &lt;br /&gt;
&lt;br /&gt;
We create a file using the following command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -o b -y h -F 04_neq_bse.in&lt;br /&gt;
&lt;br /&gt;
== With GW qp corrections ==&lt;br /&gt;
&lt;br /&gt;
Compared to the equilibrium case we add the lines:&lt;br /&gt;
&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge/ndb.QP_merged_1_gw_cohsex_gw_ppa&amp;quot;&lt;br /&gt;
&lt;br /&gt;
the resulting structure of the file is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 04_neq_bse.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions &lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 3             Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 #WehCpl                        # [BSK] eh interaction included also in coupling&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   2 |  7 |                           # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BEnRange&lt;br /&gt;
  2.200000 | 5.000000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge/ndb.QP_merged_1_gw_cohsex_gw_ppa&amp;quot;&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
 #WRbsWF                        # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we added the lines, and changed the bands range, &amp;lt;code&amp;gt;BSEBands&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2|7&amp;lt;/code&amp;gt;, energy range, &amp;lt;code&amp;gt;BEnRange&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;0.00000 | 10.00000 &amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2.00000 | 10.00000 |&amp;lt;/code&amp;gt; and energy steps, &amp;lt;code&amp;gt;BEnSteps&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;100&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;200&amp;lt;/code&amp;gt;. And we run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 04_neq_bse.in -J &amp;quot;neq_bse,gw_eq&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Alternatively, when scissors are used, the lines can be added, to account for the lack of a proper GW correction.&lt;br /&gt;
&lt;br /&gt;
The final plot from the calculations presented in this tutorial, for k-grid 8x8x8, with NEQ BSE with QP corrections, EQ BSE with QP corrections (not presented in this tutorial), and Experimental Data looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--[[File:NEQ2 abs bulk silicon tutorial plot results kgrid8.png|800px|frameless|center]]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[[File:Plot results kgrid8 7ry.png|800px|frameless|center]]--&amp;gt;&lt;br /&gt;
[[File:Plot results kgrid8 15 3ry.png||800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
In case, a better convergence is needed, a 16x16x16 k-grid can be used. To decrease computational time, the GW corrections can be done on lower grid, whereas solving the BSE equation can be done on higher k-grids. And for the 16x16x16 k-grid the plot looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Neq abs bulk silicon plot kgrid16.png|800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The plots can be done using [[Gnuplot scripts|plot_absorbance.gnu]] gnuplot script.&lt;br /&gt;
&lt;br /&gt;
== With scissor corrections ==&lt;br /&gt;
&lt;br /&gt;
Compared to the equilibrium case we just add the lines below:&lt;br /&gt;
&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge_scissor/ndb.QP_merged_1_gw_cohsex&amp;quot;&lt;br /&gt;
&lt;br /&gt;
the resulting structure of the file is (lines for nonequilibrium simulations added in red):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 04_neq_bse_scissors.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 3             Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 #WehCpl                        # [BSK] eh interaction included also in coupling&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  0.700000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge/ndb.QP_merged_1_gw_cohsex&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot; &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
    2 |  7 |                         # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BEnRange&lt;br /&gt;
   2.20000 | 5.00000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&amp;lt;/span&amp;gt;&lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 %&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
 #WRbsWF                        # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we added the lines, and changed the bands range, &amp;lt;code&amp;gt;BSEBands&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2|7&amp;lt;/code&amp;gt;, energy range, &amp;lt;code&amp;gt;BEnRange&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;0.00000 | 10.00000 &amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2.20000 | 5.00000 |&amp;lt;/code&amp;gt; and energy steps, &amp;lt;code&amp;gt;BEnSteps&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;100&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;200&amp;lt;/code&amp;gt;.  And we run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 04_neq_bse_sciss.in -J &amp;quot;neq_bse,gw_eq&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;sangalli2016&amp;quot;&amp;gt;D. Sangalli, S. Dal Conte, C. Manzoni, G. Cerullo, and A. Marini, [https://doi.org/10.1103/PhysRevB.93.195205 Phis. Rev. &#039;&#039;&#039;B 93&#039;&#039;&#039;, 195205 (2016)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;faleev2006&amp;quot;&amp;gt;S. V. Faleev, M. van Schilfgaarde, T. Kotani, F. Léonard, and M. P. Desjarlais, [https://doi.org/10.1103/PhysRevB.74.033101 Phys. Rev. &#039;&#039;&#039;B 74&#039;&#039;&#039;, 033101 (2006)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;thygesen2007&amp;quot;&amp;gt;K. S. Thygesen, and A. Rubio, [https://doi.org/10.1063/1.2565690 J. Chem. Phys. &#039;&#039;&#039;126&#039;&#039;&#039;, 091101 (2007)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials_all&amp;diff=8857</id>
		<title>Tutorials all</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials_all&amp;diff=8857"/>
		<updated>2025-06-18T12:34:23Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* Linear response */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page contains the full list of available tutorials. These cover a variety of mixed topics, both physical and methodological. Some of these are om &amp;quot;Standalone mode&amp;quot; and are designed to be followed from start to finish in one page. Others have been ported in &amp;quot;Modular form&amp;quot;. These are also available under the link [[Tutorials modular]]. The tutorials do not require previous knowledge of yambo, unless explicitly specified. Each tutorial requires download of a specific core database, and typically they cover a specific physical system (like bulk GaSb or a hydrogen chain). Ground state input files and pseudopotentials are provided. Output files are also provided for reference.&lt;br /&gt;
&lt;br /&gt;
These tutorials can be accessed directly from this page of from the side bar. They include different kind of subjects:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning&#039;&#039;&#039;: These tutorials were prepared using previous version of the Yambo code: some command lines, variables, reports and outputs can be  slightly different from the last version of the code.  Scripts for parsing output cannot work anymore and should be edited to work with the new outputs. New command lines can be accessed typing &amp;lt;code&amp;gt;yambo -h &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Basic ==&lt;br /&gt;
* [[First steps: a walk through from DFT to optical properties]] (modular tutorial)&lt;br /&gt;
* [[Silicon|GW on bulk silicon]]&lt;br /&gt;
* [[GW on h-BN (standalone)|GW on h-BN]] (standalone version);  [[How to obtain the quasi-particle band structure of a bulk material: h-BN|GW on h-BN]] (modular version)&lt;br /&gt;
* [[LiF|BSE in lithium-floride]]&lt;br /&gt;
* [[How to analyse excitons]]&lt;br /&gt;
&lt;br /&gt;
== More on GW and Quasi-particles ==&lt;br /&gt;
* [[Real_Axis_and_Lifetimes|Real Axis and Lifetimes]]&lt;br /&gt;
* [[Self-consistent GW on eigenvalues only]]&lt;br /&gt;
* [[GW parallel strategies|GW parallel strategies v1]]; [[GW parallel strategies CECAM|GW parallel strategies v2]];  [[Pushing convergence in parallel|GW convergence in parallel]] (modular tutorials)&lt;br /&gt;
* [[GW tutorial on HPC]] (external tutorial on HackMD)&lt;br /&gt;
* [[Quasi-particles and Self-energy within the Multipole Approximation (MPA)]]&lt;br /&gt;
* [http://www.attaccalite.com/gw-correction-on-an-arbitrary-point-of-the-brillouin-zone GW on arbitrary k point] (external tutorial on www.attaccalite.com)&lt;br /&gt;
* [[SOC|Spin-orbit coupling in GaSb]]&lt;br /&gt;
&lt;br /&gt;
== More on Linear response and BSE ==&lt;br /&gt;
* [[Hydrogen chain|TDDFT Failure and long range correlations]]&lt;br /&gt;
* [[SOC|Spin-orbit coupling in GaSb]]&lt;br /&gt;
* [[The magneto-optical Kerr effect|The magneto-optical Kerr effect in bulk iron, RPA]]&lt;br /&gt;
* [[The magneto-optical Kerr effect including excitonic effects|The magneto-optical Kerr effect in XXX, excitonic effects]] (todo)&lt;br /&gt;
* [[Dichroism in molecules]]&lt;br /&gt;
* [[Surface spectroscopy]] (to restore from older version)&lt;br /&gt;
* [[Si_Surface|Linear Response of a silicon surface (2D)]]&lt;br /&gt;
* [http://www.attaccalite.com/speed-up-dielectric-constant-calculations-using-the-double-grid-method-with-yambo/ Speed up dielectric constant calculations using the double-grid method] (to be imported)&lt;br /&gt;
* [[Si_wire|Linear Response from a silicon wire (1D)]] (to restore from old version)&lt;br /&gt;
* [[H2|H2 molecule: Linear Response &amp;amp; TDDFT (0D)]] (to restore from old version)&lt;br /&gt;
* [[SiH4|SiH4: isolated molecule TDDFT &amp;amp; BSE (0D)]] (restored from old version, still to be finalized)&lt;br /&gt;
&lt;br /&gt;
== Post Processing with ypp ==&lt;br /&gt;
* [[Yambo Post Processing (ypp)]]&lt;br /&gt;
&lt;br /&gt;
== Electron phonon coupling ==&lt;br /&gt;
* [[Electron Phonon Coupling|Electron Phonon Coupling]]&lt;br /&gt;
* [[Optical properties at finite temperature]]&lt;br /&gt;
* [[Phonon-assisted luminescence by finite atomic displacements]]&lt;br /&gt;
* [[Exciton-phonon coupling and luminescence]]&lt;br /&gt;
&lt;br /&gt;
== Real time &amp;amp; Non linear response ==&lt;br /&gt;
=== Linear response ===&lt;br /&gt;
* [[Linear response from real time simulations (density matrix only)|Linear response using the density matrix (IP)]]&lt;br /&gt;
* [[Linear response using Dynamical Berry Phase|Linear response using wave-functions and Dynamical Berry Phase (IP)]]&lt;br /&gt;
* [[Linear response in velocity gauge|Linear response using wave-functions in velocity gauge (IP)]]&lt;br /&gt;
* [[Real time Bethe-Salpeter Equation (density_matrix_only)|Linear response using the density matrix (TD-HSEX)]]&lt;br /&gt;
* [[Linear response from real time simulations|Linear response from real time simulations (IP &amp;amp; TD-HSEX)]] (modular tutorial)&lt;br /&gt;
&lt;br /&gt;
=== Non-Linear response ===&lt;br /&gt;
* [[Real time approach to non-linear response (SHG)]]&lt;br /&gt;
* [[Correlation effects in the non-linear response]]&lt;br /&gt;
* [[SHG within the TD-aGW level (also called TD-HSEX, TD-BSE)]]&lt;br /&gt;
* [[A fast approach to excitonic effects in linear/non-linear response]]&lt;br /&gt;
* [[Angular dependence of non-linear response]]&lt;br /&gt;
* [[Third Harmonic Generation (THG)]]&lt;br /&gt;
* [http://www.attaccalite.com/lumen/spin_orbit.html Spin-orbit coupling and non-linear response] (external tutorial on www.attaccalite.com)&lt;br /&gt;
* [[Two-photon absorption]]&lt;br /&gt;
* [[Sum frequency generation]] &lt;br /&gt;
* [[Shift current]]&lt;br /&gt;
* [[Parallelization for non-linear response calculations]]&lt;br /&gt;
=== Pump and Probe experiments ===&lt;br /&gt;
* [[Nonequilibrium absorption in bulk silicon|Pump and Probe: Transient Absorption from BSE with NEQ occupations]]&lt;br /&gt;
* [[Pump and Probe|Pump and Probe: Transient Absorption from real time propagation with pump and probe]]&lt;br /&gt;
* [[Pump and Probe: Time resolved ARPES|Pump and Probe: Time resolved ARPES from real time propagation with pump]]&lt;br /&gt;
&lt;br /&gt;
== Developing Yambo ==&lt;br /&gt;
* [[How to create a new project in Yambo]]&lt;br /&gt;
* [[How to create a new ypp interface]]&lt;br /&gt;
* [[Some hints on github]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[SOC|Spin-Orbit Coupling MBPT]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- For each TUTORIAL (Solid_LiF, Solid_Al, ...) , therefore, you can download the ground state files (zip archive named TUTORIAL_ground_state.zip) and generate the Yambo databases from your own by running abinit/PWscf and a2y/p2y. In this case the Yambo input and reference files are contained in the zip file (TUTORIAL_reference_files.zip). Alternatively, if (and only if) you have compiled yambo with the NetCDF support you can directly download the zip files containing the Yambo core databases (TUTORIAL_NETCDF_databases_and_reference_files.zip). These are generated using the NetCDF interface in order to be readable in any platform.&lt;br /&gt;
After you have downloaded the tutorial zip files and unziped them you should have now a tutorial tree:&lt;br /&gt;
localhost:&amp;gt; ls &lt;br /&gt;
YAMBO_TUTORIALS/&lt;br /&gt;
localhost:&amp;gt; ls  YAMBO_TUTORIALS/&lt;br /&gt;
COPYING  Fantastic_Dimensions/  Hydrogen_Chain/  README  Solid_LiF/ Solid_Al/ SiH4/ ...&lt;br /&gt;
In each folder you will find an Abinit or Pwscf subfolder in case you have downloaded the ground state zip files and the YAMBO subfolder. The tutorials start by entering the YAMBO subfolder and followinf the informations provided in the tutorial documentation.  --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Nonequilibrium_absorption_in_bulk_silicon&amp;diff=8848</id>
		<title>Nonequilibrium absorption in bulk silicon</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Nonequilibrium_absorption_in_bulk_silicon&amp;diff=8848"/>
		<updated>2025-05-26T12:46:30Z</updated>

		<summary type="html">&lt;p&gt;Davide: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will learn the basic concepts for computing changes in the optical properties of a semi-conductor in presence of a non-equilibrium electrons and holes distribution in conduction and valence band respectively. This tutorial is based on the results published in Phys. Rev. B&amp;lt;ref name=&amp;quot;sangalli2016&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Under construction&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= The material: Silicon =&lt;br /&gt;
&lt;br /&gt;
We will study nonequilibrium absorption in bulk silicon. The same material used for this [[Silicon|GW tutorial]] &lt;br /&gt;
&lt;br /&gt;
* [http://cst-www.nrl.navy.mil/lattice/struk/a1.html FCC] lattice&lt;br /&gt;
* Two atoms per cell (8 electrons)&lt;br /&gt;
* Lattice constant 10.183 [a.u.]&lt;br /&gt;
* Plane waves cutoff 15 Rydberg&lt;br /&gt;
* Direct gap   3.4 eV at Gamma&lt;br /&gt;
* Indirect gap 1.1 eV between Gamma= (0 0 0) and a point X&#039;, close to X=(0 1 0)&lt;br /&gt;
&lt;br /&gt;
[[File:si_banddiagram.gif|thumb|x400px|Silicon Band Structure]]&lt;br /&gt;
&lt;br /&gt;
= Tutorial files and Tutorial structure =&lt;br /&gt;
Follow the instructions in [[Tutorials#Files]] and download/unpack the &amp;lt;code&amp;gt;Silicon.tar.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
Once the tutorial archive file is unzipped the following folder structure will appear&lt;br /&gt;
 COPYING  README  Silicon/&lt;br /&gt;
&lt;br /&gt;
with the Solid_Si folder containing&lt;br /&gt;
 &amp;gt; ls Silicon/ &lt;br /&gt;
 PWSCF/  YAMBO/&lt;br /&gt;
&lt;br /&gt;
In the Pwscf folder  the student will find an input/output directory with input/output files for pw.x. The Silicon pseudopotential file is also provided.&lt;br /&gt;
 &amp;gt; ls PWSCF/&lt;br /&gt;
 convergence_scripts  input  output  psps&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;convergence_scripts&amp;lt;/code&amp;gt; you will find some useful shell scripts to run the ground state convergence runs for Silicon.&lt;br /&gt;
The YAMBO folder contains the Yambo input/output files and core databases.&lt;br /&gt;
 &amp;gt; ls YAMBO/&lt;br /&gt;
 2x2x2/  4x4x4/  6x6x6/  8x8x8/  Convergence_Plots_and_Scripts/  GAMMA/&lt;br /&gt;
&lt;br /&gt;
The core databases are provided for several k-points grids. In addition the folder &amp;lt;code&amp;gt;Convergence_Plots_and_Scripts&amp;lt;/code&amp;gt; contains some scripts used for the [Silicon|GW tutorial] .&lt;br /&gt;
Here we will just use the 8x8x8 (which is still very far from convergence) folder for computing (nonequilibrium) optical properties.&lt;br /&gt;
&lt;br /&gt;
To run the tutorial you will need the standard executables&lt;br /&gt;
 yambo&lt;br /&gt;
 ypp &lt;br /&gt;
plus the executables of the real time module of the Yambo code&lt;br /&gt;
 yambo_rt&lt;br /&gt;
 ypp_rt&lt;br /&gt;
&lt;br /&gt;
= Overview of the simulations in this tutorial= &lt;br /&gt;
We start from a density-functional theory (DFT) calculation as the foundation. As a first demonstrative step, we will solve the Bethe-Salpeter equation (BSE) for the equilibrium case without including quasiparticle (QP) corrections. Once this is completed, we will use the Yambo post-processing module, &amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt;, to generate a distribution of non-equilibrium carriers. This distribution will be used in all subsequent non-equilibrium (NEQ) calculations. It is important to note that solving the non-equilibrium BSE is not feasible within the GW plasmon pole approximation. To address this limitation, we will instead solve the BSE for the equilibrium case and apply corrections to the energy values using a non-equilibrium COHSEX calculation.&lt;br /&gt;
&lt;br /&gt;
The QP band structure will show the effect of the screened electron-electron interaction, while the absorption spectrum within the BSE accounts for the effect of the electron-hole interaction. When QP corrections are not available, they can be included using the scissor operator &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt;, and the numerical values for &amp;quot;corrections&amp;quot; can be deduced from a GW calculation. For more information about solving the Equilibrium BSE equation refer to the following tutorial: [https://wiki.yambo-code.eu/wiki/index.php/Calculating%20optical%20spectra%20including%20excitonic%20effects:%20a%20step-by-step%20guide Calculating optical spectra including excitonic effects: a step-by-step guide]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; List of Steps Executed in This Module (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
# Equilibrium BSE Calculation (Demonstrative)  &lt;br /&gt;
# Generating non-equilibrium carriers &lt;br /&gt;
# Equilibrium and non-equilibrium COHSEX calculations &lt;br /&gt;
# Calculation of QP-PPA corrections to Silicon (Optional) &lt;br /&gt;
# Non-Equilibrium BSE Calculation&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The run of all the files in this tutorial should take around 2-5 minutes in total. In case a faster run is needed, results from a lower kgrid can be used, or some converged criteria can be used, for example lowering the &amp;lt;code&amp;gt;NGsBlkXs&amp;lt;/code&amp;gt; and/or &amp;lt;code&amp;gt;NGsBlkXp&amp;lt;/code&amp;gt;, or lowering the number of conduction bands used in the calculations.&lt;br /&gt;
&lt;br /&gt;
= Equilibrium optical properties =&lt;br /&gt;
&lt;br /&gt;
In this part, we will solve the equilibrium BSE calculation without quasiparticle corrections. &lt;br /&gt;
&lt;br /&gt;
Enter the folder 8x8x8, and initialize yambo in the respective folder &lt;br /&gt;
 $ cd 8x8x8&lt;br /&gt;
 $ yambo&lt;br /&gt;
&lt;br /&gt;
== Static screening at equilibrium ==&lt;br /&gt;
&lt;br /&gt;
First, to solve the BSE equation we need to calculate the statically screened electron-electron interaction (W), which is related to static dielectric screening &amp;lt;math&amp;gt; \epsilon^{-1} &amp;lt;/math&amp;gt;. &lt;br /&gt;
&amp;lt;!--&amp;lt;math&amp;gt; \Large&lt;br /&gt;
\epsilon^{-1}_{\mathbf{G},\mathbf{G&#039;}} (\mathbf{q}, \omega = 0) = \delta_{\mathbf{G},\mathbf{G&#039;}} + v(\mathbf{v} + \mathbf{G}) \chi_{\mathbf{G},\mathbf{G&#039;}(\mathbf{q}}, \omega = 0)&amp;lt;/math&amp;gt;--&amp;gt;&lt;br /&gt;
[[File:Static dielectric screening.png|550px|frameless|left]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To do this create the following input file: &lt;br /&gt;
 $ yambo -X s -F 01_EQ_BSE_screening.in&lt;br /&gt;
&lt;br /&gt;
with the following contents: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 01_EQ_BSE_screening.in file (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 em1s                                 # [R][Xs] Statically Screened Interaction&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 |  30 |                         # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 3000                   mRy    # [Xs] Response block size&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |    # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where we changed the response block size &amp;lt;code&amp;gt;NGsBlkXs = 3000 mRy&amp;lt;/code&amp;gt; and number of polarization function bands &amp;lt;code&amp;gt;BndsRnXs&amp;lt;/code&amp;gt; to be in the range of 1 to 30. Now run the file:&lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 01_EQ_BSE_screening.in -J EQ_BSE&lt;br /&gt;
&lt;br /&gt;
== Solving the Bethe-Salpeter equation == &lt;br /&gt;
To solve the (equilibrium) Bethe-Salpeter equation, the latter is usually rewritten in the space of transitions between valence and conduction states as the (pseudo)eigenvalue problem for a two-particle Hamiltonian. In the &amp;lt;math&amp;gt; q = 0 &amp;lt;/math&amp;gt; limit, the two-particle Hamiltonian matrix elements are given by:&lt;br /&gt;
&amp;lt;!--&amp;lt;math&amp;gt; \widetilde{H}_{ll&#039;} = \widetilde{\varepsilon}_l - \sqrt{\widetilde{f}_l} \left( v_{ll&#039;} - \widetilde{W}^{s}_{ll&#039;} \right) \sqrt{\widetilde{f}_{l&#039;}} &amp;lt;/math&amp;gt; --&amp;gt;&lt;br /&gt;
[[File:H_eq_bse_2016.png|310px|frameless|left]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where compact notation  &amp;lt;math&amp;gt; l = \{mn\mathbf{k}\} &amp;lt;/math&amp;gt;, was introduced, and quantities with a tilde represent the corresponding quantity evaluated at equilibrium. &lt;br /&gt;
&lt;br /&gt;
For equilibrium occupation factor and energy (KS or QP corrected KS energies): &lt;br /&gt;
[[File:Equilibrium occ factor.png|160px|frameless|left|Equilibrium occupation factor]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Epsilon eng l.png|160px|frameless]]&lt;br /&gt;
&lt;br /&gt;
Moreover, it was defined: &lt;br /&gt;
[[File:W ss.png|300px|frameless|left]] &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:V ss.png|300px|frameless]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;math&amp;gt;\widetilde{W}_{GG&#039;}(\mathbf{q}, 0)&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;v_{G}(\mathbf{q})&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt; \rho_{nm\mathbf{k}, G}(\mathbf{q})&amp;lt;/math&amp;gt; are static approximation to the screened interaction, bare Coulomb interaction, and KS response function respectively. After calculating the equilibrium Bethe-Salpeter kernel, the resulting two-particle Hamiltonian can be diagonalized to compute the macroscopic dielectric function, which can be used to get absorption and EELS spectra. Calculation of BS kernel and diagonalization of Hamiltonian can be done in one step. For a more detailed description please consult  Phis. Rev. B 93, 195205 (2016). &lt;br /&gt;
&lt;br /&gt;
To generate the input file for the calculation of BSE kernel, run the following command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -o b -k sex -F 02_EQ_BSE_kernel_diag.in -y h -V qp -J EQ_BSE&lt;br /&gt;
&lt;br /&gt;
with the following input&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 02_EQ_BSE_kernel_diag.in file (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 15000            mRy    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BSEBands&lt;br /&gt;
    2 |  7 |                         # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 % BEnRange&lt;br /&gt;
   2.20000 | 5.00000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  0.70000 | 1.000000 | 1.000000 |      # [EXTQP BSK BSS] E parameters (c/v)&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/...&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where the value of &amp;lt;code&amp;gt;BSENGexx&amp;lt;/code&amp;gt; was changed for better convergence, &amp;lt;code&amp;gt;BSEBands&amp;lt;/code&amp;gt; was changed to include bands from 2 to 7, which defines the basis of quasiparticle pairs that are used to describe excitons. 3 degenerate valence and 3 degenerate conduction bands where included. &amp;lt;code&amp;gt;BEnRange&amp;lt;/code&amp;gt; was changed to 2.2-5.5 eV to match experimental data, and &amp;lt;code&amp;gt;BEnSteps&amp;lt;/code&amp;gt; was increased from 100 to 200. The scissors operator &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt; was used to match the possiton calculated spectra with experimental values. The Haydock BSE solver was chosen, &amp;lt;code&amp;gt;-y h&amp;lt;/code&amp;gt; option, because it is substantially cheaper than the full diagonalization (quadratic with the number of electron-hole pairs). However, this approach does not provide the individual exciton energies and composition in terms of electron-hole pairs. The [https://wiki.yambo-code.eu/wiki/index.php/BSE%20solvers%20overview BSE solvers overview] page can provide more info on the subject. &lt;br /&gt;
&lt;br /&gt;
To run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 02_EQ_BSE_kernel_diag.in -J EQ_BSE&lt;br /&gt;
&lt;br /&gt;
After the calculation has finished, the absorption spectra can be plotted with the following: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; gnuplot commands (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gnuplot&lt;br /&gt;
...&lt;br /&gt;
gnuplot&amp;gt; set xlabel &amp;quot;Energy (eV)&amp;quot;&lt;br /&gt;
gnuplot&amp;gt; set ylabel &amp;quot;Absorption&amp;quot; &lt;br /&gt;
gnuplot&amp;gt; plot &#039;o-EQ_BSE.eps_q1_haydock_bse&#039; u 1:2 w l t &#039;-k sex&#039;&lt;br /&gt;
gnuplot&amp;gt; rep  &#039;o-EQ_BSE.eps_q1_haydock_bse&#039; u 1:4 w l t &#039;-k ip&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the following plot will results (the &amp;quot;experimental&amp;quot; and &amp;quot;-k hartree&amp;quot; plots are added additionally for comparison) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; Plot of the computed spectra &amp;lt;/div&amp;gt;&lt;br /&gt;
[[File:Plot of Si absorption spectra.png|900px|frameless|Plots of computed absorption spectra for the equilibrium case.]]&lt;br /&gt;
&lt;br /&gt;
= Generating non-equilibrium carriers =&lt;br /&gt;
To simulate non-equilibrium absorption, we need to define the number of non-equilibrium carriers, specifically electrons in the conduction band and holes in the valence band. These carriers follow the Fermi-Dirac distribution given by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&amp;lt;math&amp;gt;\Large f(E) = 1 / (exp((E - μ) / k_B T) + 1)&amp;lt;/math&amp;gt;--&amp;gt;&lt;br /&gt;
[[File:Fermi dirac distr.png|250px]]&lt;br /&gt;
&lt;br /&gt;
Here:&lt;br /&gt;
* 	E is the energy level,&lt;br /&gt;
* 	&amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt; is the chemical potential (specific to electrons or holes),&lt;br /&gt;
* 	&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; is the effective temperature,&lt;br /&gt;
* 	&amp;lt;math&amp;gt;k_B&amp;lt;/math&amp;gt; is the Boltzmann constant.&lt;br /&gt;
&lt;br /&gt;
For the simulation, both electrons and holes are characterized by their own &amp;lt;math&amp;gt;\mu_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;T_i&amp;lt;/math&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
The distribution of non-equilibrium carriers can be generated using Yambo’s post processing for real-time module (&amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt;), which allows modeling of these conditions.&lt;br /&gt;
&lt;br /&gt;
To generate to non-equilibrium carriers databases create &amp;lt;code&amp;gt;input_ypp1 input_ypp2&amp;lt;/code&amp;gt; files, with the following content: &lt;br /&gt;
&lt;br /&gt;
 ypp_rt -rtdb f -F input_ypp1&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp1 (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RTDBs                      	# [R] Real-Time databases&lt;br /&gt;
Select_Fermi               	# [R] NEQ DBs according to Fermi distribution&lt;br /&gt;
% RTBands&lt;br /&gt;
   1 | 30 |               	# [RT] Bands range&lt;br /&gt;
%&lt;br /&gt;
% RTmuEh&lt;br /&gt;
-0.223 | 0.10 | eV  	        # [RT] Chemical potentials hole | electron&lt;br /&gt;
%&lt;br /&gt;
% RTtempEh&lt;br /&gt;
 0.08 	| 0.08 	| eV  	    # [RT] Effective temperature hole | electron&lt;br /&gt;
%&lt;br /&gt;
RTautotuneThr= 0.000100    	# [RT] Threshold to match no. of pumped holes and electrons.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 ypp_rt -rtplot o -rtmode e -F input_ypp2&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp2 (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RealTime                   	# [R] Real-Time Post-Processing&lt;br /&gt;
RToccupations              	# [R] Analize time-dependent occupations&lt;br /&gt;
RTenergy                   	# [R] Post-Processing kind: function of energy&lt;br /&gt;
TimeStep= 0.000000 	fs  	# Time step&lt;br /&gt;
% TimeRange&lt;br /&gt;
-1.000000 |-1.000000 | fs  	# Time-window where processing is done&lt;br /&gt;
%&lt;br /&gt;
#IncludeEQocc              	# [NEGF] Include also equilibrium occupations&lt;br /&gt;
#SkipFermiFIT              	# [NEGF] Do a Fermi Fit of occupations (and lifetimes ratio)&lt;br /&gt;
%QPkrange                	#  generalized Kpoint/Band indices&lt;br /&gt;
  1| 1|  2|7|&lt;br /&gt;
%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And then run the files:&lt;br /&gt;
&lt;br /&gt;
 $ ypp_rt -F input_ypp1 -J carriers -C carriers &lt;br /&gt;
 $ ypp_rt -F input_ypp2 -J carriers -C carriers &lt;br /&gt;
&lt;br /&gt;
The file &amp;lt;code&amp;gt;input_ypp1&amp;lt;/code&amp;gt; will generate a &amp;lt;code&amp;gt;ndb.RT_carriers&amp;lt;/code&amp;gt; database which will contain the Fermi distribution of the electrons and the hole according to the specified chemical potential, &amp;lt;code&amp;gt;RTmuEh&amp;lt;/code&amp;gt;, and for a specific temperature given by &amp;lt;code&amp;gt;RTtempEh&amp;lt;/code&amp;gt;.  The file &amp;lt;code&amp;gt;input_ypp2&amp;lt;/code&amp;gt; will generate a series of databases to plot different different aspects of the distribution.&lt;br /&gt;
&lt;br /&gt;
Plot for the distribution of electrons in conduction band and holes in the valence band generated by the &amp;lt;code&amp;gt;input_ypp1&amp;lt;/code&amp;gt; and data file made by &amp;lt;code&amp;gt;input_ypp2&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--[[File:Plot occupation kgrid8 neq silicon.png|900px|frameless|center]]--&amp;gt; &lt;br /&gt;
[[File:Plot occupation kgrid8 neq silicon 2.png|900px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
This plot can be generated from the &amp;lt;code&amp;gt;carriers&amp;lt;/code&amp;gt; folder using the following gnuplot script [[Gnuplot scripts|plot_occupations.gnu]]&lt;br /&gt;
&lt;br /&gt;
= Energy shift in the band structure =&lt;br /&gt;
&lt;br /&gt;
The GW method is the standard approach to compute quasi-particle corrections. However, in presence of non-equilibrium carriers, or even at finite temperature the formulation of the GW self-energy needs to be refined. This is due to its frequency dependence, which results in extra terms when performing the analytic continuation from the Keldish contour (non-equilibrium case) or from the Matsubara axis (finite temperature case) to the real time/frequency axis. See for example this reference &amp;lt;ref name=&amp;quot;faleev2006&amp;quot;/&amp;gt; for the finite temperature case.&lt;br /&gt;
On the other hand the COHSEX self-energy, being static, avoids this complication. This is why we will compute changes in the QP corrections within the COHSEX approximation.&lt;br /&gt;
&lt;br /&gt;
To compute the Non-Equilibrium Absorption Spectra, we need to diagonalize a previously defined two-particle Hamiltonian. To account for the Non-Equilibrium effect, the Kohn-Sham energies, &amp;lt;math&amp;gt;\varepsilon_{c\mathbf{k}}, \varepsilon_{v\mathbf{k}}&amp;lt;/math&amp;gt;, calculated at the DFT level, need to be corrected. This requires calculating the following: COHSEX self-energy at equilibrium, COHSEX self-energy at non-equilibrium, and Equilibrium GW self-energy at Plasmon-Pole Approximation level.&lt;br /&gt;
&lt;br /&gt;
Using these, the energy correction, &amp;lt;math&amp;gt;\varepsilon^{corr,neq}&amp;lt;/math&amp;gt;, can be computed as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Large \varepsilon^{corr,neq}_{c\mathbf{k}} = \varepsilon^{GW,eq}_{c\mathbf{k}} + (\varepsilon^{cohsex,neq}_{c\mathbf{k}} - \varepsilon^{cohsex,eq}_{c\mathbf{k}})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The KS energies will be corrected as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Large \varepsilon^{KS,neq}_{c\mathbf{k}} = \varepsilon_{c\mathbf{k}} + \varepsilon^{corr,neq}_{c\mathbf{k}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These corrected KS energies will be used when diagonalizing the two-particle Hamiltonian.&lt;br /&gt;
&lt;br /&gt;
== COHSEX corrections at equilibrium ==&lt;br /&gt;
To make a COHSEX calculation at equilibrium, we do the following: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -p c -F 03_eq_cohsex.in &lt;br /&gt;
&lt;br /&gt;
which will create a file with the following content: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_eq_cohsex.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 gw0                              # [R] GW approximation&lt;br /&gt;
 cohsex                           # [R][Xp] COlumb Hole Screened EXchange&lt;br /&gt;
 dyson                            # [R] Dyson Equation solver&lt;br /&gt;
 el_el_corr                       # [R] Electron-Electron Correlation&lt;br /&gt;
 HF_and_locXC                     # [R] Hartree-Fock&lt;br /&gt;
 em1s                             # [R][Xs] Statically Screened Interaction&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 SE_Threads=0                     # [OPENMP/GW] Number of threads for self-energy&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 EXXRLvcs= 15             Ry    # [XX] Exchange    RL components&lt;br /&gt;
 VXCRLvcs= 15             Ry    # [XC] XCpotential RL components&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 Chimod= &amp;quot;HARTREE&amp;quot;                # [X] IP/Hartree/ALDA/LRC/PF/BSfxc&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 |  30 |                         # [Xs] Polarization function bands &lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXs= 3                Ry    # [Xs] Response block size&lt;br /&gt;
 UseEbands&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
   1 | 40 |                   # [GW] G[W] bands range&lt;br /&gt;
 %&amp;lt;/span&amp;gt;&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;%QPkrange                        # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 1|1|2|7|&lt;br /&gt;
 %&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;EXXRLvcs&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;VXCRLvcs&amp;lt;/code&amp;gt; were increased up to 15 Ry, due to the fact that computation of terms to which those cut-offs correspond, is not computationally demanding. The number of Polarization function bands, &amp;lt;code&amp;gt;BndsRnXs&amp;lt;/code&amp;gt; was changed to &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt;, and the quasi-particles generalized Kpoint and Band indices,&amp;lt;code&amp;gt;QPkrange&amp;lt;/code&amp;gt;, was changed from &amp;lt;code&amp;gt;1|29|1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1|1|2|7&amp;lt;/code&amp;gt;. Additionally the following lines were added &lt;br /&gt;
 UseEbands&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
   1 | 40 |                   # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
to force Yambo to do a calculation where self-energy depends on the conduction bands too, or this is also known as [https://wiki.yambo-code.eu/wiki/index.php?title=Silicon COHSEX with empty bands]. Alternatively, an option option &amp;lt;code&amp;gt;-V qp&amp;lt;/code&amp;gt; can be added when generating the file, but it will include a lot of redundant variables. &lt;br /&gt;
&lt;br /&gt;
And after it we run the file with the following command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 03_eq_cohsex.in -J cohsex_eq_emp -C cohsex_eq_emp&lt;br /&gt;
&lt;br /&gt;
We can plot the &amp;lt;code&amp;gt;o-cohsex_eq_emp.qp&amp;lt;/code&amp;gt; file from the &amp;lt;code&amp;gt;cohsex_eq_emp&amp;lt;/code&amp;gt; folder, to find out the gap opening due to the COHSEX correction. The plot can be done using the [[Gnuplot scripts|plot_qp_energies.gnu]]. &lt;br /&gt;
&lt;br /&gt;
[[File:Band opening eq cohsex plot.png|800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The points used to calculate band opening are: (0.000000, -1.034067) and (1.608910, -0.449499), which corresponds to an opening of 0.584568 eV.&lt;br /&gt;
&lt;br /&gt;
== COHSEX corrections in presence of non-equilibrium carriers ==&lt;br /&gt;
Before making a COHSEX calculation, we need to recalculate the static screening in the presence of non-equilibrium carriers. After it, we can make a COHSEX calculation in the presence of non-equilibrium carriers using the &amp;lt;code&amp;gt;ndb.RT_carriers&amp;lt;/code&amp;gt; database generated in the previous step with the &amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt; module. To do this, we do the following: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -p c -F 03_neq_cohsex.in &lt;br /&gt;
&lt;br /&gt;
where we need to add the following lines: &lt;br /&gt;
&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 GfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
&lt;br /&gt;
and the resulting file is: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_neq_cohsex.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 gw0                              # [R] GW approximation&lt;br /&gt;
 cohsex                           # [R][Xp] COlumb Hole Screened EXchange&lt;br /&gt;
 dyson                            # [R] Dyson Equation solver&lt;br /&gt;
 el_el_corr                       # [R] Electron-Electron Correlation&lt;br /&gt;
 HF_and_locXC                     # [R] Hartree-Fock&lt;br /&gt;
 em1s                             # [R][Xs] Statically Screened Interaction&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 SE_Threads=0                     # [OPENMP/GW] Number of threads for self-energy&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 EXXRLvcs= 15             Ry    # [XX] Exchange    RL components&lt;br /&gt;
 VXCRLvcs= 15             Ry    # [XC] XCpotential RL components&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 Chimod= &amp;quot;HARTREE&amp;quot;                # [X] IP/Hartree/ALDA/LRC/PF/BSfxc&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 % BndsRnXs&lt;br /&gt;
    1 |  30 |                         # [Xs] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 UseEbands&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
   1 | 40 |                   # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 GfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 NGsBlkXs= 3                Ry    # [Xs] Response block size&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % LongDrXs&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [Xs] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 %QPkrange                        # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
 1|1|2|7|&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we added the respective two lines with &amp;lt;code&amp;gt;XfnRTdb&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;GfnRTdb&amp;lt;/code&amp;gt;, and made changes to &amp;lt;code&amp;gt;BndsRnXs&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;QPkrange&amp;lt;/code&amp;gt; similar to the equilibrium case. Additionally, we added the lines to force Yambo to do a COHSEX calculation with empty bands. &lt;br /&gt;
&lt;br /&gt;
The line &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; em1s                             # [R][Xs] Statically Screened Interaction&lt;br /&gt;
&lt;br /&gt;
will tell Yambo to make the static screening calculation, and the lines:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; gw0                              # [R] GW approximation&lt;br /&gt;
 &amp;gt; cohsex                           # [R][Xp] COlumb Hole Screened EXchange&lt;br /&gt;
&lt;br /&gt;
will tell Yambo to do make a COHSEX calculation. &lt;br /&gt;
&lt;br /&gt;
After it we can run the file with the command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 03_neq_cohsex.in -J cohsex_neq -C cohsex_neq&lt;br /&gt;
&lt;br /&gt;
We can plot &amp;lt;code&amp;gt;o-cohsex_neq.qp&amp;lt;/code&amp;gt; file from the &amp;lt;code&amp;gt;cohsex_neq&amp;lt;/code&amp;gt; folder, to find the gap opening due the COHSEX correction and the non-equilibrium distribution of the carriers. The plot can be done using the [[Gnuplot scripts|plot_qp_energies.gnu]].&lt;br /&gt;
&lt;br /&gt;
[[File:Band opening neq cohsex plot.png .png|800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The points to calculate band opening are (0.000000, -0.882580), and (1.608910, -0.535269), which correspond to an opening of 0.347311 eV.&lt;br /&gt;
&lt;br /&gt;
== GW PPA corrections for the equilibrium case ==&lt;br /&gt;
&lt;br /&gt;
This subchapter can be skipped, and replaced by using scissors operator when diagonalizing the two particle Hamiltonian. &lt;br /&gt;
&lt;br /&gt;
To get accurate values for the band gap value we need to go beyond COHSEX approximation. Therefore we will obtain the Quasi-particle corrections in the plasmon pole approximation for equilibrium case, and in next steps, to this value we will add the correction calculated at COHSEX approximation to account for the non-equilibrium state of the system. &lt;br /&gt;
&lt;br /&gt;
To make this calculation, we do the following: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -p p -F 03_eq_qp_ppa.in &lt;br /&gt;
&lt;br /&gt;
which will create a file with the following content: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_eq_qp_ppa.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 gw0                              # [R] GW approximation&lt;br /&gt;
 ppa                              # [R][Xp] Plasmon Pole Approximation for the Screened Interaction&lt;br /&gt;
 el_el_corr                       # [R] Electron-Electron Correlation&lt;br /&gt;
 HF_and_locXC                     # [R] Hartree-Fock&lt;br /&gt;
 em1d                             # [R][X] Dynamically Screened Interaction&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 SE_Threads=0                     # [OPENMP/GW] Number of threads for self-energy&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 EXXRLvcs= 15             Ry    # [XX] Exchange    Ry components&lt;br /&gt;
 VXCRLvcs= 15             Ry    # [XC] XCpotential Ry components&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 Chimod= &amp;quot;HARTREE&amp;quot;                # [X] IP/Hartree/ALDA/LRC/PF/BSfxc&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
    1 |  30 |                         # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt; &lt;br /&gt;
 NGsBlkXp= 3                Ry    # [Xp] Response block size&lt;br /&gt;
 % LongDrXp&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [Xp] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 PPAPntXp= 27.21138         eV    # [Xp] PPA imaginary energy&lt;br /&gt;
  &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;  &lt;br /&gt;
 % GbndRnge&lt;br /&gt;
    1 |  40 |                         # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt; &lt;br /&gt;
 GTermKind= &amp;quot;none&amp;quot;                # [GW] GW terminator (&amp;quot;none&amp;quot;,&amp;quot;BG&amp;quot; Bruneval-Gonze,&amp;quot;BRS&amp;quot; Berger-Reining-Sottile)&lt;br /&gt;
 DysSolver= &amp;quot;n&amp;quot;                   # [GW] Dyson Equation solver (&amp;quot;n&amp;quot;,&amp;quot;s&amp;quot;,&amp;quot;g&amp;quot;,&amp;quot;q&amp;quot;)&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 %QPkrange                        # [GW] QP generalized Kpoint/Band indices &lt;br /&gt;
 1|1|2|7|&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;       &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the following changes have been made: the number of polarization function bands, &amp;lt;code&amp;gt;BndsRnXp&amp;lt;/code&amp;gt; was changed to &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt;, the G[W] bands range, &amp;lt;code&amp;gt;GbndRnge&amp;lt;/code&amp;gt; was changed from &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1|40&amp;lt;/code&amp;gt;, and quasi-particle generalized k points  and band indices, &amp;lt;code&amp;gt;QPkrange&amp;lt;/code&amp;gt; was changed from &amp;lt;code&amp;gt;1|29|1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1|1|2|7&amp;lt;/code&amp;gt;. And after it we run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 03_eq_qp_ppa.in -J gw_eq -C gw_eq&lt;br /&gt;
&lt;br /&gt;
We can plot the &amp;lt;code&amp;gt;o-gw_eq.qp&amp;lt;/code&amp;gt; file from the &amp;lt;code&amp;gt;eq_gw_bse&amp;lt;/code&amp;gt; folder, to find out the gap opening due to the plasmon-pole approximation. The plot can be done using the [[Gnuplot scripts|plot_qp_energies.gnu]]. &lt;br /&gt;
&lt;br /&gt;
[[File:O gw eq qp plot.png|800px|frameless]]&lt;br /&gt;
&lt;br /&gt;
The points used to calculated band opening are (0, -0.045932), and (1.608910, 0.456526), which correspond to an opening of 0.502458 eV. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;(OPTIONAL)&#039;&#039;&#039; Additionally, after computing the QP corrections those can be used during the BSE corrections.  To do it, we create file similar to the [[Nonequilibrium absorption in bulk silicon|Solving the Bethe-Salpeter equation]], where we do not add the scissors line, but we add &amp;lt;code&amp;gt;KfnQPdb= &amp;quot;E &amp;lt; gw_eq/ndb.QP&amp;quot;&amp;lt;/code&amp;gt;. &lt;br /&gt;
The final file will look like &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 03_eq_bse.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 15             Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 #WehCpl                        # [BSK] eh interaction included also in coupling&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %  &lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; &lt;br /&gt;
 % BSEBands&lt;br /&gt;
   2 |  7 |                           # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 % BEnRange&lt;br /&gt;
  2.200000 | 5.000000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt; &lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 % &lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; gw_eq/ndb.QP&amp;quot;&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
 #WRbsWF                        # [BSS] Write to disk excitonic the WFs     &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and we run this file by typing: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 03_eq_bse.in -J &amp;quot;eq_gw_bse,gw_eq&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Data post-processing ==&lt;br /&gt;
Now after obtaining all the energy components that we need to calculate corrections to Kohn-Sham energies for the Non-Equilibrium case, we can manipulate them using the yambo&#039;s real time post processing module, &amp;lt;code&amp;gt;ypp_rt&amp;lt;/code&amp;gt;. We want to obtain energies defined by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Large \varepsilon^{corr,neq}_{c\mathbf{k}} = \varepsilon^{GW,eq}_{c\mathbf{k}} + (\varepsilon^{cohsex,neq}_{c\mathbf{k}} - \varepsilon^{cohsex,eq}_{c\mathbf{k}})&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Therefore we create a yambo post processing file with the following contents: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp3 (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
QPDBs                      	# [R] Quasi-particle databases&lt;br /&gt;
QPDB_merge                 	# [R] Mergering&lt;br /&gt;
%Actions_and_names       	# [QPDB] QP databases and Actions (format is &amp;quot;what&amp;quot;|&amp;quot;OP&amp;quot;|&amp;quot;prefactor&amp;quot;|&amp;quot;DB&amp;quot;|). OP can be ±/x.&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_neq/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;-&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_eq_emp/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;Z&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;gw_eq/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;gw_eq/ndb.QP&amp;quot; |&lt;br /&gt;
%       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we tell ypp to take from the quasi particle correction databases the values of &amp;lt;math&amp;gt;\varepsilon^{cohsex,neq}_{c\mathbf{k}}&amp;lt;/math&amp;gt; subtract from them &amp;lt;math&amp;gt;\varepsilon^{cohsex,eq}_{c\mathbf{k}}&amp;lt;/math&amp;gt;, multiply the resulting value by &amp;lt;code&amp;gt;?????&amp;lt;/code&amp;gt;  and add it to &amp;lt;math&amp;gt;\varepsilon^{GW,eq}_{c\mathbf{k}}&amp;lt;/math&amp;gt; and save them in the the new database &amp;lt;code&amp;gt;ndb.QP_merged_1_gw_cohsex_gw_ppa&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
We run the file by the following command: &lt;br /&gt;
&lt;br /&gt;
 $ ypp_rt -F input_ypp3 -J QP_merge -C QP_merge&lt;br /&gt;
&lt;br /&gt;
Or alternatively, if no calculation for the quasiparticle correction has been made (except the COHSEX calculation), and a scissors operator is going to be used, we can use the following yambo post processing file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; input_ypp3_scissors (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
QPDBs                      	# [R] Quasi-particle databases&lt;br /&gt;
QPDB_merge                 	# [R] Mergering&lt;br /&gt;
%Actions_and_names       	# [QPDB] QP databases and Actions (format is &amp;quot;what&amp;quot;|&amp;quot;OP&amp;quot;|&amp;quot;prefactor&amp;quot;|&amp;quot;DB&amp;quot;|). OP can be ±/x.&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;+&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_neq/ndb.QP&amp;quot; |&lt;br /&gt;
 &amp;quot;E&amp;quot; | &amp;quot;-&amp;quot; | &amp;quot;1&amp;quot; | &amp;quot;cohsex_eq_emp/ndb.QP&amp;quot; |&lt;br /&gt;
%  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which will just take from the quasi particle correction databases the values of &amp;lt;math&amp;gt;\varepsilon^{cohsex,neq}_{c\mathbf{k}}&amp;lt;/math&amp;gt; subtract from them &amp;lt;math&amp;gt;\varepsilon^{cohsex,eq}_{c\mathbf{k}}&amp;lt;/math&amp;gt;. And we run this file by: &lt;br /&gt;
&lt;br /&gt;
 $ ypp_rt -F input_ypp3_scissors -J QP_merge_scissor -C QP_merge_scissor&lt;br /&gt;
&lt;br /&gt;
= Renormalization of the exciton binding energy =&lt;br /&gt;
&lt;br /&gt;
We finally perform a BSE calculation loading both the nonequilibrium carriers and the quasi-particle energy shifts. The Non-Equilibrium Hamiltonian is: &lt;br /&gt;
&lt;br /&gt;
[[File:Neq h.png|310px|frameless|left]] &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Where quantities entering into the hamiltonian are the non-equilibrium counterparts of the quantities discussion for the EQ Hamiltonian, and &amp;lt;math&amp;gt;\tau&amp;lt;/math&amp;gt; is the pump probe delay. The &amp;lt;math&amp;gt;\Delta \epsilon^{\tau}_l&amp;lt;/math&amp;gt; is the difference between non-equilibrium COHSEX and equilibrium COHSEX energy (calculated in the COHSEX chapter). &lt;br /&gt;
&lt;br /&gt;
We create a file using the following command: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -o b -y h -F 04_neq_bse.in&lt;br /&gt;
&lt;br /&gt;
== With GW qp corrections ==&lt;br /&gt;
&lt;br /&gt;
Compared to the equilibrium case we add the lines:&lt;br /&gt;
&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge/ndb.QP_merged_1_gw_cohsex_gw_ppa&amp;quot;&lt;br /&gt;
&lt;br /&gt;
the resulting structure of the file is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 04_neq_bse.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions &lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 3             Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 #WehCpl                        # [BSK] eh interaction included also in coupling&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
   2 |  7 |                           # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BEnRange&lt;br /&gt;
  2.200000 | 5.000000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge/ndb.QP_merged_1_gw_cohsex_gw_ppa&amp;quot;&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
 #WRbsWF                        # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we added the lines, and changed the bands range, &amp;lt;code&amp;gt;BSEBands&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2|7&amp;lt;/code&amp;gt;, energy range, &amp;lt;code&amp;gt;BEnRange&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;0.00000 | 10.00000 &amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2.00000 | 10.00000 |&amp;lt;/code&amp;gt; and energy steps, &amp;lt;code&amp;gt;BEnSteps&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;100&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;200&amp;lt;/code&amp;gt;. And we run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 04_neq_bse.in -J &amp;quot;neq_bse,gw_eq&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Alternatively, when scissors are used, the lines can be added, to account for the lack of a proper GW correction.&lt;br /&gt;
&lt;br /&gt;
The final plot from the calculations presented in this tutorial, for k-grid 8x8x8, with NEQ BSE with QP corrections, EQ BSE with QP corrections (not presented in this tutorial), and Experimental Data looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--[[File:NEQ2 abs bulk silicon tutorial plot results kgrid8.png|800px|frameless|center]]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[[File:Plot results kgrid8 7ry.png|800px|frameless|center]]--&amp;gt;&lt;br /&gt;
[[File:Plot results kgrid8 15 3ry.png||800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
In case, a better convergence is needed, a 16x16x16 k-grid can be used. To decrease computational time, the GW corrections can be done on lower grid, whereas solving the BSE equation can be done on higher k-grids. And for the 16x16x16 k-grid the plot looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Neq abs bulk silicon plot kgrid16.png|800px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
The plots can be done using [[Gnuplot scripts|plot_absorbance.gnu]] gnuplot script.&lt;br /&gt;
&lt;br /&gt;
== With scissor corrections ==&lt;br /&gt;
&lt;br /&gt;
Compared to the equilibrium case we just add the lines below:&lt;br /&gt;
&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge_scissor/ndb.QP_merged_1_gw_cohsex&amp;quot;&lt;br /&gt;
&lt;br /&gt;
the resulting structure of the file is (lines for nonequilibrium simulations added in red):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:900px; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt; 04_neq_bse_scissors.in (Expandable) &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 bss                              # [R] BSE solver&lt;br /&gt;
 optics                           # [R] Linear Response optical properties&lt;br /&gt;
 dipoles                          # [R] Oscillator strenghts (or dipoles)&lt;br /&gt;
 bse                              # [R][BSE] Bethe Salpeter Equation.&lt;br /&gt;
 DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 X_Threads=0                      # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions&lt;br /&gt;
 BSKmod= &amp;quot;SEX&amp;quot;                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc&lt;br /&gt;
 BSEmod= &amp;quot;resonant&amp;quot;               # [BSE] resonant/retarded/coupling&lt;br /&gt;
 BSSmod= &amp;quot;h&amp;quot;                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BSENGexx= 3             Ry    # [BSK] Exchange components&lt;br /&gt;
 BSENGBlk=-1                RL    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]&lt;br /&gt;
 #WehCpl                        # [BSK] eh interaction included also in coupling&lt;br /&gt;
 % KfnQP_E&lt;br /&gt;
  0.700000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
 XfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnRTdb= &amp;quot;f @ 0. ps &amp;lt; carriers/ndb.RT_carriers&amp;quot;&lt;br /&gt;
 KfnQPdb= &amp;quot;E &amp;lt; QP_merge/ndb.QP_merged_1_gw_cohsex&amp;quot;&lt;br /&gt;
 RTOccMode=&amp;quot;KR&amp;quot; &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BSEQptR&lt;br /&gt;
  1 | 1 |                             # [BSK] Transferred momenta range&lt;br /&gt;
 %&lt;br /&gt;
 % BSEBands&lt;br /&gt;
    2 |  7 |                         # [BSK] Bands range&lt;br /&gt;
 %&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 % BEnRange&lt;br /&gt;
   2.20000 | 5.00000 |         eV    # [BSS] Energy range&lt;br /&gt;
 %&amp;lt;/span&amp;gt;&lt;br /&gt;
 % BDmRange&lt;br /&gt;
  0.100000 | 0.100000 |         eV    # [BSS] Damping range&lt;br /&gt;
 %&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
 BEnSteps= 200                    # [BSS] Energy steps&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
 % BLongDir&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field versor&lt;br /&gt;
 %&lt;br /&gt;
 BSEprop= &amp;quot;abs&amp;quot;                   # [BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt&lt;br /&gt;
 BSEdips= &amp;quot;none&amp;quot;                  # [BSS] Can be &amp;quot;trace/none&amp;quot; or &amp;quot;xy/xz/yz&amp;quot; to define off-diagonal rotation plane&lt;br /&gt;
 #WRbsWF                        # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where we added the lines, and changed the bands range, &amp;lt;code&amp;gt;BSEBands&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;1|50&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2|7&amp;lt;/code&amp;gt;, energy range, &amp;lt;code&amp;gt;BEnRange&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;0.00000 | 10.00000 &amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;2.20000 | 5.00000 |&amp;lt;/code&amp;gt; and energy steps, &amp;lt;code&amp;gt;BEnSteps&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;100&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;200&amp;lt;/code&amp;gt;.  And we run the file: &lt;br /&gt;
&lt;br /&gt;
 $ yambo_rt -F 04_neq_bse_sciss.in -J &amp;quot;neq_bse,gw_eq&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;sangalli2016&amp;quot;&amp;gt;D. Sangalli, S. Dal Conte, C. Manzoni, G. Cerullo, and A. Marini, [https://doi.org/10.1103/PhysRevB.93.195205 Phis. Rev. &#039;&#039;&#039;B 93&#039;&#039;&#039;, 195205 (2016)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;faleev2006&amp;quot;&amp;gt;S. V. Faleev, M. van Schilfgaarde, T. Kotani, F. Léonard, and M. P. Desjarlais, [https://doi.org/10.1103/PhysRevB.74.033101 Phys. Rev. &#039;&#039;&#039;B 74&#039;&#039;&#039;, 033101 (2006)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Davide</name></author>
	</entry>
</feed>