Main driver for the transport calculation.
#include <elph_qe_to_phoebe_app.h>


Public Member Functions | |
| void | run (Context &context) override |
| Executes the program contained in this class. | |
| void | checkRequirements (Context &context) override |
| Check that user provided all necessary input. | |
| void | postProcessingWannier (Context &context, Crystal &crystal, PhononH0 &phononH0, Points &kPoints, Points &qPoints, int numQEBands, int numModes, int numIrrQPoints, int numElectrons, int numSpin, const Eigen::MatrixXd &energies, const Eigen::MatrixXd &kGridFull, const Eigen::Vector3i &kMesh, const Eigen::Vector3i &qMesh, bool runTests=false) |
| This is the driver for converting QE data to Phoebe data for Wannier interpolation of the el-ph coupling. More... | |
Static Public Member Functions | |
| static std::tuple< Eigen::Vector3i, Eigen::Vector3i, Eigen::MatrixXd, Eigen::MatrixXd, Eigen::MatrixXd, int, int, int, int > | readQEPhoebeHeader (Crystal &crystal, const std::string &phoebePrefixQE) |
| In this function, we read the header file produced by the patched QE version. More... | |
Static Public Member Functions inherited from App | |
| static std::unique_ptr< App > | loadApp (const std::string &choice) |
| Factory method, used to load the desired subclass. More... | |
Protected Member Functions | |
| Eigen::Tensor< std::complex< double >, 5 > | BlochToWannierEfficient (Context &context, const Eigen::MatrixXd &energies, const Eigen::MatrixXd &kGridFull, const int &numIrrQPoints, const int &numQEBands, const Eigen::MatrixXd &elBravaisVectors, const Eigen::MatrixXd &phBravaisVectors, const Eigen::Tensor< std::complex< double >, 3 > &uMatrices, Points &kPoints, Points &qPoints, Crystal &crystal, PhononH0 &phononH0) |
| std::tuple< Eigen::Tensor< std::complex< double >, 5 >, Eigen::Tensor< std::complex< double >, 3 >, Eigen::MatrixXd > | readGFromQEFile (Context &context, const int &numModes, const int &numBands, const int &numWannier, Points &kPoints, Points &qPoints, const Eigen::MatrixXd &kGridFull, const int &numIrrQPoints, const int &numQEBands, const Eigen::MatrixXd &energies) |
| Reads the electron-phonon coupling computed by QE on a coarse grid. More... | |
| std::tuple< Eigen::Tensor< std::complex< double >, 5 >, Eigen::Tensor< std::complex< double >, 3 >, Eigen::MatrixXd, Eigen::MatrixXd > | readChunkGFromQE (const int &iqIrr, Context &context, Points &kPoints, const int &numModes, const int &numQEBands, const Eigen::VectorXi &ikMap) |
| void | epaPostProcessing (Context &context, Eigen::MatrixXd &elEnergies, Points &kPoints, Points &qPoints, const int &numElectrons, const int &numSpin, const int &numModes, const int &numIrrQPoints, const int &numQEBands, const Eigen::MatrixXd &kGridFull) |
| Main driver for generating the EPA coupling. More... | |
Static Protected Member Functions | |
| static Eigen::Tensor< std::complex< double >, 5 > | blochToWannier (const Eigen::MatrixXd &elBravaisVectors, const Eigen::MatrixXd &phBravaisVectors, Eigen::Tensor< std::complex< double >, 5 > &gFull, const Eigen::Tensor< std::complex< double >, 3 > &uMatrices, const Eigen::Tensor< std::complex< double >, 3 > &phEigenvectors, Points &kPoints, Points &qPoints, Crystal &crystal, PhononH0 &phononH0) |
| Transform the electron-phonon coupling computed by QE from the Bloch to the Wannier representation. More... | |
| static Eigen::Tensor< std::complex< double >, 3 > | setupRotationMatrices (const std::string &wannierPrefix, Points &fullPoints) |
| Returns the rotation that moves the wave-function from the (entangled) Bloch representation to the disentangled Wannier representation. More... | |
| static int | computeOffset (const Eigen::MatrixXd &energies, const std::string &wannierPrefix) |
| This method compares the energies computed by qe2wannier90 and the energies of quantum espresso pw.x, to compute the offset between the two sets (wannier90 may skip some core states). | |
| static void | testElectronicTransform (Points &kPoints, const std::string &wannierPrefix, const Eigen::MatrixXd &elBravaisVectors, const Eigen::Tensor< std::complex< double >, 3 > &uMatrices, const Eigen::VectorXd &elDegeneracies, ElectronH0Wannier &electronH0) |
| Test that the transform Wannier To Bloch of the electronic Hamiltonian returns the original results computed by QE/Wannier90 on a coarse grid. More... | |
| static void | testPhononTransform (Crystal &crystal, PhononH0 &phononH0, Points &qPoints, const Eigen::Tensor< std::complex< double >, 3 > &phEigenvectors, const Eigen::MatrixXd &phBravaisVectors, const Eigen::VectorXd &phDegeneracies, const Eigen::MatrixXd &phEnergies) |
| Test that the transform Wannier To Bloch of the phonon harmonic Hamiltonian returns the original results computed by QE on a coarse grid. More... | |
| static void | testBackTransform (Context &context, PhononH0 &phononH0, Points &kPoints, Points &qPoints, ElectronH0Wannier &electronH0, Crystal &crystal, Eigen::Tensor< std::complex< double >, 5 > &gFull) |
| Test that the transform Wannier To Bloch of the electron-phonon coupling returns the original results computed by QE on a coarse grid, and that it is correctly computed tby the class InteractionElPh. More... | |
| static void | writeWannierCoupling (Context &context, Eigen::Tensor< std::complex< double >, 5 > &gWannier, const int &numFilledWannier, const int &numSpin, const int &numModes, const int &numWannier, const Eigen::VectorXd &phDegeneracies, const Eigen::VectorXd &elDegeneracies, const Eigen::MatrixXd &phBravaisVectors, const Eigen::MatrixXd &elBravaisVectors, const Eigen::Vector3i &qMesh, const Eigen::Vector3i &kMesh) |
| This function writes the el-ph coupling to file. More... | |
Static Protected Member Functions inherited from App | |
| static void | throwErrorIfUnset (const std::string &x, const std::string &name) |
| static void | throwErrorIfUnset (const std::vector< std::string > &x, const std::string &name) |
| static void | throwErrorIfUnset (const double &x, const std::string &name) |
| static void | throwErrorIfUnset (const Eigen::VectorXi &x, const std::string &name) |
| static void | throwErrorIfUnset (const Eigen::Vector3i &x, const std::string &name) |
| static void | throwErrorIfUnset (const Eigen::VectorXd &x, const std::string &name) |
| static void | throwErrorIfUnset (const Eigen::MatrixXd &x, const std::string &name) |
| static void | throwErrorIfUnset (const Eigen::Tensor< double, 3 > &x, const std::string &name) |
| static void | throwWarningIfUnset (const std::string &x, const std::string &name) |
Protected Attributes | |
| std::vector< std::string > | choices |
|
staticprotected |
Follows roughly the procedure described in [PRB 76, 165108 (2007)]. This is the expensive function of this app.
| elBravaisVectors | list of Bravais lattice vectors for the electronic Fourier transform |
| phBravaisVectors | list of Bravais lattice vectors for the phonon Fourier transform |
| gFull | electron-phonon coupling in the Bloch space, with size gFull(nBands, nBands, nModes, nKPoints, nQPoints), where in the notation of [PRB 76, 165108 (2007)], is g(i,j,nu,k,q) = g_{i,j,nu}(k,q) |
| uMatrices | the matrices for the rotation to the maximally localized basis set of Wannier functions. Has size U(nBands,nWannier,k). Note that there can be more bands than Wannier functions due to the disentanglement procedure of Wannier90. |
| phEigenvectors | tensor (nu,mu,q) with the phonon eigenvectors, where the first index is the index on cartesian and atomic basis, the second is the index on phonon modes, and the third is on q-points. |
| kPoints | FullPoints class of k-points. |
| qPoints | FullPoints class of q-points. |
| crystal | class describing the crystal unit cell. |
| phononH0 | class with the Phonon harmonic Hamiltonian. |


