Time-evolution algorithm: Difference between revisions

From VASP Wiki
No edit summary
 
(127 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The macroscopic dielectric function, <math>\epsilon_{ij}(\omega)</math>, measures how a given dielectric medium reacts when subject to an external electric field. While VASP possesses several methods to compute this function, here we focus on a <math>O(N^2)</math> strategy, which can be useful when dealing with large systems.
The [[Dielectric_properties|macroscopic dielectric function]], <math>\epsilon_{ij}(\omega)</math>, measures how a given dielectric medium reacts when subject to an external electric field. From <math>\epsilon_{ij}(\omega)</math> it is possible to extract several optical properties such as absorption, optical conductivity, and reflectance. However, it is important that the interacting electrons and holes are taken into account. This makes the evaluation of the macroscopic dielectric function more involved, since it goes beyond the single-particle level, working at the two-particle level via either the [[Bethe-Salpeter equations|Bethe-Salpeter equation]] (BSE) or [[Time-dependent density-functional theory calculations|time-dependent density-functional theory]] (TDDFT).
{{NB|warning| All features presented in this tag are only available from VASP.6 or higher!}}


==Macroscopic polarizability as a time-dependent integral==
For both frameworks, BSE and TDDFT, users can select two different strategies to compute <math>\epsilon_{ij}(\omega)</math>. The first is based on the eigendecomposition of the electron-hole hamiltonian, <math>H^\mathrm{exc}</math>. It allows for the evaluation of <math>\epsilon_{ij}(\omega)</math> by initially obtaining the eigenvalues and eigenvectors of <math>H^\mathrm{exc}</math> and then using both to evaluate <math>\epsilon_{ij}(\omega)</math>. This strategy is based on the [[Bethe-Salpeter equations|Bethe-Salpeter equation]] or the [[Time-dependent density-functional theory calculations|Casida equation]]. The second strategy transforms the mathematical expression of <math>\epsilon_{ij}(\omega)</math> into a time-dependent integral. By propagating the dipolar moments in time and then applying a Fourier transform, VASP can compute <math>\epsilon_{ij}(\omega)</math>.
The main argument is that one can write <math>\epsilon_{ij}(\omega)</math> as a time-dependent integral{{cite|schmidt:prb:2003}}
 
The advantage of the later method in relation to the former is related to their cost. The time-dependent integral has a cost of the order <math>O(N^2)</math>, while the eigendecomposition has a cost of the order <math>O(N^3)</math>, where <math>N</math> is the rank of <math>H^\mathrm{exc}</math>. This means that for very large numbers of bands or k-points, the time-dependent formalism is cheaper than the eigendecomposition method.
 
Below is a brief description of the method, from its theoretical support to how calculations should be performed, with the relevant approximations needed in the two-particle Hamiltonian.
 
==The macroscopic-dielectric function as a time-dependent integral==
The starting point is that one can re-write <math>\epsilon_{ij}(\omega)</math> as a time-dependent integral{{cite|schmidt:prb:2003}}. It starts from its expression, given by


::<math>
::<math>
\epsilon_M(\omega)=1-\frac{4\pi}{\Omega}\int_0^{\infty} \mathrm{d} t
\epsilon^M(\omega)=1+\frac{4 \pi}{\Omega_0} \sum_\lambda\left|\sum_{c v \mathbf{k}} \mu_{c v \mathbf{k}} A_{c v \mathbf{k}}^\lambda\right|^2\left[\frac{1}{\omega+E_\lambda+\mathrm{i} \eta}-\frac{1}{\omega-E_\lambda+\mathrm{i} \eta}\right]
\sum_{c,v,\mathbf{k}}\left(\langle\mu_{cv\mathbf{k}}| \xi_{cv\mathbf{k}}(t)\rangle+c . c .\right) e^{-i(\omega-i \delta) t}
</math>,
</math>,


where <math>\mu_{v c \mathbf{k}}^j=\frac{\left\langle c \mathbf{k}\left|v_j\right| v \mathbf{k}\right\rangle}{\varepsilon_c(\mathbf{k})-\varepsilon_v(\mathbf{k})}</math> is a vector of all dipole moments. The fundamental aspect behind this transformation is that the new, time-dependent vector <math>\left.\mid \xi^j(t)\right\rangle</math> follows the equation
where <math>\mu_{v c \mathbf{k}}^j=\frac{\left\langle c \mathbf{k}\left|v_j\right| v \mathbf{k}\right\rangle}{\varepsilon_c(\mathbf{k})-\varepsilon_v(\mathbf{k})}</math> is the dipolar moment associated to the the conduction <math>c</math>, valence band <math>v</math>, and k-point <math>k</math>. <math>\lambda</math> is the index of the eigenstate of <math>H^\mathrm{exc}</math>, with <math>A^\lambda</math> and <math>E_\lambda</math> being the associated eigenvector and eigenvalue.


This definition of <math>\epsilon_{ij}(\omega)</math> can be brought into operational form
::<math>
::<math>
\mathrm i \hbar \frac{\mathrm d}{\mathrm d t}\left|\xi^j(t)\right\rangle=\hat{H}(t)\left|\xi^j(t)\right\rangle,
\epsilon^M(\omega)=1+\frac{4 \pi}{\Omega_0}\left\langle\mu\left|\left[\frac{1}{\omega+\mathrm{i} \eta+\hat{H}^{\mathrm{exc}}}-\frac{1}{\omega+\mathrm{i} \eta-\hat{H}^{\mathrm{exc}}}\right]\right| \mu\right\rangle
</math>
</math>
by using the spectral decomposition <math>\left[\hat{H}^{\mathrm{exc}}-\omega\right]^{-1}=\sum_\lambda \frac{\left|A_\lambda\right\rangle\left\langle A_\lambda\right|}{E_\lambda-\omega}</math>. The new expression of <math>\epsilon(\omega)</math> is related to a time-dependent integral, using the fact that
::<math>
\frac{1}{\omega+\mathrm{i} \eta-\hat{H}^{\mathrm{exc}}}|\mu\rangle=-\mathrm{i} \int_0^{\infty} e^{-\mathrm{i}\left(\omega-\hat{H}^{\mathrm{exc}}+\mathrm{i} \eta\right) t}|\mu\rangle=-\mathrm{i} \int_0^{\infty} e^{-\mathrm{i}(\omega+\mathrm{i} \eta) t} e^{\mathrm{i} \hat{H}^{\mathrm{exc}}t}|\mu\rangle
</math>,
and recognizing that <math>e^{\mathrm{i} \hat{H}^{\mathrm{exc}}t}|\mu\rangle = |\xi(t)\rangle</math> is the exponential form of a time-dependent equation operator. These considerations allow for the expression of <math>\epsilon_{ij}(\omega)</math> to be written as


with the initial vector elements given by <math>\left|\xi^j(0)\right\rangle=\left|\mu^j\right\rangle</math>.  
::<math>
\epsilon_{ij}(\omega)=\delta_{ij}-\frac{4\pi e^2}{\Omega}\int_0^{\infty} \mathrm{d} t
\sum_{c,v,\mathbf{k}}\left(\langle\mu^j_{cv\mathbf{k}}| \xi^i_{cv\mathbf{k}}(t)\rangle+ \mathrm{c.c.}\right) e^{-\mathrm i(\omega-\mathrm i \eta) t}
</math>.  


The level of approximation is controlled by the Hamiltonian chosen in the time-dependent Schrödinger equation. It is worthy to note that <math>H(t)</math> is split into two parts, <math>H(t) = H_0 + V(t)</math>, where <math>H_0</math> is the ground-state Hamiltonian, and <math>V(t)</math> is the time-dependent perturbation.
The fundamental aspect behind this transformation is that the new, time-dependent vector <math>\left.\mid \xi^j(t)\right\rangle</math> follows the equation


By projecting the initial vector <math>\mu^i</math> on <math>\xi^j(t)</math> at each instant, VASP can compute the dielectric response at different directions (<math>i,j=x,y,z</math>). With the variable {{TAG|IEPSILON}} users can control the Cartesian direction along which the Dirac delta pulse is applied. The default value {{TAG|IEPSILON}} = 4 performs three independent calculations for an electric field in x, y and z direction, and thus is the most expensive. The choice of direction is system dependent, for instance, while for cubic systems it is enough to compute <math>\epsilon_{xx}(\omega)</math>, for 2D systems such as hexagonal boron nitride it is advisable to compute both <math>\epsilon_{xx}(\omega)</math> and <math>\epsilon_{yy}(\omega)</math> and then analyse their average.
::<math>
\mathrm i \frac{\mathrm d}{\mathrm d t}\left|\xi^j(t)\right\rangle=\hat{H}^\mathrm{exc}(t)\left|\xi^j(t)\right\rangle,
</math>


To probe the dielectric response, <math>V(t)</math> is set  as proportional to a delta-pulse{{cite|kubo:jpsj:1957}}, i.e. <math>V(t) = \lambda\mathbf r\cdot\mathbf D\delta(t)</math>{{cite|sander:jcp:2017}}. With this, all possible transitions between the conduction and valence states included in the INCAR are probed during time-propagation of the dipole-moment vector <math>\xi^j(t)</math>. Control over which valence and conduction states are added in time-dependent run is done with the {{TAG|NBANDSO}} and {{TAG|NBANDSV}} flags, respectively.  
with the initial vector given by <math>\left|\xi^j(0)\right\rangle=\left|\mu^j\right\rangle</math>.


Users should note that while the inclusion of conduction states and the right potential makes comparison time-dependent results with data resulting from TDDFT or BSE calculations, a sufficient large number of such states must be included in a preceding ground-state calculation, where all the energy levels and dipole moments are computed. Note, however, that unoccupied orbitals are not propagated, which saves computational time.
To compute the dielectric function with this method, VASP evaluates and stores at each time step the projections of <math>\left.\mid \xi^j(t)\right\rangle</math> over <math>\left.\mid \mu^i\right\rangle</math>, <math>c^{ij}_{cv\mathbf k}(t) = \langle \mu^i_{cv\mathbf k}|\xi^i_{cv\mathbf k}(t)\rangle</math>. It is the fact that all these operations are of the matrix-vector type that makes this method having a cost of the order of <math>O(N^2)</math>.


To perform this calculation, users must set {{TAG|ALGO}}={{TAG|TIMEEV}} in the INCAR file. A small example for bulk silicon is provided in the last section of this page.
==Perturbing all transitions with a delta-like potential==
In order to probe all possible <math>v\to c</math> transitions, a time-dependent term is added to the hamiltonian{{cite|sander:jcp:2017}}
::<math>
V_\mathrm{ext}(\mathbf r, t) = \lambda \mathbf r\cdot \mathbf D\delta(t),
</math>
where <math>\lambda</math> is the perturbation strength parameter and <math>\mathbf D</math> is the electric displacement field. The narrow (in time) potential allows all bands in the occupied and unoccupied manifolds to be included in the transition space. The constant displacement field replicates the long wavelength limit (i.e. <math>\mathbf q \to 0</math>).


==Levels of approximation for the exchange-correlation potential==
==The many-body terms in the hamiltonian==
Approximations to the interaction between electrons and holes are controlled in the {{TAG|INCAR}} by the tags {{TAG|LHARTREE}}, {{TAG|LADDER}}, and {{TAG|LFXC}}, which can be set to either .TRUE. or .FALSE.. Below we provide an explanation of what interaction term each tag controls.
{{NB|mind| The default setup for VASP is LHARTREE and LADDER set to .FALSE., while LFXC is set to .TRUE.. This means that if no tags are set in the INCAR the time-propagation run will using the TDDFT kernel.}}


By default, the time propagation code includes the Hartree and local-field effects ({{TAG|LHARTREE}}=.TRUE. and {{TAG|LFXC}}=.TRUE.). Results in the independent particle approximation can be calculated by setting both variables to .FALSE.. Please note that setting one variable to .FALSE. and the other to .TRUE. is not currently supported.
===Independent-particle approximation===
In this approximation all interaction terms in the hamiltonian are turned off by setting {{TAG|LHARTREE}}, {{TAG|LADDER}}, and {{TAG|LFXC}} to .FALSE. in the {{TAG|INCAR}} file. This means that the computed spectrum will be equal the one obtained during a ground-state calculation with {{TAG|LOPTICS}}=.TRUE.. This calculation is useful to test if everything is in order with the input files and the workflow is properly setup.


===LHARTREE: activation of local field effects===
===Hartree exchange potential===
With the flag {{TAG|LHARTREE}}=.TRUE. users can activate the inclusion of direct interaction terms in the Hamiltonian, also known as the bubble diagrams from Many Body Perturbation Theory. This is the equivalent of running a BSE calculation in the Random Phase approximation. Note that at the end, the dielectric function reported in the output files is the macroscopic dielectric function, where no contributions from local fields (i.e. terms with finite <math>\mathbf G</math>) are included.  
With the tag {{TAG|LHARTREE}}=.TRUE. the interaction terms in the hamiltonian will include the unscreened Coulomb exchange. These terms are also known as the bubble diagrams from many-body perturbation theory (MBPT). With both {{TAG|LFXC}} and {{TAG|LADDER}} set to .FALSE., this will be equivalent to running random-phase approximation (RPA) calculation.  


===LFXC: activation of the TDDFT kernel===
Note that at the end, the dielectric function reported in the output files is the macroscopic dielectric function, where no contributions from local fields (i.e. terms with finite <math>\mathbf G</math>) are included.
 
The missing interaction between electrons and holes from either {{TAG|LFXC}} or {{TAG|LADDER}} has as consequence that bound excitons cannot be properly described, which is a known problem of RPA. However, it can still be used to compute the electron energy-loss function, [[Dielectric properties#Electron energy loss spectroscopy (EELS)|EELS]].
 
===Screened two-particle interaction===
====Exchange-correlation effects from time-dependent density functional theory====
Setting {{TAG|LFXC}}=.TRUE. includes the local exchange-correlation kernel, <math>f_\mathrm{xc}</math> in the time-propagation
Setting {{TAG|LFXC}}=.TRUE. includes the local exchange-correlation kernel, <math>f_\mathrm{xc}</math> in the time-propagation
::<math>
::<math>
f_{\mathrm{xc}}^{\text {loc }}\left(\mathbf{r}, \mathbf{r}^{\prime}\right)=\frac{\delta^2\left\{E_{\mathrm{c}}^{\mathrm{DFT}}+\left(1-c_{\mathrm{x}}\right) E_{\mathrm{x}}^{\mathrm{DFT}}\right\}}{\delta \rho(\mathbf{r}) \delta \rho\left(\mathbf{r}^{\prime}\right)},
f_{\mathrm{xc}}^{\text {loc }}\left(\mathbf{r}, \mathbf{r}^{\prime}\right)=\frac{\delta^2\left\{E_{\mathrm{c}}^{\mathrm{DFT}}+\left(1-c_{\mathrm{x}}\right) E_{\mathrm{x}}^{\mathrm{DFT}}\right\}}{\delta \rho(\mathbf{r}) \delta \rho\left(\mathbf{r}^{\prime}\right)},
</math>
</math>
where <math>c_X</math> controls the fraction of the exchange energy functional that is included in the kernel (see {{TAG|AEXX}}). This allows users to perform time-dependent calculations using hybrid functionals.
where <math>c_X</math> controls the fraction of the exchange energy functional that is included in the kernel (see {{TAG|AEXX}}). This lets users perform time-dependent calculations using hybrid functionals.  


==Choice of time-step==
These kernels often lack the long-range component (which goes as <math>-1/q^2</math>, where <math>q</math> is the momentum difference between the electron and the hole). When using them in periodic or extended systems it is very likely that they will fail to properly reproduce the binding energies of electron-hole pairs.
By default, the number of time steps is chosen automatically by VASP and and set to 20000. Alternatively, the number of time steps can be set directly by the tag {{TAG|NELM}}. In this case, the user-defined number of steps needs to be large than 100. Otherwise, the value of {{TAG|NELM}} will be discarded and VASP will revert to the default value.


==Summary of required INCAR flags==
====Ladder diagrams from many-body perturbation theory====
===Run-level variables===
By setting {{TAG|LADDER}}=.TRUE. the interaction hamiltonian will include the screened exchange interaction potential, <math>W(\mathbf r,\mathbf r';\omega)</math>. This treats the electron-hole interaction by including the ladder diagrams from MBPT{{cite|sander:prb:15}}. This term also has the correct long-range behaviour, meaning that it can properly describe bound electron-hole pairs in solids and large molecules.
{{TAG|ALGO}} = TIMEEV - sets the calculation type to a time-evolution run


===Choice of bands===
At the present, the screened interaction has to be computed from a [[Improving_the_dielectric_function#Model-BSE|model dielectric function]], given by
{{TAG|NBANDSO}} - number of occupied (valence) bands to be included.


{{TAG|NBANDSV}} - number of virtual (conduction) bands to be included.
:<math> {\varepsilon}_{\mathbf{G},\mathbf{G}}^{-1}(\mathbf{q})=1-(1-{{\varepsilon}_{\infty}^{-1}})\text{exp}\left(-\frac{|\mathbf{q+G}|^2}{4{\lambda}^2}\right)</math>.


===Approximations to the potential===
Both {{TAG|LHFCALC}} and {{TAG|LMODELHF}} must be set to .TRUE.. Also, VASP must be provided both with {{TAG|HFSCREEN}} (<math>\lambda</math>) and {{TAG|AEXX}} (<math>{\varepsilon}_{\infty}^{-1}</math>) to control the range separation parameters in the model dielectric function.
{{TAG|LHARTREE}} - include or exclude the Hartree exchange terms (i.e. bubble diagrams) in the Hamiltonian.


{{TAG|LFXC}} - include or exclude the <math>f_\mathrm{xc}</math> kernel in the time-propagation.
==Step-by-step instructions on bulk Si==
   
===Step 1: ground state with extra empty states===
{{TAG|AEXX}} - controls the fraction of exchange functional that is included in the <math>f_\mathrm{xc}</math>.
The starting point is a ground-state calculation which includes extra empty states, whose number is controlled in the {{TAG|INCAR}} file with the tag {{TAG|NBANDS}}.  In the following example {{TAG|INCAR}} file
{{TAGBL|SYSTEM}} = Si
{{TAGBL|NBANDS}} = 12
{{TAGBL|ISMEAR}} = 0 ; {{TAGBL|SIGMA}} = 0.05
{{TAGBL|ALGO}} = N
{{TAGBL|LOPTICS}} = .TRUE.
  {{TAGBL|KPAR}} = 4
8 empty bands are chosen (silicon has 4 occupied bands in the pseudo-potential file, thus making a total of 12 bands for {{TAG|NBANDS}}). However, with {{TAG|ALGO}}=N, VASP will employ an iterative diagonalization algorithm, meaning that the last conduction states will not be converged with the same accuracy level as the occupied states. It is possible to avoid this by setting {{TAG|ALGO}}=Exact, or by increasing the number of bands to make sure that the states which will be used in the time-propagation step are converged with the same level of accuracy.


===Time-propagation and spectrum===
Finally, with {{TAG|LOPTICS}}=.TRUE., VASP will compute the dipole momentum for each possible <math>v\to c</math> transition (recall the definition of the dipole momentum vector). These are written in the file {{TAG|WAVEDER}}, which will be used in the next step.
{{TAG|CSHIFT}} - controls the broadening of the peaks in the spectra of <math>\epsilon_{ij}(\omega)</math>, while also automatically setting up the maximum time used in the time-propagation algorithm.
{{NB|mind|This calculation was performed on bulk Si (primitive cell), with a gamma-centred, 4x4x4 k-point grid, using the PBE standard pseudopotential.}}


{{TAG|IEPSILON}} - sets up the directions along which the dielectric function is computed.
===Step 2: time-evolution run===
Once the ground state with extra empty states is computed, the resulting {{TAG|WAVECAR}} and {{TAG|WAVEDER}} files are ready to use in a time-propagation calculation. The following will be used as an example {{TAG|INCAR}} file:
{{TAGBL|SYSTEM}} = Si
{{TAGBL|ALGO}} = TIMEEV
!Information about the bands
{{TAGBL|NBANDS}} = 12
{{TAGBL|NBANDSO}} = 4
{{TAGBL|NBANDSV}} = 8
!Smearing parameters
{{TAGBL|ISMEAR}} = 0 ; {{TAGBL|SIGMA}} = 0.05
!Direction of propagation
{{TAGBL|IEPSILON}} = 1
!Parallelization options
{{TAGBL|KPAR}} = 4
!Time-propagation parameters
{{TAGBL|NELM}} = 2000
{{TAGBL|CSHIFT}} = 0.1
{{TAGBL|OMEGAMAX}} = 20
!Particle interactions
{{TAGBL|LHARTREE}} = .TRUE.
{{TAGBL|LADDER}} = .TRUE.
{{TAGBL|LFXC}} = .FALSE.
{{TAGBL|LHFCALC}} = .TRUE.
{{TAGBL|LMODELHF}} = .TRUE.
{{TAGBL|AEXX}} = 0.088
{{TAGBL|HFSCREEN}} = 1.26
Here {{TAG|ALGO}} is set to TIMEEV, meaning that VASP will now perform a time-propagation calculation.  


{{TAG|NELM}} - sets the number of steps to be used in time-propagation. Users must set this number to be greater than 100 if they want to avoid the default value (20000).
====Setting up the bands====
With {{TAG|NBANDS}}=12 informs VASP that there are 12 states in total in the {{TAG|WAVECAR}} and {{TAG|WAVEDER}}. This must be consistent with Step 1! The number of occupied and unoccupied states that are used in the propagation is controlled by the {{TAG|NBANDSO}} and {{TAG|NBANDSV}} tags, respectively. To choose which bands to use it is advisable to understand the type of property that is going to be studied. For instance, in the case of optical absorption, materials are probed within a few hundreds of milli-electronvolt of the band gap. In this case it means that only states that lie close to the band extrema are important for the time-propagation.  


{{TAG|OMEGAMAX}} - maximum frequency (in eV) for which the dielectric function is computed.
In this example VASP will use {{TAG|NBANDSO}}=4 occupied and {{TAG|NBANDSV}}=8 unoccupied states during the time propagation. There is no need to use the total number of bands set up by {{TAG|NBANDS}}, but still {{TAG|NBANDSO}}+{{TAG|NBANDSV}} cannot be larger than {{TAG|NBANDS}}.


==TIMEEV ''versus'' BSE and Casida TDDFT==
====Setting up the time-step====
It is important to distinguish the difference between time-evolution and what is done for the dielectric function coming from {{TAG|BSE}} and {{TAG|TDDFT}} calculations. The starting point comes from the fact that they are intended to describe different things. TIMEEV describes the evolution of the single-particle states and does not include interactions between electrons and holes. On the contrary, both BSE and TDDFT deal with the equation of motion of two-particle states and are, in principle, able to describe optical phenomena.
VASP is now integrating a time-dependent differential equation so the time-step used to propagate the dipole moments can be specified in the {{TAG|INCAR}}. By default, VASP will use 20000 steps, however a different number can be set with the tag {{TAG|NELM}}. Nevertheless, {{TAG|NELM}} must be larger than 100, otherwise VASP will revert to the default value.


== Example ==
The time-step, <math>\Delta t</math>, and maximum propagation time, <math>T_\mathrm{max}</math>, are not dependent on the size of the interacting hamiltonian matrix. However they are dependent on the system in case and the input tag {{TAG|CSHIFT}} and {{TAG|OMEGAMAX}}. This comes from the Fourier transform used to integrate the time-dependent dipole moments, which leads to <math>T_\mathrm{max} \approx 1/\mathrm{CSHIFT}</math> and <math>\Delta t \approx 1/\mathrm{OMEGAMAX}</math>.


A typical calculation requires two steps. First, a ground state calculation:
The tag {{TAG|CSHIFT}} also controls the width used in the plotting of the dielectric function, since
::<math>
\frac{1}{\omega - E_\lambda + \mathrm i \eta} = \frac{1}{\omega - E_\lambda} - \mathrm i\pi \delta(\omega - E_\lambda)
</math>
and the <math>\delta</math>-function is approximated as <math>\delta(\omega - E_\lambda) = \lim_{\eta\to 0^+}\frac{1}{\pi}\frac{\eta}{(\omega - E_\lambda)^2+\eta^2}</math>, with {{TAG|CSHIFT}}=<math>\eta</math>.
 
Setting {{TAG|CSHIFT}} = 0.1 ~ 0.01 is often a good choice, as lower values will lead to unnecessarily long propagation times and spectra with very narrow peaks. {{TAG|OMEGAMAX}} is automatically from the maximum energy difference between occupied and unoccupied states, but can be lowered to decrease the number of pairs used in the basis set and the size of the interacting hamiltonian.
 
====Choosing the direction of perturbation====
The dipole momentum vector <math>\mu^i</math> is direction dependent. The direction of propagation is chosen in the {{TAG|INCAR}} with the tag {{TAG|IEPSILON}}, which can take values of 1, 2, or 3 (corresponding to x, y, and z direction, respectively), and 4 (corresponding to all directions).
 
While choosing a single direction of propagation decreases the computing time, it is important to pay attention to the symmetries of the material in study. For example, in the case of bulk silicon, since the material has cubic symmetry propagating along one direction (x, or y, or z) is enough. However, for a material like monolayer hexagonal boron nitride, the crystal symmetries destroy the equivalency between the x and y directions. For this system propagation should happen along both x and y, and then the dielectric function should be the average of both calculations.
 
===Analysing the results===
Once the calculation is finished, the dielectric function can be plotted by executing the following script
 
<syntaxhighlight lang="bash" line>
#!/bin/sh
awk 'BEGIN{i=0} /<dielectricfunction comment="time-propagation">/,\
                /<\/dielectricfunction>/ \
                {if ($1=="<r>") {a[i]=$2 ; b[i]=($3+$4+$5)/3 ; c[i]=$4 ; d[i]=$5 ; i=i+1}} \
    END{for (j=0;j<i/2;j++) print a[j],b[j],b[j+i/2]}' vasprun.xml > optics.dat
</syntaxhighlight>
 
which can be copied to a file (e.g. extract_optics.sh) in the same directory where the calculation was performed and then ran with
$ sh extract_optics.sh
 
This creates a file called optics.dat with three data columns. The first column is the energy of excitation, in eV. The second and third columns correspond to the imaginary and real parts of <math>\frac{1}{3}[\epsilon_{xx}(\omega)+\epsilon_{yy}(\omega)+\epsilon_{zz}(\omega)]</math>. For the example shown here, the obtained <math>\mathrm{Im}[\epsilon]</math> should be similar to the following image.
 
[[File:TIMEEV_bulk_Si_dielectric_function.png|600px|middle|Imaginary part of the dielectric function]]


{{TAGBL|SYSTEM}} = Si
Alternatively, if VASP was compiled with hdf5 support, the results can also be plotted with py4vasp
  {{TAGBL|NBANDS}} = 12 ! even 8 bands suffice for Si
<syntaxhighlight lang="bash" line>
  {{TAGBL|ISMEAR}} = 0 ; {{TAGBL|SIGMA}} = 0.05
  import py4vasp
  {{TAGBL|ALGO}} = N
  #replace path_to_calculation below with the path to the directory where the corresponding vaspout.h5 is located
  {{TAGBL|LOPTICS}} = .TRUE.
  calc=py4vasp.Calculation.from_path("path_to_calculation")
{{TAGBL|KPAR}} = 4    ! assuming we run on 4 cores, this will be the fastest
 
  calc.dielectric_function.plot("TIMEEV")
</syntaxhighlight>
which will create the following figure with both the real and imaginary part of <math>\epsilon(\omega)</math>.


[[File:TIMEEV_bulk_Si_dielectric_function_py4vasp.png|600px|middle|Imaginary part of the dielectric function]]


Second, the actual time propagation:
{{NB|mind|It should be stated that this is just an example, not a converged calculation! Several numerical parameters should be checked for convergence (e.g. number of k-points, number of empty states, etc).}}


{{TAGBL|SYSTEM}} = Si
==Comparison to other methods==
{{TAGBL|NBANDS}} = 12  ! even 8 bands suffice for Si
VASP offers two other methods with which you can compute the macroscopic dielectric function. These are based on eigendecomposition of the two particle hamiltonian, <math>H^\mathrm{exc}</math>. While more expensive than time-evolution, both these methods are able to compute eigenvalues and eigenstates of <math>H^\mathrm{exc}</math>, thus providing direct access to the excitation energies of a system.  
{{TAGBL|ISMEAR}} = 0 ; {{TAGBL|SIGMA}} = 0.05
===Bethe-Salpeter equation===
{{TAGBL|ALGO}} = TIMEEV
Here the full [[Bethe-Salpeter equations|Bethe-Salpeter equation]] is employed by setting {{TAG|ALGO}}=BSE. The interaction hamiltonian is built using the dielectric function from RPA, and has the right behaviour in the long range regime. This means that it can accurately describe bound excitons in solids and large molecules. However, it is more costly than time-evolution, scaling with <math>N_\mathrm{rank}^3</math>.
{{TAGBL|IEPSILON}} = 1 ! cubic system, so response in x direction suffices
===Casida equation===
{{TAGBL|NBANDSO}} = 4  ; {{TAGBL|NBANDSV}} = 8  ;  {{TAGBL|CSHIFT}} = 0.1
Similar to the Bethe-Salpeter equation, the [[Time-dependent density-functional theory calculations|Casida equation]] employs an eigensolver method to compute the dielectric function. This is chosen in the {{TAG|INCAR}} with {{TAG|ALGO}}=TDHF. The key difference is that the Casida method does not require a preceding GW run to compute the RPA screening and can be performed with either DFT or hybrid-functional orbitals and energies.
{{TAGBL|KPAR}} = 4    ! assuming we run on 4 cores, this will be the fastest


In this case, {{TAG|OMEGAMAX}} is set automatically to the maximal transition energy (about 25 eV in this example). Reducing the number of considered transitions, and thus reducing {{TAG|OMEGAMAX}} will increase both the duration of time steps and their number.
==Related tags and articles==
{{TAG|NBANDSO}}, {{TAG|NBANDSV}}, {{TAG|IEPSILON}}, {{TAG|NELM}}, {{TAG|LHARTREE}}, {{TAG|LADDER}}, {{TAG|LFXC}}, {{TAG|LHFCALC}}, {{TAG|LMODELHF}}, {{TAG|AEXX}}, {{TAG|HFSCREEN}}
For standard DFT calculations, the time-propagation code is so fast that very dense k-point grids can often be used.


== Related Tags and Sections ==
[[Time-dependent density-functional theory calculations]]
{{TAG|ALGO}},
{{TAG|CSHIFT}},
{{TAG|LHARTREE}},
{{TAG|LFXC}},
{{TAG|NBANDSV}},
{{TAG|NBANDSO}},
{{TAG|OMEGAMAX}}


== References ==
[[Bethe-Salpeter-equations calculations]]


----
==References==


[[Category:Linear response]][[Category:VASP6]]
[[Category:Many-body perturbation theory]][[Category:Linear response]][[Category:Bethe-Salpeter equations]][[Category:Howto]]

Latest revision as of 12:31, 7 February 2025

The macroscopic dielectric function, , measures how a given dielectric medium reacts when subject to an external electric field. From it is possible to extract several optical properties such as absorption, optical conductivity, and reflectance. However, it is important that the interacting electrons and holes are taken into account. This makes the evaluation of the macroscopic dielectric function more involved, since it goes beyond the single-particle level, working at the two-particle level via either the Bethe-Salpeter equation (BSE) or time-dependent density-functional theory (TDDFT).

For both frameworks, BSE and TDDFT, users can select two different strategies to compute . The first is based on the eigendecomposition of the electron-hole hamiltonian, . It allows for the evaluation of by initially obtaining the eigenvalues and eigenvectors of and then using both to evaluate . This strategy is based on the Bethe-Salpeter equation or the Casida equation. The second strategy transforms the mathematical expression of into a time-dependent integral. By propagating the dipolar moments in time and then applying a Fourier transform, VASP can compute .

The advantage of the later method in relation to the former is related to their cost. The time-dependent integral has a cost of the order , while the eigendecomposition has a cost of the order , where is the rank of . This means that for very large numbers of bands or k-points, the time-dependent formalism is cheaper than the eigendecomposition method.

Below is a brief description of the method, from its theoretical support to how calculations should be performed, with the relevant approximations needed in the two-particle Hamiltonian.

The macroscopic-dielectric function as a time-dependent integral

The starting point is that one can re-write as a time-dependent integral[1]. It starts from its expression, given by

,

where is the dipolar moment associated to the the conduction , valence band , and k-point . is the index of the eigenstate of , with and being the associated eigenvector and eigenvalue.

This definition of can be brought into operational form

by using the spectral decomposition . The new expression of is related to a time-dependent integral, using the fact that

,

and recognizing that is the exponential form of a time-dependent equation operator. These considerations allow for the expression of to be written as

.

The fundamental aspect behind this transformation is that the new, time-dependent vector follows the equation

with the initial vector given by .

To compute the dielectric function with this method, VASP evaluates and stores at each time step the projections of over , . It is the fact that all these operations are of the matrix-vector type that makes this method having a cost of the order of .

Perturbing all transitions with a delta-like potential

In order to probe all possible transitions, a time-dependent term is added to the hamiltonian[2]

where is the perturbation strength parameter and is the electric displacement field. The narrow (in time) potential allows all bands in the occupied and unoccupied manifolds to be included in the transition space. The constant displacement field replicates the long wavelength limit (i.e. ).

The many-body terms in the hamiltonian

Approximations to the interaction between electrons and holes are controlled in the INCAR by the tags LHARTREE, LADDER, and LFXC, which can be set to either .TRUE. or .FALSE.. Below we provide an explanation of what interaction term each tag controls.

Mind: The default setup for VASP is LHARTREE and LADDER set to .FALSE., while LFXC is set to .TRUE.. This means that if no tags are set in the INCAR the time-propagation run will using the TDDFT kernel.

Independent-particle approximation

In this approximation all interaction terms in the hamiltonian are turned off by setting LHARTREE, LADDER, and LFXC to .FALSE. in the INCAR file. This means that the computed spectrum will be equal the one obtained during a ground-state calculation with LOPTICS=.TRUE.. This calculation is useful to test if everything is in order with the input files and the workflow is properly setup.

Hartree exchange potential

With the tag LHARTREE=.TRUE. the interaction terms in the hamiltonian will include the unscreened Coulomb exchange. These terms are also known as the bubble diagrams from many-body perturbation theory (MBPT). With both LFXC and LADDER set to .FALSE., this will be equivalent to running random-phase approximation (RPA) calculation.

Note that at the end, the dielectric function reported in the output files is the macroscopic dielectric function, where no contributions from local fields (i.e. terms with finite ) are included.

The missing interaction between electrons and holes from either LFXC or LADDER has as consequence that bound excitons cannot be properly described, which is a known problem of RPA. However, it can still be used to compute the electron energy-loss function, EELS.

Screened two-particle interaction

Exchange-correlation effects from time-dependent density functional theory

Setting LFXC=.TRUE. includes the local exchange-correlation kernel, in the time-propagation

where controls the fraction of the exchange energy functional that is included in the kernel (see AEXX). This lets users perform time-dependent calculations using hybrid functionals.

These kernels often lack the long-range component (which goes as , where is the momentum difference between the electron and the hole). When using them in periodic or extended systems it is very likely that they will fail to properly reproduce the binding energies of electron-hole pairs.

Ladder diagrams from many-body perturbation theory

By setting LADDER=.TRUE. the interaction hamiltonian will include the screened exchange interaction potential, . This treats the electron-hole interaction by including the ladder diagrams from MBPT[3]. This term also has the correct long-range behaviour, meaning that it can properly describe bound electron-hole pairs in solids and large molecules.

At the present, the screened interaction has to be computed from a model dielectric function, given by

.

Both LHFCALC and LMODELHF must be set to .TRUE.. Also, VASP must be provided both with HFSCREEN () and AEXX () to control the range separation parameters in the model dielectric function.

Step-by-step instructions on bulk Si

Step 1: ground state with extra empty states

The starting point is a ground-state calculation which includes extra empty states, whose number is controlled in the INCAR file with the tag NBANDS. In the following example INCAR file

SYSTEM = Si
NBANDS = 12
ISMEAR = 0 ; SIGMA = 0.05
ALGO = N
LOPTICS = .TRUE.
KPAR = 4

8 empty bands are chosen (silicon has 4 occupied bands in the pseudo-potential file, thus making a total of 12 bands for NBANDS). However, with ALGO=N, VASP will employ an iterative diagonalization algorithm, meaning that the last conduction states will not be converged with the same accuracy level as the occupied states. It is possible to avoid this by setting ALGO=Exact, or by increasing the number of bands to make sure that the states which will be used in the time-propagation step are converged with the same level of accuracy.

Finally, with LOPTICS=.TRUE., VASP will compute the dipole momentum for each possible transition (recall the definition of the dipole momentum vector). These are written in the file WAVEDER, which will be used in the next step.

Mind: This calculation was performed on bulk Si (primitive cell), with a gamma-centred, 4x4x4 k-point grid, using the PBE standard pseudopotential.

Step 2: time-evolution run

Once the ground state with extra empty states is computed, the resulting WAVECAR and WAVEDER files are ready to use in a time-propagation calculation. The following will be used as an example INCAR file:

SYSTEM = Si
ALGO = TIMEEV
!Information about the bands
NBANDS = 12
NBANDSO = 4
NBANDSV = 8
!Smearing parameters
ISMEAR = 0 ; SIGMA = 0.05
!Direction of propagation
IEPSILON = 1 
!Parallelization options
KPAR = 4
!Time-propagation parameters
NELM = 2000
CSHIFT = 0.1
OMEGAMAX = 20
!Particle interactions
LHARTREE = .TRUE.
LADDER = .TRUE.
LFXC = .FALSE.
LHFCALC = .TRUE.
LMODELHF = .TRUE.
AEXX = 0.088
HFSCREEN = 1.26

Here ALGO is set to TIMEEV, meaning that VASP will now perform a time-propagation calculation.

Setting up the bands

With NBANDS=12 informs VASP that there are 12 states in total in the WAVECAR and WAVEDER. This must be consistent with Step 1! The number of occupied and unoccupied states that are used in the propagation is controlled by the NBANDSO and NBANDSV tags, respectively. To choose which bands to use it is advisable to understand the type of property that is going to be studied. For instance, in the case of optical absorption, materials are probed within a few hundreds of milli-electronvolt of the band gap. In this case it means that only states that lie close to the band extrema are important for the time-propagation.

In this example VASP will use NBANDSO=4 occupied and NBANDSV=8 unoccupied states during the time propagation. There is no need to use the total number of bands set up by NBANDS, but still NBANDSO+NBANDSV cannot be larger than NBANDS.

Setting up the time-step

VASP is now integrating a time-dependent differential equation so the time-step used to propagate the dipole moments can be specified in the INCAR. By default, VASP will use 20000 steps, however a different number can be set with the tag NELM. Nevertheless, NELM must be larger than 100, otherwise VASP will revert to the default value.

The time-step, , and maximum propagation time, , are not dependent on the size of the interacting hamiltonian matrix. However they are dependent on the system in case and the input tag CSHIFT and OMEGAMAX. This comes from the Fourier transform used to integrate the time-dependent dipole moments, which leads to and .

The tag CSHIFT also controls the width used in the plotting of the dielectric function, since

and the -function is approximated as , with CSHIFT=.

Setting CSHIFT = 0.1 ~ 0.01 is often a good choice, as lower values will lead to unnecessarily long propagation times and spectra with very narrow peaks. OMEGAMAX is automatically from the maximum energy difference between occupied and unoccupied states, but can be lowered to decrease the number of pairs used in the basis set and the size of the interacting hamiltonian.

Choosing the direction of perturbation

The dipole momentum vector is direction dependent. The direction of propagation is chosen in the INCAR with the tag IEPSILON, which can take values of 1, 2, or 3 (corresponding to x, y, and z direction, respectively), and 4 (corresponding to all directions).

While choosing a single direction of propagation decreases the computing time, it is important to pay attention to the symmetries of the material in study. For example, in the case of bulk silicon, since the material has cubic symmetry propagating along one direction (x, or y, or z) is enough. However, for a material like monolayer hexagonal boron nitride, the crystal symmetries destroy the equivalency between the x and y directions. For this system propagation should happen along both x and y, and then the dielectric function should be the average of both calculations.

Analysing the results

Once the calculation is finished, the dielectric function can be plotted by executing the following script

 #!/bin/sh
 awk 'BEGIN{i=0} /<dielectricfunction comment="time-propagation">/,\
                /<\/dielectricfunction>/ \
                 {if ($1=="<r>") {a[i]=$2 ; b[i]=($3+$4+$5)/3 ; c[i]=$4 ; d[i]=$5 ; i=i+1}} \
     END{for (j=0;j<i/2;j++) print a[j],b[j],b[j+i/2]}' vasprun.xml > optics.dat

which can be copied to a file (e.g. extract_optics.sh) in the same directory where the calculation was performed and then ran with

$ sh extract_optics.sh

This creates a file called optics.dat with three data columns. The first column is the energy of excitation, in eV. The second and third columns correspond to the imaginary and real parts of . For the example shown here, the obtained should be similar to the following image.

Imaginary part of the dielectric function

Alternatively, if VASP was compiled with hdf5 support, the results can also be plotted with py4vasp

 import py4vasp
 #replace path_to_calculation below with the path to the directory where the corresponding vaspout.h5 is located
 calc=py4vasp.Calculation.from_path("path_to_calculation")

 calc.dielectric_function.plot("TIMEEV")

which will create the following figure with both the real and imaginary part of .

Imaginary part of the dielectric function


Mind: It should be stated that this is just an example, not a converged calculation! Several numerical parameters should be checked for convergence (e.g. number of k-points, number of empty states, etc).

Comparison to other methods

VASP offers two other methods with which you can compute the macroscopic dielectric function. These are based on eigendecomposition of the two particle hamiltonian, . While more expensive than time-evolution, both these methods are able to compute eigenvalues and eigenstates of , thus providing direct access to the excitation energies of a system.

Bethe-Salpeter equation

Here the full Bethe-Salpeter equation is employed by setting ALGO=BSE. The interaction hamiltonian is built using the dielectric function from RPA, and has the right behaviour in the long range regime. This means that it can accurately describe bound excitons in solids and large molecules. However, it is more costly than time-evolution, scaling with .

Casida equation

Similar to the Bethe-Salpeter equation, the Casida equation employs an eigensolver method to compute the dielectric function. This is chosen in the INCAR with ALGO=TDHF. The key difference is that the Casida method does not require a preceding GW run to compute the RPA screening and can be performed with either DFT or hybrid-functional orbitals and energies.

Related tags and articles

NBANDSO, NBANDSV, IEPSILON, NELM, LHARTREE, LADDER, LFXC, LHFCALC, LMODELHF, AEXX, HFSCREEN

Time-dependent density-functional theory calculations

Bethe-Salpeter-equations calculations

References