Hydrogen chain

From The Yambo Project
Jump to navigation Jump to search

In this tutorial you will learn why ALDA fails in extended systems as well as general strategies for treating 1D systems.


Background

Structure of H chain

It is well known that the performance of ALDA gradually worsens when moving from 0 to 3 dimensions. Why this happens can be understood by studying a simple system: the infinite H2 molecular chain. This is a very simple physical system consisting of H atoms that are distributed in sets of two atoms placed at a variable distance X from each other. The physical properties of the chain are functions of the distance X. When X=2. a.u. the system is metallic. By increasing X the chain becomes semiconducting with increasing gap.

The conclusions of this tutorial do not mean to be general, but they should convince you that there is a link between the local assumption of the ALDA and the polarization of electrons in extended directions.

Prerequisites

  • It is advisable to first follow more straightforward tutorials on 3D and 0D systems.

You will need:

  • The SAVE databases for the hydrogen chain: Hydrogen_Chain.tar.gz
  • The yambo and ypp executables
  • gnuplot and xcrysden, for plotting spectra and electron densities

Failure of the ALDA

After having downloaded the database files you should have six folders corresponding to the six values of X (2.05, 2.1, 2.2., 2.3, 2.4 and 2.5). The first step of this tutorial is to run the calculation of the dynamical absorption in the TDLDA approximation. We will describe here only the case of X=2.05 a.u. You are invited to repeat the calculation for X=2.5 and, if you wish, for all the other cases.

Enter the 2.05 directory and run the initialization step

$ cd 2.05
$ ls
BSE/  SAVE/
$ yambo            (initialization)

From reading the r_setup file we notice that the system has a small (0.27 eV) gap. Now generate the input file for the TDLDA calculation by typing

$ yambo -o b -t a -y d -V qp

and change the highlighted lines in the input file:

optics                       # [R OPT] Optics
bse                          # [R BSK] Bethe Salpeter Equation.
alda_fxc                     # [R TDDFT] The ALDA TDDFT kernel
bss                          # [R BSS] Bethe Salpeter Equation solver
...
% KfnQP_E
 3.500000 | 1.000000 | 1.000000 |      # [EXTQP BSK BSS] E parameters (c/v)
%
% BSEBands
  1 | 2 |
%
BEnSteps= 1000                # [BSS] Energy steps

Now use the resp verbosity to activate the flag needed to dump to file the eigenvectors of the BS Hamiltonian

$ yambo -o b -t a -y d -V resp

and remove the # from the appropriate flag to activate the option:

#WRbsWF                      # [BSS] Write to disk excitonic the FWs

Now run yambo. In the folder ./BSE you will find the absorption spectra (o-BSE.eps_q001-bd) calculated using the Many-Body based Bethe-Salpeter(BS) equation. We will keep the results of the Bethe-Salpeter equation as a reference for our calculations. The BS equation leads indeed a proper and accurate description of the optical properties of the H2 molecular chains.
If you plot the ALDA result against the BS one you will find that there is a reasonable agreement between the two curves.

Chain 2.05 alda vs bse.png

Now, please, repeat the same procedure in the 2.5 folder

$ cd ../2.5
$ yambo
$ yambo -o b -t a -y d -V resp

If you plot again the ALDA result against the BS one you will find that in this case the performance of the ALDA is much worse.

Chain 2.5 alda vs bse.png

The question now is ... why?

A closer look: analysis of the electronic states

At this stage we need to get some more information from the TDLDA calculations that can be compared with the "exact" BS results. Let's proceed by plotting the electronic density and the wavefunction corresponding to the most intense peak in the dynamical polarizability.

The electronic density

The easiest quantity we can compare for the two chains (2.05 and 2.5 intratomic distance) is the electronic density.
To this end we can use the yambo post/pre processor (YPP). ypp is capable of performing some basic analyses using the pre-calculated informations stored in the yambo databases.
YPP works like yambo. It uses a series of options to create an input file containing only the variables that are relevant to that type of calculation. Launch it with the help (-H) flag to see a full list of options.

$ cd 2.05/
$ ypp -H

To plot the density we need to type

ypp -p d

The input file ypp.in will be

density                      # [R] Density
electrons                    # [R] Electrons (and holes)
Format= "g"                  # Output format [(g)nuplot/(x)crysden]
Direction= "1"               # [rlu] [1/2/3] for 1d or [12/13/23] for 2d [123] for 3D
FFTGvecs=  7659          RL  # [FFT] Plane-waves

