28 #ifndef _chemistry_qc_mbptr12_mp2r12energyutil_h
29 #define _chemistry_qc_mbptr12_mp2r12energyutil_h
31 #include <util/ref/ref.h>
32 #include <math/scmat/matrix.h>
33 #include <util/misc/scexception.h>
34 #include <chemistry/qc/wfn/spin.h>
35 #include <math/scmat/svd.h>
36 #include <chemistry/qc/wfn/orbitalspace.h>
37 #include <chemistry/qc/mbptr12/r12technology.h>
63 const unsigned int nocc_act);
98 virtual void times(
unsigned int ij,
127 const unsigned int nocc_act);
181 virtual void times(
unsigned int ij,
197 SpinCase2 spincase2_;
206 const unsigned int nocc_act);
255 void times(
unsigned int ij,
273 SpinCase2 spincase2_;
282 const unsigned int nocc_act);
330 void times(
unsigned int ij,
354 const unsigned int nocc_act);
383 void times(
unsigned int ij,
404 const unsigned int nocc_act);
414 #endif // include guard
Class MP2R12EnergyUtil provides some misc functions to operate on (blocked) ijxy and xyxy matrices.
Definition: mp2r12_energy_util.h:195
void diagonalize(const RefSymmSCMatrix &A, RefDiagSCMatrix &evals, RefSCMatrix &evecs) const
Computes eigenvalues and eigenvectors of A. evals and evecs don't have to be allocated.
RefSCVector dot_product(const RefSCMatrix &A, const RefSCMatrix &B) const
Computes "dot" product of A and B: tr[i] = sum_j A[j][i] B[j][i].
unsigned int nrowblks(const RefSCMatrix &A) const
Number of oo blocks in row dimension of A.
virtual void print(const char *label, const RefSCMatrix &A, std::ostream &os=ExEnv::out0()) const =0
Prints A.
RefDiagSCMatrix eigenvalues(const RefSymmSCMatrix &A) const
Computes eigenvalues of A.
unsigned int nrowblks(const RefSCMatrix &A) const
Number of oo blocks in row dimension of A.
Definition: mp2r12_energy_util.h:271
virtual RefDiagSCMatrix eigenvalues(const RefSymmSCMatrix &A) const =0
Computes eigenvalues of A.
void transform(const RefSymmSCMatrix &B, const RefDiagSCMatrix &A, const RefSCMatrix &U) const
B = U * A * U.t()
Definition: mp2r12_energy_util.h:107
The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization.
Definition: matrix.h:265
unsigned int nblks(const RefSymmSCMatrix &A) const
Number of oo blocks in dimension of A.
RefSCDimension xydim_
number of xy pairs
Definition: mp2r12_energy_util.h:50
void solve_linear_system(const RefSymmSCMatrix &A, RefSCMatrix &X, const RefSCMatrix &B) const
Solves A*X = B.
void print(const char *label, const RefSCMatrix &A, std::ostream &os=ExEnv::out0()) const
Prints A.
The RefSCMatrix class is a smart pointer to an SCMatrix specialization.
Definition: matrix.h:135
virtual void diagonalize(const RefSymmSCMatrix &A, RefDiagSCMatrix &evals, RefSCMatrix &evecs) const =0
Computes eigenvalues and eigenvectors of A. evals and evecs don't have to be allocated.
A template class that maintains references counts.
Definition: ref.h:361
unsigned int nf12_
number of geminals
Definition: mp2r12_energy_util.h:120
virtual void put(unsigned int ij, const RefSCMatrix &A, const RefSCVector &Aij) const =0
puts ij block into A
Definition: reftestx.h:32
unsigned int nocc_act_
number of active occupied orbitals
Definition: mp2r12_energy_util.h:110
unsigned int nf12_
number of geminals
Definition: mp2r12_energy_util.h:56
virtual RefDiagSCMatrix eigenvalues(const RefSymmSCMatrix &A) const =0
Computes eigenvalues of A.
void put(unsigned int ij, const RefSCMatrix &A, const RefSCVector &Aij) const
puts ij block into A
void get(unsigned int ij, const RefSCMatrix &A, const RefSCVector &Aij) const
gets ij block of A
void check_dims(const RefSCMatrix &A) const
Checks if matrix A has proper dimensions. Throw, if not.
MP2R12EnergyUtil_Diag_DifferentSpin(const RefSCDimension &oodim, const RefSCDimension &xydim, const RefSCDimension &f12dim, const unsigned int nocc_act)
oodim is a dimension of ij (active occupied pairs) xydim is a dimension of xy (orbital products used ...
void invert(RefSymmSCMatrix &A) const
Inverts A in-place.
void times(const RefSymmSCMatrix &A, const RefSCMatrix &x, RefSCMatrix &y) const
computes y = A x
unsigned int nblks(const RefSymmSCMatrix &A) const
Number of oo blocks in dimension of A.
The RefDiagSCMatrix class is a smart pointer to an DiagSCMatrix specialization.
Definition: matrix.h:389
RefSCDimension oodim_
number of ij pairs
Definition: mp2r12_energy_util.h:112
virtual void times(const RefSymmSCMatrix &A, const RefSCMatrix &x, RefSCMatrix &y) const =0
computes y = A x
virtual void print(const char *label, const RefSCMatrix &A, std::ostream &os=ExEnv::out0()) const =0
Prints A.
MP2R12EnergyUtil_Diag_SameSpin(const RefSCDimension &oodim, const RefSCDimension &xydim, const RefSCDimension &f12dim, const unsigned int nocc_act)
oodim is a dimension of ij (active occupied pairs) xydim is a dimension of xy (orbital products used ...
virtual RefSCVector dot_product(const RefSCMatrix &A, const RefSCMatrix &B) const =0
Computes "dot" product of A and B: tr[i] = sum_j A[j][i] B[j][i].
virtual RefSCVector dot_product(const RefSCMatrix &A, const RefSCMatrix &B) const =0
Computes "dot" product of A and B: tr[i] = sum_j A[j][i] B[j][i].
The RefSCDimension class is a smart pointer to an SCDimension specialization.
Definition: dim.h:152
RefSCDimension f12dim_
number of geminals per pair times number of xy pairs
Definition: mp2r12_energy_util.h:52
RefSCVector dot_product(const RefSCMatrix &A, const RefSCMatrix &B) const
Computes "dot" product of A and B: tr[i] = sum_j A[j][i] B[j][i].
RefDiagSCMatrix eigenvalues(const RefSymmSCMatrix &A) const
Computes eigenvalues of A.
virtual void times(const RefSymmSCMatrix &A, const RefSCMatrix &x, RefSCMatrix &y) const =0
computes y = A x
virtual void diagonalize(const RefSymmSCMatrix &A, RefDiagSCMatrix &evals, RefSCMatrix &evecs) const =0
Computes eigenvalues and eigenvectors of A. evals and evecs don't have to be allocated.
RefSCDimension f12dim_
number of geminals per pair times number of xy pairs
Definition: mp2r12_energy_util.h:116
void transform(const RefSymmSCMatrix &B, const RefDiagSCMatrix &A, const RefSCMatrix &U) const
B = U * A * U.t()
void solve_linear_system(const RefSymmSCMatrix &A, RefSCMatrix &X, const RefSCMatrix &B) const
Solves A*X = B.
unsigned int ncolblks(const RefSCMatrix &A) const
Number of oo blocks in column dimension of A.
void firstorder_cusp_coefficients(const SpinCase2 &spincase2, RefSCMatrix &C, const Ref< OrbitalSpace > &i1, const Ref< OrbitalSpace > &i2, const Ref< R12Technology::CorrelationFactor > &corrfactor)
fills C with coefficients determined by first-order cusp conditions
Definition: mp2r12_energy_util.h:346
void print(const char *label, const RefSCMatrix &A, std::ostream &os=ExEnv::out0()) const
Prints A.
void get(unsigned int ij, const RefSCMatrix &A, const RefSCVector &Aij) const
gets ij block of A
void put(unsigned int ij, const RefSCMatrix &A, const RefSCVector &Aij) const
puts ij block into A
virtual void get(unsigned int ij, const RefSCMatrix &A, const RefSCVector &Aij) const =0
gets ij block of A
virtual void solve_linear_system(const RefSymmSCMatrix &A, RefSCMatrix &X, const RefSCMatrix &B) const =0
Solves A*X = B.
void invert(RefSymmSCMatrix &A) const
Inverts A in-place.
void invert(RefSymmSCMatrix &A) const
Inverts A in-place.
The RefSCVector class is a smart pointer to an SCVector specialization.
Definition: matrix.h:55
unsigned int nocc_act_
number of active occupied orbitals
Definition: mp2r12_energy_util.h:46
RefSCDimension oodim_
number of ij pairs
Definition: mp2r12_energy_util.h:48
RefSCVector dot_product(const RefSCMatrix &A, const RefSCMatrix &B) const
Computes "dot" product of A and B: tr[i] = sum_j A[j][i] B[j][i].
unsigned int ncolblks(const RefSCMatrix &A) const
Number of oo blocks in column dimension of A.
RefSCDimension xydim_
number of xy pairs
Definition: mp2r12_energy_util.h:114
virtual void transform(const RefSymmSCMatrix &B, const RefDiagSCMatrix &A, const RefSCMatrix &U) const =0
B = U * A * U.t()
virtual void solve_linear_system(const RefSymmSCMatrix &A, RefSCMatrix &X, const RefSCMatrix &B) const =0
Solves A*X = B.
RefSCDimension gdim_
number of geminals
Definition: mp2r12_energy_util.h:54
static std::ostream & out0()
Return an ostream that writes from node 0.
void times(const RefSymmSCMatrix &A, const RefSCMatrix &x, RefSCMatrix &y) const
computes y = A x
void diagonalize(const RefSymmSCMatrix &A, RefDiagSCMatrix &evals, RefSCMatrix &evecs) const
Computes eigenvalues and eigenvectors of A. evals and evecs don't have to be allocated.
void check_dims(const RefSCMatrix &A) const
Checks if matrix A has proper dimensions. Throw, if not.
unsigned int nrowblks(const RefSCMatrix &A) const
Number of oo blocks in row dimension of A.
void print(const char *label, const RefSCMatrix &A, std::ostream &os=ExEnv::out0()) const
Prints A.
void diagonalize(const RefSymmSCMatrix &A, RefDiagSCMatrix &evals, RefSCMatrix &evecs) const
Computes eigenvalues and eigenvectors of A. evals and evecs don't have to be allocated.
void solve_linear_system(const RefSymmSCMatrix &A, RefSCMatrix &X, const RefSCMatrix &B) const
Solves A*X = B.
The base class for all reference counted objects.
Definition: ref.h:192
RefDiagSCMatrix eigenvalues(const RefSymmSCMatrix &A) const
Computes eigenvalues of A.
MP2R12EnergyUtil_Nondiag(const RefSCDimension &oodim, const RefSCDimension &xydim, const RefSCDimension &f12dim, const unsigned int nocc_act)
oodim is a dimension of ij (active occupied pairs) xydim is a dimension of xy (orbital products used ...
unsigned int ncolblks(const RefSCMatrix &A) const
Number of oo blocks in column dimension of A.
Class MP2R12EnergyUtil_base is the abstract interface to utility functions used by MP2R12Energy deriv...
Definition: mp2r12_energy_util.h:43
virtual void invert(RefSymmSCMatrix &A) const =0
Inverts A in-place.
void times(const RefSymmSCMatrix &A, const RefSCMatrix &x, RefSCMatrix &y) const
computes y = A x
RefSCDimension gdim_
number of geminals
Definition: mp2r12_energy_util.h:118
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14
void transform(const RefSymmSCMatrix &B, const RefDiagSCMatrix &A, const RefSCMatrix &U) const
B = U * A * U.t()
unsigned int nblks(const RefSymmSCMatrix &A) const
Number of oo blocks in dimension of A.
virtual void invert(RefSymmSCMatrix &A) const =0
Inverts A in-place.
virtual void transform(const RefSymmSCMatrix &B, const RefDiagSCMatrix &A, const RefSCMatrix &U) const =0
B = U * A * U.t()
Generated at Sun Jan 26 2020 23:23:59 for MPQC
3.0.0-alpha using the documentation package Doxygen
1.8.16.