DOCI-Exact  1.0
SymMolecule.cpp
Go to the documentation of this file.
1 #include <iostream>
2 #include <assert.h>
3 
4 #include "SymMolecule.h"
5 // From CIFLOW
6 #include "Hamiltonian.h"
7 
8 doci::Sym_Molecule::Sym_Molecule(std::string filename) : ham(nullptr)
9 {
11 }
12 
14 {
15  ham.reset(new CheMPS2::Hamiltonian(*orig.ham));
16 }
17 
18 // cannot do this in header as Hamiltonian is an incomplete type:
19 // https://stackoverflow.com/questions/13414652/forward-declaration-with-unique-ptr
21 
23 {
24  return new doci::Sym_Molecule(*this);
25 }
26 
28 {
29  return new doci::Sym_Molecule(std::move(*this));
30 }
31 
32 double doci::Sym_Molecule::getT(int a, int b) const
33 {
34  return ham->getTmat(a,b);
35 }
36 
37 double doci::Sym_Molecule::getV(int a, int b, int c, int d) const
38 {
39  return ham->getVmat(a,b,c,d);
40 }
41 
43 {
44 // return ham->get_hf_energy();
45  return 0;
46 }
47 
49 {
50  return ham->getEconst();
51 }
52 
53 unsigned int doci::Sym_Molecule::get_n_sp() const
54 {
55  return ham->getL();
56 }
57 
59 {
60  return ham->getNe();
61 }
62 
68 {
69  return *ham;
70 }
71 
73 {
74  return *ham;
75 }
76 
77 /* vim: set ts=3 sw=3 expandtab :*/
static Hamiltonian CreateFromH5(const string filename)
Sym_Molecule(std::string filename)
Definition: SymMolecule.cpp:8
unsigned int get_n_sp() const
Definition: SymMolecule.cpp:53
virtual ~Sym_Molecule()
unsigned int get_n_electrons() const
Definition: SymMolecule.cpp:58
Sym_Molecule * clone() const
Definition: SymMolecule.cpp:22
Sym_Molecule * move()
Definition: SymMolecule.cpp:27
double getV(int, int, int, int) const
Definition: SymMolecule.cpp:37
double getT(int, int) const
Definition: SymMolecule.cpp:32
double HF_Energy() const
Definition: SymMolecule.cpp:42
double get_nucl_rep() const
Definition: SymMolecule.cpp:48
CheMPS2::Hamiltonian & getHamObject() const
Definition: SymMolecule.cpp:67