Phoebe developer's documentation  1.1.0
Phonon and Electron Boltzmann Equations
InteractionElPhWan Class Reference

Class to handle the coupling between electron and phonons. More...

#include <interaction_elph.h>

Public Member Functions

 InteractionElPhWan (const Crystal &crystal_, const Eigen::Tensor< std::complex< double >, 5 > &couplingWannier_, const Eigen::MatrixXd &wsR1Vectors_, const Eigen::VectorXd &wsR1VectorsDegeneracies_, const Eigen::MatrixXd &wsR2Vectors_, const Eigen::VectorXd &wsR2VectorsDegeneracies_, const int &phaseConvention, const PhononH0 &phononH0_)
 Main constructor. More...
 
void resetK1 ()
 
 ~InteractionElPhWan ()
 Almost empty constructor. More...
 
void calcCouplingSquared (const Eigen::MatrixXcd &eigvec1, const std::vector< Eigen::MatrixXcd > &eigvecs2, const std::vector< Eigen::MatrixXcd > &eigvecs3, const std::vector< Eigen::Vector3d > &q3Cs, const Eigen::Vector3d &k1C, const std::vector< Eigen::VectorXcd > &polarData)
 Computes the values of the el-ph coupling strength for transitions of type k1,q3 -> k2, where k1 is one fixed wavevector, and k2,q3 are wavevectors running in lists of wavevectors. More...
 
void oldCalcCouplingSquared (const Eigen::MatrixXcd &eigvec1, const std::vector< Eigen::MatrixXcd > &eigvecs2, const std::vector< Eigen::MatrixXcd > &eigvecs3, const Eigen::Vector3d &k1C, const std::vector< Eigen::Vector3d > &k2Cs, const std::vector< Eigen::Vector3d > &q3Cs)
 
void cacheElPh (const Eigen::MatrixXcd &eigvec1, const Eigen::Vector3d &k1C)
 Computes a partial Fourier transform over the k1/R_el variables. More...
 
Eigen::Tensor< double, 3 > & getCouplingSquared (const int &ik2)
 Get the coupling for the values of the wavevectors triplet (k1,k2,q3), where k1 is the wavevector used at calcCoupling Squared(), k2 (at index ik2) is the wavevector of the scattered electron in the final state, and q3 = k2 - k1 is the phonon wavevector. More...
 
Eigen::Tensor< std::complex< double >, 3 > getPolarCorrection (const Eigen::Vector3d &q3, const Eigen::MatrixXcd &ev1, const Eigen::MatrixXcd &ev2, const Eigen::MatrixXcd &ev3)
 Add polar correction to the electron-phonon coupling. More...
 
double getDeviceMemoryUsage ()
 Estimate the memory in bytes, occupied by the kokkos Views containing the coupling tensor to be interpolated. More...
 
Eigen::VectorXi getCouplingDimensions ()
 Auxiliary function to return the shape of the electron-phonon tensor. More...
 
int estimateNumBatches (const int &nk2, const int &nb1)
 Estimate the number of batches that the list of k2 wavevectors must be split into, in order to fit in memory. More...
 
Eigen::VectorXcd polarCorrectionPart1 (const Eigen::Vector3d &q3, const Eigen::MatrixXcd &ev3)
 
Eigen::MatrixXcd precomputeQDependentPolar (BaseBandStructure &phBandStructure, const bool useMinusQ=false)
 precompute the q-dependent part of the polar correction More...
 

Static Public Member Functions

static InteractionElPhWan parse (Context &context, Crystal &crystal, PhononH0 &phononH0_)
 Static method to initialize the class by parsing a file. More...
 
static Eigen::Tensor< std::complex< double >, 3 > getPolarCorrectionStatic (const Eigen::Vector3d &q3, const Eigen::MatrixXcd &ev1, const Eigen::MatrixXcd &ev2, const Eigen::MatrixXcd &ev3, const double &volume, const Eigen::Matrix3d &reciprocalUnitCell, const Eigen::Matrix3d &epsilon, const Eigen::Tensor< double, 3 > &bornCharges, const Eigen::MatrixXd &atomicPositions, const Eigen::Vector3i &qCoarseMesh, const int dimensionality)
 
