Class for diagonalizing electronic energies with the Wannier interpolation The object is built passing the information produced by the file _tb.dat of Wannier90, and can be used to compute the interpolated band structure.
#include <electron_h0_wannier.h>


Public Member Functions | |
| ElectronH0Wannier (const Eigen::Matrix3d &directUnitCell_, const Eigen::MatrixXd &bravaisVectors_, const Eigen::VectorXd &vectorsDegeneracies_, const Eigen::Tensor< std::complex< double >, 3 > &h0R_, const Eigen::Tensor< std::complex< double >, 4 > *rMatrix_=nullptr) | |
| Constructor for the electronic Hamiltonian in the Wannier case. More... | |
| ElectronH0Wannier (const ElectronH0Wannier &that) | |
| Copy constructor. | |
| ElectronH0Wannier & | operator= (const ElectronH0Wannier &that) |
| Copy assignment. | |
| ~ElectronH0Wannier () | |
| Class destructor. | |
| Particle | getParticle () override |
| Method to return that the underlying is that of an electronic Fermion. | |
| int | getNumBands () override |
| get the total number of bands. More... | |
| std::tuple< Eigen::VectorXd, Eigen::MatrixXcd > | diagonalize (Point &point) override |
| get the electronic energies (in Ry) at a single k-point. More... | |
| std::tuple< Eigen::VectorXd, Eigen::MatrixXcd > | diagonalizeFromCoordinates (Eigen::Vector3d &k) override |
| Diagonalize the Harmonic Hamiltonian at an arbitrary wavevector. More... | |
| std::tuple< std::vector< Eigen::VectorXd >, std::vector< Eigen::MatrixXcd > > | batchedDiagonalizeFromCoordinates (std::vector< Eigen::Vector3d > &cartesianWavevectors) |
| Computes energies and eigenvectors of electrons for a batch of nk wavevectors. More... | |
| std::vector< Eigen::MatrixXcd > | batchedBuildHamiltonians (std::vector< Eigen::Vector3d > &cartesianWavevectors) |
| Computes the Fourier transform of the Wannier Hamiltonian at a batch of wavevectors. More... | |
| StridedComplexView3D | kokkosBatchedBuildBlochHamiltonian (const DoubleView2D &cartesianCoordinates) override |
| Computes the Fourier transform of the Wannier Hamiltonian at a batch of wavevectors. More... | |
| std::tuple< DoubleView2D, StridedComplexView3D > | kokkosBatchedDiagonalizeFromCoordinates (const DoubleView2D &cartesianCoordinates, const bool withMassScaling=true) override |
| Computes energies and eigenvectors of electrons for a batch of nk wavevectors. More... | |
| std::tuple< DoubleView2D, StridedComplexView3D, ComplexView4D > | kokkosBatchedDiagonalizeWithVelocities (const DoubleView2D &cartesianCoordinates) override |
| Using kokkos, computes the electronic properties of a batch of wavevectors. More... | |
| Eigen::Tensor< std::complex< double >, 3 > | diagonalizeVelocity (Point &point) override |
| get the electron velocities (in atomic units) at a single k-point. More... | |
| Eigen::Tensor< std::complex< double >, 3 > | diagonalizeVelocityFromCoordinates (Eigen::Vector3d &coordinates) override |
| std::tuple< std::vector< Eigen::VectorXd >, std::vector< Eigen::MatrixXcd >, std::vector< Eigen::Tensor< std::complex< double >, 3 > > > | batchedDiagonalizeWithVelocities (std::vector< Eigen::Vector3d > cartesianCoordinates) |
| Same as diagonalizeVelocityFromCoordinates, but constructs the velocity operator for a batch of wavevectors. More... | |
| FullBandStructure | populate (Points &fullPoints, const bool &withVelocities, const bool &withEigenvectors, const bool isDistributed=false) override |
| This method constructs an electron band structure. More... | |
| std::tuple< std::vector< Eigen::VectorXd >, std::vector< Eigen::MatrixXcd >, std::vector< Eigen::Tensor< std::complex< double >, 3 > > > | populate (const std::vector< Eigen::Vector3d > &cartesianCoordinates, const bool &withVelocities, const bool &withEigenvectors) |
| Runs populate on a points list, without creating a new bandstructure object this is necessary if we need energies for some non-uniform grid of points currently this only used by the phonon electron scattering calculation. More... | |
| FullBandStructure | cpuPopulate (Points &fullPoints, const bool &withVelocities, const bool &withEigenvectors, const bool isDistributed=false) |
| Internal helper function for cpu diag of electron H0. | |
| std::tuple< std::vector< Eigen::VectorXd >, std::vector< Eigen::MatrixXcd >, std::vector< Eigen::Tensor< std::complex< double >, 3 > > > | kokkosPopulate (const std::vector< Eigen::Vector3d > &cartesianCoordinates, const bool &withVelocities, const bool &withEigenvectors, const std::vector< int > &iks) |
| Internal helper function for kokkos diag of electron H0. | |
| std::vector< Eigen::MatrixXcd > | getBerryConnection (Point &point) |
| compute the Berry connection <u_mk| nabla_k |u_nk> at arb. More... | |
| void | addShiftedVectors (Eigen::Tensor< double, 3 > degeneracyShifts_, Eigen::Tensor< double, 5 > vectorsShifts_) |
| Function used during parsing, to add the shifts used in the phases for the Fourier interpolation. More... | |
| int | estimateBatchSize (const bool &withVelocity) override |
| Estimate how many k-points we can compute on the GPU in one batch. More... | |
Public Member Functions inherited from HarmonicHamiltonian | |
| void | kokkosBatchedTreatDegenerateVelocities (const DoubleView2D &cartesianCoordinates, const DoubleView2D &resultEnergies, ComplexView4D &resultVelocities, const double &threshold) |
Protected Member Functions | |
| double | getDeviceMemoryUsage () |
| Checks the size of Device-allocated views. More... | |
Protected Attributes | |
| Particle | particle |
| Eigen::MatrixXd | bravaisVectors |
| Eigen::VectorXd | vectorsDegeneracies |
| Eigen::Matrix3d | directUnitCell |
| Eigen::Tensor< std::complex< double >, 3 > | h0R |
| Eigen::Tensor< std::complex< double >, 4 > | rMatrix |
| int | numWannier |
| int | numVectors |
| Eigen::Tensor< double, 3 > | degeneracyShifts |
| Eigen::Tensor< double, 5 > | vectorsShifts |
| bool | hasShiftedVectors = false |
| ComplexView3D | h0R_d |
| DoubleView3D | degeneracyShifts_d |
| DoubleView5D | vectorsShifts_d |
| DoubleView1D | vectorsDegeneracies_d |
| DoubleView2D | bravaisVectors_d |
| ElectronH0Wannier::ElectronH0Wannier | ( | const Eigen::Matrix3d & | directUnitCell_, |
| const Eigen::MatrixXd & | bravaisVectors_, | ||
| const Eigen::VectorXd & | vectorsDegeneracies_, | ||
| const Eigen::Tensor< std::complex< double >, 3 > & | h0R_, | ||
| const Eigen::Tensor< std::complex< double >, 4 > * | rMatrix_ = nullptr |
||
| ) |
| directUnitCell_ | the real space unit cell of the crystal in Bohr |
| bravaisVectors_ | the R vectors for the Fourier transform, dimension (3, nRVectors) |
| vectorsDegeneracies_ | the weights of the R vectors for the Fourier transform |
| h0R_ | the Wannier Hamiltonian in real space |
| rMatrix_ | position matrix elements <0m|r|nR> |

