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

Decomposes the Coulomb vertex $\Gamma_{rG}^q$ into the factor orbitals $\Pi_{qR}$ 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. Note that currently the employed fit is $\Pi_{qR}\Pi_{rR}\Lambda_{GR}$ rather than the form with $\Pi_{qR}$ conjugated. More...

#include <CoulombVertexDecomposition.hpp>

Inheritance diagram for sisi4s::CoulombVertexDecomposition:
Collaboration diagram for sisi4s::CoulombVertexDecomposition:

Public Member Functions

virtual std::string getName ()
 
 CoulombVertexDecomposition (std::vector< Argument > const &argumentList)
 
virtual ~CoulombVertexDecomposition ()
 
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^q_{rG}$ and its decomposition.
 
bool realFactorOrbitals
 Whether the factor orbitals $\Pi_{qR}$ are required to be real.
 
bool normalizedFactorOrbitals
 Whether the factor orbitals $\Pi_{qR}$ are required to be normalized, i.e. ${\Pi^\ast}^{qR}\Pi_{qR} = \delta{qq}$.
 
bool writeSubIterations
 Whether to write Delta after each part of one RALS iteration, where Delta is the Frobenius norm of ${\Pi^\ast}^{qR}Pi_{rR}\Lambda_{GR} - \Gamma^q_{rG}$.
 
Tensor< complex > * GammaGqr
 The full Coulomb vertex $\Gamma^q_{rG}$.
 
Tensor< complex > * composedGammaGqr
 The fit ${\Pi^\ast}^{qR}\Pi_{rR}\Lambda_{GR}$.
 
CTF::Matrix< complex > * PiqR
 The conjugated factor orbitals ${\Pi^\ast}^{qR} = (\Pi_{qR})^\ast$.
 
CTF::Matrix< complex > * PirR
 The factor orbitals $\Pi_{rR} = ({\Pi^\ast}^{rR})^\ast$.
 
CTF::Matrix< complex > * LambdaGR
 The full Coulomb factors $\Lambda_{GR}$.
 
AlternatingLeastSquaresRegularizationEstimatorregularizationEstimator
 Estimator 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.
 
- 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< CoulombVertexDecompositionregistrar_
 
static int64_t constexpr DEFAULT_RANK_SIZE = -1
 
static double constexpr DEFAULT_RANK_FACTOR = 3.0
 
static constexpr int64_t DEFAULT_MAX_ITERATIONS = 32
 
static constexpr double DEFAULT_DELTA = 0.0
 
static constexpr double DEFAULT_SWAMPING_THRESHOLD = 1.0
 
static constexpr double DEFAULT_REGULARIZATION_FRICTION = 0.125
 
static constexpr bool DEFAULT_REAL_FACTOR_ORBITALS = false
 
static constexpr bool DEFAULT_NORMALIZED_FACTOR_ORBITALS = false
 
static constexpr bool DEFAULT_WRITE_SUB_ITERATIONS = false
 
static const std::string SYMMETRIC
 
static const std::string HERMITIAN
 
static const std::string PSEUDO_INVERSE
 

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 > *GammaGqr, DryTensor< complex > *PiqR, DryTensor< complex > *PirR, DryTensor< complex > *LambdaGR, DryTensor< complex > *composedGammaGqr)
 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 iterateQuadraticFactor (int iterationsCount)
 Solves the quadratically occurring factor Pi iteratively similar to the Babylonian algorithm.
 
void computeOutgoingPi ()
 Takes the incoming factor orbitals and computes the outgoing factor orbitals according to the chosen ansatz. The ansatz is specified as the string argument ansatz and can be one of the following: "symmetric", "hermitian", "pseudoInverse".
 
double getDelta ()
 Computes and returns the difference.
 

Detailed Description

Decomposes the Coulomb vertex $\Gamma_{rG}^q$ into the factor orbitals $\Pi_{qR}$ 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. Note that currently the employed fit is $\Pi_{qR}\Pi_{rR}\Lambda_{GR}$ rather than the form with $\Pi_{qR}$ conjugated.

Constructor & Destructor Documentation

◆ CoulombVertexDecomposition()

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

◆ ~CoulombVertexDecomposition()

CoulombVertexDecomposition::~CoulombVertexDecomposition ( )
virtual
Here is the call graph for this function:

Member Function Documentation

◆ computeOutgoingPi()

void CoulombVertexDecomposition::computeOutgoingPi ( )
protected

Takes the incoming factor orbitals and computes the outgoing factor orbitals according to the chosen ansatz. The ansatz is specified as the string argument ansatz and can be one of the following: "symmetric", "hermitian", "pseudoInverse".

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

◆ dryFit()

