Class container of the quasiparticle band structure, i.e. More...
#include <active_bandstructure.h>


Public Member Functions | |
| ActiveBandStructure (Particle &particle_, Points &points_) | |
| Almost empty constructor, to be used internally. | |
| ActiveBandStructure (const Points &points_, HarmonicHamiltonian *h0, const bool &withEigenvectors, const bool &withVelocities) | |
| Default constructor. More... | |
| Particle | getParticle () override |
| Get the Particle object associated with this class. More... | |
| Points | getPoints () override |
| Returns the wavevectors on which the band structure is computed. More... | |
| Point | getPoint (const int &pointIndex) override |
| Returns a wavevector, given a wavevector index. More... | |
| int | getNumPoints (const bool &useFullGrid=false) override |
| Returns the total number of k/q-points. More... | |
| int | getNumBands () override |
| Returns the number of bands. More... | |
| int | getFullNumBands () override |
| int | getNumBands (WavevectorIndex &ik) override |
| Returns the number of bands at a given wavevector. More... | |
| int | hasWindow () override |
| Checks whether the bandStructure has been built discarding some Bloch states from those available. More... | |
| bool | getIsDistributed () override |
| Returns if this band structure is distributed. More... | |
| size_t | getIndex (const WavevectorIndex &ik, const BandIndex &ib) override |
| Builds a Bloch state index, which runs on both wavevector index and band index. More... | |
| std::tuple< WavevectorIndex, BandIndex > | getIndex (const int &is) override |
| Given a Bloch state index, finds the corresponding wavevector and band index. More... | |
| std::tuple< WavevectorIndex, BandIndex > | getIndex (StateIndex &is) override |
| Given a Bloch state index, finds the corresponding wavevector and band index. More... | |
| int | getNumStates () override |
| Returns the total number of Bloch states, equal to numPoints*numBands. More... | |
| const double & | getEnergy (StateIndex &is) override |
| Returns the energy of a quasiparticle from its Bloch index. More... | |
| Eigen::VectorXd | getEnergies (WavevectorIndex &ik) override |
| Returns the energies of all quasiparticle computed at a specified wavevector. More... | |
| double | getMaxEnergy () override |
| Returns the maximum energy value. More... | |
| Eigen::Vector3d | getGroupVelocity (StateIndex &is) override |
| Returns the group velocity of a quasiparticle from its Bloch index. More... | |
| Eigen::MatrixXd | getGroupVelocities (WavevectorIndex &ik) override |
| Returns the group velocity of a quasiparticle for all bands at a specified wavevector index. More... | |
| Eigen::Tensor< std::complex< double >, 3 > | getVelocities (WavevectorIndex &ik) override |
| Returns the velocity operator (including off-diagonal matrix elements) of the quasiparticles at the specified wavevector index. More... | |
| Eigen::MatrixXcd | getEigenvectors (WavevectorIndex &ik) override |
| Obtain the eigenvectors of the quasiparticles at a specified wavevector. More... | |
| Eigen::Tensor< std::complex< double >, 3 > | getPhEigenvectors (WavevectorIndex &ik) override |
| Obtain the eigenvectors of the quasiparticles at a specified wavevector. More... | |
| Eigen::Vector3d | getWavevector (StateIndex &is) override |
| Returns the energy of a quasiparticle from its Bloch index Used for accessing the band structure in the BTE. More... | |
| Eigen::Vector3d | getWavevector (WavevectorIndex &ik) override |
| Returns the energy of a quasiparticle from its Bloch index. More... | |
| void | setEnergies (Point &point, Eigen::VectorXd &energies_) override |
| Method to save quasiparticle energies inside ActiveBandStructure(). More... | |
| void | setEnergies (Point &point, std::vector< double > &energies_) |
| Method to save quasiparticle energies inside ActiveBandStructure(). More... | |
| void | setEigenvectors (Point &point, Eigen::MatrixXcd &eigenvectors_) override |
| Method to save quasiparticle eigenvectors inside ActiveBandStructure. More... | |
| void | setVelocities (Point &point, Eigen::Tensor< std::complex< double >, 3 > &velocities_) override |
| Method to save quasiparticle velocity operator in ActiveBandStructure. More... | |
| std::vector< Eigen::Matrix3d > | getRotationsStar (WavevectorIndex &ikIndex) override |
| Given a irreducible point index, find the list of rotations to reconstruct the equivalent points. More... | |
| std::vector< Eigen::Matrix3d > | getRotationsStar (StateIndex &isIndex) override |
| Given an irreducible Bloch state (i.e. More... | |
| std::tuple< int, Eigen::Matrix3d > | getRotationToIrreducible (const Eigen::Vector3d &x, const int &basis=Points::crystalCoordinates) override |
| Given a point in crystal or cartesian coordinates, returns the index of the irreducible point and the rotation such that rotation*irrPoint = redPoint. More... | |
| BteIndex | stateToBte (StateIndex &isIndex) override |
| Utility method to convert an index over Bloch states in the band structure into a Bloch state index usable by VectorBTE. More... | |
| StateIndex | bteToState (BteIndex &iBteIndex) override |
| Utility method to convert an index over Bloch states in a VectorBTE into the Bloch state index in the band structure. More... | |
| std::vector< int > | irrStateIterator () override |
| Iterator over the Bloch states in the band structure, over just the irreducible wavevectors, but isn't distributed over MPI processes. More... | |
| std::vector< int > | parallelIrrStateIterator () override |
| Iterator over the Bloch states in the band structure, distributed over MPI processes, running only over irreducible wavevectors. More... | |
| std::vector< int > | irrPointsIterator () override |
| Iterator over the irreducible points indices. More... | |
| std::vector< int > | parallelIrrPointsIterator () override |
| Iterator over the irreducible points indices. More... | |
| int | getNumIrrStates () override |
| Returns the number of irr points in this band structure. | |
| int | getPointIndex (const Eigen::Vector3d &crystalCoordinates, const bool &suppressError=false) override |
| Find the index of a point in the reducible list of points, given its coordinates in the crystal basis. More... | |
| std::vector< int > | getReducibleStarFromIrreducible (const int &ik) override |
| Method to find the points equivalent to an irreducible point. More... | |
Public Member Functions inherited from BaseBandStructure | |
| virtual | ~BaseBandStructure ()=default |
| Base destructor for bandstructure class, silences warnings. | |
| virtual std::vector< size_t > | parallelStateIterator () |
| Returns an iterator to be used for loops over the Bloch state index. More... | |
| void | outputComponentsToJSON (const std::string &outFileName="bandstructure.json") |
| Outputs the bandstructure information to file, either sym reduced or not. More... | |
| void | printBandStructureStateInfo (const int &fullNumBands) |
| A function to print information about how many states are in this bandstructure, and how things were reduced by filtering of states. More... | |
Static Public Member Functions | |
| static std::tuple< ActiveBandStructure, StatisticsSweep > | builder (Context &context, HarmonicHamiltonian &h0, Points &points, const bool &withEigenvectors=true, const bool &withVelocities=true, const bool &forceBuildAPP=false) |
| Preferred method to initialize the ActiveBandStructure class. More... | |
Protected Member Functions | |
| void | buildIndices () |
| void | buildSymmetries () |
| size_t | velBloch2Comb (const int &ik, const int &ib1, const int &ib2, const int &i) |
| size_t | eigBloch2Comb (const int &ik, const int &ibFull, const int &ibRed) |
| size_t | bloch2Comb (const int &k, const int &b) |
| std::tuple< int, int > | comb2Bloch (const int &is) |
| size_t | bteBloch2Comb (const int &k, const int &b) |
| std::tuple< int, int > | bteComb2Bloch (const int &is) |
| void | buildOnTheFly (Window &window, Points points_, HarmonicHamiltonian &h0, const bool &withEigenvectors=true, const bool &withVelocities=true) |
| StatisticsSweep | buildAsPostprocessing (Context &context, Points points_, HarmonicHamiltonian &h0, const bool &withEigenvector=true, const bool &withVelocities=true) |
| in this function, useful for electrons, we first compute the band structure on a dense grid of wavevectors, then compute chemical potential/temperatures and then filter it | |
Protected Attributes | |
| Particle | particle |
| Points | points |
| std::vector< double > | energies |
| std::vector< std::complex< double > > | velocities |
| std::vector< std::complex< double > > | eigenvectors |
| bool | hasEigenvectors = false |
| bool | hasVelocities = false |
| int | numStates = 0 |
| int | numIrrStates |
| int | numIrrPoints |
| int | numPoints |
| Eigen::VectorXi | numBands |
| int | numFullBands = 0 |
| int | windowMethod = 0 |
| Eigen::MatrixXi | auxBloch2Comb |
| Eigen::VectorXi | cumulativeKbOffset |
| Eigen::MatrixXi | bteAuxBloch2Comb |
| Eigen::VectorXi | bteCumulativeKbOffset |
| Eigen::VectorXi | cumulativeKbbOffset |
energies, velocities, eigenvectors and wavevectors. In contrast to FullBandStructure, which stores this information for all wavevectors and bands, ActiveBandStructure stores this data for a specified subset of wavevectors, and a subset of bands which may change from one wavevector to another. Should be initialized through the static method provided below, which makes use of the Window that is selected by user input. The subset of wavevectors is specified using an ActivePoints class.
| ActiveBandStructure::ActiveBandStructure | ( | const Points & | points_, |
| HarmonicHamiltonian * | h0, | ||
| const bool & | withEigenvectors, | ||
| const bool & | withVelocities | ||
| ) |
Populate the band structure for the subset of wavevectors specified by points, but saving all bands for such wavevector. Using this constructor, we populate the band structure on the wavevectors specified by points. Currently used for the caching of the 3rd wavevectors info in the 3-phonon scattering matrix.

|
overridevirtual |
Unlike stateToBte, this should always have a solution.
| iBteIndex | index of the Bloch state in the BTE |
Implements BaseBandStructure.

|
static |
| context | object with user input variables. |
| h0 | hamiltonian object to be diagonalized. |
| points | initial unfiltered list of wavevectors, which will be filtered into an ActivePoints object. |
| withEigenvectors | compute and store the eigenvectors |
| withVelocities | compute and store the velocity matrix elements |
| forceBuildAPP | forces activeBandStructure to be built using the internal buildAsPostprocessing method, even if the input H0 is for phonons. |


|
overridevirtual |
| wavevectorIndex | a WavevectorIndex(ik) object where ik is the integer wavevector index running over [0,numPoints-1]. |
Implements BaseBandStructure.

|
overridevirtual |
| wavevectorIndex | a WavevectorIndex(ik) where ik is an integer index running over the wavevectors [0,numPoints-1] |
Implements BaseBandStructure.
|
overridevirtual |
Same as getEnergy(const int &stateIndex), but using a StateIndex input
| stateIndex | a StateIndex(is) object where 'is' is an integer running over the number of states [0,numStates-1]. |
Implements BaseBandStructure.
|
overridevirtual |
Used for accessing the band structure in the BTE.
| wavevectorIndex | a WavevectorIndex(ik) object where 'ik' is an integer index running over the wavevectors in range [0,numPoints-1] |
Implements BaseBandStructure.
|
overridevirtual |
Used for accessing the band structure in the BTE.
| stateIndex | a StateIndex(is) object where 'is' is an integer index in the range [0,numStates[ |
Implements BaseBandStructure.
|
overridevirtual |
| stateIndex | integer from 0 to numStates-1 |
Implements BaseBandStructure.
|
overridevirtual |
| wavevectorIndex | strong-typed index on wavevector index |
| bandIndex | strong-typed index on band index. Note that bandIndex has different range for every wavevector |
Implements BaseBandStructure.

|
overridevirtual |
| stateIndex | a StateIndex(is) object where is is an integer from 0 to numStates-1 |
Implements BaseBandStructure.

|
overridevirtual |
In the case of activeBandStructure, currently always returns false.
Implements BaseBandStructure.

|
overridevirtual |
This can be useful when setting energy scales based on which phonons are discarded (as in the phel scattering, where the window is set relative to the maximum phonon energies)
Implements BaseBandStructure.

|
overridevirtual |
If the number of bands is not constant, it raises an error. In that case, it's best to check the size of the objects returned by the get*() methods or use getNumBands(ik).
Implements BaseBandStructure.
|
overridevirtual |
Implements BaseBandStructure.
|
overridevirtual |
| useFullGrid | default = false. If true, returns the number of points of the full monkhorst-pack grid of wavevectors, otherwise, returns the number of wavevectors stored in the BandStructure. In particular for this class, the number of wavevectors stored in the list is obtained with false, if true, and if activePoints.parentPoints is a FullPoints object, then we will return the number of points in the original full grid of points (useful when normalizing equations). |
Implements BaseBandStructure.

|
overridevirtual |
Implements BaseBandStructure.
|
overridevirtual |
Implements BaseBandStructure.
|
overridevirtual |
It's only meaningful for the phonon band structure, where eigenvectors are more naturally represented in this shape!
| wavevectorIndex | a WavevectorIndex(ik) object where ik is the integer wavevector index running over [0,numPoints-1]. |
Implements BaseBandStructure.

|
overridevirtual |
The wavevector index runs from 0 to numPoints-1, where numPoints is the number of active wavevectors to be used in the calculations.
Implements BaseBandStructure.

|
overridevirtual |
| crystalCoordinates | coordinates of the point in crystal basis |
| suppressError | default false. If false, will throw an error if the point is not found |
Implements BaseBandStructure.

|
overridevirtual |
Implements BaseBandStructure.
|
overridevirtual |
| ik | index of the irreducible point, with ik running on the full list of reducible points. |
Implements BaseBandStructure.

|
overridevirtual |
any band at an irreducible point), find the list of rotations to reconstruct the equivalent points.
| isIndex | Index of the irreducible Bloch State. This index is a number between 0 and numStates. |
Implements BaseBandStructure.

|
overridevirtual |
| ikIndex | Index of the irreducible wavevector. This index is a number between 0 and N_k_reducible. |
Implements BaseBandStructure.


|
overridevirtual |
| x | point coordinates |
| basis | either Points::crystalCoordinates or Points::cartesianCoordinates, this will treat x in the appropriate coordinate. Also the returned rotation will be in the corresponding basis. |
Implements BaseBandStructure.

|
overridevirtual |
Used for accessing the band structure in the BTE.
| wavevectorIndex | a WavevectorIndex(ik) object where 'ik' is an integer index running over the wavevectors in range [0,numPoints-1] |
Implements BaseBandStructure.
|
overridevirtual |
| stateIndex | an integer index in range [0,numStates[ |
Implements BaseBandStructure.

|
overridevirtual |
| wavevectorIndex | a WavevectorIndex(ik) object where 'ik' is an integer index in range [0,numPoints-1]. |
Implements BaseBandStructure.

|
overridevirtual |
Implements BaseBandStructure.
|
overridevirtual |
The iterator is serial, not parallelized with MPI.
Implements BaseBandStructure.

|
overridevirtual |
Implements BaseBandStructure.


|
overridevirtual |
The iterator is parallelized over MPI processes.
Implements BaseBandStructure.

|
overridevirtual |
Implements BaseBandStructure.

|
overridevirtual |
| point | a point object, which will be used to lookup the wavevector index ik. |
| eigenvectors | a matrix of size (numFullBands, numBands(ik)) with the quasiparticle eigenvectors for this point. |
Implements BaseBandStructure.


|
overridevirtual |
| point | a point object, which will be used to lookup the wavevector index ik. |
| energies | a vector of size (numBands(ik)) with the quasiparticle energies for that point. |
Implements BaseBandStructure.


| void ActiveBandStructure::setEnergies | ( | Point & | point, |
| std::vector< double > & | energies_ | ||
| ) |
| point | a point object, which will be used to lookup the wavevector index ik. |
| energies | a vector of size (numBands(ik)) with the quasiparticle energies for that point. |

|
overridevirtual |
| point | a point object, which will be used to lookup the wavevector index ik. |
| velocities | a tensor of size (numBands(ik),numBands(ik),3) with the quasiparticle velocity matrix elements for this wavevector. |
Implements BaseBandStructure.


|
overridevirtual |
If a state is not mapped to the VectorBTE, throws an error.
| StateIndex | the index of the Bloch state in the band structure. |
Implements BaseBandStructure.