| void ElectronH0Wannier::addShiftedVectors | ( | Eigen::Tensor< double, 3 > | degeneracyShifts_, |
| Eigen::Tensor< double, 5 > | vectorsShifts_ | ||
| ) |
Results will be slightly more expensive but more accurate, especially for very small mesh sizes.
| degeneracyShifts_ | vector with the degeneracy of each shifted bravais lattice vector |
| vectorsShifts_ | the shifts to be added to the bravais lattice vectors. |


| std::vector< Eigen::MatrixXcd > ElectronH0Wannier::batchedBuildHamiltonians | ( | std::vector< Eigen::Vector3d > & | cartesianWavevectors | ) |
| cartesianWavevectors | a std::vector containing the cartesian coordinates of nk wavevectors. |

| std::tuple< std::vector< Eigen::VectorXd >, std::vector< Eigen::MatrixXcd > > ElectronH0Wannier::batchedDiagonalizeFromCoordinates | ( | std::vector< Eigen::Vector3d > & | cartesianWavevectors | ) |
| cartesianWavevectors | a std::vector containing the cartesian coordinates of nk wavevectors. |


| std::tuple< std::vector< Eigen::VectorXd >, std::vector< Eigen::MatrixXcd >, std::vector< Eigen::Tensor< std::complex< double >, 3 > > > ElectronH0Wannier::batchedDiagonalizeWithVelocities | ( | std::vector< Eigen::Vector3d > | cartesianCoordinates | ) |
Do diagonalization for a batch of k-points on the CPU.
| cartesianCoordinates | of size(nK,3), contains the cartesian coordinates of the wavevectors at which we want the electronic properties. |
Returns the energies (nk, nb), eigenvectors (nk, nb, nb) and velocities (nk, nb, nb, 3) at each k-point.


