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 private:
60 template <class Term>
61 void AccumulateDiag(Index gw_level, const double* freqs, Index nfreq,
62 double* out, Term term) const;
64 // per PPM mode: 0.5 weight omega, 0 for modes with weight below 1e-9
65 // (the factor of |M(n,P)|^2 in Sigma_c; set in PrepareScreening)
67};
68} // namespace xtp
69} // namespace votca
70
71#endif // VOTCA_XTP_SIGMA_PPM_H
double CalcCorrelationOffDiagElement(Index gw_level1, Index gw_level2, double frequency1, double frequency2) const final
Definition sigma_ppm.cc:139
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:71
Eigen::VectorXd CalcCorrelationDiagElements(Index gw_level, const Eigen::VectorXd &frequencies) const final
Definition sigma_ppm.cc:122
double CalcCorrelationDiagElement(Index gw_level, double frequency) const final
Definition sigma_ppm.cc:101
Eigen::VectorXd mode_factors_
Definition sigma_ppm.h:66
void PrepareScreening() final
Definition sigma_ppm.cc:33
double CalcCorrelationDiagElementDerivative(Index gw_level, double frequency) const final
Definition sigma_ppm.cc:111
Eigen::MatrixXd CalcCorrelationOffDiag(const Eigen::VectorXd &frequencies) const final
Definition sigma_ppm.cc:179
std::string ScreeningSummary() const final
One line about the screening just prepared (empty if nothing to say).
Definition sigma_ppm.cc:49
Sigma_base(TCMatrix_gwbse &Mmn, const RPA &rpa)
Definition sigma_base.h:39
STL namespace.
Provides a means for comparing floating point numbers.
Definition basebead.h:33
Eigen::Index Index
Definition types.h:26