CheMPS2
CheMPS2::TwoDM Class Reference

#include <TwoDM.h>

Public Member Functions

 TwoDM (const SyBookkeeper *denBKIn, const Problem *ProbIn)
 Constructor. More...
 
virtual ~TwoDM ()
 Destructor.
 
double getTwoDMA_DMRG (const int cnt1, const int cnt2, const int cnt3, const int cnt4) const
 Get a 2DM_A term, using the DMRG indices. More...
 
double getTwoDMB_DMRG (const int cnt1, const int cnt2, const int cnt3, const int cnt4) const
 Get a 2DM_B term, using the DMRG indices. More...
 
double get1RDM_DMRG (const int cnt1, const int cnt2) const
 Get a 1-RDM term, using the DMRG indices. More...
 
double spin_density_dmrg (const int cnt1, const int cnt2) const
 Get a spin-density term, using the DMRG indices. More...
 
double getTwoDMA_HAM (const int cnt1, const int cnt2, const int cnt3, const int cnt4) const
 Get a 2DM_A term, using the HAM indices. More...
 
double getTwoDMB_HAM (const int cnt1, const int cnt2, const int cnt3, const int cnt4) const
 Get a 2DM_B term, using the HAM indices. More...
 
double get1RDM_HAM (const int cnt1, const int cnt2) const
 Get a 1-RDM term, using the HAM indices. More...
 
double spin_density_ham (const int cnt1, const int cnt2) const
 Get a spin-density term, using the HAM indices. More...
 
void FillSite (TensorT *denT, TensorL ***Ltens, TensorF0 ****F0tens, TensorF1 ****F1tens, TensorS0 ****S0tens, TensorS1 ****S1tens)
 Fill the 2DM terms with as second site index denT->gIndex() More...
 
void correct_higher_multiplicities ()
 After the whole 2-RDM is filled, a prefactor for higher multiplicities should be applied.
 
double trace () const
 Return the double trace of 2DM-A (should be N(N-1)) More...
 
double energy () const
 Calculate the energy based on the 2DM-A. More...
 
void print_noon () const
 Print the natural orbital occupation numbers.
 
void save () const
 Save the TwoDMs to disk.
 
void read ()
 Load the TwoDMs from disk.
 
void save_HAM (const string filename) const
 Save the 2-RDM-A to disk in Hamiltonian indices. More...
 
void write2DMAfile (const string filename) const
 Write the 2-RDM-A to a file. More...
 
void mpi_allreduce ()
 Add the 2-RDM elements of all MPI processes.
 

Detailed Description

TwoDM class.

Author
Sebastian Wouters sebas.nosp@m.tian.nosp@m.woute.nosp@m.rs@g.nosp@m.mail..nosp@m.com
Date
June 13, 2013

The TwoDM class stores the result of a converged DMRG calculation. With the 2DM
$ \Gamma_{(\alpha \sigma) (\beta \tau) ; (\gamma \sigma) (\delta \tau)} = \braket{ a^{\dagger}_{\alpha \sigma} a^{\dagger}_{\beta \tau} a_{\delta \tau} a_{\gamma \sigma} } $
we can define two spin-reduced versions of interest:
$ \Gamma^{2A}_{\alpha \beta ; \gamma \delta} = \sum_{\sigma \tau} \Gamma_{(\alpha \sigma) (\beta \tau) ; (\gamma \sigma) (\delta \tau)} $
$ \Gamma^{2B}_{\alpha \beta ; \gamma \delta} = \sum_{\sigma} \left( \Gamma_{(\alpha \sigma) (\beta \sigma) ; (\gamma \sigma) (\delta \sigma)} - \Gamma_{(\alpha \sigma) (\beta -\sigma) ; (\gamma \sigma) (\delta -\sigma)} \right) $.
Because the wave-function belongs to a certain Abelian irrep, $ I_{\alpha} \otimes I_{\beta} \otimes I_{\gamma} \otimes I_{\delta} = I_{trivial} $ must be valid before the corresponding element $ \Gamma^{A,B}_{\alpha \beta ; \gamma \delta} $ is non-zero.

We can also define spin-densities in the spin-ensemble as:

\begin{eqnarray*} \Gamma^{spin}_{ij} & = & \frac{3(1 - \delta_{S,0})}{(S+1)(2S+1)} \sum_{S^z} S^z \braket{ S S^z \mid a^{\dagger}_{i \uparrow} a_{j \uparrow} - a^{\dagger}_{i \downarrow} a_{j \downarrow} \mid S S^z } \\ & = & \frac{3(1 - \delta_{S,0})}{2(S+1)} \left[ ( 2 - N_{elec} ) \Gamma^1_{ij} - \sum_r \Gamma^{2A}_{ir;rj} - \sum_r \Gamma^{2B}_{ir;rj} \right] \end{eqnarray*}


