1#ifndef CLUSTER_SINGLES_DOUBLES_ALGORITHM_DEFINED
2#define CLUSTER_SINGLES_DOUBLES_ALGORITHM_DEFINED
100 template <typename F>
103 std::vector<std::vector<
TensorIndex>> amplitudeLens,
104 std::vector<std::
string> amplitudeIndices);
106 template <typename F>
108 std::vector<std::
string> names);
124 int integralsSliceSize);
130 int integralsSliceSize);
146 int factorsSliceSize);
151 int factorsSliceSize);
161 template <typename F>
169 std::
string getDataName(const std::
string &type, const std::
string &data);
#define PTR(TYPE)
Definition SharedPointer.hpp:8
Definition Algorithm.hpp:26
Contains all the necessary tools for an algorithm with singles and doubles amplitudes....
Definition ClusterSinglesDoublesAlgorithm.hpp:22
std::string getCapitalizedAbbreviation()
The abbreviation of the algorithm in capital letters.
Definition ClusterSinglesDoublesAlgorithm.cxx:929
static double constexpr DEFAULT_ENERGY_CONVERGENCE
Definition ClusterSinglesDoublesAlgorithm.hpp:43
virtual std::shared_ptr< FockVector< double > > getResiduum(const int iteration, const std::shared_ptr< const FockVector< double > > &litudes)=0
Computes and returns the residuum of the given amplitudes.
static double constexpr DEFAULT_AMPLITUDES_CONVERGENCE
Definition ClusterSinglesDoublesAlgorithm.hpp:44
static double constexpr DEFAULT_LEVEL_SHIFT
Definition ClusterSinglesDoublesAlgorithm.hpp:46
std::shared_ptr< FockVector< F > > createAmplitudes(std::vector< std::string > amplitudeNames, std::vector< std::vector< TensorIndex > > amplitudeLens, std::vector< std::string > amplitudeIndices)
Definition ClusterSinglesDoublesAlgorithm.cxx:240
virtual void run()
Calculates the energy of a ClusterSinglesDoubles algorithm.
Definition ClusterSinglesDoublesAlgorithm.cxx:25
Tensor< double > * sliceCoupledCoulombIntegrals(const std::shared_ptr< const FockVector< double > > &litudes, int a, int b, int integralsSliceSize)
Calculates and returns one slice Xxycd of the Coulomb integrals coupled to the singles amplitudes....
Definition ClusterSinglesDoublesAlgorithm.cxx:388
void sliceIntoResiduum(Tensor< F > &Rxyij, int a0, int b0, Tensor< F > &Rabij)
Adds the given slice of the residuum tensor Rxyij to the entire residuum tensor Rabij at the respecti...
Definition ClusterSinglesDoublesAlgorithm.cxx:888
void estimateAmplitudesFromResiduum(const std::shared_ptr< FockVector< F > > &residuum, const std::shared_ptr< const FockVector< F > > &litudes)
Calculates an improved estimate of the amplitudes provided the given the residuum....
Definition ClusterSinglesDoublesAlgorithm.cxx:302
void storeAmplitudes(const std::shared_ptr< const FockVector< F > > &litudes, std::vector< std::string > names)
Definition ClusterSinglesDoublesAlgorithm.cxx:288
F getEnergy(const std::shared_ptr< const FockVector< F > > &litdues)
Computes and returns the energy of the given amplitudes.
Definition ClusterSinglesDoublesAlgorithm.cxx:131
Tensor< double > * sliceAmplitudesFromCoupledCoulombFactors(const std::shared_ptr< const FockVector< double > > &litudes, int a, int b, int factorsSliceSize)
Calculates and returns one slice Fabij of the residuum from the dressed Coulomb factors....
Definition ClusterSinglesDoublesAlgorithm.cxx:568
virtual std::string getAbbreviation()=0
Returns the abbreviation of the concrete algorithm, e.g. "Ccd", "Dcd".
static int constexpr DEFAULT_MAX_ITERATIONS
Defines the default number of iterations (16).
Definition ClusterSinglesDoublesAlgorithm.hpp:42
std::string getDataName(const std::string &type, const std::string &data)
Definition ClusterSinglesDoublesAlgorithm.cxx:939
void dryAmplitudesFromResiduum(sisi4s::DryTensor< F > &R)
Dry run for amplitudesFromResiduum.
Definition ClusterSinglesDoublesAlgorithm.cxx:375
void calculateExcitationEnergies(Tensor< F > &D, const std::string &indices)
Calculates eps_a+eps_b+...-eps_i-eps_j-... into D^ab..._ij...
Definition ClusterSinglesDoublesAlgorithm.cxx:343
virtual ~ClusterSinglesDoublesAlgorithm()
Definition ClusterSinglesDoublesAlgorithm.cxx:23
Definition DryTensor.hpp:36
Represents the direct sum of Tensors and provides the vector space operations of addition,...
Definition FockVector.hpp:26
Definition Algorithm.hpp:10
CTF::Tensor< F > Tensor
Definition Tensor.hpp:9
int64_t TensorIndex
Definition Tensor.hpp:11
Complex< real > complex
Definition Complex.hpp:17