Electron-phonon potential from supercells: Difference between revisions

From VASP Wiki
(→‎VASP and phelel: Change LWAP to ELPH_PREPARE)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{elph release}}
The computation of the electron-phonon potential, <math>\partial_{\nu \mathbf{q}} V(\mathbf{r})</math>, is a prerequisite for the calculation of the electron-phonon matrix element:
The computation of the electron-phonon potential, <math>\partial_{\nu \mathbf{q}} V(\mathbf{r})</math>, is a prerequisite for the calculation of the electron-phonon matrix element:
::<math>
::<math>
Line 6: Line 4:
\equiv
\equiv
\langle
\langle
\psi_{m \mathbf{k} + \mathbf{q}} |
\psi_{m \mathbf{k} - \mathbf{q}} |
\partial_{\nu \mathbf{q}} V |
\partial_{\nu \mathbf{q}} V |
\psi_{n \mathbf{k}}
\psi_{n \mathbf{k}}
Line 12: Line 10:
.
.
</math>
</math>
In the [[missing|direct interpolation approach]], <math>\partial_{\nu \mathbf{q}} V</math> is computed from a supercell calculation by means of Fourier interpolation while the Bloch orbitals, <math>\psi_{n \mathbf{k}}(\mathbf{r})</math>, are computed directly in the primitive cell.
<math>\partial_{\nu \mathbf{q}} V</math> is computed from a supercell calculation by means of Fourier interpolation while the Bloch orbitals, <math>\psi_{n \mathbf{k}}(\mathbf{r})</math>, are computed directly in the primitive cell.
Naturally, this process involves multiple VASP calculations in different cells, which can introduce additional complexities compared to just a single execution of VASP.
The supercell calculation and the primitive-cell calculation are performed in two separate VASP runs.
This page tries to give a high-level overview of the general workflow associated with electron-phonon calculations using the [[missing|direct interpolation approach]].
This page provides an overview of the supercell calculation and how the electron-phonon potential can be calculated.
{{NB|tip|The entire workflow of initializing a calculation, computing the electron-phonon potential in the supercell and performing subsequent electron-phonon calculations in the primitive cell can be facilitated by the [https://missing velph] command-line tool. It helps guide you through the process step by step and ensures a certain level of consistency between the required VASP calculations.}}
For information regarding the electron-phonon calculation in the primitive cell, consult the documentation on [[Bandgap renormalization due to electron-phonon coupling|phonon-induced bandstructure renormalization]] and on [[Transport coefficients including electron-phonon scattering|phonon-mediated transport]].
{{NB|tip|The entire workflow of initializing a calculation, computing the electron-phonon potential in the supercell and performing subsequent electron-phonon calculations in the primitive cell can be facilitated by <tt>velph</tt>. <tt>velph</tt> is a command-line tool included in the [https://github.com/phonopy/phelel phelel] python package. It helps guide you through the process step by step and ensures a certain level of consistency between the required VASP calculations.}}


== Finite displacements in the supercell ==
== Finite displacements in the supercell ==
Line 23: Line 22:
Usually, converging the phonon frequencies is a good way of finding a supercell that is sufficiently large.
Usually, converging the phonon frequencies is a good way of finding a supercell that is sufficiently large.
Polar materials can exhibit long-range electrostatic interactions that go beyond reasonable supercell sizes.
Polar materials can exhibit long-range electrostatic interactions that go beyond reasonable supercell sizes.
In this case, a [[missing|correction scheme]] exists that explicitly treats the long-range dipole interactions and works with smaller cells.
In this case, a [[Bandgap renormalization due to electron-phonon coupling#Special treatment of the dipole interaction for polar materials|correction scheme]] exists that explicitly treats the long-range dipole interactions and works with smaller cells.
More information can be found on the [[missing|theory page]].


Currently, there are two complementary ways to calculate the electron-phonon potential.
Currently, there are two complementary ways to calculate the electron-phonon potential.
One relies solely on VASP, while the other uses VASP in combination with the [https://github.com/phonopy/phelel phelel] python package.
One relies solely on VASP, while the other uses VASP in combination with [https://github.com/phonopy/phelel phelel].
Both approaches calculate the derivative of the Kohn-Sham potential in real space via the displacement of atoms.
Both approaches calculate the derivative of the Kohn-Sham potential in real space via the displacement of atoms.
However, they may differ in terms of flexibility and computational performance.
However, they may differ in terms of flexibility and computational performance.
Line 34: Line 32:
Regardless of which approach is chosen, the output is always written to the {{FILE|phelel_params.hdf5}} binary file.
Regardless of which approach is chosen, the output is always written to the {{FILE|phelel_params.hdf5}} binary file.
This file can then be read during a VASP calculation in the primitive unit cell to compute electron-phonon interactions.
This file can then be read during a VASP calculation in the primitive unit cell to compute electron-phonon interactions.
For more information on how to perform specific electron-phonon calculations, visit [[missing]].


=== VASP internal driver ===
=== VASP internal driver ===


This way of calculating the electron-phonon potential is activated by setting {{TAGO|PHELEL_WRITE|True}} in the {{FILE|INCAR}} file.
This way of calculating the electron-phonon potential is activated by setting {{TAGO|ELPH_POT_GENERATE|True}} in the {{FILE|INCAR}} file.
It utilizes the VASP-internal finite-difference driver that is activated by setting {{TAGO|IBRION|6}} in the {{FILE|INCAR}} file.
It utilizes the VASP-internal finite-difference driver that is activated by setting {{TAGO|IBRION|6}} in the {{FILE|INCAR}} file.
The atomic displacement directions are automatically determined by VASP.
The atomic displacement directions are automatically determined by VASP.
Line 44: Line 41:
This is the same procedure used to calculate [[phonons from finite differences]] and many of the same considerations regarding performance and accuracy apply in this case.
This is the same procedure used to calculate [[phonons from finite differences]] and many of the same considerations regarding performance and accuracy apply in this case.
Therefore, phonon frequencies are a great way to test the convergence with respect to supercell size.
Therefore, phonon frequencies are a great way to test the convergence with respect to supercell size.
{{NB|mind|Currently, VASP generates more displacements with {{TAGO|PHELEL_WRITE|True}} and {{TAGO|IBRION|6}} than would be required in principle. This will be improved in a future version of the code.}}
{{NB|mind|Currently, VASP generates more displacements with {{TAGO|ELPH_POT_GENERATE|True}} and {{TAGO|IBRION|6}} than would be required in principle. This will be improved in a future version of the code.}}


Once the electron-phonon potential is obtained, it is automatically mapped to the primitive cell.
Once the electron-phonon potential is obtained, it is automatically mapped to the primitive cell.
Line 77: Line 74:
----------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------
</pre>
</pre>
It is possible to choose a different primitive unit cell by explicitly specifying its lattice vectors using the {{TAG|PHELEL_LATTICE}} {{FILE|INCAR}} tag.
It is possible to choose a different primitive unit cell by explicitly specifying its lattice vectors using the {{TAG|ELPH_POT_LATTICE}} {{FILE|INCAR}} tag.
{{NB|mind|The cell specified via {{TAG|PHELEL_LATTICE}} must be a valid primitive cell of the underlying lattice.}}
{{NB|mind|The cell specified via {{TAG|ELPH_POT_LATTICE}} must be a valid primitive cell of the underlying lattice.}}


In order to map the electron-phonon potential from the supercell to the primitive cell, it is currently necessary to specify the FFT grid dimensions ({{TAG|NGX}}, {{TAG|NGY}}, {{TAG|NGZ}}) of the primitive cell that will be used in the final electron-phonon calculation.
In order to map the electron-phonon potential from the supercell to the primitive cell, it is currently necessary to specify the FFT grid dimensions ({{TAG|NGX}}, {{TAG|NGY}}, {{TAG|NGZ}}) of the primitive cell that will be used in the final electron-phonon calculation.
Once a suitable FFT grid has been determined for the primitive cell, it can be supplied via {{TAG|PHELEL_FFT_MESH}}.
Once a suitable FFT grid has been determined for the primitive cell, it can be supplied via {{TAG|ELPH_POT_FFT_MESH}}.
The electron-phonon potential is then Fourier interpolated onto the supplied FFT grid.
The electron-phonon potential is then Fourier interpolated onto the supplied FFT grid.


Line 90: Line 87:
In general, this allows for greater flexibility.
In general, this allows for greater flexibility.
Here, we demonstrate a common workflow that suffices for most purposes.
Here, we demonstrate a common workflow that suffices for most purposes.
For a complete list of features, we refer to the documentation of [https://github.com/phonopy/phelel phelel] or [https://missing velph].
For a complete list of features, we refer to the documentation of [https://github.com/phonopy/phelel phelel].


As an example,
As an example,
Line 101: Line 98:
In addition, the file <tt>SPOSCAR</tt> is created which contains the supercell geometry in equilibrium.
In addition, the file <tt>SPOSCAR</tt> is created which contains the supercell geometry in equilibrium.


For each of the generated POSCAR files, create a separate directory and run VASP there with {{TAGO|LWAP|True}} set in the {{FILE|INCAR}} file.
For each of the generated POSCAR files, create a separate directory and run VASP there with {{TAGO|ELPH_PREPARE|True}} set in the {{FILE|INCAR}} file.
This setting instructs VASP to write the potential as well as other important information to disk.
This setting instructs VASP to write the potential as well as other important information to disk.
Finally, run phelel to combine all the data from the individual directories to obtain the electron-phonon potential, for example,
Finally, run phelel to combine all the data from the individual directories to obtain the electron-phonon potential, for example,
Line 111: Line 108:
The electron-phonon potential is Fourier interpolated from the FFT grid in the supercell to the supplied grid via a non-uniform FFT.
The electron-phonon potential is Fourier interpolated from the FFT grid in the supercell to the supplied grid via a non-uniform FFT.
The results are written to the {{FILE|phelel_params.hdf5}} file.
The results are written to the {{FILE|phelel_params.hdf5}} file.
[[Category:Electron-phonon interactions]][[Category:Howto]]

Latest revision as of 15:54, 19 December 2024

The computation of the electron-phonon potential, , is a prerequisite for the calculation of the electron-phonon matrix element:

is computed from a supercell calculation by means of Fourier interpolation while the Bloch orbitals, , are computed directly in the primitive cell. The supercell calculation and the primitive-cell calculation are performed in two separate VASP runs. This page provides an overview of the supercell calculation and how the electron-phonon potential can be calculated. For information regarding the electron-phonon calculation in the primitive cell, consult the documentation on phonon-induced bandstructure renormalization and on phonon-mediated transport.

Tip: The entire workflow of initializing a calculation, computing the electron-phonon potential in the supercell and performing subsequent electron-phonon calculations in the primitive cell can be facilitated by velph. velph is a command-line tool included in the phelel python package. It helps guide you through the process step by step and ensures a certain level of consistency between the required VASP calculations.

Finite displacements in the supercell

The electron-phonon potential is computed from finite atomic displacements in a sufficiently large supercell. In this case, sufficient means that the effects of an atomic displacement become negligible at about half the supercell size. Usually, converging the phonon frequencies is a good way of finding a supercell that is sufficiently large. Polar materials can exhibit long-range electrostatic interactions that go beyond reasonable supercell sizes. In this case, a correction scheme exists that explicitly treats the long-range dipole interactions and works with smaller cells.

Currently, there are two complementary ways to calculate the electron-phonon potential. One relies solely on VASP, while the other uses VASP in combination with phelel. Both approaches calculate the derivative of the Kohn-Sham potential in real space via the displacement of atoms. However, they may differ in terms of flexibility and computational performance. Below, we describe the general workflow of each approach and highlight their advantages and disadvantages.

Regardless of which approach is chosen, the output is always written to the phelel_params.hdf5 binary file. This file can then be read during a VASP calculation in the primitive unit cell to compute electron-phonon interactions.

VASP internal driver

This way of calculating the electron-phonon potential is activated by setting ELPH_POT_GENERATE = True in the INCAR file. It utilizes the VASP-internal finite-difference driver that is activated by setting IBRION = 6 in the INCAR file. The atomic displacement directions are automatically determined by VASP. As usual, POTIM and NFREE can be used to control the displacement amount and finite-difference stencil, respectively. This is the same procedure used to calculate phonons from finite differences and many of the same considerations regarding performance and accuracy apply in this case. Therefore, phonon frequencies are a great way to test the convergence with respect to supercell size.

Mind: Currently, VASP generates more displacements with ELPH_POT_GENERATE = True and IBRION = 6 than would be required in principle. This will be improved in a future version of the code.

Once the electron-phonon potential is obtained, it is automatically mapped to the primitive cell. The results are stored in the phelel_params.hdf5 file. By default, the primitive cell is the one determined by VASP during the supercell calculation. You can find this information in the OUTCAR file. For example, here is the relevant section for a diamond structure:

----------------------------------------------------------------------------------------

                                     Primitive cell

  volume of cell :      11.1771

  direct lattice vectors                    reciprocal lattice vectors
     1.774598550  1.774598550  0.000000000     0.281753865  0.281753865 -0.281753865
     0.000000000  1.774598550  1.774598550    -0.281753865  0.281753865  0.281753865
     1.774598550  0.000000000  1.774598550     0.281753865 -0.281753865  0.281753865

  length of vectors
     2.509661338  2.509661338  2.509661338     0.488012009  0.488012009  0.488012009

  position of ions in fractional coordinates (direct lattice)
     0.000000000  0.000000000  0.000000000
     0.250000000  0.250000000  0.250000000

  ion indices of the primitive-cell ions
   primitive index   ion index
                 1           1
                 2           9

----------------------------------------------------------------------------------------

It is possible to choose a different primitive unit cell by explicitly specifying its lattice vectors using the ELPH_POT_LATTICE INCAR tag.

Mind: The cell specified via ELPH_POT_LATTICE must be a valid primitive cell of the underlying lattice.

In order to map the electron-phonon potential from the supercell to the primitive cell, it is currently necessary to specify the FFT grid dimensions (NGX, NGY, NGZ) of the primitive cell that will be used in the final electron-phonon calculation. Once a suitable FFT grid has been determined for the primitive cell, it can be supplied via ELPH_POT_FFT_MESH. The electron-phonon potential is then Fourier interpolated onto the supplied FFT grid.

VASP and phelel

In this approach to calculating the electron-phonon potential, the ionic displacements are determined externally using phelel. For people who are familiar with phonon calculations using VASP and phonopy, this workflow will look very familiar. In general, this allows for greater flexibility. Here, we demonstrate a common workflow that suffices for most purposes. For a complete list of features, we refer to the documentation of phelel.

As an example,

phelel -d --dim 2 2 2 -c POSCAR-unitcell --pm

automatically determines displacement directions for a 2x2x2 supercell based on symmetry considerations.

Tip: We recommend the use of the --pm option, which generates positive and negative displacements for each displacement direction.

For each displacement, phelel creates a corresponding supercell POSCAR file (POSCAR-XXX, where XXX labels the different displacements). In addition, the file SPOSCAR is created which contains the supercell geometry in equilibrium.

For each of the generated POSCAR files, create a separate directory and run VASP there with ELPH_PREPARE = True set in the INCAR file. This setting instructs VASP to write the potential as well as other important information to disk. Finally, run phelel to combine all the data from the individual directories to obtain the electron-phonon potential, for example,

phelel --fft-mesh 18 18 18 --cd perfect/ disp-001/ disp-002/

Here, perfect, disp-001 and disp-002 are the directories corresponding to the equilibrium and displaced supercell calculations, respectively. --fft-mesh specifies the FFT grid dimensions (NGX, NGY, NGZ) to be used in the final electron-phonon calculation in the primitive cell. The electron-phonon potential is Fourier interpolated from the FFT grid in the supercell to the supplied grid via a non-uniform FFT. The results are written to the phelel_params.hdf5 file.