20 #ifndef HAMILTONIAN_CHEMPS2_H
21 #define HAMILTONIAN_CHEMPS2_H
66 Hamiltonian(
const int Norbitals,
const int nGroup,
const int * OrbIrreps);
111 void setTmat(
const int index1,
const int index2,
const double val);
119 void setVmat(
const int index1,
const int index2,
const int index3,
const int index4,
const double val);
127 void addToVmat(
const int index1,
const int index2,
const int index3,
const int index4,
const double val);
137 double getTmat(
const int index1,
const int index2)
const;
145 double getVmat(
const int index1,
const int index2,
const int index3,
const int index4)
const;
159 void save2(
const string filename)
const;
161 void read2(
const string filename);
196 std::unique_ptr<TwoIndex>
Tmat;
199 std::unique_ptr<FourIndex>
Vmat;
205 void CreateAndFillFromH5(
const string file_parent,
const string file_tmat,
const string file_vmat);
static Hamiltonian CreateFromH5(const string filename)
void reset()
set everything to zero
std::unique_ptr< int[]> orb2indexSy
void setTmat(const int index1, const int index2, const double val)
Set a Tmat element.
int getOrbitalIrrep(const int nOrb) const
Get an orbital irrep number.
double getVmat(const int index1, const int index2, const int index3, const int index4) const
Get a Vmat element.
void debugcheck() const
Debug check certain elements and sums.
void setVmat(const int index1, const int index2, const int index3, const int index4, const double val)
Set a Vmat element.
void save(const string file_parent=HAMILTONIAN_ParentStorageName, const string file_tmat=HAMILTONIAN_TmatStorageName, const string file_vmat=HAMILTONIAN_VmatStorageName) const
Save the Hamiltonian.
void setEconst(const double val)
Set the constant energy.
std::unique_ptr< FourIndex > Vmat
void read(const string file_parent=HAMILTONIAN_ParentStorageName, const string file_tmat=HAMILTONIAN_TmatStorageName, const string file_vmat=HAMILTONIAN_VmatStorageName)
Load the Hamiltonian.
void save2(const string filename) const
double getTmat(const int index1, const int index2) const
Get a Tmat element.
const string HAMILTONIAN_ParentStorageName
std::unique_ptr< TwoIndex > Tmat
void CreateAndFillFromH5(const string file_parent, const string file_tmat, const string file_vmat)
void addToVmat(const int index1, const int index2, const int index3, const int index4, const double val)
Add to Vmat element.
void CreateAndFillFromPsi4dump(const string filename)
virtual ~Hamiltonian()=default
Destructor.
Hamiltonian & operator=(const Hamiltonian &)
std::unique_ptr< int[]> orb2irrep
void read2(const string filename)
const string HAMILTONIAN_VmatStorageName
int getNGroup() const
Get the group number.
double getEconst() const
Get the constant energy.
Hamiltonian(const int Norbitals, const int nGroup, const int *OrbIrreps)
Constructor.
int getL() const
Get the number of orbitals.
const string HAMILTONIAN_TmatStorageName
std::unique_ptr< int[]> irrep2num_orb