sisi4s
Loading...
Searching...
No Matches
ParticleHoleCoulombVertexDecomposition.hpp
Go to the documentation of this file.
1#ifndef PARTICLE_HOLE_COULOMB_VERTEX_DECOMPOSITION_DEFINED
2#define PARTICLE_HOLE_COULOMB_VERTEX_DECOMPOSITION_DEFINED
3
5#include <math/Complex.hpp>
7#include <DryTensor.hpp>
8#include <util/Tensor.hpp>
9
10namespace sisi4s {
20public:
23 std::vector<Argument> const &argumentList);
25 virtual void run();
26 virtual void dryRun();
27
31 int64_t rank;
32
37 double Delta;
38
45
57
81
90
91 static int64_t constexpr DEFAULT_MAX_ITERATIONS = 32;
92 static double constexpr DEFAULT_DELTA = 0.0;
93 static int constexpr DEFAULT_EPSILON_STEP = 0;
94 static double constexpr DEFAULT_SWAMPING_THRESHOLD = 1.0;
95 static double constexpr DEFAULT_REGULARIZATION_FRICTION = 0.125;
96 static bool constexpr DEFAULT_REAL_FACTOR_ORBITALS = false;
97 static bool constexpr DEFAULT_NORMALIZED_FACTOR_ORBITALS = false;
98
99protected:
100 double mp2Energy;
101
106 void fit(int64_t iterationsCount);
125
130 void evaluateMp2Error();
134 double evaluateMp2(Tensor<complex> &Gamma);
140};
141} // namespace sisi4s
142
143#endif
#define ALGORITHM_REGISTRAR_DECLARATION(NAME)
Auxiliary macro declaring the algorithm registrar for the algorithm type of the given name....
Definition Algorithm.hpp:169
Definition Algorithm.hpp:26
Definition RegularizedAlternatingLeastSquares.hpp:10
Definition DryTensor.hpp:36
Decomposes the particle hole Coulomb vertex into the occupied factor orbitals , the virtual factor o...
Definition ParticleHoleCoulombVertexDecomposition.hpp:19
int64_t rank
The rank of the tensor rank decomposition.
Definition ParticleHoleCoulombVertexDecomposition.hpp:31
virtual void run()
Definition ParticleHoleCoulombVertexDecomposition.cxx:24
static int64_t constexpr DEFAULT_MAX_ITERATIONS
Definition ParticleHoleCoulombVertexDecomposition.hpp:91
static int constexpr DEFAULT_EPSILON_STEP
Definition ParticleHoleCoulombVertexDecomposition.hpp:93
void dryFit(DryTensor< complex > *GammaGai, DryTensor< complex > *PiaR, DryTensor< complex > *PiiR, DryTensor< complex > *LambdaGR, DryTensor< complex > *Gamma0Gai)
Performs a dry run of one iteration in fitting the factor orbitals and the Coulomb factors according ...
Definition ParticleHoleCoulombVertexDecomposition.cxx:208
Tensor< complex > * Gamma0Gai
The fit .
Definition ParticleHoleCoulombVertexDecomposition.hpp:66
Tensor< complex > * PiiR
The factor orbitals for occupied states .
Definition ParticleHoleCoulombVertexDecomposition.hpp:70
bool realFactorOrbitals
Whether the factor orbitals are required to be real.
Definition ParticleHoleCoulombVertexDecomposition.hpp:50
AlternatingLeastSquaresRegularizationEstimator * regularizationEstimatorPiiR
Estimators for the regularization parameter during the alternating least squares fits....
Definition ParticleHoleCoulombVertexDecomposition.hpp:88
virtual void dryRun()
The dryRun estimates resource consumption, especially memory and processor time.
Definition ParticleHoleCoulombVertexDecomposition.cxx:117
virtual ~ParticleHoleCoulombVertexDecomposition()
Definition ParticleHoleCoulombVertexDecomposition.cxx:22
static double constexpr DEFAULT_DELTA
Definition ParticleHoleCoulombVertexDecomposition.hpp:92
AlternatingLeastSquaresRegularizationEstimator * regularizationEstimatorLambdaGR
Definition ParticleHoleCoulombVertexDecomposition.hpp:89
static bool constexpr DEFAULT_NORMALIZED_FACTOR_ORBITALS
Definition ParticleHoleCoulombVertexDecomposition.hpp:97
Tensor< complex > * LambdaGR
The Coulomb factors in the particle/hole decomposition.
Definition ParticleHoleCoulombVertexDecomposition.hpp:80
static double constexpr DEFAULT_SWAMPING_THRESHOLD
Definition ParticleHoleCoulombVertexDecomposition.hpp:94
static double constexpr DEFAULT_REGULARIZATION_FRICTION
Definition ParticleHoleCoulombVertexDecomposition.hpp:95
AlternatingLeastSquaresRegularizationEstimator * regularizationEstimatorPiaR
Definition ParticleHoleCoulombVertexDecomposition.hpp:89
void normalizePi(Tensor< complex > &Pi)
Normalizes the given factor orbitals, such that .
Definition ParticleHoleCoulombVertexDecomposition.cxx:245
void fit(int64_t iterationsCount)
Performs one iteration in fitting the factor orbitals and the Coulomb factors according to the given ...
Definition ParticleHoleCoulombVertexDecomposition.cxx:162
void dryEvaluateMp2(DryTensor< complex > &Gamma)
Performs a dry run of evaluating the MP2 energy for the given Coulomb vertex.
Definition ParticleHoleCoulombVertexDecomposition.cxx:325
Tensor< complex > * PiaR
The conjugated factor orbitals for virtual states .
Definition ParticleHoleCoulombVertexDecomposition.hpp:75
void evaluateMp2Error()
Evaluates and prints the error of the MP2 energy between the current decomposition and the full MP2 e...
Definition ParticleHoleCoulombVertexDecomposition.cxx:270
bool normalizedFactorOrbitals
Whether the factor orbitals are required to be normalized, i.e. .
Definition ParticleHoleCoulombVertexDecomposition.hpp:56
double mp2Energy
Definition ParticleHoleCoulombVertexDecomposition.hpp:100
int epsilonStep
The number of steps between two evaluations of the error in the MP2 energy of the decomposition....
Definition ParticleHoleCoulombVertexDecomposition.hpp:44
double Delta
The Frobenius norm of the difference between and its decomposition.
Definition ParticleHoleCoulombVertexDecomposition.hpp:37
static bool constexpr DEFAULT_REAL_FACTOR_ORBITALS
Definition ParticleHoleCoulombVertexDecomposition.hpp:96
double evaluateMp2(Tensor< complex > &Gamma)
Evaluates the MP2 energy for the given Coulomb vertex.
Definition ParticleHoleCoulombVertexDecomposition.cxx:279
Tensor< complex > * GammaGai
The Coulomb vertex restricted to a particle and a hole index.
Definition ParticleHoleCoulombVertexDecomposition.hpp:62
void realizePi(Tensor< complex > &Pi)
Discards the imaginary part of the given factor orbitals.
Definition ParticleHoleCoulombVertexDecomposition.cxx:261
Definition Algorithm.hpp:10
CTF::Tensor< F > Tensor
Definition Tensor.hpp:9
constexpr F Pi()
Definition MathFunctions.hpp:13