votca 2026-dev
Loading...
Searching...
No Matches
sigma_exact.h
Go to the documentation of this file.
1/*
2 * Copyright 2009-2020 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#ifndef VOTCA_XTP_SIGMA_EXACT_H
21#define VOTCA_XTP_SIGMA_EXACT_H
22
23// Local VOTCA includes
25#include "votca/xtp/rpa.h"
27
28namespace votca {
29namespace xtp {
30
31class TCMatrix_gwbse;
32class RPA;
33
34class Sigma_Exact : public Sigma_base {
35
36 public:
37 Sigma_Exact(TCMatrix_gwbse& Mmn, RPA& rpa) : Sigma_base(Mmn, rpa) {};
38
39 // Sets up the screening parametrisation
40 void PrepareScreening() final;
41 // Calculates Sigma_c diagonal elements
42 double CalcCorrelationDiagElement(Index gw_level,
43 double frequency) const final;
44
46 double frequency) const final;
50 Index gw_level, const Eigen::VectorXd& frequencies) const final;
51 // Calculates Sigma_c off-diagonal elements
52 double CalcCorrelationOffDiagElement(Index gw_level1, Index gw_level2,
53 double frequency1,
54 double frequency2) const final;
57 const Eigen::VectorXd& frequencies) const final;
58
59 bool HasPoleForm() const final { return true; }
60 DiagPoleForm PoleForm(Index gw_level) const final;
61 ScreeningData ScreeningDump(const Eigen::VectorXd& nu) const final;
62
63 private:
64 Eigen::VectorXd rpa_omegas_; // Eigenvalues from RPA
65 // residues of GW level n (column n): the RPA levels x modes array
66 // M_n Z, column-major (pole m + B s)
67 Eigen::MatrixXd residues_;
68 // kept for ScreeningDump only (keep_screening_data_): Z and the RPA
69 // energies W was built with
70 Eigen::MatrixXd modes_;
71 Eigen::VectorXd screening_energies_;
72
73 ExactPoles Poles() const;
74 const double* Residues(Index gw_level) const {
75 return residues_.col(gw_level).data();
76 }
77
78 // Z = sum_v M_v,virt^T (X+Y)_v (aux x RPA modes); the residues of level
79 // m are M_m Z
80 Eigen::MatrixXd ScreeningModes(const Eigen::MatrixXd& XpY) const;
81};
82} // namespace xtp
83} // namespace votca
84
85#endif // VOTCA_XTP_SIGMA_EXACT_H
Eigen::VectorXd CalcCorrelationDiagElements(Index gw_level, const Eigen::VectorXd &frequencies) const final
ScreeningData ScreeningDump(const Eigen::VectorXd &nu) const final
Eigen::MatrixXd residues_
Definition sigma_exact.h:67
bool HasPoleForm() const final
Definition sigma_exact.h:59
Eigen::MatrixXd CalcCorrelationOffDiag(const Eigen::VectorXd &frequencies) const final
All off-diagonal elements as blocked matrix products.
ExactPoles Poles() const
Eigen::MatrixXd ScreeningModes(const Eigen::MatrixXd &XpY) const
Eigen::VectorXd screening_energies_
Definition sigma_exact.h:71
const double * Residues(Index gw_level) const
Definition sigma_exact.h:74
double CalcCorrelationDiagElementDerivative(Index gw_level, double frequency) const final
void PrepareScreening() final
DiagPoleForm PoleForm(Index gw_level) const final
Sigma_Exact(TCMatrix_gwbse &Mmn, RPA &rpa)
Definition sigma_exact.h:37
double CalcCorrelationDiagElement(Index gw_level, double frequency) const final
Eigen::VectorXd rpa_omegas_
Definition sigma_exact.h:64
Eigen::MatrixXd modes_
Definition sigma_exact.h:70
double CalcCorrelationOffDiagElement(Index gw_level1, Index gw_level2, double frequency1, double frequency2) const final
Sigma_base(TCMatrix_gwbse &Mmn, const RPA &rpa)
Definition sigma_base.h:40
Charge transport classes.
Definition ERIs.h:28
Provides a means for comparing floating point numbers.
Definition basebead.h:33
Eigen::Index Index
Definition types.h:26
Pole sums of the exact (RPA spectral) correlation self-energy.