20 #ifndef THREEDM_CHEMPS2_H 21 #define THREEDM_CHEMPS2_H 29 #include "Tensor3RDM.h" 30 #include "SyBookkeeper.h" 62 double get_ham_index(
const int cnt1,
const int cnt2,
const int cnt3,
const int cnt4,
const int cnt5,
const int cnt6 )
const;
70 void fill_ham_index(
const double alpha,
const bool add,
double * storage,
const int last_orb_start,
const int last_orb_num );
109 void save_HAM(
const string filename )
const;
116 static void save_HAM_generic(
const string filename,
const int LAS,
const string tag,
double * array );
139 int * temp_disk_orbs;
142 double * temp_disk_vals;
145 int temp_disk_counter;
148 void create_file()
const;
151 void write_file(
const int last_ham_orb )
const;
154 void read_file(
const int last_ham_orb );
160 void set_dmrg_index(
const int cnt1,
const int cnt2,
const int cnt3,
const int cnt4,
const int cnt5,
const int cnt6,
const double value);
163 double diagram1(
TensorT * denT,
TensorF0 * denF0,
double * workmem)
const;
166 double diagram3(
TensorT * denT,
TensorF0 * denF0,
double * workmem)
const;
169 double diagram4_5_6_7_8_9(
TensorT * denT,
Tensor3RDM * d3tens,
double * workmem,
const char type)
const;
172 double diagram10(
TensorT * denT,
TensorS0 * denS0,
TensorL * denL,
double * workmem,
double * workmem2)
const;
173 double diagram11(
TensorT * denT,
TensorS1 * denS1,
TensorL * denL,
double * workmem,
double * workmem2)
const;
174 double diagram12(
TensorT * denT,
TensorF0 * denF0,
TensorL * denL,
double * workmem,
double * workmem2)
const;
175 double diagram13(
TensorT * denT,
TensorF1 * denF1,
TensorL * denL,
double * workmem,
double * workmem2)
const;
176 double diagram14(
TensorT * denT,
TensorF0 * denF0,
TensorL * denL,
double * workmem,
double * workmem2)
const;
177 double diagram15(
TensorT * denT,
TensorF1 * denF1,
TensorL * denL,
double * workmem,
double * workmem2)
const;
180 double diagram16(
TensorT * denT,
TensorL * denL,
TensorS0 * denS0,
double * workmem,
double * workmem2)
const;
181 double diagram17(
TensorT * denT,
TensorL * denL,
TensorS1 * denS1,
double * workmem,
double * workmem2)
const;
182 double diagram18(
TensorT * denT,
TensorL * denL,
TensorF0 * denF0,
double * workmem,
double * workmem2)
const;
183 double diagram19(
TensorT * denT,
TensorL * denL,
TensorF1 * denF1,
double * workmem,
double * workmem2)
const;
184 double diagram20(
TensorT * denT,
TensorL * denL,
TensorF0 * denF0,
double * workmem,
double * workmem2)
const;
185 double diagram21(
TensorT * denT,
TensorL * denL,
TensorF1 * denF1,
double * workmem,
double * workmem2)
const;
198 void fill_tens_45_47(
TensorT * denT,
TensorS0 * tofill,
TensorF0 * denF0,
double * workmem,
const bool first)
const;
199 void fill_tens_46_48(
TensorT * denT,
TensorS1 * tofill,
TensorF1 * denF1,
double * workmem,
const bool first)
const;
void mpi_allreduce()
Add the 3-RDM elements of all MPI processes.
void save_HAM(const string filename) const
Save the 3-RDM to disk in Hamiltonian indices.
void correct_higher_multiplicities()
After the whole 3-RDM is filled, a prefactor for higher multiplicities should be applied.
ThreeDM(const SyBookkeeper *book_in, const Problem *prob_in, const bool disk_in)
Constructor.
static void save_HAM_generic(const string filename, const int LAS, const string tag, double *array)
Generic save routine for objects of size LAS**6.
void fill_ham_index(const double alpha, const bool add, double *storage, const int last_orb_start, const int last_orb_num)
Perform storage[ :, :, :, :, :, : ] { = or += } alpha * 3-RDM[ :, :, :, :, :, last_orb_start: last_or...
double trace()
Return the trace (should be N(N-1)(N-2))
void fill_site(TensorT *denT, TensorL ***Ltens, TensorF0 ****F0tens, TensorF1 ****F1tens, TensorS0 ****S0tens, TensorS1 ****S1tens, Tensor3RDM ****dm3_a_J0_doublet, Tensor3RDM ****dm3_a_J1_doublet, Tensor3RDM ****dm3_a_J1_quartet, Tensor3RDM ****dm3_b_J0_doublet, Tensor3RDM ****dm3_b_J1_doublet, Tensor3RDM ****dm3_b_J1_quartet, Tensor3RDM ****dm3_c_J0_doublet, Tensor3RDM ****dm3_c_J1_doublet, Tensor3RDM ****dm3_c_J1_quartet, Tensor3RDM ****dm3_d_J0_doublet, Tensor3RDM ****dm3_d_J1_doublet, Tensor3RDM ****dm3_d_J1_quartet)
Fill the 3-RDM terms corresponding to site denT->gIndex()
double get_ham_index(const int cnt1, const int cnt2, const int cnt3, const int cnt4, const int cnt5, const int cnt6) const
Get a 3-RDM, using the HAM indices.
virtual ~ThreeDM()
Destructor.