Time-evolution algorithm: Difference between revisions

From VASP Wiki
No edit summary
 
(97 intermediate revisions by 3 users not shown)
Line 1: Line 1:
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. 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. This method comes from the fact that the computation of the dielectric function can be reformulated as a time-propagation problem, instead of an eigenvalue equation. Below we present a brief description of the method, as well as the relevant {{TAG|INCAR}} variables.
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|mind| This feature is only available for 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 starting point is that one can re-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_{ij}(\omega)=\delta_{ij}-\frac{4\pi e^2}{\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^j_{cv\mathbf{k}}| \xi^i_{cv\mathbf{k}}(t)\rangle+ \mathrm{c.c.}\right) e^{-\mathrm i(\omega-\mathrm 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 \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
::<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 fundamental aspect behind this transformation is that the new, time-dependent vector <math>\left.\mid \xi^j(t)\right\rangle</math> follows the equation


with the initial vector elements given by <math>\left|\xi^j(0)\right\rangle=\left|\mu^j\right\rangle</math>. 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.
::<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. 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>.


By propagating the projection of <math>\mu^i</math> onto <math>\xi^j(t)</math> at each instant, <math>c_{cv\mathbf k}^{ij}(t)</math>, VASP can compute the dielectric response along different directions (<math>i,j=x,y,z</math>) by evaluating the Fourier transform of each time-dependent coefficient.  
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>.
{{NB|mind| Since the problem is now a time-dependent equation, there is no computation of eigenvalues and eigenvectors of the two-particle Hamiltonian, unlike what happens in the [[Bethe-Salpeter-equations_calculations|Bethe-Salpeter formulation]].}}


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: while for cubic systems it is enough to compute <math>\epsilon_{xx}(\omega)</math>, for 2D systems (eg. monolayer 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. This assuming that the <math>(001)</math> direction is perpendicular to the plane in which the atoms are laid.  
==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>).


Users should note that 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. Also, if the interest is to compare time-evolution results with data coming from BSE/TDDFT calculations, users should set the same values for {{TAG|NBANDSO}} and {{TAG|NBANDSV}} in both calculations.  
==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.}}


Finally, 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.
===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.


==Levels of approximation for the exchange-correlation potential==
===Hartree exchange potential===
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.


The interaction between electrons and holes can be controlled at three levels of approximation, depending on the input provided by the user. They are controlled by the {{TAG|INCAR}} variables, {{TAG|LADDER}}, {{TAG|LHARTREE}}, and {{TAG|LFXC}}. In this section we provide a brief description and some advice on when to use them.
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.


===Independent particle approximation (IPA)===
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]].
This is the default setting of VASP, when all three tags are missing. Users can use this setup to perform checks on whether or not all necessary files are present and correct, by comparing the obtained spectrum with that computed in the DFT step with {{TAG|LOPTICS}}=.TRUE.


===LFXC: activation of the exchange-correlation kernel===
===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.  


The accuracy of local exchange-correlation kernels when compared to experimental data if often limited to molecules up to around 100-200 atoms. As these kernels often lack the long range component that goes as <math>-1/q^2</math> (where <math>q</math> is the momentum difference between the electron and the hole), they fail to properly reproduce the binding energies of electron-hole pairs in periodic systems or very large molecules.
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.
{{NB|mind|If none of the three tags are present, VASP will perform a TD-DFT calculation by default!}}