|
overridevirtual |
Energies don't have any reference value, and must be used in connection with a chemical potential.
| k | a point object with the wavevector. Must have the cartesian coordinates of the wavevector. |
Implements HarmonicHamiltonian.


|
overridevirtual |
Same as diagonalize(), but the wavevector coordinates are explicitly passed in input.
| point | the wavevector in cartesian coordinates. |
Implements HarmonicHamiltonian.


|
overridevirtual |
| k | a Point object with the wavevector coordinates. |
Implements HarmonicHamiltonian.


|
overridevirtual |
| withVelocity | set to true if computing also the velocity operator, which requires more memory |
Reimplemented from HarmonicHamiltonian.


| std::vector< Eigen::MatrixXcd > ElectronH0Wannier::getBerryConnection | ( | Point & | point | ) |
wavevectors.
| point | the Point coordinates of the wavevector. |

|
protected |

|
overridevirtual |
This is a constant for all wavevectors.
Implements HarmonicHamiltonian.

|
overridevirtual |
Build Hamiltonians for a batch of k-points.
| cartesianCoordinates | a ComplexView2D object of size (nk,3) (must already be on the GPU), containing the cartesian coordinates of a batch of nk wavevectors. |
Implements HarmonicHamiltonian.

|
overridevirtual |
Create and diagonalize Hamiltonians for a batch of k-points.
| cartesianCoordinates | a ComplexView2D object of size (nk,3) (must already be on the GPU), containing the cartesian coordinates of a batch of nk wavevectors. |
Implements HarmonicHamiltonian.


|
overridevirtual |
Build and diagonalize Hamiltonians, with velocities Returns the energies (nk, nb), eigenvectors (nk, nb, nb) and velocities (nk, nb, nb, 3) at each k-point.
| cartesianCoordinates | a ComplexView2D object of size (nk,3) (must already be on the GPU), containing the cartesian coordinates of a batch of nk wavevectors. |
Note that for each k-point, the (nb, nb) eigenvector matrix is column-major, as required by the cuSOLVER routine, hence the StridedLayout.
Implements HarmonicHamiltonian.


| std::tuple< std::vector< Eigen::VectorXd >, std::vector< Eigen::MatrixXcd >, std::vector< Eigen::Tensor< std::complex< double >, 3 > > > ElectronH0Wannier::populate | ( | const std::vector< Eigen::Vector3d > & | cartesianCoordinates, |
| const bool & | withVelocities, | ||
| const bool & | withEigenvectors | ||
| ) |
| cartesianCoordinates | the vector with the list of wavevectors in cartesianCoords |
| withVelocities | if true, compute the electron velocity operator. |
| withEigenvectors | if true, stores the Wannier eigenvectors. |

|
overridevirtual |
| points | the object with the list/mesh of wavevectors |
| withVelocities | if true, compute the electron velocity operator. |
| withEigenvectors | if true, stores the Wannier eigenvectors. |
Implements HarmonicHamiltonian.

