votca 2026-dev
Loading...
Searching...
No Matches
votca::xtp::BSE Class Reference

#include <bse.h>

Collaboration diagram for votca::xtp::BSE:

Classes

struct  options
struct  Interaction
struct  ExpectationValues
struct  DirectCaches

Public Member Functions

 BSE (Logger &log, TCMatrix_gwbse &Mmn)
void configure (const options &opt, const Eigen::VectorXd &RPAEnergies, const Eigen::MatrixXd &Hqp_in)
void setReactionField (const Eigen::MatrixXd &R, bool include_kreac)
 Screen by a static polarizable environment (embedded BSE).
Eigen::VectorXd ReactionFieldExchange (const tools::EigenSystem &es, bool tda) const
void configure_with_precomputed_screening (const options &opt, const Eigen::VectorXd &RPAEnergies, const Eigen::MatrixXd &Hqp_in, const Eigen::VectorXd &epsilon_0_inv)
void Solve_singlets (Orbitals &orb) const
void Solve_triplets (Orbitals &orb) const
Eigen::MatrixXd getHqp () const
SingletOperator_TDA getSingletOperator_TDA () const
TripletOperator_TDA getTripletOperator_TDA () const
void Analyze_singlets (std::vector< QMFragment< BSE_Population > > fragments, const Orbitals &orb) const
void Analyze_triplets (std::vector< QMFragment< BSE_Population > > fragments, const Orbitals &orb) const
void Perturbative_DynamicalScreening (const QMStateType &type, Orbitals &orb)

Static Public Member Functions

static void setStateMatrixMemory (double bytes)

Private Member Functions

tools::EigenSystem Solve_singlets_TDA () const
tools::EigenSystem Solve_singlets_BTDA () const
tools::EigenSystem Solve_triplets_TDA () const
tools::EigenSystem Solve_triplets_BTDA () const
void PrintWeights (const Eigen::VectorXd &weights) const
template<typename BSE_OPERATOR>
void configureBSEOperator (BSE_OPERATOR &H, std::shared_ptr< SymmetricTiles > cache=nullptr) const
void DecideDirectCaches (bool coupling) const
void ReleaseDirectCaches () const
template<typename BSE_OPERATOR>
tools::EigenSystem solve_hermitian (BSE_OPERATOR &h) const
template<typename BSE_OPERATOR_ApB, typename BSE_OPERATOR_AmB>
tools::EigenSystem Solve_nonhermitian (BSE_OPERATOR_ApB &apb, BSE_OPERATOR_AmB &) const
template<typename BSE_OPERATOR_A, typename BSE_OPERATOR_B>
tools::EigenSystem Solve_nonhermitian_Davidson (BSE_OPERATOR_A &Aop, BSE_OPERATOR_B &Bop) const
void printFragInfo (const std::vector< QMFragment< BSE_Population > > &frags, Index state) const
void printWeights (Index i_bse, double weight) const
void RotateIntoScreeningFrame (const Eigen::MatrixXd &U)
void MatchDressingToRoute ()
SymmetricEigenSystem ScreenedInteraction (const Eigen::VectorXd &RPAInputEnergies, double energy, DFTTimings &timings) const
Eigen::MatrixXd DirectTermDensity (const std::vector< std::pair< const Eigen::VectorXd *, const Eigen::VectorXd * > > &pairs) const
Eigen::MatrixXd CouplingTermDensity (const Eigen::VectorXd &Avec, const Eigen::VectorXd &Bvec) const
void SetupDirectInteractionOperator (const Eigen::VectorXd &DFTenergies, double energy)
Eigen::MatrixXd AdjustHqpSize (const Eigen::MatrixXd &Hqp_in, const Eigen::VectorXd &RPAInputEnergies)
Interaction Analyze_eh_interaction (const QMStateType &type, const Orbitals &orb) const
template<typename BSE_OPERATOR>
ExpectationValues ExpectationValue_Operator (const QMStateType &type, const Orbitals &orb, const BSE_OPERATOR &H) const
tools::EigenSystem & GetBSEEigenSystem (const QMStateType &type, Orbitals &orb) const
const tools::EigenSystem & GetBSEEigenSystem (const QMStateType &type, const Orbitals &orb) const
std::string StateEnergiesHeader (const QMStateType &type) const
std::string StateShortLabel (const QMStateType &type) const
std::string StateDynamicLabel (const QMStateType &type) const
double ExchangePrefactor (const QMStateType &type) const

