v2DM-DOCI  1.0
simanneal::OrbitalTransform Class Reference

#include <OrbitalTransform.h>

+ Collaboration diagram for simanneal::OrbitalTransform:

Public Member Functions

 OrbitalTransform (const CheMPS2::Hamiltonian &ham)
 
virtual ~OrbitalTransform ()=default
 
void fillHamCI (CheMPS2::Hamiltonian &HamCI)
 
void fillConstAndTmat (CheMPS2::Hamiltonian &Ham) const
 
void buildOneBodyMatrixElements ()
 
void set_unitary (UnitaryMatrix &unit)
 
CheMPS2::Hamiltonianget_ham ()
 
const CheMPS2::Hamiltonianget_ham () const
 
double TmatRotated (const int index1, const int index2) const
 
double get_norb (int irrep) const
 
double get_difference_orig (CheMPS2::Hamiltonian &hamin) const
 
void CheckDeviationFromUnitary () const
 
void update_unitary (double *step)
 
UnitaryMatrixget_unitary ()
 
UnitaryMatrixget_unitary () const
 
void DoJacobiRotation (CheMPS2::Hamiltonian &, int k, int l, double theta)
 
void update_unitary (const UnitaryMatrix &, bool replace=false)
 

Private Member Functions

void rotate_old_to_new (std::unique_ptr< double[]> *matrix)
 

Private Attributes

std::unique_ptr< CheMPS2::Hamiltonian_hamorig
 the orginal hamiltonian More...
 
std::unique_ptr< simanneal::UnitaryMatrix_unitary
 The rotation to perfrom on _hamorig to get the current hamiltonian. More...
 
std::unique_ptr< CheMPS2::Hamiltonianham_rot
 
OptIndex index
 
CheMPS2::Irreps SymmInfo
 
int numberOfIrreps
 
std::vector< std::unique_ptr< double[]> > QmatrixWork
 Some memory to do the one body work, allocated when needed. More...
 
std::vector< std::unique_ptr< double[]> > OneBodyMatrixElements
 
std::unique_ptr< double[]> mem1
 
std::unique_ptr< double[]> mem2
 

Detailed Description

Definition at line 16 of file OrbitalTransform.h.

Constructor & Destructor Documentation

OrbitalTransform::OrbitalTransform ( const CheMPS2::Hamiltonian ham)

Definition at line 35 of file OrbitalTransform.cpp.

+ Here is the call graph for this function:

virtual simanneal::OrbitalTransform::~OrbitalTransform ( )
virtualdefault

Member Function Documentation

void OrbitalTransform::buildOneBodyMatrixElements ( )

This method fills the OneBodyMatrixElements array with the 1-body matrix elements so we can rotate them

Definition at line 138 of file OrbitalTransform.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void OrbitalTransform::CheckDeviationFromUnitary ( ) const

Definition at line 247 of file OrbitalTransform.cpp.

void OrbitalTransform::DoJacobiRotation ( CheMPS2::Hamiltonian ham_rot,
int  k,
int  l,
double  theta 
)

Update ham_rot in place with a jacobi rotation between orbital k and l over an angle of theta. k and l should be in the same irrep.

Parameters
ham_rotThe Hamiltonian to update
kthe first orbital
lthe second orbital
thetathe angle to rotation over
Returns
an rotated Hamiltonian

Definition at line 288 of file OrbitalTransform.cpp.

+ Here is the call graph for this function:

void OrbitalTransform::fillConstAndTmat ( CheMPS2::Hamiltonian Ham) const

Definition at line 221 of file OrbitalTransform.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void OrbitalTransform::fillHamCI ( CheMPS2::Hamiltonian HamCI)

Definition at line 64 of file OrbitalTransform.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double OrbitalTransform::get_difference_orig ( CheMPS2::Hamiltonian hamin) const

Definition at line 240 of file OrbitalTransform.cpp.

CheMPS2::Hamiltonian& simanneal::OrbitalTransform::get_ham ( )
inline

Definition at line 26 of file OrbitalTransform.h.

const CheMPS2::Hamiltonian& simanneal::OrbitalTransform::get_ham ( ) const
inline

Definition at line 27 of file OrbitalTransform.h.

double OrbitalTransform::get_norb ( int  irrep) const

Definition at line 257 of file OrbitalTransform.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UnitaryMatrix& simanneal::OrbitalTransform::get_unitary ( )
inline

Definition at line 35 of file OrbitalTransform.h.

+ Here is the caller graph for this function:

UnitaryMatrix& simanneal::OrbitalTransform::get_unitary ( ) const
inline

Definition at line 36 of file OrbitalTransform.h.

void OrbitalTransform::rotate_old_to_new ( std::unique_ptr< double[]> *  matrix)
private

Calculates the rotation of the 1-body matrix T' = Q * T * Q^T It uses the OneBodyMatrixElements array as start and endpoint point and uses the Qmatrixwork as temp storage

Definition at line 180 of file OrbitalTransform.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void OrbitalTransform::set_unitary ( UnitaryMatrix unit)

Definition at line 252 of file OrbitalTransform.cpp.

double OrbitalTransform::TmatRotated ( const int  index1,
const int  index2 
) const

Definition at line 201 of file OrbitalTransform.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void OrbitalTransform::update_unitary ( double *  step)

Definition at line 262 of file OrbitalTransform.cpp.

+ Here is the caller graph for this function:

void OrbitalTransform::update_unitary ( const UnitaryMatrix X,
bool  replace = false 
)

Update the unitary matrix with exp(X). In X you should store an anti-symmetric real matrix.

Parameters
Xthe anti-symmetric real matrix
replacereplace or multiply? By default do exp(X)*U

Definition at line 273 of file OrbitalTransform.cpp.

Member Data Documentation

std::unique_ptr<CheMPS2::Hamiltonian> simanneal::OrbitalTransform::_hamorig
private

the orginal hamiltonian

Definition at line 46 of file OrbitalTransform.h.

std::unique_ptr<simanneal::UnitaryMatrix> simanneal::OrbitalTransform::_unitary
private

The rotation to perfrom on _hamorig to get the current hamiltonian.

Definition at line 48 of file OrbitalTransform.h.

std::unique_ptr<CheMPS2::Hamiltonian> simanneal::OrbitalTransform::ham_rot
private

Definition at line 50 of file OrbitalTransform.h.

OptIndex simanneal::OrbitalTransform::index
private

Definition at line 52 of file OrbitalTransform.h.

std::unique_ptr<double []> simanneal::OrbitalTransform::mem1
private

Definition at line 61 of file OrbitalTransform.h.

std::unique_ptr<double []> simanneal::OrbitalTransform::mem2
private

Definition at line 62 of file OrbitalTransform.h.

int simanneal::OrbitalTransform::numberOfIrreps
private

Definition at line 54 of file OrbitalTransform.h.

std::vector< std::unique_ptr<double []> > simanneal::OrbitalTransform::OneBodyMatrixElements
private

Definition at line 59 of file OrbitalTransform.h.

std::vector< std::unique_ptr<double []> > simanneal::OrbitalTransform::QmatrixWork
private

Some memory to do the one body work, allocated when needed.

Definition at line 57 of file OrbitalTransform.h.

CheMPS2::Irreps simanneal::OrbitalTransform::SymmInfo
private

Definition at line 53 of file OrbitalTransform.h.


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