DOCI-Exact  1.0
SimulatedAnnealing.h
Go to the documentation of this file.
1 #ifndef SIM_ANNEAL_H
2 #define SIM_ANNEAL_H
3 
4 #include <random>
5 
6 #include "SymMolecule.h"
7 #include "DOCIHamtilonian.h"
8 
9 namespace simanneal {
10 class OrbitalTransform;
11 class UnitaryMatrix;
12 }
13 
14 namespace doci { class SimulatedAnnealing; }
15 
17 {
18  public:
20 
22 
23  virtual ~SimulatedAnnealing();
24 
25  bool accept_function(double);
26 
27  void optimize();
28 
29  double calc_new_energy();
30 
31  void calc_energy();
32 
33  double get_energy() const;
34 
35  void Set_max_angle(double);
36 
37  void Set_delta_angle(double);
38 
39  void Set_start_temp(double);
40 
41  void Set_delta_temp(double);
42 
44 
45  doci::Sym_Molecule& getMol() const;
46 
48 
49  private:
50 
52  std::unique_ptr<doci::DOCIHamiltonian> ham;
53 
55  std::unique_ptr<simanneal::OrbitalTransform> orbtrans;
56 
58  std::unique_ptr<simanneal::UnitaryMatrix> opt_unitary;
59 
61  double energy;
63  double start_temp;
65  double delta_temp;
67  double delta_angle;
69  double max_angle;
71  unsigned int steps;
73  unsigned int max_steps;
74 
75  double cur_temp;
76 
78  std::random_device rd;
80  std::mt19937_64 mt;
81 };
82 
83 
84 #endif /* SIM_ANNEAL_H */
85 
86 /* vim: set ts=3 sw=3 expandtab :*/
doci::DOCIHamiltonian & getHam() const
SimulatedAnnealing(doci::Sym_Molecule &)
simanneal::OrbitalTransform & getOrbitaltf() const
doci::Sym_Molecule & getMol() const