CheMPS2
|
#include <ThreeDM.h>
Public Member Functions | |
ThreeDM (const SyBookkeeper *book_in, const Problem *prob_in, const bool disk_in) | |
Constructor. More... | |
virtual | ~ThreeDM () |
Destructor. | |
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. More... | |
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_orb_start + last_orb_num ]. More... | |
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() More... | |
void | correct_higher_multiplicities () |
After the whole 3-RDM is filled, a prefactor for higher multiplicities should be applied. | |
double | trace () |
Return the trace (should be N(N-1)(N-2)) More... | |
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. More... | |
Static Public Member Functions | |
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. More... | |
ThreeDM class.
The ThreeDM class stores the spin-summed three-particle reduced density matrix (3-RDM) of a converged DMRG calculation:
Because the wave-function belongs to a certain Abelian irrep, must be valid before the corresponding element is non-zero.
CheMPS2::ThreeDM::ThreeDM | ( | const SyBookkeeper * | book_in, |
const Problem * | prob_in, | ||
const bool | disk_in | ||
) |
Constructor.
book_in | Symmetry sector bookkeeper |
prob_in | The problem to be solved |
disk_in | Whether or not to use disk in order to avoid storing the full 3-RDM of size L^6 |
Definition at line 38 of file ThreeDM.cpp.
void CheMPS2::ThreeDM::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_orb_start + last_orb_num ].
alpha | The prefactor |
add | Whether to add to, or to set the storage |
storage | Array of size L * L * L * L * L * last_orb_num |
last_orb_start | Begin index for the sixth orbital of the 3-RDM |
last_orb_num | Number of consecutive sixth orbitals to copy |
Definition at line 155 of file ThreeDM.cpp.
void CheMPS2::ThreeDM::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()
denT | DMRG site-matrices |
Ltens | Ltensors |
F0tens | F0tensors |
F1tens | F1tensors |
S0tens | S0tensors |
S1tens | S1tensors |
dm3_a_J0_doublet | Renormalized operator of three second quantized operators: annihilator, annihilator, annihilator |
dm3_a_J1_doublet | Renormalized operator of three second quantized operators: annihilator, annihilator, annihilator |
dm3_a_J1_quartet | Renormalized operator of three second quantized operators: annihilator, annihilator, annihilator |
dm3_b_J0_doublet | Renormalized operator of three second quantized operators: annihilator, annihilator, creator |
dm3_b_J1_doublet | Renormalized operator of three second quantized operators: annihilator, annihilator, creator |
dm3_b_J1_quartet | Renormalized operator of three second quantized operators: annihilator, annihilator, creator |
dm3_c_J0_doublet | Renormalized operator of three second quantized operators: annihilator, creator, annihilator |
dm3_c_J1_doublet | Renormalized operator of three second quantized operators: annihilator, creator, annihilator |
dm3_c_J1_quartet | Renormalized operator of three second quantized operators: annihilator, creator, annihilator |
dm3_d_J0_doublet | Renormalized operator of three second quantized operators: creator, annihilator, annihilator |
dm3_d_J1_doublet | Renormalized operator of three second quantized operators: creator, annihilator, annihilator |
dm3_d_J1_quartet | Renormalized operator of three second quantized operators: creator, annihilator, annihilator |
Definition at line 398 of file ThreeDM.cpp.
double CheMPS2::ThreeDM::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.
cnt1 | the first index |
cnt2 | the second index |
cnt3 | the third index |
cnt4 | the fourth index |
cnt5 | the fifth index |
cnt6 | the sixth index |
Definition at line 148 of file ThreeDM.cpp.
void CheMPS2::ThreeDM::save_HAM | ( | const string | filename | ) | const |
Save the 3-RDM to disk in Hamiltonian indices.
filename | The filename to store the 3-RDM at |
Definition at line 371 of file ThreeDM.cpp.
|
static |
Generic save routine for objects of size LAS**6.
filename | The filename to store the object at |
LAS | The number of orbitals |
tag | The name of the object |
array | Pointer to the object |
Definition at line 378 of file ThreeDM.cpp.
double CheMPS2::ThreeDM::trace | ( | ) |
Return the trace (should be N(N-1)(N-2))
Definition at line 191 of file ThreeDM.cpp.