DOCI-Exact  1.0
LocalMinimizer.h
Go to the documentation of this file.
1 #ifndef LOCALMINIMIZER_H
2 #define LOCALMINIMIZER_H
3 
4 #include <memory>
5 #include <vector>
6 #include <tuple>
7 #include <random>
8 
9 #include "DOCIHamtilonian.h"
10 #include "SymMolecule.h"
11 #include "DM2.h"
12 
13 #include "UnitaryMatrix.h"
14 #include "OrbitalTransform.h"
15 
16 
17 namespace doci {
18 
20 {
21  public:
23 
25 
26  virtual ~LocalMinimizer();
27 
28  void Minimize(bool dist_choice=false);
29 
30  double get_energy() const;
31 
32  double calc_new_energy();
33 
34  double calc_new_energy(const doci::Sym_Molecule &);
35 
36  void calc_energy();
37 
39 
40  doci::Sym_Molecule& getHam() const;
41 
43 
44  std::vector<std::tuple<int,int,double,double>> scan_orbitals();
45 
46  double get_conv_crit() const;
47 
48  void set_conv_crit(double);
49 
50  void set_conv_steps(int);
51 
52  int choose_orbitalpair(std::vector<std::tuple<int,int,double,double>> &);
53 
54  const doci::DM2& get_DM2() const;
55 
56  private:
57 
59  double conv_crit;
60 
61  double energy;
62 
64  int conv_steps;
65 
66  std::unique_ptr<doci::DOCIHamiltonian> method;
67 
68  std::unique_ptr<doci::DM2> rdm;
69 
71  std::unique_ptr<simanneal::OrbitalTransform> orbtrans;
72 
74  std::unique_ptr<simanneal::UnitaryMatrix> opt_unitary;
75 
77  std::mt19937 mt;
78 
80  std::vector<int> allow_irreps;
81 };
82 
83 }
84 
85 #endif /* LOCALMINIMIZER_H */
86 
87 /* vim: set ts=3 sw=3 expandtab :*/
simanneal::OrbitalTransform & getOrbitalTf() const
void Minimize(bool dist_choice=false)
simanneal::UnitaryMatrix & get_Optimal_Unitary()
int choose_orbitalpair(std::vector< std::tuple< int, int, double, double >> &)
Definition: DM2.h:24
void set_conv_crit(double)
const doci::DM2 & get_DM2() const
virtual ~LocalMinimizer()
doci::Sym_Molecule & getHam() const
LocalMinimizer(const doci::Sym_Molecule &)
double get_energy() const
std::vector< std::tuple< int, int, double, double > > scan_orbitals()
double get_conv_crit() const