sisi4s
Loading...
Searching...
No Matches
sisi4s::ParticleHoleCoulombVertexDecomposition Class Reference

Decomposes the particle hole Coulomb vertex $\Gamma_{iG}^a$ into the occupied factor orbitals $\Pi_{iR}$, the virtual factor orbitals $\Pi_{aR}$, and the Coulom factors $\Lambda_{GR}$. The decomposition is done with a regularized alternating least squares (RALS) algorithm, requiring only a few dozen steps for sufficient convergence. More...

#include <ParticleHoleCoulombVertexDecomposition.hpp>

Inheritance diagram for sisi4s::ParticleHoleCoulombVertexDecomposition:
Collaboration diagram for sisi4s::ParticleHoleCoulombVertexDecomposition:

Public Member Functions

virtual std::string getName ()
 
 ParticleHoleCoulombVertexDecomposition (std::vector< Argument > const &argumentList)
 
virtual ~ParticleHoleCoulombVertexDecomposition ()
 
virtual void run ()
 
virtual void dryRun ()
 The dryRun estimates resource consumption, especially memory and processor time.
 
- Public Member Functions inherited from sisi4s::Algorithm
 Algorithm (std::vector< Argument > const &argumentList)
 
virtual ~Algorithm ()
 
virtual std::string getName ()=0
 
virtual void run ()=0
 
virtual void dryRun ()
 The dryRun estimates resource consumption, especially memory and processor time.
 
bool isArgumentGiven (std::string const &argumentName)
 
std::string getTextArgument (std::string const &argumentName)
 
std::string getTextArgument (std::string const &argumentName, std::string const &defaultValue)
 
bool getBooleanArgument (std::string const &name)
 
bool getBooleanArgument (std::string const &name, bool const &defaultValue)
 
int64_t getIntegerArgument (std::string const &argumentName)
 
int64_t getIntegerArgument (std::string const &argumentName, int64_t const defaultValue)
 
real getRealArgument (std::string const &argumentName)
 
real getRealArgument (std::string const &argumentName, real const defaultValue)
 
template<typename F = real, typename T = Tensor<F>>
T * getTensorArgument (std::string const &argumentName)
 
template<typename F = real, typename C = std::vector<F>>
C * getContainerArgument (std::string const &argumentName)
 
template<typename F = real, typename C = std::vector<F>>
void allocateContainerArgument (std::string const &argumentName, C *container)
 
std::vector< std::string > getGivenArgumentNames () const
 
void checkArgumentsOrDie (const std::vector< std::string > args) const
 
template<typename F = real, typename T = Tensor<F>>
void allocatedTensorArgument (std::string const &argumentName, T *tensor)
 Specifies the location of an output tensor data.
 
void setRealArgument (std::string const &argumentName, real const value)
 
void setIntegerArgument (std::string const &argumentName, int const value)
 
real getRealArgumentFromInteger (IntegerData *data)
 
real getRealArgumentFromTensor (TensorData< real > *data)
 
template<typename F = real, typename T = Tensor<F>>
T * getTensorArgumentFromReal (RealData *realData)
 Converts the given real data into a scalar tensor.
 
DatagetArgumentData (std::string const &argumentName)
 

Public Attributes

int64_t rank
 The rank $N_R$ of the tensor rank decomposition.
 
double Delta
 The Frobenius norm of the difference between $\Gamma^a_{iG}$ and its decomposition.
 
int epsilonStep
 The number of steps between two evaluations of the error in the MP2 energy of the decomposition. A value below 1 results in no evaluations.
 
bool realFactorOrbitals
 Whether the factor orbitals $\Pi_{aR},\Pi_{iR}$ are required to be real.
 
bool normalizedFactorOrbitals
 Whether the factor orbitals $\Pi_{aR},\Pi_{iR}$ are required to be normalized, i.e. ${\Pi^\ast}^{qR}\Pi_{qR} = \delta{qq}$.
 
Tensor< complex > * GammaGai
 The Coulomb vertex $\Gamma^a_{iG}$ restricted to a particle and a hole index.
 
Tensor< complex > * Gamma0Gai
 The fit ${\Pi^\ast}^{aR}\Pi_{iR}\Lambda_{GR}$.
 
Tensor< complex > * PiiR
 The factor orbitals for occupied states $\Pi_{iR}$.
 
Tensor< complex > * PiaR
 The conjugated factor orbitals for virtual states ${\Pi^\ast}^{aR}$.
 
Tensor< complex > * LambdaGR
 The Coulomb factors $\Lambda_{GR}$ in the particle/hole decomposition.
 
AlternatingLeastSquaresRegularizationEstimatorregularizationEstimatorPiiR
 Estimators for the regularization parameter during the alternating least squares fits. They estimate the regularization parameter $\lambda$ in each iteration from the swamping factor in the previous iteration.
 
AlternatingLeastSquaresRegularizationEstimatorregularizationEstimatorPiaR
 
