1 #ifndef QNANO_NEW_COULOMB_MATRIX_ELEMENTS_DEFINED_H 2 #define QNANO_NEW_COULOMB_MATRIX_ELEMENTS_DEFINED_H 4 #include "tools/Tensor4.h" 5 #include "tools/QNANO_Matrix.h" 6 #include "tools/Reader.h" 7 #include "manybody/Manybody_Hilbert_Space.h" 16 enum Type{ none, direct, exchange, ee, hh} type;
17 static std::string get_type_string(
enum Type type_);
19 void resize(
int nr_e,
int nr_h);
24 if(filename!=
"")
read(filename);
38 void read(
const std::string &filename,
bool read_size_from_file=
false);
39 void read_noheader(std::ifstream &ifs,
const std::string &filename_for_error=
"");
40 void print(
const std::string &filename,
int round_figure=8)
const;
65 :
Tensor4(i,j,k,l), type(type_) {
74 if(filename!=
"")
read(filename);
void read(const std::string &filename, bool read_size_from_file=false)
reader+printer:
Definition: Coulomb_Matrix_Elements.cc:38
Definition: Manybody_Hilbert_Space.h:8
void check_size_consistency() const
check if sizes are consistend with the type of the matrix element
Definition: Coulomb_Matrix_Elements.cc:125
Type
type: is it a direct, exchange, electron-electron or hole-hole matrix element?
Definition: Coulomb_Matrix_Elements.h:16
Class to store a rank-4 (complex) tensor:
Definition: Tensor4.h:9
void check_consistency(double accuracy=1e-6) const
check overall consistency
Definition: Coulomb_Matrix_Elements.h:32
Definition: Coulomb_Matrix_Elements.h:13
void apply_trafo(const QNANO_Matrix &trafo_e, const QNANO_Matrix &trafo_h)
apply unitary transformation for electron and hole states
Definition: Coulomb_Matrix_Elements.cc:208
bool is_hole(size_t i) const
does an index correspond to a hole (true) or to an electron(false)
Definition: Coulomb_Matrix_Elements.cc:171
void make_Hermitian()
used if only upper diagonal is specified in file
Definition: Coulomb_Matrix_Elements.cc:348
void check_Hermitian(double accuracy=1e-6) const
check if Hermitian
Definition: Coulomb_Matrix_Elements.cc:149
Definition: QNANO_Matrix.h:7