static Eigen::VectorXcd polarCorrectionPart1Static (const Eigen::Vector3d &q3, const Eigen::MatrixXcd &ev3, const double &volume, const Eigen::Matrix3d &reciprocalUnitCell, const Eigen::Matrix3d &epsilon, const Eigen::Tensor< double, 3 > &bornCharges, const Eigen::MatrixXd &atomicPositions, const Eigen::Vector3i &qCoarseMesh, const int dimensionality)
 
static Eigen::Tensor< std::complex< double >, 3 > polarCorrectionPart2 (const Eigen::MatrixXcd &ev1, const Eigen::MatrixXcd &ev2, const Eigen::VectorXcd &x)
 

Static Public Attributes

static const int GiustinoPhaseConvention = 0
 
static const int JdftxPhaseConvention = 1
 
static const int spinNonPolarized = 1
 
static const int spinPolarizedOrSOC = 2
 

Detailed Description

Currently implements the calculation of the diagram for the interaction k + q -> k'. Use the static method to initialize an instance of this class. Then, use calc + get to compute and retrieve the values of the electron-phonon interaction strength in Bloch space |g|^2.

This class starts from the interaction matrix elements in real space Wannier representation and mostly does: 1) a double Fourier transform on phonon and electron coordinates; 2) multiply by phonon/electron eigenvectors/rotation matrices; 3) for polar materials, adds the long-range Frohlich interaction.

Constructor & Destructor Documentation

◆ InteractionElPhWan()

