CheMPS2
CheMPS2::ThreeDM Class Reference

#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...
 

Detailed Description

ThreeDM class.

Author
Sebastian Wouters sebas.nosp@m.tian.nosp@m.woute.nosp@m.rs@g.nosp@m.mail..nosp@m.com
Date
November 16, 2015

The ThreeDM class stores the spin-summed three-particle reduced density matrix (3-RDM) of a converged DMRG calculation:
$ \Gamma_{ijk;lmn} = \sum_{\sigma \tau s} \braket{ a^{\dagger}_{i \sigma} a^{\dagger}_{j \tau} a^{\dagger}_{k s} a_{n s} a_{m \tau} a_{l \sigma}} $
Because the wave-function belongs to a certain Abelian irrep, $ I_{i} \otimes I_{j} \otimes I_{k} = I_{l} \otimes I_{m} \otimes I_{n} $ must be valid before the corresponding element $ \Gamma_{ijk;lmn} $ is non-zero.

Definition at line 41 of file ThreeDM.h.

Constructor & Destructor Documentation

CheMPS2::ThreeDM::ThreeDM ( const SyBookkeeper book_in,
const Problem prob_in,
const bool  disk_in 
)

Constructor.

Parameters
book_inSymmetry sector bookkeeper
prob_inThe problem to be solved
disk_inWhether 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.

+ Here is the call graph for this function:

Member Function Documentation

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 ].

Parameters
alphaThe prefactor
addWhether to add to, or to set the storage
storageArray of size L * L * L * L * L * last_orb_num
last_orb_startBegin index for the sixth orbital of the 3-RDM
last_orb_numNumber of consecutive sixth orbitals to copy

Definition at line 155 of file ThreeDM.cpp.

+ Here is the caller graph for this function:

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()

Parameters
denTDMRG site-matrices
LtensLtensors
F0tensF0tensors
F1tensF1tensors
S0tensS0tensors
S1tensS1tensors
dm3_a_J0_doubletRenormalized operator of three second quantized operators: annihilator, annihilator, annihilator
dm3_a_J1_doubletRenormalized operator of three second quantized operators: annihilator, annihilator, annihilator
dm3_a_J1_quartetRenormalized operator of three second quantized operators: annihilator, annihilator, annihilator
dm3_b_J0_doubletRenormalized operator of three second quantized operators: annihilator, annihilator, creator
dm3_b_J1_doubletRenormalized operator of three second quantized operators: annihilator, annihilator, creator
dm3_b_J1_quartetRenormalized operator of three second quantized operators: annihilator, annihilator, creator
dm3_c_J0_doubletRenormalized operator of three second quantized operators: annihilator, creator, annihilator
dm3_c_J1_doubletRenormalized operator of three second quantized operators: annihilator, creator, annihilator
dm3_c_J1_quartetRenormalized operator of three second quantized operators: annihilator, creator, annihilator
dm3_d_J0_doubletRenormalized operator of three second quantized operators: creator, annihilator, annihilator
dm3_d_J1_doubletRenormalized operator of three second quantized operators: creator, annihilator, annihilator
dm3_d_J1_quartetRenormalized operator of three second quantized operators: creator, annihilator, annihilator

Definition at line 398 of file ThreeDM.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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.

Parameters
cnt1the first index
cnt2the second index
cnt3the third index
cnt4the fourth index
cnt5the fifth index
cnt6the sixth index
Returns
the desired value

Definition at line 148 of file ThreeDM.cpp.

+ Here is the caller graph for this function:

void CheMPS2::ThreeDM::save_HAM ( const string  filename) const

Save the 3-RDM to disk in Hamiltonian indices.

Parameters
filenameThe filename to store the 3-RDM at

Definition at line 371 of file ThreeDM.cpp.

+ Here is the call graph for this function:

void CheMPS2::ThreeDM::save_HAM_generic ( const string  filename,
const int  LAS,
const string  tag,
double *  array 
)
static

Generic save routine for objects of size LAS**6.

Parameters
filenameThe filename to store the object at
LASThe number of orbitals
tagThe name of the object
arrayPointer to the object

Definition at line 378 of file ThreeDM.cpp.

+ Here is the caller graph for this function:

double CheMPS2::ThreeDM::trace ( )

Return the trace (should be N(N-1)(N-2))

Returns
Trace of the 3-RDM

Definition at line 191 of file ThreeDM.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


The documentation for this class was generated from the following files: