You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vector<double> hopping_probabilities_gfsh(dyn_control_params& prms, CMATRIX& denmat, CMATRIX& Hvib, int act_state_indx){
374
378
/**
375
379
\brief Compute the GFSH surface hopping probabilities for a single trajectory
@@ -468,6 +472,100 @@ vector<double> hopping_probabilities_gfsh(dyn_control_params& prms, CMATRIX& den
468
472
469
473
470
474
475
+
476
+
vector<double> hopping_probabilities_gfsh_orig(dyn_control_params& prms, CMATRIX& denmat, CMATRIX& denmat_old, int act_state_indx){
477
+
/**
478
+
\brief Compute the GFSH surface hopping probabilities for a single trajectory
479
+
480
+
Abbreviation: GFSH - global flux surface hopping
481
+
References:
482
+
(1) Wang, L.; Trivedi, D.; Prezhdo, O. V. Global Flux Surface Hopping Approach for Mixed Quantum-Classical Dynamics. J. Chem. Theory Comput. 2014, 10, 3598–3605.
483
+
(2) Akimov, A. V. Libra: An Open-Source “Methodology Discovery” Library for Quantum and Classical Dynamics Simulations.
484
+
J. Comput. Chem. 2016, 37, 1626–1649.
485
+
486
+
\param[in] key parameters needed for this type of calculations
487
+
- dt - integration timestep [a.u.]
488
+
- Temperature - temperature [ K ]
489
+
- use_boltz_factor - whether to scale the computed probabilities by a Boltzmann factor
490
+
\param[in] denmat - [nstates x nstates] - current density matrix
491
+
\param[in] denmat_old - [nstates x nstates] - previous density matrix
492
+
\param[in] act_state_indx - index of the initial state
493
+
494
+
Returns: A nstates-vector of hopping probabilities to all states from the current active state
495
+
496
+
497
+
*/
498
+
499
+
constdouble kb = 3.166811429e-6; // Hartree/K
500
+
int i,j,k;
501
+
double sum,g_ij,argg;
502
+
503
+
double dt = prms.dt;
504
+
double T = prms.Temperature;
505
+
int use_boltz_factor = prms.use_boltz_factor;
506
+
507
+
508
+
int nstates = denmat.n_rows;
509
+
vector<double> g(nstates, 0.0);
510
+
511
+
CMATRIX denmat_dot(nstates, nstates);
512
+
denmat_dot = denmat - denmat_old;
513
+
514
+
515
+
// compute a_kk and a_dot_kk
516
+
vector<double> a(nstates,0.0);
517
+
vector<double> a_dot(nstates,0.0);
518
+
double norm = 0.0; // normalization factor
519
+
520
+
for(i=0;i<nstates;i++){
521
+
a[i] = denmat.get(i,i).real();
522
+
a_dot[i] = denmat_dot.get(i,i).real();
523
+
524
+
if(a_dot[i]<0.0){ norm += a_dot[i]; } // total rate of population decrease in all decaying states
525
+
526
+
}// for i
527
+
528
+
529
+
// Now calculate the hopping probabilities
530
+
i = act_state_indx;
531
+
double sumg = 0.0;
532
+
533
+
for(j=0;j<nstates;j++){
534
+
535
+
if(j!=i){ // off-diagonal = probabilities to hop to other states
536
+
537
+
if(a[i]<1e-12){ g[j] = 0.0; } // since the initial population is almost zero, so no need for hops
0 commit comments