As our system is one-dimensional and it is lying parallel to the z axis we need to change to Direction="12" so to perform a contour plot on the "XY" plane. To use XCrysden switch to "x" the value of the Format variable.
Now you can launch ypp.

$ ypp

At the end of the quick calculation you will find in your directory the file o.density_2d.xsf that you can plot using Xcrysden. You can view the density directly using the script provided in the ../bin/ folder. To use it type:

$../bin/launch_xcrysden.sh o.density_2d.xsf

Follow the same procedure for the other distance and compare the two densities. You should see something like


Chain 2.05 structure.png Chain 2.5.png
Chain 2.05.o.density 2d.xsf.png ]Chain 2.5.o.density 2d.xsf.png

We see that the smaller the gap (@ 2.05 a.u.) the more delocalized the electronic density. The consequence is that electrons can move more freely in the 2.05 case. At the same time, however, the polarization will be more "metallic-like" where the ALDA is expected to work better.

The TDLDA excitations wavefunction

Using YPP we can do something more. We can plot the wavefunction corresponding to the most intense peak in the dielectric function. The excitation wavefunction is a two-coordinate (r1, and r2) function and represents the probability amplitude of finding the electron at position r1 when the hole is in r2. The larger this probability the more delocalized is the perturbation induced by the external field.
A mean large distance between the electron and hole also reflects the poor correlation felt by the two bodies. YPP can plot either the case where the electron and the hole are forced to be in the same space point, or the case where the hole's position is fixed somewhere and the electron is left free to move. This second case is more appropriate here.
We need first to identify the index of the corresponding eigenstate. Running

$ ypp -e s

YPP will create a file named o.exc_I_sorted that contains the list of peaks in the dielectric function ordered with increasing peak intensity.

#
#  E [ev]     Strength   Index
#
  3.783688   1.000000   1.000000
   4.38457    0.03179    3.00000
  5.171     0.3731E-2   5.000

We see that the peak with energy 3.78 dominates the spectra and it corresponds to the index 1. If we type now

$ ypp -e w

to get the input file

exc_wf                       # [R] Excitonic Wavefunction
excp                         # [R] Excitonic Properties
plot                         # [R] Plot
Format= "x"                  # Output format [(g)nuplot/(x)crysden]
Direction= "12"             # [rlu] [1/2/3] for 1d or [12/13/23] for 2d [123] for 3D
FFTGvecs=  7659          RL  # [FFT] Plane-waves
States= "1 - 1"              # Index of the BS state(s)
Degen_Step=   0.0100     eV  # Maximum energy separation of two degenerate states
% Cells
 1 |  1 |  1 |                        # Number of cell repetitions (even or 1)
%
% Hole
 0.000    | 0.000    | 0.000    |      # [cc] Hole position in unit cell
%

It is interesting to do a 3D plot. To this end we set Direction="123" and replace 1 with 16 in Cells (this value will expand the unit cell along the X direction). The States variable is already set to the peak number 1.
We put the hole in the middle of the chain by setting

% Hole
 1.02500 | 12.50000 | 12.50000  |           # [cc] Hole position in unit ce
%

remember that the first field must be set to the interatomic distance divided by two. In the case of 2.5 a.u. the first field will be 1.25.
If we run now ypp it will create the file o.exc_3d_1.xsf that you can plot by using

$ ../bin/launch_xcrysden.sh o.density_2d.xsf

If we compare the plot with the one obtained by solving the BS equation we should see

Excitation wavefunctions for 2.05 a.u. distance

Chain 2.05.o-BSE RIM.exc 3d 1.xsf.pngChain 2.05.o-TDLDA.exc 3d 1.xsf.png
BS equation TDLDA



Excitation wavefunctions for 2.5 a.u. distance

Chain 2.5.o-BSE RIM.exc 3d 1.xsf.pngChain 2.5.o-TDLDA.exc 3d 3.xsf.png
BS equation TDLDA

We immediately see that, while the ALDA excitation is always spread all over the chain, in the 2.5 distance case the "true" wavefunction acquires a tail that decreases the probability of finding the electron and the hole very far from each other.
This saturation of the excitation wavefunction is the physical reason for the poor performance of the ALDA. As it is a local approximation it cannot take into account a long-range correlation between the electron and the hole.

A long-range kernel beyond the TDLDA

So, we realized the a simple plot of the excitation wavefunction can pin down the possible reasons for the breakdown of the ALDA. In general if you know the problem, you should be half way through the quest for a solution. Is it true?