void CoulombVertexDecomposition::dryFit ( DryTensor< complex > *  GammaGqr,
DryTensor< complex > *  PiqR,
DryTensor< complex > *  PirR,
DryTensor< complex > *  LambdaGR,
DryTensor< complex > *  composedGammaGqr 
)
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 CoulombVertexDecomposition::dryRun ( )
virtual

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

Reimplemented from sisi4s::Algorithm.

Here is the call graph for this function:

◆ fit()

void CoulombVertexDecomposition::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:

◆ getDelta()

double CoulombVertexDecomposition::getDelta ( )
protected

Computes and returns the difference.

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

◆ getName()

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

Implements sisi4s::Algorithm.

◆ iterateQuadraticFactor()

void CoulombVertexDecomposition::iterateQuadraticFactor ( int  iterationsCount)
protected

Solves the quadratically occurring factor Pi iteratively similar to the Babylonian algorithm.

Note
{ Currently \f$\Pi_{qR}Pi_{rR}\Lambda_{GR} $ is solved for
  instead of ${\Pi^\ast}^{qR}Pi_{rR}\Lambda_{GR}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ normalizePi()

void CoulombVertexDecomposition::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 CoulombVertexDecomposition::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 CoulombVertexDecomposition::run ( )
virtual

Implements sisi4s::Algorithm.

Here is the call graph for this function:

Member Data Documentation

◆ composedGammaGqr

Tensor<complex>* sisi4s::CoulombVertexDecomposition::composedGammaGqr

The fit ${\Pi^\ast}^{qR}\Pi_{rR}\Lambda_{GR}$.

◆ DEFAULT_DELTA

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

◆ DEFAULT_MAX_ITERATIONS

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

◆ DEFAULT_NORMALIZED_FACTOR_ORBITALS

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

◆ DEFAULT_RANK_FACTOR

double constexpr sisi4s::CoulombVertexDecomposition::DEFAULT_RANK_FACTOR = 3.0
staticconstexpr

◆ DEFAULT_RANK_SIZE

int64_t constexpr sisi4s::CoulombVertexDecomposition::DEFAULT_RANK_SIZE = -1
staticconstexpr

◆ DEFAULT_REAL_FACTOR_ORBITALS

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

◆ DEFAULT_REGULARIZATION_FRICTION

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

◆ DEFAULT_SWAMPING_THRESHOLD

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

◆ DEFAULT_WRITE_SUB_ITERATIONS

constexpr bool sisi4s::CoulombVertexDecomposition::DEFAULT_WRITE_SUB_ITERATIONS = false
staticconstexpr

◆ Delta

double sisi4s::CoulombVertexDecomposition::Delta

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

◆ GammaGqr

Tensor<complex>* sisi4s::CoulombVertexDecomposition::GammaGqr

The full Coulomb vertex $\Gamma^q_{rG}$.

◆ HERMITIAN

const std::string CoulombVertexDecomposition::HERMITIAN
static

◆ LambdaGR

CTF::Matrix<complex>* sisi4s::CoulombVertexDecomposition::LambdaGR

The full Coulomb factors $\Lambda_{GR}$.

◆ normalizedFactorOrbitals

bool sisi4s::CoulombVertexDecomposition::normalizedFactorOrbitals

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

◆ PiqR

CTF::Matrix<complex>* sisi4s::CoulombVertexDecomposition::PiqR

The conjugated factor orbitals ${\Pi^\ast}^{qR} = (\Pi_{qR})^\ast$.

◆ PirR

CTF::Matrix<complex>* sisi4s::CoulombVertexDecomposition::PirR

The factor orbitals $\Pi_{rR} = ({\Pi^\ast}^{rR})^\ast$.

◆ PSEUDO_INVERSE

const std::string CoulombVertexDecomposition::PSEUDO_INVERSE
static

◆ rank

int64_t sisi4s::CoulombVertexDecomposition::rank

The rank $N_R$ of the tensor rank decomposition.

◆ realFactorOrbitals

bool sisi4s::CoulombVertexDecomposition::realFactorOrbitals

Whether the factor orbitals $\Pi_{qR}$ are required to be real.

◆ registrar_

sisi4s::AlgorithmRegistrar< CoulombVertexDecomposition > CoulombVertexDecomposition::registrar_
static

◆ regularizationEstimator

AlternatingLeastSquaresRegularizationEstimator* sisi4s::CoulombVertexDecomposition::regularizationEstimator

Estimator 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.

◆ SYMMETRIC

const std::string CoulombVertexDecomposition::SYMMETRIC
static

◆ writeSubIterations

bool sisi4s::CoulombVertexDecomposition::writeSubIterations

Whether to write Delta after each part of one RALS iteration, where Delta is the Frobenius norm of ${\Pi^\ast}^{qR}Pi_{rR}\Lambda_{GR} - \Gamma^q_{rG}$.


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