|
protected |
UNTESTED!


| void ElPhQeToPhoebeApp::postProcessingWannier | ( | Context & | context, |
| Crystal & | crystal, | ||
| PhononH0 & | phononH0, | ||
| Points & | kPoints, | ||
| Points & | qPoints, | ||
| int | numQEBands, | ||
| int | numModes, | ||
| int | numIrrQPoints, | ||
| int | numElectrons, | ||
| int | numSpin, | ||
| const Eigen::MatrixXd & | energies, | ||
| const Eigen::MatrixXd & | kGridFull, | ||
| const Eigen::Vector3i & | kMesh, | ||
| const Eigen::Vector3i & | qMesh, | ||
| bool | runTests = false |
||
| ) |
| context | class with user input values. |
| crystal | class describing crystal unit cell. |
| phononH0 | class with the phonon harmonic Hamiltonian. |
| kPoints | coarse grid of k-points used by QE. |
| qPoints | coarse grid of q-points used by QE. Equal to kPoints. |
| numQEBands | number of Kohn-Sham states used by QE. |
| numModes | number of phonon modes = 3*numAtoms. |
| numIrrQPoints | number of irreducible q-points computed by QE. |
| numElectrons | number of electrons in the crystal unit cell. |
| numSpin | number of spin components used by QE. |
| energies | matrix with electronic energies. |
| kGridFull | list of k-point cartesian coordinates in Bohr^-1. |
| kMesh | mesh of k-points used by QE. |
| qMesh | mesh of q-points used by QE. |
| runTests | if true (*default False) runs some sanity checks. |