Private Attributes

options opt_
Logger & log_
Index bse_vmax_
Index bse_cmin_
Index bse_size_
Index bse_vtotal_
Index bse_ctotal_
Index max_dyn_iter_
double dyn_tolerance_
Eigen::VectorXd epsilon_0_inv_
TCMatrix_gwbse & Mmn_
Eigen::MatrixXd Hqp_
Eigen::MatrixXd reaction_field_
Eigen::MatrixXd dressing_
bool include_kreac_ = true
DirectCaches direct_caches_

Static Private Attributes

static double state_matrix_bytes_ = 1e9

Detailed Description

Definition at line 45 of file bse.h.

Constructor & Destructor Documentation

◆ BSE()

votca::xtp::BSE::BSE ( Logger & log,
TCMatrix_gwbse & Mmn )
inline

Definition at line 50 of file bse.h.

Member Function Documentation

◆ AdjustHqpSize()

Eigen::MatrixXd votca::xtp::BSE::AdjustHqpSize ( const Eigen::MatrixXd & Hqp_in,
const Eigen::VectorXd & RPAInputEnergies )
private

Definition at line 168 of file bse.cc.

◆ Analyze_eh_interaction()

BSE::Interaction votca::xtp::BSE::Analyze_eh_interaction ( const QMStateType & type,
const Orbitals & orb ) const
private

Definition at line 762 of file bse.cc.

◆ Analyze_singlets()

void votca::xtp::BSE::Analyze_singlets ( std::vector< QMFragment< BSE_Population > > fragments,
const Orbitals & orb ) const

Definition at line 606 of file bse.cc.

◆ Analyze_triplets()

void votca::xtp::BSE::Analyze_triplets ( std::vector< QMFragment< BSE_Population > > fragments,
const Orbitals & orb ) const

Definition at line 665 of file bse.cc.

◆ configure()

void votca::xtp::BSE::configure ( const options & opt,
const Eigen::VectorXd & RPAEnergies,
const Eigen::MatrixXd & Hqp_in )

Definition at line 63 of file bse.cc.

◆ configure_with_precomputed_screening()

void votca::xtp::BSE::configure_with_precomputed_screening ( const options & opt,
const Eigen::VectorXd & RPAEnergies,
const Eigen::MatrixXd & Hqp_in,
const Eigen::VectorXd & epsilon_0_inv )

Definition at line 81 of file bse.cc.

◆ configureBSEOperator()

template<typename BSE_OPERATOR>
void votca::xtp::BSE::configureBSEOperator ( BSE_OPERATOR & H,
std::shared_ptr< SymmetricTiles > cache = nullptr ) const
private

Definition at line 291 of file bse.cc.

◆ CouplingTermDensity()

Eigen::MatrixXd votca::xtp::BSE::CouplingTermDensity ( const Eigen::VectorXd & Avec,
const Eigen::VectorXd & Bvec ) const
private

Definition at line 884 of file bse.cc.

◆ DecideDirectCaches()

void votca::xtp::BSE::DecideDirectCaches ( bool coupling) const
private

Definition at line 305 of file bse.cc.

◆ DirectTermDensity()

Eigen::MatrixXd votca::xtp::BSE::DirectTermDensity ( const std::vector< std::pair< const Eigen::VectorXd *, const Eigen::VectorXd * > > & pairs) const
private

Definition at line 835 of file bse.cc.

◆ ExchangePrefactor()

double votca::xtp::BSE::ExchangePrefactor ( const QMStateType & type) const
private

Definition at line 157 of file bse.cc.

◆ ExpectationValue_Operator()

template<typename BSE_OPERATOR>
BSE::ExpectationValues votca::xtp::BSE::ExpectationValue_Operator ( const QMStateType & type,
const Orbitals & orb,
const BSE_OPERATOR & H ) const
private

Definition at line 718 of file bse.cc.

◆ GetBSEEigenSystem() [1/2]

const tools::EigenSystem & votca::xtp::BSE::GetBSEEigenSystem ( const QMStateType & type,
const Orbitals & orb ) const
private

Definition at line 113 of file bse.cc.

◆ GetBSEEigenSystem() [2/2]

tools::EigenSystem & votca::xtp::BSE::GetBSEEigenSystem ( const QMStateType & type,
Orbitals & orb ) const
private

Definition at line 101 of file bse.cc.

◆ getHqp()

