Difference between revisions of "Calculating optical spectra including excitonic effects: a step-by-step guide"

From The Yambo Project
Jump to navigation Jump to search
 
(38 intermediate revisions by 6 users not shown)
Line 1: Line 1:
WORK IN PROGRESS - by Myrta Grüning
This tutorial guides you through the workflow of a calculation of the optical spectrum of a given material by solving the Bethe-Salpeter equation.
Specifically, we will use [[Bulk material: h-BN|bulk h-BN]] as an example.
 
[[File:HBN-bulk-3x3-annotated.png|x200px|center|Atomic structure of bulk hBN]]


This tutorial guides you through the workflow of a calculation of the optical spectrum of a given material by solving the Bethe-Salpeter equation.
Before starting, you need to obtain the tarballs for hBN. See instructions on the [[Tutorials|main tutorials page]].
Specifically we will use [[Bulk material: h-BN|bulk h-BN]] as an example.


Start by downloading the databases into a dedicated directory. ADD DOWNLOAD!!!
The target quantity in a Bethe-Salpeter calculation is the macroscopic dielectric matrix &epsilon;<sub>M</sub>. The following quantities/steps are needed to obtain &epsilon;<sub>M</sub>:
 
Note that if you have run all previous tutorials you may have already the SAVE directory with all needed databases. You can use those, but we recommend you to download and use the provided folder instead for the sake of consistency.   


The calculation of an optical spectrum consists of the following stages:
[[File:Scheme1b.png|500px|center|BSE calculation scheme]]


The optical absorption spectrum corresponds to Im&epsilon;<sub>M</sub>(&omega;). Following this scheme we go through the flow of a calculation:
__TOC__
__TOC__


<!-- - Calculating the effective two-particle Hamiltonian (which implies calculating the matrix elements of the Bethe-Salpeter kernel)
===Step 1: Static screening===
Use the ''SAVE'' folders that are already provided and type:
$ cd YAMBO_TUTORIALS/hBN/YAMBO
 
Follow the '''[[Static screening]]''' module and then '''return to this tutorial '''
 
===Step 2: Bethe-Salpeter kernel===
Follow the module on '''[[Bethe-Salpeter kernel]]''' and '''return to this tutorial'''
 
===Step 3: Diagonalisation of the excitonic Hamiltonian ===
This is the step in which you obtain the spectra. Mathematically this implies solving a large eigenvalue problem. In this tutorial, we diagonalise the whole Bethe-Salpeter matrix, but there are other numerical approaches available in Yambo. The difference between these approaches and when they should be used is the object of [[BSE solvers overview|one of the next tutorials]].
 
Follow the module on '''[[Bethe-Salpeter solver: diagonalization]]''' then '''return to this tutorial'''
 
===Step 4: Include previous quasiparticle (GW) results ===
In Step 3, we included the quasiparticle corrections to the Kohn-sham energies as a scissor operator. An alternative is to use the results from a previous run of Yambo.
 
Follow the module on '''[[Bethe-Salpeter on top of quasiparticle energies]]''' and '''return to this tutorial'''


