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

Class containing the user input variables. More...

#include <context.h>

Public Member Functions

std::string getG2PlotStyle ()
 
void setG2PlotStyle (const std::string &x)
 
std::string getG2MeshStyle ()
 
void setG2MeshStyle (const std::string &x)
 
Eigen::Vector3d getG2PlotFixedPoint ()
 
void setG2PlotFixedPoint (const Eigen::Vector3d &x)
 
std::pair< int, int > getG2PlotEl1Bands ()
 
void setG2PlotEl1Bands (const std::pair< int, int > &x)
 
std::pair< int, int > getG2PlotEl2Bands ()
 
void setG2PlotEl2Bands (const std::pair< int, int > &x)
 
std::pair< int, int > getG2PlotPhBands ()
 
void setG2PlotPhBands (const std::pair< int, int > &x)
 
std::string getPhFC2FileName ()
 gets the name of the file containing the lattice force constants. More...
 
void setPhFC2FileName (const std::string &x)
 
std::string getPhFC3FileName ()
 
void setPhFC3FileName (const std::string &x)
 
std::string getPhonopyDispFileName ()
 
void setPhonopyDispFileName (const std::string &x)
 
std::string getPhonopyBORNFileName ()
 
std::string getElphFileName ()
 
void setElphFileName (const std::string &x)
 
std::string getWannier90Prefix ()
 
void setWannier90Prefix (const std::string &x)
 
std::string getQuantumEspressoPrefix ()
 
void setQuantumEspressoPrefix (const std::string &x)
 
std::string getJDFTxScfOutFile ()
 
void setJDFTxScfOutFile (const std::string &x)
 
std::string getElPhInterpolation ()
 
double getEpaSmearingEnergy () const
 
double getEpaDeltaEnergy () const
 
double getEpaMinEnergy () const
 
double getEpaMaxEnergy () const
 
int getEpaNumBins () const
 
std::string getElectronH0Name ()
 gets the name of the file containing the electronic band structure. More...
 
void setElectronH0Name (const std::string &x)
 
double getElectronFourierCutoff () const
 gets the value of the cutoff to be used for the Fourier interpolation of the band structure. More...
 
std::string getAppName ()
 gets the type of calculation to be run. More...
 
std::string getSumRuleFC2 ()
 gets the sum rule to be imposed on the lattice force constants. More...
 
void setSumRuleFC2 (const std::string &x)
 
Eigen::Vector3i getQMesh ()
 gets the mesh of points for harmonic phonon properties. More...
 
Eigen::Vector3i getKMesh ()
 gets the mesh of points for harmonic electronic properties. More...
 
Eigen::Vector3i getKMeshPhEl ()
 getter for the kMesh used to sample the fermi surface in phEl scattering calculation More...
 
void setKMeshPhEl (Eigen::Vector3i newKMeshPhEl)
 setter for the kMesh used to sample the fermi surface in phEl scattering calculation More...
 
std::string getWindowType ()
 gets the Window type to be used to filter out states that don't contribute to transport. More...
 
void setWindowType (const std::string &x)
 
Eigen::Vector2d getWindowEnergyLimit ()
 gets the values of energy limits to be used with a window on energies. More...
 
void setWindowEnergyLimit (const Eigen::Vector2d &x)
 
double getWindowPopulationLimit () const
 gets the value of population above which a state is considered active. More...
 
void setWindowPopulationLimit (const double &x)
 
Eigen::VectorXd getChemicalPotentials ()
 gets the value of chemical potentials (in Rydberg) to be used in the calculation of transport properties More...
 
Eigen::VectorXd getDopings ()
 gets the value of chemical potentials (in Rydberg) to be used in the calculation of transport properties More...
 
void setDopings (const Eigen::VectorXd &x)
 
Eigen::VectorXd getTemperatures ()
 gets the value of temperatures (in Rydberg) to be used in the calculation of transport properties More...
 
