votca 2026-dev
Loading...
Searching...
No Matches
bse_uks.h
Go to the documentation of this file.
1/*
2 * Copyright 2009-2026 The VOTCA Development Team
3 * (http://www.votca.org)
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License")
6 *
7 * You may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 */
19
20#pragma once
21#ifndef VOTCA_XTP_BSE_UKS_H
22#define VOTCA_XTP_BSE_UKS_H
23
24#include "logger.h"
25#include "orbitals.h"
26#include "qmfragment.h"
27#include "threecenter.h"
28
29namespace votca {
30namespace xtp {
31
32struct BSE_Population;
33
34class BSE_UKS {
35 public:
54
56 : log_(log), Mmn_raw_(Mmn), Mmn_(Mmn) {}
57
59 const options& opt, Index homo_alpha, Index homo_beta,
60 const Eigen::VectorXd& RPAInputEnergiesAlpha,
61 const Eigen::VectorXd& RPAInputEnergiesBeta,
62 const Eigen::MatrixXd& Hqp_alpha_in, const Eigen::MatrixXd& Hqp_beta_in,
63 const Eigen::VectorXd& epsilon_0_inv,
64 const Eigen::MatrixXd& epsilon_eigenvectors);
65
66 void Solve_excitons_uks(Orbitals& orb) const;
67
68 void Analyze_excitons_uks(std::vector<QMFragment<BSE_Population>> fragments,
69 const Orbitals& orb) const;
70
72
73 private:
75 Eigen::VectorXd direct_term;
76 Eigen::VectorXd cross_term;
77 };
78
83
86
93
94 Eigen::VectorXd epsilon_0_inv_;
95 Eigen::MatrixXd Hqp_alpha_;
96 Eigen::MatrixXd Hqp_beta_;
97
98 Eigen::MatrixXd AdjustHqpSize(const Eigen::MatrixXd& Hqp_in,
99 const Eigen::VectorXd& RPAInputEnergies,
100 Index homo) const;
101
103 const Eigen::VectorXd& RPAInputEnergiesAlpha,
104 const Eigen::VectorXd& RPAInputEnergiesBeta, double energy);
105
106 template <typename BSE_OPERATOR>
108
109 template <typename BSE_OPERATOR>
111 const BSE_OPERATOR& H) const;
112
113 template <typename BSE_OPERATOR>
115 Index state, const Orbitals& orb, const BSE_OPERATOR& H) const;
116
119
120 template <typename BSE_OPERATOR>
122
123 template <typename BSE_OPERATOR_A, typename BSE_OPERATOR_B>
125 BSE_OPERATOR_B& Bop) const;
126
127 void PrintWeightsUKS(const Eigen::VectorXd& coeffs) const;
128};
129
130} // namespace xtp
131} // namespace votca
132
133#endif // VOTCA_XTP_BSE_UKS_H
const TCMatrix_gwbse_spin & Mmn_raw_
Definition bse_uks.h:80
ExpectationValues ExpectationValue_Operator_State(Index state, const Orbitals &orb, const BSE_OPERATOR &H) const
Definition bse_uks.cc:195
tools::EigenSystem solve_hermitian(BSE_OPERATOR &h) const
Definition bse_uks.cc:453
void configure_with_precomputed_screening(const options &opt, Index homo_alpha, Index homo_beta, const Eigen::VectorXd &RPAInputEnergiesAlpha, const Eigen::VectorXd &RPAInputEnergiesBeta, const Eigen::MatrixXd &Hqp_alpha_in, const Eigen::MatrixXd &Hqp_beta_in, const Eigen::VectorXd &epsilon_0_inv, const Eigen::MatrixXd &epsilon_eigenvectors)
Definition bse_uks.cc:51
BSE_UKS(Logger &log, const TCMatrix_gwbse_spin &Mmn)
Definition bse_uks.h:55
TCMatrix_gwbse_spin Mmn_
Definition bse_uks.h:81
void configureBSEOperator(BSE_OPERATOR &H) const
Definition bse_uks.cc:159
void PrintWeightsUKS(const Eigen::VectorXd &coeffs) const
Definition bse_uks.cc:520
tools::EigenSystem Solve_nonhermitian_Davidson(BSE_OPERATOR_A &Aop, BSE_OPERATOR_B &Bop) const
Definition bse_uks.cc:481
Eigen::MatrixXd Hqp_beta_
Definition bse_uks.h:96
Eigen::VectorXd epsilon_0_inv_
Definition bse_uks.h:94
void Perturbative_DynamicalScreening(Orbitals &orb)
Definition bse_uks.cc:640
ExpectationValues ExpectationValue_Operator(const Orbitals &orb, const BSE_OPERATOR &H) const
Definition bse_uks.cc:171
Eigen::MatrixXd AdjustHqpSize(const Eigen::MatrixXd &Hqp_in, const Eigen::VectorXd &RPAInputEnergies, Index homo) const
Definition bse_uks.cc:92
tools::EigenSystem Solve_excitons_uks_BTDA() const
Definition bse_uks.cc:291
void SetupDirectInteractionOperator(const Eigen::VectorXd &RPAInputEnergiesAlpha, const Eigen::VectorXd &RPAInputEnergiesBeta, double energy)
Definition bse_uks.cc:135
void Solve_excitons_uks(Orbitals &orb) const
Definition bse_uks.cc:442
Eigen::MatrixXd Hqp_alpha_
Definition bse_uks.h:95
void Analyze_excitons_uks(std::vector< QMFragment< BSE_Population > > fragments, const Orbitals &orb) const
Definition bse_uks.cc:597
tools::EigenSystem Solve_excitons_uks_TDA() const
Definition bse_uks.cc:218
Logger is used for thread-safe output of messages.
Definition logger.h:164
Container for molecular orbitals and derived one-particle data.
Definition orbitals.h:47
Provides a means for comparing floating point numbers.
Definition basebead.h:33
Eigen::Index Index
Definition types.h:26
std::string davidson_update
Definition bse_uks.h:47
std::string davidson_tolerance
Definition bse_uks.h:46
std::string davidson_correction
Definition bse_uks.h:45