We have seen the failure of the ALDA in the case of the H2 chain when the intra-molecular distance increases. We also have seen how the excitation wave function differs from the one obtained by solving the Bethe Salpeter equation in the case of 2.5 a.u. intermolecular distance. Such discrepancy has been traced back to the the long-range correlation between the electron and hole, that cannot be captured by the simple local approximation.
Now, we use yambo to check whether simple approximations for the fxc kernel can cure the ALDA drawbacks. To this end we use the [[../../doc/docs/doc_TDDFT.php|Reciprocal space Dyson equation for the response function]] (-o c option).
The key point is to realize that, indeed, the fxc kernel acts like a self-energy in the Dyson equation for &Chi. As in the case of quasiparticles, the most optimal self-energy can be chosen by looking at the structure of the bare propagator, &Chi0 in this case.
If you look [[../../doc/docs/doc_Xd.php#static|here]] you will see that in the long wavelength limit &Chi0 behaves like q2. As a naive consequence the self-energy must cancel this power dependence to ensure that the product fxc&Chi0 remains finite in the optical limit.
This simple argument is enough to introduce the long-range TDDFT kernel

Chain PIC doc TDDFT-129.png Now we will use this kernel with a static approximation for the parameter alpha, first for the chain of intermolecular distance 2.5 a.u.. Enter the 2.5 directory

 
localhost> cd 2.5

and generate the input file for a tddft calculation in reciprocal space, specifying you want the long-range kernel:

localhost>  yambo -o c -t l 

You are now redirected to the editing of the yambo.in input file.

optics                       # [R OPT] Optics
chi                          # [R CHI] Dyson equation for Chi.
lrc_fxc                      # [R TDDFT] The LRC TDDFT kernel
XfnQPdb= "none"              # [EXTQP Xd] Database
XfnQP_N= 1                   # [EXTQP Xd] Interpolation neighbours
% XfnQP_E
 0.000000 | 1.000000 | 1.000000 |      # [EXTQP Xd] E parameters (c/v)
%
% XfnQP_W
 0.000    | 0.000    | 0.000    | 0.000    |     # [EXTQP Xd] W parameters  (c/v)
%
XfnQP_Z= ( 1.000000 , 0.000000 )       # [EXTQP Xd] Z factor  (c/v)
% QpntsRXd
   1 |  41 |                 # [Xd] Transferred momenta
%
% BndsRnXd
  1 | 20 |                   # [Xd] Polarization function bands
%
NGsBlkXd= 1              RL  # [Xd] Response block size
% EnRngeXd
  0.00000 | 10.00000 | eV    # [Xd] Energy range
%
% DmRngeXd
  0.10000 |  0.10000 | eV    # [Xd] Damping range
%
ETStpsXd= 100                # [Xd] Total Energy steps
% LongDrXd
 1.000000 | 0.000000 | 0.000000 |      # [Xd] [cc] Electric Field
%
LRC_alpha= 0.000000          # [TDDFT] LRC alpha factor

Please change the yellow values ...

% XfnQP_E
 3.5000000 | 1.000000 | 1.000000 |      # [EXTQP Xd] E parameters (c/v)
%
% QpntsRXd
   1 |  1 |                 # [Xd] Transferred momenta (We want only q=0 response)
%
% BndsRnXd
  1 | 2 |                   # [Xd] Polarization function bands
%
NGsBlkXd= 100              RL  # [Xd] Response block size (Put some local fields, not too much)

...
ETStpsXd= 1000                # [Xd] Total Energy steps
...

... and run yambo.
Now we can perform different calculations assigning different values to the variable LRC_alpha. This value is a static approximation to α(&omega) in the long-range expression for fxc. This must be negative (the interaction between electron and hole is attractive). Try different numbers in the range 0 to -20. You will see that around LRC_alpha=-19 we obtain the same excitation energy of the BSE spectrum. [[File:Chain_lrc.png ]]


Now you can repeat the same calculations for the chain with 2.05 intermolecular distance. Once you will find the optimal value of %alpha, you will realize that as expected, it is one order of magnitude smaller than the one needed for the previous, more inhomogeneous system. [[File:Chain_lrc_2.png ]]To conclude this tutorial note that the value of &alpha you found is much larger then in any solid, as showed in this picture. Can you understand why ?

[[File:Chain_alpha.png ]]

Excitons in the Hydrogen chain: The Bethe-Salpeter Equation applied to 1D systems

The tricky case of the H2 chain. When the BS equation can be (even) more complicated!

Introduction

The H2 Hydrogen chain constitutes an example of a perfectly one-dimensional system. This property causes some tricky numerical problems that are, however, related to a precise physical process: the extreme confinement of 3D electrons in a small region of space.
So we start using yambo to perform a BS calculation, and you will immediately see where the problem is !

We start by generating the input file. At the command line we have to tell yambo to construct the [[../../doc/docs/doc_BSK.php|BSE]] (-o b) , to calculate the [[../../doc/docs/doc_Xd.php#static|static screened interaction]] (-b), and to [[../../doc/docs/doc_BSS.php|diagonalize]] the BS matrix (yambo -y d). The input line will be:

localhost> yambo -o b -b -y d -V qp

The generated input file describes our first attempt to calculate the excitonic polarization spectrum of the H chain:

optics                       # [R OPT] Optics
bse                          # [R BSK] Bethe Salpeter Equation.
em1s                         # [R Xs] Static Inverse Dielectric Matrix
bss                          # [R BSS] Bethe Salpeter Equation solver
KfnQPdb= "none"              # [EXTQP BSK BSS] Database
KfnQP_N= 1                   # [EXTQP BSK BSS] Interpolation neighbours
% KfnQP_E
 0.000000 | 1.000000 | 1.000000 |      # [EXTQP BSK BSS] E parameters (c/v)
%
% KfnQP_W
 0.000    | 0.000    | 0.000    | 0.000    |     # [EXTQP BSK BSS] W parameters  (c/v)
%
KfnQP_Z= ( 1.000000 , 0.000000 )       # [EXTQP BSK BSS] Z factor  (c/v)
BSresKmod= "xc"              # [BSK] Resonant Kernel mode. (`x`;`c`;`d`)
% BSEBands
 1 | 2 |                     # [BSK] Bands range
%
BSENGBlk= 1   RL  # [BSK] Screened interaction block size
BSENGexx=  7659        RL    # [BSK] Exchange components
XfnQPdb= "none"              # [EXTQP Xd] Database
XfnQP_N= 1                   # [EXTQP Xd] Interpolation neighbours
% XfnQP_E
 0.000000 | 1.000000 | 1.000000 |      # [EXTQP Xd] E parameters  (c/v)
%
% XfnQP_W
 0.000    | 0.000    | 0.000    | 0.000    |     # [EXTQP Xd] W parameters  (c/v)
%
XfnQP_Z= ( 1.000000 , 0.000000 )       # [EXTQP Xd] Z factor  (c/v)
% QpntsRXs
   1 |  41 |                 # [Xs] Transferred momenta
%
% BndsRnXs
 1 | 20 |                     # [BSK] Bands range
%
NGsBlkXs= 1            RL    # [Xs] Response block size
% LongDrXs
 1.000000 | 0.000000 | 0.000000 |      # [Xs] [cc] Electric Field
%
BSSmod= "d"                  # [BSS] Solvers `h/d/i/t`
% BEnRange
  0.00000 | 10.00000 | eV    # [BSS] Energy range
%
% BDmRange
  0.10000 |  0.10000 | eV    # [BSS] Damping range
%
BEnSteps= 100                # [BSS] Energy steps
% BLongDir
 1.000000 | 0.000000 | 0.000000 |      # [BSS] [cc] Electric Field
%


Remember to change the highlighted values. The first change is to include a QP gap correction of 3.5 eV

% KfnQP_E
 3.50000 | 1.000000 | 1.000000 |      # [EXTQP BSK BSS] E parameters (c/v)
%

Then we decide some reasonable size of the inverse dielectric function that defines the statically screened interaction.

NGsBlkXs= 111
BSENGexx= 111

Finally you should change

% BSEBands
  1 | 2 |                   # [BSK] Bands range
%

2 bands are enough to get reasonable results. Remember also to uncomment the variable WRbsWF if you want to plot the excitonic wave function afterwords


so we run

localhost> yambo 

To our great surprise the polarization spectrum we obtain is completely wrong, with just a poor signal around 3eV which is nonsense.

[[File:Chain_bse_norim.png ]]The reason of this serious failure of the BS calculation is due to the peculiar geometry of the H chain, and of corresponding BZ sampling that is strictly one dimensional, This is readily detected in any report file, like r_setup

 [...]
   [02.01] K-grid lattice
  ====  
 
  Compatible Grid might be 1D
  B1 [rlu]= -0.01250   0.00000   0.00000
  Grid dimensions         :  80
  K lattice UC volume [au]:   0.0011  

As a consequence the region of space assigned to each k-point is strongly compressed in one of the dimensions, like the thin slices of this picture

File:Chain slices.pngThe drastic consequence of this compression is that each region receives a piece of the electron-electron interaction that is multiplied by a form factor of the region, that, in general is assumed spatially constant. With such a severe sampling of the BZ this assumption is no longer valid and the screened interaction is anomalously enhanced.

To avoid this anomalous electron-electron interaction we use the Random Integration Method (-c option) described [[../../doc/docs/doc_RIM.php|here]]:

localhost> yambo -c -o b -b -y d 

and use for the [[../../doc/vars/var_RandQpts.php|RandQpts]] and for the [[../../doc/vars/var_RandGvec.php|RandGvec]]:

RandQpts= 1000000            # [RIM] Number of random q-points in the BZ
RandGvec= 1              RL  # [RIM] Coulomb interaction RS components
  

RandQpts specifies the number of random points to use and RandGvec the number of RL components to evaluate.

After typing

 localhost:>yambo

we notice a new section in the report file r_optics_bse_em1s_bss_rim_cut:

 [04] Coulomb potential Random Integration (RIM)
 =========

 [RD./SAVE/ndb.RIM]------------------------------------------
  Brillouin Zone Q/K grids (IBZ/BZ):  41   80   41   80
  Coulombian RL components        : 1
  Coulombian diagonal components  :yes
  RIM random points               : 1000000
  RIM  RL volume             [a.u.]:  0.08864
  Real RL volume             [a.u.]:  0.08820
  Eps^-1 reference component       :0
  Eps^-1 components                :  0.00000   0.00000   0.00000
  RIM anisotropy factor            :  0.00000
 - S/N 003292 ---------------------------------- v.02.09.09 -

 Summary of Coulomb integrals for non-metallic bands |Q|[au] RIM/Bare:

  Q [1]:0.1000E-4  0.7653   * Q [2]:  0.01745  0.06494
  Q [3]:  0.03491  0.17408  * Q [4]:  0.05236  0.28906
  Q [5]:  0.06981  0.39545  * Q [6]:  0.08727  0.48820
  Q [7]: 0.104720  0.566608 * Q [8]: 0.122173 0.631844
  Q [9]: 0.139626  0.685750 * Q [10]: 0.157080 0.730229
  Q [11]: 0.174533 0.767000 * Q [12]: 0.191986 0.797519
  Q [13]: 0.209440 0.822983 * Q [14]: 0.226893 0.844352
  Q [15]: 0.244346 0.862396 * Q [16]: 0.261799 0.877727
  Q [17]: 0.279253 0.890832 * Q [18]: 0.296706 0.902101
  Q [19]: 0.314159 0.911847 * Q [20]: 0.331613 0.920320
  Q [21]: 0.349066 0.927727 * Q [22]: 0.366519 0.934233
  Q [23]: 0.383972 0.939973 * Q [24]: 0.401426 0.945061
  Q [25]: 0.418879 0.949588 * Q [26]: 0.436332 0.953633
  Q [27]: 0.453786 0.957260 * Q [28]: 0.471239 0.960523
  Q [29]: 0.488692 0.963470 * Q [30]: 0.506145 0.966138
  Q [31]: 0.523599 0.968561 * Q [32]: 0.541052 0.970768
  Q [33]: 0.558505 0.972783 * Q [34]: 0.575959 0.974629
  Q [35]: 0.593412 0.976322 * Q [36]: 0.610865 0.977879
  Q [37]: 0.628319 0.979314 * Q [38]: 0.645772 0.980640
  Q [39]: 0.663225 0.981867 * Q [40]: 0.680678 0.983004
  Q [41]: 0.698132 0.984061

The interesting result is that 2nd and the 4th column of numbers reflects the effect of the BZ compression: 1 means little effect, small numbers mean large effect. We see that the effect is huge for points in the BZ with small modulus (1st and 3rd columns).

The final BS polarizability is, now, physically correct and substantially different from ALDA.

Chain bse rim.png

Additional Exercises

The H chain is a one dimensional system, and, consequently it should not absorb when the light is polarized perpendicularly to the chain axis (the x direction).

  1. Repeat the RPA, ALDA, BSE calculations for light polarized perpendicular to the chain axis to verify that the polarization is much smaller than in the parallel case.
  2. Use ypp to plot the excitonic wave function.
  3. Repeat the whole tutorial for the other intratomic distances, whose databases are provided in the tutorial zip file.