AlternatingLeastSquaresRegularizationEstimatorregularizationEstimatorLambdaGR
 
- Public Attributes inherited from sisi4s::Algorithm
std::string note
 
bool fallible = false
 
std::map< std::string, std::string > arguments
 

Static Public Attributes

static sisi4s::AlgorithmRegistrar< ParticleHoleCoulombVertexDecompositionregistrar_
 
static int64_t constexpr DEFAULT_MAX_ITERATIONS = 32
 
static double constexpr DEFAULT_DELTA = 0.0
 
static int constexpr DEFAULT_EPSILON_STEP = 0
 
static double constexpr DEFAULT_SWAMPING_THRESHOLD = 1.0
 
static double constexpr DEFAULT_REGULARIZATION_FRICTION = 0.125
 
static bool constexpr DEFAULT_REAL_FACTOR_ORBITALS = false
 
static bool constexpr DEFAULT_NORMALIZED_FACTOR_ORBITALS = false
 

Protected Member Functions

void fit (int64_t iterationsCount)
 Performs one iteration in fitting the factor orbitals and the Coulomb factors according to the given algorithm.
 
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 to the given algorithm.
 
void normalizePi (Tensor< complex > &Pi)
 Normalizes the given factor orbitals, such that ${\Pi^\ast}^{qR}\Pi_{qR} = \delta_{qq}$.
 
void realizePi (Tensor< complex > &Pi)
 Discards the imaginary part of the given factor orbitals.
 
void evaluateMp2Error ()
 Evaluates and prints the error of the MP2 energy between the current decomposition and the full MP2 energy.
 
double evaluateMp2 (Tensor< complex > &Gamma)
 Evaluates the MP2 energy for the given Coulomb vertex.
 
void dryEvaluateMp2 (DryTensor< complex > &Gamma)
 Performs a dry run of evaluating the MP2 energy for the given Coulomb vertex.
 

Protected Attributes

double mp2Energy
 

Detailed Description

Decomposes the particle hole Coulomb vertex $\Gamma_{iG}^a$ into the occupied factor orbitals $\Pi_{iR}$, the virtual factor orbitals $\Pi_{aR}$, and the Coulom factors $\Lambda_{GR}$. The decomposition is done with a regularized alternating least squares (RALS) algorithm, requiring only a few dozen steps for sufficient convergence.

Constructor & Destructor Documentation

◆ ParticleHoleCoulombVertexDecomposition()

ParticleHoleCoulombVertexDecomposition::ParticleHoleCoulombVertexDecomposition ( std::vector< Argument > const &  argumentList)

◆ ~ParticleHoleCoulombVertexDecomposition()

ParticleHoleCoulombVertexDecomposition::~ParticleHoleCoulombVertexDecomposition ( )
virtual

Member Function Documentation

◆ dryEvaluateMp2()

void ParticleHoleCoulombVertexDecomposition::dryEvaluateMp2 ( DryTensor< complex > &  Gamma)
protected

Performs a dry run of evaluating the MP2 energy for the given Coulomb vertex.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dryFit()

void ParticleHoleCoulombVertexDecomposition::dryFit ( DryTensor< complex > *  GammaGai,
DryTensor< complex > *  PiaR,
DryTensor< complex > *  PiiR,
DryTensor< complex > *  LambdaGR,
DryTensor< complex > *  Gamma0Gai 
)
protected

Performs a dry run of one iteration in fitting the factor orbitals and the Coulomb factors according to the given algorithm.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dryRun()

void ParticleHoleCoulombVertexDecomposition::dryRun ( )
virtual

The dryRun estimates resource consumption, especially memory and processor time.

Reimplemented from sisi4s::Algorithm.

Here is the call graph for this function:

◆ evaluateMp2()

double ParticleHoleCoulombVertexDecomposition::evaluateMp2 ( Tensor< complex > &  Gamma)
protected

Evaluates the MP2 energy for the given Coulomb vertex.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ evaluateMp2Error()

void ParticleHoleCoulombVertexDecomposition::evaluateMp2Error ( )
protected

Evaluates and prints the error of the MP2 energy between the current decomposition and the full MP2 energy.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fit()

void ParticleHoleCoulombVertexDecomposition::fit ( int64_t  iterationsCount)
protected

Performs one iteration in fitting the factor orbitals and the Coulomb factors according to the given algorithm.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getName()

virtual std::string sisi4s::ParticleHoleCoulombVertexDecomposition::getName ( )
inlinevirtual

Implements sisi4s::Algorithm.

◆ normalizePi()

void ParticleHoleCoulombVertexDecomposition::normalizePi ( Tensor< complex > &  Pi)
protected

Normalizes the given factor orbitals, such that ${\Pi^\ast}^{qR}\Pi_{qR} = \delta_{qq}$.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ realizePi()

void ParticleHoleCoulombVertexDecomposition::realizePi ( Tensor< complex > &  Pi)
protected

Discards the imaginary part of the given factor orbitals.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ run()

void ParticleHoleCoulombVertexDecomposition::run ( )
virtual