|
protected |
Note: numQEBands != numBands. The first is the number of bands computes in QE, while the latter is the number of bands passed to Wannier90.
Note: we pass kGridFull because we need to align the list of kPoints used by QE with the "list" of kPoints of Phoebe.
| context | class with user input. |
| numModes | number of phonon modes. |
| numBands | number of bands used in QE |
| numWannier | number of Wannier functions |
| kPoints | FullPoints class with kPoints |
| qPoints | FullPoints class with qPoints |
| kGridFull | list of kPoints in cartesian coordinates in QE |
| numIrrQPoints | number of irreducible qPoints used by QE |
| numQEBands | number of KS bands used by QE. |
| energies | matrix with electronic energies |


|
static |
The header contains some global and/or electronic information coming from Quantum-ESPRESSO.
| crystal | class with the crystal info, |
| phoebePrefixQE | prefix of file, e.g. "si" corresponds to the file "si.phoebe.****.dat" |


|
staticprotected |
| wannierPrefix | path with the prefix used for the Wannier90 calculation (e.g. "si" or "./si") |
| fullPoints | coarse grid of wavevectors. Must be aligned with the grid used in Wannier90 or an error will be raised. |


|
staticprotected |
This is the important test of el-ph Wannier interpolation We compute the band structure Read the el-ph interaction from file Check that the el-ph coupling, interpolated on the same initial grid, is the same of the el-ph coupling read from QE.


|
staticprotected |
This is a simple test: 1) Fourier Transform the electronic Hamiltonian to Wannier representation Here I use the U matrices from file 2) FT back to Bloch representation, using the U matrices from ElectronH0 on the original grid of k-points If everything works, I expect to find the same electronic energies Phases of rotation matrices in the back-FT will be random.


|
staticprotected |
Like the test above, we 1) FT to real space phonon basis representation. Since these are force constants, they should be real. 2) FT back to Bloch space and check that we find the same results.
We also verify that the eigenvectors are normalized by masses Note that the test works fine for non-polar systems.


|
staticprotected |
There are three modes of writing file. 1) plain text file. The slowest option, but we allow the user to not use the HDF5 file format. 2) HDF5 v1 (default and preferred). The el-ph tensor is written to a single dataspace. if compiled with parallel HDf5, the write operation is done in parallel. Note that we do the write operation in bunches of siez ~2Gb. This is done to avoid a limitation of the MPI library, which has problem when offsets to the tensor become > max(INT_32). 3) HDF5 v2. The el-ph tensor is split along the R_e index into different datasets. This format has been introduced because we suspect the HDF5 library has limitations when the electron-phonon tensor is very large. We suspect this happens when the tensor size > max(UINT_32).

