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);
187 std::unique_ptr<int []> orb2irrep;
190 std::unique_ptr<int []> irrep2num_orb;
193 std::unique_ptr<int []> orb2indexSy;
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);
208 void CreateAndFillFromPsi4dump(
const string filename);
static Hamiltonian CreateFromH5(const string filename)
void reset()
set everything to zero
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.
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
void addToVmat(const int index1, const int index2, const int index3, const int index4, const double val)
Add to Vmat element.
virtual ~Hamiltonian()=default
Destructor.
Hamiltonian & operator=(const Hamiltonian &)
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