10 #ifndef ElectronicStructure_H
11 #define ElectronicStructure_H
15 #include "units_pyxaid.h"
16 #include "InputStructure.h"
17 #include <boost/python.hpp>
18 using namespace boost::python;
21 #include "liblibra_core.h"
22 using namespace liblibra::librandom;
23 using namespace liblibra::liblinalg;
29 void update_decoherence_times(CMATRIX& rates);
30 void project_out(
int i);
34 void rot1(
double phi,
int i,
int j);
35 void rot2(
double phi,
int i,
int j);
36 void rot(complex<double> Hij,
double dt,
int i,
int j);
37 void phase(complex<double> Hii,
double dt,
int i);
74 complex<double> tmp(0.0,0.0);
75 vector<double> tmp1(n,0.0);
76 Ccurr =
new CMATRIX(n,1); *Ccurr = tmp;
77 Cprev =
new CMATRIX(n,1); *Cprev = tmp;
78 Cnext =
new CMATRIX(n,1); *Cnext = tmp;
80 g = std::vector<double>(n*n,0.0);
82 A =
new CMATRIX(n,n); *A = tmp;
84 Hcurr =
new CMATRIX(n,n); *Hcurr = tmp;
85 Hprev =
new CMATRIX(n,n); *Hprev = tmp;
86 Hnext =
new CMATRIX(n,n); *Hnext = tmp;
87 dHdt =
new CMATRIX(n,n); *dHdt = tmp;
89 Hprimex =
new CMATRIX(n,n); *Hprimex = tmp;
90 Hprimey =
new CMATRIX(n,n); *Hprimey = tmp;
91 Hprimez =
new CMATRIX(n,n); *Hprimez = tmp;
94 tau_m = std::vector<double>(n,0.0);
95 t_m = std::vector<double>(n,0.0);
99 int n = es.num_states;
101 curr_state = es.curr_state;
103 complex<double> tmp(0.0,0.0);
104 vector<double> tmp1(n,0.0);
105 Ccurr =
new CMATRIX(n,1);
106 Cprev =
new CMATRIX(n,1);
107 Cnext =
new CMATRIX(n,1);
109 g = std::vector<double>(n*n,0.0);
111 A =
new CMATRIX(n,n);
113 Hcurr =
new CMATRIX(n,n);
114 Hprev =
new CMATRIX(n,n);
115 Hnext =
new CMATRIX(n,n);
116 dHdt =
new CMATRIX(n,n);
118 Hprimex =
new CMATRIX(n,n);
119 Hprimey =
new CMATRIX(n,n);
120 Hprimez =
new CMATRIX(n,n);
126 *Ccurr = *es.Ccurr; *Cprev = *es.Cprev; *Cnext = *es.Cnext;
127 g = es.g; *A = *es.A;
128 *Hcurr = *es.Hcurr; *Hprev = *es.Hprev; *Hnext = *es.Hnext; *dHdt = *es.dHdt;
129 *Hprimex = *es.Hprimex; *Hprimey = *es.Hprimey; *Hprimez = *es.Hprimez;
134 if(g.size()>0) {g.clear();}
135 if(Ccurr!=NULL) {
delete Ccurr;}
136 if(Cprev!=NULL) {
delete Cprev;}
137 if(Cnext!=NULL) {
delete Cnext;}
138 if(A!=NULL) {
delete A;}
139 if(Hcurr!=NULL){
delete Hcurr;}
140 if(Hprev!=NULL){
delete Hprev;}
141 if(Hnext!=NULL){
delete Hnext;}
142 if(dHdt!=NULL){
delete dHdt;}
143 if(Hprimex!=NULL){
delete Hprimex; }
144 if(Hprimey!=NULL){
delete Hprimey; }
145 if(Hprimez!=NULL){
delete Hprimez; }
146 if(tau_m.size()>0){ tau_m.clear(); }
147 if(t_m.size()>0){ t_m.clear(); }
152 num_states = es.num_states;
153 curr_state = es.curr_state;
154 *Ccurr = *es.Ccurr; *Cprev = *es.Cprev; *Cnext = *es.Cnext;
155 g = es.g; *A = *es.A;
156 *Hcurr = *es.Hcurr; *Hprev = *es.Hprev; *Hnext = *es.Hnext;
157 *Hprimex = *es.Hprimex; *Hprimey = *es.Hprimey; *Hprimez = *es.Hprimez;
159 tau_m = es.tau_m; t_m = es.t_m;
167 num_states = es.num_states;
168 curr_state = es.curr_state;
183 void set_state(
int indx){
184 for(
int i=0;i<num_states;i++){
185 if(i==indx){ Ccurr->M[i] = complex<double>(1.0,0.0); }
else{ Ccurr->M[i] = 0.0; }
192 void update_populations();
193 void update_hop_prob(
double dt,
int is_boltz_flag,
double Temp, CMATRIX& Ef);
196 void update_hop_prob_fssh(
double dt,
int is_boltz_flag,
double Temp, CMATRIX& Ef,
double Ex, CMATRIX&);
197 void update_hop_prob_mssh(
double dt,
int is_boltz_flag,
double Temp, CMATRIX& Ef,
double Ex, CMATRIX&);
198 void update_hop_prob_gfsh(
double dt,
int is_boltz_flag,
double Temp, CMATRIX& Ef,
double Ex, CMATRIX&);
199 void init_hop_prob1();
201 void check_decoherence(
double dt,
int boltz_flag,
double Temp, CMATRIX& rates, Random& rnd);
203 void propagate_coefficients(
double dt, CMATRIX& Ef);
204 void propagate_coefficients(
double dt, CMATRIX& Ef, CMATRIX&);
205 void propagate_coefficients1(
double dt,
int opt, CMATRIX& Ef);
206 void propagate_coefficients2(
double dt, CMATRIX& Ef);
211 #endif // ElectronicStructure_H
Definition: ElectronicStructure.h:26