void setTemperatures (const Eigen::VectorXd &x)
 
std::vector< std::string > getSolverBTE ()
 
double getConvergenceThresholdBTE () const
 
int getMaxIterationsBTE () const
 
int getDimensionality () const
 
double getThickness () const
 
double getDosMinEnergy () const
 
double getDosMaxEnergy () const
 
double getDosDeltaEnergy () const
 
Eigen::MatrixXd getInputAtomicPositions ()
 
Eigen::VectorXi getInputAtomicSpecies ()
 
std::vector< std::string > getInputSpeciesNames ()
 
void setInputAtomicPositions (const Eigen::MatrixXd &x)
 
void setInputAtomicSpecies (const Eigen::VectorXi &x)
 
void setInputSpeciesNames (const std::vector< std::string > &x)
 
Eigen::Tensor< double, 3 > getPathExtrema ()
 
std::vector< std::string > getPathLabels ()
 
double getDeltaPath () const
 
bool getOutputEigendisplacements () const
 
bool getOutputUNTimes () const
 
double getFermiLevel () const
 
void setFermiLevel (const double &x)
 
double getNumOccupiedStates () const
 
void setNumOccupiedStates (const double &x)
 
bool getHasSpinOrbit () const
 
void setHasSpinOrbit (const bool &x)
 
double getSpinDegeneracyFactor () const
 
void setSpinDegeneracyFactor (const double &x)
 
int getSmearingMethod () const
 
double getSmearingWidth () const
 
void setSmearingWidth (const double &x)
 
double getElSmearingWidth () const
 
void setElSmearingWidth (const double &x)
 
double getPhSmearingWidth () const
 
void setPhSmearingWidth (const double &x)
 
double getAdaptiveSmearingPrefactor () const
 
void setAdaptiveSmearingPrefactor (const double &x)
 
double getConstantRelaxationTime () const
 
bool getScatteringMatrixInMemory () const
 
void setScatteringMatrixInMemory (const bool &x)
 
bool getUseSymmetries () const
 
void setUseSymmetries (const bool &x)
 
bool getSymmetrizeBandStructure () const
 
void setSymmetrizeBandStructure (const bool &x)
 
bool getWithIsotopeScattering () const
 
Eigen::VectorXd getMasses ()
 
Eigen::VectorXd getIsotopeCouplings ()
 
double getEeFermiLiquidCoefficient () const
 
double getBoundaryLength () const
 
std::string getEpaFileName ()
 
double getMinChemicalPotential () const
 
double getMaxChemicalPotential () const
 
double getDeltaChemicalPotential () const
 
double getMinTemperature () const
 
double getMaxTemperature () const
 
double getDeltaTemperature () const
 
double getEpaEnergyRange () const
 
double getEpaEnergyStep () const
 
double getEFermiRange () const
 
void setupFromInput (const std::string &fileName)
 Reads the user-provided input file and saves the input parameters. More...
 
void printInputSummary (const std::string &fileName)
 Prints the user-provided input variables to output, including default values. More...
 
void inputSanityCheck ()
 Sanity checks the input variables to make sure they agree. More...
 
Eigen::VectorXi getCoreElectrons ()
 
void setCoreElectrons (const Eigen::VectorXi &x)
 
bool getDistributedElPhCoupling () const
 
void setDistributedElPhCoupling (const bool &x)
 
int getHdf5ElPhFileFormat () const
 
void setHdf5ElPhFileFormat (const int &x)
 
std::string getWsVecFileName () const
 
void setWsVecFileName (const std::string &x)
 
bool getUseDragTerms () const
 
void setUseDragTerms (const bool &x)
 
bool getEnforceDetailedBalance () const
 
void setEnforceDetailedBalance (const bool &x)
 
bool getSymmetrizeMatrix () const
 
void setSymmetrizeMatrix (const bool &x)
 
bool getUseUpperTriangle () const
 