Eigen::MatrixXd votca::xtp::BSE::getHqp ( ) const
inline

Definition at line 113 of file bse.h.

◆ getSingletOperator_TDA()

SingletOperator_TDA votca::xtp::BSE::getSingletOperator_TDA ( ) const

Definition at line 445 of file bse.cc.

◆ getTripletOperator_TDA()

TripletOperator_TDA votca::xtp::BSE::getTripletOperator_TDA ( ) const

Definition at line 452 of file bse.cc.

◆ MatchDressingToRoute()

void votca::xtp::BSE::MatchDressingToRoute ( )
private

Definition at line 225 of file bse.cc.

◆ Perturbative_DynamicalScreening()

void votca::xtp::BSE::Perturbative_DynamicalScreening ( const QMStateType & type,
Orbitals & orb )

Definition at line 934 of file bse.cc.

◆ printFragInfo()

void votca::xtp::BSE::printFragInfo ( const std::vector< QMFragment< BSE_Population > > & frags,
Index state ) const
private

Definition at line 574 of file bse.cc.

◆ PrintWeights()

void votca::xtp::BSE::PrintWeights ( const Eigen::VectorXd & weights) const
private

Definition at line 590 of file bse.cc.

◆ printWeights()

void votca::xtp::BSE::printWeights ( Index i_bse,
double weight ) const
private

◆ ReactionFieldExchange()

Eigen::VectorXd votca::xtp::BSE::ReactionFieldExchange ( const tools::EigenSystem & es,
bool tda ) const

Definition at line 397 of file bse.cc.

◆ ReleaseDirectCaches()

void votca::xtp::BSE::ReleaseDirectCaches ( ) const
private

Definition at line 303 of file bse.cc.

◆ RotateIntoScreeningFrame()

void votca::xtp::BSE::RotateIntoScreeningFrame ( const Eigen::MatrixXd & U)
private

Definition at line 219 of file bse.cc.

◆ ScreenedInteraction()

SymmetricEigenSystem votca::xtp::BSE::ScreenedInteraction ( const Eigen::VectorXd & RPAInputEnergies,
double energy,
DFTTimings & timings ) const
private

Definition at line 242 of file bse.cc.

◆ setReactionField()

void votca::xtp::BSE::setReactionField ( const Eigen::MatrixXd & R,
bool include_kreac )

Screen by a static polarizable environment (embedded BSE).

R as for GW::setReactionField. Call before configure, which sets up the screened interaction. The kernel becomes

K = Kx[v] + K_reac[v_reac] + Kd[W_tot], W_tot = [(1 + R)^-1 + eps - 1]^-1 (in the metric of M),

Kd with the environment-screened W: the environment's response to the charge an excitation rearranges (state-specific in solvation terms). K_reac = (ia|v_reac|jb) has the index structure of Kx: the environment's response to the transition density, i.e. its Hartree part, which moves bright singlets (linear response in solvation terms). Triplets have no Kx and so no K_reac.

include_kreac = true runs the whole kernel on integrals dressed with (1 + R)^(1/2) (TCMatrix_gwbse::DressAuxIndex), where Kx + K_reac and Kd[W_tot] come out of the unchanged operators. false keeps them bare and diagonalizes W_tot itself instead of eps, so Kx stays v. Either way the first-order K_reac of each singlet is logged after solving. An empty R (the default) leaves everything as it was.

Definition at line 209 of file bse.cc.

◆ setStateMatrixMemory()

void votca::xtp::BSE::setStateMatrixMemory ( double bytes)
inlinestatic

Bytes for the intermediates of one pass when the dynamical screening builds its per-state matrices; smaller values only mean more passes.

Definition at line 127 of file bse.h.

◆ SetupDirectInteractionOperator()

void votca::xtp::BSE::SetupDirectInteractionOperator ( const Eigen::VectorXd & DFTenergies,
double energy )
private

Definition at line 274 of file bse.cc.

◆ solve_hermitian()

template<typename BSE_OPERATOR>
tools::EigenSystem votca::xtp::BSE::solve_hermitian ( BSE_OPERATOR & h) const
private

Definition at line 460 of file bse.cc.

◆ Solve_nonhermitian()

template<typename BSE_OPERATOR_ApB, typename BSE_OPERATOR_AmB>
tools::EigenSystem votca::xtp::BSE::Solve_nonhermitian ( BSE_OPERATOR_ApB & apb,
BSE_OPERATOR_AmB &  ) const
private

