20 #ifndef CASPT2_CHEMPS2_H 21 #define CASPT2_CHEMPS2_H 23 #include "DMRGSCFindices.h" 24 #include "DMRGSCFintegrals.h" 25 #include "DMRGSCFmatrix.h" 27 #define CHEMPS2_CASPT2_A 0 28 #define CHEMPS2_CASPT2_B_SINGLET 1 29 #define CHEMPS2_CASPT2_B_TRIPLET 2 30 #define CHEMPS2_CASPT2_C 3 31 #define CHEMPS2_CASPT2_D 4 32 #define CHEMPS2_CASPT2_E_SINGLET 5 33 #define CHEMPS2_CASPT2_E_TRIPLET 6 34 #define CHEMPS2_CASPT2_F_SINGLET 7 35 #define CHEMPS2_CASPT2_F_TRIPLET 8 36 #define CHEMPS2_CASPT2_G_SINGLET 9 37 #define CHEMPS2_CASPT2_G_TRIPLET 10 38 #define CHEMPS2_CASPT2_H_SINGLET 11 39 #define CHEMPS2_CASPT2_H_TRIPLET 12 40 #define CHEMPS2_CASPT2_NUM_CASES 13 85 double solve(
const double imag_shift,
const bool CONJUGATE_GRADIENT =
false )
const;
125 void create_f_dots();
134 void diagonal(
double * result )
const;
137 void matvec(
double * vector,
double * result,
double * diag_fock )
const;
138 static void matmat(
char totrans,
int rowdim,
int coldim,
int sumdim,
double alpha,
double * matrix,
int ldaM,
double * origin,
int ldaO,
double * target,
int ldaT );
141 void add_shift(
double * vector,
double * result,
double * diag_fock,
const double shift,
const int * normalizations )
const;
142 double inproduct_vectors(
double * first,
double * second,
const int * normalizations )
const;
143 void energy_per_sector(
double * solution )
const;
152 int * size_B_singlet;
153 int * size_B_triplet;
154 int * size_F_singlet;
155 int * size_F_triplet;
158 int get_maxsize()
const;
159 static int jump_AC_active(
const DMRGSCFindices * idx,
const int irrep_t,
const int irrep_u,
const int irrep_v );
160 static int jump_BF_active(
const DMRGSCFindices * idx,
const int irrep_t,
const int irrep_u,
const int ST );
161 static int shift_D_nonactive(
const DMRGSCFindices * idx,
const int irrep_i,
const int irrep_a );
162 static int shift_B_nonactive(
const DMRGSCFindices * idx,
const int irrep_i,
const int irrep_j,
const int ST );
163 static int shift_F_nonactive(
const DMRGSCFindices * idx,
const int irrep_a,
const int irrep_b,
const int ST );
164 static int shift_E_nonactive(
const DMRGSCFindices * idx,
const int irrep_a,
const int irrep_i,
const int irrep_j,
const int ST );
165 static int shift_G_nonactive(
const DMRGSCFindices * idx,
const int irrep_i,
const int irrep_a,
const int irrep_b,
const int ST );
166 static int shift_H_nonactive(
const DMRGSCFindices * idx,
const int irrep_i,
const int irrep_j,
const int irrep_a,
const int irrep_b,
const int ST );
177 double ** SBB_singlet;
178 double ** SBB_triplet;
179 double ** SFF_singlet;
180 double ** SFF_triplet;
188 double ** FBB_singlet;
189 double ** FBB_triplet;
190 double ** FFF_singlet;
191 double ** FFF_triplet;
198 double **** FAB_singlet;
199 double **** FAB_triplet;
200 double **** FCF_singlet;
201 double **** FCF_triplet;
202 double **** FBE_singlet;
203 double **** FBE_triplet;
204 double **** FFG_singlet;
205 double **** FFG_triplet;
206 double **** FDE_singlet;
207 double **** FDE_triplet;
208 double **** FDG_singlet;
209 double **** FDG_triplet;
212 void make_AA_CC(
const bool OVLP,
const double IPEA );
213 void make_DD(
const bool OVLP,
const double IPEA );
214 void make_EE_GG(
const bool OVLP,
const double IPEA );
215 void make_BB_FF_singlet(
const bool OVLP,
const double IPEA );
216 void make_BB_FF_triplet(
const bool OVLP,
const double IPEA );
220 void make_FAB_FCF_singlet();
221 void make_FAB_FCF_triplet();
222 void make_FBE_FFG_singlet();
223 void make_FBE_FFG_triplet();
228 static int recreatehelper1(
double * FOCK,
double * OVLP,
int SIZE,
double * work,
double * eigs,
int lwork );
229 static void recreatehelper2(
double * LEFT,
double * RIGHT,
double ** matrix,
double * work,
int OLD_LEFT,
int NEW_LEFT,
int OLD_RIGHT,
int NEW_RIGHT,
const int number );
230 static void recreatehelper3(
double * OVLP,
int OLDSIZE,
int NEWSIZE,
double * rhs_old,
double * rhs_new,
const int num_rhs );
virtual ~CASPT2()
Destructor.
double solve(const double imag_shift, const bool CONJUGATE_GRADIENT=false) const
Solve for the CASPT2 energy (note that the IPEA shift has been set in the constructor) ...
static long long vector_length(const DMRGSCFindices *idx)
Return the vector length for the CASPT2 first order wavefunction (before diagonalization of the overl...
CASPT2(DMRGSCFindices *idx, DMRGSCFintegrals *ints, DMRGSCFmatrix *oei, DMRGSCFmatrix *fock, double *one_dm, double *two_dm, double *three_dm, double *contract, const double IPEA)
Constructor.