<?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=Myrta</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=Myrta"/>
	<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Special:Contributions/Myrta"/>
	<updated>2026-05-19T05:46:28Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_solver:_diagonalization&amp;diff=4938</id>
		<title>Bethe-Salpeter solver: diagonalization</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_solver:_diagonalization&amp;diff=4938"/>
		<updated>2021-04-14T12:54:33Z</updated>

		<summary type="html">&lt;p&gt;Myrta: /* Bethe-Salpeter solver runlevel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this module, you learn how to obtain an optical absorption spectrum within the Bethe-Salpeter equation (BSE) framework by diagonalizing a previously calculated Bethe-Salpeter (BS) kernel.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning&#039;&#039;&#039;: for this demonstration, we did not use converged parameters (in particular they are not converged for the k-grid). Note that one needs to converge carefully all parameters to obtain scientific relevant results. This will be the topic of [[How to choose the input parameters | one of the next tutorials]]. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
==Prerequisites==&lt;br /&gt;
[[File:Yambo-handbook-v4.1.2-p-15.png|thumb|Cheatsheet on BSS diagonalization|150px]]&lt;br /&gt;
* You must first complete the [[Static screening]] and [[Bethe-Salpeter kernel]] modules&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* The &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; databases for 3D hBN&lt;br /&gt;
* The &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; directory containing the databases from the [[Static screening]] and [[Bethe-Salpeter kernel]] modules&lt;br /&gt;
* The &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt; executable&lt;br /&gt;
* &amp;lt;code&amp;gt;gnuplot&amp;lt;/code&amp;gt; for plotting spectra&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The macroscopic dielectric function (from which the absorption and EEL spectra can be computed) is obtained from the eigenvalues &#039;&#039;E&#039;&#039;&amp;lt;sub&amp;gt;&amp;amp;lambda;&amp;lt;/sub&amp;gt; (excitonic energies) and eigenvectors A&amp;lt;sup&amp;gt;&amp;amp;lambda;&amp;lt;/sup&amp;gt;&amp;lt;sub&amp;gt;&#039;&#039;cv&#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt; (exciton composition in terms of electron-hole pairs) of the two-particle Hamiltonian:&lt;br /&gt;
&lt;br /&gt;
[[File:BSE1-Eq4.png|none|x50px]]&lt;br /&gt;
&lt;br /&gt;
To get the two-particle Hamiltonian eigensolutions you need to diagonalize the two-particle Hamiltonian (non-spin-polarized case):&lt;br /&gt;
&lt;br /&gt;
[[File:BSE1-Eq1.png|none|x50px]]&lt;br /&gt;
&lt;br /&gt;
for which the &#039;&#039;2V - W&#039;&#039; part was evaluated in the [[Bethe-Salpeter kernel]] module.&lt;br /&gt;
&lt;br /&gt;
The difference of quasiparticle energies &#039;&#039;&amp;amp;Delta;&amp;amp;epsilon;&amp;lt;sub&amp;gt;cv&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;= &amp;amp;epsilon;&amp;lt;sub&amp;gt;c&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt; - &amp;amp;epsilon;&amp;lt;sub&amp;gt;v&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;&#039;&#039; is added to the matrix just before the solver. &lt;br /&gt;
There are two possible choices:&lt;br /&gt;
* the Kohn-Sham energies (calculated at DFT level) are corrected through a scissor and the renormalization of the conduction and valence bandwidth (linearly for the conduction band minimum and the valence band maximum respectively):&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&amp;amp;Delta;&amp;amp;epsilon;&amp;lt;sub&amp;gt;cv&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;= M&amp;lt;sub&amp;gt;c&amp;lt;/sub&amp;gt;(&amp;amp;epsilon;&amp;lt;sub&amp;gt;c&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;KS&amp;lt;/sup&amp;gt; - CBM) - M&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;(&amp;amp;epsilon;&amp;lt;sub&amp;gt;v&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;KS&amp;lt;/sup&amp;gt; - VBM) + Scissor&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
* the quasiparticle energies calculated at [[How to obtain the quasi-particle band structure of a bulk material: h-BN|GW level]] are used (see [[Bethe-Salpeter on top of quasiparticle energies|next tutorial]]. Missing energies are computed by interpolation.&lt;br /&gt;
&lt;br /&gt;
==Choosing the input parameters==&lt;br /&gt;
&lt;br /&gt;
Invoke yambo with the &amp;quot;-y d&amp;quot; option in the command line. Also add &amp;quot;-V qp&amp;quot; to set qp corrections:&lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 03_3D_BSE_diago_solver.in -y d -V qp -J 3D_BSE&lt;br /&gt;
&lt;br /&gt;
The input is open in the editor. The input variable to be changed are &lt;br /&gt;
 % [[Variables#BEnRange|BEnRange]]&lt;br /&gt;
   2.00000 | 8.00000 | eV    &lt;br /&gt;
 %&lt;br /&gt;
 [[Variables#BEnSteps|BEnSteps]]= 200      &lt;br /&gt;
 &lt;br /&gt;
which define 200 evenly spaced points between 2 and 8 eV at which the spectrum is calculated (&amp;amp;omega; in the equation for the macroscopic dielectric function),&lt;br /&gt;
  &lt;br /&gt;
 % [[Variables#BDmRange|BDmRange]]&lt;br /&gt;
   0.10000 |  0.10000 | eV    &lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
which defines the spectral broadening (Lorentzian model), &lt;br /&gt;
&lt;br /&gt;
 % [[Variables#BLongDir|BLongDir]]&lt;br /&gt;
  1.000000 | 1.000000 | 0.000000 | &lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
which defines the direction of the perturbing electric field (in this case the in-plane direction).&lt;br /&gt;
&lt;br /&gt;
Another parameter to modify is&lt;br /&gt;
 % [[Variables#KfnQP_E|KfnQP_E]] &lt;br /&gt;
  1.440000 | 1.000000 | 1.000000 |&lt;br /&gt;
 %&lt;br /&gt;
This gives the quasiparticle corrections to the Kohn-Sham eigenvalues and is deduced either from experiment or previous [[How to obtain the quasi-particle band structure of a bulk material: h-BN|GW calculations]]. &lt;br /&gt;
With reference to the equation in the Background, the format is&lt;br /&gt;
  &#039;&#039;Scissor&#039;&#039; | &#039;&#039;M&amp;lt;sub&amp;gt;c&amp;lt;/sub&amp;gt;&#039;&#039; | &#039;&#039;M&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;&#039;&#039; |&lt;br /&gt;
The alternative of directly input corrections calculated from a previous GW calculation is shown in the [[Bethe-Salpeter on top of quasiparticle energies|next section]].&lt;br /&gt;
&lt;br /&gt;
To analyse the exciton composition and plot the exciton wave function in the [[How to analyse excitons - CECAM 2021 school|postprocessing tutorial]], you &#039;&#039;&#039;must uncomment&#039;&#039;&#039; the following flag:&lt;br /&gt;
 WRbsWF                        # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: Only when this flag is uncommented, Yambo writes on disk the eigenvectors A&amp;lt;sup&amp;gt;&amp;amp;lambda;&amp;lt;/sup&amp;gt;&amp;lt;sub&amp;gt;&#039;&#039;cv&#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt; (exciton composition in terms of electron-hole pairs).&lt;br /&gt;
&lt;br /&gt;
==Bethe-Salpeter solver runlevel== &lt;br /&gt;
 $ yambo -F 03_3D_BSE_diago_solver.in -J 3D_BSE  &lt;br /&gt;
In the log (either in standard output or in &amp;lt;code&amp;gt;l-3D_BSE_optics_dipoles_bss_bse&amp;lt;/code&amp;gt;), after various setup/loading, the BSE is diagonalized using the linked linear algebra libraries: &lt;br /&gt;
 &amp;lt;---&amp;gt; [03] BSE solver(s) @q1&lt;br /&gt;
 &amp;lt;---&amp;gt; [LA] SERIAL linear algebra&lt;br /&gt;
 &amp;lt;---&amp;gt; [03.01] Diago Solver @q1&lt;br /&gt;
 &amp;lt;---&amp;gt; BSK diagonalize |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; EPS R residuals |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; BSK resp. funct |########################################| [100%] --(E) --(X)&lt;br /&gt;
&lt;br /&gt;
The report &amp;lt;code&amp;gt;r-3D_BSE_optics_dipoles_bss_bse&amp;lt;/code&amp;gt; contains information relative to this runlevel in section 3:&lt;br /&gt;
&lt;br /&gt;
 [03] BSE solver(s) @q1&lt;br /&gt;
 ======================&lt;br /&gt;
&lt;br /&gt;
Take some time to inspect the log and the report to check the consistency with the input variables. This run produces a new database in the 3D_BSE directory&lt;br /&gt;
 3D_BSE/ndb.BS_diago_Q01&lt;br /&gt;
So if you need the spectrum on a different energy range, direction, with a different broadening or more points the diagonalization is not repeated, just the spectrum is recalculated.&lt;br /&gt;
Note that this database, as well as any other netCDF-format database produced by Yambo, can be directly accessed and read using [[First steps in Yambopy| python modules]].&lt;br /&gt;
    &lt;br /&gt;
This run produces as well human readable files (o-*). Specifically &amp;lt;code&amp;gt;o-3D_BSE.eps_q1_diago_bse&amp;lt;/code&amp;gt; contains the real and imaginary part of the macroscopic dielectric function &lt;br /&gt;
  &lt;br /&gt;
 $ less o-3D_BSE.eps_q1_diago_bse &lt;br /&gt;
 ...&lt;br /&gt;
 #&lt;br /&gt;
 #  E/ev[1]    EPS-Im[2]  EPS-Re[3]  EPSo-Im[4] EPSo-Re[5]&lt;br /&gt;
 #&lt;br /&gt;
   2.00000    0.16162    5.83681    0.04959    4.14127&lt;br /&gt;
   2.03015    0.16787    5.88612    0.05090    4.15638&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
which is in the format &lt;br /&gt;
 Energy in eV | Imaginary part BSE | Real part BSE |Imaginary part IPA | Real part IPA |  &lt;br /&gt;
&lt;br /&gt;
where real and imaginary parts refer to the macroscopic dielectric function. The imaginary part is related to optical absorption. The latter (column 2) can be plotted versus the photon energy (column 1) and compared with the independent particle approximation (IPA, column 4), e.g.: &lt;br /&gt;
 &lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 ...&lt;br /&gt;
 plot &#039;o-3D_BSE.eps_q1_diago_bse&#039; u 1:2 w l t &#039;BSE&#039;, &#039;o-3D_BSE.eps_q1_diago_bse&#039; u 1:4 w l  t &#039;IPA&#039;&lt;br /&gt;
&lt;br /&gt;
[[file:03_bse_diago.png |none|600px]]&lt;br /&gt;
The addition of the kernel has the effect to red-shift the spectrum onset and redistribute the oscillator strengths. &lt;br /&gt;
&lt;br /&gt;
Note that these calculations are not converged with respect to the k-point grid. The low energy peaks in the IPA are an artefact of poor convergence with k-points producing artificial confinement. Carrying out the convergence for k-points would smooth out these peak in the IPA spectrum to give the shoulder corresponding to the van Hove singularity in the band structure. On the other hand, the low energy peak in the BSE is genuine and it is the signature of a bound exciton. This will appear more clearly in [[How to choose the input parameters | one of the next tutorials]] where we will perform the convergence with the k points.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
From this tutorial you&#039;ve learned:&lt;br /&gt;
* How to compute the optical spectrum by using the diagonal solver within the Bethe-Salpeter equation framework&lt;br /&gt;
&lt;br /&gt;
==Navigate==&lt;br /&gt;
&lt;br /&gt;
* Previous module: [[Bethe-Salpeter kernel]]&lt;br /&gt;
* Next module: [[Bethe-Salpeter on top of quasiparticle energies]]&lt;br /&gt;
* Alternative Bethe-Salpeter equation solver: [[Bethe-Salpeter solver: Lanczos-Haydock | Lanczos-Haydock]] &lt;br /&gt;
* Alternative Bethe-Salpeter equation solver: [[Bethe-Salpeter solver: SLEPC | Slepc]] &lt;br /&gt;
* Exciton analysis: [[How to analyse excitons - CECAM 2021 school]]&lt;br /&gt;
* Back to [[Calculating optical spectra including excitonic effects: a step-by-step guide]] tutorial&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_solver:_diagonalization&amp;diff=4937</id>
		<title>Bethe-Salpeter solver: diagonalization</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_solver:_diagonalization&amp;diff=4937"/>
		<updated>2021-04-14T12:49:35Z</updated>

		<summary type="html">&lt;p&gt;Myrta: /* Bethe-Salpeter solver runlevel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this module, you learn how to obtain an optical absorption spectrum within the Bethe-Salpeter equation (BSE) framework by diagonalizing a previously calculated Bethe-Salpeter (BS) kernel.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning&#039;&#039;&#039;: for this demonstration, we did not use converged parameters (in particular they are not converged for the k-grid). Note that one needs to converge carefully all parameters to obtain scientific relevant results. This will be the topic of [[How to choose the input parameters | one of the next tutorials]]. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
==Prerequisites==&lt;br /&gt;
[[File:Yambo-handbook-v4.1.2-p-15.png|thumb|Cheatsheet on BSS diagonalization|150px]]&lt;br /&gt;
* You must first complete the [[Static screening]] and [[Bethe-Salpeter kernel]] modules&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* The &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; databases for 3D hBN&lt;br /&gt;
* The &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; directory containing the databases from the [[Static screening]] and [[Bethe-Salpeter kernel]] modules&lt;br /&gt;
* The &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt; executable&lt;br /&gt;
* &amp;lt;code&amp;gt;gnuplot&amp;lt;/code&amp;gt; for plotting spectra&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The macroscopic dielectric function (from which the absorption and EEL spectra can be computed) is obtained from the eigenvalues &#039;&#039;E&#039;&#039;&amp;lt;sub&amp;gt;&amp;amp;lambda;&amp;lt;/sub&amp;gt; (excitonic energies) and eigenvectors A&amp;lt;sup&amp;gt;&amp;amp;lambda;&amp;lt;/sup&amp;gt;&amp;lt;sub&amp;gt;&#039;&#039;cv&#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt; (exciton composition in terms of electron-hole pairs) of the two-particle Hamiltonian:&lt;br /&gt;
&lt;br /&gt;
[[File:BSE1-Eq4.png|none|x50px]]&lt;br /&gt;
&lt;br /&gt;
To get the two-particle Hamiltonian eigensolutions you need to diagonalize the two-particle Hamiltonian (non-spin-polarized case):&lt;br /&gt;
&lt;br /&gt;
[[File:BSE1-Eq1.png|none|x50px]]&lt;br /&gt;
&lt;br /&gt;
for which the &#039;&#039;2V - W&#039;&#039; part was evaluated in the [[Bethe-Salpeter kernel]] module.&lt;br /&gt;
&lt;br /&gt;
The difference of quasiparticle energies &#039;&#039;&amp;amp;Delta;&amp;amp;epsilon;&amp;lt;sub&amp;gt;cv&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;= &amp;amp;epsilon;&amp;lt;sub&amp;gt;c&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt; - &amp;amp;epsilon;&amp;lt;sub&amp;gt;v&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;&#039;&#039; is added to the matrix just before the solver. &lt;br /&gt;
There are two possible choices:&lt;br /&gt;
* the Kohn-Sham energies (calculated at DFT level) are corrected through a scissor and the renormalization of the conduction and valence bandwidth (linearly for the conduction band minimum and the valence band maximum respectively):&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&amp;amp;Delta;&amp;amp;epsilon;&amp;lt;sub&amp;gt;cv&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;= M&amp;lt;sub&amp;gt;c&amp;lt;/sub&amp;gt;(&amp;amp;epsilon;&amp;lt;sub&amp;gt;c&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;KS&amp;lt;/sup&amp;gt; - CBM) - M&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;(&amp;amp;epsilon;&amp;lt;sub&amp;gt;v&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;KS&amp;lt;/sup&amp;gt; - VBM) + Scissor&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
* the quasiparticle energies calculated at [[How to obtain the quasi-particle band structure of a bulk material: h-BN|GW level]] are used (see [[Bethe-Salpeter on top of quasiparticle energies|next tutorial]]. Missing energies are computed by interpolation.&lt;br /&gt;
&lt;br /&gt;
==Choosing the input parameters==&lt;br /&gt;
&lt;br /&gt;
Invoke yambo with the &amp;quot;-y d&amp;quot; option in the command line. Also add &amp;quot;-V qp&amp;quot; to set qp corrections:&lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 03_3D_BSE_diago_solver.in -y d -V qp -J 3D_BSE&lt;br /&gt;
&lt;br /&gt;
The input is open in the editor. The input variable to be changed are &lt;br /&gt;
 % [[Variables#BEnRange|BEnRange]]&lt;br /&gt;
   2.00000 | 8.00000 | eV    &lt;br /&gt;
 %&lt;br /&gt;
 [[Variables#BEnSteps|BEnSteps]]= 200      &lt;br /&gt;
 &lt;br /&gt;
which define 200 evenly spaced points between 2 and 8 eV at which the spectrum is calculated (&amp;amp;omega; in the equation for the macroscopic dielectric function),&lt;br /&gt;
  &lt;br /&gt;
 % [[Variables#BDmRange|BDmRange]]&lt;br /&gt;
   0.10000 |  0.10000 | eV    &lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
which defines the spectral broadening (Lorentzian model), &lt;br /&gt;
&lt;br /&gt;
 % [[Variables#BLongDir|BLongDir]]&lt;br /&gt;
  1.000000 | 1.000000 | 0.000000 | &lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
which defines the direction of the perturbing electric field (in this case the in-plane direction).&lt;br /&gt;
&lt;br /&gt;
Another parameter to modify is&lt;br /&gt;
 % [[Variables#KfnQP_E|KfnQP_E]] &lt;br /&gt;
  1.440000 | 1.000000 | 1.000000 |&lt;br /&gt;
 %&lt;br /&gt;
This gives the quasiparticle corrections to the Kohn-Sham eigenvalues and is deduced either from experiment or previous [[How to obtain the quasi-particle band structure of a bulk material: h-BN|GW calculations]]. &lt;br /&gt;
With reference to the equation in the Background, the format is&lt;br /&gt;
  &#039;&#039;Scissor&#039;&#039; | &#039;&#039;M&amp;lt;sub&amp;gt;c&amp;lt;/sub&amp;gt;&#039;&#039; | &#039;&#039;M&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;&#039;&#039; |&lt;br /&gt;
The alternative of directly input corrections calculated from a previous GW calculation is shown in the [[Bethe-Salpeter on top of quasiparticle energies|next section]].&lt;br /&gt;
&lt;br /&gt;
To analyse the exciton composition and plot the exciton wave function in the [[How to analyse excitons - CECAM 2021 school|postprocessing tutorial]], you &#039;&#039;&#039;must uncomment&#039;&#039;&#039; the following flag:&lt;br /&gt;
 WRbsWF                        # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: Only when this flag is uncommented, Yambo writes on disk the eigenvectors A&amp;lt;sup&amp;gt;&amp;amp;lambda;&amp;lt;/sup&amp;gt;&amp;lt;sub&amp;gt;&#039;&#039;cv&#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt; (exciton composition in terms of electron-hole pairs).&lt;br /&gt;
&lt;br /&gt;
==Bethe-Salpeter solver runlevel== &lt;br /&gt;
 $ yambo -F 03_3D_BSE_diago_solver.in -J 3D_BSE  &lt;br /&gt;
In the log (either in standard output or in &amp;lt;code&amp;gt;l-3D_BSE_optics_dipoles_bss_bse&amp;lt;/code&amp;gt;), after various setup/loading, the BSE is diagonalized using the linked linear algebra libraries: &lt;br /&gt;
 &amp;lt;---&amp;gt; [03] BSE solver(s) @q1&lt;br /&gt;
 &amp;lt;---&amp;gt; [LA] SERIAL linear algebra&lt;br /&gt;
 &amp;lt;---&amp;gt; [03.01] Diago Solver @q1&lt;br /&gt;
 &amp;lt;---&amp;gt; BSK diagonalize |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; EPS R residuals |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; BSK resp. funct |########################################| [100%] --(E) --(X)&lt;br /&gt;
&lt;br /&gt;
The report &amp;lt;code&amp;gt;r-3D_BSE_optics_dipoles_bss_bse&amp;lt;/code&amp;gt; contains information relative to this runlevel in section 3:&lt;br /&gt;
&lt;br /&gt;
 [03] BSE solver(s) @q1&lt;br /&gt;
 ======================&lt;br /&gt;
&lt;br /&gt;
Take some time to inspect the log and the report to check the consistency with the input variables. This run produces a new database in the 3D_BSE directory&lt;br /&gt;
 3D_BSE/ndb.BS_diago_Q01&lt;br /&gt;
So if you need the spectrum on a different energy range, direction, with a different broadening or more points the diagonalization is not repeated, just the spectrum is recalculated.&lt;br /&gt;
Note that this database, as well as any other netCDF-format database produced by Yambo, can be directly accessed and read using [[First steps in Yambopy| python modules]].&lt;br /&gt;
    &lt;br /&gt;
This run produces as well human readable files (o-*). Specifically &amp;lt;code&amp;gt;o-3D_BSE.eps_q1_diago_bse&amp;lt;/code&amp;gt; contains the real and imaginary part of the macroscopic dielectric function &lt;br /&gt;
  &lt;br /&gt;
 $ less o-3D_BSE.eps_q1_diago_bse &lt;br /&gt;
 ...&lt;br /&gt;
 #&lt;br /&gt;
 #  E/ev[1]    EPS-Im[2]  EPS-Re[3]  EPSo-Im[4] EPSo-Re[5]&lt;br /&gt;
 #&lt;br /&gt;
   2.00000    0.16162    5.83681    0.04959    4.14127&lt;br /&gt;
   2.03015    0.16787    5.88612    0.05090    4.15638&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
which is in the format &lt;br /&gt;
 Energy in eV | Imaginary part BSE | Real part BSE |Imaginary part IPA | Real part IPA |  &lt;br /&gt;
&lt;br /&gt;
where real and imaginary parts refer to the macroscopic dielectric function. The imaginary part is related to optical absorption. The latter (column 2) can be plotted versus the photon energy (column 1) and compared with the independent particle approximation (IPA, column 4), e.g.: &lt;br /&gt;
 &lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 ...&lt;br /&gt;
 plot &#039;o-3D_BSE.eps_q1_diago_bse&#039; u 1:2 w l t &#039;BSE&#039;, &#039;o-3D_BSE.eps_q1_diago_bse&#039; u 1:5 w l  t &#039;IPA&#039;&lt;br /&gt;
&lt;br /&gt;
[[file:03_bse_diago.png |none|600px]]&lt;br /&gt;
The addition of the kernel has the effect to red-shift the spectrum onset and redistribute the oscillator strengths. &lt;br /&gt;
&lt;br /&gt;
Note that these calculations are not converged with respect to the k-point grid. The low energy peaks in the IPA are an artefact of poor convergence with k-points producing artificial confinement. Carrying out the convergence for k-points would smooth out these peak in the IPA spectrum to give the shoulder corresponding to the van Hove singularity in the band structure. On the other hand, the low energy peak in the BSE is genuine and it is the signature of a bound exciton. This will appear more clearly in [[How to choose the input parameters | one of the next tutorials]] where we will perform the convergence with the k points.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
From this tutorial you&#039;ve learned:&lt;br /&gt;
* How to compute the optical spectrum by using the diagonal solver within the Bethe-Salpeter equation framework&lt;br /&gt;
&lt;br /&gt;
==Navigate==&lt;br /&gt;
&lt;br /&gt;
* Previous module: [[Bethe-Salpeter kernel]]&lt;br /&gt;
* Next module: [[Bethe-Salpeter on top of quasiparticle energies]]&lt;br /&gt;
* Alternative Bethe-Salpeter equation solver: [[Bethe-Salpeter solver: Lanczos-Haydock | Lanczos-Haydock]] &lt;br /&gt;
* Alternative Bethe-Salpeter equation solver: [[Bethe-Salpeter solver: SLEPC | Slepc]] &lt;br /&gt;
* Exciton analysis: [[How to analyse excitons - CECAM 2021 school]]&lt;br /&gt;
* Back to [[Calculating optical spectra including excitonic effects: a step-by-step guide]] tutorial&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=BSE_solvers_overview&amp;diff=4920</id>
		<title>BSE solvers overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=BSE_solvers_overview&amp;diff=4920"/>
		<updated>2021-04-13T08:32:47Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial explores the options available in Yambo for the numerical solution of the Bethe-Salpeter equation. Before running this tutorial, you should have carried out the tutorial &#039;&#039;&#039;[[Calculating optical spectra including excitonic effects: a step-by-step guide]]&#039;&#039;&#039;. We will use the same example system (bulk hBN). The various options correspond to different numerical methods for solving (large) eigenvalue problems. The numerical methods are not covered in this tutorial and the interested user is directed to the references.&lt;br /&gt;
&lt;br /&gt;
After completion of this tutorial, you are expected to recognize which solver to use depending on the system, computational load and desired output. Also, for each of the solver, you should be able to choose the values for the key input parameters. &lt;br /&gt;
&lt;br /&gt;
Three main solvers are available in Yambo:&lt;br /&gt;
__TOC__&lt;br /&gt;
===Full diagonalization solver===&lt;br /&gt;
Diagonalization of the full Hamiltonian using the standard LAPACK library.  &lt;br /&gt;
&lt;br /&gt;
This solver outputs the macroscopic dielectric function over a range of energies chosen by the user. It also calculates all exciton energies and composition in terms of electron-hole pairs. Upon user&#039;s choice, the latter is stored on disk for use in postprocessing for exciton analysis and plotting as seen in the tutorial &#039;&#039;&#039;[[How to analyse excitons - CECAM 2021 school|How to analyse excitons]]&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, the computational cost of full diagonalization is cubic in the number of electron-hole pairs so this solver can be used for small system only (few light atoms per unit cell).   &lt;br /&gt;
 &lt;br /&gt;
You should&#039;ve already carry out the  &#039;&#039;&#039;[[Bethe-Salpeter solver: diagonalization]]&#039;&#039;&#039;. If you wish, you can run again this part and then &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Lanczos-Haydock solver===&lt;br /&gt;
Subspace iterative [https://en.wikipedia.org/wiki/Lanczos_algorithm/| Lanczos algorithm] which by-pass diagonalization with the Haydock approach&amp;lt;ref&amp;gt;R. Haydock, in&lt;br /&gt;
 &#039;&#039;Solid State Phys.&#039;&#039;, &#039;&#039;&#039;35&#039;&#039;&#039; 215 (1980) edited by H. Ehrenfest, F. Seitz, and D. Turnbull, Academic Press&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This solver outputs the macroscopic dielectric function over a range of energies chosen by the user. It can be applied to medium-large systems as it is substantially cheaper than the full diagonalization (quadratic with the number of electron-hole pairs). However, this approach &#039;&#039;does not provide&#039;&#039; the individual exciton energies and composition in terms of electron-hole pairs.&lt;br /&gt;
&lt;br /&gt;
Follow the link to &#039;&#039;&#039;[[Bethe-Salpeter solver: Lanczos-Haydock]]&#039;&#039;&#039; then  &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
===SLEPc solver ===&lt;br /&gt;
Subspace iterative algorithm using the [https://slepc.upv.es SLEPc library]&amp;lt;ref&amp;gt;V. Hernandez, J.E. Roman and V. Vidal in &#039;&#039; ACM Transactions on Mathematical Software&#039;&#039;, &#039;&#039;&#039;31&#039;&#039;&#039; 315 (2005)&amp;lt;/ref&amp;gt; (SLEPC solver).&lt;br /&gt;
&lt;br /&gt;
This solver outputs the individual exciton energies and composition about an energy value chosen by the user. It can be applied to medium-large systems but does not provide the overall spectrum. This solver is typically used after obtaining the spectra from the Lanczos-Haydock solver to either analyze a specific peak or getting the energy and composition of a few low-lying excitons. It can be used for large-medium systems. The computational cost grows with the number of excitons one asks to compute.  &lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Optional:&#039;&#039;&#039;&lt;br /&gt;
Advanced users can recompile Yambo with the &#039;&#039;--enable-slepc-linalg&#039;&#039; option if they hadn&#039;t done so. &lt;br /&gt;
If/Once you have a Yambo version compiled with the SLEPc, or you have the Virtual Machine or the Docker (with the yambo-gcc_openmp_petsc [[CECAM_VIRTUAL_2021 | container]]), follow the link to &#039;&#039;&#039;[[Bethe-Salpeter solver: SLEPC]]&#039;&#039;&#039; then  &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
To summarise, the output (dielectric function, exciton energies and composition) and cost of the three solvers are summarized in this table.&lt;br /&gt;
&lt;br /&gt;
[[File:Solver.png|Yambo tutorial image]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Navigate==&lt;br /&gt;
* Back to [[BSE hBN Yambo Virtual 2021 version|BSE tutorial sections]]&lt;br /&gt;
* Back to [[CECAM VIRTUAL 2021]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
&lt;br /&gt;
=References =&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=BSE_solvers_overview&amp;diff=4919</id>
		<title>BSE solvers overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=BSE_solvers_overview&amp;diff=4919"/>
		<updated>2021-04-13T08:31:52Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial explores the options available in Yambo for the numerical solution of the Bethe-Salpeter equation. Before running this tutorial, you should have carried out the tutorial &#039;&#039;&#039;[[Calculating optical spectra including excitonic effects: a step-by-step guide]]&#039;&#039;&#039;. We will use the same example system (bulk hBN). The various options correspond to different numerical methods for solving (large) eigenvalue problems. The numerical methods are not covered in this tutorial and the interested user is directed to the references.&lt;br /&gt;
&lt;br /&gt;
After completion of this tutorial, you are expected to recognize which solver to use depending on the system, computational load and desired output. Also, for each of the solver, you should be able to choose the values for the key input parameters. &lt;br /&gt;
&lt;br /&gt;
Three main solvers are available in Yambo:&lt;br /&gt;
__TOC__&lt;br /&gt;
===Full diagonalization solver===&lt;br /&gt;
Diagonalization of the full Hamiltonian using the standard LAPACK library.  &lt;br /&gt;
&lt;br /&gt;
This solver outputs the macroscopic dielectric function over a range of energies chosen by the user. It also calculates all exciton energies and composition in terms of electron-hole pairs. Upon user&#039;s choice, the latter is stored on disk for use in postprocessing for exciton analysis and plotting as seen in the tutorial &#039;&#039;&#039;[[How to analyse excitons - CECAM 2021 school|How to analyse excitons]]&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, the computational cost of full diagonalization is cubic in the number of electron-hole pairs so this solver can be used for small system only (few light atoms per unit cell).   &lt;br /&gt;
 &lt;br /&gt;
You should&#039;ve already carry out the  &#039;&#039;&#039;[[Bethe-Salpeter solver: diagonalization]]&#039;&#039;&#039;. If you wish, you can run again this part and then &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Lanczos-Haydock solver===&lt;br /&gt;
Subspace iterative [https://en.wikipedia.org/wiki/Lanczos_algorithm/| Lanczos algorithm] which by-pass diagonalization with the Haydock approach&amp;lt;ref&amp;gt;R. Haydock, in&lt;br /&gt;
 &#039;&#039;Solid State Phys.&#039;&#039;, &#039;&#039;&#039;35&#039;&#039;&#039; 215 (1980) edited by H. Ehrenfest, F. Seitz, and D. Turnbull, Academic Press&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This solver outputs the macroscopic dielectric function over a range of energies chosen by the user. It can be applied to medium-large systems as it is substantially cheaper than the full diagonalization (quadratic with the number of electron-hole pairs). However, this approach &#039;&#039;does not provide&#039;&#039; the individual exciton energies and composition in terms of electron-hole pairs.&lt;br /&gt;
&lt;br /&gt;
Follow the link to &#039;&#039;&#039;[[Bethe-Salpeter solver: Lanczos-Haydock]]&#039;&#039;&#039; then  &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
===SLEPc solver ===&lt;br /&gt;
Subspace iterative algorithm using the [https://slepc.upv.es SLEPc library]&amp;lt;ref&amp;gt;V. Hernandez, J.E. Roman and V. Vidal in &#039;&#039; ACM Transactions on Mathematical Software&#039;&#039;, &#039;&#039;&#039;31&#039;&#039;&#039; 315 (2005)&amp;lt;/ref&amp;gt; (SLEPC solver).&lt;br /&gt;
&lt;br /&gt;
This solver outputs the individual exciton energies and composition about an energy value chosen by the user. It can be applied to medium-large systems but does not provide the overall spectrum. This solver is typically used after obtaining the spectra from the Lanczos-Haydock solver to either analyze a specific peak or getting the energy and composition of a few low-lying excitons. It can be used for large-medium systems. The computational cost grows with the number of excitons one asks to compute.  &lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Optional:&#039;&#039;&#039;&lt;br /&gt;
Advanced users can recompile Yambo with the &#039;&#039;--enable-slepc-linalg&#039;&#039; option if they hadn&#039;t done so. &lt;br /&gt;
If/Once you have a Yambo version compiled with the SLEPc, or you have the Virtual Machine or the Docker (with the yambo-gcc_openmp_petsc [[container | CECAM_VIRTUAL_2021]]), follow the link to &#039;&#039;&#039;[[Bethe-Salpeter solver: SLEPC]]&#039;&#039;&#039; then  &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
To summarise, the output (dielectric function, exciton energies and composition) and cost of the three solvers are summarized in this table.&lt;br /&gt;
&lt;br /&gt;
[[File:Solver.png|Yambo tutorial image]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Navigate==&lt;br /&gt;
* Back to [[BSE hBN Yambo Virtual 2021 version|BSE tutorial sections]]&lt;br /&gt;
* Back to [[CECAM VIRTUAL 2021]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
&lt;br /&gt;
=References =&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=BSE_solvers_overview&amp;diff=4918</id>
		<title>BSE solvers overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=BSE_solvers_overview&amp;diff=4918"/>
		<updated>2021-04-13T08:30:09Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial explores the options available in Yambo for the numerical solution of the Bethe-Salpeter equation. Before running this tutorial, you should have carried out the tutorial &#039;&#039;&#039;[[Calculating optical spectra including excitonic effects: a step-by-step guide]]&#039;&#039;&#039;. We will use the same example system (bulk hBN). The various options correspond to different numerical methods for solving (large) eigenvalue problems. The numerical methods are not covered in this tutorial and the interested user is directed to the references.&lt;br /&gt;
&lt;br /&gt;
After completion of this tutorial, you are expected to recognize which solver to use depending on the system, computational load and desired output. Also, for each of the solver, you should be able to choose the values for the key input parameters. &lt;br /&gt;
&lt;br /&gt;
Three main solvers are available in Yambo:&lt;br /&gt;
__TOC__&lt;br /&gt;
===Full diagonalization solver===&lt;br /&gt;
Diagonalization of the full Hamiltonian using the standard LAPACK library.  &lt;br /&gt;
&lt;br /&gt;
This solver outputs the macroscopic dielectric function over a range of energies chosen by the user. It also calculates all exciton energies and composition in terms of electron-hole pairs. Upon user&#039;s choice, the latter is stored on disk for use in postprocessing for exciton analysis and plotting as seen in the tutorial &#039;&#039;&#039;[[How to analyse excitons - CECAM 2021 school|How to analyse excitons]]&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, the computational cost of full diagonalization is cubic in the number of electron-hole pairs so this solver can be used for small system only (few light atoms per unit cell).   &lt;br /&gt;
 &lt;br /&gt;
You should&#039;ve already carry out the  &#039;&#039;&#039;[[Bethe-Salpeter solver: diagonalization]]&#039;&#039;&#039;. If you wish, you can run again this part and then &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Lanczos-Haydock solver===&lt;br /&gt;
Subspace iterative [https://en.wikipedia.org/wiki/Lanczos_algorithm/| Lanczos algorithm] which by-pass diagonalization with the Haydock approach&amp;lt;ref&amp;gt;R. Haydock, in&lt;br /&gt;
 &#039;&#039;Solid State Phys.&#039;&#039;, &#039;&#039;&#039;35&#039;&#039;&#039; 215 (1980) edited by H. Ehrenfest, F. Seitz, and D. Turnbull, Academic Press&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This solver outputs the macroscopic dielectric function over a range of energies chosen by the user. It can be applied to medium-large systems as it is substantially cheaper than the full diagonalization (quadratic with the number of electron-hole pairs). However, this approach &#039;&#039;does not provide&#039;&#039; the individual exciton energies and composition in terms of electron-hole pairs.&lt;br /&gt;
&lt;br /&gt;
Follow the link to &#039;&#039;&#039;[[Bethe-Salpeter solver: Lanczos-Haydock]]&#039;&#039;&#039; then  &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
===SLEPc solver ===&lt;br /&gt;
Subspace iterative algorithm using the [https://slepc.upv.es SLEPc library]&amp;lt;ref&amp;gt;V. Hernandez, J.E. Roman and V. Vidal in &#039;&#039; ACM Transactions on Mathematical Software&#039;&#039;, &#039;&#039;&#039;31&#039;&#039;&#039; 315 (2005)&amp;lt;/ref&amp;gt; (SLEPC solver).&lt;br /&gt;
&lt;br /&gt;
This solver outputs the individual exciton energies and composition about an energy value chosen by the user. It can be applied to medium-large systems but does not provide the overall spectrum. This solver is typically used after obtaining the spectra from the Lanczos-Haydock solver to either analyze a specific peak or getting the energy and composition of a few low-lying excitons. It can be used for large-medium systems. The computational cost grows with the number of excitons one asks to compute.  &lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Optional:&#039;&#039;&#039;&lt;br /&gt;
Advanced users can recompile Yambo with the &#039;&#039;--enable-slepc-linalg&#039;&#039; option if they hadn&#039;t done so. &lt;br /&gt;
If/Once you have a Yambo version compiled with the SLEPc, or you have the Virtual Machine or the Docker (), follow the link to &#039;&#039;&#039;[[Bethe-Salpeter solver: SLEPC]]&#039;&#039;&#039; then  &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
To summarise, the output (dielectric function, exciton energies and composition) and cost of the three solvers are summarized in this table.&lt;br /&gt;
&lt;br /&gt;
[[File:Solver.png|Yambo tutorial image]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Navigate==&lt;br /&gt;
* Back to [[BSE hBN Yambo Virtual 2021 version|BSE tutorial sections]]&lt;br /&gt;
* Back to [[CECAM VIRTUAL 2021]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
&lt;br /&gt;
=References =&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=BSE_solvers_overview&amp;diff=4815</id>
		<title>BSE solvers overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=BSE_solvers_overview&amp;diff=4815"/>
		<updated>2021-04-06T15:44:32Z</updated>

		<summary type="html">&lt;p&gt;Myrta: /* SLEPc solver */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial explores the options available in Yambo for the numerical solution of the Bethe-Salpeter equation. Before running this tutorial, you should have carried out the tutorial &#039;&#039;&#039;[[Calculating optical spectra including excitonic effects: a step-by-step guide]]&#039;&#039;&#039;. We will use the same example system (bulk hBN). The various options correspond to different numerical methods for solving (large) eigenvalue problems. The numerical methods are not covered in this tutorial and the interested user is directed to the references.&lt;br /&gt;
&lt;br /&gt;
After completion of this tutorial, you are expected to recognize which solver to use depending on the system, computational load and desired output. Also, for each of the solver, you should be able to choose the values for the key input parameters. &lt;br /&gt;
&lt;br /&gt;
Three main solvers are available in Yambo:&lt;br /&gt;
__TOC__&lt;br /&gt;
===Full diagonalization solver===&lt;br /&gt;
Diagonalization of the full Hamiltonian using the standard LAPACK library.  &lt;br /&gt;
&lt;br /&gt;
This solver outputs the macroscopic dielectric function over a range of energies chosen by the user. It also calculates all exciton energies and composition in terms of electron-hole pairs. Upon user&#039;s choice, the latter is stored on disk for use in postprocessing for exciton analysis and plotting as seen in the tutorial &#039;&#039;&#039;[[How to analyse excitons - CECAM 2021 school|How to analyse excitons]]&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, the computational cost of full diagonalization is cubic in the number of electron-hole pairs so this solver can be used for small system only (few light atoms per unit cell).   &lt;br /&gt;
 &lt;br /&gt;
You should&#039;ve already carry out the  &#039;&#039;&#039;[[Bethe-Salpeter solver: diagonalization]]&#039;&#039;&#039;. If you wish, you can run again this part and then &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Lanczos-Haydock solver===&lt;br /&gt;
Subspace iterative [https://en.wikipedia.org/wiki/Lanczos_algorithm/| Lanczos algorithm] which by-pass diagonalization with the Haydock approach&amp;lt;ref&amp;gt;R. Haydock, in&lt;br /&gt;
 &#039;&#039;Solid State Phys.&#039;&#039;, &#039;&#039;&#039;35&#039;&#039;&#039; 215 (1980) edited by H. Ehrenfest, F. Seitz, and D. Turnbull, Academic Press&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This solver outputs the macroscopic dielectric function over a range of energies chosen by the user. It can be applied to medium-large systems as it is substantially cheaper than the full diagonalization (quadratic with the number of electron-hole pairs). However, this approach &#039;&#039;does not provide&#039;&#039; the individual exciton energies and composition in terms of electron-hole pairs.&lt;br /&gt;
&lt;br /&gt;
Follow the link to &#039;&#039;&#039;[[Bethe-Salpeter solver: Lanczos-Haydock]]&#039;&#039;&#039; then  &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
===SLEPc solver ===&lt;br /&gt;
Subspace iterative algorithm using the [https://slepc.upv.es SLEPc library]&amp;lt;ref&amp;gt;V. Hernandez, J.E. Roman and V. Vidal in &#039;&#039; ACM Transactions on Mathematical Software&#039;&#039;, &#039;&#039;&#039;31&#039;&#039;&#039; 315 (2005)&amp;lt;/ref&amp;gt; (SLEPC solver).&lt;br /&gt;
&lt;br /&gt;
This solver outputs the individual exciton energies and composition about an energy value chosen by the user. It can be applied to medium-large systems but does not provide the overall spectrum. This solver is typically used after obtaining the spectra from the Lanczos-Haydock solver to either analyze a specific peak or getting the energy and composition of a few low-lying excitons. It can be used for large-medium systems. The computational cost grows with the number of excitons one asks to compute.  &lt;br /&gt;
 &lt;br /&gt;
The SLEPc is currently not included in the default installation, so this option is not available on the docker or the Yambo installation with default compilation options.&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Optional:&#039;&#039;&#039;&lt;br /&gt;
Advanced users can recompile Yambo with the &#039;&#039;--enable-slepc-linalg&#039;&#039; option. &lt;br /&gt;
If/Once you have a Yambo version compiled with the SLEPc, or you have the Virtual Machine, follow the link to [[Bethe-Salpeter solver: SLEPC]] then  &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
To summarise, the output (dielectric function, exciton energies and composition) and cost of the three solvers are summarized in this table.&lt;br /&gt;
&lt;br /&gt;
[[File:Solver.png|Yambo tutorial image]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Navigate==&lt;br /&gt;
* Back to [[BSE hBN Yambo Virtual 2021 version|BSE tutorial sections]]&lt;br /&gt;
* Back to [[CECAM VIRTUAL 2021]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
&lt;br /&gt;
=References =&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=BSE_solvers_overview&amp;diff=4731</id>
		<title>BSE solvers overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=BSE_solvers_overview&amp;diff=4731"/>
		<updated>2021-04-03T13:51:02Z</updated>

		<summary type="html">&lt;p&gt;Myrta: /* SLEPc solver */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial explores the options available in Yambo for the numerical solution of the Bethe-Salpeter equation. Before running this tutorial, you should have carried out the tutorial &#039;&#039;&#039;[[Calculating optical spectra including excitonic effects: a step-by-step guide]]&#039;&#039;&#039;. We will use the same example system (bulk hBN). The various options correspond to different numerical methods for solving (large) eigenvalue problems. The numerical methods are not covered in this tutorial and the interested user is directed to the references.&lt;br /&gt;
&lt;br /&gt;
After completion of this tutorial, you are expected to recognize which solver to use depending on the system, computational load and desired output. Also, for each of the solver, you should be able to choose the values for the key input parameters. &lt;br /&gt;
&lt;br /&gt;
Three main solvers are available in Yambo:&lt;br /&gt;
__TOC__&lt;br /&gt;
===Full diagonalization solver===&lt;br /&gt;
Diagonalization of the full Hamiltonian using the standard LAPACK library.  &lt;br /&gt;
&lt;br /&gt;
This solver outputs the macroscopic dielectric function over a range of energies chosen by the user. It also calculates all exciton energies and composition in terms of electron-hole pairs. Upon user&#039;s choice, the latter is stored on disk for use in postprocessing for exciton analysis and plotting as seen in the tutorial &#039;&#039;&#039;[[How to analyse excitons - CECAM 2021 school|How to analyse excitons]]&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, the computational cost of full diagonalization is cubic in the number of electron-hole pairs so this solver can be used for small system only (few light atoms per unit cell).   &lt;br /&gt;
 &lt;br /&gt;
You should&#039;ve already carry out the  &#039;&#039;&#039;[[Bethe-Salpeter solver: diagonalization]]&#039;&#039;&#039;. If you wish, you can run again this part and then &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Lanczos-Haydock solver===&lt;br /&gt;
Subspace iterative [https://en.wikipedia.org/wiki/Lanczos_algorithm/| Lanczos algorithm] which by-pass diagonalization with the Haydock approach&amp;lt;ref&amp;gt;R. Haydock, in&lt;br /&gt;
 &#039;&#039;Solid State Phys.&#039;&#039;, &#039;&#039;&#039;35&#039;&#039;&#039; 215 (1980) edited by H. Ehrenfest, F. Seitz, and D. Turnbull, Academic Press&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This solver outputs the macroscopic dielectric function over a range of energies chosen by the user. It can be applied to medium-large systems as it is substantially cheaper than the full diagonalization (quadratic with the number of electron-hole pairs). However, this approach &#039;&#039;does not provide&#039;&#039; the individual exciton energies and composition in terms of electron-hole pairs.&lt;br /&gt;
&lt;br /&gt;
Follow the link to &#039;&#039;&#039;[[Bethe-Salpeter solver: Lanczos-Haydock]]&#039;&#039;&#039; then  &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
===SLEPc solver ===&lt;br /&gt;
Subspace iterative algorithm using the [https://slepc.upv.es SLEPc library]&amp;lt;ref&amp;gt;V. Hernandez, J.E. Roman and V. Vidal in &#039;&#039; ACM Transactions on Mathematical Software&#039;&#039;, &#039;&#039;&#039;31&#039;&#039;&#039; 315 (2005)&amp;lt;/ref&amp;gt; (SLEPC solver).&lt;br /&gt;
&lt;br /&gt;
This solver outputs the individual exciton energies and composition about an energy value chosen by the user. It can be applied to medium-large systems but does not provide the overall spectrum. This solver is typically used after obtaining the spectra from the Lanczos-Haydock solver to either analyze a specific peak or getting the energy and composition of a few low-lying excitons. It can be used for large-medium systems. The computational cost grows with the number of excitons one asks to compute.  &lt;br /&gt;
 &lt;br /&gt;
The SLEPc is currently not included in the default installation, so this option is not available on the Virtual Machine, the docker or the Yambo installation with default compilation options.&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Optional:&#039;&#039;&#039;&lt;br /&gt;
Advanced users can recompile Yambo with the &#039;&#039;--enable-slepc-linalg&#039;&#039; option. &lt;br /&gt;
If/Once you have a Yambo version compiled with the SLEPc, follow the link to [[Bethe-Salpeter solver: SLEPC]] then  &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
To summarise, the output (dielectric function, exciton energies and composition) and cost of the three solvers are summarized in this table.&lt;br /&gt;
&lt;br /&gt;
[[File:Solver.png|Yambo tutorial image]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Navigate==&lt;br /&gt;
* Back to [[BSE hBN Yambo Virtual 2021 version|BSE tutorial sections]]&lt;br /&gt;
* Back to [[CECAM VIRTUAL 2021]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
&lt;br /&gt;
=References =&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=BSE_solvers_overview&amp;diff=4730</id>
		<title>BSE solvers overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=BSE_solvers_overview&amp;diff=4730"/>
		<updated>2021-04-03T13:48:37Z</updated>

		<summary type="html">&lt;p&gt;Myrta: /* SLEPc solver [advanced] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial explores the options available in Yambo for the numerical solution of the Bethe-Salpeter equation. Before running this tutorial, you should have carried out the tutorial &#039;&#039;&#039;[[Calculating optical spectra including excitonic effects: a step-by-step guide]]&#039;&#039;&#039;. We will use the same example system (bulk hBN). The various options correspond to different numerical methods for solving (large) eigenvalue problems. The numerical methods are not covered in this tutorial and the interested user is directed to the references.&lt;br /&gt;
&lt;br /&gt;
After completion of this tutorial, you are expected to recognize which solver to use depending on the system, computational load and desired output. Also, for each of the solver, you should be able to choose the values for the key input parameters. &lt;br /&gt;
&lt;br /&gt;
Three main solvers are available in Yambo:&lt;br /&gt;
__TOC__&lt;br /&gt;
===Full diagonalization solver===&lt;br /&gt;
Diagonalization of the full Hamiltonian using the standard LAPACK library.  &lt;br /&gt;
&lt;br /&gt;
This solver outputs the macroscopic dielectric function over a range of energies chosen by the user. It also calculates all exciton energies and composition in terms of electron-hole pairs. Upon user&#039;s choice, the latter is stored on disk for use in postprocessing for exciton analysis and plotting as seen in the tutorial &#039;&#039;&#039;[[How to analyse excitons - CECAM 2021 school|How to analyse excitons]]&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, the computational cost of full diagonalization is cubic in the number of electron-hole pairs so this solver can be used for small system only (few light atoms per unit cell).   &lt;br /&gt;
 &lt;br /&gt;
You should&#039;ve already carry out the  &#039;&#039;&#039;[[Bethe-Salpeter solver: diagonalization]]&#039;&#039;&#039;. If you wish, you can run again this part and then &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Lanczos-Haydock solver===&lt;br /&gt;
Subspace iterative [https://en.wikipedia.org/wiki/Lanczos_algorithm/| Lanczos algorithm] which by-pass diagonalization with the Haydock approach&amp;lt;ref&amp;gt;R. Haydock, in&lt;br /&gt;
 &#039;&#039;Solid State Phys.&#039;&#039;, &#039;&#039;&#039;35&#039;&#039;&#039; 215 (1980) edited by H. Ehrenfest, F. Seitz, and D. Turnbull, Academic Press&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This solver outputs the macroscopic dielectric function over a range of energies chosen by the user. It can be applied to medium-large systems as it is substantially cheaper than the full diagonalization (quadratic with the number of electron-hole pairs). However, this approach &#039;&#039;does not provide&#039;&#039; the individual exciton energies and composition in terms of electron-hole pairs.&lt;br /&gt;
&lt;br /&gt;
Follow the link to &#039;&#039;&#039;[[Bethe-Salpeter solver: Lanczos-Haydock]]&#039;&#039;&#039; then  &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
===SLEPc solver ===&lt;br /&gt;
Subspace iterative algorithm using the [https://slepc.upv.es SLEPc library]&amp;lt;ref&amp;gt;V. Hernandez, J.E. Roman and V. Vidal in &#039;&#039; ACM Transactions on Mathematical Software&#039;&#039;, &#039;&#039;&#039;31&#039;&#039;&#039; 315 (2005)&amp;lt;/ref&amp;gt; (SLEPC solver).&lt;br /&gt;
&lt;br /&gt;
This solver outputs the individual exciton energies and composition about an energy value chosen by the user. It can be applied to medium-large systems but does not provide the overall spectrum. This solver is typically used after obtaining the spectra from the Lanczos-Haydock solver to either analyze a specific peak or getting the energy and composition of a few low-lying excitons. It can be used for large-medium systems. The computational cost grows with the number of excitons one asks to compute.  &lt;br /&gt;
 &lt;br /&gt;
The SLEPc is currently not included in the default installation (VM or docker). Advanced users can recompile Yambo with the &#039;&#039;--enable-slepc-linalg&#039;&#039; option. &lt;br /&gt;
***Optional:***&lt;br /&gt;
If you have a Yambo version compiled with the SLEPc, follow the link to &#039;&#039;&#039;[[Bethe-Salpeter solver: SLEPC]]&#039;&#039;&#039; then  &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
To summarise, the output (dielectric function, exciton energies and composition) and cost of the three solvers are summarized in this table.&lt;br /&gt;
&lt;br /&gt;
[[File:Solver.png|Yambo tutorial image]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Navigate==&lt;br /&gt;
* Back to [[BSE hBN Yambo Virtual 2021 version|BSE tutorial sections]]&lt;br /&gt;
* Back to [[CECAM VIRTUAL 2021]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
&lt;br /&gt;
=References =&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=BSE_solvers_overview&amp;diff=4729</id>
		<title>BSE solvers overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=BSE_solvers_overview&amp;diff=4729"/>
		<updated>2021-04-03T13:46:47Z</updated>

		<summary type="html">&lt;p&gt;Myrta: /* SLEPc solver */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial explores the options available in Yambo for the numerical solution of the Bethe-Salpeter equation. Before running this tutorial, you should have carried out the tutorial &#039;&#039;&#039;[[Calculating optical spectra including excitonic effects: a step-by-step guide]]&#039;&#039;&#039;. We will use the same example system (bulk hBN). The various options correspond to different numerical methods for solving (large) eigenvalue problems. The numerical methods are not covered in this tutorial and the interested user is directed to the references.&lt;br /&gt;
&lt;br /&gt;
After completion of this tutorial, you are expected to recognize which solver to use depending on the system, computational load and desired output. Also, for each of the solver, you should be able to choose the values for the key input parameters. &lt;br /&gt;
&lt;br /&gt;
Three main solvers are available in Yambo:&lt;br /&gt;
__TOC__&lt;br /&gt;
===Full diagonalization solver===&lt;br /&gt;
Diagonalization of the full Hamiltonian using the standard LAPACK library.  &lt;br /&gt;
&lt;br /&gt;
This solver outputs the macroscopic dielectric function over a range of energies chosen by the user. It also calculates all exciton energies and composition in terms of electron-hole pairs. Upon user&#039;s choice, the latter is stored on disk for use in postprocessing for exciton analysis and plotting as seen in the tutorial &#039;&#039;&#039;[[How to analyse excitons - CECAM 2021 school|How to analyse excitons]]&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, the computational cost of full diagonalization is cubic in the number of electron-hole pairs so this solver can be used for small system only (few light atoms per unit cell).   &lt;br /&gt;
 &lt;br /&gt;
You should&#039;ve already carry out the  &#039;&#039;&#039;[[Bethe-Salpeter solver: diagonalization]]&#039;&#039;&#039;. If you wish, you can run again this part and then &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Lanczos-Haydock solver===&lt;br /&gt;
Subspace iterative [https://en.wikipedia.org/wiki/Lanczos_algorithm/| Lanczos algorithm] which by-pass diagonalization with the Haydock approach&amp;lt;ref&amp;gt;R. Haydock, in&lt;br /&gt;
 &#039;&#039;Solid State Phys.&#039;&#039;, &#039;&#039;&#039;35&#039;&#039;&#039; 215 (1980) edited by H. Ehrenfest, F. Seitz, and D. Turnbull, Academic Press&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This solver outputs the macroscopic dielectric function over a range of energies chosen by the user. It can be applied to medium-large systems as it is substantially cheaper than the full diagonalization (quadratic with the number of electron-hole pairs). However, this approach &#039;&#039;does not provide&#039;&#039; the individual exciton energies and composition in terms of electron-hole pairs.&lt;br /&gt;
&lt;br /&gt;
Follow the link to &#039;&#039;&#039;[[Bethe-Salpeter solver: Lanczos-Haydock]]&#039;&#039;&#039; then  &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
===SLEPc solver [advanced]===&lt;br /&gt;
Subspace iterative algorithm using the [https://slepc.upv.es SLEPc library]&amp;lt;ref&amp;gt;V. Hernandez, J.E. Roman and V. Vidal in &#039;&#039; ACM Transactions on Mathematical Software&#039;&#039;, &#039;&#039;&#039;31&#039;&#039;&#039; 315 (2005)&amp;lt;/ref&amp;gt; (SLEPC solver).&lt;br /&gt;
&lt;br /&gt;
This solver outputs the individual exciton energies and composition about an energy value chosen by the user. It can be applied to medium-large systems but does not provide the overall spectrum. This solver is typically used after obtaining the spectra from the Lanczos-Haydock solver to either analyze a specific peak or getting the energy and composition of a few low-lying excitons. It can be used for large-medium systems. The computational cost grows with the number of excitons one asks to compute.  &lt;br /&gt;
 &lt;br /&gt;
The SLEPc is currently not included in the default installation (VM or docker). Advanced users can recompile yambo with the &#039;&#039;--enable-slepc-linalg&#039;&#039; option. If you have a yambo version compiled with the SLEPc, follow the link to &#039;&#039;&#039;[[Bethe-Salpeter solver: SLEPC]]&#039;&#039;&#039; then  &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
To summarise, the output (dielectric function, exciton energies and composition) and cost of the three solvers are summarized in this table.&lt;br /&gt;
&lt;br /&gt;
[[File:Solver.png|Yambo tutorial image]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Navigate==&lt;br /&gt;
* Back to [[BSE hBN Yambo Virtual 2021 version|BSE tutorial sections]]&lt;br /&gt;
* Back to [[CECAM VIRTUAL 2021]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
&lt;br /&gt;
=References =&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=BSE_solvers_overview&amp;diff=4728</id>
		<title>BSE solvers overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=BSE_solvers_overview&amp;diff=4728"/>
		<updated>2021-04-03T13:42:18Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial explores the options available in Yambo for the numerical solution of the Bethe-Salpeter equation. Before running this tutorial, you should have carried out the tutorial &#039;&#039;&#039;[[Calculating optical spectra including excitonic effects: a step-by-step guide]]&#039;&#039;&#039;. We will use the same example system (bulk hBN). The various options correspond to different numerical methods for solving (large) eigenvalue problems. The numerical methods are not covered in this tutorial and the interested user is directed to the references.&lt;br /&gt;
&lt;br /&gt;
After completion of this tutorial, you are expected to recognize which solver to use depending on the system, computational load and desired output. Also, for each of the solver, you should be able to choose the values for the key input parameters. &lt;br /&gt;
&lt;br /&gt;
Three main solvers are available in Yambo:&lt;br /&gt;
__TOC__&lt;br /&gt;
===Full diagonalization solver===&lt;br /&gt;
Diagonalization of the full Hamiltonian using the standard LAPACK library.  &lt;br /&gt;
&lt;br /&gt;
This solver outputs the macroscopic dielectric function over a range of energies chosen by the user. It also calculates all exciton energies and composition in terms of electron-hole pairs. Upon user&#039;s choice, the latter is stored on disk for use in postprocessing for exciton analysis and plotting as seen in the tutorial &#039;&#039;&#039;[[How to analyse excitons - CECAM 2021 school|How to analyse excitons]]&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, the computational cost of full diagonalization is cubic in the number of electron-hole pairs so this solver can be used for small system only (few light atoms per unit cell).   &lt;br /&gt;
 &lt;br /&gt;
You should&#039;ve already carry out the  &#039;&#039;&#039;[[Bethe-Salpeter solver: diagonalization]]&#039;&#039;&#039;. If you wish, you can run again this part and then &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Lanczos-Haydock solver===&lt;br /&gt;
Subspace iterative [https://en.wikipedia.org/wiki/Lanczos_algorithm/| Lanczos algorithm] which by-pass diagonalization with the Haydock approach&amp;lt;ref&amp;gt;R. Haydock, in&lt;br /&gt;
 &#039;&#039;Solid State Phys.&#039;&#039;, &#039;&#039;&#039;35&#039;&#039;&#039; 215 (1980) edited by H. Ehrenfest, F. Seitz, and D. Turnbull, Academic Press&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This solver outputs the macroscopic dielectric function over a range of energies chosen by the user. It can be applied to medium-large systems as it is substantially cheaper than the full diagonalization (quadratic with the number of electron-hole pairs). However, this approach &#039;&#039;does not provide&#039;&#039; the individual exciton energies and composition in terms of electron-hole pairs.&lt;br /&gt;
&lt;br /&gt;
Follow the link to &#039;&#039;&#039;[[Bethe-Salpeter solver: Lanczos-Haydock]]&#039;&#039;&#039; then  &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
===SLEPc solver===&lt;br /&gt;
Subspace iterative algorithm using the [https://slepc.upv.es SLEPc library]&amp;lt;ref&amp;gt;V. Hernandez, J.E. Roman and V. Vidal in &#039;&#039; ACM Transactions on Mathematical Software&#039;&#039;, &#039;&#039;&#039;31&#039;&#039;&#039; 315 (2005)&amp;lt;/ref&amp;gt; (SLEPC solver).&lt;br /&gt;
&lt;br /&gt;
This solver outputs the individual exciton energies and composition about an energy value chosen by the user. It can be applied to medium-large systems but does not provide the overall spectrum. This solver is typically used after obtaining the spectra from the Lanczos-Haydock solver to either analyze a specific peak or getting the energy and composition of a few low-lying excitons. It can be used for large-medium systems. The computational cost grows with the number of excitons one asks to compute.  &lt;br /&gt;
 &lt;br /&gt;
The SLEPc is currently not included in the default installation (VM or docker). Advanced users can recompile yambo with the &#039;&#039;--enable-slepc-linalg&#039;&#039; option. If you have a yambo version compiled with the SLEPc, follow the link to &#039;&#039;&#039;[[Bethe-Salpeter solver: SLEPC]]&#039;&#039;&#039; then  &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
To summarise, the output (dielectric function, exciton energies and composition) and cost of the three solvers are summarized in this table.&lt;br /&gt;
&lt;br /&gt;
[[File:Solver.png|Yambo tutorial image]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Navigate==&lt;br /&gt;
* Back to [[BSE hBN Yambo Virtual 2021 version|BSE tutorial sections]]&lt;br /&gt;
* Back to [[CECAM VIRTUAL 2021]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
&lt;br /&gt;
=References =&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=CECAM_VIRTUAL_2021&amp;diff=4723</id>
		<title>CECAM VIRTUAL 2021</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=CECAM_VIRTUAL_2021&amp;diff=4723"/>
		<updated>2021-04-03T11:03:39Z</updated>

		<summary type="html">&lt;p&gt;Myrta: /* Install Yambo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Plan for the CECAM VIRTUAL 2021 school tutorials.&lt;br /&gt;
https://www.cecam.org/workshop-details/1081&lt;br /&gt;
&lt;br /&gt;
[[File:Cecam_school_program.png|thumb|160px| Click to enlarge the full program]]&lt;br /&gt;
&lt;br /&gt;
== Setting up Yambo ==&lt;br /&gt;
&lt;br /&gt;
In order to get the yambo code in your machine you have multiple options:&lt;br /&gt;
&lt;br /&gt;
* Yambo Quantum Machine&lt;br /&gt;
* Yambo Container&lt;br /&gt;
* Install the Yambo source in your computer&lt;br /&gt;
&lt;br /&gt;
=== Setting up the Yambo Quantum Machine ===&lt;br /&gt;
The tutorials can be run on a dedicated Quantum Machine. This is run by installing it as Virtual Machine with the VirtualBox program.&lt;br /&gt;
To install the Yambo Quantum Machine in your computer follow exactly the instructions listed below:&lt;br /&gt;
* [[Yambo_Virtual_Machine#Install_the_Yambo_Quantum_Machine|Install the Yambo Quantum Machine]]&lt;br /&gt;
* [[Yambo_Virtual_Machine#Starting_the_Virtual_Machine|Start the Yambo Quantum Machine]]&lt;br /&gt;
* [[Yambo_Virtual_Machine#Updating_the_Yambo_tutorial_files|Update and install the Tutorials]]&lt;br /&gt;
&lt;br /&gt;
=== Setting up the Yambo Container===&lt;br /&gt;
&lt;br /&gt;
An alternative to get the Yambo code is to install the Yambo container in your machine and this can be done in few steps:&lt;br /&gt;
&lt;br /&gt;
* Install the docker platform (Linux or Mac). Follow the instruction  in the docker [https://docs.docker.com/engine/install/ website].&lt;br /&gt;
* Pull the Yambo container:&lt;br /&gt;
&lt;br /&gt;
  &amp;gt;sudo docker pull nicspalla/yambo-gcc_openmp_mkl:latest&lt;br /&gt;
&lt;br /&gt;
sudo it is not necessary if your user is part of the group named docker (suggested on Linux!).&lt;br /&gt;
&lt;br /&gt;
For Linux users:&lt;br /&gt;
&lt;br /&gt;
  sudo groupadd docker&lt;br /&gt;
  sudo usermod -aG docker $USER&lt;br /&gt;
&lt;br /&gt;
For Mac users:&lt;br /&gt;
&lt;br /&gt;
  sudo dscl . create /Groups/docker&lt;br /&gt;
  sudo dseditgroup -o edit -a $USER -t user docker&lt;br /&gt;
&lt;br /&gt;
Log out and log back in so that your group membership is re-evaluated.&lt;br /&gt;
&lt;br /&gt;
* You are done. To run Yambo into the container:&lt;br /&gt;
&lt;br /&gt;
 docker run -ti \&lt;br /&gt;
    --mount type=bind,source=&amp;quot;$(pwd)&amp;quot;,target=/tmpdir \&lt;br /&gt;
    -e OMP_NUM_THREADS=8  \&lt;br /&gt;
    nicspalla/yambo-gcc_openmp_mkl:latest \&lt;br /&gt;
    yambo -F yambo.in -J yambo.out&lt;br /&gt;
&lt;br /&gt;
Otherwise (suggested!), copy and paste the code below in a file, i.e called drun.sh:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash &lt;br /&gt;
 docker run -ti \&lt;br /&gt;
    --mount type=bind,source=&amp;quot;$(pwd)&amp;quot;,target=/tmpdir \&lt;br /&gt;
    -e OMP_NUM_THREADS=8  \&lt;br /&gt;
    nicspalla/yambo-gcc_openmp_mkl:latest $@&lt;br /&gt;
&lt;br /&gt;
then give the file execute privileges:&lt;br /&gt;
&lt;br /&gt;
 chmod +x drun.sh&lt;br /&gt;
&lt;br /&gt;
Move (or copy) this file in the directory where you want to use Yambo and use it as prefix of your Yambo calculation:&lt;br /&gt;
&lt;br /&gt;
 ./drun.sh yambo -F yambo.in -J yambo.out&lt;br /&gt;
&lt;br /&gt;
If the yambo container is working correctly you should obtain:&lt;br /&gt;
&lt;br /&gt;
 ./drun.sh yambo&lt;br /&gt;
 &lt;br /&gt;
 yambo: cannot access CORE database (SAVE/*db1 and/or SAVE/*wf)&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;./drun.sh yambo -h&lt;br /&gt;
&lt;br /&gt;
should provide in output the help for yambo usage.&lt;br /&gt;
&lt;br /&gt;
=== Install Yambo === &lt;br /&gt;
If you have some experience with compiling codes, you can  [[Download| get the source]] and [[Installation | install]] it. If you never compiled a code, it is better to choose one of the above options as the technical assistance we can offer is limited.&lt;br /&gt;
&lt;br /&gt;
== Tutorials ==&lt;br /&gt;
&lt;br /&gt;
Before starting, [[Get_Tutorial_files_CECAM2021|get the tutorial files]].&lt;br /&gt;
&lt;br /&gt;
=== Thursday 8 April ===&lt;br /&gt;
&#039;&#039;&#039;14:30 - 17:00 From the DFT ground state to the complete setup of a Many Body calculation using Yambo&#039;&#039;&#039; Davide Sangalli (CNR-ISM, Italy), Pedro Melo (University of Liege, Belgium)&lt;br /&gt;
&amp;lt;!-- * [[First steps: a walk through from DFT to optical properties]] (modular) --&amp;gt;&lt;br /&gt;
&amp;lt;!-- * [[First steps: walk through from DFT to RPA (standalone)]] --&amp;gt;&lt;br /&gt;
* [[First steps: walk through from DFT(standalone)]]&lt;br /&gt;
* [[Next steps: RPA calculations (standalone)]]&lt;br /&gt;
&lt;br /&gt;
=== Friday 9 April ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;13:30 - 16:30 A complete tour through GW simulation in a complex material (from the blackboard to numerical computation: convergence, algorithms, parallel usage)&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Andrea Ferretti (CNR-NANO, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[GW hBN Yambo Virtual 2021 version|How to obtain the quasi-particle band structure of a bulk material: h-BN]]&lt;br /&gt;
&lt;br /&gt;
=== Thursday 15 April ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;13:30 - 15:00 A guided tour through calculations of spectroscopic properties using the BSE approach&#039;&#039;&#039; Fulvio Paleari (CNR-ISM, Italy), Myrta Gr&amp;amp;#252;ning (Queen&#039;s University Belfast, Northern Ireland)&lt;br /&gt;
&lt;br /&gt;
* [[BSE hBN Yambo Virtual 2021 version|How to obtain an optical spectrum]]&lt;br /&gt;
&lt;br /&gt;
== Lectures ==&lt;br /&gt;
&lt;br /&gt;
=== Thursday 8 April ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:00 to 10:10 - Welcome &amp;amp; Introduction&#039;&#039;&#039; Andrea Marini&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:10 to 10:30 - Material Science and Yambo, what we can calculate&#039;&#039;&#039;  Andrea Marini&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:40 to 11:00 - Introduction to Many Body Perturbation Theory&#039;&#039;&#039; Pedro Melo&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;11:25 to 11:45 - The linear response theory&#039;&#039;&#039; Claudio Attaccalite&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;12:00 to 12:20 - From equations to simulations: the hard life of a Materials scientist&#039;&#039;&#039; Myrta Gr&amp;amp;#252;ning&lt;br /&gt;
&lt;br /&gt;
=== Friday 9 April ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:00 to 10:20 - from ARPES to quasiparticles&#039;&#039;&#039; Andrea Ferretti&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:30 to 10:50 - The Quasi Particle concept and the GW method&#039;&#039;&#039; Andrea Ferretti &amp;amp; Daniele Varsano&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;11:20 to 11:40 - GW implementation and common approximations&#039;&#039;&#039; Daniele Varsano&lt;br /&gt;
&lt;br /&gt;
=== Thursday 15 April ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:00 to 10:20 - Optical properties &amp;amp; excitons&#039;&#039;&#039; Maurizia Palummo&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:30 to 10:50 - Derivation of the Bethe-Salpeter Equation and main physical concepts&#039;&#039;&#039; Claudio Attaccalite&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;11:20 to 11:40 - BSE implementation and common approximations&#039;&#039;&#039; Davide Sangalli&lt;br /&gt;
&lt;br /&gt;
=== Friday 16 April ===&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=CECAM_VIRTUAL_2021&amp;diff=4722</id>
		<title>CECAM VIRTUAL 2021</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=CECAM_VIRTUAL_2021&amp;diff=4722"/>
		<updated>2021-04-03T11:02:24Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Plan for the CECAM VIRTUAL 2021 school tutorials.&lt;br /&gt;
https://www.cecam.org/workshop-details/1081&lt;br /&gt;
&lt;br /&gt;
[[File:Cecam_school_program.png|thumb|160px| Click to enlarge the full program]]&lt;br /&gt;
&lt;br /&gt;
== Setting up Yambo ==&lt;br /&gt;
&lt;br /&gt;
In order to get the yambo code in your machine you have multiple options:&lt;br /&gt;
&lt;br /&gt;
* Yambo Quantum Machine&lt;br /&gt;
* Yambo Container&lt;br /&gt;
* Install the Yambo source in your computer&lt;br /&gt;
&lt;br /&gt;
=== Setting up the Yambo Quantum Machine ===&lt;br /&gt;
The tutorials can be run on a dedicated Quantum Machine. This is run by installing it as Virtual Machine with the VirtualBox program.&lt;br /&gt;
To install the Yambo Quantum Machine in your computer follow exactly the instructions listed below:&lt;br /&gt;
* [[Yambo_Virtual_Machine#Install_the_Yambo_Quantum_Machine|Install the Yambo Quantum Machine]]&lt;br /&gt;
* [[Yambo_Virtual_Machine#Starting_the_Virtual_Machine|Start the Yambo Quantum Machine]]&lt;br /&gt;
* [[Yambo_Virtual_Machine#Updating_the_Yambo_tutorial_files|Update and install the Tutorials]]&lt;br /&gt;
&lt;br /&gt;
=== Setting up the Yambo Container===&lt;br /&gt;
&lt;br /&gt;
An alternative to get the Yambo code is to install the Yambo container in your machine and this can be done in few steps:&lt;br /&gt;
&lt;br /&gt;
* Install the docker platform (Linux or Mac). Follow the instruction  in the docker [https://docs.docker.com/engine/install/ website].&lt;br /&gt;
* Pull the Yambo container:&lt;br /&gt;
&lt;br /&gt;
  &amp;gt;sudo docker pull nicspalla/yambo-gcc_openmp_mkl:latest&lt;br /&gt;
&lt;br /&gt;
sudo it is not necessary if your user is part of the group named docker (suggested on Linux!).&lt;br /&gt;
&lt;br /&gt;
For Linux users:&lt;br /&gt;
&lt;br /&gt;
  sudo groupadd docker&lt;br /&gt;
  sudo usermod -aG docker $USER&lt;br /&gt;
&lt;br /&gt;
For Mac users:&lt;br /&gt;
&lt;br /&gt;
  sudo dscl . create /Groups/docker&lt;br /&gt;
  sudo dseditgroup -o edit -a $USER -t user docker&lt;br /&gt;
&lt;br /&gt;
Log out and log back in so that your group membership is re-evaluated.&lt;br /&gt;
&lt;br /&gt;
* You are done. To run Yambo into the container:&lt;br /&gt;
&lt;br /&gt;
 docker run -ti \&lt;br /&gt;
    --mount type=bind,source=&amp;quot;$(pwd)&amp;quot;,target=/tmpdir \&lt;br /&gt;
    -e OMP_NUM_THREADS=8  \&lt;br /&gt;
    nicspalla/yambo-gcc_openmp_mkl:latest \&lt;br /&gt;
    yambo -F yambo.in -J yambo.out&lt;br /&gt;
&lt;br /&gt;
Otherwise (suggested!), copy and paste the code below in a file, i.e called drun.sh:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash &lt;br /&gt;
 docker run -ti \&lt;br /&gt;
    --mount type=bind,source=&amp;quot;$(pwd)&amp;quot;,target=/tmpdir \&lt;br /&gt;
    -e OMP_NUM_THREADS=8  \&lt;br /&gt;
    nicspalla/yambo-gcc_openmp_mkl:latest $@&lt;br /&gt;
&lt;br /&gt;
then give the file execute privileges:&lt;br /&gt;
&lt;br /&gt;
 chmod +x drun.sh&lt;br /&gt;
&lt;br /&gt;
Move (or copy) this file in the directory where you want to use Yambo and use it as prefix of your Yambo calculation:&lt;br /&gt;
&lt;br /&gt;
 ./drun.sh yambo -F yambo.in -J yambo.out&lt;br /&gt;
&lt;br /&gt;
If the yambo container is working correctly you should obtain:&lt;br /&gt;
&lt;br /&gt;
 ./drun.sh yambo&lt;br /&gt;
 &lt;br /&gt;
 yambo: cannot access CORE database (SAVE/*db1 and/or SAVE/*wf)&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;./drun.sh yambo -h&lt;br /&gt;
&lt;br /&gt;
should provide in output the help for yambo usage.&lt;br /&gt;
&lt;br /&gt;
=== Install Yambo === &lt;br /&gt;
If you have some experience with compiling codes, you can  [[Download| get the source]] and [[Installation | install]] it. If you never compile a code, it is better to choose one of the above options.&lt;br /&gt;
&lt;br /&gt;
== Tutorials ==&lt;br /&gt;
&lt;br /&gt;
Before starting, [[Get_Tutorial_files_CECAM2021|get the tutorial files]].&lt;br /&gt;
&lt;br /&gt;
=== Thursday 8 April ===&lt;br /&gt;
&#039;&#039;&#039;14:30 - 17:00 From the DFT ground state to the complete setup of a Many Body calculation using Yambo&#039;&#039;&#039; Davide Sangalli (CNR-ISM, Italy), Pedro Melo (University of Liege, Belgium)&lt;br /&gt;
&amp;lt;!-- * [[First steps: a walk through from DFT to optical properties]] (modular) --&amp;gt;&lt;br /&gt;
&amp;lt;!-- * [[First steps: walk through from DFT to RPA (standalone)]] --&amp;gt;&lt;br /&gt;
* [[First steps: walk through from DFT(standalone)]]&lt;br /&gt;
* [[Next steps: RPA calculations (standalone)]]&lt;br /&gt;
&lt;br /&gt;
=== Friday 9 April ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;13:30 - 16:30 A complete tour through GW simulation in a complex material (from the blackboard to numerical computation: convergence, algorithms, parallel usage)&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Andrea Ferretti (CNR-NANO, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[GW hBN Yambo Virtual 2021 version|How to obtain the quasi-particle band structure of a bulk material: h-BN]]&lt;br /&gt;
&lt;br /&gt;
=== Thursday 15 April ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;13:30 - 15:00 A guided tour through calculations of spectroscopic properties using the BSE approach&#039;&#039;&#039; Fulvio Paleari (CNR-ISM, Italy), Myrta Gr&amp;amp;#252;ning (Queen&#039;s University Belfast, Northern Ireland)&lt;br /&gt;
&lt;br /&gt;
* [[BSE hBN Yambo Virtual 2021 version|How to obtain an optical spectrum]]&lt;br /&gt;
&lt;br /&gt;
== Lectures ==&lt;br /&gt;
&lt;br /&gt;
=== Thursday 8 April ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:00 to 10:10 - Welcome &amp;amp; Introduction&#039;&#039;&#039; Andrea Marini&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:10 to 10:30 - Material Science and Yambo, what we can calculate&#039;&#039;&#039;  Andrea Marini&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:40 to 11:00 - Introduction to Many Body Perturbation Theory&#039;&#039;&#039; Pedro Melo&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;11:25 to 11:45 - The linear response theory&#039;&#039;&#039; Claudio Attaccalite&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;12:00 to 12:20 - From equations to simulations: the hard life of a Materials scientist&#039;&#039;&#039; Myrta Gr&amp;amp;#252;ning&lt;br /&gt;
&lt;br /&gt;
=== Friday 9 April ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:00 to 10:20 - from ARPES to quasiparticles&#039;&#039;&#039; Andrea Ferretti&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:30 to 10:50 - The Quasi Particle concept and the GW method&#039;&#039;&#039; Andrea Ferretti &amp;amp; Daniele Varsano&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;11:20 to 11:40 - GW implementation and common approximations&#039;&#039;&#039; Daniele Varsano&lt;br /&gt;
&lt;br /&gt;
=== Thursday 15 April ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:00 to 10:20 - Optical properties &amp;amp; excitons&#039;&#039;&#039; Maurizia Palummo&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:30 to 10:50 - Derivation of the Bethe-Salpeter Equation and main physical concepts&#039;&#039;&#039; Claudio Attaccalite&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;11:20 to 11:40 - BSE implementation and common approximations&#039;&#039;&#039; Davide Sangalli&lt;br /&gt;
&lt;br /&gt;
=== Friday 16 April ===&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Get_Tutorial_files_CECAM2021&amp;diff=4721</id>
		<title>Get Tutorial files CECAM2021</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Get_Tutorial_files_CECAM2021&amp;diff=4721"/>
		<updated>2021-04-03T10:16:49Z</updated>

		<summary type="html">&lt;p&gt;Myrta: /* Navigate */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Obtaing the tutorial files ==&lt;br /&gt;
&lt;br /&gt;
The tutorial CORE databases can be obtained&lt;br /&gt;
&lt;br /&gt;
* from the [[Yambo_Virtual_Machine|Yambo Virtual Machine]] &lt;br /&gt;
* from the Yambo web-page&lt;br /&gt;
* from the Yambo GIT tutorial repository &lt;br /&gt;
&lt;br /&gt;
=== From the Yambo Virtual Machine (VM)  ===&lt;br /&gt;
If you are using the VM, a recent version of the tutorial files is provided.Follow these [[Yambo_Virtual_Machine#Updating_the_Yambo_tutorial_files| instructions]] to update the tutorial files to the most recent version.&lt;br /&gt;
&lt;br /&gt;
=== From the Yambo website ===&lt;br /&gt;
If you are using your own installation or the docker, the files download the following files: &lt;br /&gt;
&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] [15 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-convergence-kpoints.tar.gz hBN-convergence-kpoints.tar.gz] [254 MB],&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After downloading the tar.gz files just unpack them in &#039;&#039;&#039;the YAMBO_TUTORIALS&#039;&#039;&#039; folder. For example&lt;br /&gt;
 $ mkdir YAMBO_TUTORIALS&lt;br /&gt;
 $ mv hBN.tar.gz YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ tar -xvfz hBN.tar.gz&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN&lt;br /&gt;
&lt;br /&gt;
=== From the Git Tutorial Repository (advanced users) ===&lt;br /&gt;
If you are using your own installation or the docker, the [https://github.com/yambo-code/tutorials tutorials repository] contains the updated tutorials CORE databases. To use it&lt;br /&gt;
 $ git clone https://github.com/yambo-code/tutorials.git YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ ./setup.pl -install&lt;br /&gt;
&lt;br /&gt;
== Navigate ==&lt;br /&gt;
Back to the [[CECAM_VIRTUAL_2021#Tutorials | main School page]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Get_Tutorial_files_CECAM2021&amp;diff=4720</id>
		<title>Get Tutorial files CECAM2021</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Get_Tutorial_files_CECAM2021&amp;diff=4720"/>
		<updated>2021-04-03T10:15:21Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Obtaing the tutorial files ==&lt;br /&gt;
&lt;br /&gt;
The tutorial CORE databases can be obtained&lt;br /&gt;
&lt;br /&gt;
* from the [[Yambo_Virtual_Machine|Yambo Virtual Machine]] &lt;br /&gt;
* from the Yambo web-page&lt;br /&gt;
* from the Yambo GIT tutorial repository &lt;br /&gt;
&lt;br /&gt;
=== From the Yambo Virtual Machine (VM)  ===&lt;br /&gt;
If you are using the VM, a recent version of the tutorial files is provided.Follow these [[Yambo_Virtual_Machine#Updating_the_Yambo_tutorial_files| instructions]] to update the tutorial files to the most recent version.&lt;br /&gt;
&lt;br /&gt;
=== From the Yambo website ===&lt;br /&gt;
If you are using your own installation or the docker, the files download the following files: &lt;br /&gt;
&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] [15 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-convergence-kpoints.tar.gz hBN-convergence-kpoints.tar.gz] [254 MB],&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After downloading the tar.gz files just unpack them in &#039;&#039;&#039;the YAMBO_TUTORIALS&#039;&#039;&#039; folder. For example&lt;br /&gt;
 $ mkdir YAMBO_TUTORIALS&lt;br /&gt;
 $ mv hBN.tar.gz YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ tar -xvfz hBN.tar.gz&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN&lt;br /&gt;
&lt;br /&gt;
=== From the Git Tutorial Repository (advanced users) ===&lt;br /&gt;
If you are using your own installation or the docker, the [https://github.com/yambo-code/tutorials tutorials repository] contains the updated tutorials CORE databases. To use it&lt;br /&gt;
 $ git clone https://github.com/yambo-code/tutorials.git YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ ./setup.pl -install&lt;br /&gt;
&lt;br /&gt;
== Navigate ==&lt;br /&gt;
Back to the [[CECAM_VIRTUAL_2021 | main School page]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Get_Tutorial_files_CECAM2021&amp;diff=4719</id>
		<title>Get Tutorial files CECAM2021</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Get_Tutorial_files_CECAM2021&amp;diff=4719"/>
		<updated>2021-04-03T10:07:35Z</updated>

		<summary type="html">&lt;p&gt;Myrta: /* Tutorial files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Obtaing the tutorial files ==&lt;br /&gt;
&lt;br /&gt;
The tutorial CORE databases can be obtained&lt;br /&gt;
&lt;br /&gt;
* from the [[Yambo_Virtual_Machine|Yambo Virtual Machine]] &lt;br /&gt;
* from the Yambo web-page&lt;br /&gt;
* from the Yambo GIT tutorial repository &lt;br /&gt;
&lt;br /&gt;
=== From the Yambo Virtual Machine (VM)  ===&lt;br /&gt;
If you are using the VM, a recent version of the tutorial files is provided.Follow these [[Yambo_Virtual_Machine#Updating_the_Yambo_tutorial_files| instructions]] to update the tutorial files to the most recent version.&lt;br /&gt;
&lt;br /&gt;
=== From the Yambo website ===&lt;br /&gt;
If you are using your own installation or the docker, the files download the following files: &lt;br /&gt;
&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] [15 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-convergence-kpoints.tar.gz hBN-convergence-kpoints.tar.gz] [254 MB],&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After downloading the tar.gz files just unpack them in &#039;&#039;&#039;the YAMBO_TUTORIALS&#039;&#039;&#039; folder. For example&lt;br /&gt;
 $ mkdir YAMBO_TUTORIALS&lt;br /&gt;
 $ mv hBN.tar.gz YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ tar -xvfz hBN.tar.gz&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN&lt;br /&gt;
&lt;br /&gt;
=== From the Git Tutorial Repository (advanced users) ===&lt;br /&gt;
If you are using your own installation or the docker, the [https://github.com/yambo-code/tutorials tutorials repository] contains the updated tutorials CORE databases. To use it&lt;br /&gt;
 $ git clone https://github.com/yambo-code/tutorials.git YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ ./setup.pl -install&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Get_Tutorial_files_CECAM2021&amp;diff=4718</id>
		<title>Get Tutorial files CECAM2021</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Get_Tutorial_files_CECAM2021&amp;diff=4718"/>
		<updated>2021-04-03T10:07:09Z</updated>

		<summary type="html">&lt;p&gt;Myrta: Created page with &amp;quot;== Tutorial files ==  The tutorial CORE databases can be obtained  * from the Yambo Virtual Machine  * from the Yambo web-page * from the Yambo GIT t...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Tutorial files ==&lt;br /&gt;
&lt;br /&gt;
The tutorial CORE databases can be obtained&lt;br /&gt;
&lt;br /&gt;
* from the [[Yambo_Virtual_Machine|Yambo Virtual Machine]] &lt;br /&gt;
* from the Yambo web-page&lt;br /&gt;
* from the Yambo GIT tutorial repository &lt;br /&gt;
&lt;br /&gt;
=== From the Yambo Virtual Machine (VM)  ===&lt;br /&gt;
If you are using the VM, a recent version of the tutorial files is provided.Follow these [[Yambo_Virtual_Machine#Updating_the_Yambo_tutorial_files| instructions]] to update the tutorial files to the most recent version.&lt;br /&gt;
&lt;br /&gt;
=== From the Yambo website ===&lt;br /&gt;
If you are using your own installation or the docker, the files download the following files: &lt;br /&gt;
&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] [15 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-convergence-kpoints.tar.gz hBN-convergence-kpoints.tar.gz] [254 MB],&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After downloading the tar.gz files just unpack them in &#039;&#039;&#039;the YAMBO_TUTORIALS&#039;&#039;&#039; folder. For example&lt;br /&gt;
 $ mkdir YAMBO_TUTORIALS&lt;br /&gt;
 $ mv hBN.tar.gz YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ tar -xvfz hBN.tar.gz&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN&lt;br /&gt;
&lt;br /&gt;
=== From the Git Tutorial Repository (advanced users) ===&lt;br /&gt;
If you are using your own installation or the docker, the [https://github.com/yambo-code/tutorials tutorials repository] contains the updated tutorials CORE databases. To use it&lt;br /&gt;
 $ git clone https://github.com/yambo-code/tutorials.git YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ ./setup.pl -install&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=CECAM_VIRTUAL_2021&amp;diff=4717</id>
		<title>CECAM VIRTUAL 2021</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=CECAM_VIRTUAL_2021&amp;diff=4717"/>
		<updated>2021-04-03T10:03:56Z</updated>

		<summary type="html">&lt;p&gt;Myrta: /* Install the Yambo source and tutorials in your computer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Plan for the CECAM VIRTUAL 2021 school tutorials.&lt;br /&gt;
https://www.cecam.org/workshop-details/1081&lt;br /&gt;
&lt;br /&gt;
[[File:Cecam_school_program.png|thumb|160px| Click to enlarge the full program]]&lt;br /&gt;
&lt;br /&gt;
== Setting up Yambo ==&lt;br /&gt;
&lt;br /&gt;
In order to get the yambo code in your machine you have multiple options:&lt;br /&gt;
&lt;br /&gt;
* Yambo Quantum Machine&lt;br /&gt;
* Yambo Container&lt;br /&gt;
* Install the Yambo source in your computer&lt;br /&gt;
&lt;br /&gt;
=== Setting up the Yambo Quantum Machine ===&lt;br /&gt;
The tutorials can be run on a dedicated Quantum Machine. This is run by installing it as Virtual Machine with the VirtualBox program.&lt;br /&gt;
To install the Yambo Quantum Machine in your computer follow exactly the instructions listed below:&lt;br /&gt;
* [[Yambo_Virtual_Machine#Install_the_Yambo_Quantum_Machine|Install the Yambo Quantum Machine]]&lt;br /&gt;
* [[Yambo_Virtual_Machine#Starting_the_Virtual_Machine|Start the Yambo Quantum Machine]]&lt;br /&gt;
* [[Yambo_Virtual_Machine#Updating_the_Yambo_tutorial_files|Update and install the Tutorials]]&lt;br /&gt;
&lt;br /&gt;
=== Setting up the Yambo Container===&lt;br /&gt;
&lt;br /&gt;
An alternative to get the Yambo code is to install the Yambo container in your machine and this can be done in few steps:&lt;br /&gt;
&lt;br /&gt;
* Install the docker platform (Linux or Mac). Follow the instruction  in the docker [https://docs.docker.com/engine/install/ website].&lt;br /&gt;
* Pull the Yambo container:&lt;br /&gt;
&lt;br /&gt;
  &amp;gt;sudo docker pull nicspalla/yambo-gcc_openmp_mkl:latest&lt;br /&gt;
&lt;br /&gt;
sudo it is not necessary if your user is part of the group named docker (suggested on Linux!).&lt;br /&gt;
&lt;br /&gt;
For Linux users:&lt;br /&gt;
&lt;br /&gt;
  sudo groupadd docker&lt;br /&gt;
  sudo usermod -aG docker $USER&lt;br /&gt;
&lt;br /&gt;
For Mac users:&lt;br /&gt;
&lt;br /&gt;
  sudo dscl . create /Groups/docker&lt;br /&gt;
  sudo dseditgroup -o edit -a $USER -t user docker&lt;br /&gt;
&lt;br /&gt;
Log out and log back in so that your group membership is re-evaluated.&lt;br /&gt;
&lt;br /&gt;
* You are done. To run Yambo into the container:&lt;br /&gt;
&lt;br /&gt;
 docker run -ti \&lt;br /&gt;
    --mount type=bind,source=&amp;quot;$(pwd)&amp;quot;,target=/tmpdir \&lt;br /&gt;
    -e OMP_NUM_THREADS=8  \&lt;br /&gt;
    nicspalla/yambo-gcc_openmp_mkl:latest \&lt;br /&gt;
    yambo -F yambo.in -J yambo.out&lt;br /&gt;
&lt;br /&gt;
Otherwise (suggested!), copy and paste the code below in a file, i.e called drun.sh:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash &lt;br /&gt;
 docker run -ti \&lt;br /&gt;
    --mount type=bind,source=&amp;quot;$(pwd)&amp;quot;,target=/tmpdir \&lt;br /&gt;
    -e OMP_NUM_THREADS=8  \&lt;br /&gt;
    nicspalla/yambo-gcc_openmp_mkl:latest $@&lt;br /&gt;
&lt;br /&gt;
then give the file execute privileges:&lt;br /&gt;
&lt;br /&gt;
 chmod +x drun.sh&lt;br /&gt;
&lt;br /&gt;
Move (or copy) this file in the directory where you want to use Yambo and use it as prefix of your Yambo calculation:&lt;br /&gt;
&lt;br /&gt;
 ./drun.sh yambo -F yambo.in -J yambo.out&lt;br /&gt;
&lt;br /&gt;
If the yambo container is working correctly you should obtain:&lt;br /&gt;
&lt;br /&gt;
 ./drun.sh yambo&lt;br /&gt;
 &lt;br /&gt;
 yambo: cannot access CORE database (SAVE/*db1 and/or SAVE/*wf)&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;./drun.sh yambo -h&lt;br /&gt;
&lt;br /&gt;
should provide in output the help for yambo usage.&lt;br /&gt;
&lt;br /&gt;
=== Install the Yambo source and tutorials in your computer ===&lt;br /&gt;
In this case just follow the instructions to [[Download| download]] and [[Installation | install]] the source on your computer. After this [[Get_Tutorial_files_CECAM2021|get the tutorial files]].&lt;br /&gt;
&lt;br /&gt;
== Tutorials ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== Tutorial files ===&lt;br /&gt;
All tutorials require &#039;&#039;&#039;download&#039;&#039;&#039; of the following pre-prepared Yambo databases or DFT input files:&amp;lt;br&amp;gt;&lt;br /&gt;
DAY 1-2-3.&lt;br /&gt;
hBN-3D ([http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz], 237 MB) &lt;br /&gt;
and hBN-2D ([http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz], 8.6 MB)&amp;lt;br&amp;gt;&lt;br /&gt;
DAY 3. hBN-2D with higher convergence parameters for parallel tutorials &lt;br /&gt;
([http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz], 137 MB)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After downloading the tar.gz files just unpack them in &#039;&#039;&#039;the same folder&#039;&#039;&#039;:&lt;br /&gt;
 $ tar -xcvf hBN-2D.tar&lt;br /&gt;
 $ tar -xcvf hBN.tar&lt;br /&gt;
 $ ls&lt;br /&gt;
   YAMBO_TUTORIALS&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN-2D hBN&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Thursday 8 April ===&lt;br /&gt;
&#039;&#039;&#039;14:30 - 17:00 From the DFT ground state to the complete setup of a Many Body calculation using Yambo&#039;&#039;&#039; Davide Sangalli (CNR-ISM, Italy), Pedro Melo (University of Liege, Belgium)&lt;br /&gt;
&amp;lt;!-- * [[First steps: a walk through from DFT to optical properties]] (modular) --&amp;gt;&lt;br /&gt;
&amp;lt;!-- * [[First steps: walk through from DFT to RPA (standalone)]] --&amp;gt;&lt;br /&gt;
* [[First steps: walk through from DFT(standalone)]]&lt;br /&gt;
* [[Next steps: RPA calculations (standalone)]]&lt;br /&gt;
&lt;br /&gt;
=== Friday 9 April ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;13:30 - 16:30 A complete tour through GW simulation in a complex material (from the blackboard to numerical computation: convergence, algorithms, parallel usage)&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Andrea Ferretti (CNR-NANO, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[GW hBN Yambo Virtual 2021 version|How to obtain the quasi-particle band structure of a bulk material: h-BN]]&lt;br /&gt;
&lt;br /&gt;
=== Thursday 15 April ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;13:30 - 15:00 A guided tour through calculations of spectroscopic properties using the BSE approach&#039;&#039;&#039; Fulvio Paleari (CNR-ISM, Italy), Myrta Gr&amp;amp;#252;ning (Queen&#039;s University Belfast, Northern Ireland)&lt;br /&gt;
&lt;br /&gt;
* [[BSE hBN Yambo Virtual 2021 version|How to obtain an optical spectrum]]&lt;br /&gt;
&lt;br /&gt;
== Lectures ==&lt;br /&gt;
&lt;br /&gt;
=== Thursday 8 April ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:00 to 10:10 - Welcome &amp;amp; Introduction&#039;&#039;&#039; Andrea Marini&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:10 to 10:30 - Material Science and Yambo, what we can calculate&#039;&#039;&#039;  Andrea Marini&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:40 to 11:00 - Introduction to Many Body Perturbation Theory&#039;&#039;&#039; Pedro Melo&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;11:25 to 11:45 - The linear response theory&#039;&#039;&#039; Claudio Attaccalite&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;12:00 to 12:20 - From equations to simulations: the hard life of a Materials scientist&#039;&#039;&#039; Myrta Gr&amp;amp;#252;ning&lt;br /&gt;
&lt;br /&gt;
=== Friday 9 April ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:00 to 10:20 - from ARPES to quasiparticles&#039;&#039;&#039; Andrea Ferretti&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:30 to 10:50 - The Quasi Particle concept and the GW method&#039;&#039;&#039; Andrea Ferretti &amp;amp; Daniele Varsano&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;11:20 to 11:40 - GW implementation and common approximations&#039;&#039;&#039; Daniele Varsano&lt;br /&gt;
&lt;br /&gt;
=== Thursday 15 April ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:00 to 10:20 - Optical properties &amp;amp; excitons&#039;&#039;&#039; Maurizia Palummo&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:30 to 10:50 - Derivation of the Bethe-Salpeter Equation and main physical concepts&#039;&#039;&#039; Claudio Attaccalite&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;11:20 to 11:40 - BSE implementation and common approximations&#039;&#039;&#039; Davide Sangalli&lt;br /&gt;
&lt;br /&gt;
=== Friday 16 April ===&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=4716</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=4716"/>
		<updated>2021-04-03T09:57:02Z</updated>

		<summary type="html">&lt;p&gt;Myrta: /* From the Yambo website */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- &#039;&#039;&#039;ICTP students should start [[ICTP2020|HERE]]&#039;&#039;&#039;  --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are starting out with Yambo, or even an experienced user, we recommend that you complete the following tutorials before trying to use Yambo for your system.&lt;br /&gt;
&lt;br /&gt;
The tutorials are meant to give some introductory background to the key concepts behind Yambo. Practical topics such as convergence are also discussed. &lt;br /&gt;
Nonetheless, users are invited to first read and study the [[lectures|background material]] in order to get familiar with the fundamental physical quantities.&lt;br /&gt;
&lt;br /&gt;
Two kinds of tutorials are provided: &#039;&#039;&#039;stand-alone&#039;&#039;&#039; and &#039;&#039;&#039;modular&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Tutorial files ==&lt;br /&gt;
&lt;br /&gt;
The tutorial CORE databases can be obtained&lt;br /&gt;
&lt;br /&gt;
* from the [[Yambo_Virtual_Machine|Yambo Virtual Machine]] &lt;br /&gt;
* from the Yambo web-page&lt;br /&gt;
* from the Yambo GIT tutorial repository &lt;br /&gt;
&lt;br /&gt;
=== From the Yambo Virtual Machine (VM)  ===&lt;br /&gt;
If you are using the VM, a recent version of the tutorial files is provided.Follow these [[Yambo_Virtual_Machine#Updating_the_Yambo_tutorial_files| instructions]] to update the tutorial files to the most recent version.&lt;br /&gt;
&lt;br /&gt;
=== From the Yambo website ===&lt;br /&gt;
If you are using your own installation or the docker, the files needed to run the tutorials can be downloaded from the lists below. &lt;br /&gt;
&lt;br /&gt;
After downloading the tar.gz files just unpack them in &#039;&#039;&#039;the YAMBO_TUTORIALS&#039;&#039;&#039; folder. For example&lt;br /&gt;
 $ mkdir YAMBO_TUTORIALS&lt;br /&gt;
 $ mv hBN.tar.gz YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ tar -xvfz hBN.tar.gz&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN&lt;br /&gt;
&lt;br /&gt;
====Files needed for modular tutorials====&lt;br /&gt;
All of the following should be downloaded prior to following the modular tutorials:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] [15 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-convergence-kpoints.tar.gz hBN-convergence-kpoints.tar.gz] [254 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz] [8.6 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz] [143 MB]&lt;br /&gt;
&lt;br /&gt;
====Files needed for stand-alone tutorials====&lt;br /&gt;
At the start of each tutorial you will be told which specific file needs to be downloaded:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Silicon.tar.gz Silicon.tar.gz] [&amp;lt;1 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/LiF.tar.gz LiF.tar.gz]  [1.4 MB],&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_surface.tar.gz Si_surface.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_wire.tar.gz Si_wire.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/H2.tar.gz H2.tar.gz]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Aluminum.tar.gz Aluminum.tar.gz] [&amp;lt;1 MB],&lt;br /&gt;
&amp;lt;!--[http://www.yambo-code.org/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz]--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Hydrogen_Chain.tar.gz Hydrogen_Chain.tar.gz] [14 MB]&lt;br /&gt;
&lt;br /&gt;
=== From the Git Tutorial Repository (advanced users) ===&lt;br /&gt;
If you are using your own installation or the docker, the [https://github.com/yambo-code/tutorials tutorials repository] contains the updated tutorials CORE databases. To use it&lt;br /&gt;
 $ git clone https://github.com/yambo-code/tutorials.git YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ ./setup.pl -install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Stand-alone overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Stand-alone tutorials ==&lt;br /&gt;
&lt;br /&gt;
These tutorials are self-contained and cover a variety of mixed topics, both physical and methodological. They are designed to be followed from start to finish in one page and do not require previous knowledge of yambo. 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;
=== Basic ===&lt;br /&gt;
* [[LiF|Linear Response in 3D. Excitons at work]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[Si_Surface|Linear Response in 2D]]&lt;br /&gt;
* [[Si_wire|Linear Response in 1D]]&lt;br /&gt;
* [[H2|Linear Response in 0D]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* [[Silicon|GW convergence]]&lt;br /&gt;
&lt;br /&gt;
=== Advanced ===&lt;br /&gt;
* [[Hydrogen chain|TDDFT Failure and long range correlations]]&lt;br /&gt;
* [[Linear response from real time simulations]]&lt;br /&gt;
&lt;br /&gt;
==== GW and Quasi-particles ====&lt;br /&gt;
&lt;br /&gt;
* [[Real_Axis_and_Lifetimes|Real Axis and Lifetimes]]&lt;br /&gt;
* [[Self-consistent GW on eigenvalues only]]&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;
&lt;br /&gt;
==== Non linear response ====&lt;br /&gt;
&lt;br /&gt;
* [http://www.attaccalite.com/lumen/linear_response.html Linear response using Dynamical Berry phase]&lt;br /&gt;
* [[Real time approach to non-linear response]]&lt;br /&gt;
* [[Correlation effects in the non-linear response]]&lt;br /&gt;
* [http://www.attaccalite.com/lumen/thg_in_silicon.html Third Harmonic Generation]&lt;br /&gt;
* [http://www.attaccalite.com/lumen/spin_orbit.html Spin-orbit coupling and non-linear response]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
* [[SOC|Spin-Orbit Coupling MBPT]]&lt;br /&gt;
* [[Kerr|Kerr]]&lt;br /&gt;
* [[Real_Time|Real-Time]]&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;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Modular overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Modular tutorials ==&lt;br /&gt;
These tutorials are designed to provide a deeper understanding of specific yambo tasks and runlevels. They are designed to avoid repetition of common procedures and physical concepts. As such, they make use of the same physical systems: bulk hexagonal boron nitride &#039;&#039;hBN&#039;&#039; and a hBN sheet &#039;&#039;hBN-2D&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
====Introduction====&lt;br /&gt;
* [[First steps: a walk through from DFT to optical properties]]&lt;br /&gt;
====Quasiparticles in the GW approximation====&lt;br /&gt;
* [[How to obtain the quasi-particle band structure of a bulk material: h-BN]]&lt;br /&gt;
====Using Yambo in Parallel====&lt;br /&gt;
This modules contains very general discussions of the parallel environment of Yambo. Still the actual run of the code is specific to the CECAM cluster. If you want to run these modules just replace the parallel queue instructions with simple MPI commands.&lt;br /&gt;
&lt;br /&gt;
* [[GW_parallel_strategies|Parallel GW (CECAM specific)]]: strategies for running Yambo in parallel&lt;br /&gt;
[[GW_parallel_strategies_CECAM]]&lt;br /&gt;
* [[Pushing_convergence_in_parallel|GW convergence (CECAM specific)]]: use Yambo in parallel to converge a GW calculation for a layer of hBN (hBN-2D)&lt;br /&gt;
&lt;br /&gt;
====Excitons and the Bethe-Salpeter Equation====&lt;br /&gt;
* [[How to obtain an optical spectrum|Calculating optical spectra including excitonic effects: a step-by-step guide]]&lt;br /&gt;
* [[How to choose the input parameters|Obtaining a converged optical spectrum]] &lt;br /&gt;
* [[How to treat low dimensional systems|Many-body effects in low-dimensional systems: numerical issues and remedies]] &lt;br /&gt;
* [[How to analyse excitons|Analysis of excitonic spectra in a 2D material]]&lt;br /&gt;
&amp;lt;!--* [[Two particle excitations]] (try to bypass this page) : Learn how to set up and run calculations to obtain and analyze an optical absorption spectrum of bulk and low dimension materials by using the Bethe-Salpeter equation--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Yambo-python driver====&lt;br /&gt;
* [[First steps in Yambopy]]&lt;br /&gt;
* [[GW tutorial. Convergence and approximations (BN)]]&lt;br /&gt;
* [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
====Real-time simulations====&lt;br /&gt;
* [[Breaking of symmetries]]&lt;br /&gt;
* [[Independent-Particle Approximation Dynamics. Delta Pulse]]&lt;br /&gt;
* [[Post-processing. Optical Response]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- [[Instructions for CECAM students]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
Alternatively, users can learn more about a specific runlevel or task by looking at the individual &#039;&#039;&#039;[[Modules|documentation modules]]&#039;&#039;&#039;. These provide a focus on the input parameters, run time behaviour, and underlying physics. Although they can be followed separately, non-experts are urged to follow them as part of the more structured tutorials given above.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Schools&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Schools ==&lt;br /&gt;
&lt;br /&gt;
* [[ICTP2020]]&lt;br /&gt;
* [[CECAM VIRTUAL 2021]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=4715</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=4715"/>
		<updated>2021-04-03T09:56:03Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- &#039;&#039;&#039;ICTP students should start [[ICTP2020|HERE]]&#039;&#039;&#039;  --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are starting out with Yambo, or even an experienced user, we recommend that you complete the following tutorials before trying to use Yambo for your system.&lt;br /&gt;
&lt;br /&gt;
The tutorials are meant to give some introductory background to the key concepts behind Yambo. Practical topics such as convergence are also discussed. &lt;br /&gt;
Nonetheless, users are invited to first read and study the [[lectures|background material]] in order to get familiar with the fundamental physical quantities.&lt;br /&gt;
&lt;br /&gt;
Two kinds of tutorials are provided: &#039;&#039;&#039;stand-alone&#039;&#039;&#039; and &#039;&#039;&#039;modular&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Tutorial files ==&lt;br /&gt;
&lt;br /&gt;
The tutorial CORE databases can be obtained&lt;br /&gt;
&lt;br /&gt;
* from the [[Yambo_Virtual_Machine|Yambo Virtual Machine]] &lt;br /&gt;
* from the Yambo web-page&lt;br /&gt;
* from the Yambo GIT tutorial repository &lt;br /&gt;
&lt;br /&gt;
=== From the Yambo Virtual Machine (VM)  ===&lt;br /&gt;
If you are using the VM, a recent version of the tutorial files is provided.Follow these [[Yambo_Virtual_Machine#Updating_the_Yambo_tutorial_files| instructions]] to update the tutorial files to the most recent version.&lt;br /&gt;
&lt;br /&gt;
=== From the Yambo website ===&lt;br /&gt;
If you are using your own installation or the docker, the files needed to run the tutorials can be downloaded from the Tutorial pages. &lt;br /&gt;
&lt;br /&gt;
After downloading the tar.gz files just unpack them in &#039;&#039;&#039;the YAMBO_TUTORIALS&#039;&#039;&#039; folder. For example&lt;br /&gt;
 $ mkdir YAMBO_TUTORIALS&lt;br /&gt;
 $ mv hBN.tar.gz YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ tar -xvfz hBN.tar.gz&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN&lt;br /&gt;
&lt;br /&gt;
====Files needed for modular tutorials====&lt;br /&gt;
All of the following should be downloaded prior to following the modular tutorials:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] [15 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-convergence-kpoints.tar.gz hBN-convergence-kpoints.tar.gz] [254 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz] [8.6 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz] [143 MB]&lt;br /&gt;
&lt;br /&gt;
====Files needed for stand-alone tutorials====&lt;br /&gt;
At the start of each tutorial you will be told which specific file needs to be downloaded:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Silicon.tar.gz Silicon.tar.gz] [&amp;lt;1 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/LiF.tar.gz LiF.tar.gz]  [1.4 MB],&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_surface.tar.gz Si_surface.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_wire.tar.gz Si_wire.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/H2.tar.gz H2.tar.gz]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Aluminum.tar.gz Aluminum.tar.gz] [&amp;lt;1 MB],&lt;br /&gt;
&amp;lt;!--[http://www.yambo-code.org/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz]--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Hydrogen_Chain.tar.gz Hydrogen_Chain.tar.gz] [14 MB]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== From the Git Tutorial Repository (advanced users) ===&lt;br /&gt;
If you are using your own installation or the docker, the [https://github.com/yambo-code/tutorials tutorials repository] contains the updated tutorials CORE databases. To use it&lt;br /&gt;
 $ git clone https://github.com/yambo-code/tutorials.git YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ ./setup.pl -install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Stand-alone overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Stand-alone tutorials ==&lt;br /&gt;
&lt;br /&gt;
These tutorials are self-contained and cover a variety of mixed topics, both physical and methodological. They are designed to be followed from start to finish in one page and do not require previous knowledge of yambo. 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;
=== Basic ===&lt;br /&gt;
* [[LiF|Linear Response in 3D. Excitons at work]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[Si_Surface|Linear Response in 2D]]&lt;br /&gt;
* [[Si_wire|Linear Response in 1D]]&lt;br /&gt;
* [[H2|Linear Response in 0D]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* [[Silicon|GW convergence]]&lt;br /&gt;
&lt;br /&gt;
=== Advanced ===&lt;br /&gt;
* [[Hydrogen chain|TDDFT Failure and long range correlations]]&lt;br /&gt;
* [[Linear response from real time simulations]]&lt;br /&gt;
&lt;br /&gt;
==== GW and Quasi-particles ====&lt;br /&gt;
&lt;br /&gt;
* [[Real_Axis_and_Lifetimes|Real Axis and Lifetimes]]&lt;br /&gt;
* [[Self-consistent GW on eigenvalues only]]&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;
&lt;br /&gt;
==== Non linear response ====&lt;br /&gt;
&lt;br /&gt;
* [http://www.attaccalite.com/lumen/linear_response.html Linear response using Dynamical Berry phase]&lt;br /&gt;
* [[Real time approach to non-linear response]]&lt;br /&gt;
* [[Correlation effects in the non-linear response]]&lt;br /&gt;
* [http://www.attaccalite.com/lumen/thg_in_silicon.html Third Harmonic Generation]&lt;br /&gt;
* [http://www.attaccalite.com/lumen/spin_orbit.html Spin-orbit coupling and non-linear response]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
* [[SOC|Spin-Orbit Coupling MBPT]]&lt;br /&gt;
* [[Kerr|Kerr]]&lt;br /&gt;
* [[Real_Time|Real-Time]]&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;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Modular overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Modular tutorials ==&lt;br /&gt;
These tutorials are designed to provide a deeper understanding of specific yambo tasks and runlevels. They are designed to avoid repetition of common procedures and physical concepts. As such, they make use of the same physical systems: bulk hexagonal boron nitride &#039;&#039;hBN&#039;&#039; and a hBN sheet &#039;&#039;hBN-2D&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
====Introduction====&lt;br /&gt;
* [[First steps: a walk through from DFT to optical properties]]&lt;br /&gt;
====Quasiparticles in the GW approximation====&lt;br /&gt;
* [[How to obtain the quasi-particle band structure of a bulk material: h-BN]]&lt;br /&gt;
====Using Yambo in Parallel====&lt;br /&gt;
This modules contains very general discussions of the parallel environment of Yambo. Still the actual run of the code is specific to the CECAM cluster. If you want to run these modules just replace the parallel queue instructions with simple MPI commands.&lt;br /&gt;
&lt;br /&gt;
* [[GW_parallel_strategies|Parallel GW (CECAM specific)]]: strategies for running Yambo in parallel&lt;br /&gt;
[[GW_parallel_strategies_CECAM]]&lt;br /&gt;
* [[Pushing_convergence_in_parallel|GW convergence (CECAM specific)]]: use Yambo in parallel to converge a GW calculation for a layer of hBN (hBN-2D)&lt;br /&gt;
&lt;br /&gt;
====Excitons and the Bethe-Salpeter Equation====&lt;br /&gt;
* [[How to obtain an optical spectrum|Calculating optical spectra including excitonic effects: a step-by-step guide]]&lt;br /&gt;
* [[How to choose the input parameters|Obtaining a converged optical spectrum]] &lt;br /&gt;
* [[How to treat low dimensional systems|Many-body effects in low-dimensional systems: numerical issues and remedies]] &lt;br /&gt;
* [[How to analyse excitons|Analysis of excitonic spectra in a 2D material]]&lt;br /&gt;
&amp;lt;!--* [[Two particle excitations]] (try to bypass this page) : Learn how to set up and run calculations to obtain and analyze an optical absorption spectrum of bulk and low dimension materials by using the Bethe-Salpeter equation--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Yambo-python driver====&lt;br /&gt;
* [[First steps in Yambopy]]&lt;br /&gt;
* [[GW tutorial. Convergence and approximations (BN)]]&lt;br /&gt;
* [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
====Real-time simulations====&lt;br /&gt;
* [[Breaking of symmetries]]&lt;br /&gt;
* [[Independent-Particle Approximation Dynamics. Delta Pulse]]&lt;br /&gt;
* [[Post-processing. Optical Response]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- [[Instructions for CECAM students]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
Alternatively, users can learn more about a specific runlevel or task by looking at the individual &#039;&#039;&#039;[[Modules|documentation modules]]&#039;&#039;&#039;. These provide a focus on the input parameters, run time behaviour, and underlying physics. Although they can be followed separately, non-experts are urged to follow them as part of the more structured tutorials given above.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Schools&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Schools ==&lt;br /&gt;
&lt;br /&gt;
* [[ICTP2020]]&lt;br /&gt;
* [[CECAM VIRTUAL 2021]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=4714</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=4714"/>
		<updated>2021-04-03T09:38:33Z</updated>

		<summary type="html">&lt;p&gt;Myrta: /* From the Git Tutorial Repository (advanced users) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- &#039;&#039;&#039;ICTP students should start [[ICTP2020|HERE]]&#039;&#039;&#039;  --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are starting out with Yambo, or even an experienced user, we recommend that you complete the following tutorials before trying to use Yambo for your system.&lt;br /&gt;
&lt;br /&gt;
The tutorials are meant to give some introductory background to the key concepts behind Yambo. Practical topics such as convergence are also discussed. &lt;br /&gt;
Nonetheless, users are invited to first read and study the [[lectures|background material]] in order to get familiar with the fundamental physical quantities.&lt;br /&gt;
&lt;br /&gt;
Two kinds of tutorials are provided: &#039;&#039;&#039;stand-alone&#039;&#039;&#039; and &#039;&#039;&#039;modular&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Tutorial files ==&lt;br /&gt;
&lt;br /&gt;
The tutorial CORE databases can be obtained&lt;br /&gt;
&lt;br /&gt;
* from the [[Yambo_Virtual_Machine|Yambo Virtual Machine]] &lt;br /&gt;
* from the Yambo web-page&lt;br /&gt;
* from the Yambo GIT tutorial repository &lt;br /&gt;
&lt;br /&gt;
=== From the Yambo Virtual Machine (VM)  ===&lt;br /&gt;
If you are using the VM, a recent version of the tutorial files is provided.Follow these [[Yambo_Virtual_Machine#Updating_the_Yambo_tutorial_files| instructions]] to update the tutorial files to the most recent version.&lt;br /&gt;
&lt;br /&gt;
=== From the Yambo website ===&lt;br /&gt;
If you are using your own installation or the docker, the files needed to run the tutorials can be downloaded from the Tutorial pages. &lt;br /&gt;
&lt;br /&gt;
After downloading the tar.gz files just unpack them in &#039;&#039;&#039;the YAMBO_TUTORIALS&#039;&#039;&#039; folder. For example&lt;br /&gt;
 $ mkdir YAMBO_TUTORIALS&lt;br /&gt;
 $ mv hBN.tar.gz YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ tar -xvfz hBN.tar.gz&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN&lt;br /&gt;
&lt;br /&gt;
=== From the Git Tutorial Repository (advanced users) ===&lt;br /&gt;
If you are using your own installation or the docker, the [https://github.com/yambo-code/tutorials tutorials repository] contains the updated tutorials CORE databases. To use it&lt;br /&gt;
 $ git clone https://github.com/yambo-code/tutorials.git YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ ./setup.pl -install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Files needed for modular tutorials====&lt;br /&gt;
All of the following should be downloaded prior to following the modular tutorials:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] [15 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-convergence-kpoints.tar.gz hBN-convergence-kpoints.tar.gz] [254 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz] [8.6 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz] [143 MB]&lt;br /&gt;
&lt;br /&gt;
====Files needed for stand-alone tutorials====&lt;br /&gt;
At the start of each tutorial you will be told which specific file needs to be downloaded:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Silicon.tar.gz Silicon.tar.gz] [&amp;lt;1 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/LiF.tar.gz LiF.tar.gz]  [1.4 MB],&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_surface.tar.gz Si_surface.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_wire.tar.gz Si_wire.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/H2.tar.gz H2.tar.gz]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Aluminum.tar.gz Aluminum.tar.gz] [&amp;lt;1 MB],&lt;br /&gt;
&amp;lt;!--[http://www.yambo-code.org/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz]--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Hydrogen_Chain.tar.gz Hydrogen_Chain.tar.gz] [14 MB]&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Stand-alone overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Stand-alone tutorials ==&lt;br /&gt;
&lt;br /&gt;
These tutorials are self-contained and cover a variety of mixed topics, both physical and methodological. They are designed to be followed from start to finish in one page and do not require previous knowledge of yambo. 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;
=== Basic ===&lt;br /&gt;
* [[LiF|Linear Response in 3D. Excitons at work]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[Si_Surface|Linear Response in 2D]]&lt;br /&gt;
* [[Si_wire|Linear Response in 1D]]&lt;br /&gt;
* [[H2|Linear Response in 0D]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* [[Silicon|GW convergence]]&lt;br /&gt;
&lt;br /&gt;
=== Advanced ===&lt;br /&gt;
* [[Hydrogen chain|TDDFT Failure and long range correlations]]&lt;br /&gt;
* [[Linear response from real time simulations]]&lt;br /&gt;
&lt;br /&gt;
==== GW and Quasi-particles ====&lt;br /&gt;
&lt;br /&gt;
* [[Real_Axis_and_Lifetimes|Real Axis and Lifetimes]]&lt;br /&gt;
* [[Self-consistent GW on eigenvalues only]]&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;
&lt;br /&gt;
==== Non linear response ====&lt;br /&gt;
&lt;br /&gt;
* [http://www.attaccalite.com/lumen/linear_response.html Linear response using Dynamical Berry phase]&lt;br /&gt;
* [[Real time approach to non-linear response]]&lt;br /&gt;
* [[Correlation effects in the non-linear response]]&lt;br /&gt;
* [http://www.attaccalite.com/lumen/thg_in_silicon.html Third Harmonic Generation]&lt;br /&gt;
* [http://www.attaccalite.com/lumen/spin_orbit.html Spin-orbit coupling and non-linear response]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
* [[SOC|Spin-Orbit Coupling MBPT]]&lt;br /&gt;
* [[Kerr|Kerr]]&lt;br /&gt;
* [[Real_Time|Real-Time]]&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;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Modular overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Modular tutorials ==&lt;br /&gt;
These tutorials are designed to provide a deeper understanding of specific yambo tasks and runlevels. They are designed to avoid repetition of common procedures and physical concepts. As such, they make use of the same physical systems: bulk hexagonal boron nitride &#039;&#039;hBN&#039;&#039; and a hBN sheet &#039;&#039;hBN-2D&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
====Introduction====&lt;br /&gt;
* [[First steps: a walk through from DFT to optical properties]]&lt;br /&gt;
====Quasiparticles in the GW approximation====&lt;br /&gt;
* [[How to obtain the quasi-particle band structure of a bulk material: h-BN]]&lt;br /&gt;
====Using Yambo in Parallel====&lt;br /&gt;
This modules contains very general discussions of the parallel environment of Yambo. Still the actual run of the code is specific to the CECAM cluster. If you want to run these modules just replace the parallel queue instructions with simple MPI commands.&lt;br /&gt;
&lt;br /&gt;
* [[GW_parallel_strategies|Parallel GW (CECAM specific)]]: strategies for running Yambo in parallel&lt;br /&gt;
[[GW_parallel_strategies_CECAM]]&lt;br /&gt;
* [[Pushing_convergence_in_parallel|GW convergence (CECAM specific)]]: use Yambo in parallel to converge a GW calculation for a layer of hBN (hBN-2D)&lt;br /&gt;
&lt;br /&gt;
====Excitons and the Bethe-Salpeter Equation====&lt;br /&gt;
* [[How to obtain an optical spectrum|Calculating optical spectra including excitonic effects: a step-by-step guide]]&lt;br /&gt;
* [[How to choose the input parameters|Obtaining a converged optical spectrum]] &lt;br /&gt;
* [[How to treat low dimensional systems|Many-body effects in low-dimensional systems: numerical issues and remedies]] &lt;br /&gt;
* [[How to analyse excitons|Analysis of excitonic spectra in a 2D material]]&lt;br /&gt;
&amp;lt;!--* [[Two particle excitations]] (try to bypass this page) : Learn how to set up and run calculations to obtain and analyze an optical absorption spectrum of bulk and low dimension materials by using the Bethe-Salpeter equation--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Yambo-python driver====&lt;br /&gt;
* [[First steps in Yambopy]]&lt;br /&gt;
* [[GW tutorial. Convergence and approximations (BN)]]&lt;br /&gt;
* [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
====Real-time simulations====&lt;br /&gt;
* [[Breaking of symmetries]]&lt;br /&gt;
* [[Independent-Particle Approximation Dynamics. Delta Pulse]]&lt;br /&gt;
* [[Post-processing. Optical Response]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- [[Instructions for CECAM students]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
Alternatively, users can learn more about a specific runlevel or task by looking at the individual &#039;&#039;&#039;[[Modules|documentation modules]]&#039;&#039;&#039;. These provide a focus on the input parameters, run time behaviour, and underlying physics. Although they can be followed separately, non-experts are urged to follow them as part of the more structured tutorials given above.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Schools&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Schools ==&lt;br /&gt;
&lt;br /&gt;
* [[ICTP2020]]&lt;br /&gt;
* [[CECAM VIRTUAL 2021]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=4713</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=4713"/>
		<updated>2021-04-03T09:37:26Z</updated>

		<summary type="html">&lt;p&gt;Myrta: /* From the Yambo website */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- &#039;&#039;&#039;ICTP students should start [[ICTP2020|HERE]]&#039;&#039;&#039;  --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are starting out with Yambo, or even an experienced user, we recommend that you complete the following tutorials before trying to use Yambo for your system.&lt;br /&gt;
&lt;br /&gt;
The tutorials are meant to give some introductory background to the key concepts behind Yambo. Practical topics such as convergence are also discussed. &lt;br /&gt;
Nonetheless, users are invited to first read and study the [[lectures|background material]] in order to get familiar with the fundamental physical quantities.&lt;br /&gt;
&lt;br /&gt;
Two kinds of tutorials are provided: &#039;&#039;&#039;stand-alone&#039;&#039;&#039; and &#039;&#039;&#039;modular&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Tutorial files ==&lt;br /&gt;
&lt;br /&gt;
The tutorial CORE databases can be obtained&lt;br /&gt;
&lt;br /&gt;
* from the [[Yambo_Virtual_Machine|Yambo Virtual Machine]] &lt;br /&gt;
* from the Yambo web-page&lt;br /&gt;
* from the Yambo GIT tutorial repository &lt;br /&gt;
&lt;br /&gt;
=== From the Yambo Virtual Machine (VM)  ===&lt;br /&gt;
If you are using the VM, a recent version of the tutorial files is provided.Follow these [[Yambo_Virtual_Machine#Updating_the_Yambo_tutorial_files| instructions]] to update the tutorial files to the most recent version.&lt;br /&gt;
&lt;br /&gt;
=== From the Yambo website ===&lt;br /&gt;
If you are using your own installation or the docker, the files needed to run the tutorials can be downloaded from the Tutorial pages. &lt;br /&gt;
&lt;br /&gt;
After downloading the tar.gz files just unpack them in &#039;&#039;&#039;the YAMBO_TUTORIALS&#039;&#039;&#039; folder. For example&lt;br /&gt;
 $ mkdir YAMBO_TUTORIALS&lt;br /&gt;
 $ mv hBN.tar.gz YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ tar -xvfz hBN.tar.gz&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN&lt;br /&gt;
&lt;br /&gt;
=== From the Git Tutorial Repository (advanced users) ===&lt;br /&gt;
The [https://github.com/yambo-code/tutorials tutorials repository] contains the most updated tutorials CORE databases. To use it&lt;br /&gt;
 $ git clone https://github.com/yambo-code/tutorials.git YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ ./setup.pl -install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Files needed for modular tutorials====&lt;br /&gt;
All of the following should be downloaded prior to following the modular tutorials:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] [15 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-convergence-kpoints.tar.gz hBN-convergence-kpoints.tar.gz] [254 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz] [8.6 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz] [143 MB]&lt;br /&gt;
&lt;br /&gt;
====Files needed for stand-alone tutorials====&lt;br /&gt;
At the start of each tutorial you will be told which specific file needs to be downloaded:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Silicon.tar.gz Silicon.tar.gz] [&amp;lt;1 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/LiF.tar.gz LiF.tar.gz]  [1.4 MB],&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_surface.tar.gz Si_surface.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_wire.tar.gz Si_wire.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/H2.tar.gz H2.tar.gz]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Aluminum.tar.gz Aluminum.tar.gz] [&amp;lt;1 MB],&lt;br /&gt;
&amp;lt;!--[http://www.yambo-code.org/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz]--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Hydrogen_Chain.tar.gz Hydrogen_Chain.tar.gz] [14 MB]&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Stand-alone overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Stand-alone tutorials ==&lt;br /&gt;
&lt;br /&gt;
These tutorials are self-contained and cover a variety of mixed topics, both physical and methodological. They are designed to be followed from start to finish in one page and do not require previous knowledge of yambo. 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;
=== Basic ===&lt;br /&gt;
* [[LiF|Linear Response in 3D. Excitons at work]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[Si_Surface|Linear Response in 2D]]&lt;br /&gt;
* [[Si_wire|Linear Response in 1D]]&lt;br /&gt;
* [[H2|Linear Response in 0D]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* [[Silicon|GW convergence]]&lt;br /&gt;
&lt;br /&gt;
=== Advanced ===&lt;br /&gt;
* [[Hydrogen chain|TDDFT Failure and long range correlations]]&lt;br /&gt;
* [[Linear response from real time simulations]]&lt;br /&gt;
&lt;br /&gt;
==== GW and Quasi-particles ====&lt;br /&gt;
&lt;br /&gt;
* [[Real_Axis_and_Lifetimes|Real Axis and Lifetimes]]&lt;br /&gt;
* [[Self-consistent GW on eigenvalues only]]&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;
&lt;br /&gt;
==== Non linear response ====&lt;br /&gt;
&lt;br /&gt;
* [http://www.attaccalite.com/lumen/linear_response.html Linear response using Dynamical Berry phase]&lt;br /&gt;
* [[Real time approach to non-linear response]]&lt;br /&gt;
* [[Correlation effects in the non-linear response]]&lt;br /&gt;
* [http://www.attaccalite.com/lumen/thg_in_silicon.html Third Harmonic Generation]&lt;br /&gt;
* [http://www.attaccalite.com/lumen/spin_orbit.html Spin-orbit coupling and non-linear response]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
* [[SOC|Spin-Orbit Coupling MBPT]]&lt;br /&gt;
* [[Kerr|Kerr]]&lt;br /&gt;
* [[Real_Time|Real-Time]]&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;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Modular overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Modular tutorials ==&lt;br /&gt;
These tutorials are designed to provide a deeper understanding of specific yambo tasks and runlevels. They are designed to avoid repetition of common procedures and physical concepts. As such, they make use of the same physical systems: bulk hexagonal boron nitride &#039;&#039;hBN&#039;&#039; and a hBN sheet &#039;&#039;hBN-2D&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
====Introduction====&lt;br /&gt;
* [[First steps: a walk through from DFT to optical properties]]&lt;br /&gt;
====Quasiparticles in the GW approximation====&lt;br /&gt;
* [[How to obtain the quasi-particle band structure of a bulk material: h-BN]]&lt;br /&gt;
====Using Yambo in Parallel====&lt;br /&gt;
This modules contains very general discussions of the parallel environment of Yambo. Still the actual run of the code is specific to the CECAM cluster. If you want to run these modules just replace the parallel queue instructions with simple MPI commands.&lt;br /&gt;
&lt;br /&gt;
* [[GW_parallel_strategies|Parallel GW (CECAM specific)]]: strategies for running Yambo in parallel&lt;br /&gt;
[[GW_parallel_strategies_CECAM]]&lt;br /&gt;
* [[Pushing_convergence_in_parallel|GW convergence (CECAM specific)]]: use Yambo in parallel to converge a GW calculation for a layer of hBN (hBN-2D)&lt;br /&gt;
&lt;br /&gt;
====Excitons and the Bethe-Salpeter Equation====&lt;br /&gt;
* [[How to obtain an optical spectrum|Calculating optical spectra including excitonic effects: a step-by-step guide]]&lt;br /&gt;
* [[How to choose the input parameters|Obtaining a converged optical spectrum]] &lt;br /&gt;
* [[How to treat low dimensional systems|Many-body effects in low-dimensional systems: numerical issues and remedies]] &lt;br /&gt;
* [[How to analyse excitons|Analysis of excitonic spectra in a 2D material]]&lt;br /&gt;
&amp;lt;!--* [[Two particle excitations]] (try to bypass this page) : Learn how to set up and run calculations to obtain and analyze an optical absorption spectrum of bulk and low dimension materials by using the Bethe-Salpeter equation--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Yambo-python driver====&lt;br /&gt;
* [[First steps in Yambopy]]&lt;br /&gt;
* [[GW tutorial. Convergence and approximations (BN)]]&lt;br /&gt;
* [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
====Real-time simulations====&lt;br /&gt;
* [[Breaking of symmetries]]&lt;br /&gt;
* [[Independent-Particle Approximation Dynamics. Delta Pulse]]&lt;br /&gt;
* [[Post-processing. Optical Response]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- [[Instructions for CECAM students]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
Alternatively, users can learn more about a specific runlevel or task by looking at the individual &#039;&#039;&#039;[[Modules|documentation modules]]&#039;&#039;&#039;. These provide a focus on the input parameters, run time behaviour, and underlying physics. Although they can be followed separately, non-experts are urged to follow them as part of the more structured tutorials given above.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Schools&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Schools ==&lt;br /&gt;
&lt;br /&gt;
* [[ICTP2020]]&lt;br /&gt;
* [[CECAM VIRTUAL 2021]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=4712</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=4712"/>
		<updated>2021-04-03T09:35:13Z</updated>

		<summary type="html">&lt;p&gt;Myrta: /* From the Yambo website */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- &#039;&#039;&#039;ICTP students should start [[ICTP2020|HERE]]&#039;&#039;&#039;  --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are starting out with Yambo, or even an experienced user, we recommend that you complete the following tutorials before trying to use Yambo for your system.&lt;br /&gt;
&lt;br /&gt;
The tutorials are meant to give some introductory background to the key concepts behind Yambo. Practical topics such as convergence are also discussed. &lt;br /&gt;
Nonetheless, users are invited to first read and study the [[lectures|background material]] in order to get familiar with the fundamental physical quantities.&lt;br /&gt;
&lt;br /&gt;
Two kinds of tutorials are provided: &#039;&#039;&#039;stand-alone&#039;&#039;&#039; and &#039;&#039;&#039;modular&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Tutorial files ==&lt;br /&gt;
&lt;br /&gt;
The tutorial CORE databases can be obtained&lt;br /&gt;
&lt;br /&gt;
* from the [[Yambo_Virtual_Machine|Yambo Virtual Machine]] &lt;br /&gt;
* from the Yambo web-page&lt;br /&gt;
* from the Yambo GIT tutorial repository &lt;br /&gt;
&lt;br /&gt;
=== From the Yambo Virtual Machine (VM)  ===&lt;br /&gt;
If you are using the VM, a recent version of the tutorial files is provided.Follow these [[Yambo_Virtual_Machine#Updating_the_Yambo_tutorial_files| instructions]] to update the tutorial files to the most recent version.&lt;br /&gt;
&lt;br /&gt;
=== From the Yambo website ===&lt;br /&gt;
The files needed to run the tutorials can be downloaded from the Yambo website. &lt;br /&gt;
&lt;br /&gt;
After downloading the tar.gz files just unpack them in &#039;&#039;&#039;the YAMBO_TUTORIALS&#039;&#039;&#039; folder. For example&lt;br /&gt;
 $ mkdir YAMBO_TUTORIALS&lt;br /&gt;
 $ mv hBN.tar.gz YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ tar -xvfz hBN.tar.gz&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN&lt;br /&gt;
&lt;br /&gt;
=== From the Git Tutorial Repository (advanced users) ===&lt;br /&gt;
The [https://github.com/yambo-code/tutorials tutorials repository] contains the most updated tutorials CORE databases. To use it&lt;br /&gt;
 $ git clone https://github.com/yambo-code/tutorials.git YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ ./setup.pl -install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Files needed for modular tutorials====&lt;br /&gt;
All of the following should be downloaded prior to following the modular tutorials:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] [15 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-convergence-kpoints.tar.gz hBN-convergence-kpoints.tar.gz] [254 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz] [8.6 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz] [143 MB]&lt;br /&gt;
&lt;br /&gt;
====Files needed for stand-alone tutorials====&lt;br /&gt;
At the start of each tutorial you will be told which specific file needs to be downloaded:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Silicon.tar.gz Silicon.tar.gz] [&amp;lt;1 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/LiF.tar.gz LiF.tar.gz]  [1.4 MB],&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_surface.tar.gz Si_surface.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_wire.tar.gz Si_wire.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/H2.tar.gz H2.tar.gz]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Aluminum.tar.gz Aluminum.tar.gz] [&amp;lt;1 MB],&lt;br /&gt;
&amp;lt;!--[http://www.yambo-code.org/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz]--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Hydrogen_Chain.tar.gz Hydrogen_Chain.tar.gz] [14 MB]&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Stand-alone overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Stand-alone tutorials ==&lt;br /&gt;
&lt;br /&gt;
These tutorials are self-contained and cover a variety of mixed topics, both physical and methodological. They are designed to be followed from start to finish in one page and do not require previous knowledge of yambo. 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;
=== Basic ===&lt;br /&gt;
* [[LiF|Linear Response in 3D. Excitons at work]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[Si_Surface|Linear Response in 2D]]&lt;br /&gt;
* [[Si_wire|Linear Response in 1D]]&lt;br /&gt;
* [[H2|Linear Response in 0D]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* [[Silicon|GW convergence]]&lt;br /&gt;
&lt;br /&gt;
=== Advanced ===&lt;br /&gt;
* [[Hydrogen chain|TDDFT Failure and long range correlations]]&lt;br /&gt;
* [[Linear response from real time simulations]]&lt;br /&gt;
&lt;br /&gt;
==== GW and Quasi-particles ====&lt;br /&gt;
&lt;br /&gt;
* [[Real_Axis_and_Lifetimes|Real Axis and Lifetimes]]&lt;br /&gt;
* [[Self-consistent GW on eigenvalues only]]&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;
&lt;br /&gt;
==== Non linear response ====&lt;br /&gt;
&lt;br /&gt;
* [http://www.attaccalite.com/lumen/linear_response.html Linear response using Dynamical Berry phase]&lt;br /&gt;
* [[Real time approach to non-linear response]]&lt;br /&gt;
* [[Correlation effects in the non-linear response]]&lt;br /&gt;
* [http://www.attaccalite.com/lumen/thg_in_silicon.html Third Harmonic Generation]&lt;br /&gt;
* [http://www.attaccalite.com/lumen/spin_orbit.html Spin-orbit coupling and non-linear response]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
* [[SOC|Spin-Orbit Coupling MBPT]]&lt;br /&gt;
* [[Kerr|Kerr]]&lt;br /&gt;
* [[Real_Time|Real-Time]]&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;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Modular overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Modular tutorials ==&lt;br /&gt;
These tutorials are designed to provide a deeper understanding of specific yambo tasks and runlevels. They are designed to avoid repetition of common procedures and physical concepts. As such, they make use of the same physical systems: bulk hexagonal boron nitride &#039;&#039;hBN&#039;&#039; and a hBN sheet &#039;&#039;hBN-2D&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
====Introduction====&lt;br /&gt;
* [[First steps: a walk through from DFT to optical properties]]&lt;br /&gt;
====Quasiparticles in the GW approximation====&lt;br /&gt;
* [[How to obtain the quasi-particle band structure of a bulk material: h-BN]]&lt;br /&gt;
====Using Yambo in Parallel====&lt;br /&gt;
This modules contains very general discussions of the parallel environment of Yambo. Still the actual run of the code is specific to the CECAM cluster. If you want to run these modules just replace the parallel queue instructions with simple MPI commands.&lt;br /&gt;
&lt;br /&gt;
* [[GW_parallel_strategies|Parallel GW (CECAM specific)]]: strategies for running Yambo in parallel&lt;br /&gt;
[[GW_parallel_strategies_CECAM]]&lt;br /&gt;
* [[Pushing_convergence_in_parallel|GW convergence (CECAM specific)]]: use Yambo in parallel to converge a GW calculation for a layer of hBN (hBN-2D)&lt;br /&gt;
&lt;br /&gt;
====Excitons and the Bethe-Salpeter Equation====&lt;br /&gt;
* [[How to obtain an optical spectrum|Calculating optical spectra including excitonic effects: a step-by-step guide]]&lt;br /&gt;
* [[How to choose the input parameters|Obtaining a converged optical spectrum]] &lt;br /&gt;
* [[How to treat low dimensional systems|Many-body effects in low-dimensional systems: numerical issues and remedies]] &lt;br /&gt;
* [[How to analyse excitons|Analysis of excitonic spectra in a 2D material]]&lt;br /&gt;
&amp;lt;!--* [[Two particle excitations]] (try to bypass this page) : Learn how to set up and run calculations to obtain and analyze an optical absorption spectrum of bulk and low dimension materials by using the Bethe-Salpeter equation--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Yambo-python driver====&lt;br /&gt;
* [[First steps in Yambopy]]&lt;br /&gt;
* [[GW tutorial. Convergence and approximations (BN)]]&lt;br /&gt;
* [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
====Real-time simulations====&lt;br /&gt;
* [[Breaking of symmetries]]&lt;br /&gt;
* [[Independent-Particle Approximation Dynamics. Delta Pulse]]&lt;br /&gt;
* [[Post-processing. Optical Response]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- [[Instructions for CECAM students]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
Alternatively, users can learn more about a specific runlevel or task by looking at the individual &#039;&#039;&#039;[[Modules|documentation modules]]&#039;&#039;&#039;. These provide a focus on the input parameters, run time behaviour, and underlying physics. Although they can be followed separately, non-experts are urged to follow them as part of the more structured tutorials given above.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Schools&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Schools ==&lt;br /&gt;
&lt;br /&gt;
* [[ICTP2020]]&lt;br /&gt;
* [[CECAM VIRTUAL 2021]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=4711</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=4711"/>
		<updated>2021-04-03T09:32:52Z</updated>

		<summary type="html">&lt;p&gt;Myrta: /* From the Yambo Virtual Machine (VM) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- &#039;&#039;&#039;ICTP students should start [[ICTP2020|HERE]]&#039;&#039;&#039;  --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are starting out with Yambo, or even an experienced user, we recommend that you complete the following tutorials before trying to use Yambo for your system.&lt;br /&gt;
&lt;br /&gt;
The tutorials are meant to give some introductory background to the key concepts behind Yambo. Practical topics such as convergence are also discussed. &lt;br /&gt;
Nonetheless, users are invited to first read and study the [[lectures|background material]] in order to get familiar with the fundamental physical quantities.&lt;br /&gt;
&lt;br /&gt;
Two kinds of tutorials are provided: &#039;&#039;&#039;stand-alone&#039;&#039;&#039; and &#039;&#039;&#039;modular&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Tutorial files ==&lt;br /&gt;
&lt;br /&gt;
The tutorial CORE databases can be obtained&lt;br /&gt;
&lt;br /&gt;
* from the [[Yambo_Virtual_Machine|Yambo Virtual Machine]] &lt;br /&gt;
* from the Yambo web-page&lt;br /&gt;
* from the Yambo GIT tutorial repository &lt;br /&gt;
&lt;br /&gt;
=== From the Yambo Virtual Machine (VM)  ===&lt;br /&gt;
If you are using the VM, a recent version of the tutorial files is provided.Follow these [[Yambo_Virtual_Machine#Updating_the_Yambo_tutorial_files| instructions]] to update the tutorial files to the most recent version.&lt;br /&gt;
&lt;br /&gt;
=== From the Yambo website ===&lt;br /&gt;
The tutorials can be also downloaded together with the DFT input files. After downloading the tar.gz files just unpack them in &#039;&#039;&#039;the YAMBO_TUTORIALS&#039;&#039;&#039; folder. For example&lt;br /&gt;
 $ mkdir YAMBO_TUTORIALS&lt;br /&gt;
 $ mv hBN.tar.gz YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ tar -xvfz hBN.tar.gz&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN&lt;br /&gt;
&lt;br /&gt;
=== From the Git Tutorial Repository (advanced users) ===&lt;br /&gt;
The [https://github.com/yambo-code/tutorials tutorials repository] contains the most updated tutorials CORE databases. To use it&lt;br /&gt;
 $ git clone https://github.com/yambo-code/tutorials.git YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ ./setup.pl -install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Files needed for modular tutorials====&lt;br /&gt;
All of the following should be downloaded prior to following the modular tutorials:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] [15 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-convergence-kpoints.tar.gz hBN-convergence-kpoints.tar.gz] [254 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz] [8.6 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz] [143 MB]&lt;br /&gt;
&lt;br /&gt;
====Files needed for stand-alone tutorials====&lt;br /&gt;
At the start of each tutorial you will be told which specific file needs to be downloaded:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Silicon.tar.gz Silicon.tar.gz] [&amp;lt;1 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/LiF.tar.gz LiF.tar.gz]  [1.4 MB],&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_surface.tar.gz Si_surface.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_wire.tar.gz Si_wire.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/H2.tar.gz H2.tar.gz]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Aluminum.tar.gz Aluminum.tar.gz] [&amp;lt;1 MB],&lt;br /&gt;
&amp;lt;!--[http://www.yambo-code.org/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz]--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Hydrogen_Chain.tar.gz Hydrogen_Chain.tar.gz] [14 MB]&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Stand-alone overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Stand-alone tutorials ==&lt;br /&gt;
&lt;br /&gt;
These tutorials are self-contained and cover a variety of mixed topics, both physical and methodological. They are designed to be followed from start to finish in one page and do not require previous knowledge of yambo. 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;
=== Basic ===&lt;br /&gt;
* [[LiF|Linear Response in 3D. Excitons at work]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[Si_Surface|Linear Response in 2D]]&lt;br /&gt;
* [[Si_wire|Linear Response in 1D]]&lt;br /&gt;
* [[H2|Linear Response in 0D]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* [[Silicon|GW convergence]]&lt;br /&gt;
&lt;br /&gt;
=== Advanced ===&lt;br /&gt;
* [[Hydrogen chain|TDDFT Failure and long range correlations]]&lt;br /&gt;
* [[Linear response from real time simulations]]&lt;br /&gt;
&lt;br /&gt;
==== GW and Quasi-particles ====&lt;br /&gt;
&lt;br /&gt;
* [[Real_Axis_and_Lifetimes|Real Axis and Lifetimes]]&lt;br /&gt;
* [[Self-consistent GW on eigenvalues only]]&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;
&lt;br /&gt;
==== Non linear response ====&lt;br /&gt;
&lt;br /&gt;
* [http://www.attaccalite.com/lumen/linear_response.html Linear response using Dynamical Berry phase]&lt;br /&gt;
* [[Real time approach to non-linear response]]&lt;br /&gt;
* [[Correlation effects in the non-linear response]]&lt;br /&gt;
* [http://www.attaccalite.com/lumen/thg_in_silicon.html Third Harmonic Generation]&lt;br /&gt;
* [http://www.attaccalite.com/lumen/spin_orbit.html Spin-orbit coupling and non-linear response]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
* [[SOC|Spin-Orbit Coupling MBPT]]&lt;br /&gt;
* [[Kerr|Kerr]]&lt;br /&gt;
* [[Real_Time|Real-Time]]&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;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Modular overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Modular tutorials ==&lt;br /&gt;
These tutorials are designed to provide a deeper understanding of specific yambo tasks and runlevels. They are designed to avoid repetition of common procedures and physical concepts. As such, they make use of the same physical systems: bulk hexagonal boron nitride &#039;&#039;hBN&#039;&#039; and a hBN sheet &#039;&#039;hBN-2D&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
====Introduction====&lt;br /&gt;
* [[First steps: a walk through from DFT to optical properties]]&lt;br /&gt;
====Quasiparticles in the GW approximation====&lt;br /&gt;
* [[How to obtain the quasi-particle band structure of a bulk material: h-BN]]&lt;br /&gt;
====Using Yambo in Parallel====&lt;br /&gt;
This modules contains very general discussions of the parallel environment of Yambo. Still the actual run of the code is specific to the CECAM cluster. If you want to run these modules just replace the parallel queue instructions with simple MPI commands.&lt;br /&gt;
&lt;br /&gt;
* [[GW_parallel_strategies|Parallel GW (CECAM specific)]]: strategies for running Yambo in parallel&lt;br /&gt;
[[GW_parallel_strategies_CECAM]]&lt;br /&gt;
* [[Pushing_convergence_in_parallel|GW convergence (CECAM specific)]]: use Yambo in parallel to converge a GW calculation for a layer of hBN (hBN-2D)&lt;br /&gt;
&lt;br /&gt;
====Excitons and the Bethe-Salpeter Equation====&lt;br /&gt;
* [[How to obtain an optical spectrum|Calculating optical spectra including excitonic effects: a step-by-step guide]]&lt;br /&gt;
* [[How to choose the input parameters|Obtaining a converged optical spectrum]] &lt;br /&gt;
* [[How to treat low dimensional systems|Many-body effects in low-dimensional systems: numerical issues and remedies]] &lt;br /&gt;
* [[How to analyse excitons|Analysis of excitonic spectra in a 2D material]]&lt;br /&gt;
&amp;lt;!--* [[Two particle excitations]] (try to bypass this page) : Learn how to set up and run calculations to obtain and analyze an optical absorption spectrum of bulk and low dimension materials by using the Bethe-Salpeter equation--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Yambo-python driver====&lt;br /&gt;
* [[First steps in Yambopy]]&lt;br /&gt;
* [[GW tutorial. Convergence and approximations (BN)]]&lt;br /&gt;
* [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
====Real-time simulations====&lt;br /&gt;
* [[Breaking of symmetries]]&lt;br /&gt;
* [[Independent-Particle Approximation Dynamics. Delta Pulse]]&lt;br /&gt;
* [[Post-processing. Optical Response]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- [[Instructions for CECAM students]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
Alternatively, users can learn more about a specific runlevel or task by looking at the individual &#039;&#039;&#039;[[Modules|documentation modules]]&#039;&#039;&#039;. These provide a focus on the input parameters, run time behaviour, and underlying physics. Although they can be followed separately, non-experts are urged to follow them as part of the more structured tutorials given above.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Schools&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Schools ==&lt;br /&gt;
&lt;br /&gt;
* [[ICTP2020]]&lt;br /&gt;
* [[CECAM VIRTUAL 2021]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=4710</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=4710"/>
		<updated>2021-04-03T09:30:57Z</updated>

		<summary type="html">&lt;p&gt;Myrta: /* From the Yambo Virtual Machine (VM) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- &#039;&#039;&#039;ICTP students should start [[ICTP2020|HERE]]&#039;&#039;&#039;  --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are starting out with Yambo, or even an experienced user, we recommend that you complete the following tutorials before trying to use Yambo for your system.&lt;br /&gt;
&lt;br /&gt;
The tutorials are meant to give some introductory background to the key concepts behind Yambo. Practical topics such as convergence are also discussed. &lt;br /&gt;
Nonetheless, users are invited to first read and study the [[lectures|background material]] in order to get familiar with the fundamental physical quantities.&lt;br /&gt;
&lt;br /&gt;
Two kinds of tutorials are provided: &#039;&#039;&#039;stand-alone&#039;&#039;&#039; and &#039;&#039;&#039;modular&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Tutorial files ==&lt;br /&gt;
&lt;br /&gt;
The tutorial CORE databases can be obtained&lt;br /&gt;
&lt;br /&gt;
* from the [[Yambo_Virtual_Machine|Yambo Virtual Machine]] &lt;br /&gt;
* from the Yambo web-page&lt;br /&gt;
* from the Yambo GIT tutorial repository &lt;br /&gt;
&lt;br /&gt;
=== From the Yambo Virtual Machine (VM)  ===&lt;br /&gt;
If you are using the VM, follow these [[Yambo_Virtual_Machine#Updating_the_Yambo_tutorial_files| instructions]].&lt;br /&gt;
&lt;br /&gt;
=== From the Yambo website ===&lt;br /&gt;
The tutorials can be also downloaded together with the DFT input files. After downloading the tar.gz files just unpack them in &#039;&#039;&#039;the YAMBO_TUTORIALS&#039;&#039;&#039; folder. For example&lt;br /&gt;
 $ mkdir YAMBO_TUTORIALS&lt;br /&gt;
 $ mv hBN.tar.gz YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ tar -xvfz hBN.tar.gz&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN&lt;br /&gt;
&lt;br /&gt;
=== From the Git Tutorial Repository (advanced users) ===&lt;br /&gt;
The [https://github.com/yambo-code/tutorials tutorials repository] contains the most updated tutorials CORE databases. To use it&lt;br /&gt;
 $ git clone https://github.com/yambo-code/tutorials.git YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ ./setup.pl -install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Files needed for modular tutorials====&lt;br /&gt;
All of the following should be downloaded prior to following the modular tutorials:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] [15 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-convergence-kpoints.tar.gz hBN-convergence-kpoints.tar.gz] [254 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz] [8.6 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz] [143 MB]&lt;br /&gt;
&lt;br /&gt;
====Files needed for stand-alone tutorials====&lt;br /&gt;
At the start of each tutorial you will be told which specific file needs to be downloaded:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Silicon.tar.gz Silicon.tar.gz] [&amp;lt;1 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/LiF.tar.gz LiF.tar.gz]  [1.4 MB],&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_surface.tar.gz Si_surface.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_wire.tar.gz Si_wire.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/H2.tar.gz H2.tar.gz]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Aluminum.tar.gz Aluminum.tar.gz] [&amp;lt;1 MB],&lt;br /&gt;
&amp;lt;!--[http://www.yambo-code.org/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz]--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Hydrogen_Chain.tar.gz Hydrogen_Chain.tar.gz] [14 MB]&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Stand-alone overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Stand-alone tutorials ==&lt;br /&gt;
&lt;br /&gt;
These tutorials are self-contained and cover a variety of mixed topics, both physical and methodological. They are designed to be followed from start to finish in one page and do not require previous knowledge of yambo. 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;
=== Basic ===&lt;br /&gt;
* [[LiF|Linear Response in 3D. Excitons at work]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[Si_Surface|Linear Response in 2D]]&lt;br /&gt;
* [[Si_wire|Linear Response in 1D]]&lt;br /&gt;
* [[H2|Linear Response in 0D]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* [[Silicon|GW convergence]]&lt;br /&gt;
&lt;br /&gt;
=== Advanced ===&lt;br /&gt;
* [[Hydrogen chain|TDDFT Failure and long range correlations]]&lt;br /&gt;
* [[Linear response from real time simulations]]&lt;br /&gt;
&lt;br /&gt;
==== GW and Quasi-particles ====&lt;br /&gt;
&lt;br /&gt;
* [[Real_Axis_and_Lifetimes|Real Axis and Lifetimes]]&lt;br /&gt;
* [[Self-consistent GW on eigenvalues only]]&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;
&lt;br /&gt;
==== Non linear response ====&lt;br /&gt;
&lt;br /&gt;
* [http://www.attaccalite.com/lumen/linear_response.html Linear response using Dynamical Berry phase]&lt;br /&gt;
* [[Real time approach to non-linear response]]&lt;br /&gt;
* [[Correlation effects in the non-linear response]]&lt;br /&gt;
* [http://www.attaccalite.com/lumen/thg_in_silicon.html Third Harmonic Generation]&lt;br /&gt;
* [http://www.attaccalite.com/lumen/spin_orbit.html Spin-orbit coupling and non-linear response]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
* [[SOC|Spin-Orbit Coupling MBPT]]&lt;br /&gt;
* [[Kerr|Kerr]]&lt;br /&gt;
* [[Real_Time|Real-Time]]&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;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Modular overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Modular tutorials ==&lt;br /&gt;
These tutorials are designed to provide a deeper understanding of specific yambo tasks and runlevels. They are designed to avoid repetition of common procedures and physical concepts. As such, they make use of the same physical systems: bulk hexagonal boron nitride &#039;&#039;hBN&#039;&#039; and a hBN sheet &#039;&#039;hBN-2D&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
====Introduction====&lt;br /&gt;
* [[First steps: a walk through from DFT to optical properties]]&lt;br /&gt;
====Quasiparticles in the GW approximation====&lt;br /&gt;
* [[How to obtain the quasi-particle band structure of a bulk material: h-BN]]&lt;br /&gt;
====Using Yambo in Parallel====&lt;br /&gt;
This modules contains very general discussions of the parallel environment of Yambo. Still the actual run of the code is specific to the CECAM cluster. If you want to run these modules just replace the parallel queue instructions with simple MPI commands.&lt;br /&gt;
&lt;br /&gt;
* [[GW_parallel_strategies|Parallel GW (CECAM specific)]]: strategies for running Yambo in parallel&lt;br /&gt;
[[GW_parallel_strategies_CECAM]]&lt;br /&gt;
* [[Pushing_convergence_in_parallel|GW convergence (CECAM specific)]]: use Yambo in parallel to converge a GW calculation for a layer of hBN (hBN-2D)&lt;br /&gt;
&lt;br /&gt;
====Excitons and the Bethe-Salpeter Equation====&lt;br /&gt;
* [[How to obtain an optical spectrum|Calculating optical spectra including excitonic effects: a step-by-step guide]]&lt;br /&gt;
* [[How to choose the input parameters|Obtaining a converged optical spectrum]] &lt;br /&gt;
* [[How to treat low dimensional systems|Many-body effects in low-dimensional systems: numerical issues and remedies]] &lt;br /&gt;
* [[How to analyse excitons|Analysis of excitonic spectra in a 2D material]]&lt;br /&gt;
&amp;lt;!--* [[Two particle excitations]] (try to bypass this page) : Learn how to set up and run calculations to obtain and analyze an optical absorption spectrum of bulk and low dimension materials by using the Bethe-Salpeter equation--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Yambo-python driver====&lt;br /&gt;
* [[First steps in Yambopy]]&lt;br /&gt;
* [[GW tutorial. Convergence and approximations (BN)]]&lt;br /&gt;
* [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
====Real-time simulations====&lt;br /&gt;
* [[Breaking of symmetries]]&lt;br /&gt;
* [[Independent-Particle Approximation Dynamics. Delta Pulse]]&lt;br /&gt;
* [[Post-processing. Optical Response]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- [[Instructions for CECAM students]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
Alternatively, users can learn more about a specific runlevel or task by looking at the individual &#039;&#039;&#039;[[Modules|documentation modules]]&#039;&#039;&#039;. These provide a focus on the input parameters, run time behaviour, and underlying physics. Although they can be followed separately, non-experts are urged to follow them as part of the more structured tutorials given above.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Schools&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Schools ==&lt;br /&gt;
&lt;br /&gt;
* [[ICTP2020]]&lt;br /&gt;
* [[CECAM VIRTUAL 2021]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=4709</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=4709"/>
		<updated>2021-04-03T09:30:26Z</updated>

		<summary type="html">&lt;p&gt;Myrta: /* From the Yambo Virtual Machine (VM) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- &#039;&#039;&#039;ICTP students should start [[ICTP2020|HERE]]&#039;&#039;&#039;  --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are starting out with Yambo, or even an experienced user, we recommend that you complete the following tutorials before trying to use Yambo for your system.&lt;br /&gt;
&lt;br /&gt;
The tutorials are meant to give some introductory background to the key concepts behind Yambo. Practical topics such as convergence are also discussed. &lt;br /&gt;
Nonetheless, users are invited to first read and study the [[lectures|background material]] in order to get familiar with the fundamental physical quantities.&lt;br /&gt;
&lt;br /&gt;
Two kinds of tutorials are provided: &#039;&#039;&#039;stand-alone&#039;&#039;&#039; and &#039;&#039;&#039;modular&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Tutorial files ==&lt;br /&gt;
&lt;br /&gt;
The tutorial CORE databases can be obtained&lt;br /&gt;
&lt;br /&gt;
* from the [[Yambo_Virtual_Machine|Yambo Virtual Machine]] &lt;br /&gt;
* from the Yambo web-page&lt;br /&gt;
* from the Yambo GIT tutorial repository &lt;br /&gt;
&lt;br /&gt;
=== From the Yambo Virtual Machine (VM)  ===&lt;br /&gt;
If you are using the VM, follow this [[Yambo_Virtual_Machine#Updating_the_Yambo_tutorial_files| instructions]].&lt;br /&gt;
&lt;br /&gt;
=== From the Yambo website ===&lt;br /&gt;
The tutorials can be also downloaded together with the DFT input files. After downloading the tar.gz files just unpack them in &#039;&#039;&#039;the YAMBO_TUTORIALS&#039;&#039;&#039; folder. For example&lt;br /&gt;
 $ mkdir YAMBO_TUTORIALS&lt;br /&gt;
 $ mv hBN.tar.gz YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ tar -xvfz hBN.tar.gz&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN&lt;br /&gt;
&lt;br /&gt;
=== From the Git Tutorial Repository (advanced users) ===&lt;br /&gt;
The [https://github.com/yambo-code/tutorials tutorials repository] contains the most updated tutorials CORE databases. To use it&lt;br /&gt;
 $ git clone https://github.com/yambo-code/tutorials.git YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ ./setup.pl -install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Files needed for modular tutorials====&lt;br /&gt;
All of the following should be downloaded prior to following the modular tutorials:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] [15 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-convergence-kpoints.tar.gz hBN-convergence-kpoints.tar.gz] [254 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz] [8.6 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz] [143 MB]&lt;br /&gt;
&lt;br /&gt;
====Files needed for stand-alone tutorials====&lt;br /&gt;
At the start of each tutorial you will be told which specific file needs to be downloaded:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Silicon.tar.gz Silicon.tar.gz] [&amp;lt;1 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/LiF.tar.gz LiF.tar.gz]  [1.4 MB],&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_surface.tar.gz Si_surface.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_wire.tar.gz Si_wire.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/H2.tar.gz H2.tar.gz]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Aluminum.tar.gz Aluminum.tar.gz] [&amp;lt;1 MB],&lt;br /&gt;
&amp;lt;!--[http://www.yambo-code.org/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz]--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Hydrogen_Chain.tar.gz Hydrogen_Chain.tar.gz] [14 MB]&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Stand-alone overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Stand-alone tutorials ==&lt;br /&gt;
&lt;br /&gt;
These tutorials are self-contained and cover a variety of mixed topics, both physical and methodological. They are designed to be followed from start to finish in one page and do not require previous knowledge of yambo. 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;
=== Basic ===&lt;br /&gt;
* [[LiF|Linear Response in 3D. Excitons at work]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[Si_Surface|Linear Response in 2D]]&lt;br /&gt;
* [[Si_wire|Linear Response in 1D]]&lt;br /&gt;
* [[H2|Linear Response in 0D]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* [[Silicon|GW convergence]]&lt;br /&gt;
&lt;br /&gt;
=== Advanced ===&lt;br /&gt;
* [[Hydrogen chain|TDDFT Failure and long range correlations]]&lt;br /&gt;
* [[Linear response from real time simulations]]&lt;br /&gt;
&lt;br /&gt;
==== GW and Quasi-particles ====&lt;br /&gt;
&lt;br /&gt;
* [[Real_Axis_and_Lifetimes|Real Axis and Lifetimes]]&lt;br /&gt;
* [[Self-consistent GW on eigenvalues only]]&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;
&lt;br /&gt;
==== Non linear response ====&lt;br /&gt;
&lt;br /&gt;
* [http://www.attaccalite.com/lumen/linear_response.html Linear response using Dynamical Berry phase]&lt;br /&gt;
* [[Real time approach to non-linear response]]&lt;br /&gt;
* [[Correlation effects in the non-linear response]]&lt;br /&gt;
* [http://www.attaccalite.com/lumen/thg_in_silicon.html Third Harmonic Generation]&lt;br /&gt;
* [http://www.attaccalite.com/lumen/spin_orbit.html Spin-orbit coupling and non-linear response]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
* [[SOC|Spin-Orbit Coupling MBPT]]&lt;br /&gt;
* [[Kerr|Kerr]]&lt;br /&gt;
* [[Real_Time|Real-Time]]&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;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Modular overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Modular tutorials ==&lt;br /&gt;
These tutorials are designed to provide a deeper understanding of specific yambo tasks and runlevels. They are designed to avoid repetition of common procedures and physical concepts. As such, they make use of the same physical systems: bulk hexagonal boron nitride &#039;&#039;hBN&#039;&#039; and a hBN sheet &#039;&#039;hBN-2D&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
====Introduction====&lt;br /&gt;
* [[First steps: a walk through from DFT to optical properties]]&lt;br /&gt;
====Quasiparticles in the GW approximation====&lt;br /&gt;
* [[How to obtain the quasi-particle band structure of a bulk material: h-BN]]&lt;br /&gt;
====Using Yambo in Parallel====&lt;br /&gt;
This modules contains very general discussions of the parallel environment of Yambo. Still the actual run of the code is specific to the CECAM cluster. If you want to run these modules just replace the parallel queue instructions with simple MPI commands.&lt;br /&gt;
&lt;br /&gt;
* [[GW_parallel_strategies|Parallel GW (CECAM specific)]]: strategies for running Yambo in parallel&lt;br /&gt;
[[GW_parallel_strategies_CECAM]]&lt;br /&gt;
* [[Pushing_convergence_in_parallel|GW convergence (CECAM specific)]]: use Yambo in parallel to converge a GW calculation for a layer of hBN (hBN-2D)&lt;br /&gt;
&lt;br /&gt;
====Excitons and the Bethe-Salpeter Equation====&lt;br /&gt;
* [[How to obtain an optical spectrum|Calculating optical spectra including excitonic effects: a step-by-step guide]]&lt;br /&gt;
* [[How to choose the input parameters|Obtaining a converged optical spectrum]] &lt;br /&gt;
* [[How to treat low dimensional systems|Many-body effects in low-dimensional systems: numerical issues and remedies]] &lt;br /&gt;
* [[How to analyse excitons|Analysis of excitonic spectra in a 2D material]]&lt;br /&gt;
&amp;lt;!--* [[Two particle excitations]] (try to bypass this page) : Learn how to set up and run calculations to obtain and analyze an optical absorption spectrum of bulk and low dimension materials by using the Bethe-Salpeter equation--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Yambo-python driver====&lt;br /&gt;
* [[First steps in Yambopy]]&lt;br /&gt;
* [[GW tutorial. Convergence and approximations (BN)]]&lt;br /&gt;
* [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
====Real-time simulations====&lt;br /&gt;
* [[Breaking of symmetries]]&lt;br /&gt;
* [[Independent-Particle Approximation Dynamics. Delta Pulse]]&lt;br /&gt;
* [[Post-processing. Optical Response]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- [[Instructions for CECAM students]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
Alternatively, users can learn more about a specific runlevel or task by looking at the individual &#039;&#039;&#039;[[Modules|documentation modules]]&#039;&#039;&#039;. These provide a focus on the input parameters, run time behaviour, and underlying physics. Although they can be followed separately, non-experts are urged to follow them as part of the more structured tutorials given above.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Schools&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Schools ==&lt;br /&gt;
&lt;br /&gt;
* [[ICTP2020]]&lt;br /&gt;
* [[CECAM VIRTUAL 2021]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=4708</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=4708"/>
		<updated>2021-04-03T09:29:06Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- &#039;&#039;&#039;ICTP students should start [[ICTP2020|HERE]]&#039;&#039;&#039;  --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are starting out with Yambo, or even an experienced user, we recommend that you complete the following tutorials before trying to use Yambo for your system.&lt;br /&gt;
&lt;br /&gt;
The tutorials are meant to give some introductory background to the key concepts behind Yambo. Practical topics such as convergence are also discussed. &lt;br /&gt;
Nonetheless, users are invited to first read and study the [[lectures|background material]] in order to get familiar with the fundamental physical quantities.&lt;br /&gt;
&lt;br /&gt;
Two kinds of tutorials are provided: &#039;&#039;&#039;stand-alone&#039;&#039;&#039; and &#039;&#039;&#039;modular&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Tutorial files ==&lt;br /&gt;
&lt;br /&gt;
The tutorial CORE databases can be obtained&lt;br /&gt;
&lt;br /&gt;
* from the [[Yambo_Virtual_Machine|Yambo Virtual Machine]] &lt;br /&gt;
* from the Yambo web-page&lt;br /&gt;
* from the Yambo GIT tutorial repository &lt;br /&gt;
&lt;br /&gt;
=== From the Yambo Virtual Machine (VM)  ===&lt;br /&gt;
If you are using the VM, all the needed files to run the tutorials are included. You may need to update them, check the [[Yambo_Virtual_Machine#Updating_the_Yambo_tutorial_files| updated instructions]].&lt;br /&gt;
&lt;br /&gt;
=== From the Yambo website ===&lt;br /&gt;
The tutorials can be also downloaded together with the DFT input files. After downloading the tar.gz files just unpack them in &#039;&#039;&#039;the YAMBO_TUTORIALS&#039;&#039;&#039; folder. For example&lt;br /&gt;
 $ mkdir YAMBO_TUTORIALS&lt;br /&gt;
 $ mv hBN.tar.gz YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ tar -xvfz hBN.tar.gz&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN&lt;br /&gt;
&lt;br /&gt;
=== From the Git Tutorial Repository (advanced users) ===&lt;br /&gt;
The [https://github.com/yambo-code/tutorials tutorials repository] contains the most updated tutorials CORE databases. To use it&lt;br /&gt;
 $ git clone https://github.com/yambo-code/tutorials.git YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ ./setup.pl -install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Files needed for modular tutorials====&lt;br /&gt;
All of the following should be downloaded prior to following the modular tutorials:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] [15 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-convergence-kpoints.tar.gz hBN-convergence-kpoints.tar.gz] [254 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz] [8.6 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz] [143 MB]&lt;br /&gt;
&lt;br /&gt;
====Files needed for stand-alone tutorials====&lt;br /&gt;
At the start of each tutorial you will be told which specific file needs to be downloaded:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Silicon.tar.gz Silicon.tar.gz] [&amp;lt;1 MB],&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/LiF.tar.gz LiF.tar.gz]  [1.4 MB],&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_surface.tar.gz Si_surface.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_wire.tar.gz Si_wire.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/H2.tar.gz H2.tar.gz]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Aluminum.tar.gz Aluminum.tar.gz] [&amp;lt;1 MB],&lt;br /&gt;
&amp;lt;!--[http://www.yambo-code.org/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz]--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Hydrogen_Chain.tar.gz Hydrogen_Chain.tar.gz] [14 MB]&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Stand-alone overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Stand-alone tutorials ==&lt;br /&gt;
&lt;br /&gt;
These tutorials are self-contained and cover a variety of mixed topics, both physical and methodological. They are designed to be followed from start to finish in one page and do not require previous knowledge of yambo. 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;
=== Basic ===&lt;br /&gt;
* [[LiF|Linear Response in 3D. Excitons at work]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[Si_Surface|Linear Response in 2D]]&lt;br /&gt;
* [[Si_wire|Linear Response in 1D]]&lt;br /&gt;
* [[H2|Linear Response in 0D]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* [[Silicon|GW convergence]]&lt;br /&gt;
&lt;br /&gt;
=== Advanced ===&lt;br /&gt;
* [[Hydrogen chain|TDDFT Failure and long range correlations]]&lt;br /&gt;
* [[Linear response from real time simulations]]&lt;br /&gt;
&lt;br /&gt;
==== GW and Quasi-particles ====&lt;br /&gt;
&lt;br /&gt;
* [[Real_Axis_and_Lifetimes|Real Axis and Lifetimes]]&lt;br /&gt;
* [[Self-consistent GW on eigenvalues only]]&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;
&lt;br /&gt;
==== Non linear response ====&lt;br /&gt;
&lt;br /&gt;
* [http://www.attaccalite.com/lumen/linear_response.html Linear response using Dynamical Berry phase]&lt;br /&gt;
* [[Real time approach to non-linear response]]&lt;br /&gt;
* [[Correlation effects in the non-linear response]]&lt;br /&gt;
* [http://www.attaccalite.com/lumen/thg_in_silicon.html Third Harmonic Generation]&lt;br /&gt;
* [http://www.attaccalite.com/lumen/spin_orbit.html Spin-orbit coupling and non-linear response]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
* [[SOC|Spin-Orbit Coupling MBPT]]&lt;br /&gt;
* [[Kerr|Kerr]]&lt;br /&gt;
* [[Real_Time|Real-Time]]&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;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Modular overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Modular tutorials ==&lt;br /&gt;
These tutorials are designed to provide a deeper understanding of specific yambo tasks and runlevels. They are designed to avoid repetition of common procedures and physical concepts. As such, they make use of the same physical systems: bulk hexagonal boron nitride &#039;&#039;hBN&#039;&#039; and a hBN sheet &#039;&#039;hBN-2D&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
====Introduction====&lt;br /&gt;
* [[First steps: a walk through from DFT to optical properties]]&lt;br /&gt;
====Quasiparticles in the GW approximation====&lt;br /&gt;
* [[How to obtain the quasi-particle band structure of a bulk material: h-BN]]&lt;br /&gt;
====Using Yambo in Parallel====&lt;br /&gt;
This modules contains very general discussions of the parallel environment of Yambo. Still the actual run of the code is specific to the CECAM cluster. If you want to run these modules just replace the parallel queue instructions with simple MPI commands.&lt;br /&gt;
&lt;br /&gt;
* [[GW_parallel_strategies|Parallel GW (CECAM specific)]]: strategies for running Yambo in parallel&lt;br /&gt;
[[GW_parallel_strategies_CECAM]]&lt;br /&gt;
* [[Pushing_convergence_in_parallel|GW convergence (CECAM specific)]]: use Yambo in parallel to converge a GW calculation for a layer of hBN (hBN-2D)&lt;br /&gt;
&lt;br /&gt;
====Excitons and the Bethe-Salpeter Equation====&lt;br /&gt;
* [[How to obtain an optical spectrum|Calculating optical spectra including excitonic effects: a step-by-step guide]]&lt;br /&gt;
* [[How to choose the input parameters|Obtaining a converged optical spectrum]] &lt;br /&gt;
* [[How to treat low dimensional systems|Many-body effects in low-dimensional systems: numerical issues and remedies]] &lt;br /&gt;
* [[How to analyse excitons|Analysis of excitonic spectra in a 2D material]]&lt;br /&gt;
&amp;lt;!--* [[Two particle excitations]] (try to bypass this page) : Learn how to set up and run calculations to obtain and analyze an optical absorption spectrum of bulk and low dimension materials by using the Bethe-Salpeter equation--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Yambo-python driver====&lt;br /&gt;
* [[First steps in Yambopy]]&lt;br /&gt;
* [[GW tutorial. Convergence and approximations (BN)]]&lt;br /&gt;
* [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
====Real-time simulations====&lt;br /&gt;
* [[Breaking of symmetries]]&lt;br /&gt;
* [[Independent-Particle Approximation Dynamics. Delta Pulse]]&lt;br /&gt;
* [[Post-processing. Optical Response]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- [[Instructions for CECAM students]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
Alternatively, users can learn more about a specific runlevel or task by looking at the individual &#039;&#039;&#039;[[Modules|documentation modules]]&#039;&#039;&#039;. These provide a focus on the input parameters, run time behaviour, and underlying physics. Although they can be followed separately, non-experts are urged to follow them as part of the more structured tutorials given above.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Schools&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Schools ==&lt;br /&gt;
&lt;br /&gt;
* [[ICTP2020]]&lt;br /&gt;
* [[CECAM VIRTUAL 2021]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=How_to_choose_the_input_parameters&amp;diff=4622</id>
		<title>How to choose the input parameters</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=How_to_choose_the_input_parameters&amp;diff=4622"/>
		<updated>2021-04-01T15:30:43Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In a [[Calculating optical spectra including excitonic effects: a step-by-step guide|previous tutorial]], you have been guided step-by-step through the calculations of the optical spectrum of bulk &#039;&#039;h-BN&#039;&#039; by solving the Bethe-Salpeter equation. The values for the relevant input parameters have then been given to you.&lt;br /&gt;
&lt;br /&gt;
In this tutorial you will learn how to choose these parameters which are related either to the truncation of infinite sums or to the approximations of infinitesimal with small, but finite quantities. A wrong choice of these parameters can lead to inaccurate or even physically wrong results. One needs to run a series of calculations by changing the parameters until the results are &#039;&#039;converged&#039;&#039;, meaning they are changing by what you consider a negligible amount. This is a tedious yet essential part of determining the optical properties of a system.&lt;br /&gt;
&lt;br /&gt;
Note that all the operations described below can be automated. A flexible python-based interface to yambo, [[First steps in Yambopy|yambopy]], can be used for this purpose. It is worth however to go at least once through the pain of a &#039;by-hand&#039; convergence study so to better understand the automated process.&lt;br /&gt;
&lt;br /&gt;
==Before starting==&lt;br /&gt;
&lt;br /&gt;
Have completed (or be familiar with the content of) the following tutorials:&lt;br /&gt;
* [[First steps: a walk through from DFT to optical properties]]&lt;br /&gt;
* [[Calculating optical spectra including excitonic effects: a step-by-step guide]]&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
&lt;br /&gt;
Coming back to the scheme to calculate the macroscopic dielectric matrix within Bethe-Salpeter (BS), the list of the parameters that have to be determined by convergence studies are:&lt;br /&gt;
&lt;br /&gt;
[[File:Scheme2.png|500px|center|convergence parameters]]&lt;br /&gt;
&lt;br /&gt;
This provides as well a scheme for a full convergence study:&lt;br /&gt;
* first the parameters for the screening have to be determined, &lt;br /&gt;
* then the parameters for the BS kernel, and &lt;br /&gt;
* finally the convergence with respect to the choice of the k-mesh needs to performed. &lt;br /&gt;
&lt;br /&gt;
==Convergence of the static screening==&lt;br /&gt;
The parameters that need to be converged can be understood by looking at the equations:&lt;br /&gt;
[[File:Yambo-CH5.png|none|x30px|Yambo tutorial image]]&lt;br /&gt;
where &#039;&#039;&amp;amp;chi;&amp;lt;sub&amp;gt;GG&#039;&amp;lt;/sub&amp;gt;&#039;&#039; is given by&lt;br /&gt;
[[File:Dyson_rpa.png|none|x50px|Yambo tutorial image]]&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Variables#NGsBlkXs|NGsBlkXs]]&amp;lt;/code&amp;gt; : The dimension of the microscopic inverse matrix, related to [[Local fields]]&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Variables#BndsRnXs|BndsRnXs]]&amp;lt;/code&amp;gt; : The sum on bands in the independent particle &amp;amp;chi;&amp;lt;sup&amp;gt;0&amp;lt;/sup&amp;gt;&amp;lt;sub&amp;gt;GG&#039;&amp;lt;/sub&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore as shown in [[Optics at the independent particle level#Energy cutoff|this tutorial]] one can reduce the value of &lt;br /&gt;
* &amp;lt;code&amp;gt;[[Variables#FFTGvecs|FFTGvecs]]&amp;lt;/code&amp;gt;&lt;br /&gt;
since generally, fewer G-vectors are needed than what are needed in DFT calculations. This can be critical for large calculations, or for supercells with a lot of vacuum.&lt;br /&gt;
Remember that the latter parameter appears only when the input is generated specifying the verbosity level &amp;lt;code&amp;gt;-V RL&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The convergence for the static screening then is similar to the convergence of other response functions and for the plasmon-pole in [[How to obtain the quasi-particle band structure of a bulk material: h-BN|GW calculations]] and won&#039;t be covered here. Note in fact that you can re-use the database obtained (and converged) from a previous screening calculation as long as the same k-points are used.&lt;br /&gt;
&lt;br /&gt;
==Convergence of the macroscopic dielectric function==&lt;br /&gt;
In the expression for the macroscopic dielectric function &lt;br /&gt;
[[File:BSE1-Eq4.png|none|x50px]]&lt;br /&gt;
&lt;br /&gt;
depends on the summation over the pair of quasiparticle states &#039;&#039;vc&#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Variables#BSEBands|BSEBands]]&amp;lt;/code&amp;gt; : defines the &#039;&#039;vc&#039;&#039; pairs.&lt;br /&gt;
* the k-point mesh of the DFT calculations defines the &#039;&#039;&#039;k&#039;&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
Basically we need a large enough basis of transitions (pair of quasiparticle states) to correctly describe the excitons (in the energy region of interest).&lt;br /&gt;
&lt;br /&gt;
Furthermore, in the kernel components&lt;br /&gt;
&lt;br /&gt;
[[File:BSE1_Eq3.png|none|x100px]]&lt;br /&gt;
&lt;br /&gt;
the summations over &#039;&#039;&#039;G&#039;&#039;&#039; vectors appear. These corresponds to two parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Variables#BSENGblk|BSENGblk]]&amp;lt;/code&amp;gt;: defines the screened interaction block size (double sum in &#039;&#039;W&#039;&#039;), related to the electron-hole attraction.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Variables#BSENGexx|BSENGexx]]&amp;lt;/code&amp;gt;: defines the components of Hartree potential (the sum in &#039;&#039;V&#039;&#039;), related to local fields.&lt;br /&gt;
&lt;br /&gt;
In the following we will see how the spectrum depends on these parameters.&lt;br /&gt;
&lt;br /&gt;
===Prepare the common databases===&lt;br /&gt;
&lt;br /&gt;
Enter the &amp;lt;code&amp;gt;hBN&amp;lt;/code&amp;gt; directory (containing a 6x6x2 k-grid SAVE) and run the initialization if you didn&#039;t do it before. &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; cd YAMBO_TUTORIALS/hBN/YAMBO&lt;br /&gt;
&lt;br /&gt;
For all the calculations in this sessions you can fix the screening parameters, and thus calculate the screening once for all.&lt;br /&gt;
Following the scheme we learned in previous tutorial:&lt;br /&gt;
&lt;br /&gt;
* Create the input for calculating the screening:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F 02_screening.in -X s&lt;br /&gt;
&lt;br /&gt;
* Modify the input as follows&lt;br /&gt;
&lt;br /&gt;
 NGsBlkXs = 4 Ry&lt;br /&gt;
 %BndsRnXs&lt;br /&gt;
  1 | 40 |&lt;br /&gt;
 %&lt;br /&gt;
 %LongDrXS&lt;br /&gt;
  1.000 | 1.000 | 1.000|&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
* Run the calculation for the screening&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F 02_screening.in &lt;br /&gt;
&lt;br /&gt;
As we do not specify a particular prefix, the screening databases  &amp;lt;code&amp;gt;ndb.dip_iR_and_P, ndb.em1s&amp;lt;/code&amp;gt; are saved in the &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; folder and visible to all the subsequent jobs you will launch is this directory.&lt;br /&gt;
&lt;br /&gt;
===Convergence with the cut-off for reciprocal lattice vectors sums=== &lt;br /&gt;
As next step, create the input for calculating the macroscopic dielectric function:&lt;br /&gt;
 &amp;gt; yambo -F 03_bse.in -o b -k sex -y d -V qp&lt;br /&gt;
Which combines the BS kernel + BS solver (diagonalization) runlevels&lt;br /&gt;
* Modify the input as follows&lt;br /&gt;
 [[Variables#BSENGexx|BSENGexx]] = 30 Ry&lt;br /&gt;
 [[Variables#BSENGBlk|BSENGBlk]] = 4 Ry&lt;br /&gt;
 % [[Variables#BSEBands|BSEBands]]&lt;br /&gt;
  6 | 10 |       &lt;br /&gt;
 %&lt;br /&gt;
 % [[Variables#BEnRange|BEnRange]]&lt;br /&gt;
   2.00000 | 8.00000 | eV    &lt;br /&gt;
 %&lt;br /&gt;
 [[Variables#BEnSteps|BEnSteps]]= 100      &lt;br /&gt;
 % [[Variables#BDmRange|BDmRange]]&lt;br /&gt;
   0.10000 |  0.10000 | eV    &lt;br /&gt;
 %&lt;br /&gt;
 % [[Variables#BLongDir|BLongDir]]&lt;br /&gt;
  1.000000 | 1.000000 | 0.000000 | &lt;br /&gt;
 %&lt;br /&gt;
 % [[Variables#KfnQP_E|KfnQP_E]] &lt;br /&gt;
  1.440000 | 1.000000 | 1.000000 |&lt;br /&gt;
 %&lt;br /&gt;
* Launch the calculation:&lt;br /&gt;
 &amp;gt; yambo -F 03_bse.in -J 3D_4Ry_GBlk&lt;br /&gt;
This produces the file with the optical spectrum &amp;lt;code&amp;gt;o-3D_4Ry_GBlk.eps_q1_diago_bse&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* Open the &amp;lt;code&amp;gt;03_bse.in&amp;lt;/code&amp;gt; in an editor and changes:&lt;br /&gt;
 [[Variables#BSENGBlk|BSENGBlk]] = &#039;&#039;&#039;3 Ry&#039;&#039;&#039;&lt;br /&gt;
while leaving the rest untouched.&lt;br /&gt;
* Launch the calculation:&lt;br /&gt;
 &amp;gt; yambo -F 03_bse.in -J 3D_3Ry_GBlk&lt;br /&gt;
This produces the file with the optical spectrum &amp;lt;code&amp;gt;o-3D_3Ry_GBlk.eps_q1_diago_bse&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
* Repeat this operation for &amp;lt;code&amp;gt;BSENGBlk= &#039;&#039;&#039;2 Ry&#039;&#039;&#039;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;BSENGBlk= &#039;&#039;&#039;1 Ry&#039;&#039;&#039;&amp;lt;/code&amp;gt;. Remember to change the prefix correspondingly so that you can later on identify the job, e.g. &amp;lt;code&amp;gt;-J 3D_2Ry_GBlk&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;BSENGBlk=&#039;&#039;&#039;2 Ry&#039;&#039;&#039;&amp;lt;/code&amp;gt; etc.&lt;br /&gt;
&lt;br /&gt;
* Finally plot the obtained optical spectra:&lt;br /&gt;
 &amp;gt; gnuplot&lt;br /&gt;
 plot  &#039;o-3D_4Ry_GBlk.eps_q1_diago_bse&#039; w l t &#039;4 Ry&#039;,&#039;o-3D_3Ry_GBlk.eps_q1_diago_bse&#039; w l t &#039;3 Ry&#039;,  &#039;o-3D_2Ry_GBlk.eps_q1_diago_bse&#039; w l t &#039;2 Ry&#039;, &#039;o-3D_1Ry_GBlk.eps_q1_diago_bse&#039; w l t &#039;1 Ry&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:03 bse conv GBlk.png|500px|center|convergence with Gblk ]]&lt;br /&gt;
&lt;br /&gt;
This shows that &amp;lt;code&amp;gt;BSENGBlk= &#039;&#039;&#039;2 Ry&#039;&#039;&#039;&amp;lt;/code&amp;gt; gives already a results close to convergence and we can confidently lower &amp;lt;code&amp;gt;BSENGBlk&amp;lt;/code&amp;gt; to 2 or 3 Ry. &lt;br /&gt;
&lt;br /&gt;
* Repeat now the same procedure with &amp;lt;code&amp;gt;BSENGexx&amp;lt;/code&amp;gt;. Change the value to 10 Ry and 20 Ry. Remember to change the prefix correspondingly so that you can later on identify the job, e.g. &amp;lt;code&amp;gt;-J 3D_10Ry_Gexx&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;BSENGexx= &#039;&#039;&#039;10 Ry&#039;&#039;&#039;&amp;lt;/code&amp;gt; etc., and remember to keep the value of &amp;lt;code&amp;gt;BSENGBlk&amp;lt;/code&amp;gt; the same throughout these calculations.&lt;br /&gt;
&lt;br /&gt;
* Finally plot the obtained optical spectra:&lt;br /&gt;
 &amp;gt; gnuplot&lt;br /&gt;
  plot  &#039;o-3D_4Ry_GBlk.eps_q1_diago_bse&#039; w l t &#039;30 Ry&#039; ls 1,&#039;o-3D_20Ry_Gexx.eps_q1_diago_bse&#039; w l t &#039;20 Ry&#039;,  &#039;o-3D_10Ry_Gexx.eps_q1_diago_bse&#039; w l t &#039;10 Ry&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:03 bse conv Gexx.png|500px|center|convergence with Gexx ]]&lt;br /&gt;
&lt;br /&gt;
The plot shows that already with &amp;lt;code&amp;gt;BSENGexx= &#039;&#039;&#039;10 Ry&#039;&#039;&#039;&amp;lt;/code&amp;gt; the spectrum is converged and the cut-off can be lowered to this value.&lt;br /&gt;
&lt;br /&gt;
===Convergence with the BS bands=== &lt;br /&gt;
You can now repeat the procedure above keeping fixed all parameters to their original values except for&lt;br /&gt;
 % BSEBands&lt;br /&gt;
 6 | 10 |       &lt;br /&gt;
 %&lt;br /&gt;
Typically only the bands which are close to the Fermi energies contributes to the spectrum. If the energy separation between two bands is much larger than the spectral energy range, you can assume the corresponding transitions are not contributing to the spectra. &lt;br /&gt;
&lt;br /&gt;
* Repeat then the calculation for the optical spectrum using the following band ranges: &lt;br /&gt;
 &#039;&#039;7-10&#039;&#039;, &#039;&#039;8-10&#039;&#039;, &#039;&#039;6-9&#039;&#039;, &#039;&#039;7-9&#039;&#039; and &#039;&#039;8-9&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
When launching the job remember to identify your job with a recognizable name, e.g. &amp;lt;code&amp;gt;-J 3D_7-9_BND&amp;lt;/code&amp;gt; for the &#039;&#039;7-9&#039;&#039; range.   &lt;br /&gt;
&lt;br /&gt;
* Plot the optical spectra obtained from the different runs:&lt;br /&gt;
 &amp;gt; gnuplot&lt;br /&gt;
 plot  &#039;o-3D_4Ry_GBlk.eps_q1_diago_bse&#039; w l t &#039;6-10 Bands&#039;,&#039;o-3D_7-10_BND.eps_q1_diago_bse&#039; w l t &#039;7-10 Bands&#039;, &#039;o-3D_8-10_BND.eps_q1_diago_bse&#039; w l t &#039;8-10 Bands&#039;&lt;br /&gt;
 plot  &#039;o-3D_4Ry_GBlk.eps_q1_diago_bse&#039; w l t &#039;6-10 Bands&#039;,&#039;o-3D_6-9_BND.eps_q1_diago_bse&#039; w l t &#039;6-9 Bands&#039;, &#039;o-3D_7-9_BND.eps_q1_diago_bse&#039; w l t &#039;7-9 Bands&#039;, &#039;o-3D_8-9_BND.eps_q1_diago_bse&#039; w l t &#039;8-9 Bands&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:03 bse conv Bnds.png|500px|left|convergence with Bnds]] [[File:03 bse conv Bnds2.png|500px|center|convergence with Bnds]]&lt;br /&gt;
&lt;br /&gt;
The plots show that we need to include valence bands from at least 6-7 (those bands are degenerate at several high symmetry points of the Brillouin zone) and conduction at least up to band 10.&lt;br /&gt;
To see if this is sufficient you can try to include more bands.&lt;br /&gt;
&lt;br /&gt;
For example you can prepare and run calculations with the following bands ranges: &#039;&#039;1-12&#039;&#039;, &#039;&#039;4-12&#039;&#039;, &#039;&#039;4-14&#039;&#039; and plot the results: &lt;br /&gt;
 &amp;gt; gnuplot&lt;br /&gt;
 plot  &#039;o-3D_4Ry_GBlk.eps_q1_diago_bse&#039; w l t &#039;6-10 Bands&#039;,&#039;o-3D_4-12_BND.eps_q1_diago_bse&#039; w l t &#039;4-12 Bands&#039;, &#039;o-3D_4-14_BND.eps_q1_diago_bse&#039; w l t &#039;4-14 Bands&#039;, &#039;o-3D_1-12_BND.eps_q1_diago_bse&#039; w l t &#039;1-12 Bands&#039; ls 4&lt;br /&gt;
&lt;br /&gt;
[[File:03 bse conv Bnds1.png|500px|center|convergence with Bnds]]&lt;br /&gt;
&lt;br /&gt;
The plot is showing that the spectrum changes only marginally when adding those bands.&lt;br /&gt;
&lt;br /&gt;
==Convergence with the k-point mesh==&lt;br /&gt;
As final step you need to study the dependence on the &#039;&#039;&#039;k&#039;&#039;&#039; mesh. This parameter cannot be changed in yambo. For each &#039;&#039;&#039;k&#039;&#039;&#039; mesh you need to run a separate non-self consistent DFT calculation (on top of a converged self-consistent one) and generate the corresponding SAVE folders. Be careful to change &#039;&#039;&#039;only&#039;&#039;&#039; the &#039;&#039;&#039;k&#039;&#039;&#039; mesh.&lt;br /&gt;
 &lt;br /&gt;
For this exercise the SAVE databases for different meshes were generated beforehand in the [http://www.yambo-code.org/educational/tutorials/files/hBN-convergence-kpoints.tar.gz hBN-convergence-kpoints.tar.gz] tarball and are contained in the corresponding folders:&lt;br /&gt;
 &amp;gt; pwd&lt;br /&gt;
 YAMBO_TUTORIALS/hBN-convergence-kpoints/YAMBO&lt;br /&gt;
 &amp;gt; ls&lt;br /&gt;
 9x9x3 12x12x4 15x15x5 18x18x6&lt;br /&gt;
&lt;br /&gt;
By now you should be familiar with the process:&lt;br /&gt;
&lt;br /&gt;
* Enter the 9x9x3 directory &lt;br /&gt;
* Run the initialization &lt;br /&gt;
* Create the input for calculating the screening:&lt;br /&gt;
  &amp;gt; yambo -F 02_screening.in -J 3D_993 -X s&lt;br /&gt;
* Modify the input as follows&lt;br /&gt;
 [[Variables#NGsBlkXs|NGsBlkXs]] = 4 Ry&lt;br /&gt;
 %[[Variables#BndsRnXs|BndsRnXs]]&lt;br /&gt;
 1 | 40 |&lt;br /&gt;
 %&lt;br /&gt;
 %[[Variables#LongDrXS|LongDrXS]]&lt;br /&gt;
 1.000 | 1.000 | 1.000|&lt;br /&gt;
 %&lt;br /&gt;
* Run the calculation for the screening&lt;br /&gt;
 &amp;gt; yambo -F 02_screening.in -J 3D_993&lt;br /&gt;
* Create the input for calculating the macroscopic dielectric function:&lt;br /&gt;
 &amp;gt; yambo -F 03_bse.in -J 3D_993 -o b -k sex -y h -V qp&lt;br /&gt;
Which combines the BS kernel + BS solver (Lanczos-Haydock) runlevels&lt;br /&gt;
* Modify the input as follows&lt;br /&gt;
 [[Variables#BSENGexx|BSENGexx]] = 30 Ry&lt;br /&gt;
 [[Variables#BSENGBlk|BSENGBlk]] = 4 Ry&lt;br /&gt;
 % [[Variables#BSEBands|BSEBands]]&lt;br /&gt;
  6 | 10 |       &lt;br /&gt;
 %&lt;br /&gt;
 % [[Variables#BEnRange|BEnRange]]&lt;br /&gt;
   2.00000 | 8.00000 | eV    &lt;br /&gt;
 %&lt;br /&gt;
 [[Variables#BEnSteps|BEnSteps]]= 200      &lt;br /&gt;
 % [[Variables#BDmRange|BDmRange]]&lt;br /&gt;
   0.10000 |  0.10000 | eV    &lt;br /&gt;
 %&lt;br /&gt;
 % [[Variables#BLongDir|BLongDir]]&lt;br /&gt;
  1.000000 | 1.000000 | 0.000000 | &lt;br /&gt;
 %&lt;br /&gt;
 % [[Variables#KfnQP_E|KfnQP_E]] &lt;br /&gt;
  1.440000 | 1.000000 | 1.000000 |&lt;br /&gt;
 %&lt;br /&gt;
 [[Variables#BSHayTrs|BSHayTrs]]= 0.02000&lt;br /&gt;
* Launch the calculation:&lt;br /&gt;
 &amp;gt; yambo -F 03_bse.in -J 3D_993&lt;br /&gt;
* Repeat the procedure for the &amp;lt;code&amp;gt;12x12x4&amp;lt;/code&amp;gt; (it will take few minutes) with the difference you will use a different prefix: &amp;lt;code&amp;gt;-J 3D_12124&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The convergence on the k-point is certainly the most tedious and expensive part. Note that for the two larger meshes the calculations of both the screening and kernel take about 10 to 30 minutes each. &lt;br /&gt;
If short of time/resources postpone these calculations. If you have the time and computational resources repeat the above procedure for &amp;lt;code&amp;gt;15x15x5&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;18x18x6&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note that for those meshes the BS kernel database is becoming very/too large and you need to fragment it. To do that &#039;&#039;&#039;after&#039;&#039;&#039; you generated and modified the input invoke yambo again as:&lt;br /&gt;
 &amp;gt; yambo -F 03_bse.in -J 3D_15155 -o b -k sex -y h &#039;&#039;&#039;-V io&#039;&#039;&#039;&lt;br /&gt;
and modify the variable &lt;br /&gt;
  [[Variables#DBsFRAGpm|DBsFRAGpm]]= &amp;quot;+BS&amp;quot;&lt;br /&gt;
Then launch the calculation  &lt;br /&gt;
 &amp;gt; yambo -F 03_bse.in -J 3D_15155&lt;br /&gt;
&lt;br /&gt;
If you correctly followed the above procedure you should have a file with the optical absorption spectrum for each mesh, e.g. &amp;lt;code&amp;gt;o-3D_993.eps_q1_haydock_bse&amp;lt;/code&amp;gt;.&lt;br /&gt;
To see the effect of k-points plot those files with &amp;lt;code&amp;gt;gnuplot&amp;lt;/code&amp;gt; (remember to include the 6x6x2 calculation which should still be inside &amp;lt;code&amp;gt;hBN/YAMBO&amp;lt;/code&amp;gt;):&lt;br /&gt;
 &amp;gt; gnuplot&lt;br /&gt;
 plot &#039;18x18x6/o-3D_18186.eps_q1_haydock_bse&#039; w l t &#039;18x18x6, &#039;15x15x5/o-3D_15155.eps_q1_haydock_bse&#039; w l t &#039;15x15x5&#039;,&#039;12x12x4/o-3D_12124.eps_q1_haydock_bse&#039; w l t &#039;12x12x4, &lt;br /&gt;
 &#039;9x9x3/o-3D_993.eps_q1_haydock_bse&#039; w l t &#039;9x9x3&#039;, &#039;6x6x2/o-3D_662.eps_q1_haydock_bse&#039; w l t &#039;6x6x2&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:03 bse conv k.png|500px|center|convergence with k points]]&lt;br /&gt;
&lt;br /&gt;
From this plot you can notice that:&lt;br /&gt;
* results with the 6x6x2 mesh are clearly not converged: the first peak is too red shifted, the peak at 6 eV too sharp and intense and there is an &#039;extra&#039; peak at 7 eV.&lt;br /&gt;
* both the position and shape of the first peak are practically converged with the 9x9x3 mesh.&lt;br /&gt;
* conversely the second peak is still not fully converged with the 18x18x6.&lt;br /&gt;
The different behavior in the convergence of the two features depends on the localization of the exciton. The sharp first peak suggests a localized exciton. The shape of the second peak a much more delocalized exciton. A finer &#039;&#039;&#039;k&#039;&#039;&#039; mesh, corresponds in direct space, to considering a larger amount of unit cells. Then when the excitation is delocalized over a large number of unit cells a very fine &#039;&#039;&#039;k&#039;&#039;&#039; mesh is needed. &lt;br /&gt;
Typically a too coarse &#039;&#039;&#039;k&#039;&#039;&#039; mesh induces an artificial localization of the excitons which then correspond to artefacts in the spectrum (similar to what is observed for the 6x6x9). A nice, instructive discussion on wrong deductions from unconverged &#039;&#039;&#039;k&#039;&#039;&#039; mesh calculations can be found in the Appendix of Molina-Sanchez et al. (2013).&amp;lt;ref&amp;gt;Alejandro Molina-Sánchez, Davide Sangalli, Kerstin Hummer, Andrea Marini, and Ludger Wirtz Phys. Rev. B 88, 045412 (2013)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
To sum-up the results from this tutorial you have found that for the system under study:&lt;br /&gt;
* &amp;lt;code&amp;gt;BSENGBlk= &#039;&#039;&#039;3 Ry&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;BSENGexx= &#039;&#039;&#039;10 Ry&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;BSEBands &#039;&#039;&#039;from 6 to 10&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
* To converge the position and shape of the first exciton peak a 12x12x4 mesh is sufficient. For the second exciton peak a mesh larger than 18x18x6 would be needed (indeed Wirtz and co-workers found a k-mesh 24x24x10 was needed.&amp;lt;ref&amp;gt;Ludger Wirtz, Andrea Marini, Myrta Gruning, Angel Rubio in arXiv:cond-mat/0508421 [cond-mat.mtrl-sci]&amp;lt;/ref&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* Go to [[Calculating optical spectra including excitonic effects: a step-by-step guide]] module&lt;br /&gt;
* Back to [[BSE hBN Yambo Virtual 2021 version|BSE tutorial sections]]&lt;br /&gt;
* Back to [[CECAM VIRTUAL 2021]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=How_to_choose_the_input_parameters&amp;diff=4621</id>
		<title>How to choose the input parameters</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=How_to_choose_the_input_parameters&amp;diff=4621"/>
		<updated>2021-04-01T15:10:51Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In a [[Calculating optical spectra including excitonic effects: a step-by-step guide|previous tutorial]], you have been guided step-by-step through the calculations of the optical spectrum of bulk &#039;&#039;h-BN&#039;&#039; by solving the Bethe-Salpeter equation. The values for the relevant input parameters have then been given to you.&lt;br /&gt;
&lt;br /&gt;
In this tutorial you will learn how to choose these parameters which are related either to the truncation of infinite sums or to the approximations of infinitesimal with small, but finite quantities. A wrong choice of these parameters can lead to inaccurate or even physically wrong results. One needs to run a series of calculations by changing the parameters until the results are &#039;&#039;converged&#039;&#039;, meaning they are changing by what you consider a negligible amount. This is a tedious yet essential part of determining the optical properties of a system.&lt;br /&gt;
&lt;br /&gt;
Note that all the operations described below can be automated. A flexible python-based interface to yambo, [[First steps in Yambopy|yambopy]], can be used for this purpose. It is worth however to go at least once through the pain of a &#039;by-hand&#039; convergence study so to better understand the automated process.&lt;br /&gt;
&lt;br /&gt;
==Before starting==&lt;br /&gt;
&lt;br /&gt;
* Have completed (or be familiar with their content of) the following tutorials:&lt;br /&gt;
- [[First steps: a walk through from DFT to optical properties]]&lt;br /&gt;
- [[Calculating optical spectra including excitonic effects: a step-by-step guide]]&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
&lt;br /&gt;
Coming back to the scheme to calculate the macroscopic dielectric matrix within Bethe-Salpeter (BS), the list of the parameters that have to be determined by convergence studies are:&lt;br /&gt;
&lt;br /&gt;
[[File:Scheme2.png|500px|center|convergence parameters]]&lt;br /&gt;
&lt;br /&gt;
This provides as well a scheme for a full convergence study:&lt;br /&gt;
* first the parameters for the screening have to be determined, &lt;br /&gt;
* then the parameters for the BS kernel, and &lt;br /&gt;
* finally the convergence with respect to the choice of the k-mesh needs to performed. &lt;br /&gt;
&lt;br /&gt;
==Convergence of the static screening==&lt;br /&gt;
The parameters that need to be converged can be understood by looking at the equations:&lt;br /&gt;
[[File:Yambo-CH5.png|none|x30px|Yambo tutorial image]]&lt;br /&gt;
where &#039;&#039;&amp;amp;chi;&amp;lt;sub&amp;gt;GG&#039;&amp;lt;/sub&amp;gt;&#039;&#039; is given by&lt;br /&gt;
[[File:Dyson_rpa.png|none|x50px|Yambo tutorial image]]&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Variables#NGsBlkXs|NGsBlkXs]]&amp;lt;/code&amp;gt; : The dimension of the microscopic inverse matrix, related to [[Local fields]]&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Variables#BndsRnXs|BndsRnXs]]&amp;lt;/code&amp;gt; : The sum on bands in the independent particle &amp;amp;chi;&amp;lt;sup&amp;gt;0&amp;lt;/sup&amp;gt;&amp;lt;sub&amp;gt;GG&#039;&amp;lt;/sub&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore as shown in [[Optics at the independent particle level#Energy cutoff|this tutorial]] one can reduce the value of &lt;br /&gt;
* &amp;lt;code&amp;gt;[[Variables#FFTGvecs|FFTGvecs]]&amp;lt;/code&amp;gt;&lt;br /&gt;
since generally, fewer G-vectors are needed than what are needed in DFT calculations. This can be critical for large calculations, or for supercells with a lot of vacuum.&lt;br /&gt;
Remember that the latter parameter appears only when the input is generated specifying the verbosity level &amp;lt;code&amp;gt;-V RL&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The convergence for the static screening then is similar to the convergence of other response functions and for the plasmon-pole in [[How to obtain the quasi-particle band structure of a bulk material: h-BN|GW calculations]] and won&#039;t be covered here. Note in fact that you can re-use the database obtained (and converged) from a previous screening calculation as long as the same k-points are used.&lt;br /&gt;
&lt;br /&gt;
==Convergence of the macroscopic dielectric function==&lt;br /&gt;
In the expression for the macroscopic dielectric function &lt;br /&gt;
[[File:BSE1-Eq4.png|none|x50px]]&lt;br /&gt;
&lt;br /&gt;
depends on the summation over the pair of quasiparticle states &#039;&#039;vc&#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Variables#BSEBands|BSEBands]]&amp;lt;/code&amp;gt; : defines the &#039;&#039;vc&#039;&#039; pairs.&lt;br /&gt;
* the k-point mesh of the DFT calculations defines the &#039;&#039;&#039;k&#039;&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
Basically we need a large enough basis of transitions (pair of quasiparticle states) to correctly describe the excitons (in the energy region of interest).&lt;br /&gt;
&lt;br /&gt;
Furthermore, in the kernel components&lt;br /&gt;
&lt;br /&gt;
[[File:BSE1_Eq3.png|none|x100px]]&lt;br /&gt;
&lt;br /&gt;
the summations over &#039;&#039;&#039;G&#039;&#039;&#039; vectors appear. These corresponds to two parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Variables#BSENGblk|BSENGblk]]&amp;lt;/code&amp;gt;: defines the screened interaction block size (double sum in &#039;&#039;W&#039;&#039;), related to the electron-hole attraction.&lt;br /&gt;
* &amp;lt;code&amp;gt;[[Variables#BSENGexx|BSENGexx]]&amp;lt;/code&amp;gt;: defines the components of Hartree potential (the sum in &#039;&#039;V&#039;&#039;), related to local fields.&lt;br /&gt;
&lt;br /&gt;
In the following we will see how the spectrum depends on these parameters.&lt;br /&gt;
&lt;br /&gt;
===Prepare the common databases===&lt;br /&gt;
&lt;br /&gt;
Enter the &amp;lt;code&amp;gt;hBN&amp;lt;/code&amp;gt; directory (containing a 6x6x2 k-grid SAVE) and run the initialization if you didn&#039;t do it before. &lt;br /&gt;
&lt;br /&gt;
 &amp;gt; cd YAMBO_TUTORIALS/hBN/YAMBO&lt;br /&gt;
&lt;br /&gt;
For all the calculations in this sessions you can fix the screening parameters, and thus calculate the screening once for all.&lt;br /&gt;
Following the scheme we learned in previous tutorial:&lt;br /&gt;
&lt;br /&gt;
* Create the input for calculating the screening:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F 02_screening.in -X s&lt;br /&gt;
&lt;br /&gt;
* Modify the input as follows&lt;br /&gt;
&lt;br /&gt;
 NGsBlkXs = 4 Ry&lt;br /&gt;
 %BndsRnXs&lt;br /&gt;
  1 | 40 |&lt;br /&gt;
 %&lt;br /&gt;
 %LongDrXS&lt;br /&gt;
  1.000 | 1.000 | 1.000|&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
* Run the calculation for the screening&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; yambo -F 02_screening.in &lt;br /&gt;
&lt;br /&gt;
As we do not specify a particular prefix, the screening databases  &amp;lt;code&amp;gt;ndb.dip_iR_and_P, ndb.em1s&amp;lt;/code&amp;gt; are saved in the &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; folder and visible to all the subsequent jobs you will launch is this directory.&lt;br /&gt;
&lt;br /&gt;
===Convergence with the cut-off for reciprocal lattice vectors sums=== &lt;br /&gt;
As next step, create the input for calculating the macroscopic dielectric function:&lt;br /&gt;
 &amp;gt; yambo -F 03_bse.in -o b -k sex -y d -V qp&lt;br /&gt;
Which combines the BS kernel + BS solver (diagonalization) runlevels&lt;br /&gt;
* Modify the input as follows&lt;br /&gt;
 [[Variables#BSENGexx|BSENGexx]] = 30 Ry&lt;br /&gt;
 [[Variables#BSENGBlk|BSENGBlk]] = 4 Ry&lt;br /&gt;
 % [[Variables#BSEBands|BSEBands]]&lt;br /&gt;
  6 | 10 |       &lt;br /&gt;
 %&lt;br /&gt;
 % [[Variables#BEnRange|BEnRange]]&lt;br /&gt;
   2.00000 | 8.00000 | eV    &lt;br /&gt;
 %&lt;br /&gt;
 [[Variables#BEnSteps|BEnSteps]]= 100      &lt;br /&gt;
 % [[Variables#BDmRange|BDmRange]]&lt;br /&gt;
   0.10000 |  0.10000 | eV    &lt;br /&gt;
 %&lt;br /&gt;
 % [[Variables#BLongDir|BLongDir]]&lt;br /&gt;
  1.000000 | 1.000000 | 0.000000 | &lt;br /&gt;
 %&lt;br /&gt;
 % [[Variables#KfnQP_E|KfnQP_E]] &lt;br /&gt;
  1.440000 | 1.000000 | 1.000000 |&lt;br /&gt;
 %&lt;br /&gt;
* Launch the calculation:&lt;br /&gt;
 &amp;gt; yambo -F 03_bse.in -J 3D_4Ry_GBlk&lt;br /&gt;
This produces the file with the optical spectrum &amp;lt;code&amp;gt;o-3D_4Ry_GBlk.eps_q1_diago_bse&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* Open the &amp;lt;code&amp;gt;03_bse.in&amp;lt;/code&amp;gt; in an editor and changes:&lt;br /&gt;
 [[Variables#BSENGBlk|BSENGBlk]] = &#039;&#039;&#039;3 Ry&#039;&#039;&#039;&lt;br /&gt;
while leaving the rest untouched.&lt;br /&gt;
* Launch the calculation:&lt;br /&gt;
 &amp;gt; yambo -F 03_bse.in -J 3D_3Ry_GBlk&lt;br /&gt;
This produces the file with the optical spectrum &amp;lt;code&amp;gt;o-3D_3Ry_GBlk.eps_q1_diago_bse&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
* Repeat this operation for &amp;lt;code&amp;gt;BSENGBlk= &#039;&#039;&#039;2 Ry&#039;&#039;&#039;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;BSENGBlk= &#039;&#039;&#039;1 Ry&#039;&#039;&#039;&amp;lt;/code&amp;gt;. Remember to change the prefix correspondingly so that you can later on identify the job, e.g. &amp;lt;code&amp;gt;-J 3D_2Ry_GBlk&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;BSENGBlk=&#039;&#039;&#039;2 Ry&#039;&#039;&#039;&amp;lt;/code&amp;gt; etc.&lt;br /&gt;
&lt;br /&gt;
* Finally plot the obtained optical spectra:&lt;br /&gt;
 &amp;gt; gnuplot&lt;br /&gt;
 plot  &#039;o-3D_4Ry_GBlk.eps_q1_diago_bse&#039; w l t &#039;4 Ry&#039;,&#039;o-3D_3Ry_GBlk.eps_q1_diago_bse&#039; w l t &#039;3 Ry&#039;,  &#039;o-3D_2Ry_GBlk.eps_q1_diago_bse&#039; w l t &#039;2 Ry&#039;, &#039;o-3D_1Ry_GBlk.eps_q1_diago_bse&#039; w l t &#039;1 Ry&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:03 bse conv GBlk.png|500px|center|convergence with Gblk ]]&lt;br /&gt;
&lt;br /&gt;
This shows that &amp;lt;code&amp;gt;BSENGBlk= &#039;&#039;&#039;2 Ry&#039;&#039;&#039;&amp;lt;/code&amp;gt; gives already a results close to convergence and we can confidently lower &amp;lt;code&amp;gt;BSENGBlk&amp;lt;/code&amp;gt; to 2 or 3 Ry. &lt;br /&gt;
&lt;br /&gt;
* Repeat now the same procedure with &amp;lt;code&amp;gt;BSENGexx&amp;lt;/code&amp;gt;. Change the value to 10 Ry and 20 Ry. Remember to change the prefix correspondingly so that you can later on identify the job, e.g. &amp;lt;code&amp;gt;-J 3D_10Ry_Gexx&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;BSENGexx= &#039;&#039;&#039;10 Ry&#039;&#039;&#039;&amp;lt;/code&amp;gt; etc., and remember to keep the value of &amp;lt;code&amp;gt;BSENGBlk&amp;lt;/code&amp;gt; the same throughout these calculations.&lt;br /&gt;
&lt;br /&gt;
* Finally plot the obtained optical spectra:&lt;br /&gt;
 &amp;gt; gnuplot&lt;br /&gt;
  plot  &#039;o-3D_4Ry_GBlk.eps_q1_diago_bse&#039; w l t &#039;30 Ry&#039; ls 1,&#039;o-3D_20Ry_Gexx.eps_q1_diago_bse&#039; w l t &#039;20 Ry&#039;,  &#039;o-3D_10Ry_Gexx.eps_q1_diago_bse&#039; w l t &#039;10 Ry&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:03 bse conv Gexx.png|500px|center|convergence with Gexx ]]&lt;br /&gt;
&lt;br /&gt;
The plot shows that already with &amp;lt;code&amp;gt;BSENGexx= &#039;&#039;&#039;10 Ry&#039;&#039;&#039;&amp;lt;/code&amp;gt; the spectrum is converged and the cut-off can be lowered to this value.&lt;br /&gt;
&lt;br /&gt;
===Convergence with the BS bands=== &lt;br /&gt;
You can now repeat the procedure above keeping fixed all parameters to their original values except for&lt;br /&gt;
 % BSEBands&lt;br /&gt;
 6 | 10 |       &lt;br /&gt;
 %&lt;br /&gt;
Typically only the bands which are close to the Fermi energies contributes to the spectrum. If the energy separation between two bands is much larger than the spectral energy range, you can assume the corresponding transitions are not contributing to the spectra. &lt;br /&gt;
&lt;br /&gt;
* Repeat then the calculation for the optical spectrum using the following band ranges: &lt;br /&gt;
 &#039;&#039;7-10&#039;&#039;, &#039;&#039;8-10&#039;&#039;, &#039;&#039;6-9&#039;&#039;, &#039;&#039;7-9&#039;&#039; and &#039;&#039;8-9&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
When launching the job remember to identify your job with a recognizable name, e.g. &amp;lt;code&amp;gt;-J 3D_7-9_BND&amp;lt;/code&amp;gt; for the &#039;&#039;7-9&#039;&#039; range.   &lt;br /&gt;
&lt;br /&gt;
* Plot the optical spectra obtained from the different runs:&lt;br /&gt;
 &amp;gt; gnuplot&lt;br /&gt;
 plot  &#039;o-3D_4Ry_GBlk.eps_q1_diago_bse&#039; w l t &#039;6-10 Bands&#039;,&#039;o-3D_7-10_BND.eps_q1_diago_bse&#039; w l t &#039;7-10 Bands&#039;, &#039;o-3D_8-10_BND.eps_q1_diago_bse&#039; w l t &#039;8-10 Bands&#039;&lt;br /&gt;
 plot  &#039;o-3D_4Ry_GBlk.eps_q1_diago_bse&#039; w l t &#039;6-10 Bands&#039;,&#039;o-3D_6-9_BND.eps_q1_diago_bse&#039; w l t &#039;6-9 Bands&#039;, &#039;o-3D_7-9_BND.eps_q1_diago_bse&#039; w l t &#039;7-9 Bands&#039;, &#039;o-3D_8-9_BND.eps_q1_diago_bse&#039; w l t &#039;8-9 Bands&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:03 bse conv Bnds.png|500px|left|convergence with Bnds]] [[File:03 bse conv Bnds2.png|500px|center|convergence with Bnds]]&lt;br /&gt;
&lt;br /&gt;
The plots show that we need to include valence bands from at least 6-7 (those bands are degenerate at several high symmetry points of the Brillouin zone) and conduction at least up to band 10.&lt;br /&gt;
To see if this is sufficient you can try to include more bands.&lt;br /&gt;
&lt;br /&gt;
For example you can prepare and run calculations with the following bands ranges: &#039;&#039;1-12&#039;&#039;, &#039;&#039;4-12&#039;&#039;, &#039;&#039;4-14&#039;&#039; and plot the results: &lt;br /&gt;
 &amp;gt; gnuplot&lt;br /&gt;
 plot  &#039;o-3D_4Ry_GBlk.eps_q1_diago_bse&#039; w l t &#039;6-10 Bands&#039;,&#039;o-3D_4-12_BND.eps_q1_diago_bse&#039; w l t &#039;4-12 Bands&#039;, &#039;o-3D_4-14_BND.eps_q1_diago_bse&#039; w l t &#039;4-14 Bands&#039;, &#039;o-3D_1-12_BND.eps_q1_diago_bse&#039; w l t &#039;1-12 Bands&#039; ls 4&lt;br /&gt;
&lt;br /&gt;
[[File:03 bse conv Bnds1.png|500px|center|convergence with Bnds]]&lt;br /&gt;
&lt;br /&gt;
The plot is showing that the spectrum changes only marginally when adding those bands.&lt;br /&gt;
&lt;br /&gt;
==Convergence with the k-point mesh==&lt;br /&gt;
As final step you need to study the dependence on the &#039;&#039;&#039;k&#039;&#039;&#039; mesh. This parameter cannot be changed in yambo. For each &#039;&#039;&#039;k&#039;&#039;&#039; mesh you need to run a separate non-self consistent DFT calculation (on top of a converged self-consistent one) and generate the corresponding SAVE folders. Be careful to change &#039;&#039;&#039;only&#039;&#039;&#039; the &#039;&#039;&#039;k&#039;&#039;&#039; mesh.&lt;br /&gt;
 &lt;br /&gt;
For this exercise the SAVE databases for different meshes were generated beforehand in the [http://www.yambo-code.org/educational/tutorials/files/hBN-convergence-kpoints.tar.gz hBN-convergence-kpoints.tar.gz] tarball and are contained in the corresponding folders:&lt;br /&gt;
 &amp;gt; pwd&lt;br /&gt;
 YAMBO_TUTORIALS/hBN-convergence-kpoints/YAMBO&lt;br /&gt;
 &amp;gt; ls&lt;br /&gt;
 9x9x3 12x12x4 15x15x5 18x18x6&lt;br /&gt;
&lt;br /&gt;
By now you should be familiar with the process:&lt;br /&gt;
&lt;br /&gt;
* Enter the 9x9x3 directory &lt;br /&gt;
* Run the initialization &lt;br /&gt;
* Create the input for calculating the screening:&lt;br /&gt;
  &amp;gt; yambo -F 02_screening.in -J 3D_993 -X s&lt;br /&gt;
* Modify the input as follows&lt;br /&gt;
 [[Variables#NGsBlkXs|NGsBlkXs]] = 4 Ry&lt;br /&gt;
 %[[Variables#BndsRnXs|BndsRnXs]]&lt;br /&gt;
 1 | 40 |&lt;br /&gt;
 %&lt;br /&gt;
 %[[Variables#LongDrXS|LongDrXS]]&lt;br /&gt;
 1.000 | 1.000 | 1.000|&lt;br /&gt;
 %&lt;br /&gt;
* Run the calculation for the screening&lt;br /&gt;
 &amp;gt; yambo -F 02_screening.in -J 3D_993&lt;br /&gt;
* Create the input for calculating the macroscopic dielectric function:&lt;br /&gt;
 &amp;gt; yambo -F 03_bse.in -J 3D_993 -o b -k sex -y h -V qp&lt;br /&gt;
Which combines the BS kernel + BS solver (Lanczos-Haydock) runlevels&lt;br /&gt;
* Modify the input as follows&lt;br /&gt;
 [[Variables#BSENGexx|BSENGexx]] = 30 Ry&lt;br /&gt;
 [[Variables#BSENGBlk|BSENGBlk]] = 4 Ry&lt;br /&gt;
 % [[Variables#BSEBands|BSEBands]]&lt;br /&gt;
  6 | 10 |       &lt;br /&gt;
 %&lt;br /&gt;
 % [[Variables#BEnRange|BEnRange]]&lt;br /&gt;
   2.00000 | 8.00000 | eV    &lt;br /&gt;
 %&lt;br /&gt;
 [[Variables#BEnSteps|BEnSteps]]= 200      &lt;br /&gt;
 % [[Variables#BDmRange|BDmRange]]&lt;br /&gt;
   0.10000 |  0.10000 | eV    &lt;br /&gt;
 %&lt;br /&gt;
 % [[Variables#BLongDir|BLongDir]]&lt;br /&gt;
  1.000000 | 1.000000 | 0.000000 | &lt;br /&gt;
 %&lt;br /&gt;
 % [[Variables#KfnQP_E|KfnQP_E]] &lt;br /&gt;
  1.440000 | 1.000000 | 1.000000 |&lt;br /&gt;
 %&lt;br /&gt;
 [[Variables#BSHayTrs|BSHayTrs]]= 0.02000&lt;br /&gt;
* Launch the calculation:&lt;br /&gt;
 &amp;gt; yambo -F 03_bse.in -J 3D_993&lt;br /&gt;
* Repeat the procedure for the &amp;lt;code&amp;gt;12x12x4&amp;lt;/code&amp;gt; (it will take few minutes) with the difference you will use a different prefix: &amp;lt;code&amp;gt;-J 3D_12124&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The convergence on the k-point is certainly the most tedious and expensive part. Note that for the two larger meshes the calculations of both the screening and kernel take about 10 to 30 minutes each. &lt;br /&gt;
If short of time/resources postpone these calculations. If you have the time and computational resources repeat the above procedure for &amp;lt;code&amp;gt;15x15x5&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;18x18x6&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note that for those meshes the BS kernel database is becoming very/too large and you need to fragment it. To do that &#039;&#039;&#039;after&#039;&#039;&#039; you generated and modified the input invoke yambo again as:&lt;br /&gt;
 &amp;gt; yambo -F 03_bse.in -J 3D_15155 -o b -k sex -y h &#039;&#039;&#039;-V io&#039;&#039;&#039;&lt;br /&gt;
and modify the variable &lt;br /&gt;
  [[Variables#DBsFRAGpm|DBsFRAGpm]]= &amp;quot;+BS&amp;quot;&lt;br /&gt;
Then launch the calculation  &lt;br /&gt;
 &amp;gt; yambo -F 03_bse.in -J 3D_15155&lt;br /&gt;
&lt;br /&gt;
If you correctly followed the above procedure you should have a file with the optical absorption spectrum for each mesh, e.g. &amp;lt;code&amp;gt;o-3D_993.eps_q1_haydock_bse&amp;lt;/code&amp;gt;.&lt;br /&gt;
To see the effect of k-points plot those files with &amp;lt;code&amp;gt;gnuplot&amp;lt;/code&amp;gt; (remember to include the 6x6x2 calculation which should still be inside &amp;lt;code&amp;gt;hBN/YAMBO&amp;lt;/code&amp;gt;):&lt;br /&gt;
 &amp;gt; gnuplot&lt;br /&gt;
 plot &#039;18x18x6/o-3D_18186.eps_q1_haydock_bse&#039; w l t &#039;18x18x6, &#039;15x15x5/o-3D_15155.eps_q1_haydock_bse&#039; w l t &#039;15x15x5&#039;,&#039;12x12x4/o-3D_12124.eps_q1_haydock_bse&#039; w l t &#039;12x12x4, &lt;br /&gt;
 &#039;9x9x3/o-3D_993.eps_q1_haydock_bse&#039; w l t &#039;9x9x3&#039;, &#039;6x6x2/o-3D_662.eps_q1_haydock_bse&#039; w l t &#039;6x6x2&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:03 bse conv k.png|500px|center|convergence with k points]]&lt;br /&gt;
&lt;br /&gt;
From this plot you can notice that:&lt;br /&gt;
* results with the 6x6x2 mesh are clearly not converged: the first peak is too red shifted, the peak at 6 eV too sharp and intense and there is an &#039;extra&#039; peak at 7 eV.&lt;br /&gt;
* both the position and shape of the first peak are practically converged with the 9x9x3 mesh.&lt;br /&gt;
* conversely the second peak is still not fully converged with the 18x18x6.&lt;br /&gt;
The different behavior in the convergence of the two features depends on the localization of the exciton. The sharp first peak suggests a localized exciton. The shape of the second peak a much more delocalized exciton. A finer &#039;&#039;&#039;k&#039;&#039;&#039; mesh, corresponds in direct space, to considering a larger amount of unit cells. Then when the excitation is delocalized over a large number of unit cells a very fine &#039;&#039;&#039;k&#039;&#039;&#039; mesh is needed. &lt;br /&gt;
Typically a too coarse &#039;&#039;&#039;k&#039;&#039;&#039; mesh induces an artificial localization of the excitons which then correspond to artefacts in the spectrum (similar to what is observed for the 6x6x9). A nice, instructive discussion on wrong deductions from unconverged &#039;&#039;&#039;k&#039;&#039;&#039; mesh calculations can be found in the Appendix of Molina-Sanchez et al. (2013).&amp;lt;ref&amp;gt;Alejandro Molina-Sánchez, Davide Sangalli, Kerstin Hummer, Andrea Marini, and Ludger Wirtz Phys. Rev. B 88, 045412 (2013)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
To sum-up the results from this tutorial you have found that for the system under study:&lt;br /&gt;
* &amp;lt;code&amp;gt;BSENGBlk= &#039;&#039;&#039;3 Ry&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;BSENGexx= &#039;&#039;&#039;10 Ry&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;BSEBands &#039;&#039;&#039;from 6 to 10&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
* To converge the position and shape of the first exciton peak a 12x12x4 mesh is sufficient. For the second exciton peak a mesh larger than 18x18x6 would be needed (indeed Wirtz and co-workers found a k-mesh 24x24x10 was needed.&amp;lt;ref&amp;gt;Ludger Wirtz, Andrea Marini, Myrta Gruning, Angel Rubio in arXiv:cond-mat/0508421 [cond-mat.mtrl-sci]&amp;lt;/ref&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* Go to [[Calculating optical spectra including excitonic effects: a step-by-step guide]] module&lt;br /&gt;
* Back to [[BSE hBN Yambo Virtual 2021 version|BSE tutorial sections]]&lt;br /&gt;
* Back to [[CECAM VIRTUAL 2021]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=BSE_solvers_overview&amp;diff=4520</id>
		<title>BSE solvers overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=BSE_solvers_overview&amp;diff=4520"/>
		<updated>2021-03-29T13:56:27Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial explores the options available in Yambo for the numerical solution of the Bethe-Salpeter equation. Before running this tutorial, you should have carried out the tutorial &#039;&#039;&#039;[[Calculating optical spectra including excitonic effects: a step-by-step guide]]&#039;&#039;&#039;. We will use the same example system (bulk hBN). The various options correspond to different numerical methods for solving (large) eigenvalue problems. The numerical methods are not covered in this tutorial and the interested user is directed to the references.&lt;br /&gt;
&lt;br /&gt;
After completion of this tutorial, you are expected to recognize which solver to use depending on the system, computational load and desired output. Also, for each of the solver, you should be able to choose the values for the key input parameters. &lt;br /&gt;
&lt;br /&gt;
Three main solvers are available in Yambo:&lt;br /&gt;
__TOC__&lt;br /&gt;
===Full diagonalization solver===&lt;br /&gt;
Diagonalization of the full Hamiltonian using the standard LAPACK library. (ScaLAPACK?!) &lt;br /&gt;
&lt;br /&gt;
This solver outputs the macroscopic dielectric function over a range of energies chosen by the user. It also calculates all exciton energies and composition in terms of electron-hole pairs. Upon user&#039;s choice, the latter is stored on disk for use in postprocessing for exciton analysis and plotting as seen in the tutorial &#039;&#039;&#039;[[How to analyse excitons - CECAM 2021 school|How to analyse excitons]]&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, the computational cost of full diagonalization is cubic in the number of electron-hole pairs so this solver can be used for small system only (few light atoms per unit cell).   &lt;br /&gt;
 &lt;br /&gt;
You should&#039;ve already carry out the  &#039;&#039;&#039;[[Bethe-Salpeter solver: diagonalization]]&#039;&#039;&#039;. If you wish, you can run again this part and then &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Lanczos-Haydock solver===&lt;br /&gt;
Subspace iterative [https://en.wikipedia.org/wiki/Lanczos_algorithm/| Lanczos algorithm] which by-pass diagonalization with the Haydock approach&amp;lt;ref&amp;gt;R. Haydock, in&lt;br /&gt;
 &#039;&#039;Solid State Phys.&#039;&#039;, &#039;&#039;&#039;35&#039;&#039;&#039; 215 (1980) edited by H. Ehrenfest, F. Seitz, and D. Turnbull, Academic Press&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This solver outputs the macroscopic dielectric function over a range of energies chosen by the user. It can be applied to medium-large systems as it is substantially cheaper than the full diagonalization (quadratic with the number of electron-hole pairs). However, this approach &#039;&#039;does not provide&#039;&#039; the individual exciton energies and composition in terms of electron-hole pairs.&lt;br /&gt;
&lt;br /&gt;
Follow the link to &#039;&#039;&#039;[[Bethe-Salpeter solver: Lanczos-Haydock]]&#039;&#039;&#039; then  &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
===SLEPc solver===&lt;br /&gt;
Subspace iterative algorithm using the external [https://slepc.upv.es/| SLEPc library]&amp;lt;ref&amp;gt;V. Hernandez, J.E. Roman and V. Vidal in &#039;&#039; ACM Transactions on Mathematical Software&#039;&#039;, &#039;&#039;&#039;31&#039;&#039;&#039; 315 (2005)&amp;lt;/ref&amp;gt; (SLEPC solver).&lt;br /&gt;
&lt;br /&gt;
This solver outputs the individual exciton energies and composition about an energy value chosen by the user. It can be applied to medium-large systems but does not provide the overall spectrum. This solver is typically used after obtaining the spectra from the Lanczos-Haydock solver to either analyze a specific peak or getting the energy and composition of a few low-lying excitons. It can be used for large-medium systems. The computational cost grows with the number of excitons one asks to compute.  &lt;br /&gt;
 &lt;br /&gt;
Follow the link to &#039;&#039;&#039;[[Bethe-Salpeter solver: SLEPC]]&#039;&#039;&#039; then  &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
To summarise, the output (dielectric function, exciton energies and composition) and cost of the three solvers are summarised in this table.&lt;br /&gt;
&lt;br /&gt;
[[File:Solver.png|Yambo tutorial image]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Navigate==&lt;br /&gt;
* Back to [[BSE hBN Yambo Virtual 2021 version|BSE tutorial sections]]&lt;br /&gt;
* Back to [[CECAM VIRTUAL 2021]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
&lt;br /&gt;
=References =&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=BSE_solvers_overview&amp;diff=4519</id>
		<title>BSE solvers overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=BSE_solvers_overview&amp;diff=4519"/>
		<updated>2021-03-29T13:53:32Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial explores the options available in Yambo for the numerical solution of the Bethe-Salpeter equation. Before running this tutorial, you should have carried out the tutorial &#039;&#039;&#039;[[Calculating optical spectra including excitonic effects: a step-by-step guide]]&#039;&#039;&#039;. We will use the same example system (bulk hBN). The various options correspond to different numerical methods for solving (large) eigenvalue problems. The numerical methods are not covered in this tutorial and the interested user is directed to the references.&lt;br /&gt;
&lt;br /&gt;
After completion of this tutorial, you are expected to recognize which solver to use depending on the system, computational load and desired output. Also, for each of the solver, you should be able to choose the values for the key input parameters. &lt;br /&gt;
&lt;br /&gt;
Three main solvers are available in Yambo:&lt;br /&gt;
__TOC__&lt;br /&gt;
===Full diagonalization solver===&lt;br /&gt;
Diagonalization of the full Hamiltonian using the standard LAPACK library. (ScaLAPACK?!) &lt;br /&gt;
&lt;br /&gt;
This solver outputs the macroscopic dielectric function over a range of energies chosen by the user. It also calculates all exciton energies and composition in terms of electron-hole pairs. Upon user&#039;s choice, the latter is stored on disk for use in postprocessing for exciton analysis and plotting as seen in the tutorial &#039;&#039;&#039;[[How to analyse excitons - CECAM 2021 school|How to analyse excitons]]&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, the computational cost of full diagonalization is cubic in the number of electron-hole pairs so this solver can be used for small system only (few light atoms per unit cell).   &lt;br /&gt;
 &lt;br /&gt;
You should&#039;ve already carry out the  &#039;&#039;&#039;[[Bethe-Salpeter solver: diagonalization]]&#039;&#039;&#039;. If you wish, you can run again this part and then &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Lanczos-Haydock solver===&lt;br /&gt;
Subspace iterative [https://en.wikipedia.org/wiki/Lanczos_algorithm/| Lanczos algorithm] which by-pass diagonalization with the Haydock approach&amp;lt;ref&amp;gt;R. Haydock, in&lt;br /&gt;
 &#039;&#039;Solid State Phys.&#039;&#039;, &#039;&#039;&#039;35&#039;&#039;&#039; 215 (1980) edited by H. Ehrenfest, F. Seitz, and D. Turnbull, Academic Press&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This solver outputs the macroscopic dielectric function over a range of energies chosen by the user. It can be applied to medium-large systems as it is substantially cheaper than the full diagonalization (quadratic with the number of electron-hole pairs). However, this approach &#039;&#039;does not provide&#039;&#039; the individual exciton energies and composition in terms of electron-hole pairs.&lt;br /&gt;
&lt;br /&gt;
Follow the link to &#039;&#039;&#039;[[Bethe-Salpeter solver: Lanczos-Haydock]]&#039;&#039;&#039; then  &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
===SLEPc solver===&lt;br /&gt;
Subspace iterative algorithm using the external [https://slepc.upv.es/| SLEPc library]&amp;lt;ref&amp;gt;V. Hernandez, J.E. Roman and V. Vidal in &#039;&#039; ACM Transactions on Mathematical Software&#039;&#039;, &#039;&#039;&#039;31&#039;&#039;&#039; 315 (2005)&amp;lt;/ref&amp;gt; (SLEPC solver).&lt;br /&gt;
&lt;br /&gt;
This solver outputs the individual exciton energies and composition about an energy value chosen by the user. It can be applied to medium-large systems but does not provide the overall spectrum. This solver is typically used after obtaining the spectra from the Lanczos-Haydock solver to either analyze a specific peak or getting the energy and composition of a few low-lying excitons. It can be used for large-medium systems. The computational cost grows with the number of excitons one asks to compute.  &lt;br /&gt;
 &lt;br /&gt;
Follow the link to &#039;&#039;&#039;[[Bethe-Salpeter solver: SLEPC]]&#039;&#039;&#039; then  &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
To summarise, the output and cost of the three solvers are summarised in this table.&lt;br /&gt;
&lt;br /&gt;
[[File:Solver.png|Yambo tutorial image]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* Back to [[BSE hBN Yambo Virtual 2021 version|BSE tutorial sections]]&lt;br /&gt;
* Back to [[CECAM VIRTUAL 2021]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
&lt;br /&gt;
=References =&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=BSE_solvers_overview&amp;diff=4518</id>
		<title>BSE solvers overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=BSE_solvers_overview&amp;diff=4518"/>
		<updated>2021-03-29T13:51:55Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial explores the options available in Yambo for the numerical solution of the Bethe-Salpeter equation. Before running this tutorial, you should have carried out the tutorial &#039;&#039;&#039;[[Calculating optical spectra including excitonic effects: a step-by-step guide]]&#039;&#039;&#039;. We will use the same example system (bulk hBN). The various options correspond to different numerical methods for solving (large) eigenvalue problems. The numerical methods are not covered in this tutorial and the interested user is directed to the references.&lt;br /&gt;
&lt;br /&gt;
After completion of this tutorial, you are expected to recognize which solver to use depending on the system, computational load and desired output. Also, for each of the solver, you should be able to choose the values for the key input parameters. &lt;br /&gt;
&lt;br /&gt;
Three main solvers are available in Yambo:&lt;br /&gt;
__TOC__&lt;br /&gt;
===Full diagonalization solver===&lt;br /&gt;
Diagonalization of the full Hamiltonian using the standard LAPACK library. (ScaLAPACK?!) &lt;br /&gt;
&lt;br /&gt;
This solver outputs the macroscopic dielectric function over a range of energies chosen by the user. It also calculates all exciton energies and composition in terms of electron-hole pairs. Upon user&#039;s choice, the latter is stored on disk for use in postprocessing for exciton analysis and plotting as seen in the tutorial &#039;&#039;&#039;[[How to analyse excitons - CECAM 2021 school|How to analyse excitons]]&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, the computational cost of full diagonalization is cubic in the number of electron-hole pairs so this solver can be used for small system only (few light atoms per unit cell).   &lt;br /&gt;
 &lt;br /&gt;
You should&#039;ve already carry out the  &#039;&#039;&#039;[[Bethe-Salpeter solver: diagonalization]]&#039;&#039;&#039;. If you wish, you can run again this part and then &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Lanczos-Haydock solver===&lt;br /&gt;
Subspace iterative [https://en.wikipedia.org/wiki/Lanczos_algorithm/| Lanczos algorithm] which by-pass diagonalization with the Haydock approach&amp;lt;ref&amp;gt;R. Haydock, in&lt;br /&gt;
 &#039;&#039;Solid State Phys.&#039;&#039;, &#039;&#039;&#039;35&#039;&#039;&#039; 215 (1980) edited by H. Ehrenfest, F. Seitz, and D. Turnbull, Academic Press&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This solver outputs the macroscopic dielectric function over a range of energies chosen by the user. It can be applied to medium-large systems as it is substantially cheaper than the full diagonalization (quadratic with the number of electron-hole pairs). However, this approach &#039;&#039;does not provide&#039;&#039; the individual exciton energies and composition in terms of electron-hole pairs.&lt;br /&gt;
&lt;br /&gt;
Follow the link to &#039;&#039;&#039;[[Bethe-Salpeter solver: Lanczos-Haydock]]&#039;&#039;&#039; then  &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
===SLEPc solver===&lt;br /&gt;
Subspace iterative algorithm using the external [https://slepc.upv.es/| SLEPc library]&amp;lt;ref&amp;gt;V. Hernandez, J.E. Roman and V. Vidal in &#039;&#039; ACM Transactions on Mathematical Software&#039;&#039;, &#039;&#039;&#039;31&#039;&#039;&#039; 315 (2005)&amp;lt;/ref&amp;gt; (SLEPC solver).&lt;br /&gt;
&lt;br /&gt;
This solver outputs the individual exciton energies and composition about an energy value chosen by the user. It can be applied to medium-large systems but does not provide the overall spectrum. This solver is typically used after obtaining the spectra from the Lanczos-Haydock solver to either analyze a specific peak or getting the energy and composition of a few low-lying excitons. It can be used for large-medium systems. The computational cost grows with the number of excitons one asks to compute.  &lt;br /&gt;
 &lt;br /&gt;
Follow the link to &#039;&#039;&#039;[[Bethe-Salpeter solver: SLEPC]]&#039;&#039;&#039; then  &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
To summarise, the output and cost of the three solvers is summarised in this table.&lt;br /&gt;
[[File:Solver.png|thumb|Yambo tutorial image]]&lt;br /&gt;
==Links==&lt;br /&gt;
* Back to [[BSE hBN Yambo Virtual 2021 version|BSE tutorial sections]]&lt;br /&gt;
* Back to [[CECAM VIRTUAL 2021]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
&lt;br /&gt;
=References =&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=File:Solver.png&amp;diff=4517</id>
		<title>File:Solver.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=File:Solver.png&amp;diff=4517"/>
		<updated>2021-03-29T13:50:58Z</updated>

		<summary type="html">&lt;p&gt;Myrta: User created page with UploadWizard&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=={{int:filedesc}}==&lt;br /&gt;
{{Information&lt;br /&gt;
|description={{en|1=Yambo tutorial image}}&lt;br /&gt;
|date=2021-03-29&lt;br /&gt;
|source={{own}}&lt;br /&gt;
|author=[[User:Myrta|Myrta]]&lt;br /&gt;
|permission=&lt;br /&gt;
|other versions=&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=={{int:license-header}}==&lt;br /&gt;
{{self|cc-by-sa-4.0}}&lt;br /&gt;
&lt;br /&gt;
This file was uploaded with the UploadWizard extension.&lt;br /&gt;
&lt;br /&gt;
[[Category:Uploaded with UploadWizard]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=BSE_solvers_overview&amp;diff=4516</id>
		<title>BSE solvers overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=BSE_solvers_overview&amp;diff=4516"/>
		<updated>2021-03-29T13:49:38Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial explores the options available in Yambo for the numerical solution of the Bethe-Salpeter equation. Before running this tutorial, you should have carried out the tutorial &#039;&#039;&#039;[[Calculating optical spectra including excitonic effects: a step-by-step guide]]&#039;&#039;&#039;. We will use the same example system (bulk hBN). The various options correspond to different numerical methods for solving (large) eigenvalue problems. The numerical methods are not covered in this tutorial and the interested user is directed to the references.&lt;br /&gt;
&lt;br /&gt;
After completion of this tutorial, you are expected to recognize which solver to use depending on the system, computational load and desired output. Also, for each of the solver, you should be able to choose the values for the key input parameters. &lt;br /&gt;
&lt;br /&gt;
Three main solvers are available in Yambo:&lt;br /&gt;
__TOC__&lt;br /&gt;
===Full diagonalization solver===&lt;br /&gt;
Diagonalization of the full Hamiltonian using the standard LAPACK library. (ScaLAPACK?!) &lt;br /&gt;
&lt;br /&gt;
This solver outputs the macroscopic dielectric function over a range of energies chosen by the user. It also calculates all exciton energies and composition in terms of electron-hole pairs. Upon user&#039;s choice, the latter is stored on disk for use in postprocessing for exciton analysis and plotting as seen in the tutorial &#039;&#039;&#039;[[How to analyse excitons - CECAM 2021 school|How to analyse excitons]]&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, the computational cost of full diagonalization is cubic in the number of electron-hole pairs so this solver can be used for small system only (few light atoms per unit cell).   &lt;br /&gt;
 &lt;br /&gt;
You should&#039;ve already carry out the  &#039;&#039;&#039;[[Bethe-Salpeter solver: diagonalization]]&#039;&#039;&#039;. If you wish, you can run again this part and then &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Lanczos-Haydock solver===&lt;br /&gt;
Subspace iterative [https://en.wikipedia.org/wiki/Lanczos_algorithm/| Lanczos algorithm] which by-pass diagonalization with the Haydock approach&amp;lt;ref&amp;gt;R. Haydock, in&lt;br /&gt;
 &#039;&#039;Solid State Phys.&#039;&#039;, &#039;&#039;&#039;35&#039;&#039;&#039; 215 (1980) edited by H. Ehrenfest, F. Seitz, and D. Turnbull, Academic Press&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This solver outputs the macroscopic dielectric function over a range of energies chosen by the user. It can be applied to medium-large systems as it is substantially cheaper than the full diagonalization (quadratic with the number of electron-hole pairs). However, this approach &#039;&#039;does not provide&#039;&#039; the individual exciton energies and composition in terms of electron-hole pairs.&lt;br /&gt;
&lt;br /&gt;
Follow the link to &#039;&#039;&#039;[[Bethe-Salpeter solver: Lanczos-Haydock]]&#039;&#039;&#039; then  &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
===SLEPc solver===&lt;br /&gt;
Subspace iterative algorithm using the external [https://slepc.upv.es/| SLEPc library]&amp;lt;ref&amp;gt;V. Hernandez, J.E. Roman and V. Vidal in &#039;&#039; ACM Transactions on Mathematical Software&#039;&#039;, &#039;&#039;&#039;31&#039;&#039;&#039; 315 (2005)&amp;lt;/ref&amp;gt; (SLEPC solver).&lt;br /&gt;
&lt;br /&gt;
This solver outputs the individual exciton energies and composition about an energy value chosen by the user. It can be applied to medium-large systems but does not provide the overall spectrum. This solver is typically used after obtaining the spectra from the Lanczos-Haydock solver to either analyze a specific peak or getting the energy and composition of a few low-lying excitons. It can be used for large-medium systems. The computational cost grows with the number of excitons one asks to compute.  &lt;br /&gt;
 &lt;br /&gt;
Follow the link to &#039;&#039;&#039;[[Bethe-Salpeter solver: SLEPC]]&#039;&#039;&#039; then  &#039;&#039;&#039;return to this tutorial&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
To summarise, the output and cost of the three solvers is summarised in this table.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* Back to [[BSE hBN Yambo Virtual 2021 version|BSE tutorial sections]]&lt;br /&gt;
* Back to [[CECAM VIRTUAL 2021]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
&lt;br /&gt;
=References =&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=How_to_analyse_excitons_-_ICTP_2022_school&amp;diff=4499</id>
		<title>How to analyse excitons - ICTP 2022 school</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=How_to_analyse_excitons_-_ICTP_2022_school&amp;diff=4499"/>
		<updated>2021-03-28T19:40:07Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will learn how to:&lt;br /&gt;
* analyze an optical spectrum obtained from BSE in terms of excitonic energies and composition&lt;br /&gt;
* look at the spatial distribution of the exciton&lt;br /&gt;
&lt;br /&gt;
This is demonstrated for 3D hBN, for which you should have obtained the needed data from previous calculations. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning&#039;&#039;&#039;: for this demonstration, we did not use converged parameters (in particular they are not converged for the k-grid). Note that one needs to converge carefully all parameters to obtain scientific relevant results. This will be the topic of [[How to choose the input parameters | one of the next tutorials]]. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&#039;&#039;&#039;Previous modules&#039;&#039;&#039;&lt;br /&gt;
* You must have completed the [[Calculating optical spectra including excitonic effects: a step-by-step guide]] tutorial.&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* The &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; databases for 3D hBN &lt;br /&gt;
* The &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; directory containing the &amp;lt;code&amp;gt;ndb.BS_diago*&amp;lt;/code&amp;gt; databases for 3D hBN&lt;br /&gt;
* &amp;lt;code&amp;gt;ypp &amp;lt;/code&amp;gt; executable&lt;br /&gt;
* &amp;lt;code&amp;gt;xcrysden&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VESTA&amp;lt;/code&amp;gt; executables&lt;br /&gt;
* &amp;lt;code&amp;gt;gnuplot&amp;lt;/code&amp;gt; executable&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
All the databases required for this tutorial should be in the &amp;lt;code&amp;gt;YAMBO_TUTORIALS/hBN/&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== YAMBO calculations ==&lt;br /&gt;
Enter the &amp;lt;code&amp;gt;YAMBO_TUTORIALS/hBN/&amp;lt;/code&amp;gt; directory. In there you have the &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
 $ ls ./SAVE&lt;br /&gt;
 ndb.gops ndb.kindx ns.db1 ns.kb_pp_pwscf_fragment_1 ....&lt;br /&gt;
&lt;br /&gt;
and the &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
 $ ls ./3D_BSE&lt;br /&gt;
 ndb.BS_Q1_CPU_0 ndb.BS_diago_Q1 ndb.dip_iR_and_P_fragment_1 ndb.em1s_fragment_1 ...&lt;br /&gt;
!--&amp;gt;&lt;br /&gt;
==List the excitonic energies==&lt;br /&gt;
&lt;br /&gt;
First, we will obtain the list of all the exciton energies (that is the eigenvalues of the two-particle Hamiltonian) sorted both by energy and strength. The exciton strengths or intensities are defined from the expression of the optical absorption spectrum as&lt;br /&gt;
&lt;br /&gt;
[[File:strengh.png|none|x150px|]]&lt;br /&gt;
&lt;br /&gt;
That is, they are given by the linear combination of the square of the dipole transition matrix elements between electron-hole pairs, where A&amp;lt;sup&amp;gt;&amp;amp;lambda;&amp;lt;/sup&amp;gt;&amp;lt;sub&amp;gt;&#039;&#039;eh&#039;&#039;&amp;lt;/sub&amp;gt;  is the exciton composition in terms of electron-hole pairs. &lt;br /&gt;
&lt;br /&gt;
To read this information from the Yambo databases produced in [[Bethe-Salpeter solver: diagonalization| this previous step]], we use the Yambo pre- and post-processing utility &amp;lt;code&amp;gt;ypp&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Type:&lt;br /&gt;
&lt;br /&gt;
 $ ypp -J 3D_BSE -e s 1&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
This instructs the code to list the excitons (&amp;lt;code&amp;gt;-e s&amp;lt;/code&amp;gt;) in the database &#039;&#039;3D_BSE&#039;&#039; (&amp;lt;code&amp;gt;-J 3D_BSE&amp;lt;/code&amp;gt;) for the q-index = 1 (optical limit q=0). &lt;br /&gt;
&lt;br /&gt;
The results are output in the files &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039; and &#039;&#039;o-3D_BSE.exc_qpt1_I_sorted&#039;&#039;. &lt;br /&gt;
They report the energies of the excitons and their strengths. The strengths are normalised to the largest strength. Thus in the list, the brightest exciton has strength 1. &lt;br /&gt;
In &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039; the exciton energies are sorted by energy  (lower to higher), in &#039;&#039;o-3D_BSE.exc_qpt1_I_sorted&#039;&#039; by the oscillator strength (larger to smaller).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Inspect &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
The exciton with the lowest energy (3.54 eV) is doubly degenerate. The strength is ~0, thus this exciton is dark, does not contribute to the absorption spectrum. &lt;br /&gt;
&lt;br /&gt;
The second-lowest exciton is also doubly degenerate and it is the brightest (one of the components has strength 1, the other ~0.5). The latter exciton is the one responsible for the largest peak in the optical absorption plots of the [[Bethe-Salpeter solver: diagonalization|previous tutorials]].&lt;br /&gt;
&lt;br /&gt;
To better visualize these results, we plot the exciton strength (normalized to 1, arbitrary units) versus the energy (in eV):&lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 gnuplot&amp;gt; set style line 2 lc rgb &#039;black&#039; pt 7   # circle&lt;br /&gt;
 gnuplot&amp;gt; plot &#039;o-3D_BSE.exc_qpt1_E_sorted&#039; with points ls 2 title &#039;Strengths&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ExcWeights3DhBN.png|none|600px]]&lt;br /&gt;
&lt;br /&gt;
== Calculate the exciton oscillator strength and amplitude ==&lt;br /&gt;
&lt;br /&gt;
Once inspected the list of excitons sorted by energies and strengths, we will look at the composition of some of these excitons in terms of single-particle states (electron-hole pairs). &lt;br /&gt;
&lt;br /&gt;
Type: &lt;br /&gt;
 $ ypp -F ypp_AMPL.in -J 3D_BSE -e a 1 &lt;br /&gt;
&lt;br /&gt;
This instructs the code to create the the input file &#039;&#039;ypp_AMPL.in&#039;&#039; (&amp;lt;code&amp;gt;-F ypp_AMPL.in&amp;lt;/code&amp;gt;) to analyze the composition of the excitons (&amp;lt;code&amp;gt;-e a&amp;lt;/code&amp;gt;) in the database &#039;&#039;3D_BSE&#039;&#039; (&amp;lt;code&amp;gt;-J 3D_BSE&amp;lt;/code&amp;gt;) for the q-index = 1 (optical limit q=0). &lt;br /&gt;
&lt;br /&gt;
You can now edit the input file &#039;ypp_AMPL.in&#039;&#039;. From the list of excitons, we should have got an idea of which excitons we wish to analyze. The ordering from the list of exciton sorted by energies in &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039; is used to identify the excitons to analyse.&lt;br /&gt;
&lt;br /&gt;
For example, to analyse the 4 lowest-energy excitons (i.e., the first 2 doubly-degenerate excitons of which the first is dark and the second is bright) change this line as:&lt;br /&gt;
 States= &amp;quot;1 - 4&amp;quot;              # Index of the BS state(s)&lt;br /&gt;
&lt;br /&gt;
Close the input file and run &amp;lt;code&amp;gt;ypp&amp;lt;/code&amp;gt; again by typing&lt;br /&gt;
&lt;br /&gt;
 $ ypp -F ypp_AMPL.in -J 3D_BSE&lt;br /&gt;
&lt;br /&gt;
This carries out the analysis for the specified excitons. The results are output in &#039;&#039;o-3D_BSE.exc_qpt1_amplitude_at_*&#039;&#039; and  &#039;&#039;o-3D_BSE.exc_qpt1_weights_at_*&#039;&#039;, where &#039;&#039;*&#039;&#039; identifies the exciton according to the order in &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 $ ls  o*exc*at*&lt;br /&gt;
 o-3D_BSE.exc_qpt1_amplitude_at_1 o-3D_BSE.exc_qpt1_weights_at_1 ...&lt;br /&gt;
 &lt;br /&gt;
For an exciton  &amp;lt;math&amp;gt;|\lambda&amp;gt;&amp;lt;/math&amp;gt; , &#039;&#039;o-3D_BSE.exc_qpt1_weights_at_*&#039;&#039; reports the weights defined as &lt;br /&gt;
[[File:Weights.png|none|x60px|]]&lt;br /&gt;
and &#039;&#039;o-3D_BSE.exc_qpt1_amplitude_* &#039;&#039; reports the amplitudes defined as &lt;br /&gt;
[[File:Ampl.png|none|x70px|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Inspect, for example, the file &#039;&#039;o-3D_BSE.exc_weights_at_3&#039;&#039; (which we learned from &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039; has the largest strength) &lt;br /&gt;
&lt;br /&gt;
 # Band_V          Band_C          Kv-q ibz        Symm_kv         Kc ibz          Symm_kc         Weight          Energy&lt;br /&gt;
 #    &lt;br /&gt;
   7.00000000      10.0000000      14.0000000      2.00000000      14.0000000      2.00000000     0.395135850      4.35248947   &lt;br /&gt;
   7.00000000      10.0000000      14.0000000      1.00000000      14.0000000      1.00000000     0.394993663      4.35248947   &lt;br /&gt;
   8.00000000      9.00000000      14.0000000      2.00000000      14.0000000      2.00000000     0.391943455      4.35241365   &lt;br /&gt;
   8.00000000      9.00000000      14.0000000      1.00000000      14.0000000      1.00000000     0.391800284      4.35241365   &lt;br /&gt;
   7.00000000      10.0000000      13.0000000      2.00000000      13.0000000      2.00000000     0.745555162E-1   4.81094742   &lt;br /&gt;
   7.00000000      10.0000000      13.0000000      1.00000000      13.0000000      1.00000000     0.745274872E-1   4.81094742   &lt;br /&gt;
   8.00000000      9.00000000      13.0000000      2.00000000      13.0000000      2.00000000     0.739243180E-1   4.81087065   &lt;br /&gt;
   8.00000000      9.00000000      13.0000000      1.00000000      13.0000000      1.00000000     0.738964081E-1   4.81087065   &lt;br /&gt;
&lt;br /&gt;
The third exciton is mostly composed of single-particle transitions from VBM to CBM at point H (last k-point of the grid, number 14) of the 3D hexagonal Brillouin zone, with contributions also coming from point K (number 13). All the contributions weighing less than 5% are not shown by default. &lt;br /&gt;
&lt;br /&gt;
Recall from the previous analysis that of the first 4 exciton states, exciton states 3 and 4 (degenerate) are the optically active ones. We plot then the amplitude of the lowest energy bright exciton:&lt;br /&gt;
 $ paste o-3D_BSE.exc_qpt1_amplitude_at_3 o-3D_BSE.exc_qpt1_amplitude_at_4 &amp;gt; o-3D_BSE.exc_qpt1_amplitude_at_3_4&lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 gnuplot&amp;gt; set xlabel &#039;Energy (eV)&#039; &lt;br /&gt;
 gnuplot&amp;gt; set ylabel &#039;Amplitude&#039; &lt;br /&gt;
 gnuplot&amp;gt; p &#039;o-3D_BSE.exc_qpt1_amplitude_at_3_4&#039; u 1:($2+$4)/2 w l t &#039;Bright exciton&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ExcAmp3DhBN.png|none|600px]]&lt;br /&gt;
&lt;br /&gt;
Note that while this plot is related to the peaks in the optical absorption spectrum, it lacks the coupling with the external field, which is encoded in the dipole matrix elements.&lt;br /&gt;
&lt;br /&gt;
== Plot the exciton spatial distribution ==&lt;br /&gt;
&lt;br /&gt;
A further analysis we carry out is on the spatial distribution of the exciton, specifically of the probability of finding the electron at a certain position r when the hole is fixed in a position r&#039;.&lt;br /&gt;
&lt;br /&gt;
Create the input file ``ypp_WF.in`` using the command below and change the various parameters as shown below: &lt;br /&gt;
&lt;br /&gt;
 $ ypp -F ypp_WF.in -J 3D_BSE -e w&lt;br /&gt;
&lt;br /&gt;
 excitons                     # [R] Excitons&lt;br /&gt;
 wavefunction                 # [R] Wavefunction&lt;br /&gt;
 Format= &amp;quot;x&amp;quot;                  # Output format [(c)ube/(g)nuplot/(x)crysden]&lt;br /&gt;
 Direction= &amp;quot;123&amp;quot;               # [rlu] [1/2/3] for 1d or [12/13/23] for 2d [123] for 3D&lt;br /&gt;
 FFTGvecs=  30        Ry    # [FFT] Plane-waves&lt;br /&gt;
 States= &amp;quot;3 - 3&amp;quot;              # Index of the BS state(s)&lt;br /&gt;
 Degen_Step=   0.0100   eV    # Maximum energy separation of two degenerate states&lt;br /&gt;
 % Cells&lt;br /&gt;
  5 | 5 | 1 |                             # Number of cell repetitions in each direction (odd or 1)&lt;br /&gt;
 %&lt;br /&gt;
 % Hole&lt;br /&gt;
 2.35800028 | 1.36139178 | 7.08835602 # [cc] Hole position in unit cell (positive)&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Cells&amp;lt;/code&amp;gt;, is the size of the cell where the exciton will be visualised.&lt;br /&gt;
If the k-grid used for the BSE calculations is XxYxZ, then the exciton has an induced fictitious periodicity for every XxYxZ cells of the simulation.&lt;br /&gt;
For hBN, this is not a problem because the first bright exciton is strongly localized, but in other systems, where excitons are more delocalized, one must use very large k-grids for the BSE calculation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Degen_Step&amp;lt;/code&amp;gt;, tells the maximum energy separation of two degenerate states. Since this value is small enough, the code will automatically recognize excitons 3 and 4 are degenerate and merge them: you can check this in the log file.&lt;br /&gt;
&lt;br /&gt;
Plots can be in 1, 2 or 3D (&amp;lt;code&amp;gt;Direction&amp;lt;/code&amp;gt;) and the output format is chosen with &amp;lt;code&amp;gt;Format&amp;lt;/code&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
A non-trivial input parameter is the hole position. The best position for the hole is where the valence electrons contributing to the exciton are localised. In the case of hBN, they are on the nitrogen atoms. We can obtain the Cartesian coordinates of these atoms from our previously generated &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039; file:&lt;br /&gt;
 # Atom 1 with Z 5 [cc]:  2.35800028      1.36139178      0.00000000   &lt;br /&gt;
 # Atom 2 with Z 5 [cc]: -2.35800028     -1.36139178      6.08835602   &lt;br /&gt;
 # Atom 1 with Z 7 [cc]: -2.35800028     -1.36139178      0.00000000   &lt;br /&gt;
 # Atom 2 with Z 7 [cc]:  2.35800028      1.36139178      6.08835602 &lt;br /&gt;
We take the positive values of the nitrogen (Z=7, last line) and shift the vertical position of the hole from 6.088 to 7.088 so that the hole does not end up in the center of the atom (and therefore, possibly in a node of the wave function).  &lt;br /&gt;
&lt;br /&gt;
Close the input file and run &amp;lt;code&amp;gt;ypp&amp;lt;/code&amp;gt; by typing &lt;br /&gt;
 $ ypp -F ypp_WF.in -J 3D_BSE&lt;br /&gt;
&lt;br /&gt;
After the calculation is completed, we can visualise the output with xcrysden or with VESTA:&lt;br /&gt;
 $ xcrysden --xsf o-3D_BSE.exc_qpt1_3d_3.xsf&lt;br /&gt;
&lt;br /&gt;
 $ VESTA o-3D_BSE.exc_qpt1_3d_3.xsf&lt;br /&gt;
&lt;br /&gt;
[[File:ExcWF3DhBN.jpg|none|600px]]&lt;br /&gt;
&lt;br /&gt;
We notice that the electron is completely confined on the boron atoms and on the same layer of the hole. For comparison, see for example ref. &amp;lt;ref&amp;gt;Huge Excitonic Effects in Layered Hexagonal Boron Nitride, B. Arnaud et al., [https://arxiv.org/abs/cond-mat/0503390 preprint ArXiv]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Plot electron/hole average density (only in Yambo 5.x)==&lt;br /&gt;
&lt;br /&gt;
Another way to analyze the spatial character of excitons is to plot the average electron/hole densities defined as:&lt;br /&gt;
&lt;br /&gt;
[[File:Electron hole density.png|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate the input file ypp_WF.in type&lt;br /&gt;
&lt;br /&gt;
 ypp -F ypp_WF.in -e w -avehole&lt;br /&gt;
&lt;br /&gt;
and choose the exciton you want to plot according to the list of energy-sorted excitons. The electron/hole average densities correspond to generalized valence/conduction orbitals for a given exciton. They are interesting in particular for molecular crystals because they allow distinguishing charge-transfer versus Frenkel excitons, from the relative position of the electron/hole densities.&lt;br /&gt;
&lt;br /&gt;
If you want to see an example of hole/electron density of excitons please have a look at Ref. &amp;lt;ref&amp;gt;Strongly Bound Excitons in Metal-Organic Framework MOF-5: A Many-Body Perturbation Theory Study, A. R. Kshirsagar et al., [https://doi.org/10.26434/chemrxiv.14034917.v1 preprint ChemRxiv]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
From this tutorial you&#039;ve learned:&lt;br /&gt;
* How sort excitonic states by energy and intensity&lt;br /&gt;
* Analyse their composition in reciprocal space and in terms of single-particle transitions&lt;br /&gt;
* Visualize the exciton wave function in real space&lt;br /&gt;
&lt;br /&gt;
=References =&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Navigate==&lt;br /&gt;
* [[Calculating optical spectra including excitonic effects: a step-by-step guide]] tutorial&lt;br /&gt;
* [[BSE hBN Yambo Virtual 2021 version|Back to CECAM 2021 tutorial page for the BSE]]&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;br /&gt;
* Similar tutorial for 2D-hBN and including finite-momentum BSE: [[How to analyse excitons|this page]].&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=How_to_analyse_excitons_-_ICTP_2022_school&amp;diff=4498</id>
		<title>How to analyse excitons - ICTP 2022 school</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=How_to_analyse_excitons_-_ICTP_2022_school&amp;diff=4498"/>
		<updated>2021-03-28T19:37:07Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will learn how to:&lt;br /&gt;
* analyze an optical spectrum obtained from BSE in terms of excitonic energies and composition&lt;br /&gt;
* look at the spatial distribution of the exciton&lt;br /&gt;
&lt;br /&gt;
This is demonstrated for 3D hBN, for which you should have obtained the needed data from previous calculations. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning&#039;&#039;&#039;: for this demonstration, we did not use converged parameters (in particular they are not converged for the k-grid). Note that one needs to converge carefully all parameters to obtain scientific relevant results. This will be the topic of [[How to choose the input parameters | one of the next tutorials]]. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&#039;&#039;&#039;Previous modules&#039;&#039;&#039;&lt;br /&gt;
* You must have completed the [[Calculating optical spectra including excitonic effects: a step-by-step guide]] tutorial.&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* The &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; databases for 3D hBN &lt;br /&gt;
* The &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; directory containing the &amp;lt;code&amp;gt;ndb.BS_diago*&amp;lt;/code&amp;gt; databases for 3D hBN&lt;br /&gt;
* &amp;lt;code&amp;gt;ypp &amp;lt;/code&amp;gt; executable&lt;br /&gt;
* &amp;lt;code&amp;gt;xcrysden&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VESTA&amp;lt;/code&amp;gt; executables&lt;br /&gt;
* &amp;lt;code&amp;gt;gnuplot&amp;lt;/code&amp;gt; executable&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
All the databases required for this tutorial should be in the &amp;lt;code&amp;gt;YAMBO_TUTORIALS/hBN/&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== YAMBO calculations ==&lt;br /&gt;
Enter the &amp;lt;code&amp;gt;YAMBO_TUTORIALS/hBN/&amp;lt;/code&amp;gt; directory. In there you have the &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
 $ ls ./SAVE&lt;br /&gt;
 ndb.gops ndb.kindx ns.db1 ns.kb_pp_pwscf_fragment_1 ....&lt;br /&gt;
&lt;br /&gt;
and the &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
 $ ls ./3D_BSE&lt;br /&gt;
 ndb.BS_Q1_CPU_0 ndb.BS_diago_Q1 ndb.dip_iR_and_P_fragment_1 ndb.em1s_fragment_1 ...&lt;br /&gt;
!--&amp;gt;&lt;br /&gt;
==List the excitonic energies==&lt;br /&gt;
&lt;br /&gt;
First, we will obtain the list of all the exciton energies (that is the eigenvalues of the two-particle Hamiltonian) sorted both by energy and strength. The exciton strengths or intensities are defined from the expression of the optical absorption spectrum as&lt;br /&gt;
&lt;br /&gt;
[[File:strengh.png|none|x150px|]]&lt;br /&gt;
&lt;br /&gt;
That is, they are given by the linear combination of the square of the dipole transition matrix elements between electron-hole pairs, where A&amp;lt;sup&amp;gt;&amp;amp;lambda;&amp;lt;/sup&amp;gt;&amp;lt;sub&amp;gt;&#039;&#039;eh&#039;&#039;&amp;lt;/sub&amp;gt;  is the exciton composition in terms of electron-hole pairs. &lt;br /&gt;
&lt;br /&gt;
To read this information from the Yambo databases produced in [[Bethe-Salpeter solver: diagonalization| this previous step]], we use the Yambo pre- and post-processing utility &amp;lt;code&amp;gt;ypp&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Type:&lt;br /&gt;
&lt;br /&gt;
 $ ypp -J 3D_BSE -e s 1&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
This instructs the code to list the excitons (&amp;lt;code&amp;gt;-e s&amp;lt;/code&amp;gt;) in the database &#039;&#039;3D_BSE&#039;&#039; (&amp;lt;code&amp;gt;-J 3D_BSE&amp;lt;/code&amp;gt;) for the q-index = 1 (optical limit q=0). &lt;br /&gt;
&lt;br /&gt;
The results are output in the files &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039; and &#039;&#039;o-3D_BSE.exc_qpt1_I_sorted&#039;&#039;. &lt;br /&gt;
They report the energies of the excitons and their strengths. The strengths are normalised to the largest strength. Thus in the list, the brightest exciton has strength 1. &lt;br /&gt;
In &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039; the exciton energies are sorted by energy  (lower to higher), in &#039;&#039;o-3D_BSE.exc_qpt1_I_sorted&#039;&#039; by the oscillator strength (larger to smaller).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Inspect &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
The exciton with the lowest energy (3.54 eV) is doubly degenerate. The strength is ~0, thus this exciton is dark, does not contribute to the absorption spectrum. &lt;br /&gt;
&lt;br /&gt;
The second-lowest exciton is also doubly degenerate and it is the brightest (one of the components has strength 1, the other ~0.5). The latter exciton is the one responsible for the largest peak in the optical absorption plots of the [[Bethe-Salpeter solver: diagonalization|previous tutorials]].&lt;br /&gt;
&lt;br /&gt;
To better visualize these results, we plot the exciton strength (normalized to 1, arbitrary units) versus the energy (in eV):&lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 gnuplot&amp;gt; set style line 2 lc rgb &#039;black&#039; pt 7   # circle&lt;br /&gt;
 gnuplot&amp;gt; plot &#039;o-3D_BSE.exc_qpt1_E_sorted&#039; with points ls 2 title &#039;Strengths&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ExcWeights3DhBN.png|none|600px]]&lt;br /&gt;
&lt;br /&gt;
== Calculate the exciton oscillator strength and amplitude ==&lt;br /&gt;
&lt;br /&gt;
Once inspected the list of excitons sorted by energies and strengths, we will look at the composition of some of these excitons in terms of single-particle states (electron-hole pairs). &lt;br /&gt;
&lt;br /&gt;
Type: &lt;br /&gt;
 $ ypp -F ypp_AMPL.in -J 3D_BSE -e a 1 &lt;br /&gt;
&lt;br /&gt;
This instructs the code to create the the input file &#039;&#039;ypp_AMPL.in&#039;&#039; (&amp;lt;code&amp;gt;-F ypp_AMPL.in&amp;lt;/code&amp;gt;) to analyze the composition of the excitons (&amp;lt;code&amp;gt;-e a&amp;lt;/code&amp;gt;) in the database &#039;&#039;3D_BSE&#039;&#039; (&amp;lt;code&amp;gt;-J 3D_BSE&amp;lt;/code&amp;gt;) for the q-index = 1 (optical limit q=0). &lt;br /&gt;
&lt;br /&gt;
You can now edit the input file &#039;ypp_AMPL.in&#039;&#039;. From the list of excitons, we should have got an idea of which excitons we wish to analyze. The ordering from the list of exciton sorted by energies in &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039; is used to identify the excitons to analyse.&lt;br /&gt;
&lt;br /&gt;
For example, to analyse the 4 lowest-energy excitons (i.e., the first 2 doubly-degenerate excitons of which the first is dark and the second is bright) change this line as:&lt;br /&gt;
 States= &amp;quot;1 - 4&amp;quot;              # Index of the BS state(s)&lt;br /&gt;
&lt;br /&gt;
Close the input file and run &amp;lt;code&amp;gt;ypp&amp;lt;/code&amp;gt; again by typing&lt;br /&gt;
&lt;br /&gt;
 $ ypp -F ypp_AMPL.in -J 3D_BSE&lt;br /&gt;
&lt;br /&gt;
This carries out the analysis for the specified excitons. The results are output in &#039;&#039;o-3D_BSE.exc_qpt1_amplitude_at_*&#039;&#039; and  &#039;&#039;o-3D_BSE.exc_qpt1_weights_at_*&#039;&#039;, where &#039;&#039;*&#039;&#039; identifies the exciton according to the order in &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 $ ls  o*exc*at*&lt;br /&gt;
 o-3D_BSE.exc_qpt1_amplitude_at_1 o-3D_BSE.exc_qpt1_weights_at_1 ...&lt;br /&gt;
 &lt;br /&gt;
For an exciton  &amp;lt;math&amp;gt;|\lambda&amp;gt;&amp;lt;/math&amp;gt; , &#039;&#039;o-3D_BSE.exc_qpt1_weights_at_*&#039;&#039; reports the weights defined as &lt;br /&gt;
[[File:Weights.png|none|x60px|]]&lt;br /&gt;
and &#039;&#039;o-3D_BSE.exc_qpt1_amplitude_* &#039;&#039; reports the amplitudes defined as &lt;br /&gt;
[[File:Ampl.png|none|x70px|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Inspect, for example, the file &#039;&#039;o-3D_BSE.exc_weights_at_3&#039;&#039; (which we learned from &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039; has the largest strength) &lt;br /&gt;
&lt;br /&gt;
 # Band_V          Band_C          Kv-q ibz        Symm_kv         Kc ibz          Symm_kc         Weight          Energy&lt;br /&gt;
 #    &lt;br /&gt;
   7.00000000      10.0000000      14.0000000      2.00000000      14.0000000      2.00000000     0.395135850      4.35248947   &lt;br /&gt;
   7.00000000      10.0000000      14.0000000      1.00000000      14.0000000      1.00000000     0.394993663      4.35248947   &lt;br /&gt;
   8.00000000      9.00000000      14.0000000      2.00000000      14.0000000      2.00000000     0.391943455      4.35241365   &lt;br /&gt;
   8.00000000      9.00000000      14.0000000      1.00000000      14.0000000      1.00000000     0.391800284      4.35241365   &lt;br /&gt;
   7.00000000      10.0000000      13.0000000      2.00000000      13.0000000      2.00000000     0.745555162E-1   4.81094742   &lt;br /&gt;
   7.00000000      10.0000000      13.0000000      1.00000000      13.0000000      1.00000000     0.745274872E-1   4.81094742   &lt;br /&gt;
   8.00000000      9.00000000      13.0000000      2.00000000      13.0000000      2.00000000     0.739243180E-1   4.81087065   &lt;br /&gt;
   8.00000000      9.00000000      13.0000000      1.00000000      13.0000000      1.00000000     0.738964081E-1   4.81087065   &lt;br /&gt;
&lt;br /&gt;
The third exciton is mostly composed of single-particle transitions from VBM to CBM at point H (last k-point of the grid, number 14) of the 3D hexagonal Brillouin zone, with contributions also coming from point K (number 13). All the contributions weighing less than 5% are not shown by default. &lt;br /&gt;
&lt;br /&gt;
Recall from the previous analysis that of the first 4 exciton states, exciton states 3 and 4 (degenerate) are the optically active ones. We plot then the amplitude of the lowest energy bright exciton:&lt;br /&gt;
 $ paste o-3D_BSE.exc_qpt1_amplitude_at_3 o-3D_BSE.exc_qpt1_amplitude_at_4 &amp;gt; o-3D_BSE.exc_qpt1_amplitude_at_3_4&lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 gnuplot&amp;gt; set xlabel &#039;Energy (eV)&#039; &lt;br /&gt;
 gnuplot&amp;gt; set ylabel &#039;Amplitude&#039; &lt;br /&gt;
 gnuplot&amp;gt; p &#039;o-3D_BSE.exc_qpt1_amplitude_at_3_4&#039; u 1:($2+$4)/2 w l t &#039;Bright exciton&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ExcAmp3DhBN.png|none|600px]]&lt;br /&gt;
&lt;br /&gt;
Note that while this plot is related to the peaks in the optical absorption spectrum, it lacks the coupling with the external field, which is encoded in the dipole matrix elements.&lt;br /&gt;
&lt;br /&gt;
== Plot the exciton spatial distribution ==&lt;br /&gt;
&lt;br /&gt;
A further analysis we carry out is on the spatial distribution of the exciton, specifically of the probability of finding the electron at a certain position r when the hole is fixed in a position r&#039;.&lt;br /&gt;
&lt;br /&gt;
Create the input file ``ypp_WF.in`` using the command below and change the various parameters as shown below: &lt;br /&gt;
&lt;br /&gt;
 $ ypp -F ypp_WF.in -J 3D_BSE -e w&lt;br /&gt;
&lt;br /&gt;
 excitons                     # [R] Excitons&lt;br /&gt;
 wavefunction                 # [R] Wavefunction&lt;br /&gt;
 Format= &amp;quot;x&amp;quot;                  # Output format [(c)ube/(g)nuplot/(x)crysden]&lt;br /&gt;
 Direction= &amp;quot;123&amp;quot;               # [rlu] [1/2/3] for 1d or [12/13/23] for 2d [123] for 3D&lt;br /&gt;
 FFTGvecs=  30        Ry    # [FFT] Plane-waves&lt;br /&gt;
 States= &amp;quot;3 - 3&amp;quot;              # Index of the BS state(s)&lt;br /&gt;
 Degen_Step=   0.0100   eV    # Maximum energy separation of two degenerate states&lt;br /&gt;
 % Cells&lt;br /&gt;
  5 | 5 | 1 |                             # Number of cell repetitions in each direction (odd or 1)&lt;br /&gt;
 %&lt;br /&gt;
 % Hole&lt;br /&gt;
 2.35800028 | 1.36139178 | 7.08835602 # [cc] Hole position in unit cell (positive)&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Cells&amp;lt;/code&amp;gt;, is the size of the cell where the exciton will be visualised.&lt;br /&gt;
If the k-grid used for the BSE calculations is XxYxZ, then the exciton has an induced fictitious periodicity for every XxYxZ cells of the simulation.&lt;br /&gt;
For hBN, this is not a problem because the first bright exciton is strongly localized, but in other systems, where excitons are more delocalized, one must use very large k-grids for the BSE calculation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Degen_Step&amp;lt;/code&amp;gt;, tells the maximum energy separation of two degenerate states. Since this value is small enough, the code will automatically recognize excitons 3 and 4 are degenerate and merge them: you can check this in the log file.&lt;br /&gt;
&lt;br /&gt;
Plots can be in 1, 2 or 3D (&amp;lt;code&amp;gt;Direction&amp;lt;/code&amp;gt;) and the output format is chosen with &amp;lt;code&amp;gt;Format&amp;lt;/code&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
A non-trivial input parameter is the hole position. The best position for the hole is where the valence electrons contributing to the exciton are localised. In the case of hBN, they are on the nitrogen atoms. We can obtain the Cartesian coordinates of these atoms from our previously generated &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039; file:&lt;br /&gt;
 # Atom 1 with Z 5 [cc]:  2.35800028      1.36139178      0.00000000   &lt;br /&gt;
 # Atom 2 with Z 5 [cc]: -2.35800028     -1.36139178      6.08835602   &lt;br /&gt;
 # Atom 1 with Z 7 [cc]: -2.35800028     -1.36139178      0.00000000   &lt;br /&gt;
 # Atom 2 with Z 7 [cc]:  2.35800028      1.36139178      6.08835602 &lt;br /&gt;
We take the positive values of the nitrogen (Z=7, last line) and shift the vertical position of the hole from 6.088 to 7.088 so that the hole does not end up in the center of the atom (and therefore, possibly in a node of the wave function).  &lt;br /&gt;
&lt;br /&gt;
Close the input file and run &amp;lt;code&amp;gt;ypp&amp;lt;/code&amp;gt; by typing &lt;br /&gt;
 $ ypp -F ypp_WF.in -J 3D_BSE&lt;br /&gt;
&lt;br /&gt;
After the calculation is completed, we can visualise the output with xcrysden or with VESTA:&lt;br /&gt;
 $ xcrysden --xsf o-3D_BSE.exc_qpt1_3d_3.xsf&lt;br /&gt;
&lt;br /&gt;
 $ VESTA o-3D_BSE.exc_qpt1_3d_3.xsf&lt;br /&gt;
&lt;br /&gt;
[[File:ExcWF3DhBN.jpg|none|600px]]&lt;br /&gt;
&lt;br /&gt;
We notice that the electron is completely confined on the boron atoms and on the same layer of the hole. For comparison, see for example ref. &amp;lt;ref&amp;gt;Huge Excitonic Effects in Layered Hexagonal Boron Nitride, B. Arnaud et al., [https://arxiv.org/abs/cond-mat/0503390 preprint ArXiv]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Plot electron/hole average density (only in Yambo 5.x)==&lt;br /&gt;
&lt;br /&gt;
Another way to analyze the spatial character of excitons is to plot the average electron/hole densities defined as:&lt;br /&gt;
&lt;br /&gt;
[[File:Electron hole density.png|400px]]&lt;br /&gt;
&lt;br /&gt;
To generate the input file ypp_WF.in type&lt;br /&gt;
&lt;br /&gt;
 ypp -F ypp_WF.in -e w -avehole&lt;br /&gt;
&lt;br /&gt;
and choose the exciton you want to plot according to the list of energy-sorted excitons. The electron/hole average densities correspond to generalized valence/conduction orbitals for a given exciton. They are interesting in particular for molecular crystals because they allow distinguishing charge-transfer versus Frenkel excitons, from the relative position of the electron/hole densities.&lt;br /&gt;
&lt;br /&gt;
If you want to see an example of hole/electron density of excitons please have a look at ref. &amp;lt;ref&amp;gt;Strongly Bound Excitons in Metal-Organic Framework MOF-5: A Many-Body Perturbation Theory Study, A. R. Kshirsagar et al., [https://doi.org/10.26434/chemrxiv.14034917.v1 preprint ChemRxiv]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
From this tutorial you&#039;ve learned:&lt;br /&gt;
* How sort excitonic states by energy and intensity&lt;br /&gt;
* Analyse their composition in reciprocal space and in terms of single-particle transitions&lt;br /&gt;
* Visualize the exciton wave function in real space&lt;br /&gt;
&lt;br /&gt;
==Navigate==&lt;br /&gt;
* [[Calculating optical spectra including excitonic effects: a step-by-step guide]] tutorial&lt;br /&gt;
* [[BSE hBN Yambo Virtual 2021 version|Back to CECAM 2021 tutorial page for the BSE]]&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;br /&gt;
* Similar tutorial for 2D-hBN and including finite-momentum BSE: [[How to analyse excitons|this page]].&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=How_to_analyse_excitons_-_ICTP_2022_school&amp;diff=4497</id>
		<title>How to analyse excitons - ICTP 2022 school</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=How_to_analyse_excitons_-_ICTP_2022_school&amp;diff=4497"/>
		<updated>2021-03-28T19:31:41Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will learn how to:&lt;br /&gt;
* analyze an optical spectrum obtained from BSE in terms of excitonic energies and composition&lt;br /&gt;
* look at the spatial distribution of the exciton&lt;br /&gt;
&lt;br /&gt;
This is demonstrated for 3D hBN, for which you should have obtained the needed data from previous calculations. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning&#039;&#039;&#039;: for this demonstration, we did not use converged parameters (in particular they are not converged for the k-grid). Note that one needs to converge carefully all parameters to obtain scientific relevant results. This will be the topic of [[How to choose the input parameters | one of the next tutorials]]. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&#039;&#039;&#039;Previous modules&#039;&#039;&#039;&lt;br /&gt;
* You must have completed the [[Calculating optical spectra including excitonic effects: a step-by-step guide]] tutorial.&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* The &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; databases for 3D hBN &lt;br /&gt;
* The &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; directory containing the &amp;lt;code&amp;gt;ndb.BS_diago*&amp;lt;/code&amp;gt; databases for 3D hBN&lt;br /&gt;
* &amp;lt;code&amp;gt;ypp &amp;lt;/code&amp;gt; executable&lt;br /&gt;
* &amp;lt;code&amp;gt;xcrysden&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VESTA&amp;lt;/code&amp;gt; executables&lt;br /&gt;
* &amp;lt;code&amp;gt;gnuplot&amp;lt;/code&amp;gt; executable&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
All the databases required for this tutorial should be in the &amp;lt;code&amp;gt;YAMBO_TUTORIALS/hBN/&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== YAMBO calculations ==&lt;br /&gt;
Enter the &amp;lt;code&amp;gt;YAMBO_TUTORIALS/hBN/&amp;lt;/code&amp;gt; directory. In there you have the &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
 $ ls ./SAVE&lt;br /&gt;
 ndb.gops ndb.kindx ns.db1 ns.kb_pp_pwscf_fragment_1 ....&lt;br /&gt;
&lt;br /&gt;
and the &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
 $ ls ./3D_BSE&lt;br /&gt;
 ndb.BS_Q1_CPU_0 ndb.BS_diago_Q1 ndb.dip_iR_and_P_fragment_1 ndb.em1s_fragment_1 ...&lt;br /&gt;
!--&amp;gt;&lt;br /&gt;
==List the excitonic energies==&lt;br /&gt;
&lt;br /&gt;
First, we will obtain the list of all the exciton energies (that is the eigenvalues of the two-particle Hamiltonian) sorted both by energy and strength. The exciton strengths or intensities are defined from the expression of the optical absorption spectrum as&lt;br /&gt;
&lt;br /&gt;
[[File:strengh.png|none|x150px|]]&lt;br /&gt;
&lt;br /&gt;
That is, they are given by the linear combination of the square of the dipole transition matrix elements between electron-hole pairs, where A&amp;lt;sup&amp;gt;&amp;amp;lambda;&amp;lt;/sup&amp;gt;&amp;lt;sub&amp;gt;&#039;&#039;eh&#039;&#039;&amp;lt;/sub&amp;gt;  is the exciton composition in terms of electron-hole pairs. &lt;br /&gt;
&lt;br /&gt;
To read this information from the Yambo databases produced in [[Bethe-Salpeter solver: diagonalization| this previous step]], we use the Yambo pre- and post-processing utility &amp;lt;code&amp;gt;ypp&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Type:&lt;br /&gt;
&lt;br /&gt;
 $ ypp -J 3D_BSE -e s 1&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
This instructs the code to list the excitons (&amp;lt;code&amp;gt;-e s&amp;lt;/code&amp;gt;) in the database &#039;&#039;3D_BSE&#039;&#039; (&amp;lt;code&amp;gt;-J 3D_BSE&amp;lt;/code&amp;gt;) for the q-index = 1 (optical limit q=0). &lt;br /&gt;
&lt;br /&gt;
The results are output in the files &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039; and &#039;&#039;o-3D_BSE.exc_qpt1_I_sorted&#039;&#039;. &lt;br /&gt;
They report the energies of the excitons and their strengths. The strengths are normalised to the largest strength. Thus in the list, the brightest exciton has strength 1. &lt;br /&gt;
In &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039; the exciton energies are sorted by energy  (lower to higher), in &#039;&#039;o-3D_BSE.exc_qpt1_I_sorted&#039;&#039; by the oscillator strength (larger to smaller).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Inspect &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
The exciton with the lowest energy (3.54 eV) is doubly degenerate. The strength is ~0, thus this exciton is dark, does not contribute to the absorption spectrum. &lt;br /&gt;
&lt;br /&gt;
The second-lowest exciton is also doubly degenerate and it is the brightest (one of the components has strength 1, the other ~0.5). The latter exciton is the one responsible for the largest peak in the optical absorption plots of the [[Bethe-Salpeter solver: diagonalization|previous tutorials]].&lt;br /&gt;
&lt;br /&gt;
To better visualize these results, we plot the exciton strength (normalized to 1, arbitrary units) versus the energy (in eV):&lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 gnuplot&amp;gt; set style line 2 lc rgb &#039;black&#039; pt 7   # circle&lt;br /&gt;
 gnuplot&amp;gt; plot &#039;o-3D_BSE.exc_qpt1_E_sorted&#039; with points ls 2 title &#039;Strengths&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ExcWeights3DhBN.png|none|600px]]&lt;br /&gt;
&lt;br /&gt;
== Calculate the exciton oscillator strength and amplitude ==&lt;br /&gt;
&lt;br /&gt;
Once inspected the list of excitons sorted by energies and strengths, we will look at the composition of some of these excitons in terms of single-particle states (electron-hole pairs). &lt;br /&gt;
&lt;br /&gt;
Type: &lt;br /&gt;
 $ ypp -F ypp_AMPL.in -J 3D_BSE -e a 1 &lt;br /&gt;
&lt;br /&gt;
This instructs the code to create the the input file &#039;&#039;ypp_AMPL.in&#039;&#039; (&amp;lt;code&amp;gt;-F ypp_AMPL.in&amp;lt;/code&amp;gt;) to analyze the composition of the excitons (&amp;lt;code&amp;gt;-e a&amp;lt;/code&amp;gt;) in the database &#039;&#039;3D_BSE&#039;&#039; (&amp;lt;code&amp;gt;-J 3D_BSE&amp;lt;/code&amp;gt;) for the q-index = 1 (optical limit q=0). &lt;br /&gt;
&lt;br /&gt;
You can now edit the input file &#039;ypp_AMPL.in&#039;&#039;. From the list of excitons, we should have got an idea of which excitons we wish to analyze. The ordering from the list of exciton sorted by energies in &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039; is used to identify the excitons to analyse.&lt;br /&gt;
&lt;br /&gt;
For example, to analyse the 4 lowest-energy excitons (i.e., the first 2 doubly-degenerate excitons of which the first is dark and the second is bright) change this line as:&lt;br /&gt;
 States= &amp;quot;1 - 4&amp;quot;              # Index of the BS state(s)&lt;br /&gt;
&lt;br /&gt;
Close the input file and run &amp;lt;code&amp;gt;ypp&amp;lt;/code&amp;gt; again by typing&lt;br /&gt;
&lt;br /&gt;
 $ ypp -F ypp_AMPL.in -J 3D_BSE&lt;br /&gt;
&lt;br /&gt;
This carries out the analysis for the specified excitons. The results are output in &#039;&#039;o-3D_BSE.exc_qpt1_amplitude_at_*&#039;&#039; and  &#039;&#039;o-3D_BSE.exc_qpt1_weights_at_*&#039;&#039;, where &#039;&#039;*&#039;&#039; identifies the exciton according to the order in &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 $ ls  o*exc*at*&lt;br /&gt;
 o-3D_BSE.exc_qpt1_amplitude_at_1 o-3D_BSE.exc_qpt1_weights_at_1 ...&lt;br /&gt;
 &lt;br /&gt;
For an exciton  &amp;lt;math&amp;gt;|\lambda&amp;gt;&amp;lt;/math&amp;gt; , &#039;&#039;o-3D_BSE.exc_qpt1_weights_at_*&#039;&#039; reports the weights defined as &lt;br /&gt;
[[File:Weights.png|none|x60px|]]&lt;br /&gt;
and &#039;&#039;o-3D_BSE.exc_qpt1_amplitude_* &#039;&#039; reports the amplitudes defined as &lt;br /&gt;
[[File:Ampl.png|none|x70px|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Inspect, for example, the file &#039;&#039;o-3D_BSE.exc_weights_at_3&#039;&#039; (which we learned from &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039; has the largest strength) &lt;br /&gt;
&lt;br /&gt;
 # Band_V          Band_C          Kv-q ibz        Symm_kv         Kc ibz          Symm_kc         Weight          Energy&lt;br /&gt;
 #    &lt;br /&gt;
   7.00000000      10.0000000      14.0000000      2.00000000      14.0000000      2.00000000     0.395135850      4.35248947   &lt;br /&gt;
   7.00000000      10.0000000      14.0000000      1.00000000      14.0000000      1.00000000     0.394993663      4.35248947   &lt;br /&gt;
   8.00000000      9.00000000      14.0000000      2.00000000      14.0000000      2.00000000     0.391943455      4.35241365   &lt;br /&gt;
   8.00000000      9.00000000      14.0000000      1.00000000      14.0000000      1.00000000     0.391800284      4.35241365   &lt;br /&gt;
   7.00000000      10.0000000      13.0000000      2.00000000      13.0000000      2.00000000     0.745555162E-1   4.81094742   &lt;br /&gt;
   7.00000000      10.0000000      13.0000000      1.00000000      13.0000000      1.00000000     0.745274872E-1   4.81094742   &lt;br /&gt;
   8.00000000      9.00000000      13.0000000      2.00000000      13.0000000      2.00000000     0.739243180E-1   4.81087065   &lt;br /&gt;
   8.00000000      9.00000000      13.0000000      1.00000000      13.0000000      1.00000000     0.738964081E-1   4.81087065   &lt;br /&gt;
&lt;br /&gt;
The third exciton is mostly composed of single-particle transitions from VBM to CBM at point H (last k-point of the grid, number 14) of the 3D hexagonal Brillouin zone, with contributions also coming from point K (number 13). All the contributions weighing less than 5% are not shown by default. &lt;br /&gt;
&lt;br /&gt;
Recall from the previous analysis that of the first 4 exciton states, exciton states 3 and 4 (degenerate) are the optically active ones. We plot then the amplitude of the lowest energy bright exciton:&lt;br /&gt;
 $ paste o-3D_BSE.exc_qpt1_amplitude_at_3 o-3D_BSE.exc_qpt1_amplitude_at_4 &amp;gt; o-3D_BSE.exc_qpt1_amplitude_at_3_4&lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 gnuplot&amp;gt; set xlabel &#039;Energy (eV)&#039; &lt;br /&gt;
 gnuplot&amp;gt; set ylabel &#039;Amplitude&#039; &lt;br /&gt;
 gnuplot&amp;gt; p &#039;o-3D_BSE.exc_qpt1_amplitude_at_3_4&#039; u 1:($2+$4)/2 w l t &#039;Bright exciton&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ExcAmp3DhBN.png|none|600px]]&lt;br /&gt;
&lt;br /&gt;
Note that while this plot is related to the peaks in the optical absorption spectrum, it lacks the coupling with the external field, which is encoded in the dipole matrix elements.&lt;br /&gt;
&lt;br /&gt;
== Plot the exciton spatial distribution ==&lt;br /&gt;
&lt;br /&gt;
The final analysis we carry out is the plot of the spatial distribution of the exciton, that is of the probability of finding the electron at a certain position r when the hole is fixed in a position r&#039;.&lt;br /&gt;
&lt;br /&gt;
Create the input file ``ypp_WF.in`` using the command below and change the various parameters as shown below: &lt;br /&gt;
&lt;br /&gt;
 $ ypp -F ypp_WF.in -J 3D_BSE -e w&lt;br /&gt;
&lt;br /&gt;
 excitons                     # [R] Excitons&lt;br /&gt;
 wavefunction                 # [R] Wavefunction&lt;br /&gt;
 Format= &amp;quot;x&amp;quot;                  # Output format [(c)ube/(g)nuplot/(x)crysden]&lt;br /&gt;
 Direction= &amp;quot;123&amp;quot;               # [rlu] [1/2/3] for 1d or [12/13/23] for 2d [123] for 3D&lt;br /&gt;
 FFTGvecs=  30        Ry    # [FFT] Plane-waves&lt;br /&gt;
 States= &amp;quot;3 - 3&amp;quot;              # Index of the BS state(s)&lt;br /&gt;
 Degen_Step=   0.0100   eV    # Maximum energy separation of two degenerate states&lt;br /&gt;
 % Cells&lt;br /&gt;
  5 | 5 | 1 |                             # Number of cell repetitions in each direction (odd or 1)&lt;br /&gt;
 %&lt;br /&gt;
 % Hole&lt;br /&gt;
 2.35800028 | 1.36139178 | 7.08835602 # [cc] Hole position in unit cell (positive)&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Cells&amp;lt;/code&amp;gt;, is the size of the cell where the exciton will be visualised.&lt;br /&gt;
If the k-grid used for the BSE calculations is XxYxZ, then the exciton has an induced fictitious periodicity for every XxYxZ cells of the simulation.&lt;br /&gt;
For hBN, this is not a problem because the first bright exciton is strongly localized, but in other systems, where excitons are more delocalized, one must use very large k-grids for the BSE calculation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Degen_Step&amp;lt;/code&amp;gt;, tells the maximum energy separation of two degenerate states. Since this value is small enough, the code will automatically recognize excitons 3 and 4 are degenerate and merge them: you can check this in the log file.&lt;br /&gt;
&lt;br /&gt;
Plots can be in 1, 2 or 3D (&amp;lt;code&amp;gt;Direction&amp;lt;/code&amp;gt;) and the output format is chosen with &amp;lt;code&amp;gt;Format&amp;lt;/code&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
A non-trivial input parameter is the hole position. The best position for the hole is where the valence electrons contributing to the exciton are localised. In the case of hBN, they are on the nitrogen atoms. We can obtain the Cartesian coordinates of these atoms from our previously generated &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039; file:&lt;br /&gt;
 # Atom 1 with Z 5 [cc]:  2.35800028      1.36139178      0.00000000   &lt;br /&gt;
 # Atom 2 with Z 5 [cc]: -2.35800028     -1.36139178      6.08835602   &lt;br /&gt;
 # Atom 1 with Z 7 [cc]: -2.35800028     -1.36139178      0.00000000   &lt;br /&gt;
 # Atom 2 with Z 7 [cc]:  2.35800028      1.36139178      6.08835602 &lt;br /&gt;
We take the positive values of the nitrogen (Z=7, last line) and shift the vertical position of the hole from 6.088 to 7.088 so that the hole does not end up in the center of the atom (and therefore, possibly in a node of the wave function).  &lt;br /&gt;
&lt;br /&gt;
Close the input file and run &amp;lt;code&amp;gt;ypp&amp;lt;/code&amp;gt; by typing &lt;br /&gt;
 $ ypp -F ypp_WF.in -J 3D_BSE&lt;br /&gt;
&lt;br /&gt;
After the calculation is completed, we can visualise the output with xcrysden or with VESTA:&lt;br /&gt;
 $ xcrysden --xsf o-3D_BSE.exc_qpt1_3d_3.xsf&lt;br /&gt;
&lt;br /&gt;
 $ VESTA o-3D_BSE.exc_qpt1_3d_3.xsf&lt;br /&gt;
&lt;br /&gt;
[[File:ExcWF3DhBN.jpg|none|600px]]&lt;br /&gt;
&lt;br /&gt;
We notice that the electron is completely confined on the boron atoms and on the same layer of the hole. For comparison, see for example ref. &amp;lt;ref&amp;gt;Huge Excitonic Effects in Layered Hexagonal Boron Nitride, B. Arnaud et al., [https://arxiv.org/abs/cond-mat/0503390 preprint ArXiv]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Plot electron/hole average density (only in Yambo 5.x)==&lt;br /&gt;
&lt;br /&gt;
Another way to analyze excitons, it is the possibility to plot the average electron/hole densities defined as:&lt;br /&gt;
&lt;br /&gt;
[[File:Electron hole density.png|400px]]&lt;br /&gt;
&lt;br /&gt;
to generate the corresponding input just type&lt;br /&gt;
&lt;br /&gt;
 ypp -F ypp_WF.in -e w -avehole&lt;br /&gt;
&lt;br /&gt;
and choose the exciton you want to plot. The electron/hole average densities correspond to generalized valence/conduction orbitals for a given exciton. They are interesting in particular for molecular crystals because they allow distinguishing charge-transfer versus Frenkel excitons, from the relative position of the electron/hole densities.&lt;br /&gt;
&lt;br /&gt;
If you want to see an example of hole/electron density of excitons please have a look to ref. &amp;lt;ref&amp;gt;Strongly Bound Excitons in Metal-Organic Framework MOF-5: A Many-Body Perturbation Theory Study, A. R. Kshirsagar et al., [https://doi.org/10.26434/chemrxiv.14034917.v1 preprint ChemRxiv]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
From this tutorial you&#039;ve learned:&lt;br /&gt;
* How sort excitonic states by energy and intensity&lt;br /&gt;
* Analyse their composition in reciprocal space and in terms of single-particle transitions&lt;br /&gt;
* Visualize the exciton wave function in real space&lt;br /&gt;
&lt;br /&gt;
==Navigate==&lt;br /&gt;
* [[Calculating optical spectra including excitonic effects: a step-by-step guide]] tutorial&lt;br /&gt;
* [[BSE hBN Yambo Virtual 2021 version|Back to CECAM 2021 tutorial page for the BSE]]&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;br /&gt;
* Similar tutorial for 2D-hBN and including finite-momentum BSE: [[How to analyse excitons|this page]].&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_solver:_diagonalization&amp;diff=4496</id>
		<title>Bethe-Salpeter solver: diagonalization</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_solver:_diagonalization&amp;diff=4496"/>
		<updated>2021-03-28T18:36:14Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this module, you learn how to obtain an optical absorption spectrum within the Bethe-Salpeter equation (BSE) framework by diagonalizing a previously calculated Bethe-Salpeter (BS) kernel.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning&#039;&#039;&#039;: for this demonstration, we did not use converged parameters (in particular they are not converged for the k-grid). Note that one needs to converge carefully all parameters to obtain scientific relevant results. This will be the topic of [[How to choose the input parameters | one of the next tutorials]]. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
==Prerequisites==&lt;br /&gt;
[[File:Yambo-handbook-v4.1.2-p-15.png|thumb|Cheatsheet on BSS diagonalization|150px]]&lt;br /&gt;
* You must first complete the [[Static screening]] and [[Bethe-Salpeter kernel]] modules&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* The &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; databases for 3D hBN&lt;br /&gt;
* The &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; directory containing the databases from the [[Static screening]] and [[Bethe-Salpeter kernel]] modules&lt;br /&gt;
* The &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt; executable&lt;br /&gt;
* &amp;lt;code&amp;gt;gnuplot&amp;lt;/code&amp;gt; for plotting spectra&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The macroscopic dielectric function (from which the absorption and EEL spectra can be computed) is obtained from the eigenvalues &#039;&#039;E&#039;&#039;&amp;lt;sub&amp;gt;&amp;amp;lambda;&amp;lt;/sub&amp;gt; (excitonic energies) and eigenvectors A&amp;lt;sup&amp;gt;&amp;amp;lambda;&amp;lt;/sup&amp;gt;&amp;lt;sub&amp;gt;&#039;&#039;cv&#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt; (exciton composition in terms of electron-hole pairs) of the two-particle Hamiltonian:&lt;br /&gt;
&lt;br /&gt;
[[File:BSE1-Eq4.png|none|x50px]]&lt;br /&gt;
&lt;br /&gt;
To get the two-particle Hamiltonian eigensolutions you need to diagonalize the two-particle Hamiltonian (non-spin-polarized case):&lt;br /&gt;
&lt;br /&gt;
[[File:BSE1-Eq1.png|none|x50px]]&lt;br /&gt;
&lt;br /&gt;
for which the &#039;&#039;2V - W&#039;&#039; part was evaluated in the [[Bethe-Salpeter kernel]] module.&lt;br /&gt;
&lt;br /&gt;
The difference of quasiparticle energies &#039;&#039;&amp;amp;Delta;&amp;amp;epsilon;&amp;lt;sub&amp;gt;cv&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;= &amp;amp;epsilon;&amp;lt;sub&amp;gt;c&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt; - &amp;amp;epsilon;&amp;lt;sub&amp;gt;v&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;&#039;&#039; is added to the matrix just before the solver. &lt;br /&gt;
There are two possible choices:&lt;br /&gt;
* the Kohn-Sham energies (calculated at DFT level) are corrected through a scissor and the renormalization of the conduction and valence bandwidth (linearly for the conduction band minimum and the valence band maximum respectively):&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&amp;amp;Delta;&amp;amp;epsilon;&amp;lt;sub&amp;gt;cv&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;= M&amp;lt;sub&amp;gt;c&amp;lt;/sub&amp;gt;(&amp;amp;epsilon;&amp;lt;sub&amp;gt;c&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;KS&amp;lt;/sup&amp;gt; - CBM) - M&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;(&amp;amp;epsilon;&amp;lt;sub&amp;gt;v&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;KS&amp;lt;/sup&amp;gt; - VBM) + Scissor&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
* the quasiparticle energies calculated at [[How to obtain the quasi-particle band structure of a bulk material: h-BN|GW level]] are used (see [[Bethe-Salpeter on top of quasiparticle energies|next tutorial]]. Missing energies are computed by interpolation.&lt;br /&gt;
&lt;br /&gt;
==Choosing the input parameters==&lt;br /&gt;
&lt;br /&gt;
Invoke yambo with the &amp;quot;-y d&amp;quot; option in the command line:&lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 03_3D_BSE_diago_solver.in -y d -V qp -J 3D_BSE&lt;br /&gt;
&lt;br /&gt;
The input is open in the editor. The input variable to be changed are &lt;br /&gt;
 % [[Variables#BEnRange|BEnRange]]&lt;br /&gt;
   2.00000 | 8.00000 | eV    &lt;br /&gt;
 %&lt;br /&gt;
 [[Variables#BEnSteps|BEnSteps]]= 200      &lt;br /&gt;
 &lt;br /&gt;
which define 200 evenly spaced points between 2 and 8 eV at which the spectrum is calculated (&amp;amp;omega; in the equation for the macroscopic dielectric function),&lt;br /&gt;
  &lt;br /&gt;
 % [[Variables#BDmRange|BDmRange]]&lt;br /&gt;
   0.10000 |  0.10000 | eV    &lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
which defines the spectral broadening (Lorentzian model), &lt;br /&gt;
&lt;br /&gt;
 % [[Variables#BLongDir|BLongDir]]&lt;br /&gt;
  1.000000 | 1.000000 | 0.000000 | &lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
which defines the direction of the perturbing electric field (in this case the in-plane direction).&lt;br /&gt;
&lt;br /&gt;
Another parameter to modify is&lt;br /&gt;
 % [[Variables#KfnQP_E|KfnQP_E]] &lt;br /&gt;
  1.440000 | 1.000000 | 1.000000 |&lt;br /&gt;
 %&lt;br /&gt;
This gives the quasiparticle corrections to the Kohn-Sham eigenvalues and is deduced either from experiment or previous [[How to obtain the quasi-particle band structure of a bulk material: h-BN|GW calculations]]. &lt;br /&gt;
With reference to the equation in the Background, the format is&lt;br /&gt;
  &#039;&#039;Scissor&#039;&#039; | &#039;&#039;M&amp;lt;sub&amp;gt;c&amp;lt;/sub&amp;gt;&#039;&#039; | &#039;&#039;M&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;&#039;&#039; |&lt;br /&gt;
The alternative of directly input corrections calculated from a previous GW calculation is shown in the [[Bethe-Salpeter on top of quasiparticle energies|next section]].&lt;br /&gt;
&lt;br /&gt;
To analyse the exciton composition and plot the exciton wave function in the [[How to analyse excitons - CECAM 2021 school|postprocessing tutorial]], you &#039;&#039;&#039;must uncomment&#039;&#039;&#039; the following flag:&lt;br /&gt;
 WRbsWF                        # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: Only when this flag is uncommented, Yambo writes on disk the eigenvectors A&amp;lt;sup&amp;gt;&amp;amp;lambda;&amp;lt;/sup&amp;gt;&amp;lt;sub&amp;gt;&#039;&#039;cv&#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt; (exciton composition in terms of electron-hole pairs).&lt;br /&gt;
&lt;br /&gt;
==Bethe-Salpeter solver runlevel== &lt;br /&gt;
 $ yambo -F 03_3D_BSE_diago_solver.in -J 3D_BSE  &lt;br /&gt;
In the log (either in standard output or in &amp;lt;code&amp;gt;l-3D_BSE_optics_dipoles_bss_bse&amp;lt;/code&amp;gt;), after various setup/loading, the BSE is diagonalized using the linked linear algebra libraries: &lt;br /&gt;
 &amp;lt;---&amp;gt; [03] BSE solver(s) @q1&lt;br /&gt;
 &amp;lt;---&amp;gt; [LA] SERIAL linear algebra&lt;br /&gt;
 &amp;lt;---&amp;gt; [03.01] Diago Solver @q1&lt;br /&gt;
 &amp;lt;---&amp;gt; BSK diagonalize |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; EPS R residuals |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; BSK resp. funct |########################################| [100%] --(E) --(X)&lt;br /&gt;
&lt;br /&gt;
The report &amp;lt;code&amp;gt;r-3D_BSE_optics_dipoles_bss_bse&amp;lt;/code&amp;gt; contains information relative to this runlevel in section 3:&lt;br /&gt;
&lt;br /&gt;
 [03] BSE solver(s) @q1&lt;br /&gt;
 ======================&lt;br /&gt;
&lt;br /&gt;
Take some time to inspect the log and the report to check the consistency with the input variables. This run produces a new database in the 3D_BSE directory&lt;br /&gt;
 3D_BSE/ndb.BS_diago_Q01&lt;br /&gt;
So if you need the spectrum on a different energy range, direction, with a different broadening or more points the diagonalization is not repeated, just the spectrum is recalculated.&lt;br /&gt;
Note that this database, as well as any other netCDF-format database produced by Yambo, can be directly accessed and read using [[First steps in Yambopy| python modules]].&lt;br /&gt;
    &lt;br /&gt;
This run produces as well human readable files (o-*). Specifically &amp;lt;code&amp;gt;o-3D_BSE.eps_q1_diago_bse&amp;lt;/code&amp;gt; contains the real and imaginary part of the macroscopic dielectric function &lt;br /&gt;
  &lt;br /&gt;
 $ less o-3D_BSE.eps_q1_diago_bse &lt;br /&gt;
 ...&lt;br /&gt;
 #&lt;br /&gt;
 #  E/ev[1]    EPS-Im[2]  EPS-Re[3]  EPSo-Im[4] EPSo-Re[5]&lt;br /&gt;
 #&lt;br /&gt;
   2.00000    0.16162    5.83681    0.04959    4.14127&lt;br /&gt;
   2.03015    0.16787    5.88612    0.05090    4.15638&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
which is in the format &lt;br /&gt;
 Energy in eV | Imaginary part BSE | Real part BSE |Imaginary part IPA | Real part IPA |  &lt;br /&gt;
&lt;br /&gt;
where real and imaginary parts refer to the macroscopic dielectric function. The imaginary part is related to optical absorption. The latter (column 2) can be plotted versus the photon energy (column 1) and compared with the independent particle approximation (IPA, column 4), e.g.: &lt;br /&gt;
 &lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 ...&lt;br /&gt;
 plot &#039;o-3D_BSE.eps_q1_diago_bse&#039; u 1:2 w l t &#039;BSE&#039;, &#039;o-3D_BSE.eps_q1_diago_bse&#039; u 1:4 w l  t &#039;IPA&#039;&lt;br /&gt;
&lt;br /&gt;
[[file:03_bse_diago.png |none|600px]]&lt;br /&gt;
The addition of the kernel has the effect to red-shift the spectrum onset and redistribute the oscillator strengths. &lt;br /&gt;
&lt;br /&gt;
Note that these calculations are not converged with respect to the k-point grid. The low energy peaks in the IPA are an artefact of poor convergence with k-points producing artificial confinement. Carrying out the convergence for k-points would smooth out these peak in the IPA spectrum to give the shoulder corresponding to the van Hove singularity in the band structure. On the other hand, the low energy peak in the BSE is genuine and it is the signature of a bound exciton. This will appear more clearly in [[How to choose the input parameters | one of the next tutorials]] where we will perform the convergence with the k points. &lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
From this tutorial you&#039;ve learned:&lt;br /&gt;
* How to compute the optical spectrum by using the diagonal solver within the Bethe-Salpeter equation framework&lt;br /&gt;
&lt;br /&gt;
==Navigate==&lt;br /&gt;
&lt;br /&gt;
* Previous module: [[Bethe-Salpeter kernel]]&lt;br /&gt;
* Next module: [[Bethe-Salpeter on top of quasiparticle energies]]&lt;br /&gt;
* Alternative Bethe-Salpeter equation solver: [[Bethe-Salpeter solver: Lanczos-Haydock | Lanczos-Haydock]] &lt;br /&gt;
* Alternative Bethe-Salpeter equation solver: [[Bethe-Salpeter solver: SLEPC | Slepc]] &lt;br /&gt;
* Exciton analysis: [[How to analyse excitons - CECAM 2021 school]]&lt;br /&gt;
* Back to [[Calculating optical spectra including excitonic effects: a step-by-step guide]] tutorial&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_solver:_diagonalization&amp;diff=4495</id>
		<title>Bethe-Salpeter solver: diagonalization</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_solver:_diagonalization&amp;diff=4495"/>
		<updated>2021-03-28T18:31:01Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this module, you learn how to obtain an optical absorption spectrum within the Bethe-Salpeter equation (BSE) framework by diagonalizing a previously calculated Bethe-Salpeter (BS) kernel.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning&#039;&#039;&#039;: for this demonstration, we did not use converged parameters (in particular they are not converged for the k-grid). Note that one needs to converge carefully all parameters to obtain scientific relevant results. This will be the topic of [[How to choose the input parameters | one of the next tutorials]]. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
==Prerequisites==&lt;br /&gt;
[[File:Yambo-handbook-v4.1.2-p-15.png|thumb|Cheatsheet on BSS diagonalization|150px]]&lt;br /&gt;
* You must first complete the [[Static screening]] and [[Bethe-Salpeter kernel]] modules&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* The &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; databases for 3D hBN&lt;br /&gt;
* The &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; directory containing the databases from the [[Static screening]] and [[Bethe-Salpeter kernel]] modules&lt;br /&gt;
* The &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt; executable&lt;br /&gt;
* &amp;lt;code&amp;gt;gnuplot&amp;lt;/code&amp;gt; for plotting spectra&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The macroscopic dielectric function (from which the absorption and EEL spectra can be computed) is obtained from the eigenvalues &#039;&#039;E&#039;&#039;&amp;lt;sub&amp;gt;&amp;amp;lambda;&amp;lt;/sub&amp;gt; (excitonic energies) and eigenvectors A&amp;lt;sup&amp;gt;&amp;amp;lambda;&amp;lt;/sup&amp;gt;&amp;lt;sub&amp;gt;&#039;&#039;cv&#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt; (exciton composition in terms of electron-hole pairs) of the two-particle Hamiltonian:&lt;br /&gt;
&lt;br /&gt;
[[File:BSE1-Eq4.png|none|x50px]]&lt;br /&gt;
&lt;br /&gt;
To get the two-particle Hamiltonian eigensolutions you need to diagonalize the two-particle Hamiltonian (non-spin-polarized case):&lt;br /&gt;
&lt;br /&gt;
[[File:BSE1-Eq1.png|none|x50px]]&lt;br /&gt;
&lt;br /&gt;
for which the &#039;&#039;2V - W&#039;&#039; part was evaluated in the [[Bethe-Salpeter kernel]] module.&lt;br /&gt;
&lt;br /&gt;
The difference of quasiparticle energies &#039;&#039;&amp;amp;Delta;&amp;amp;epsilon;&amp;lt;sub&amp;gt;cv&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;= &amp;amp;epsilon;&amp;lt;sub&amp;gt;c&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt; - &amp;amp;epsilon;&amp;lt;sub&amp;gt;v&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;&#039;&#039; is added to the matrix just before the solver. &lt;br /&gt;
There are two possible choices:&lt;br /&gt;
* the Kohn-Sham energies (calculated at DFT level) are corrected through a scissor and the renormalization of the conduction and valence bandwidth (linearly for the conduction band minimum and the valence band maximum respectively):&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&amp;amp;Delta;&amp;amp;epsilon;&amp;lt;sub&amp;gt;cv&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;= M&amp;lt;sub&amp;gt;c&amp;lt;/sub&amp;gt;(&amp;amp;epsilon;&amp;lt;sub&amp;gt;c&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;KS&amp;lt;/sup&amp;gt; - CBM) - M&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;(&amp;amp;epsilon;&amp;lt;sub&amp;gt;v&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;KS&amp;lt;/sup&amp;gt; - VBM) + Scissor&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
* the quasiparticle energies calculated at [[How to obtain the quasi-particle band structure of a bulk material: h-BN|GW level]] are used (see [[Bethe-Salpeter on top of quasiparticle energies|next tutorial]]. Missing energies are computed by interpolation.&lt;br /&gt;
&lt;br /&gt;
==Choosing the input parameters==&lt;br /&gt;
&lt;br /&gt;
Invoke yambo with the &amp;quot;-y d&amp;quot; option in the command line:&lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 03_3D_BSE_diago_solver.in -y d -V qp -J 3D_BSE&lt;br /&gt;
&lt;br /&gt;
The input is open in the editor. The input variable to be changed are &lt;br /&gt;
 % [[Variables#BEnRange|BEnRange]]&lt;br /&gt;
   2.00000 | 8.00000 | eV    &lt;br /&gt;
 %&lt;br /&gt;
 [[Variables#BEnSteps|BEnSteps]]= 200      &lt;br /&gt;
 &lt;br /&gt;
which define 200 evenly spaced points between 2 and 8 eV at which the spectrum is calculated (&amp;amp;omega; in the equation for the macroscopic dielectric function),&lt;br /&gt;
  &lt;br /&gt;
 % [[Variables#BDmRange|BDmRange]]&lt;br /&gt;
   0.10000 |  0.10000 | eV    &lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
which defines the spectral broadening (Lorentzian model), &lt;br /&gt;
&lt;br /&gt;
 % [[Variables#BLongDir|BLongDir]]&lt;br /&gt;
  1.000000 | 1.000000 | 0.000000 | &lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
which defines the direction of the perturbing electric field (in this case the in-plane direction).&lt;br /&gt;
&lt;br /&gt;
Another parameter to modify is&lt;br /&gt;
 % [[Variables#KfnQP_E|KfnQP_E]] &lt;br /&gt;
  1.440000 | 1.000000 | 1.000000 |&lt;br /&gt;
 %&lt;br /&gt;
This gives the quasiparticle corrections to the Kohn-Sham eigenvalues and is deduced either from experiment or previous [[How to obtain the quasi-particle band structure of a bulk material: h-BN|GW calculations]]. &lt;br /&gt;
With reference to the equation in the Background, the format is&lt;br /&gt;
  &#039;&#039;Scissor&#039;&#039; | &#039;&#039;M&amp;lt;sub&amp;gt;c&amp;lt;/sub&amp;gt;&#039;&#039; | &#039;&#039;M&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;&#039;&#039; |&lt;br /&gt;
The alternative of directly input corrections calculated from a previous GW calculation is shown in the [[Bethe-Salpeter on top of quasiparticle energies|next section]].&lt;br /&gt;
&lt;br /&gt;
To analyse the exciton composition and plot the exciton wave function in the [[How to analyse excitons - CECAM 2021 school|postprocessing tutorial]], you &#039;&#039;&#039;must uncomment&#039;&#039;&#039; the following flag:&lt;br /&gt;
 WRbsWF                        # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: Only when this flag is uncommented, Yambo writes on disk the eigenvectors A&amp;lt;sup&amp;gt;&amp;amp;lambda;&amp;lt;/sup&amp;gt;&amp;lt;sub&amp;gt;&#039;&#039;cv&#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt; (exciton composition in terms of electron-hole pairs).&lt;br /&gt;
&lt;br /&gt;
==Bethe-Salpeter solver runlevel== &lt;br /&gt;
 $ yambo -F 03_3D_BSE_diago_solver.in -J 3D_BSE  &lt;br /&gt;
In the log (either in standard output or in &amp;lt;code&amp;gt;l-3D_BSE_optics_dipoles_bss_bse&amp;lt;/code&amp;gt;), after various setup/loading, the BSE is diagonalized using the linked linear algebra libraries: &lt;br /&gt;
 &amp;lt;---&amp;gt; [03] BSE solver(s) @q1&lt;br /&gt;
 &amp;lt;---&amp;gt; [LA] SERIAL linear algebra&lt;br /&gt;
 &amp;lt;---&amp;gt; [03.01] Diago Solver @q1&lt;br /&gt;
 &amp;lt;---&amp;gt; BSK diagonalize |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; EPS R residuals |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; BSK resp. funct |########################################| [100%] --(E) --(X)&lt;br /&gt;
&lt;br /&gt;
The report &amp;lt;code&amp;gt;r-3D_BSE_optics_dipoles_bss_bse&amp;lt;/code&amp;gt; contains information relative to this runlevel in section 3:&lt;br /&gt;
&lt;br /&gt;
 [03] BSE solver(s) @q1&lt;br /&gt;
 ======================&lt;br /&gt;
&lt;br /&gt;
Take some time to inspect the log and the report to check the consistency with the input variables. This run produces a new database in the 3D_BSE directory&lt;br /&gt;
 3D_BSE/ndb.BS_diago_Q01&lt;br /&gt;
So if you need the spectrum on a different energy range, direction, with a different broadening or more points the diagonalization is not repeated, just the spectrum is recalculated.&lt;br /&gt;
Note that this database, as well as any other netCDF-format database produced by Yambo, can be directly accessed and read using [[First steps in Yambopy| python modules]].&lt;br /&gt;
    &lt;br /&gt;
This run produces as well human readable files (o-*). Specifically &amp;lt;code&amp;gt;o-3D_BSE.eps_q1_diago_bse&amp;lt;/code&amp;gt; contains the real and imaginary part of the macroscopic dielectric function &lt;br /&gt;
  &lt;br /&gt;
 $ less o-3D_BSE.eps_q1_diago_bse &lt;br /&gt;
 ...&lt;br /&gt;
 #&lt;br /&gt;
 #  E/ev[1]    EPS-Im[2]  EPS-Re[3]  EPSo-Im[4] EPSo-Re[5]&lt;br /&gt;
 #&lt;br /&gt;
   2.00000    0.16162    5.83681    0.04959    4.14127&lt;br /&gt;
   2.03015    0.16787    5.88612    0.05090    4.15638&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
which is in the format &lt;br /&gt;
 Energy in eV | Imaginary part BSE | Real part BSE |Imaginary part IPA | Real part IPA |  &lt;br /&gt;
&lt;br /&gt;
where real and imaginary parts refer to the macroscopic dielectric function. The imaginary part is related to optical absorption. The latter (column 2) can be plotted versus the photon energy (column 1) and compared with the independent particle approximation (IPA, column 4), e.g.: &lt;br /&gt;
 &lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 ...&lt;br /&gt;
 plot &#039;o-3D_BSE.eps_q1_diago_bse&#039; u 1:2 w l t &#039;BSE&#039;, &#039;o-3D_BSE.eps_q1_diago_bse&#039; u 1:4 w l  t &#039;IPA&#039;&lt;br /&gt;
&lt;br /&gt;
[[file:03_bse_diago.png |none|600px]]&lt;br /&gt;
The addition of the kernel has the effect to red-shift the spectrum onset and redistribute the oscillator strengths. Note that the convergence for k-points smooths out the low energy peaks in the IPA (which are an artefact of poor convergence with k-points producing artificial confinement) to give the shoulder corresponding to the van Hove singularity in the band structure. On the other hand, the low energy peak in the BSE is genuine and it is the signature of a bound exciton.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
From this tutorial you&#039;ve learned:&lt;br /&gt;
* How to compute the optical spectrum by using the diagonal solver within the Bethe-Salpeter equation framework&lt;br /&gt;
&lt;br /&gt;
==Navigate==&lt;br /&gt;
&lt;br /&gt;
* Previous module: [[Bethe-Salpeter kernel]]&lt;br /&gt;
* Next module: [[Bethe-Salpeter on top of quasiparticle energies]]&lt;br /&gt;
* Alternative Bethe-Salpeter equation solver: [[Bethe-Salpeter solver: Lanczos-Haydock | Lanczos-Haydock]] &lt;br /&gt;
* Alternative Bethe-Salpeter equation solver: [[Bethe-Salpeter solver: SLEPC | Slepc]] &lt;br /&gt;
* Exciton analysis: [[How to analyse excitons - CECAM 2021 school]]&lt;br /&gt;
* Back to [[Calculating optical spectra including excitonic effects: a step-by-step guide]] tutorial&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=How_to_analyse_excitons_-_ICTP_2022_school&amp;diff=4494</id>
		<title>How to analyse excitons - ICTP 2022 school</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=How_to_analyse_excitons_-_ICTP_2022_school&amp;diff=4494"/>
		<updated>2021-03-28T17:58:42Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will learn how to:&lt;br /&gt;
* analyze an optical spectrum obtained from BSE in terms of excitonic energies and composition&lt;br /&gt;
* look at the spatial distribution of the exciton&lt;br /&gt;
&lt;br /&gt;
This is demonstrated for 3D hBN, for which you should have obtained the needed data from previous calculations. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&#039;&#039;&#039;Previous modules&#039;&#039;&#039;&lt;br /&gt;
* You must have completed the [[Calculating optical spectra including excitonic effects: a step-by-step guide]] tutorial.&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* The &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; databases for 3D hBN &lt;br /&gt;
* The &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; directory containing the &amp;lt;code&amp;gt;ndb.BS_diago*&amp;lt;/code&amp;gt; databases for 3D hBN&lt;br /&gt;
* &amp;lt;code&amp;gt;ypp &amp;lt;/code&amp;gt; executable&lt;br /&gt;
* &amp;lt;code&amp;gt;xcrysden&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VESTA&amp;lt;/code&amp;gt; executables&lt;br /&gt;
* &amp;lt;code&amp;gt;gnuplot&amp;lt;/code&amp;gt; executable&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
All the databases required for this tutorial should be in the &amp;lt;code&amp;gt;YAMBO_TUTORIALS/hBN/&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== YAMBO calculations ==&lt;br /&gt;
Enter the &amp;lt;code&amp;gt;YAMBO_TUTORIALS/hBN/&amp;lt;/code&amp;gt; directory. In there you have the &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
 $ ls ./SAVE&lt;br /&gt;
 ndb.gops ndb.kindx ns.db1 ns.kb_pp_pwscf_fragment_1 ....&lt;br /&gt;
&lt;br /&gt;
and the &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
 $ ls ./3D_BSE&lt;br /&gt;
 ndb.BS_Q1_CPU_0 ndb.BS_diago_Q1 ndb.dip_iR_and_P_fragment_1 ndb.em1s_fragment_1 ...&lt;br /&gt;
!--&amp;gt;&lt;br /&gt;
==List the excitonic energies==&lt;br /&gt;
First, we will obtain the list of all the exciton energies (that is the eigenvalues of the two-particle Hamiltonian) sorted both by energies and oscillator strength.&lt;br /&gt;
&lt;br /&gt;
To read this information from the Yambo databases produced in [[Bethe-Salpeter solver: diagonalization| this previous step]], we use the Yampo pre- and post-processing utility &amp;lt;code&amp;gt;ypp&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Type:&lt;br /&gt;
&lt;br /&gt;
 $ ypp -J 3D_BSE -e s 1&lt;br /&gt;
&lt;br /&gt;
This instructs the code to list the excitons for the q-index = 1 (optical limit q=0). &lt;br /&gt;
&lt;br /&gt;
The results are output in the files &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039; and &#039;&#039;o-3D_BSE.exc_qpt1_I_sorted&#039;&#039;. &lt;br /&gt;
They report the energies of the excitons and their oscillator strengths. The strengths are normalised to the largest strength. Thus in the list, the brightest exciton has strength 1. &lt;br /&gt;
In &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039; the exciton energies are sorted by energy  (lower to higher), in &#039;&#039;o-3D_BSE.exc_qpt1_I_sorted&#039;&#039; by the oscillator strength (larger to smaller).&lt;br /&gt;
[[File:strengh.png|none|x120px|]]&lt;br /&gt;
&lt;br /&gt;
Inspect &#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039;: &lt;br /&gt;
The exciton with the lowest energy (3.54 eV) is doubly degenerate. The second-lowest is also doubly degenerate and is the brightest (oscillator strength of 1). The latter exciton is the one responsible for the largest peak in the optical absorption plots of the [[Bethe-Salpeter solver: diagonalization|previous tutorials]].&lt;br /&gt;
&lt;br /&gt;
To visualize these results, we plot them:&lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 gnuplot&amp;gt; set style line 2 lc rgb &#039;black&#039; pt 7   # circle&lt;br /&gt;
 gnuplot&amp;gt; plot &#039;o-3D_BSE.exc_qpt1_E_sorted&#039; with points ls 2 title &#039;Strengths&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ExcWeights3DhBN.png|none|600px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;---!&#039;&#039;&#039;Warning&#039;&#039;&#039;: the convergence of these results with different k-points grids is mandatory! ---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Calculate the exciton oscillator strength and amplitude ==&lt;br /&gt;
&lt;br /&gt;
We can now analyze the excitons in terms of single-particle states: which electronic transitions are the most relevant? In order to do that, create the appropriate input with &lt;br /&gt;
 $ ypp -F ypp_AMPL.in -J 3D_BSE -e a 1 &lt;br /&gt;
&lt;br /&gt;
Suppose you wish to analyze the first 4 excitons (i.e., the first 2 doubly-degenerate excitons). Then, change this line as:&lt;br /&gt;
 States= &amp;quot;1 - 4&amp;quot;              # Index of the BS state(s)&lt;br /&gt;
&lt;br /&gt;
Close the input and run ypp&lt;br /&gt;
&lt;br /&gt;
 $ ypp -F ypp_AMPL.in -J 3D_BSE&lt;br /&gt;
&lt;br /&gt;
 $ ls  o*exc*at*&lt;br /&gt;
 o-3D_BSE.exc_qpt1_amplitude_at_1 o-3D_BSE.exc_qpt1_weights_at_1 ...&lt;br /&gt;
 &lt;br /&gt;
For an exciton  &amp;lt;math&amp;gt;|\lambda&amp;gt;&amp;lt;/math&amp;gt; , &#039;&#039;o-3D_BSE.exc_qpt1_weights_at_*&#039;&#039; report the Weights&lt;br /&gt;
[[File:Weights.png|none|x60px|]]&lt;br /&gt;
and &#039;&#039;o-3D_BSE.exc_qpt1_amplitude_**&#039;&#039; report the amplitudes &lt;br /&gt;
[[File:Ampl.png|none|x70px|]]&lt;br /&gt;
&lt;br /&gt;
Open the file  &#039;&#039;o-3D_BSE.exc_weights_at_3&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 # Band_V          Band_C          Kv-q ibz        Symm_kv         Kc ibz          Symm_kc         Weight          Energy&lt;br /&gt;
 #    &lt;br /&gt;
   7.00000000      10.0000000      14.0000000      2.00000000      14.0000000      2.00000000     0.395135850      4.35248947   &lt;br /&gt;
   7.00000000      10.0000000      14.0000000      1.00000000      14.0000000      1.00000000     0.394993663      4.35248947   &lt;br /&gt;
   8.00000000      9.00000000      14.0000000      2.00000000      14.0000000      2.00000000     0.391943455      4.35241365   &lt;br /&gt;
   8.00000000      9.00000000      14.0000000      1.00000000      14.0000000      1.00000000     0.391800284      4.35241365   &lt;br /&gt;
   7.00000000      10.0000000      13.0000000      2.00000000      13.0000000      2.00000000     0.745555162E-1   4.81094742   &lt;br /&gt;
   7.00000000      10.0000000      13.0000000      1.00000000      13.0000000      1.00000000     0.745274872E-1   4.81094742   &lt;br /&gt;
   8.00000000      9.00000000      13.0000000      2.00000000      13.0000000      2.00000000     0.739243180E-1   4.81087065   &lt;br /&gt;
   8.00000000      9.00000000      13.0000000      1.00000000      13.0000000      1.00000000     0.738964081E-1   4.81087065   &lt;br /&gt;
&lt;br /&gt;
The third exciton is mostly composed of single-particle transitions from VBM to CBM at point H (last k-point of the grid, number 14) of the 3D hexagonal Brillouin zone, with contributions also coming from point K (number 13). All the contributions weighing less than 5% are not shown by default. Recall from the previous analysis that exciton states 3 and 4 (degenerate) are the optically active ones.&lt;br /&gt;
&lt;br /&gt;
We can now plot the amplitude of the bright exciton:&lt;br /&gt;
 $ paste o-3D_BSE.exc_qpt1_amplitude_at_3 o-3D_BSE.exc_qpt1_amplitude_at_4 &amp;gt; o-3D_BSE.exc_qpt1_amplitude_at_3_4&lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 gnuplot&amp;gt; set xlabel &#039;Energy (eV)&#039; &lt;br /&gt;
 gnuplot&amp;gt; set ylabel &#039;Amplitude&#039; &lt;br /&gt;
 gnuplot&amp;gt; p &#039;o-3D_BSE.exc_qpt1_amplitude_at_3_4&#039; u 1:($2+$4)/2 w l t &#039;Bright exciton&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ExcAmp3DhBN.png|none|600px]]&lt;br /&gt;
&lt;br /&gt;
Recall that while this plot is related to the peaks in the optical absorption spectrum, it lacks the coupling with the external field, which is encoded in the dipole matrix elements.&lt;br /&gt;
&lt;br /&gt;
== Plot the exciton spatial distribution ==&lt;br /&gt;
&lt;br /&gt;
To see the spatial character of the exciton, YPP writes the exciton spatial distribution, e.g., the probability to find the electron when the hole is fixed in a given position.&lt;br /&gt;
Different output formats can be selected and to obtain 1D, 2D, and 3D plots.&lt;br /&gt;
&lt;br /&gt;
Create the input and change the various parameters as shown below. &lt;br /&gt;
&lt;br /&gt;
 $ ypp -F ypp_WF.in -J 3D_BSE -e w&lt;br /&gt;
&lt;br /&gt;
 excitons                     # [R] Excitons&lt;br /&gt;
 wavefunction                 # [R] Wavefunction&lt;br /&gt;
 Format= &amp;quot;x&amp;quot;                  # Output format [(c)ube/(g)nuplot/(x)crysden]&lt;br /&gt;
 Direction= &amp;quot;123&amp;quot;               # [rlu] [1/2/3] for 1d or [12/13/23] for 2d [123] for 3D&lt;br /&gt;
 FFTGvecs=  30        Ry    # [FFT] Plane-waves&lt;br /&gt;
 States= &amp;quot;3 - 3&amp;quot;              # Index of the BS state(s)&lt;br /&gt;
 Degen_Step=   0.0100   eV    # Maximum energy separation of two degenerate states&lt;br /&gt;
 % Cells&lt;br /&gt;
  5 | 5 | 1 |                             # Number of cell repetitions in each direction (odd or 1)&lt;br /&gt;
 %&lt;br /&gt;
 % Hole&lt;br /&gt;
 2.35800028 | 1.36139178 | 7.08835602 # [cc] Hole position in unit cell (positive)&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
One of the parameters, &amp;lt;code&amp;gt;Cells&amp;lt;/code&amp;gt;, is the size of the cell where the exciton will be visualised.&lt;br /&gt;
Note that if the k-grid of the BSE simulation is XxYxZ, then the exciton has an induced fictitious periodicity for every XxYxZ cells of the simulation.&lt;br /&gt;
For hBN, this is not a problem because the exciton is strongly localized, but in other systems, where excitons are more delocalized, it may b necessary to use &lt;br /&gt;
very large k-grids for the BSE calculation.&lt;br /&gt;
&lt;br /&gt;
Also notice that, because of the value of &amp;lt;code&amp;gt;Degen_Step&amp;lt;/code&amp;gt;, the code will automatically recognize and merge the degenerate excitons 3 and 4: you will see this in the log file.&lt;br /&gt;
&lt;br /&gt;
Finally: how did we know at which coordinate to place the hole? It&#039;s best placed in the position where the valence electrons contributing to the exciton are localised. In the case of hBN, they are on the nitrogen atoms. We can obtain the Cartesian coordinates of these atoms from our previously generated &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039; file:&lt;br /&gt;
 # Atom 1 with Z 5 [cc]:  2.35800028      1.36139178      0.00000000   &lt;br /&gt;
 # Atom 2 with Z 5 [cc]: -2.35800028     -1.36139178      6.08835602   &lt;br /&gt;
 # Atom 1 with Z 7 [cc]: -2.35800028     -1.36139178      0.00000000   &lt;br /&gt;
 # Atom 2 with Z 7 [cc]:  2.35800028      1.36139178      6.08835602 &lt;br /&gt;
We take the positive values of the nitrogen(Z=7, last line) and shift the vertical position of the hole from 6.088 to 7.088 so that the hole does not end up in the center of the atom (and therefore, possibly in a node of the wave function).  &lt;br /&gt;
&lt;br /&gt;
Now close the input and run ypp&lt;br /&gt;
 $ ypp -F ypp_WF.in -J 3D_BSE&lt;br /&gt;
&lt;br /&gt;
After it&#039;s finished, we can visualise with xcrysden or with VESTA:&lt;br /&gt;
 $ xcrysden --xsf o-3D_BSE.exc_qpt1_3d_3.xsf&lt;br /&gt;
&lt;br /&gt;
 $ VESTA o-3D_BSE.exc_qpt1_3d_3.xsf&lt;br /&gt;
&lt;br /&gt;
[[File:ExcWF3DhBN.jpg|none|600px]]&lt;br /&gt;
We notice that the electron is completely confined on the boron atoms and on the same layer of the hole. For comparison, see for example ref. &amp;lt;ref&amp;gt;Huge Excitonic Effects in Layered Hexagonal Boron Nitride, B. Arnaud et al., [https://arxiv.org/abs/cond-mat/0503390 preprint ArXiv]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Plot electron/hole average density (only in Yambo 5.x)==&lt;br /&gt;
&lt;br /&gt;
Another way to analyze excitons, it is the possibility to plot the average electron/hole densities defined as:&lt;br /&gt;
&lt;br /&gt;
[[File:Electron hole density.png|400px]]&lt;br /&gt;
&lt;br /&gt;
to generate the corresponding input just type&lt;br /&gt;
&lt;br /&gt;
 ypp -F ypp_WF.in -e w -avehole&lt;br /&gt;
&lt;br /&gt;
and choose the exciton you want to plot. The electron/hole average densities correspond to generalized valence/conduction orbitals for a given exciton. They are interesting in particular for molecular crystals because they allow distinguishing charge-transfer versus Frenkel excitons, from the relative position of the electron/hole densities.&lt;br /&gt;
&lt;br /&gt;
If you want to see an example of hole/electron density of excitons please have a look to ref. &amp;lt;ref&amp;gt;Strongly Bound Excitons in Metal-Organic Framework MOF-5: A Many-Body Perturbation Theory Study, A. R. Kshirsagar et al., [https://doi.org/10.26434/chemrxiv.14034917.v1 preprint ChemRxiv]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
From this tutorial you&#039;ve learned:&lt;br /&gt;
* How sort excitonic states by energy and intensity&lt;br /&gt;
* Analyse their composition in reciprocal space and in terms of single-particle transitions&lt;br /&gt;
* Visualize the exciton wave function in real space&lt;br /&gt;
&lt;br /&gt;
==Navigate==&lt;br /&gt;
* [[Calculating optical spectra including excitonic effects: a step-by-step guide]] tutorial&lt;br /&gt;
* [[BSE hBN Yambo Virtual 2021 version|Back to CECAM 2021 tutorial page for the BSE]]&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;br /&gt;
* Similar tutorial for 2D-hBN and including finite-momentum BSE: [[How to analyse excitons|this page]].&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=How_to_analyse_excitons_-_ICTP_2022_school&amp;diff=4493</id>
		<title>How to analyse excitons - ICTP 2022 school</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=How_to_analyse_excitons_-_ICTP_2022_school&amp;diff=4493"/>
		<updated>2021-03-28T17:17:29Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will learn how to:&lt;br /&gt;
* analyze a BSE optical spectrum in terms of excitonic eigenvectors and eigenvalues&lt;br /&gt;
* look at the spatial distribution of the exciton&lt;br /&gt;
&lt;br /&gt;
This is demonstrated for 3D-hBN. For a similar tutorial focusing on 2D-hBN and including finite-momentum BSE, go to [[How to analyse excitons|this page]].&lt;br /&gt;
 &lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&#039;&#039;&#039;Previous modules&#039;&#039;&#039;&lt;br /&gt;
* You must have completed the [[Calculating optical spectra including excitonic effects: a step-by-step guide]] tutorial&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* The &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; databases for 3D hBN &lt;br /&gt;
* The &amp;lt;code&amp;gt;ndb.BS_diago*&amp;lt;/code&amp;gt; databases for 3D hBN&lt;br /&gt;
* &amp;lt;code&amp;gt;ypp &amp;lt;/code&amp;gt; executable&lt;br /&gt;
* &amp;lt;code&amp;gt;xcrysden&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;VESTA&amp;lt;/code&amp;gt; executables&lt;br /&gt;
* &amp;lt;code&amp;gt;gnuplot&amp;lt;/code&amp;gt; executable&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== YAMBO calculations ==&lt;br /&gt;
If you have completed the tutorials on 3D hBN you should have all the databases required to do this tutorial in your &amp;lt;code&amp;gt;YAMBO_TUTORIALS/hBN/SAVE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;YAMBO_TUTORIALS/hBN/3D_BSE&amp;lt;/code&amp;gt; directories.&lt;br /&gt;
&lt;br /&gt;
 $ ls ./SAVE&lt;br /&gt;
 ndb.gops ndb.kindx ns.db1 ns.kb_pp_pwscf_fragment_1 ....&lt;br /&gt;
&lt;br /&gt;
 $ ls ./3D_BSE&lt;br /&gt;
 ndb.BS_Q1_CPU_0 ndb.BS_diago_Q1 ndb.dip_iR_and_P_fragment_1 ndb.em1s_fragment_1 ...&lt;br /&gt;
&lt;br /&gt;
==Sort the excitonic eigenvalues==&lt;br /&gt;
We are now going to use &amp;lt;code&amp;gt;ypp&amp;lt;/code&amp;gt; to post-process our BSE results.&lt;br /&gt;
First, type&lt;br /&gt;
&lt;br /&gt;
 $ ypp -J 3D_BSE -e s 1&lt;br /&gt;
&lt;br /&gt;
which means that we are sorting the excitons for the q-index = 1 (optical limit q=0).&lt;br /&gt;
The new generated file &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted &#039;&#039; (along with &#039;&#039;o-3D_BSE.exc_qpt1_I_sorted &#039;&#039;) reports &lt;br /&gt;
the energies of the excitons and their Dipole Oscillator Strengths sorted by Energy (Intensity).&lt;br /&gt;
[[File:strengh.png|none|x120px|]]&lt;br /&gt;
Open the first file and look inside. The first exciton is doubly degenerate at the energy of 3.54 eV, and the second one - also doubly degenerate - has the highest strength (normalized to 1). The latter exciton is the one appearing as the major peak in the optical absorption plots of the [[Bethe-Salpeter solver: diagonalization|previous tutorials]].&lt;br /&gt;
&lt;br /&gt;
You can also make a plot:&lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 gnuplot&amp;gt; set style line 2 lc rgb &#039;black&#039; pt 7   # circle&lt;br /&gt;
 gnuplot&amp;gt; plot &#039;o-3D_BSE.exc_qpt1_E_sorted&#039;  with points ls 2 title &#039;Strengths&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ExcWeights3DhBN.png|none|600px]]&lt;br /&gt;
&lt;br /&gt;
Attention: the convergence of these results with different k-points grids is mandatory!&lt;br /&gt;
&lt;br /&gt;
== Calculate the exciton oscillator strenght and amplitude ==&lt;br /&gt;
&lt;br /&gt;
We can now analyze the excitons in terms of single-particle states: which electronic transitions are the most relevant? In order to do that, create the appropriate input with &lt;br /&gt;
 $ ypp -F ypp_AMPL.in -J 3D_BSE -e a 1 &lt;br /&gt;
&lt;br /&gt;
Suppose you wish to analyze the first 4 excitons (i.e., the first 2 doubly-degenerate excitons). Then, change this line as:&lt;br /&gt;
 States= &amp;quot;1 - 4&amp;quot;              # Index of the BS state(s)&lt;br /&gt;
&lt;br /&gt;
Close the input and run ypp&lt;br /&gt;
&lt;br /&gt;
 $ ypp -F ypp_AMPL.in -J 3D_BSE&lt;br /&gt;
&lt;br /&gt;
 $ ls  o*exc*at*&lt;br /&gt;
 o-3D_BSE.exc_qpt1_amplitude_at_1 o-3D_BSE.exc_qpt1_weights_at_1 ...&lt;br /&gt;
 &lt;br /&gt;
For an exciton  &amp;lt;math&amp;gt;|\lambda&amp;gt;&amp;lt;/math&amp;gt; , &#039;&#039;o-3D_BSE.exc_qpt1_weights_at_*&#039;&#039; report the Weights&lt;br /&gt;
[[File:Weights.png|none|x60px|]]&lt;br /&gt;
and &#039;&#039;o-3D_BSE.exc_qpt1_amplitude_**&#039;&#039; report the amplitudes &lt;br /&gt;
[[File:Ampl.png|none|x70px|]]&lt;br /&gt;
&lt;br /&gt;
Open the file  &#039;&#039;o-3D_BSE.exc_weights_at_3&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 # Band_V          Band_C          Kv-q ibz        Symm_kv         Kc ibz          Symm_kc         Weight          Energy&lt;br /&gt;
 #    &lt;br /&gt;
   7.00000000      10.0000000      14.0000000      2.00000000      14.0000000      2.00000000     0.395135850      4.35248947   &lt;br /&gt;
   7.00000000      10.0000000      14.0000000      1.00000000      14.0000000      1.00000000     0.394993663      4.35248947   &lt;br /&gt;
   8.00000000      9.00000000      14.0000000      2.00000000      14.0000000      2.00000000     0.391943455      4.35241365   &lt;br /&gt;
   8.00000000      9.00000000      14.0000000      1.00000000      14.0000000      1.00000000     0.391800284      4.35241365   &lt;br /&gt;
   7.00000000      10.0000000      13.0000000      2.00000000      13.0000000      2.00000000     0.745555162E-1   4.81094742   &lt;br /&gt;
   7.00000000      10.0000000      13.0000000      1.00000000      13.0000000      1.00000000     0.745274872E-1   4.81094742   &lt;br /&gt;
   8.00000000      9.00000000      13.0000000      2.00000000      13.0000000      2.00000000     0.739243180E-1   4.81087065   &lt;br /&gt;
   8.00000000      9.00000000      13.0000000      1.00000000      13.0000000      1.00000000     0.738964081E-1   4.81087065   &lt;br /&gt;
&lt;br /&gt;
The third exciton is mostly composed of single-particle transitions from VBM to CBM at point H (last k-point of the grid, number 14) of the 3D hexagonal Brillouin zone, with contributions also coming from point K (number 13). All the contributions weighing less than 5% are not shown by default. Recall from the previous analysis that exciton states 3 and 4 (degenerate) are the optically active ones.&lt;br /&gt;
&lt;br /&gt;
We can now plot the amplitude of the bright exciton:&lt;br /&gt;
 $ paste o-3D_BSE.exc_qpt1_amplitude_at_3 o-3D_BSE.exc_qpt1_amplitude_at_4 &amp;gt; o-3D_BSE.exc_qpt1_amplitude_at_3_4&lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 gnuplot&amp;gt; set xlabel &#039;Energy (eV)&#039; &lt;br /&gt;
 gnuplot&amp;gt; set ylabel &#039;Amplitude&#039; &lt;br /&gt;
 gnuplot&amp;gt; p &#039;o-3D_BSE.exc_qpt1_amplitude_at_3_4&#039; u 1:($2+$4)/2 w l t &#039;Bright exciton&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ExcAmp3DhBN.png|none|600px]]&lt;br /&gt;
&lt;br /&gt;
Recall that while this plot is related to the peaks in the optical absorption spectrum, it lacks the coupling with the external field, which is encoded in the dipole matrix elements.&lt;br /&gt;
&lt;br /&gt;
== Plot the exciton spatial distribution ==&lt;br /&gt;
&lt;br /&gt;
To see the spatial character of the exciton, YPP writes the exciton spatial distribution, e.g., the probability to find the electron when the hole is fixed in a given position.&lt;br /&gt;
Different output formats can be selected and to obtain 1D, 2D, and 3D plots.&lt;br /&gt;
&lt;br /&gt;
Create the input and change the various parameters as shown below. &lt;br /&gt;
&lt;br /&gt;
 $ ypp -F ypp_WF.in -J 3D_BSE -e w&lt;br /&gt;
&lt;br /&gt;
 excitons                     # [R] Excitons&lt;br /&gt;
 wavefunction                 # [R] Wavefunction&lt;br /&gt;
 Format= &amp;quot;x&amp;quot;                  # Output format [(c)ube/(g)nuplot/(x)crysden]&lt;br /&gt;
 Direction= &amp;quot;123&amp;quot;               # [rlu] [1/2/3] for 1d or [12/13/23] for 2d [123] for 3D&lt;br /&gt;
 FFTGvecs=  30        Ry    # [FFT] Plane-waves&lt;br /&gt;
 States= &amp;quot;3 - 3&amp;quot;              # Index of the BS state(s)&lt;br /&gt;
 Degen_Step=   0.0100   eV    # Maximum energy separation of two degenerate states&lt;br /&gt;
 % Cells&lt;br /&gt;
  5 | 5 | 1 |                             # Number of cell repetitions in each direction (odd or 1)&lt;br /&gt;
 %&lt;br /&gt;
 % Hole&lt;br /&gt;
 2.35800028 | 1.36139178 | 7.08835602 # [cc] Hole position in unit cell (positive)&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
One of the parameters, &amp;lt;code&amp;gt;Cells&amp;lt;/code&amp;gt;, is the size of the cell where the exciton will be visualised.&lt;br /&gt;
Note that if the k-grid of the BSE simulation is a XxYxZ, then the exciton has an induced fictitious periodicity every XxYxZ cells of the simulation.&lt;br /&gt;
For hBN this is not a problem because the exciton is strongly localized, but in other systems, where excitons are more delocalized, it may b necessary to use &lt;br /&gt;
very large k-grids for the BSE calculation.&lt;br /&gt;
&lt;br /&gt;
Also notice that, because of the value of &amp;lt;code&amp;gt;Degen_Step&amp;lt;/code&amp;gt;, the code will automatically recognize and merge the degenerate excitons 3 and 4: you will see this in the log file.&lt;br /&gt;
&lt;br /&gt;
Finally: how did we know at which coordinate to place the hole? It&#039;s best placed in the position where the valence electrons contributing to the exciton are localised. In the case of hBN, they are on the nitrogen atoms. We can obtain the Cartesian coordinates of these atoms from our previously generated &#039;&#039;o-3D_BSE.exc_qpt1_E_sorted&#039;&#039; file:&lt;br /&gt;
 # Atom 1 with Z 5 [cc]:  2.35800028      1.36139178      0.00000000   &lt;br /&gt;
 # Atom 2 with Z 5 [cc]: -2.35800028     -1.36139178      6.08835602   &lt;br /&gt;
 # Atom 1 with Z 7 [cc]: -2.35800028     -1.36139178      0.00000000   &lt;br /&gt;
 # Atom 2 with Z 7 [cc]:  2.35800028      1.36139178      6.08835602 &lt;br /&gt;
We take the positive values of the nitrogen(Z=7, last line) and shift the vertical position of the hole from 6.088 to 7.088 so that the hole does not end up in the center of the atom (and therefore, possibly in a node of the wave function).  &lt;br /&gt;
&lt;br /&gt;
Now close the input and run ypp&lt;br /&gt;
 $ ypp -F ypp_WF.in -J 3D_BSE&lt;br /&gt;
&lt;br /&gt;
After it&#039;s finished, we can visualise with xcrysden or with VESTA:&lt;br /&gt;
 $ xcrysden --xsf o-3D_BSE.exc_qpt1_3d_3.xsf&lt;br /&gt;
&lt;br /&gt;
 $ VESTA o-3D_BSE.exc_qpt1_3d_3.xsf&lt;br /&gt;
&lt;br /&gt;
[[File:ExcWF3DhBN.jpg|none|600px]]&lt;br /&gt;
We notice that the electron is completely confined on the boron atoms and on the same layer of the hole. For comparison, see for example ref. &amp;lt;ref&amp;gt;Huge Excitonic Effects in Layered Hexagonal Boron Nitride, B. Arnaud et al., [https://arxiv.org/abs/cond-mat/0503390 preprint ArXiv]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Plot electron/hole average density (only in Yambo 5.x)==&lt;br /&gt;
&lt;br /&gt;
Another way to analyze excitons, it is the possibility to plot the average electron/hole densities defined as:&lt;br /&gt;
&lt;br /&gt;
[[File:Electron hole density.png|400px]]&lt;br /&gt;
&lt;br /&gt;
to generate the corresponding input just type&lt;br /&gt;
&lt;br /&gt;
 ypp -F ypp_WF.in -e w -avehole&lt;br /&gt;
&lt;br /&gt;
and choose the exciton you want to plot. The electron/hole average densities correspond to generalized valence/conduction orbitals for a given exciton. They are interesting in particular for molecular crystals because they allow distinguishing charge-transfer versus Frenkel excitons, from the relative position of the electron/hole densities.&lt;br /&gt;
&lt;br /&gt;
If you want see an example of hole/electron density of excitons please have a look to ref. &amp;lt;ref&amp;gt;Strongly Bound Excitons in Metal-Organic Framework MOF-5: A Many-Body Perturbation Theory Study, A. R. Kshirsagar et al., [https://doi.org/10.26434/chemrxiv.14034917.v1 preprint ChemRxiv]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
From this tutorial you&#039;ve learned:&lt;br /&gt;
* How sort excitonic states by energy and intensity&lt;br /&gt;
* Analyse their composition in reciprocal space and in terms of single-particle transitions&lt;br /&gt;
* Visualize the exciton wave function in real space&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [[Calculating optical spectra including excitonic effects: a step-by-step guide]] tutorial&lt;br /&gt;
* [[BSE hBN Yambo Virtual 2021 version|Back to CECAM 2021 tutorial page for the BSE]]&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_solver:_diagonalization&amp;diff=4492</id>
		<title>Bethe-Salpeter solver: diagonalization</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_solver:_diagonalization&amp;diff=4492"/>
		<updated>2021-03-28T17:13:46Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this module, you learn how to obtain an optical absorption spectrum within the Bethe-Salpeter equation (BSE) framework by diagonalizing a previously calculated Bethe-Salpeter (BS) kernel.&lt;br /&gt;
 &lt;br /&gt;
==Prerequisites==&lt;br /&gt;
[[File:Yambo-handbook-v4.1.2-p-15.png|thumb|Cheatsheet on BSS diagonalization|150px]]&lt;br /&gt;
* You must first complete the [[Static screening]] and [[Bethe-Salpeter kernel]] modules&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* The &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; databases for 3D hBN&lt;br /&gt;
* The &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; directory containing the databases from the [[Static screening]] and [[Bethe-Salpeter kernel]] modules&lt;br /&gt;
* The &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt; executable&lt;br /&gt;
* &amp;lt;code&amp;gt;gnuplot&amp;lt;/code&amp;gt; for plotting spectra&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The macroscopic dielectric function (from which the absorption and EEL spectra can be computed) is obtained from the eigenvalues &#039;&#039;E&#039;&#039;&amp;lt;sub&amp;gt;&amp;amp;lambda;&amp;lt;/sub&amp;gt; (excitonic energies) and eigenvectors A&amp;lt;sup&amp;gt;&amp;amp;lambda;&amp;lt;/sup&amp;gt;&amp;lt;sub&amp;gt;&#039;&#039;cv&#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt; (exciton composition in terms of electron-hole pairs) of the two-particle Hamiltonian:&lt;br /&gt;
&lt;br /&gt;
[[File:BSE1-Eq4.png|none|x50px]]&lt;br /&gt;
&lt;br /&gt;
To get the two-particle Hamiltonian eigensolutions you need to diagonalize the two-particle Hamiltonian (non-spin-polarized case):&lt;br /&gt;
&lt;br /&gt;
[[File:BSE1-Eq1.png|none|x50px]]&lt;br /&gt;
&lt;br /&gt;
for which the &#039;&#039;2V - W&#039;&#039; part was evaluated in the [[Bethe-Salpeter kernel]] module.&lt;br /&gt;
&lt;br /&gt;
The difference of quasiparticle energies &#039;&#039;&amp;amp;Delta;&amp;amp;epsilon;&amp;lt;sub&amp;gt;cv&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;= &amp;amp;epsilon;&amp;lt;sub&amp;gt;c&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt; - &amp;amp;epsilon;&amp;lt;sub&amp;gt;v&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;&#039;&#039; is added to the matrix just before the solver. &lt;br /&gt;
There are two possible choices:&lt;br /&gt;
* the Kohn-Sham energies (calculated at DFT level) are corrected through a scissor and the renormalization of the conduction and valence bandwidth (linearly for the conduction band minimum and the valence band maximum respectively):&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&amp;amp;Delta;&amp;amp;epsilon;&amp;lt;sub&amp;gt;cv&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;= M&amp;lt;sub&amp;gt;c&amp;lt;/sub&amp;gt;(&amp;amp;epsilon;&amp;lt;sub&amp;gt;c&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;KS&amp;lt;/sup&amp;gt; - CBM) - M&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;(&amp;amp;epsilon;&amp;lt;sub&amp;gt;v&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;KS&amp;lt;/sup&amp;gt; - VBM) + Scissor&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
* the quasiparticle energies calculated at [[How to obtain the quasi-particle band structure of a bulk material: h-BN|GW level]] are used (see [[Bethe-Salpeter on top of quasiparticle energies|next tutorial]]. Missing energies are computed by interpolation.&lt;br /&gt;
&lt;br /&gt;
==Choosing the input parameters==&lt;br /&gt;
&lt;br /&gt;
Invoke yambo with the &amp;quot;-y d&amp;quot; option in the command line:&lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 03_3D_BSE_diago_solver.in -y d -V qp -J 3D_BSE&lt;br /&gt;
&lt;br /&gt;
The input is open in the editor. The input variable to be changed are &lt;br /&gt;
 % [[Variables#BEnRange|BEnRange]]&lt;br /&gt;
   2.00000 | 8.00000 | eV    &lt;br /&gt;
 %&lt;br /&gt;
 [[Variables#BEnSteps|BEnSteps]]= 200      &lt;br /&gt;
 &lt;br /&gt;
which define 200 evenly spaced points between 2 and 8 eV at which the spectrum is calculated (&amp;amp;omega; in the equation for the macroscopic dielectric function),&lt;br /&gt;
  &lt;br /&gt;
 % [[Variables#BDmRange|BDmRange]]&lt;br /&gt;
   0.10000 |  0.10000 | eV    &lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
which defines the spectral broadening (Lorentzian model), &lt;br /&gt;
&lt;br /&gt;
 % [[Variables#BLongDir|BLongDir]]&lt;br /&gt;
  1.000000 | 1.000000 | 0.000000 | &lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
which defines the direction of the perturbing electric field (in this case the in-plane direction).&lt;br /&gt;
&lt;br /&gt;
Another parameter to modify is&lt;br /&gt;
 % [[Variables#KfnQP_E|KfnQP_E]] &lt;br /&gt;
  1.440000 | 1.000000 | 1.000000 |&lt;br /&gt;
 %&lt;br /&gt;
This gives the quasiparticle corrections to the Kohn-Sham eigenvalues and is deduced either from experiment or previous [[How to obtain the quasi-particle band structure of a bulk material: h-BN|GW calculations]]. &lt;br /&gt;
With reference to the equation in the Background, the format is&lt;br /&gt;
  &#039;&#039;Scissor&#039;&#039; | &#039;&#039;M&amp;lt;sub&amp;gt;c&amp;lt;/sub&amp;gt;&#039;&#039; | &#039;&#039;M&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;&#039;&#039; |&lt;br /&gt;
The alternative of directly input corrections calculated from a previous GW calculation is shown in the [[Bethe-Salpeter on top of quasiparticle energies|next section]].&lt;br /&gt;
&lt;br /&gt;
To analyse the exciton composition and plot the exciton wave function in the [[How to analyse excitons - CECAM 2021 school|postprocessing tutorial]], you &#039;&#039;&#039;must uncomment&#039;&#039;&#039; the following flag:&lt;br /&gt;
 WRbsWF                        # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: Only when this flag is uncommented, Yambo writes on disk the eigenvectors A&amp;lt;sup&amp;gt;&amp;amp;lambda;&amp;lt;/sup&amp;gt;&amp;lt;sub&amp;gt;&#039;&#039;cv&#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt; (exciton composition in terms of electron-hole pairs).&lt;br /&gt;
&lt;br /&gt;
==Bethe-Salpeter solver runlevel== &lt;br /&gt;
 $ yambo -F 03_3D_BSE_diago_solver.in -J 3D_BSE  &lt;br /&gt;
In the log (either in standard output or in &amp;lt;code&amp;gt;l-3D_BSE_optics_dipoles_bss_bse&amp;lt;/code&amp;gt;), after various setup/loading, the BSE is diagonalized using the linked linear algebra libraries: &lt;br /&gt;
 &amp;lt;---&amp;gt; [03] BSE solver(s) @q1&lt;br /&gt;
 &amp;lt;---&amp;gt; [LA] SERIAL linear algebra&lt;br /&gt;
 &amp;lt;---&amp;gt; [03.01] Diago Solver @q1&lt;br /&gt;
 &amp;lt;---&amp;gt; BSK diagonalize |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; EPS R residuals |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; BSK resp. funct |########################################| [100%] --(E) --(X)&lt;br /&gt;
&lt;br /&gt;
The report &amp;lt;code&amp;gt;r-3D_BSE_optics_dipoles_bss_bse&amp;lt;/code&amp;gt; contains information relative to this runlevel in section 3:&lt;br /&gt;
&lt;br /&gt;
 [03] BSE solver(s) @q1&lt;br /&gt;
 ======================&lt;br /&gt;
&lt;br /&gt;
Take some time to inspect the log and the report to check the consistency with the input variables. This run produces a new database in the 3D_BSE directory&lt;br /&gt;
 3D_BSE/ndb.BS_diago_Q01&lt;br /&gt;
So if you need the spectrum on a different energy range, direction, with a different broadening or more points the diagonalization is not repeated, just the spectrum is recalculated.&lt;br /&gt;
Note that this database, as well as any other netCDF-format database produced by Yambo, can be directly accessed and read using [[First steps in Yambopy| python modules]].&lt;br /&gt;
    &lt;br /&gt;
This run produces as well human readable files (o-*). Specifically &amp;lt;code&amp;gt;o-3D_BSE.eps_q1_diago_bse&amp;lt;/code&amp;gt; contains the real and imaginary part of the macroscopic dielectric function &lt;br /&gt;
  &lt;br /&gt;
 $ less o-3D_BSE.eps_q1_diago_bse &lt;br /&gt;
 ...&lt;br /&gt;
 #&lt;br /&gt;
 #  E/ev[1]    EPS-Im[2]  EPS-Re[3]  EPSo-Im[4] EPSo-Re[5]&lt;br /&gt;
 #&lt;br /&gt;
   2.00000    0.16162    5.83681    0.04959    4.14127&lt;br /&gt;
   2.03015    0.16787    5.88612    0.05090    4.15638&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
which is in the format &lt;br /&gt;
 Energy in eV | Imaginary part BSE | Real part BSE |Imaginary part IPA | Real part IPA |  &lt;br /&gt;
&lt;br /&gt;
where real and imaginary parts refer to the macroscopic dielectric function. The imaginary part is related to optical absorption. The latter (column 2) can be plotted versus the photon energy (column 1) and compared with the independent particle approximation (IPA, column 4), e.g.: &lt;br /&gt;
 &lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 ...&lt;br /&gt;
 plot &#039;o-3D_BSE.eps_q1_diago_bse&#039; u 1:2 w l t &#039;BSE&#039;, &#039;o-3D_BSE.eps_q1_diago_bse&#039; u 1:4 w l  t &#039;IPA&#039;&lt;br /&gt;
&lt;br /&gt;
[[file:03_bse_diago.png |none|600px]]&lt;br /&gt;
The addition of the kernel has the effect to red-shift the spectrum onset and redistribute the oscillator strengths. Note that the convergence for k-points smooths out the low energy peaks in the IPA (which are an artefact of poor convergence with k-points producing artificial confinement) to give the shoulder corresponding to the van Hove singularity in the band structure. On the other hand, the low energy peak in the BSE is genuine and it is the signature of a bound exciton.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
From this tutorial you&#039;ve learned:&lt;br /&gt;
* How to compute the optical spectrum by using the diagonal solver within the Bethe-Salpeter equation framework&lt;br /&gt;
&lt;br /&gt;
==Navigate==&lt;br /&gt;
&lt;br /&gt;
* Previous module: [[Bethe-Salpeter kernel]]&lt;br /&gt;
* Next module: [[Bethe-Salpeter on top of quasiparticle energies]]&lt;br /&gt;
* Alternative Bethe-Salpeter equation solver: [[Bethe-Salpeter solver: Lanczos-Haydock | Lanczos-Haydock]] &lt;br /&gt;
* Alternative Bethe-Salpeter equation solver: [[Bethe-Salpeter solver: SLEPC | Slepc]] &lt;br /&gt;
* Exciton analysis: [[How to analyse excitons - CECAM 2021 school]]&lt;br /&gt;
* Back to [[Calculating optical spectra including excitonic effects: a step-by-step guide]] tutorial&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_on_top_of_quasiparticle_energies&amp;diff=4491</id>
		<title>Bethe-Salpeter on top of quasiparticle energies</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_on_top_of_quasiparticle_energies&amp;diff=4491"/>
		<updated>2021-03-28T17:13:36Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this module, you will learn how to include GW-corrected (QP) energies in the calculation of the absorption spectrum. The energy differences on the diagonal of the excitonic Hamiltonian are added before the solution of the Bethe-Salpeter eigenproblem, therefore only that step needs to be repeated if we change the QP corrections. &lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&#039;&#039;&#039;Previous modules&#039;&#039;&#039;&lt;br /&gt;
You must have completed &lt;br /&gt;
* the [[Bethe-Salpeter kernel|BSE kernel]] tutorial&lt;br /&gt;
* the [[Bethe-Salpeter solver: diagonalization| Bethe-Salpeter solver: diagonalization]] tutorial, in which a simple scissor operator is used for the QP corrections.&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* The &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; databases for 3D hBN &lt;br /&gt;
* The &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; directory containing the databases from the [[Static screening]], [[Bethe-Salpeter kernel]], [[Bethe-Salpeter solver: diagonalization]] modules thus containing the &amp;lt;code&amp;gt;ndb.BS_Q1_CPU_0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ndb.em1s*&amp;lt;/code&amp;gt; databases for 3D hBN&lt;br /&gt;
* The &amp;lt;code&amp;gt;3D_QP_BSE&amp;lt;/code&amp;gt; directory (provided) which contains the database with the GW corrections (create one directory with this name and put the ndb.QP file produced yesterday there)&lt;br /&gt;
* &amp;lt;code&amp;gt;yambo &amp;lt;/code&amp;gt; executable&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Reading the QP corrections from a previous &#039;&#039;GW&#039;&#039; calculation==&lt;br /&gt;
In [[Bethe-Salpeter solver: diagonalization|the previous step]] we used a simple scissor operator to correct the Kohn-Sham DFT energies. Instead, in this part, we are taking the QP corrections from a previous Yambo GW calculation.&lt;br /&gt;
We create and edit the input:&lt;br /&gt;
 $yambo -F 03_3D_QP_BSE.in -y d -V qp -J 3D_BSE&lt;br /&gt;
We set all parameters as in [[Bethe-Salpeter solver: diagonalization| the previous step]], except for the part regarding the QP correction:&lt;br /&gt;
  [[Variables#KfnQPdb|KfnQPdb]]= &amp;quot;E &amp;lt; 3D_QP_BSE/ndb.QP&amp;quot;              # [EXTQP BSK BSS] Database&lt;br /&gt;
  [[Variables#KfnQP_N|KfnQP_N]]= 1                   # [EXTQP BSK BSS] Interpolation neighbours&lt;br /&gt;
  % [[Variables#KfnQP_E|KfnQP_E]]&lt;br /&gt;
   0.000000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
Instead of setting the values for the scissor, we give the path to the database that contains the QP corrections (&amp;lt;code&amp;gt;3D_QP_BSE/ndb.QP&amp;lt;/code&amp;gt;). The latter was created by running a GW calculation as in [[GW hBN Yambo Virtual 2021 version#Step 3: Interpolating Band Structures|Step 3]] of the GW tutorial.&lt;br /&gt;
Run Yambo:&lt;br /&gt;
 $ yambo -F 03_3D_QP_BSE.in -J &amp;quot;3D_QP_BSE,3D_BSE&amp;quot;&lt;br /&gt;
Note how we specified two directories, separated by a comma. This instructs Yambo to look for databases that may be already present from previous steps of the calculations in all the listed folders. If you completed the [[Bethe-Salpeter solver: diagonalization|previous section]] of the tutorial, then you should have the &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; folder with &amp;lt;code&amp;gt;ndb.dipoles_*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ndb.em1s*&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ndb.BS_CPU*&amp;lt;/code&amp;gt; databases, which will not be recalculated by Yambo: the code will repeat only the diagonalization step, and print the resulting databases in the new folder &amp;lt;code&amp;gt;3D_QP_BSE&amp;lt;/code&amp;gt;. If you don&#039;t have the &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; folder, you have to repeat the entire BSE calculation, therefore you just need to give the option &amp;quot;-J 3D_QP_BSE&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This produces the following log in the standard output. Note Section 4 (regarding external QP corrections to the kernel):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;---&amp;gt; [04] External/Internal QP corrections&lt;br /&gt;
 &amp;lt;---&amp;gt; E&amp;lt;../GW_QP_database/ndb.QP[ PPA@E  27.21138 = XG 5 = Xb 1-40 = Scb 1-40]&lt;br /&gt;
 &amp;lt;---&amp;gt; [dE_from_DB-Nearest K] Exact matches       :  100.0000 [o/o]&lt;br /&gt;
&lt;br /&gt;
This tells you that the file was found, read correctly and that the &#039;&#039;&#039;k&#039;&#039;&#039; points found in the file matched the ones you are using for the current calculation (otherwise interpolation would be needed).&lt;br /&gt;
It is crucial to check that the file has been read, since if not Yambo gives a warning but continues the calculation (with no QP corrections at all!).&lt;br /&gt;
As in the calculation with the scissor shift the final results are the files with the macroscopic dielectric functions. Let&#039;s compare the results for the optical absorption spectrum with those obtained [[Bethe-Salpeter solver: diagonalization|previously]] with a simple scissor:&lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 ...&lt;br /&gt;
 plot &#039;o-3D_QP_BSE.eps_q1_diago_bse&#039; u 1:2 w l t &#039;Explicit QP&#039;, &#039;o-3D_BSE.eps_q1_diago_bse&#039; u 1:2 w l t &#039;Scissor&#039; &lt;br /&gt;
[[File:03 bse diago qp 2021.png|none|600px]]&lt;br /&gt;
&lt;br /&gt;
It is clear that this makes a difference in the peak positions, distribution and intensity. Note that besides a simple shift you can renormalise as well the bandwidth of the valence and conduction bands in &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt; (respectively the third and second value). You can try as an exercise to set up a new calculation using e.g. &amp;lt;code&amp;gt; 1.44 | 1.200000 | 0.900000 |&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
From this tutorial you&#039;ve learned:&lt;br /&gt;
* How to compute the optical spectrum including quasiparticle corrections (full GW+BSE calculation).&lt;br /&gt;
&lt;br /&gt;
==Navigate==&lt;br /&gt;
&lt;br /&gt;
* Previous module: [[Bethe-Salpeter solver: diagonalization]]&lt;br /&gt;
* Back to [[Calculating optical spectra including excitonic effects: a step-by-step guide]] tutorial&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_solver:_diagonalization&amp;diff=4490</id>
		<title>Bethe-Salpeter solver: diagonalization</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_solver:_diagonalization&amp;diff=4490"/>
		<updated>2021-03-28T17:08:30Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this module, you learn how to obtain an optical absorption spectrum within the Bethe-Salpeter equation (BSE) framework by diagonalizing a previously calculated Bethe-Salpeter (BS) kernel.&lt;br /&gt;
 &lt;br /&gt;
==Prerequisites==&lt;br /&gt;
[[File:Yambo-handbook-v4.1.2-p-15.png|thumb|Cheatsheet on BSS diagonalization|150px]]&lt;br /&gt;
* You must first complete the [[Static screening]] and [[Bethe-Salpeter kernel]] modules&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* The &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; databases for 3D hBN&lt;br /&gt;
* The &amp;lt;code&amp;gt;3D_QP_BSE&amp;lt;/code&amp;gt; directory (provided) which contains the database with the GW corrections (create one directory with this name and put the ndb.QP file produced yesterday there)&lt;br /&gt;
* The &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; directory containing the databases from the [[Static screening]] and [[Bethe-Salpeter kernel]] modules&lt;br /&gt;
* The &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt; executable&lt;br /&gt;
* &amp;lt;code&amp;gt;gnuplot&amp;lt;/code&amp;gt; for plotting spectra&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The macroscopic dielectric function (from which the absorption and EEL spectra can be computed) is obtained from the eigenvalues &#039;&#039;E&#039;&#039;&amp;lt;sub&amp;gt;&amp;amp;lambda;&amp;lt;/sub&amp;gt; (excitonic energies) and eigenvectors A&amp;lt;sup&amp;gt;&amp;amp;lambda;&amp;lt;/sup&amp;gt;&amp;lt;sub&amp;gt;&#039;&#039;cv&#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt; (exciton composition in terms of electron-hole pairs) of the two-particle Hamiltonian:&lt;br /&gt;
&lt;br /&gt;
[[File:BSE1-Eq4.png|none|x50px]]&lt;br /&gt;
&lt;br /&gt;
To get the two-particle Hamiltonian eigensolutions you need to diagonalize the two-particle Hamiltonian (non-spin-polarized case):&lt;br /&gt;
&lt;br /&gt;
[[File:BSE1-Eq1.png|none|x50px]]&lt;br /&gt;
&lt;br /&gt;
for which the &#039;&#039;2V - W&#039;&#039; part was evaluated in the [[Bethe-Salpeter kernel]] module.&lt;br /&gt;
&lt;br /&gt;
The difference of quasiparticle energies &#039;&#039;&amp;amp;Delta;&amp;amp;epsilon;&amp;lt;sub&amp;gt;cv&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;= &amp;amp;epsilon;&amp;lt;sub&amp;gt;c&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt; - &amp;amp;epsilon;&amp;lt;sub&amp;gt;v&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;&#039;&#039; is added to the matrix just before the solver. &lt;br /&gt;
There are two possible choices:&lt;br /&gt;
* the Kohn-Sham energies (calculated at DFT level) are corrected through a scissor and the renormalization of the conduction and valence bandwidth (linearly for the conduction band minimum and the valence band maximum respectively):&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&amp;amp;Delta;&amp;amp;epsilon;&amp;lt;sub&amp;gt;cv&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;= M&amp;lt;sub&amp;gt;c&amp;lt;/sub&amp;gt;(&amp;amp;epsilon;&amp;lt;sub&amp;gt;c&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;KS&amp;lt;/sup&amp;gt; - CBM) - M&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;(&amp;amp;epsilon;&amp;lt;sub&amp;gt;v&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;KS&amp;lt;/sup&amp;gt; - VBM) + Scissor&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
* the quasiparticle energies calculated at [[How to obtain the quasi-particle band structure of a bulk material: h-BN|GW level]] are used (see [[Bethe-Salpeter on top of quasiparticle energies|next tutorial]]. Missing energies are computed by interpolation.&lt;br /&gt;
&lt;br /&gt;
==Choosing the input parameters==&lt;br /&gt;
&lt;br /&gt;
Invoke yambo with the &amp;quot;-y d&amp;quot; option in the command line:&lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 03_3D_BSE_diago_solver.in -y d -V qp -J 3D_BSE&lt;br /&gt;
&lt;br /&gt;
The input is open in the editor. The input variable to be changed are &lt;br /&gt;
 % [[Variables#BEnRange|BEnRange]]&lt;br /&gt;
   2.00000 | 8.00000 | eV    &lt;br /&gt;
 %&lt;br /&gt;
 [[Variables#BEnSteps|BEnSteps]]= 200      &lt;br /&gt;
 &lt;br /&gt;
which define 200 evenly spaced points between 2 and 8 eV at which the spectrum is calculated (&amp;amp;omega; in the equation for the macroscopic dielectric function),&lt;br /&gt;
  &lt;br /&gt;
 % [[Variables#BDmRange|BDmRange]]&lt;br /&gt;
   0.10000 |  0.10000 | eV    &lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
which defines the spectral broadening (Lorentzian model), &lt;br /&gt;
&lt;br /&gt;
 % [[Variables#BLongDir|BLongDir]]&lt;br /&gt;
  1.000000 | 1.000000 | 0.000000 | &lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
which defines the direction of the perturbing electric field (in this case the in-plane direction).&lt;br /&gt;
&lt;br /&gt;
Another parameter to modify is&lt;br /&gt;
 % [[Variables#KfnQP_E|KfnQP_E]] &lt;br /&gt;
  1.440000 | 1.000000 | 1.000000 |&lt;br /&gt;
 %&lt;br /&gt;
This gives the quasiparticle corrections to the Kohn-Sham eigenvalues and is deduced either from experiment or previous [[How to obtain the quasi-particle band structure of a bulk material: h-BN|GW calculations]]. &lt;br /&gt;
With reference to the equation in the Background, the format is&lt;br /&gt;
  &#039;&#039;Scissor&#039;&#039; | &#039;&#039;M&amp;lt;sub&amp;gt;c&amp;lt;/sub&amp;gt;&#039;&#039; | &#039;&#039;M&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;&#039;&#039; |&lt;br /&gt;
The alternative of directly input corrections calculated from a previous GW calculation is shown in the [[Bethe-Salpeter on top of quasiparticle energies|next section]].&lt;br /&gt;
&lt;br /&gt;
To analyse the exciton composition and plot the exciton wave function in the [[How to analyse excitons - CECAM 2021 school|postprocessing tutorial]], you &#039;&#039;&#039;must uncomment&#039;&#039;&#039; the following flag:&lt;br /&gt;
 WRbsWF                        # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: Only when this flag is uncommented, Yambo writes on disk the eigenvectors A&amp;lt;sup&amp;gt;&amp;amp;lambda;&amp;lt;/sup&amp;gt;&amp;lt;sub&amp;gt;&#039;&#039;cv&#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt; (exciton composition in terms of electron-hole pairs).&lt;br /&gt;
&lt;br /&gt;
==Bethe-Salpeter solver runlevel== &lt;br /&gt;
 $ yambo -F 03_3D_BSE_diago_solver.in -J 3D_BSE  &lt;br /&gt;
In the log (either in standard output or in &amp;lt;code&amp;gt;l-3D_BSE_optics_dipoles_bss_bse&amp;lt;/code&amp;gt;), after various setup/loading, the BSE is diagonalized using the linked linear algebra libraries: &lt;br /&gt;
 &amp;lt;---&amp;gt; [03] BSE solver(s) @q1&lt;br /&gt;
 &amp;lt;---&amp;gt; [LA] SERIAL linear algebra&lt;br /&gt;
 &amp;lt;---&amp;gt; [03.01] Diago Solver @q1&lt;br /&gt;
 &amp;lt;---&amp;gt; BSK diagonalize |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; EPS R residuals |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; BSK resp. funct |########################################| [100%] --(E) --(X)&lt;br /&gt;
&lt;br /&gt;
The report &amp;lt;code&amp;gt;r-3D_BSE_optics_dipoles_bss_bse&amp;lt;/code&amp;gt; contains information relative to this runlevel in section 3:&lt;br /&gt;
&lt;br /&gt;
 [03] BSE solver(s) @q1&lt;br /&gt;
 ======================&lt;br /&gt;
&lt;br /&gt;
Take some time to inspect the log and the report to check the consistency with the input variables. This run produces a new database in the 3D_BSE directory&lt;br /&gt;
 3D_BSE/ndb.BS_diago_Q01&lt;br /&gt;
So if you need the spectrum on a different energy range, direction, with a different broadening or more points the diagonalization is not repeated, just the spectrum is recalculated.&lt;br /&gt;
Note that this database, as well as any other netCDF-format database produced by Yambo, can be directly accessed and read using [[First steps in Yambopy| python modules]].&lt;br /&gt;
    &lt;br /&gt;
This run produces as well human readable files (o-*). Specifically &amp;lt;code&amp;gt;o-3D_BSE.eps_q1_diago_bse&amp;lt;/code&amp;gt; contains the real and imaginary part of the macroscopic dielectric function &lt;br /&gt;
  &lt;br /&gt;
 $ less o-3D_BSE.eps_q1_diago_bse &lt;br /&gt;
 ...&lt;br /&gt;
 #&lt;br /&gt;
 #  E/ev[1]    EPS-Im[2]  EPS-Re[3]  EPSo-Im[4] EPSo-Re[5]&lt;br /&gt;
 #&lt;br /&gt;
   2.00000    0.16162    5.83681    0.04959    4.14127&lt;br /&gt;
   2.03015    0.16787    5.88612    0.05090    4.15638&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
which is in the format &lt;br /&gt;
 Energy in eV | Imaginary part BSE | Real part BSE |Imaginary part IPA | Real part IPA |  &lt;br /&gt;
&lt;br /&gt;
where real and imaginary parts refer to the macroscopic dielectric function. The imaginary part is related to optical absorption. The latter (column 2) can be plotted versus the photon energy (column 1) and compared with the independent particle approximation (IPA, column 4), e.g.: &lt;br /&gt;
 &lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 ...&lt;br /&gt;
 plot &#039;o-3D_BSE.eps_q1_diago_bse&#039; u 1:2 w l t &#039;BSE&#039;, &#039;o-3D_BSE.eps_q1_diago_bse&#039; u 1:4 w l  t &#039;IPA&#039;&lt;br /&gt;
&lt;br /&gt;
[[file:03_bse_diago.png |none|600px]]&lt;br /&gt;
The addition of the kernel has the effect to red-shift the spectrum onset and redistribute the oscillator strengths. Note that the convergence for k-points smooths out the low energy peaks in the IPA (which are an artefact of poor convergence with k-points producing artificial confinement) to give the shoulder corresponding to the van Hove singularity in the band structure. On the other hand, the low energy peak in the BSE is genuine and it is the signature of a bound exciton.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
From this tutorial you&#039;ve learned:&lt;br /&gt;
* How to compute the optical spectrum by using the diagonal solver within the Bethe-Salpeter equation framework&lt;br /&gt;
&lt;br /&gt;
==Navigate==&lt;br /&gt;
&lt;br /&gt;
* Previous module: [[Bethe-Salpeter kernel]]&lt;br /&gt;
* Next module: [[Bethe-Salpeter on top of quasiparticle energies]]&lt;br /&gt;
* Alternative Bethe-Salpeter equation solver: [[Bethe-Salpeter solver: Lanczos-Haydock | Lanczos-Haydock]] &lt;br /&gt;
* Alternative Bethe-Salpeter equation solver: [[Bethe-Salpeter solver: SLEPC | Slepc]] &lt;br /&gt;
* Exciton analysis: [[How to analyse excitons - CECAM 2021 school]]&lt;br /&gt;
* Back to [[Calculating optical spectra including excitonic effects: a step-by-step guide]] tutorial&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_solver:_diagonalization&amp;diff=4489</id>
		<title>Bethe-Salpeter solver: diagonalization</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_solver:_diagonalization&amp;diff=4489"/>
		<updated>2021-03-28T17:01:55Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this module, you learn how to obtain an optical absorption spectrum within the Bethe-Salpeter equation (BSE) framework by diagonalizing a previously calculated Bethe-Salpeter (BS) kernel.&lt;br /&gt;
 &lt;br /&gt;
==Prerequisites==&lt;br /&gt;
[[File:Yambo-handbook-v4.1.2-p-15.png|thumb|Cheatsheet on BSS diagonalization|150px]]&lt;br /&gt;
* You must first complete the [[Static screening]] and [[Bethe-Salpeter kernel]] modules&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* The &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; databases for 3D hBN&lt;br /&gt;
* The &amp;lt;code&amp;gt;3D_QP_BSE&amp;lt;/code&amp;gt; directory (provided) which contains the database with the GW corrections (create one directory with this name and put the ndb.QP file produced yesterday there)&lt;br /&gt;
* The &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; directory containing the databases from the [[Static screening]] and [[Bethe-Salpeter kernel]] modules&lt;br /&gt;
* The &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt; executable&lt;br /&gt;
* &amp;lt;code&amp;gt;gnuplot&amp;lt;/code&amp;gt; for plotting spectra&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The macroscopic dielectric function (from which the absorption and EEL spectra can be computed) is obtained from the eigenvalues &#039;&#039;E&#039;&#039;&amp;lt;sub&amp;gt;&amp;amp;lambda;&amp;lt;/sub&amp;gt; (excitonic energies) and eigenvectors A&amp;lt;sup&amp;gt;&amp;amp;lambda;&amp;lt;/sup&amp;gt;&amp;lt;sub&amp;gt;&#039;&#039;cv&#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt; (exciton composition in terms of electron-hole pairs) of the two-particle Hamiltonian:&lt;br /&gt;
&lt;br /&gt;
[[File:BSE1-Eq4.png|none|x50px]]&lt;br /&gt;
&lt;br /&gt;
To get the two-particle Hamiltonian eigensolutions you need to diagonalize the two-particle Hamiltonian (non-spin-polarized case):&lt;br /&gt;
&lt;br /&gt;
[[File:BSE1-Eq1.png|none|x50px]]&lt;br /&gt;
&lt;br /&gt;
for which the &#039;&#039;2V - W&#039;&#039; part was evaluated in the [[Bethe-Salpeter kernel]] module.&lt;br /&gt;
&lt;br /&gt;
The difference of quasiparticle energies &#039;&#039;&amp;amp;Delta;&amp;amp;epsilon;&amp;lt;sub&amp;gt;cv&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;= &amp;amp;epsilon;&amp;lt;sub&amp;gt;c&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt; - &amp;amp;epsilon;&amp;lt;sub&amp;gt;v&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;&#039;&#039; is added to the matrix just before the solver. &lt;br /&gt;
There are two possible choices:&lt;br /&gt;
* the Kohn-Sham energies (calculated at DFT level) are corrected through a scissor and the renormalization of the conduction and valence bandwidth (linearly for the conduction band minimum and the valence band maximum respectively):&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&amp;amp;Delta;&amp;amp;epsilon;&amp;lt;sub&amp;gt;cv&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;= M&amp;lt;sub&amp;gt;c&amp;lt;/sub&amp;gt;(&amp;amp;epsilon;&amp;lt;sub&amp;gt;c&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;KS&amp;lt;/sup&amp;gt; - CBM) - M&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;(&amp;amp;epsilon;&amp;lt;sub&amp;gt;v&#039;&#039;&#039;k&#039;&#039;&#039;&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;KS&amp;lt;/sup&amp;gt; - VBM) + Scissor&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
* the quasiparticle energies calculated at [[How to obtain the quasi-particle band structure of a bulk material: h-BN|GW level]] are used (see [[Bethe-Salpeter on top of quasiparticle energies|next tutorial]]. Missing energies are computed by interpolation.&lt;br /&gt;
&lt;br /&gt;
==Choosing the input parameters==&lt;br /&gt;
&lt;br /&gt;
Invoke yambo with the &amp;quot;-y d&amp;quot; option in the command line:&lt;br /&gt;
&lt;br /&gt;
 $ yambo -F 03_3D_BSE_diago_solver.in -y d -V qp -J 3D_BSE&lt;br /&gt;
&lt;br /&gt;
The input is open in the editor. The input variable to be changed are &lt;br /&gt;
 % [[Variables#BEnRange|BEnRange]]&lt;br /&gt;
   2.00000 | 8.00000 | eV    &lt;br /&gt;
 %&lt;br /&gt;
 [[Variables#BEnSteps|BEnSteps]]= 200      &lt;br /&gt;
 &lt;br /&gt;
which define 200 evenly spaced points between 2 and 8 eV at which the spectrum is calculated (&amp;amp;omega; in the equation for the macroscopic dielectric function),&lt;br /&gt;
  &lt;br /&gt;
 % [[Variables#BDmRange|BDmRange]]&lt;br /&gt;
   0.10000 |  0.10000 | eV    &lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
which defines the spectral broadening (Lorentzian model), &lt;br /&gt;
&lt;br /&gt;
 % [[Variables#BLongDir|BLongDir]]&lt;br /&gt;
  1.000000 | 1.000000 | 0.000000 | &lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
which defines the direction of the perturbing electric field (in this case the in-plane direction).&lt;br /&gt;
&lt;br /&gt;
Another parameter to modify is&lt;br /&gt;
 % [[Variables#KfnQP_E|KfnQP_E]] &lt;br /&gt;
  1.440000 | 1.000000 | 1.000000 |&lt;br /&gt;
 %&lt;br /&gt;
This gives the quasiparticle corrections to the Kohn-Sham eigenvalues and is deduced either from experiment or previous [[How to obtain the quasi-particle band structure of a bulk material: h-BN|GW calculations]]. &lt;br /&gt;
With reference to the equation in the Background, the format is&lt;br /&gt;
  &#039;&#039;Scissor&#039;&#039; | &#039;&#039;M&amp;lt;sub&amp;gt;c&amp;lt;/sub&amp;gt;&#039;&#039; | &#039;&#039;M&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;&#039;&#039; |&lt;br /&gt;
The alternative of directly input corrections calculated from a previous GW calculation is shown in the [[Bethe-Salpeter on top of quasiparticle energies|next section]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: to analyse the exciton composition and plot the exciton wave function in the [[How to analyse excitons - CECAM 2021 school|postprocessing tutorial]], you must uncomment the following flag:&lt;br /&gt;
 WRbsWF                        # [BSS] Write to disk excitonic the WFs&lt;br /&gt;
&lt;br /&gt;
This writes the eigenvectors &lt;br /&gt;
&lt;br /&gt;
==Bethe-Salpeter solver runlevel== &lt;br /&gt;
 $ yambo -F 03_3D_BSE_diago_solver.in -J 3D_BSE  &lt;br /&gt;
In the log (either in standard output or in &amp;lt;code&amp;gt;l-3D_BSE_optics_dipoles_bss_bse&amp;lt;/code&amp;gt;), after various setup/loading, the BSE is diagonalized using the linked linear algebra libraries: &lt;br /&gt;
 &amp;lt;---&amp;gt; [03] BSE solver(s) @q1&lt;br /&gt;
 &amp;lt;---&amp;gt; [LA] SERIAL linear algebra&lt;br /&gt;
 &amp;lt;---&amp;gt; [03.01] Diago Solver @q1&lt;br /&gt;
 &amp;lt;---&amp;gt; BSK diagonalize |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; EPS R residuals |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; BSK resp. funct |########################################| [100%] --(E) --(X)&lt;br /&gt;
&lt;br /&gt;
The report &amp;lt;code&amp;gt;r-3D_BSE_optics_dipoles_bss_bse&amp;lt;/code&amp;gt; contains information relative to this runlevel in section 3:&lt;br /&gt;
&lt;br /&gt;
 [03] BSE solver(s) @q1&lt;br /&gt;
 ======================&lt;br /&gt;
&lt;br /&gt;
Take some time to inspect the log and the report to check the consistency with the input variables. This run produces a new database in the 3D_BSE directory&lt;br /&gt;
 3D_BSE/ndb.BS_diago_Q01&lt;br /&gt;
So if you need the spectrum on a different energy range, direction, with a different broadening or more points the diagonalization is not repeated, just the spectrum is recalculated.&lt;br /&gt;
Note that this database, as well as any other netCDF-format database produced by Yambo, can be directly accessed and read using [[First steps in Yambopy| python modules]].&lt;br /&gt;
    &lt;br /&gt;
This run produces as well human readable files (o-*). Specifically &amp;lt;code&amp;gt;o-3D_BSE.eps_q1_diago_bse&amp;lt;/code&amp;gt; contains the real and imaginary part of the macroscopic dielectric function &lt;br /&gt;
  &lt;br /&gt;
 $ less o-3D_BSE.eps_q1_diago_bse &lt;br /&gt;
 ...&lt;br /&gt;
 #&lt;br /&gt;
 #  E/ev[1]    EPS-Im[2]  EPS-Re[3]  EPSo-Im[4] EPSo-Re[5]&lt;br /&gt;
 #&lt;br /&gt;
   2.00000    0.16162    5.83681    0.04959    4.14127&lt;br /&gt;
   2.03015    0.16787    5.88612    0.05090    4.15638&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
which is in the format &lt;br /&gt;
 Energy in eV | Imaginary part BSE | Real part BSE |Imaginary part IPA | Real part IPA |  &lt;br /&gt;
&lt;br /&gt;
where real and imaginary parts refer to the macroscopic dielectric function. The imaginary part is related to optical absorption. The latter (column 2) can be plotted versus the photon energy (column 1) and compared with the independent particle approximation (IPA, column 4), e.g.: &lt;br /&gt;
 &lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 ...&lt;br /&gt;
 plot &#039;o-3D_BSE.eps_q1_diago_bse&#039; u 1:2 w l t &#039;BSE&#039;, &#039;o-3D_BSE.eps_q1_diago_bse&#039; u 1:4 w l  t &#039;IPA&#039;&lt;br /&gt;
&lt;br /&gt;
[[file:03_bse_diago.png |none|600px]]&lt;br /&gt;
The addition of the kernel has the effect to red-shift the spectrum onset and redistribute the oscillator strengths. Note that the convergence for k-points smooths out the low energy peaks in the IPA (which are an artefact of poor convergence with k-points producing artificial confinement) to give the shoulder corresponding to the van Hove singularity in the band structure. On the other hand, the low energy peak in the BSE is genuine and it is the signature of a bound exciton.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
From this tutorial you&#039;ve learned:&lt;br /&gt;
* How to compute the optical spectrum by using the diagonal solver within the Bethe-Salpeter equation framework&lt;br /&gt;
&lt;br /&gt;
==Navigate==&lt;br /&gt;
&lt;br /&gt;
* Previous module: [[Bethe-Salpeter kernel]]&lt;br /&gt;
* Next module: [[Bethe-Salpeter on top of quasiparticle energies]]&lt;br /&gt;
* Alternative Bethe-Salpeter equation solver: [[Bethe-Salpeter solver: Lanczos-Haydock | Lanczos-Haydock]] &lt;br /&gt;
* Alternative Bethe-Salpeter equation solver: [[Bethe-Salpeter solver: SLEPC | Slepc]] &lt;br /&gt;
* Exciton analysis: [[How to analyse excitons - CECAM 2021 school]]&lt;br /&gt;
* Back to [[Calculating optical spectra including excitonic effects: a step-by-step guide]] tutorial&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_on_top_of_quasiparticle_energies&amp;diff=4488</id>
		<title>Bethe-Salpeter on top of quasiparticle energies</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_on_top_of_quasiparticle_energies&amp;diff=4488"/>
		<updated>2021-03-28T16:51:20Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this module, you will learn how to include GW-corrected (QP) energies in the calculation of the absorption spectrum. The energy differences on the diagonal of the excitonic Hamiltonian are added before the solution of the Bethe-Salpeter eigenproblem, therefore only that step needs to be repeated if we change the QP corrections. &lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&#039;&#039;&#039;Previous modules&#039;&#039;&#039;&lt;br /&gt;
You must have completed &lt;br /&gt;
* the [[Bethe-Salpeter kernel|BSE kernel]] tutorial&lt;br /&gt;
* Optionally, the [[Bethe-Salpeter solver: diagonalization| Bethe-Salpeter solver: diagonalization]] tutorial, in which a simple scissor operator is used for the QP corrections.&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* The &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; databases for 3D hBN &lt;br /&gt;
* The &amp;lt;code&amp;gt;ndb.BS_Q1_CPU_0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ndb.em1s*&amp;lt;/code&amp;gt; databases for 3D hBN&lt;br /&gt;
* The &amp;lt;code&amp;gt;ndb.QP&amp;lt;/code&amp;gt; database containing the GW-corrected band energies&lt;br /&gt;
* &amp;lt;code&amp;gt;yambo &amp;lt;/code&amp;gt; executable&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Reading the QP corrections from a previous &#039;&#039;GW&#039;&#039; calculation==&lt;br /&gt;
In [[Bethe-Salpeter solver: diagonalization|the previous step]] we used a simple scissor operator to correct the Kohn-Sham DFT energies. Instead, in this part, we are taking the QP corrections from a previous Yambo GW calculation.&lt;br /&gt;
We create and edit the input:&lt;br /&gt;
 $yambo -F 03_3D_QP_BSE.in -y d -V qp -J 3D_BSE&lt;br /&gt;
We set all parameters as in [[Bethe-Salpeter solver: diagonalization| the previous step]], except for the part regarding the QP correction:&lt;br /&gt;
  [[Variables#KfnQPdb|KfnQPdb]]= &amp;quot;E &amp;lt; 3D_QP_BSE/ndb.QP&amp;quot;              # [EXTQP BSK BSS] Database&lt;br /&gt;
  [[Variables#KfnQP_N|KfnQP_N]]= 1                   # [EXTQP BSK BSS] Interpolation neighbours&lt;br /&gt;
  % [[Variables#KfnQP_E|KfnQP_E]]&lt;br /&gt;
   0.000000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
Instead of setting the values for the scissor, we give the path to the database that contains the QP corrections (&amp;lt;code&amp;gt;3D_QP_BSE/ndb.QP&amp;lt;/code&amp;gt;). The latter was created by running a GW calculation as in [[GW hBN Yambo Virtual 2021 version#Step 3: Interpolating Band Structures|Step 3]] of the GW tutorial.&lt;br /&gt;
Run Yambo:&lt;br /&gt;
 $ yambo -F 03_3D_QP_BSE.in -J &amp;quot;3D_QP_BSE,3D_BSE&amp;quot;&lt;br /&gt;
Note how we specified two directories, separated by a comma. This instructs Yambo to look for databases that may be already present from previous steps of the calculations in all the listed folders. If you completed the [[Bethe-Salpeter solver: diagonalization|previous section]] of the tutorial, then you should have the &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; folder with &amp;lt;code&amp;gt;ndb.dipoles_*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ndb.em1s*&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ndb.BS_CPU*&amp;lt;/code&amp;gt; databases, which will not be recalculated by Yambo: the code will repeat only the diagonalization step, and print the resulting databases in the new folder &amp;lt;code&amp;gt;3D_QP_BSE&amp;lt;/code&amp;gt;. If you don&#039;t have the &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; folder, you have to repeat the entire BSE calculation, therefore you just need to give the option &amp;quot;-J 3D_QP_BSE&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This produces the following log in the standard output. Note Section 4 (regarding external QP corrections to the kernel):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;---&amp;gt; [04] External/Internal QP corrections&lt;br /&gt;
 &amp;lt;---&amp;gt; E&amp;lt;../GW_QP_database/ndb.QP[ PPA@E  27.21138 = XG 5 = Xb 1-40 = Scb 1-40]&lt;br /&gt;
 &amp;lt;---&amp;gt; [dE_from_DB-Nearest K] Exact matches       :  100.0000 [o/o]&lt;br /&gt;
&lt;br /&gt;
This tells you that the file was found, read correctly and that the &#039;&#039;&#039;k&#039;&#039;&#039; points found in the file matched the ones you are using for the current calculation (otherwise interpolation would be needed).&lt;br /&gt;
It is crucial to check that the file has been read, since if not Yambo gives a warning but continues the calculation (with no QP corrections at all!).&lt;br /&gt;
As in the calculation with the scissor shift the final results are the files with the macroscopic dielectric functions. Let&#039;s compare the results for the optical absorption spectrum with those obtained [[Bethe-Salpeter solver: diagonalization|previously]] with a simple scissor:&lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 ...&lt;br /&gt;
 plot &#039;o-3D_QP_BSE.eps_q1_diago_bse&#039; u 1:2 w l t &#039;Explicit QP&#039;, &#039;o-3D_BSE.eps_q1_diago_bse&#039; u 1:2 w l t &#039;Scissor&#039; &lt;br /&gt;
[[File:03 bse diago qp 2021.png|none|600px]]&lt;br /&gt;
&lt;br /&gt;
It is clear that this makes a difference in the peak positions, distribution and intensity. Note that besides a simple shift you can renormalise as well the bandwidth of the valence and conduction bands in &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt; (respectively the third and second value). You can try as an exercise to set up a new calculation using e.g. &amp;lt;code&amp;gt; 1.44 | 1.200000 | 0.900000 |&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
From this tutorial you&#039;ve learned:&lt;br /&gt;
* How to compute the optical spectrum including quasiparticle corrections (full GW+BSE calculation).&lt;br /&gt;
&lt;br /&gt;
==Navigate==&lt;br /&gt;
&lt;br /&gt;
* Previous module: [[Bethe-Salpeter solver: diagonalization]]&lt;br /&gt;
* Back to [[Calculating optical spectra including excitonic effects: a step-by-step guide]] tutorial&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_on_top_of_quasiparticle_energies&amp;diff=4487</id>
		<title>Bethe-Salpeter on top of quasiparticle energies</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_on_top_of_quasiparticle_energies&amp;diff=4487"/>
		<updated>2021-03-28T16:44:56Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this module, you will learn how to include GW-corrected (QP) energies in the calculation of the absorption spectrum. The energy differences on the diagonal of the excitonic Hamiltonian are added before the solution of the Bethe-Salpeter eigenproblem, therefore only that step needs to be repeated if we change the QP corrections. &lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&#039;&#039;&#039;Previous modules&#039;&#039;&#039;&lt;br /&gt;
You must have completed &lt;br /&gt;
* the [[Bethe-Salpeter kernel|BSE kernel]] tutorial&lt;br /&gt;
* Optionally, the [[Bethe-Salpeter solver: diagonalization| Bethe-Salpeter solver: diagonalization]] tutorial, in which a simple scissor operator is used for the QP corrections.&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* The &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; databases for 3D hBN &lt;br /&gt;
* The &amp;lt;code&amp;gt;ndb.BS_Q1_CPU_0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ndb.em1s*&amp;lt;/code&amp;gt; databases for 3D hBN&lt;br /&gt;
* The &amp;lt;code&amp;gt;ndb.QP&amp;lt;/code&amp;gt; database containing the GW-corrected band energies&lt;br /&gt;
* &amp;lt;code&amp;gt;yambo &amp;lt;/code&amp;gt; executable&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Reading the QP corrections from a previous &#039;&#039;GW&#039;&#039; calculation==&lt;br /&gt;
In [[Bethe-Salpeter solver: diagonalization|the previous step]] we used a simple scissor operator to correct the Kohn-Sham DFT energies. Instead, in this part, we are taking the QP corrections from a previous Yambo GW calculation.&lt;br /&gt;
We create and edit the input:&lt;br /&gt;
 $yambo -F 03_3D_QP_BSE.in -y d -V qp -J 3D_BSE&lt;br /&gt;
We set all parameters as in [[Bethe-Salpeter solver: diagonalization| the previous step]], except for the part regarding the QP correction:&lt;br /&gt;
  [[Variables#KfnQPdb|KfnQPdb]]= &amp;quot;E &amp;lt; 3D_QP_BSE/ndb.QP&amp;quot;              # [EXTQP BSK BSS] Database&lt;br /&gt;
  [[Variables#KfnQP_N|KfnQP_N]]= 1                   # [EXTQP BSK BSS] Interpolation neighbours&lt;br /&gt;
  % [[Variables#KfnQP_E|KfnQP_E]]&lt;br /&gt;
   0.000000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
Instead of setting the values for the scissor, we give the path to the database that contains the QP corrections (&amp;lt;code&amp;gt;3D_QP_BSE/ndb.QP&amp;lt;/code&amp;gt;). The latter was created by running a GW calculation as in [[GW hBN Yambo Virtual 2021 version#Step 3: Interpolating Band Structures|Step 3]] of the GW tutorial.&lt;br /&gt;
Run Yambo:&lt;br /&gt;
 $ yambo -F 03_3D_QP_BSE.in -J &amp;quot;3D_QP_BSE,3D_BSE&amp;quot;&lt;br /&gt;
Note how we specified two directories, separated by a comma. This instructs Yambo to look for databases that may be already present from previous steps of the calculations in all the listed folders. If you completed the [[Bethe-Salpeter solver: diagonalization|previous section]] of the tutorial, then you should have the &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; folder with &amp;lt;code&amp;gt;ndb.dipoles_*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ndb.em1s*&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ndb.BS_CPU*&amp;lt;/code&amp;gt; databases, which will not be recalculated by Yambo: the code will repeat only the diagonalization step, and print the resulting databases in the new folder &amp;lt;code&amp;gt;3D_QP_BSE&amp;lt;/code&amp;gt;. If you don&#039;t have the &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; folder, you have to repeat the entire BSE calculation, therefore you just need to give the option &amp;quot;-J 3D_QP_BSE&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This produces the following log in the standard output. Note Section 4 (regarding external QP corrections to the kernel):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;---&amp;gt; [04] External/Internal QP corrections&lt;br /&gt;
 &amp;lt;---&amp;gt; E&amp;lt;../GW_QP_database/ndb.QP[ PPA@E  27.21138 = XG 5 = Xb 1-40 = Scb 1-40]&lt;br /&gt;
 &amp;lt;---&amp;gt; [dE_from_DB-Nearest K] Exact matches       :  100.0000 [o/o]&lt;br /&gt;
&lt;br /&gt;
This tells you that the file was found, read correctly and that the &#039;&#039;&#039;k&#039;&#039;&#039; points found in the file matched the ones you are using for the current calculation (otherwise interpolation would be needed).&lt;br /&gt;
It is crucial to check that the file has been read, since if not Yambo gives a warning but continues the calculation (with no QP corrections at all!).&lt;br /&gt;
As in the calculation with the scissor shift the final results are the files with the spectral functions. Let&#039;s compare the results for the optical absorption spectrum with those obtained [[Bethe-Salpeter solver: diagonalization|previously]] with a simple scissor:&lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 ...&lt;br /&gt;
 plot &#039;o-3D_QP_BSE.eps_q1_diago_bse&#039; u 1:2 w l t &#039;Explicit QP&#039;, &#039;o-3D_BSE.eps_q1_diago_bse&#039; u 1:2 w l t &#039;Scissor&#039; &lt;br /&gt;
[[File:03 bse diago qp 2021.png|none|600px]]&lt;br /&gt;
&lt;br /&gt;
It is clear that this makes a difference in the peak positions, distribution and intensity. Note that besides a simple shift you can renormalise as well the bandwidth of the valence and conduction bands in &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt; (respectively the third and second value). You can try as an exercise to set up a new calculation using e.g. &amp;lt;code&amp;gt; 1.44 | 1.200000 | 0.900000 |&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
From this tutorial you&#039;ve learned:&lt;br /&gt;
* How to compute the optical spectrum including quasiparticle corrections (full GW+BSE calculation).&lt;br /&gt;
&lt;br /&gt;
==Navigate==&lt;br /&gt;
&lt;br /&gt;
* Previous module: [[Bethe-Salpeter solver: diagonalization]]&lt;br /&gt;
* Back to [[Calculating optical spectra including excitonic effects: a step-by-step guide]] tutorial&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_on_top_of_quasiparticle_energies&amp;diff=4486</id>
		<title>Bethe-Salpeter on top of quasiparticle energies</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_on_top_of_quasiparticle_energies&amp;diff=4486"/>
		<updated>2021-03-28T16:43:37Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this module, you will learn how to include GW-corrected (QP) energies in the calculation of the absorption spectrum. The energy differences on the diagonal of the excitonic Hamiltonian are added before the solution of the Bethe-Salpeter eigenproblem, therefore only that step needs to be repeated if we change the QP corrections. &lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&#039;&#039;&#039;Previous modules&#039;&#039;&#039;&lt;br /&gt;
You must have completed &lt;br /&gt;
* the [[Bethe-Salpeter kernel|BSE kernel]] tutorial&lt;br /&gt;
* Optionally, the [[Bethe-Salpeter solver: diagonalization| Bethe-Salpeter solver: diagonalization]] tutorial, in which a simple scissor operator is used for the QP corrections.&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* The &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; databases for 3D hBN &lt;br /&gt;
* The &amp;lt;code&amp;gt;ndb.BS_Q1_CPU_0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ndb.em1s*&amp;lt;/code&amp;gt; databases for 3D hBN&lt;br /&gt;
* The &amp;lt;code&amp;gt;ndb.QP&amp;lt;/code&amp;gt; database containing the GW-corrected band energies&lt;br /&gt;
* &amp;lt;code&amp;gt;yambo &amp;lt;/code&amp;gt; executable&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Reading the QP corrections from a previous &#039;&#039;GW&#039;&#039; calculation==&lt;br /&gt;
In [[Bethe-Salpeter solver: diagonalization|the previous step]] we used a simple scissor operator to correct the Kohn-Sham DFT energies. Instead, in this part, we are taking the QP corrections from a previous Yambo GW calculation.&lt;br /&gt;
We create and edit the input:&lt;br /&gt;
 $yambo -F 03_3D_QP_BSE.in -y d -V qp -J 3D_BSE&lt;br /&gt;
We set all parameters as in [[Bethe-Salpeter solver: diagonalization| the previous step]], except for the part regarding the QP correction:&lt;br /&gt;
  [[Variables#KfnQPdb|KfnQPdb]]= &amp;quot;E &amp;lt; 3D_QP_BSE/ndb.QP&amp;quot;              # [EXTQP BSK BSS] Database&lt;br /&gt;
  [[Variables#KfnQP_N|KfnQP_N]]= 1                   # [EXTQP BSK BSS] Interpolation neighbours&lt;br /&gt;
  % [[Variables#KfnQP_E|KfnQP_E]]&lt;br /&gt;
   0.000000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
Instead of setting the values for the scissor, we give the path to a database (&amp;lt;code&amp;gt;3D_QP_BSE/ndb.QP/ndb.QP&amp;lt;/code&amp;gt;), which contains the QP corrections. This has been created by running a GW calculation as in [[GW hBN Yambo Virtual 2021 version#Step 3: Interpolating Band Structures|Step 3]] of the GW tutorial.&lt;br /&gt;
Run Yambo:&lt;br /&gt;
 $ yambo -F 03_3D_QP_BSE.in -J &amp;quot;3D_QP_BSE,3D_BSE&amp;quot;&lt;br /&gt;
Note how we specified two directories, separated by a comma. This instructs Yambo to look for databases that may be already present from previous steps of the calculations in all the listed folders. If you completed the [[Bethe-Salpeter solver: diagonalization|previous section]] of the tutorial, then you should have the &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; folder with &amp;lt;code&amp;gt;ndb.dipoles_*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ndb.em1s*&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ndb.BS_CPU*&amp;lt;/code&amp;gt; databases, which will not be recalculated by Yambo: the code will repeat only the diagonalization step, and print the resulting databases in the new folder &amp;lt;code&amp;gt;3D_QP_BSE&amp;lt;/code&amp;gt;. If you don&#039;t have the &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; folder, you have to repeat the entire BSE calculation, therefore you just need to give the option &amp;quot;-J 3D_QP_BSE&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This produces the following log in the standard output. Note Section 4 (regarding external QP corrections to the kernel):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;---&amp;gt; [04] External/Internal QP corrections&lt;br /&gt;
 &amp;lt;---&amp;gt; E&amp;lt;../GW_QP_database/ndb.QP[ PPA@E  27.21138 = XG 5 = Xb 1-40 = Scb 1-40]&lt;br /&gt;
 &amp;lt;---&amp;gt; [dE_from_DB-Nearest K] Exact matches       :  100.0000 [o/o]&lt;br /&gt;
&lt;br /&gt;
This tells you that the file was found, read correctly and that the &#039;&#039;&#039;k&#039;&#039;&#039; points found in the file matched the ones you are using for the current calculation (otherwise interpolation would be needed).&lt;br /&gt;
It is crucial to check that the file has been read, since if not Yambo gives a warning but continues the calculation (with no QP corrections at all!).&lt;br /&gt;
As in the calculation with the scissor shift the final results are the files with the spectral functions. Let&#039;s compare the results for the optical absorption spectrum with those obtained [[Bethe-Salpeter solver: diagonalization|previously]] with a simple scissor:&lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 ...&lt;br /&gt;
 plot &#039;o-3D_QP_BSE.eps_q1_diago_bse&#039; u 1:2 w l t &#039;Explicit QP&#039;, &#039;o-3D_BSE.eps_q1_diago_bse&#039; u 1:2 w l t &#039;Scissor&#039; &lt;br /&gt;
[[File:03 bse diago qp 2021.png|none|600px]]&lt;br /&gt;
&lt;br /&gt;
It is clear that this makes a difference in the peak positions, distribution and intensity. Note that besides a simple shift you can renormalise as well the bandwidth of the valence and conduction bands in &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt; (respectively the third and second value). You can try as an exercise to set up a new calculation using e.g. &amp;lt;code&amp;gt; 1.44 | 1.200000 | 0.900000 |&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
From this tutorial you&#039;ve learned:&lt;br /&gt;
* How to compute the optical spectrum including quasiparticle corrections (full GW+BSE calculation).&lt;br /&gt;
&lt;br /&gt;
==Navigate==&lt;br /&gt;
&lt;br /&gt;
* Previous module: [[Bethe-Salpeter solver: diagonalization]]&lt;br /&gt;
* Back to [[Calculating optical spectra including excitonic effects: a step-by-step guide]] tutorial&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_on_top_of_quasiparticle_energies&amp;diff=4485</id>
		<title>Bethe-Salpeter on top of quasiparticle energies</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_on_top_of_quasiparticle_energies&amp;diff=4485"/>
		<updated>2021-03-28T16:42:25Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this module, you will learn how to include GW-corrected (QP) energies in the calculation of the absorption spectrum. The energy differences on the diagonal of the excitonic Hamiltonian are added before the solution of the Bethe-Salpeter eigenproblem, therefore only that step needs to be repeated if we change the QP corrections. &lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&#039;&#039;&#039;Previous modules&#039;&#039;&#039;&lt;br /&gt;
You must have completed &lt;br /&gt;
* the [[Bethe-Salpeter kernel|BSE kernel]] tutorial&lt;br /&gt;
* Optionally, the [[Bethe-Salpeter solver: diagonalization| Bethe-Salpeter solver: diagonalization]] tutorial, in which a simple scissor operator is used for the QP corrections.&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* The &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; databases for 3D hBN &lt;br /&gt;
* The &amp;lt;code&amp;gt;ndb.BS_Q1_CPU_0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ndb.em1s*&amp;lt;/code&amp;gt; databases for 3D hBN&lt;br /&gt;
* The &amp;lt;code&amp;gt;ndb.QP&amp;lt;/code&amp;gt; database containing the GW-corrected band energies&lt;br /&gt;
* &amp;lt;code&amp;gt;yambo &amp;lt;/code&amp;gt; executable&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Reading the QP corrections from a previous &#039;&#039;GW&#039;&#039; calculation==&lt;br /&gt;
In [[Bethe-Salpeter solver: diagonalization|the previous step]] we used a simple scissor operator to correct the Kohn-Sham DFT energies. Instead, in this part, we are taking the QP corrections from a previous Yambo GW calculation.&lt;br /&gt;
We create and edit the input:&lt;br /&gt;
 $yambo -F 03_3D_QP_BSE.in -y d -V qp -J 3D_BSE&lt;br /&gt;
We set all parameters as in [[Bethe-Salpeter solver: diagonalization| the previous step]], except for the part regarding the QP correction:&lt;br /&gt;
  [[Variables#KfnQPdb|KfnQPdb]]= &amp;quot;E &amp;lt; 3D_QP_BSE/ndb.QP&amp;quot;              # [EXTQP BSK BSS] Database&lt;br /&gt;
  [[Variables#KfnQP_N|KfnQP_N]]= 1                   # [EXTQP BSK BSS] Interpolation neighbours&lt;br /&gt;
  % [[Variables#KfnQP_E|KfnQP_E]]&lt;br /&gt;
   0.000000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
Instead of setting the values for the scissor, we give the path to a database (&amp;lt;code&amp;gt;../GW_QP_database/ndb.QP&amp;lt;/code&amp;gt;), which contains the QP corrections. This has been created by running a GW calculation as in [[GW hBN Yambo Virtual 2021 version#Step 3: Interpolating Band Structures|Step 3]] of the GW tutorial.&lt;br /&gt;
Run Yambo:&lt;br /&gt;
 $ yambo -F 03_3D_QP_BSE.in -J &amp;quot;3D_QP_BSE,3D_BSE&amp;quot;&lt;br /&gt;
Note how we specified two directories, separated by a comma. This instructs Yambo to look for databases that may be already present from previous steps of the calculations in all the listed folders. If you completed the [[Bethe-Salpeter solver: diagonalization|previous section]] of the tutorial, then you should have the &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; folder with &amp;lt;code&amp;gt;ndb.dipoles_*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ndb.em1s*&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ndb.BS_CPU*&amp;lt;/code&amp;gt; databases, which will not be recalculated by Yambo: the code will repeat only the diagonalization step, and print the resulting databases in the new folder &amp;lt;code&amp;gt;3D_QP_BSE&amp;lt;/code&amp;gt;. If you don&#039;t have the &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; folder, you have to repeat the entire BSE calculation, therefore you just need to give the option &amp;quot;-J 3D_QP_BSE&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This produces the following log in the standard output. Note Section 4 (regarding external QP corrections to the kernel):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;---&amp;gt; [04] External/Internal QP corrections&lt;br /&gt;
 &amp;lt;---&amp;gt; E&amp;lt;../GW_QP_database/ndb.QP[ PPA@E  27.21138 = XG 5 = Xb 1-40 = Scb 1-40]&lt;br /&gt;
 &amp;lt;---&amp;gt; [dE_from_DB-Nearest K] Exact matches       :  100.0000 [o/o]&lt;br /&gt;
&lt;br /&gt;
This tells you that the file was found, read correctly and that the &#039;&#039;&#039;k&#039;&#039;&#039; points found in the file matched the ones you are using for the current calculation (otherwise interpolation would be needed).&lt;br /&gt;
It is crucial to check that the file has been read, since if not Yambo gives a warning but continues the calculation (with no QP corrections at all!).&lt;br /&gt;
As in the calculation with the scissor shift the final results are the files with the spectral functions. Let&#039;s compare the results for the optical absorption spectrum with those obtained [[Bethe-Salpeter solver: diagonalization|previously]] with a simple scissor:&lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 ...&lt;br /&gt;
 plot &#039;o-3D_QP_BSE.eps_q1_diago_bse&#039; u 1:2 w l t &#039;Explicit QP&#039;, &#039;o-3D_BSE.eps_q1_diago_bse&#039; u 1:2 w l t &#039;Scissor&#039; &lt;br /&gt;
[[File:03 bse diago qp 2021.png|none|600px]]&lt;br /&gt;
&lt;br /&gt;
It is clear that this makes a difference in the peak positions, distribution and intensity. Note that besides a simple shift you can renormalise as well the bandwidth of the valence and conduction bands in &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt; (respectively the third and second value). You can try as an exercise to set up a new calculation using e.g. &amp;lt;code&amp;gt; 1.44 | 1.200000 | 0.900000 |&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
From this tutorial you&#039;ve learned:&lt;br /&gt;
* How to compute the optical spectrum including quasiparticle corrections (full GW+BSE calculation).&lt;br /&gt;
&lt;br /&gt;
==Navigate==&lt;br /&gt;
&lt;br /&gt;
* Previous module: [[Bethe-Salpeter solver: diagonalization]]&lt;br /&gt;
* Back to [[Calculating optical spectra including excitonic effects: a step-by-step guide]] tutorial&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_on_top_of_quasiparticle_energies&amp;diff=4484</id>
		<title>Bethe-Salpeter on top of quasiparticle energies</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_on_top_of_quasiparticle_energies&amp;diff=4484"/>
		<updated>2021-03-28T16:37:38Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this module, you will learn how to include GW-corrected (QP) energies in the calculation of the absorption spectrum. The energy differences on the diagonal of the excitonic Hamiltonian are added before the solution of the Bethe-Salpeter eigenproblem, therefore only that step needs to be repeated if we change the QP corrections. &lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&#039;&#039;&#039;Previous modules&#039;&#039;&#039;&lt;br /&gt;
You must have completed &lt;br /&gt;
* the [[Bethe-Salpeter kernel|BSE kernel]] tutorial&lt;br /&gt;
* Optionally, the [[Bethe-Salpeter solver: diagonalization| Bethe-Salpeter solver: diagonalization]] tutorial, in which a simple scissor operator is used for the QP corrections.&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* The &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; databases for 3D hBN &lt;br /&gt;
* The &amp;lt;code&amp;gt;ndb.BS_Q1_CPU_0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ndb.em1s*&amp;lt;/code&amp;gt; databases for 3D hBN&lt;br /&gt;
* The &amp;lt;code&amp;gt;ndb.QP&amp;lt;/code&amp;gt; database containing the GW-corrected band energies&lt;br /&gt;
* &amp;lt;code&amp;gt;yambo &amp;lt;/code&amp;gt; executable&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Reading the QP corrections from a previous &#039;&#039;GW&#039;&#039; calculation==&lt;br /&gt;
In [[Bethe-Salpeter solver: diagonalization|this previous calculation]] we have used a simple scissor operator to correct the Kohn-Sham DFT energies. In this part, we see how we can instead take the corrections from a previous Yambo GW calculation.&lt;br /&gt;
We create and edit the input:&lt;br /&gt;
 $yambo -F 03_3D_QP_BSE.in -y d -V qp -J 3D_BSE&lt;br /&gt;
We set all parameters as in the previous calculation, except for the part regarding the QP correction:&lt;br /&gt;
  [[Variables#KfnQPdb|KfnQPdb]]= &amp;quot;E &amp;lt; 3D_QP_BSE/ndb.QP&amp;quot;              # [EXTQP BSK BSS] Database&lt;br /&gt;
  [[Variables#KfnQP_N|KfnQP_N]]= 1                   # [EXTQP BSK BSS] Interpolation neighbours&lt;br /&gt;
  % [[Variables#KfnQP_E|KfnQP_E]]&lt;br /&gt;
   0.000000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
Instead of setting the values for the scissor, we give the path to a database (&amp;lt;code&amp;gt;../GW_QP_database/ndb.QP&amp;lt;/code&amp;gt;), which contains the QP corrections. This has been created by running a GW calculation as in [[GW hBN Yambo Virtual 2021 version#Step 3: Interpolating Band Structures|Step 3]] of the GW tutorial.&lt;br /&gt;
Run Yambo:&lt;br /&gt;
 $ yambo -F 03_3D_QP_BSE.in -J &amp;quot;3D_QP_BSE,3D_BSE&amp;quot;&lt;br /&gt;
Note how we specified two directories, separated by a comma. This instructs Yambo to look for databases that may be already present from previous steps of the calculations in all the listed folders. If you completed the [[Bethe-Salpeter solver: diagonalization|previous section]] of the tutorial, then you should have the &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; folder with &amp;lt;code&amp;gt;ndb.dipoles_*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ndb.em1s*&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ndb.BS_CPU*&amp;lt;/code&amp;gt; databases, which will not be recalculated by Yambo: the code will repeat only the diagonalization step, and print the resulting databases in the new folder &amp;lt;code&amp;gt;3D_QP_BSE&amp;lt;/code&amp;gt;. If you don&#039;t have the &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; folder, you have to repeat the entire BSE calculation, therefore you just need to give the option &amp;quot;-J 3D_QP_BSE&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This produces the following log in the standard output. Note Section 4 (regarding external QP corrections to the kernel):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;---&amp;gt; [04] External/Internal QP corrections&lt;br /&gt;
 &amp;lt;---&amp;gt; E&amp;lt;../GW_QP_database/ndb.QP[ PPA@E  27.21138 = XG 5 = Xb 1-40 = Scb 1-40]&lt;br /&gt;
 &amp;lt;---&amp;gt; [dE_from_DB-Nearest K] Exact matches       :  100.0000 [o/o]&lt;br /&gt;
&lt;br /&gt;
This tells you that the file was found, read correctly and that the &#039;&#039;&#039;k&#039;&#039;&#039; points found in the file matched the ones you are using for the current calculation (otherwise interpolation would be needed).&lt;br /&gt;
It is crucial to check that the file has been read, since if not Yambo gives a warning but continues the calculation (with no QP corrections at all!).&lt;br /&gt;
As in the calculation with the scissor shift the final results are the files with the spectral functions. Let&#039;s compare the results for the optical absorption spectrum with those obtained [[Bethe-Salpeter solver: diagonalization|previously]] with a simple scissor:&lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 ...&lt;br /&gt;
 plot &#039;o-3D_QP_BSE.eps_q1_diago_bse&#039; u 1:2 w l t &#039;Explicit QP&#039;, &#039;o-3D_BSE.eps_q1_diago_bse&#039; u 1:2 w l t &#039;Scissor&#039; &lt;br /&gt;
[[File:03 bse diago qp 2021.png|none|600px]]&lt;br /&gt;
&lt;br /&gt;
It is clear that this makes a difference in the peak positions, distribution and intensity. Note that besides a simple shift you can renormalise as well the bandwidth of the valence and conduction bands in &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt; (respectively the third and second value). You can try as an exercise to set up a new calculation using e.g. &amp;lt;code&amp;gt; 1.44 | 1.200000 | 0.900000 |&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
From this tutorial you&#039;ve learned:&lt;br /&gt;
* How to compute the optical spectrum including quasiparticle corrections (full GW+BSE calculation).&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&lt;br /&gt;
* Previous module: [[Bethe-Salpeter solver: diagonalization]]&lt;br /&gt;
* Back to [[Calculating optical spectra including excitonic effects: a step-by-step guide]] tutorial&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_on_top_of_quasiparticle_energies&amp;diff=4483</id>
		<title>Bethe-Salpeter on top of quasiparticle energies</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Bethe-Salpeter_on_top_of_quasiparticle_energies&amp;diff=4483"/>
		<updated>2021-03-28T16:37:00Z</updated>

		<summary type="html">&lt;p&gt;Myrta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this module, you will learn how to include GW-corrected (QP) energies in the calculation of the absorption spectrum. The energy differences on the diagonal of the excitonic Hamiltonian are added before the solution of the Bethe-Salpeter eigenproblem, therefore only that step needs to be repeated if we change the QP corrections. &lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&#039;&#039;&#039;Previous modules&#039;&#039;&#039;&lt;br /&gt;
You must have completed &lt;br /&gt;
* the [[Bethe-Salpeter kernel|BSE kernel]] tutorial&lt;br /&gt;
* Optionally, the [[Bethe-Salpeter solver: diagonalization| Bethe-Salpeter solver: diagonalization]] tutorial, in which a simple scissor operator is used for the QP corrections.&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* The &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; databases for 3D hBN &lt;br /&gt;
* The &amp;lt;code&amp;gt;ndb.BS_Q1_CPU_0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ndb.em1s*&amp;lt;/code&amp;gt; databases for 3D hBN&lt;br /&gt;
* The &amp;lt;code&amp;gt;ndb.QP&amp;lt;/code&amp;gt; database containing the GW-corrected band energies&lt;br /&gt;
* &amp;lt;code&amp;gt;yambo &amp;lt;/code&amp;gt; executable&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Reading the QP corrections from a previous &#039;&#039;GW&#039;&#039; calculation==&lt;br /&gt;
In [[Bethe-Salpeter solver: diagonalization|this previous calculation]] we have used a simple scissor operator to correct the Kohn-Sam DFT energies. In this part, we see how we can instead take the corrections from a previous Yambo GW calculation.&lt;br /&gt;
We create and edit the input:&lt;br /&gt;
 $yambo -F 03_3D_QP_BSE.in -y d -V qp -J 3D_BSE&lt;br /&gt;
We set all parameters as in the previous calculation, except for the part regarding the QP correction:&lt;br /&gt;
  [[Variables#KfnQPdb|KfnQPdb]]= &amp;quot;E &amp;lt; 3D_QP_BSE/ndb.QP&amp;quot;              # [EXTQP BSK BSS] Database&lt;br /&gt;
  [[Variables#KfnQP_N|KfnQP_N]]= 1                   # [EXTQP BSK BSS] Interpolation neighbours&lt;br /&gt;
  % [[Variables#KfnQP_E|KfnQP_E]]&lt;br /&gt;
   0.000000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim&lt;br /&gt;
 %&lt;br /&gt;
Instead of setting the values for the scissor, we give the path to a database (&amp;lt;code&amp;gt;../GW_QP_database/ndb.QP&amp;lt;/code&amp;gt;), which contains the QP corrections. This has been created by running a GW calculation as in [[GW hBN Yambo Virtual 2021 version#Step 3: Interpolating Band Structures|Step 3]] of the GW tutorial.&lt;br /&gt;
Run Yambo:&lt;br /&gt;
 $ yambo -F 03_3D_QP_BSE.in -J &amp;quot;3D_QP_BSE,3D_BSE&amp;quot;&lt;br /&gt;
Note how we specified two directories, separated by a comma. This instructs Yambo to look for databases that may be already present from previous steps of the calculations in all the listed folders. If you completed the [[Bethe-Salpeter solver: diagonalization|previous section]] of the tutorial, then you should have the &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; folder with &amp;lt;code&amp;gt;ndb.dipoles_*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ndb.em1s*&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ndb.BS_CPU*&amp;lt;/code&amp;gt; databases, which will not be recalculated by Yambo: the code will repeat only the diagonalization step, and print the resulting databases in the new folder &amp;lt;code&amp;gt;3D_QP_BSE&amp;lt;/code&amp;gt;. If you don&#039;t have the &amp;lt;code&amp;gt;3D_BSE&amp;lt;/code&amp;gt; folder, you have to repeat the entire BSE calculation, therefore you just need to give the option &amp;quot;-J 3D_QP_BSE&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This produces the following log in the standard output. Note Section 4 (regarding external QP corrections to the kernel):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;---&amp;gt; [04] External/Internal QP corrections&lt;br /&gt;
 &amp;lt;---&amp;gt; E&amp;lt;../GW_QP_database/ndb.QP[ PPA@E  27.21138 = XG 5 = Xb 1-40 = Scb 1-40]&lt;br /&gt;
 &amp;lt;---&amp;gt; [dE_from_DB-Nearest K] Exact matches       :  100.0000 [o/o]&lt;br /&gt;
&lt;br /&gt;
This tells you that the file was found, read correctly and that the &#039;&#039;&#039;k&#039;&#039;&#039; points found in the file matched the ones you are using for the current calculation (otherwise interpolation would be needed).&lt;br /&gt;
It is crucial to check that the file has been read, since if not Yambo gives a warning but continues the calculation (with no QP corrections at all!).&lt;br /&gt;
As in the calculation with the scissor shift the final results are the files with the spectral functions. Let&#039;s compare the results for the optical absorption spectrum with those obtained [[Bethe-Salpeter solver: diagonalization|previously]] with a simple scissor:&lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 ...&lt;br /&gt;
 plot &#039;o-3D_QP_BSE.eps_q1_diago_bse&#039; u 1:2 w l t &#039;Explicit QP&#039;, &#039;o-3D_BSE.eps_q1_diago_bse&#039; u 1:2 w l t &#039;Scissor&#039; &lt;br /&gt;
[[File:03 bse diago qp 2021.png|none|600px]]&lt;br /&gt;
&lt;br /&gt;
It is clear that this makes a difference in the peak positions, distribution and intensity. Note that besides a simple shift you can renormalise as well the bandwidth of the valence and conduction bands in &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt; (respectively the third and second value). You can try as an exercise to set up a new calculation using e.g. &amp;lt;code&amp;gt; 1.44 | 1.200000 | 0.900000 |&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;KfnQP_E&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
From this tutorial you&#039;ve learned:&lt;br /&gt;
* How to compute the optical spectrum including quasiparticle corrections (full GW+BSE calculation).&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&lt;br /&gt;
* Previous module: [[Bethe-Salpeter solver: diagonalization]]&lt;br /&gt;
* Back to [[Calculating optical spectra including excitonic effects: a step-by-step guide]] tutorial&lt;br /&gt;
* [[Tutorials|Back to tutorials menu]]&lt;br /&gt;
* [[Modules|Back to technical modules menu]]&lt;/div&gt;</summary>
		<author><name>Myrta</name></author>
	</entry>
</feed>