InteractionElPhWan::InteractionElPhWan ( const Crystal crystal_,
const Eigen::Tensor< std::complex< double >, 5 > &  couplingWannier_,
const Eigen::MatrixXd &  wsR1Vectors_,
const Eigen::VectorXd &  wsR1VectorsDegeneracies_,
const Eigen::MatrixXd &  wsR2Vectors_,
const Eigen::VectorXd &  wsR2VectorsDegeneracies_,
const int &  phaseConvention,
const PhononH0 phononH0_ 
)
Parameters
crystal_object describing the crystal unit cell.
couplingWannier_matrix elements of the electron phonon interaction. A tensor of shape (iw1,iw2,imode,rPh,rEl), where iw1 iw2 are indices on Wannier functions, imode is a phonon mode index in real space, rPh is an index on phonon Bravais lattice vectors, and rEl is an index on electronic Bravais Lattice vectors. Built such that the iw2 Wannier functions are set in the origin (k2 doesn't contribute to the Fourier transform).
wsR1Vectors_list of Bravais lattice vectors used in the electronic Fourier transform of the coupling.
wsR1VectorsWeights_weights (degeneracies) of the lattice vectors used in the electronic Fourier transform of the coupling.
wsR2Vectors_list of Bravais lattice vectors used in the phonon Fourier transform of the coupling.
wsR2VectorsWeights_weights (degeneracies) of the lattice vectors used in the phonon Fourier transform of the coupling.
phaseConvention_whether to use g(Re,Rp) = convention = 0 or g(Re,Re') = convention = 1, as used by JDFTx
phononH0_the phonon dynamical matrix object. Used for adding the polar interaction.
Here is the call graph for this function:

◆ ~InteractionElPhWan()

InteractionElPhWan::~InteractionElPhWan ( )

Used to fake the existence of a coupling with the constant relaxation time approximation.

Parameters
crystal_a Crystal object Copy constructor Assignment operator Destructor
Here is the call graph for this function:

Member Function Documentation

◆ cacheElPh()

void InteractionElPhWan::cacheElPh ( const Eigen::MatrixXcd &  eigvec1,
const Eigen::Vector3d &  k1C 
)
Parameters
k1Cvalues of the k1 cartesian coordinates over which the Fourier transform is computed.
eigvec1Wannier rotation matrix U at point k1.
Here is the call graph for this function:

◆ calcCouplingSquared()

void InteractionElPhWan::calcCouplingSquared ( const Eigen::MatrixXcd &  eigvec1,
const std::vector< Eigen::MatrixXcd > &  eigvecs2,
const std::vector< Eigen::MatrixXcd > &  eigvecs3,
const std::vector< Eigen::Vector3d > &  q3Cs,
const Eigen::Vector3d &  k1C,
const std::vector< Eigen::VectorXcd > &  polarData 
)

It is assumed that the relation (k2 = k1 + q3) holds.

The call to this function must be preceded by a call to cacheElPh(), which does a precomputation at fixed value of k1. If not, results will be wrong. Hence, structure a code calling this functions as: for k1: cacheElPh(k1) for k2: k3 = k2 - k1 calcCouplingSquared(k2,k3)

Note: this method must be used in conjunction with getCouplingSquared, which is used to return the values computed here.

Parameters
el1Eigenvecelectron eigenvector matrix U_{mb}(k1), where U is obtained by diagonalizing the Wannier Hamiltonian.
el2Eigenvecsvector of electron eigenvectors matrix U_{mb}(k2), where U is obtained by diagonalizing the Wannier Hamiltonian at a bunch of k2 wavevectors.
phEigvecsphonon eigenvectors, in matrix form, for a bunch of wavevectors q3
q3slist of phonon wavevectors.
k1Cthe electron wavevector last used by cacheElPh (only used when phaseConvention) = 1, as here we need to reconstruct k2
Here is the call graph for this function:

◆ estimateNumBatches()

int InteractionElPhWan::estimateNumBatches ( const int &  nk2,
const int &  nb1 
)
Parameters
nk2total number of k2 wavevectors to be split in batches.
nb1number of bands at the k1 wavevector.
Here is the call graph for this function:

◆ getCouplingDimensions()

Eigen::VectorXi InteractionElPhWan::getCouplingDimensions ( )
Returns
(numWannier,numWannier,numPhModes,numElVectors,numPhVectors)

◆ getCouplingSquared()

Eigen::Tensor< double, 3 > & InteractionElPhWan::getCouplingSquared ( const int &  ik2)

Note: this method only works AFTER calcCouplingSquared has been called.

Parameters
ik2index of the 2nd wavevector, aligned with the list of wavevectors passed to calcCouplingSquared().
Returns
g2: a tensor of shape (nb1,nb2,numPhBands=3*numAtoms) with the values of the coupling squared |g(ik1,ik2,iq3)|^2 for the el-ph transition k1,q3 -> k2

◆ getDeviceMemoryUsage()

double InteractionElPhWan::getDeviceMemoryUsage ( )
Returns
a memory estimate in bytes
Here is the caller graph for this function:

◆ getPolarCorrection()

Eigen::Tensor< std::complex< double >, 3 > InteractionElPhWan::getPolarCorrection ( const Eigen::Vector3d &  q3,
const Eigen::MatrixXcd &  ev1,
const Eigen::MatrixXcd &  ev2,
const Eigen::MatrixXcd &  ev3 
)
Parameters
q3phonon wavevector, in cartesian coordinates
ev1eigenvector (rotation matrix U) at k
ev2eigenvector (rotation matrix U) at k'
ev3phonon eigenvector at q = k'-k
Returns
g^L: the long-range (Frohlich) component of the el-ph interaction, as a tensor of shape (nb1,nb2,numPhBands)

◆ parse()

InteractionElPhWan InteractionElPhWan::parse ( Context context,
Crystal crystal,
PhononH0 phononH0_ 
)
static
Parameters
fileNamename of the file containing the coupling matrix elements in real space, and the information on the lattice vectors and degeneracies.
crystalobject describing the crystal unit cell.
Returns
intElPh: an instance of InteractionElPh.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ precomputeQDependentPolar()

Eigen::MatrixXcd InteractionElPhWan::precomputeQDependentPolar ( BaseBandStructure phBandStructure,
const bool  useMinusQ = false 
)
Parameters
phbandstructurethe bandstructure object containing all q-points for which this precomputation should occur
Returns
polarData: the q-dependent part of the polar correction
Here is the call graph for this function: