votca 2026-dev
Loading...
Searching...
No Matches
sigma_ppm.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#pragma once
21#ifndef VOTCA_XTP_SIGMA_PPM_H
22#define VOTCA_XTP_SIGMA_PPM_H
23
24// Local VOTCA includes
25#include "votca/xtp/ppm.h"
27
28namespace votca {
29namespace xtp {
30
31class TCMatrix_gwbse;
32class RPA;
33
34class Sigma_PPM : public Sigma_base {
35 public:
36 Sigma_PPM(TCMatrix_gwbse& Mmn, RPA& rpa) : Sigma_base(Mmn, rpa) {};
37
38 // Sets up the screening parametrisation
39 void PrepareScreening() final;
40
41 std::string ScreeningSummary() const final;
42 // Calculates Sigma_c diagonal elements
43 double CalcCorrelationDiagElement(Index gw_level,
44 double frequency) const final;
45
47 double frequency) const final;
48 // All frequencies in one pass over the integrals of the level
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;
55 // All off-diagonal elements at once as matrix products (PairContraction)
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 template <class Term>
65 void AccumulateDiag(Index gw_level, const double* freqs, Index nfreq,
66 double* out, Term term) const;
68 // per PPM mode: 0.5 weight omega, 0 for modes with weight below 1e-9
69 // (the factor of |M(n,P)|^2 in Sigma_c; set in PrepareScreening)
70 Eigen::VectorXd mode_factors_;
71 // RPA energies W was built with (for ScreeningDump)
72 Eigen::VectorXd screening_energies_;
73};
74} // namespace xtp
75} // namespace votca
76
77#endif // VOTCA_XTP_SIGMA_PPM_H
double CalcCorrelationOffDiagElement(Index gw_level1, Index gw_level2, double frequency1, double frequency2) const final
Definition sigma_ppm.cc:175
Eigen::VectorXd screening_energies_
Definition sigma_ppm.h:72
DiagPoleForm PoleForm(Index gw_level) const final
Definition sigma_ppm.cc:50
Sigma_PPM(TCMatrix_gwbse &Mmn, RPA &rpa)
Definition sigma_ppm.h:36
void AccumulateDiag(Index gw_level, const double *freqs, Index nfreq, double *out, Term term) const
Definition sigma_ppm.cc:107
Eigen::VectorXd CalcCorrelationDiagElements(Index gw_level, const Eigen::VectorXd &frequencies) const final
Definition sigma_ppm.cc:158
double CalcCorrelationDiagElement(Index gw_level, double frequency) const final
Definition sigma_ppm.cc:137
Eigen::VectorXd mode_factors_
Definition sigma_ppm.h:70
ScreeningData ScreeningDump(const Eigen::VectorXd &nu) const final
Definition sigma_ppm.cc:60
void PrepareScreening() final
Definition sigma_ppm.cc:33
double CalcCorrelationDiagElementDerivative(Index gw_level, double frequency) const final
Definition sigma_ppm.cc:147
bool HasPoleForm() const final
Definition sigma_ppm.h:59
Eigen::MatrixXd CalcCorrelationOffDiag(const Eigen::VectorXd &frequencies) const final
Definition sigma_ppm.cc:215
std::string ScreeningSummary() const final
One line about the screening just prepared (empty if nothing to say).
Definition sigma_ppm.cc:85
Sigma_base(TCMatrix_gwbse &Mmn, const RPA &rpa)
Definition sigma_base.h:40
STL namespace.
Provides a means for comparing floating point numbers.
Definition basebead.h:33
Eigen::Index Index
Definition types.h:26