◆ Solve_nonhermitian_Davidson()

template<typename BSE_OPERATOR_A, typename BSE_OPERATOR_B>
tools::EigenSystem votca::xtp::BSE::Solve_nonhermitian_Davidson ( BSE_OPERATOR_A & Aop,
BSE_OPERATOR_B & Bop ) const
private

Definition at line 511 of file bse.cc.

◆ Solve_singlets()

void votca::xtp::BSE::Solve_singlets ( Orbitals & orb) const

Definition at line 368 of file bse.cc.

◆ Solve_singlets_BTDA()

tools::EigenSystem votca::xtp::BSE::Solve_singlets_BTDA ( ) const
private

Definition at line 488 of file bse.cc.

◆ Solve_singlets_TDA()

tools::EigenSystem votca::xtp::BSE::Solve_singlets_TDA ( ) const
private

Definition at line 435 of file bse.cc.

◆ Solve_triplets()

void votca::xtp::BSE::Solve_triplets ( Orbitals & orb) const

Definition at line 426 of file bse.cc.

◆ Solve_triplets_BTDA()

tools::EigenSystem votca::xtp::BSE::Solve_triplets_BTDA ( ) const
private

Definition at line 499 of file bse.cc.

◆ Solve_triplets_TDA()

tools::EigenSystem votca::xtp::BSE::Solve_triplets_TDA ( ) const
private

Definition at line 360 of file bse.cc.

◆ StateDynamicLabel()

std::string votca::xtp::BSE::StateDynamicLabel ( const QMStateType & type) const
private

Definition at line 146 of file bse.cc.

◆ StateEnergiesHeader()

std::string votca::xtp::BSE::StateEnergiesHeader ( const QMStateType & type) const
private

Definition at line 125 of file bse.cc.

◆ StateShortLabel()

std::string votca::xtp::BSE::StateShortLabel ( const QMStateType & type) const
private

Definition at line 136 of file bse.cc.

Member Data Documentation

◆ bse_cmin_

Index votca::xtp::BSE::bse_cmin_
private

Definition at line 149 of file bse.h.

◆ bse_ctotal_

Index votca::xtp::BSE::bse_ctotal_
private

Definition at line 152 of file bse.h.

◆ bse_size_

Index votca::xtp::BSE::bse_size_
private

Definition at line 150 of file bse.h.

◆ bse_vmax_

Index votca::xtp::BSE::bse_vmax_
private

Definition at line 148 of file bse.h.

◆ bse_vtotal_

Index votca::xtp::BSE::bse_vtotal_
private

Definition at line 151 of file bse.h.

◆ direct_caches_

DirectCaches votca::xtp::BSE::direct_caches_
mutableprivate

Definition at line 189 of file bse.h.

◆ dressing_

Eigen::MatrixXd votca::xtp::BSE::dressing_
private

Definition at line 163 of file bse.h.

◆ dyn_tolerance_

double votca::xtp::BSE::dyn_tolerance_
private

Definition at line 155 of file bse.h.

◆ epsilon_0_inv_

Eigen::VectorXd votca::xtp::BSE::epsilon_0_inv_
private

Definition at line 157 of file bse.h.

◆ Hqp_

Eigen::MatrixXd votca::xtp::BSE::Hqp_
private

Definition at line 160 of file bse.h.

◆ include_kreac_

bool votca::xtp::BSE::include_kreac_ = true
private

Definition at line 164 of file bse.h.

◆ log_

Logger& votca::xtp::BSE::log_
private

Definition at line 147 of file bse.h.

◆ max_dyn_iter_

Index votca::xtp::BSE::max_dyn_iter_
private

Definition at line 154 of file bse.h.

◆ Mmn_

TCMatrix_gwbse& votca::xtp::BSE::Mmn_
private

Definition at line 159 of file bse.h.

◆ opt_

options votca::xtp::BSE::opt_
private

Definition at line 132 of file bse.h.

◆ reaction_field_

Eigen::MatrixXd votca::xtp::BSE::reaction_field_
private

Definition at line 162 of file bse.h.

◆ state_matrix_bytes_

double votca::xtp::BSE::state_matrix_bytes_ = 1e9
staticprivate

Definition at line 145 of file bse.h.


The documentation for this class was generated from the following files:
  • xtp/include/votca/xtp/bse.h
  • xtp/src/libxtp/gwbse/bse.cc