The normalization factor is chosen so that $ trace( \Gamma^{spin} ) = 2 S $.

Definition at line 50 of file TwoDM.h.

Constructor & Destructor Documentation

CheMPS2::TwoDM::TwoDM ( const SyBookkeeper denBKIn,
const Problem ProbIn 
)

Constructor.

Parameters
denBKInSymmetry sector bookkeeper
ProbInThe problem to be solved

Definition at line 39 of file TwoDM.cpp.

+ Here is the call graph for this function:

Member Function Documentation

double CheMPS2::TwoDM::energy ( ) const

Calculate the energy based on the 2DM-A.

Returns
The energy calculated as 0.5*trace(2DM-A * Ham)

Definition at line 216 of file TwoDM.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CheMPS2::TwoDM::FillSite ( TensorT denT,
TensorL ***  Ltens,
TensorF0 ****  F0tens,
TensorF1 ****  F1tens,
TensorS0 ****  S0tens,
TensorS1 ****  S1tens 
)

Fill the 2DM terms with as second site index denT->gIndex()

Parameters
denTDMRG site-matrices
LtensLtensors
F0tensF0tensors
F1tensF1tensors
S0tensS0tensors
S1tensS1tensors

Definition at line 444 of file TwoDM.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double CheMPS2::TwoDM::get1RDM_DMRG ( const int  cnt1,
const int  cnt2 
) const

Get a 1-RDM term, using the DMRG indices.

Parameters
cnt1the first index
cnt2the second index
Returns
the desired value

Definition at line 127 of file TwoDM.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double CheMPS2::TwoDM::get1RDM_HAM ( const int  cnt1,
const int  cnt2 
) const

Get a 1-RDM term, using the HAM indices.

Parameters
cnt1the first index
cnt2the second index
Returns
the desired value

Definition at line 184 of file TwoDM.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double CheMPS2::TwoDM::getTwoDMA_DMRG ( const int  cnt1,
const int  cnt2,
const int  cnt3,
const int  cnt4 
) const

Get a 2DM_A term, using the DMRG indices.

Parameters
cnt1the first index
cnt2the second index
cnt3the third index
cnt4the fourth index
Returns
the desired value

Definition at line 97 of file TwoDM.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double CheMPS2::TwoDM::getTwoDMA_HAM ( const int  cnt1,
const int  cnt2,
const int  cnt3,
const int  cnt4 
) const

Get a 2DM_A term, using the HAM indices.

Parameters
cnt1the first index
cnt2the second index
cnt3the third index
cnt4the fourth index
Returns
the desired value

Definition at line 164 of file TwoDM.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double CheMPS2::TwoDM::getTwoDMB_DMRG ( const int  cnt1,
const int  cnt2,
const int  cnt3,
const int  cnt4 
) const

Get a 2DM_B term, using the DMRG indices.

Parameters
cnt1the first index
cnt2the second index
cnt3the third index
cnt4the fourth index
Returns
the desired value

Definition at line 112 of file TwoDM.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double CheMPS2::TwoDM::getTwoDMB_HAM ( const int  cnt1,
const int  cnt2,
const int  cnt3,
const int  cnt4 
) const

Get a 2DM_B term, using the HAM indices.

Parameters
cnt1the first index
cnt2the second index
cnt3the third index
cnt4the fourth index
Returns
the desired value

Definition at line 174 of file TwoDM.cpp.

+ Here is the call graph for this function:

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

Save the 2-RDM-A to disk in Hamiltonian indices.

Parameters
filenameThe filename to store the 2-RDM at

Definition at line 278 of file TwoDM.cpp.

+ Here is the call graph for this function:

double CheMPS2::TwoDM::spin_density_dmrg ( const int  cnt1,
const int  cnt2 
) const

Get a spin-density term, using the DMRG indices.

Parameters
cnt1the first index
cnt2the second index
Returns
the desired value

Definition at line 143 of file TwoDM.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double CheMPS2::TwoDM::spin_density_ham ( const int  cnt1,
const int  cnt2 
) const

Get a spin-density term, using the HAM indices.

Parameters
cnt1the first index
cnt2the second index
Returns
the desired value

Definition at line 194 of file TwoDM.cpp.

+ Here is the call graph for this function:

double CheMPS2::TwoDM::trace ( ) const

Return the double trace of 2DM-A (should be N(N-1))

Returns
Double trace of 2DM-A

Definition at line 204 of file TwoDM.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CheMPS2::TwoDM::write2DMAfile ( const string  filename) const

Write the 2-RDM-A to a file.

param filename where to write the 2-RDM-A elements to

Definition at line 372 of file TwoDM.cpp.

+ Here is the call graph for this function:


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