void setUseUpperTriangle (const bool &x)
 
int getNumRelaxonsEigenvalues () const
 
void setNumRelaxonsEigenvalues (const int &x)
 
bool getCheckNegativeRelaxons () const
 
bool setCheckNegativeRelaxons () const
 
bool getEnforcePositiveSemiDefinite () const
 
void setEnforcePositiveSemiDefinite (const bool &x)
 

Detailed Description

This class is mostly a container for the input variables.

To add a new variable, write a get/set method, and modify setupFromInput().

Member Function Documentation

◆ getAppName()

std::string Context::getAppName ( )
Returns
x: the name of the calculation, e.g. "electron-phonon" or "phonon-phonon".
Here is the caller graph for this function:

◆ getChemicalPotentials()

Eigen::VectorXd Context::getChemicalPotentials ( )
Returns
x: the vector of values for chemical potentials
Here is the caller graph for this function:

◆ getDopings()

Eigen::VectorXd Context::getDopings ( )
Returns
x: the vector of values for chemical potentials
Here is the caller graph for this function:

◆ getElectronFourierCutoff()

double Context::getElectronFourierCutoff ( ) const
Returns
r: the cutoff value.
Here is the caller graph for this function:

◆ getElectronH0Name()

std::string Context::getElectronH0Name ( )

For Quantum Espresso, this is the path to the XML file.

Returns
path: the file path.
Here is the caller graph for this function:

◆ getKMesh()

Eigen::Vector3i Context::getKMesh ( )
Returns
path: an array with 3 integers representing the k-point mesh.
Here is the caller graph for this function:

◆ getKMeshPhEl()

Eigen::Vector3i Context::getKMeshPhEl ( )
Returns
mesh: the Kmesh used in phEl scattering calculation

◆ getPhFC2FileName()

std::string Context::getPhFC2FileName ( )

For Quantum Espresso, this is the path to the file produced by q2r.

Returns
x: the file path.
Here is the caller graph for this function:

◆ getQMesh()

Eigen::Vector3i Context::getQMesh ( )
Returns
path: an array with 3 integers representing the q-point mesh.
Here is the caller graph for this function:

◆ getSumRuleFC2()

std::string Context::getSumRuleFC2 ( )
Returns
x: the name of the sum rule, i.e. "simple" or "crystal".
Here is the caller graph for this function:

◆ getTemperatures()

Eigen::VectorXd Context::getTemperatures ( )
Returns
x: the vector of values for temperatures
Here is the caller graph for this function:

◆ getWindowEnergyLimit()

Eigen::Vector2d Context::getWindowEnergyLimit ( )
Returns
x: a vector of 2 doubles representing the minimum and maximum values of energies that will be used
Here is the caller graph for this function:

◆ getWindowPopulationLimit()

double Context::getWindowPopulationLimit ( ) const

i.e. the state will be used if its occupation number deviates from 0 or 1 by at least this amount.

Returns
x: the <double> value of the population threshold.
Here is the caller graph for this function:

◆ getWindowType()

std::string Context::getWindowType ( )
Returns
path: an array with 3 integers representing the k-point mesh.
Parameters
windowTypea string, which can take values "none", "energy", or "population"
Here is the caller graph for this function:

◆ inputSanityCheck()

void Context::inputSanityCheck ( )

TODO: This function should be replaced with a better system in the future.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ printInputSummary()

void Context::printInputSummary ( const std::string &  fileName)
Parameters
fileNamepath to the input file, just to print where input came from.
Here is the call graph for this function:

◆ setKMeshPhEl()

void Context::setKMeshPhEl ( Eigen::Vector3i  newKMeshPhEl)
Parameters
kmeshthe Kmesh used in phEl scattering calculation

◆ setupFromInput()

void Context::setupFromInput ( const std::string &  fileName)
Parameters
fileNamepath to the input file
Here is the call graph for this function: