# For each step make St_ci #print("Making St_ci matrices....") for step in range( finish_time-start_time ): s_ci = SD2CI[step].H() * S_sd_job[step] * SD2CI[step] S_ci_job.append( s_ci ) for step in range( finish_time-start_time-1 ): st_ci = SD2CI[step].H() * St_sd_job[step] * SD2CI[step+1] St_ci_job.append( st_ci ) #print("\nNormalize CI basis before output") step3.apply_orthonormalization_general( S_ci_job, St_ci_job ) params2 = {"do_state_reordering":2, "state_reordering_alpha":0} step3.apply_state_reordering_general( St_ci_job, ci_midpoint_energies, params2 ) step3.apply_phase_correction_general( St_ci_job ) # Output CI data to res directory #print("Outputting the CI data to the res directory..." ) for step in range( finish_time-start_time ): S_ci_job[step].real().show_matrix("%s/S_ci_%d_re" % (res_dir, int(start_time+step))) ci_energies_job_cmatrix[step].real().show_matrix("%s/E_ci_%d_re" % (res_dir, int(start_time+step))) for step in range( finish_time-start_time-1 ): St_ci_job[step].real().show_matrix("%s/St_ci_%d_re" % (res_dir, int(start_time+step))) # Now, compute the CI NACs and compute the CI Hvib #print("Computing and outputting the CI NACs...") for step in range( finish_time-start_time-1 ): ci_nacs = ( 0.5j / dt ) * CMATRIX ( ( St_ci_job[step] - St_ci_job[step].H() ).real() ) ci_hvib = ci_midpoint_energies[step] - ci_nacs
# 4.0 Compute the mid-point energies and time-overlaps according to the energy ordered SDs. St_sd = [] E_sd = [] res_dir_sd = "res_sd" os.system("rm -r "+res_dir_sd ) os.system("mkdir "+res_dir_sd ) for step in range(finish_time-start_time-1): E_sd.append ( 0.5 * (E_sd_sorted[step] + E_sd_sorted[step+1]) ) St_sd.append( mapping.ovlp_mat_arb( basis_sorted[step], basis_sorted[step+1], St_ks[0][step], use_minimal=False ) ) #################### # 5.0. Apply state reordering and/or phase corrections to the St_sd data params["do_state_reordering"] = 2 params["state_reordering_alpha"] = 0.0 step3.apply_state_reordering_general(St_sd, E_sd, params) step3.apply_phase_correction_general( St_sd ) # 4. Form Hvib_sd Hvib_sd = [] for step in range(finish_time-start_time-1): hvib_sd = E_sd[step] + 0.5j/dt * (St_sd[step] - St_sd[step].H()) Hvib_sd.append( hvib_sd ) Hvib_sd[step].real().show_matrix("%s/Hvib_sd_%d_re" % (res_dir_sd, step)) Hvib_sd[step].imag().show_matrix("%s/Hvib_sd_%d_im" % (res_dir_sd, step)) St_sd[step].real().show_matrix("%s/St_%d_re" % (res_dir_sd, step)) #sys.exit(0)
params.update({ "data_re_prefix" : "E_ks_", "data_re_suffix" : "_re", "data_im_prefix" : "E_ks_", "data_im_suffix" : "_im" } ) E_ks = data_read.get_data_sets(params) E_ks[0][-1].show_matrix() # Fetching S_ks params.update({ "data_re_prefix" : "S_ks_", "data_re_suffix" : "_re", "data_im_prefix" : "S_ks_", "data_im_suffix" : "_im" } ) S_ks = data_read.get_data_sets(params) # Fetching St_ks params.update({ "data_re_prefix" : "St_ks_", "data_re_suffix" : "_re", "data_im_prefix" : "St_ks_", "data_im_suffix" : "_im" } ) St_ks = data_read.get_data_sets(params) St_ks[0][-2].show_matrix() #sys.exit(0) step3.apply_orthonormalization_general( S_ks[0], St_ks[0] ) step3.apply_phase_correction_general( St_ks[0] ) #sys.exit(0) ks_homo_index = 28 min_band_ks = 28 max_band_ks = 29 ks_orbital_indicies = list( range( min_band_ks, max_band_ks + 1 ) ) sd_basis_states_unique = [ # Phi 0 [1, -1], # Phi 1 [2, -1], # Phi 2 [-2, 1], ]