Bethe-Salpeter solver: Lanczos-Haydock
In this module you learn how to obtain the optical absorption spectrum of bulk BN within the Bethe-Salpeter equation (BSE)framework for a previously calculated Bethe-Salpeter (BS) kernel. You will learn how to by-pass the diagonalization of the full two-particle Hamiltonian by using the subspace-iterative Lanczos-Haydock solver.
The macroscopic dielectric function (from which the absorption and EEL spectra can be computed) is obtained from the eigenvalues Eλ (excitonic energies) and eigenvectors Aλcvk (exciton composition in terms of electron-hole pairs) of the two-particle Hamiltonian:
You can avoid the full matrix diagonalization (which rapidly become expensive as it scales as N3) by using the Lanczos-Haydock solver. While for small matrices the full diagonalization and the Lanczos-Haydock solver have similar computational cost, for matrices of the size 10000 by 10000 and larger, the Lanczos-Haydock solver is remarkably faster. The drawback is that excitonic functions cannot be calculated. Within the Lanczos-Haydock approach the macroscopic dielectric function is rewritten as a continued fraction
where a 's and b 's result from the Lanczos iterative algorithm.
You will need:
SAVEdatabases for 3D hBN
3D_BSEdirectory containing the databases from the Static screening and Bethe-Salpeter kernel modules
gnuplotfor plotting spectra
Choice of input parameters
To use the Lanczos-Haydock solver invoke yambo with "-y h" option in the command line:
$ yambo -F 03_3D_BSE_haydock_solver.in -y h -V qp -J 3D_BSE
The input is open in the editor. The input variable to be changed are
% BEnRange 2.00000 | 8.00000 | eV % BEnSteps= 200 % BDmRange 0.10000 | 0.10000 | eV % % BLongDir 1.000000 | 1.000000 | 0.000000 | % % KfnQP_E 1.440000 | 1.000000 | 1.000000 | %
as for the diagonalization solver and the additional parameter
defines the threshold accuracy for the Lanczos-Haydock iterative process: the calculation stops when the difference between two consecutive calculated spectra is smaller than the absolute value of the threshold. The minus sign indicates that the average difference over the specified energy range is considered (i.e. that means that cancellations of error may occur) as opposed to the maximum absolute difference over the specified energy range (plus sign). For the moment we leave this variable unchanged. This parameter ultimately determines the terms are included in the continued fraction here above. Later we explore how this variable influences the final result.
Bethe-Salpeter solver runlevel
Invoke yambo to run the calculation:
$ yambo -F 03_3D_BSE_haydock_solver.in -J "3D_BSE-low,3D_BSE"
This outputs the following log:
... <01s>  BSE solver(s) <01s> [06.01] Haydock solver <01s> [Haydock] Iteration 1 <03s> [Haydock] Iteration 21 Accuracy : 0.01647| -0.02000 ...
The Lanczos-Haydock iterative procedure converged to the desired accuracy in 21 iterations.
This runs only produces human readable files. That means that if you changes the input parameters (such as the broadening or the energy range) the Lanczos-Haydock procedure has to be repeated. Among the human readable files, o-3D_BSE-low.eps_q1_haydock_bse contains the real and imaginary part of the macroscopic dielectric function:
$ less o-3D_BSE-low.eps_q1_haydock_bse ... # # E/ev EPS-Im EPS-Re EPSo-Im EPSo-Re EPS`-Im EPS`-Re # 2.00000 0.16089 5.81293 0.04945 4.12727 0.16089 5.81293 2.03015 0.16711 5.86203 0.05076 4.14234 0.16711 5.86203 ...
This file has a slightly different data structure with respect to the diagonalization solver:
Energy in eV | Imaginary part BSE | Real part BSE |Imaginary part IPA | Real part IPA |Imaginary part BSE (it-1) | Real part BSE (it-1)|
We can plot the second and sixth columns and compare with the result from diagonalization:
$gnuplot ... plot 'o-3D_BSE.eps_q1_diago_bse' u 1:2 w l t 'Diagonalization', 'o-3D_BSE-low.eps_q1_haydock_bse' u 1:2 w l t 'Haydock (27 its)', 'o-3D_BSE-low.eps_q1_haydock_bse' u 1:6 w l t 'Haydock (26 its)'
Except for the peak at higher energy, the results on this scale are identical to those obtained via the diagonalization solver. By comparing the results for the Lanczos-Haydock solver at 27 and 26 iterations, it is clear that the difference with the diagonalization results can be eliminated by lowering the threshold for the iterative process.
Convergence of the iterative procedure
Repeat now the calculation by changing the input variable:
which enforces a stricter condition on the convergence of the iterative process (see above)
$ yambo -F 03_3D_BSE_haydock_solver.in -J "3D_BSE-high,3D_BSE"
outputs the following log
... <01s>  BSE solver(s) <01s> [06.01] Haydock solver <01s> [Haydock] Iteration 1 <06s> [Haydock] Iteration 45 Accuracy : 0.0098| 0.02000 ...
Now 45 iterations, rather than 21, were needed to reach the desired accuracy. By plotting these results:
$ gnuplot plot 'o-3D_BSE.eps_q1_diago_bse' u 1:2 w l ls 1 t 'Diagonalization', 'o-3D_BSE-high.eps_q1_haydock_bse' u 1:2 w l ls 2 t 'Haydock (high)', 'o-3D_BSE-low.eps_q1_haydock_bse' u 1:2 w l ls 3 t 'Haydock (low)'
Which shows that the Lanczos-Haydock solver with the stricter convergence criterion and the diagonalization solver are identical on this scale.
From this tutorial you've learned:
- How to compute the optical spectrum by using the Lanczos-Haydock solver within the Bethe-Salpeter equation framework
- How to improve the calculated optical spectrum by using a stricter convergence criterion for the iterative Lanczos-Haydock solver
- Previous module: Bethe-Salpeter kernel
- Alternative Bethe-Salpeter equation solver: diagonalization
- Back to Calculating optical spectra including excitonic effects: a step-by-step guide tutorial
- Back to tutorials menu
- Back to technical modules menu
- L. X. Benedict and E. L. Shirley, Phys. Rev. B 59, 5441 (1999)