Implements sisi4s::Algorithm.

Here is the call graph for this function:

Member Data Documentation

◆ DEFAULT_DELTA

double constexpr sisi4s::ParticleHoleCoulombVertexDecomposition::DEFAULT_DELTA = 0.0
staticconstexpr

◆ DEFAULT_EPSILON_STEP

int constexpr sisi4s::ParticleHoleCoulombVertexDecomposition::DEFAULT_EPSILON_STEP = 0
staticconstexpr

◆ DEFAULT_MAX_ITERATIONS

int64_t constexpr sisi4s::ParticleHoleCoulombVertexDecomposition::DEFAULT_MAX_ITERATIONS = 32
staticconstexpr

◆ DEFAULT_NORMALIZED_FACTOR_ORBITALS

bool constexpr sisi4s::ParticleHoleCoulombVertexDecomposition::DEFAULT_NORMALIZED_FACTOR_ORBITALS = false
staticconstexpr

◆ DEFAULT_REAL_FACTOR_ORBITALS

bool constexpr sisi4s::ParticleHoleCoulombVertexDecomposition::DEFAULT_REAL_FACTOR_ORBITALS = false
staticconstexpr

◆ DEFAULT_REGULARIZATION_FRICTION

double constexpr sisi4s::ParticleHoleCoulombVertexDecomposition::DEFAULT_REGULARIZATION_FRICTION = 0.125
staticconstexpr

◆ DEFAULT_SWAMPING_THRESHOLD

double constexpr sisi4s::ParticleHoleCoulombVertexDecomposition::DEFAULT_SWAMPING_THRESHOLD = 1.0
staticconstexpr

◆ Delta

double sisi4s::ParticleHoleCoulombVertexDecomposition::Delta

The Frobenius norm of the difference between $\Gamma^a_{iG}$ and its decomposition.

◆ epsilonStep

int sisi4s::ParticleHoleCoulombVertexDecomposition::epsilonStep

The number of steps between two evaluations of the error in the MP2 energy of the decomposition. A value below 1 results in no evaluations.

◆ Gamma0Gai

Tensor<complex>* sisi4s::ParticleHoleCoulombVertexDecomposition::Gamma0Gai

The fit ${\Pi^\ast}^{aR}\Pi_{iR}\Lambda_{GR}$.

◆ GammaGai

Tensor<complex>* sisi4s::ParticleHoleCoulombVertexDecomposition::GammaGai

The Coulomb vertex $\Gamma^a_{iG}$ restricted to a particle and a hole index.

◆ LambdaGR

Tensor<complex>* sisi4s::ParticleHoleCoulombVertexDecomposition::LambdaGR

The Coulomb factors $\Lambda_{GR}$ in the particle/hole decomposition.

◆ mp2Energy

double sisi4s::ParticleHoleCoulombVertexDecomposition::mp2Energy
protected

◆ normalizedFactorOrbitals

bool sisi4s::ParticleHoleCoulombVertexDecomposition::normalizedFactorOrbitals

Whether the factor orbitals $\Pi_{aR},\Pi_{iR}$ are required to be normalized, i.e. ${\Pi^\ast}^{qR}\Pi_{qR} = \delta{qq}$.

◆ PiaR

Tensor<complex>* sisi4s::ParticleHoleCoulombVertexDecomposition::PiaR

The conjugated factor orbitals for virtual states ${\Pi^\ast}^{aR}$.

◆ PiiR

Tensor<complex>* sisi4s::ParticleHoleCoulombVertexDecomposition::PiiR

The factor orbitals for occupied states $\Pi_{iR}$.

◆ rank

int64_t sisi4s::ParticleHoleCoulombVertexDecomposition::rank

The rank $N_R$ of the tensor rank decomposition.

◆ realFactorOrbitals

bool sisi4s::ParticleHoleCoulombVertexDecomposition::realFactorOrbitals

Whether the factor orbitals $\Pi_{aR},\Pi_{iR}$ are required to be real.

◆ registrar_

sisi4s::AlgorithmRegistrar< ParticleHoleCoulombVertexDecomposition > ParticleHoleCoulombVertexDecomposition::registrar_
static

◆ regularizationEstimatorLambdaGR

AlternatingLeastSquaresRegularizationEstimator * sisi4s::ParticleHoleCoulombVertexDecomposition::regularizationEstimatorLambdaGR

◆ regularizationEstimatorPiaR

AlternatingLeastSquaresRegularizationEstimator * sisi4s::ParticleHoleCoulombVertexDecomposition::regularizationEstimatorPiaR

◆ regularizationEstimatorPiiR

AlternatingLeastSquaresRegularizationEstimator* sisi4s::ParticleHoleCoulombVertexDecomposition::regularizationEstimatorPiiR

Estimators for the regularization parameter during the alternating least squares fits. They estimate the regularization parameter $\lambda$ in each iteration from the swamping factor in the previous iteration.


The documentation for this class was generated from the following files: