def calculate_HEOM(reorg_energy): print reorg_energy system_hamiltonian = np.array([[100., 20.], [20., 0]]) cutoff_freq = 53. temperature = 300. hs = HierarchySolver(system_hamiltonian, environment(reorg_energy, beta, K), beta, N=trunc_level) hs.init_system_dm = init_state HEOM_history, time = hs.calculate_time_evolution(time_step, duration) return HEOM_history
def calculate_HEOM(reorg_energy): print reorg_energy system_hamiltonian = np.array([[100., 20.], [20., 0]]) cutoff_freq = 53. temperature = 300. hs = HierarchySolver(system_hamiltonian, environment(reorg_energy, beta, K), beta, N=trunc_level) hs.init_system_dm = init_state HEOM_history, time = hs.calculate_time_evolution(time_step, duration) return HEOM_history
num_matsubara_freqs=1, temperature_correction=True, sites_to_couple=np.array([1, 1]), ) hs.truncation_level = 11 print hs.system_dimension ** 2 * hs.number_density_matrices() print "Calculating time evolution..." start = tutils.getTime() init_state = np.array([[1.0, 0], [0, 0]]) # init_state = np.dot(hs.system_evectors.T, np.dot(init_state, hs.system_evectors)) # print init_state hs.init_system_dm = init_state hs.truncation_level = 11 dm_history, time = hs.calculate_time_evolution(time_step, duration) # exciton_dm_history = hs.transform_to_exciton_basis(dm_history) end = tutils.getTime() print "Calculation took " + str(tutils.duration(end, start)) # convert time in inverse wavenums to picoseconds time /= utils.WAVENUMS_TO_INVERSE_PS plt.subplot(121) plt.plot(time, [dm[0, 0] for dm in dm_history], linewidth=2) # plt.plot(time, [dm[1,1] for dm in dm_history], linewidth=2) plt.ylim(0.3, 1) plt.xlim(0, 1)
jump_rates = np.array([excitation_rate, deexcitation_rate]) for i in range(6): jump_rates = np.append(jump_rates, [forward_exciton_CT_rates[i], backward_exciton_CT_rates[i]]) #jump_rates[2:] *= 0.1 jump_rates = np.append(jump_rates, [CT1_CT2_rate, CT2_CT1_rate, CT2_empty_rate, empty_ground_rate]) single_mode_params = []#[(342., 342.*0.4, 100.)] #print jump_rates #jump_rates = np.zeros(18) hs = HierarchySolver(system_hamiltonian, reorg_energy, cutoff_freq, temperature, jump_operators=jump_operators, jump_rates=jump_rates, underdamped_mode_params=single_mode_params) hs.truncation_level = 6 init_state = np.zeros((10, 10)) init_state[0,0] = 1. init_state = np.dot(site_exciton_transform, np.dot(init_state, site_exciton_transform.T)) hs.init_system_dm = init_state dm_history, time = hs.calculate_time_evolution(0.01, 5.) # transform back to exciton basis exciton_dm_history = np.zeros((dm_history.shape[0], dm_history.shape[1], dm_history.shape[2])) for i,dm in enumerate(dm_history): exciton_dm_history[i] = np.dot(site_exciton_transform.T, np.dot(dm, site_exciton_transform)) np.savez('../../data/PSIIRC_HEOM_incoherent_rates_slow_jump_rates_data.npz', exciton_dm_history=exciton_dm_history, \ time=time, reorg_energy=reorg_energy, cutoff_freq=cutoff_freq, temperature=temperature, \ site_exciton_transform=site_exciton_transform, jump_rates=jump_rates) # np.savez('../../data/PSIIRC_HEOM_incoherent_rates_mode_data.npz', exciton_dm_history=exciton_dm_history, \ # time=time, reorg_energy=reorg_energy, cutoff_freq=cutoff_freq, temperature=temperature, \ # site_exciton_transform=site_exciton_transform, jump_rates=jump_rates, mode_params=single_mode_params) # truncation_level = 5