===LADDER: activation of the screened exchange interaction===  
====Ladder diagrams from many-body perturbation theory====
By setting {{TAG|LADDER}}=.TRUE., users can turn on the inclusion of the ladder diagrams, which account for what are usually called excitonic effects. These come from the screened exchange interaction potential, <math>W(\mathbf r,\mathbf r';\omega)</math> and have the right long-range behaviour, allowing for the formation of bound electron-hole pairs in bulk materials.
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.  


At the present, the screened interaction has to be computed from a [[Improving_the_dielectric_function#Model-BSE|model dielectric function]]. Users should add the following tags to the {{TAG|INCAR}} file
At the present, the screened interaction has to be computed from a [[Improving_the_dielectric_function#Model-BSE|model dielectric function]], given by


:<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>.


{{TAG|HFCALC}} = .TRUE.
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|LMODELHF}} = .TRUE.
{{TAG|HFSCREEN}} = 1.26
{{TAG|AEXX}} = 0.1


==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 {{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.


and it is also advisable to check the recommended values of {{TAG|HFSCREEN}} and {{TAG|AEXX}} for specific materials on the page of each respective tag.  
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.
{{NB|mind|This calculation was performed on bulk Si (primitive cell), with a gamma-centred, 4x4x4 k-point grid, using the PBE standard pseudopotential.}}


For small molecules the inclusion of ladder diagrams is often unnecessary, but the long range interaction becomes important for large molecules.
===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.  


===LHARTREE: activation of the unscreened Coulomb interaction===
====Setting up the bands====
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 (MBPT). 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 {{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.  


==Choice of time-step==
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}}.
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==
====Setting up the time-step====
===Run-level===
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.
{{TAG|ALGO}} = TIMEEV - sets the calculation type to a time-evolution run.


===Choice of bands===
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>.  
{{TAG|NBANDSO}} - number of occupied (valence) bands to be included.


{{TAG|NBANDSV}} - number of virtual (conduction) bands to be included.
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>.


===Approximations to the potential===
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.
{{TAG|LADDER}} - include or exclude screened exchange interaction (i.e. ladder diagrames) in the Hamiltonian.


{{TAG|LHARTREE}} - include or exclude the Hartree exchange terms (i.e. bubble diagrams) in the 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).  


{{TAG|LFXC}} - include or exclude the <math>f_\mathrm{xc}</math> kernel in the time-propagation.
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.
{{TAG|AEXX}} - controls the fraction of exchange functional that is included in the <math>f_\mathrm{xc}</math>.


===Time-propagation and spectrum===
===Analysing the results===
{{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.
Once the calculation is finished, the dielectric function can be plotted by executing the following script


{{TAG|IEPSILON}} - sets up the directions along which the dielectric function is computed.
<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>


{{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).
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


{{TAG|OMEGAMAX}} - maximum frequency (in eV) for which the dielectric function is computed.
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.


==TIMEEV versus TDHF==
[[File:TIMEEV_bulk_Si_dielectric_function.png|600px|middle|Imaginary part of the dielectric function]]
VASP provides another algorithm with which users can compute the macroscopic dielectric function, {{TAG|TDHF}}. Here however, the problem is formulated in terms of an eigenvalue decomposition via the Casida equation. Both approaches are equivalent, although {{TAG|TIMEEV}} is faster for adiabatic LDA and PBE, while {{TAG|TDHF}} is faster for hybrid functionals.


== Example ==
Alternatively, if VASP was compiled with hdf5 support, the results can also be plotted with py4vasp
<syntaxhighlight lang="bash" line>
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")


A typical calculation requires two steps. First, a ground state calculation:
calc.dielectric_function.plot("TIMEEV")
</syntaxhighlight>
which will create the following figure with both the real and imaginary part of <math>\epsilon(\omega)</math>.


{{TAGBL|SYSTEM}} = Si
[[File:TIMEEV_bulk_Si_dielectric_function_py4vasp.png|600px|middle|Imaginary part of the dielectric function]]
{{TAGBL|NBANDS}} = 12 ! even 8 bands suffice for Si
{{TAGBL|ISMEAR}} = 0 ; {{TAGBL|SIGMA}} = 0.05
{{TAGBL|ALGO}} = N
{{TAGBL|LOPTICS}} = .TRUE.
{{TAGBL|KPAR}} = 4    ! assuming we run on 4 cores, this will be the fastest


{{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).}}


Second, the actual time propagation:
==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, <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|SYSTEM}} = Si
===Bethe-Salpeter equation===
{{TAGBL|NBANDS}} = 12  ! even 8 bands suffice for Si
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|ISMEAR}} = 0 ; {{TAGBL|SIGMA}} = 0.05
===Casida equation===
{{TAGBL|ALGO}} = TIMEEV
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|IEPSILON}} = 1 ! cubic system, so response in x direction suffices
{{TAGBL|NBANDSO}} = 4  ; {{TAGBL|NBANDSV}} = 8  ;  {{TAGBL|CSHIFT}} = 0.1
{{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 variables and articles ==
[[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: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