- Diagonalizing the effective two-particle Hamiltonian and calculate the spectra from the eigenvectors and eigenvalues-->
==Links==
* Back to [[Rome 2023#Tutorials]]
* [[Modules|Back to technical modules menu]]
* [[Tutorials|Back to tutorials menu]]


<!--
= Calculating the effective two-particle Hamiltonian =   
= Calculating the effective two-particle Hamiltonian =   


Line 40: Line 62:
   1 | 40 |                 
   1 | 40 |                 
  %
  %
   [[Variables#NGsBlkXs|NGsBlkXs]]= 2 Ry
   [[Variables#NGsBlkXs|NGsBlkXs]]= 4 Ry


The first variable gives how many bands are included in the sum to calculate the static response function. The second is a cutoff for the dimension of the static dielectric matrix.
The first variable gives how many bands are included in the sum to calculate the static response function. The second is a cutoff for the dimension of the static dielectric matrix.
Line 88: Line 110:


  [[Variables#BSENGexx|BSENGexx]] = 30 Ry
  [[Variables#BSENGexx|BSENGexx]] = 30 Ry
  [[Variables#BSENGBlk|BSENGBlk]] = 2 Ry
  [[Variables#BSENGBlk|BSENGBlk]] = 4 Ry
  % [[Variables#BSEBands|BSEBands]]
  % [[Variables#BSEBands|BSEBands]]
   6 | 10 |       
   6 | 10 |       
Line 140: Line 162:
(1) diagonalize the full Hamiltonian (diagonalization solver)  
(1) diagonalize the full Hamiltonian (diagonalization solver)  


(2) use the subspace iterative [https://en.wikipedia.org/wiki/Lanczos_algorithm| Lanczos algorithm] and by-pass diagonalization with the Haydock approach<ref>R. Haydock, in
(2) use the subspace iterative [https://en.wikipedia.org/wiki/Lanczos_algorithm | Lanczos algorithm] and by-pass diagonalization with the Haydock approach<ref>R. Haydock, in
  ''Solid State Phys.'', '''35''' 215 (1980)
  ''Solid State Phys.'', '''35''' 215 (1980)
  edited by H. Ehrenfest, F. Seitz, and D. Turnbull, Academic Press</ref> (Lanczos-Haydock solver)
  edited by H. Ehrenfest, F. Seitz, and D. Turnbull, Academic Press</ref> (Lanczos-Haydock solver)
Line 284: Line 306:


==Reading the QP corrections from a previous ''GW'' calculation==
==Reading the QP corrections from a previous ''GW'' calculation==
In the above 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.
We create and edit the input. This time instead of proceeding in three steps as before, we create one input performing all three steps:
$yambo -o b -k sex -y d -V qp -F Ins/05_3D_QP_BSE.in
We set all parameters as in the previous calculation, except for the part regarding the QP correction:
  [[Variables#KfnQPdb|KfnQPdb]]= "E < 3D_QP_BSE/ndb.QP"              # [EXTQP BSK BSS] Database
  [[Variables#KfnQP_N|KfnQP_N]]= 1                  # [EXTQP BSK BSS] Interpolation neighbours
  % [[Variables#KfnQP_E|KfnQP_E]]
  0.000000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters  (c/v) eV|adim|adim
%
Instead of setting the values for the scissor, we give the path to a database (3D_QP_BSE/ndb.QP) which contains the QP corrections. This has been created by running a GW calculation as in the [[How to obtain the quasi-particle band structure of a bulk material: h-BN |GW tutorial]].
Run Yambo:
$ yambo -F Ins/05_3D_QP_BSE.in -J "3D_QP_BSE,3D_BSE"
This produces the following log in the standard output. Note Section 4 (regarding external QP corrections to the kernel):
<01s> [04.01] External QP corrections (K)
<01s> [QP@K] E<3D_QP_BSE/ndb.QP[ PPA XG:39 Xb:1  40 Scb:1  40]
<01s> [QP] Kpts covered exactly  [o/o]: 100.0000
This tells you that the file was found, read correctly and that the '''k''' points found in the file matched the ones you are using for the current calculation (otherwise interpolation would be needed).
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!).
As in the previous calculation the final results of the calculation are the files with the spectral functions. Let's compare the results for the optical absorption spectrum with those obtained previously with a simple scissor:
$ gnuplot
...
plot 'o-3D_QP_BSE.eps_q1_diago_bse' u 1:2 w l t 'Explicit QP', 'o-3D_BSE.eps_q1_diago_bse' u 1:2 w l t 'Scissor'
[[File:03 bse diago qp.png|none|600px]]
[[File:03 bse diago qp.png|none|600px]]
It is clear that this makes a difference in the peak distribution and intensity. Note that beside a simple shift you can renormalise as well the bandwidth of the valence and conduction bands in KfnQP_E (respectively the third and second value). You can try as an exercise to set up a new calculation using e.g. 1.440000 | 1.200000 | 0.900000 | for KfnQP_E.


=References =
=References =
<references />
<references />
-->

Latest revision as of 14:08, 19 May 2023

This tutorial guides you through the workflow of a calculation of the optical spectrum of a given material by solving the Bethe-Salpeter equation. Specifically, we will use bulk h-BN as an example.

Atomic structure of bulk hBN

Before starting, you need to obtain the tarballs for hBN. See instructions on the main tutorials page.

The target quantity in a Bethe-Salpeter calculation is the macroscopic dielectric matrix εM. The following quantities/steps are needed to obtain εM:

BSE calculation scheme

The optical absorption spectrum corresponds to ImεM(ω). Following this scheme we go through the flow of a calculation:

Step 1: Static screening

Use the SAVE folders that are already provided and type:

$ cd YAMBO_TUTORIALS/hBN/YAMBO

Follow the Static screening module and then return to this tutorial

Step 2: Bethe-Salpeter kernel

Follow the module on Bethe-Salpeter kernel and return to this tutorial

Step 3: Diagonalisation of the excitonic Hamiltonian

This is the step in which you obtain the spectra. Mathematically this implies solving a large eigenvalue problem. In this tutorial, we diagonalise the whole Bethe-Salpeter matrix, but there are other numerical approaches available in Yambo. The difference between these approaches and when they should be used is the object of one of the next tutorials.

Follow the module on Bethe-Salpeter solver: diagonalization then return to this tutorial

Step 4: Include previous quasiparticle (GW) results

In Step 3, we included the quasiparticle corrections to the Kohn-sham energies as a scissor operator. An alternative is to use the results from a previous run of Yambo.

Follow the module on Bethe-Salpeter on top of quasiparticle energies and return to this tutorial

Links