v2DM-DOCI
1.0
|
#include <SimulatedAnnealing.h>
Public Member Functions | |
SimulatedAnnealing (const CheMPS2::Hamiltonian &) | |
SimulatedAnnealing (CheMPS2::Hamiltonian &&) | |
virtual | ~SimulatedAnnealing () |
bool | accept_function (double) |
void | optimize () |
void | optimize_mpi () |
double | calc_new_energy () |
void | calc_energy () |
double | get_energy () const |
void | Set_max_angle (double) |
void | Set_delta_angle (double) |
void | Set_start_temp (double) |
void | Set_delta_temp (double) |
simanneal::UnitaryMatrix & | get_Optimal_Unitary () |
CheMPS2::Hamiltonian & | getHam () const |
OrbitalTransform & | getOrbitalTf () const |
doci2DM::Method & | getMethod () const |
void | UseBoundaryPoint () |
void | UsePotentialReduction () |
doci2DM::PotentialReduction & | getMethod_PR () const |
doci2DM::BoundaryPoint & | getMethod_BP () const |
Private Attributes | |
std::unique_ptr< doci2DM::Method > | method |
std::unique_ptr< CheMPS2::Hamiltonian > | ham |
Holds the current hamiltonian. More... | |
std::unique_ptr< simanneal::OrbitalTransform > | orbtrans |
the actual orbital transform More... | |
std::unique_ptr< simanneal::UnitaryMatrix > | opt_unitary |
the current unitary More... | |
double | energy |
energy of current iteration More... | |
double | start_temp |
the start temperatur More... | |
double | delta_temp |
the change in temperatur between steps More... | |
double | delta_angle |
the change in the angle allows in steps More... | |
double | max_angle |
the maximum allows angle More... | |
unsigned int | steps |
the number of steps done More... | |
unsigned int | max_steps |
max number of steps More... | |
double | cur_temp |
current temperature More... | |
unsigned int | unaccepted |
number of unaccepted steps More... | |
bool | stop_running |
bool to indicate if we should quite the optimalisation More... | |
std::random_device | rd |
the real random input (hopefully) More... | |
std::mt19937_64 | mt |
our pseudo-random generator More... | |
Definition at line 42 of file SimulatedAnnealing.h.
simanneal::SimulatedAnnealing::SimulatedAnnealing | ( | const CheMPS2::Hamiltonian & | mol | ) |
You still need to set the max_angle, delta_angle, start_temp and delta_temp after creating the object.
mol | the molecular data to use |
Definition at line 46 of file SimulatedAnnealing.cpp.
simanneal::SimulatedAnnealing::SimulatedAnnealing | ( | CheMPS2::Hamiltonian && | mol | ) |
Definition at line 67 of file SimulatedAnnealing.cpp.
|
virtualdefault |
bool simanneal::SimulatedAnnealing::accept_function | ( | double | e_new | ) |
Decide wether or not to accept the new energy
e_new | the new energy |
Definition at line 123 of file SimulatedAnnealing.cpp.
void simanneal::SimulatedAnnealing::calc_energy | ( | ) |
Calculate the energy with the current molecular data
Definition at line 145 of file SimulatedAnnealing.cpp.
double simanneal::SimulatedAnnealing::calc_new_energy | ( | ) |
Calculate the energy with the current molecular data
Definition at line 157 of file SimulatedAnnealing.cpp.
double simanneal::SimulatedAnnealing::get_energy | ( | ) | const |
Definition at line 93 of file SimulatedAnnealing.cpp.
simanneal::UnitaryMatrix & simanneal::SimulatedAnnealing::get_Optimal_Unitary | ( | ) |
Definition at line 281 of file SimulatedAnnealing.cpp.
CheMPS2::Hamiltonian & simanneal::SimulatedAnnealing::getHam | ( | ) | const |
Definition at line 286 of file SimulatedAnnealing.cpp.
doci2DM::Method & simanneal::SimulatedAnnealing::getMethod | ( | ) | const |
Definition at line 296 of file SimulatedAnnealing.cpp.
doci2DM::BoundaryPoint & simanneal::SimulatedAnnealing::getMethod_BP | ( | ) | const |
Return a reference to a BoundaryPoint object. Only works if the actual method is BoundaryPoint. You should always wrap this in a try/catch block and check for a std::bad_cast exception
Definition at line 320 of file SimulatedAnnealing.cpp.
doci2DM::PotentialReduction & simanneal::SimulatedAnnealing::getMethod_PR | ( | ) | const |
Return a reference to a PotentialReduction object. Only works if the actual method is PotentialReduction. You should always wrap this in a try/catch block and check for a std::bad_cast exception
Definition at line 307 of file SimulatedAnnealing.cpp.
simanneal::OrbitalTransform & simanneal::SimulatedAnnealing::getOrbitalTf | ( | ) | const |
Definition at line 291 of file SimulatedAnnealing.cpp.
void simanneal::SimulatedAnnealing::optimize | ( | ) |
Do the simulated annealing
Definition at line 170 of file SimulatedAnnealing.cpp.
void simanneal::SimulatedAnnealing::optimize_mpi | ( | ) |
void simanneal::SimulatedAnnealing::Set_delta_angle | ( | double | delta_angle | ) |
Definition at line 103 of file SimulatedAnnealing.cpp.
void simanneal::SimulatedAnnealing::Set_delta_temp | ( | double | delta_temp | ) |
Definition at line 113 of file SimulatedAnnealing.cpp.
void simanneal::SimulatedAnnealing::Set_max_angle | ( | double | max_angle | ) |
Definition at line 98 of file SimulatedAnnealing.cpp.
void simanneal::SimulatedAnnealing::Set_start_temp | ( | double | start_temp | ) |
Definition at line 108 of file SimulatedAnnealing.cpp.
void simanneal::SimulatedAnnealing::UseBoundaryPoint | ( | ) |
Definition at line 327 of file SimulatedAnnealing.cpp.
void simanneal::SimulatedAnnealing::UsePotentialReduction | ( | ) |
Definition at line 332 of file SimulatedAnnealing.cpp.
|
private |
current temperature
Definition at line 116 of file SimulatedAnnealing.h.
|
private |
the change in the angle allows in steps
Definition at line 107 of file SimulatedAnnealing.h.
|
private |
the change in temperatur between steps
Definition at line 105 of file SimulatedAnnealing.h.
|
private |
energy of current iteration
Definition at line 101 of file SimulatedAnnealing.h.
|
private |
Holds the current hamiltonian.
Definition at line 92 of file SimulatedAnnealing.h.
|
private |
the maximum allows angle
Definition at line 109 of file SimulatedAnnealing.h.
|
private |
max number of steps
Definition at line 113 of file SimulatedAnnealing.h.
|
private |
Definition at line 89 of file SimulatedAnnealing.h.
|
private |
our pseudo-random generator
Definition at line 127 of file SimulatedAnnealing.h.
|
private |
the current unitary
Definition at line 98 of file SimulatedAnnealing.h.
|
private |
the actual orbital transform
Definition at line 95 of file SimulatedAnnealing.h.
|
private |
the real random input (hopefully)
Definition at line 125 of file SimulatedAnnealing.h.
|
private |
the start temperatur
Definition at line 103 of file SimulatedAnnealing.h.
|
private |
the number of steps done
Definition at line 111 of file SimulatedAnnealing.h.
|
private |
bool to indicate if we should quite the optimalisation
Definition at line 122 of file SimulatedAnnealing.h.
|
private |
number of unaccepted steps
Definition at line 119 of file SimulatedAnnealing.h.