In [46]:
import quantumpropagator as qp
from tqdm import tqdm_notebook as tqdm
import os
import glob
import h5py
from shutil import copyfile
In [85]:
rasscf_folder = '/scratch/RASSCFS'
correction_folder = '/home/alessio/CORRECTION_OF_DENSITIES/b-corrected'
new_folder = '/home/alessio/CORRECTION_OF_DENSITIES/outputs'
phisL = ['N007-000', 'N006-500', 'N006-000', 'N005-500', 'N005-000', 'N004-500', 'N004-000', 'N003-500', 'N003-000', 'N002-500', 'N002-000', 'N001-500', 'N001-000', 'N000-500', 'P000-000', 'P000-500', 'P001-000', 'P001-500', 'P002-000', 'P002-500', 'P003-000', 'P003-500', 'P004-000', 'P004-500', 'P005-000']
gamsL = ['P012-308','P012-615','P012-923','P013-231','P013-538','P013-846','P014-154','P014-462','P014-769','P015-077','P015-385','P015-692','P016-000','P016-308','P016-615','P016-923','P017-231','P017-538','P017-846','P018-154','P018-462','P018-769','P019-077','P019-385','P019-692','P020-000']
thesL = ['P124-190','P123-743','P123-296','P122-849','P122-402','P121-955','P121-508','P121-061','P120-615','P120-168','P119-721','P119-274','P118-827','P118-380','P117-933','P117-486','P117-039','P116-592','P116-145','P115-698','P115-251','P114-804','P114-358','P113-911','P113-464','P113-017','P112-570','P112-123','P111-676','P111-229','P110-782','P110-335','P109-888','P109-441','P108-994','P108-547','P108-101','P107-654','P107-207','P106-760','P106-313','P105-866','P105-419','P104-972','P104-525','P104-078','P103-631','P103-184','P102-737','P102-291','P101-844','P101-397','P100-950','P100-503','P100-056','P099-609','P099-162','P098-715','P098-268','P097-821','P097-374','P096-927','P096-480','P096-034','P095-587','P095-140','P094-693','P094-246','P093-799','P093-352','P092-905','P092-458','P092-011','P091-564','P091-117','P090-670','P090-223','P089-777','P089-330','P088-883','P088-436','P087-989','P087-542','P087-095','P086-648','P086-201','P085-754','P085-307','P084-860','P084-413','P083-966','P083-520','P083-073','P082-626','P082-179','P081-732','P081-285','P080-838','P080-391','P079-944']
# phisL = ['N007-000']
# gamsL = ['P012-308']
# thesL = ['P124-190']
nstates = 14
nmos = 336
do_it = False
if do_it:
for phiL in tqdm(phisL):
for gamL in gamsL:
for theL in thesL:
file_name = 'zNorbornadiene_{}_{}_{}.rasscf.h5'.format(phiL, gamL, theL)
abs_file_name = os.path.join(rasscf_folder,file_name)
abs_output_name = os.path.join(new_folder,file_name)
copyfile(abs_file_name, abs_output_name)
correction_name = 'zNorbornadiene_{}_{}_{}.corrected.h5'.format(phiL, gamL, theL)
abs_correction_name = os.path.join(correction_folder,correction_name)
abs_array = qp.retrieve_hdf5_data(abs_correction_name,'ABS_CORRECTOR')
with h5py.File(abs_output_name, 'r+') as f1:
CI = f1['CI_VECTORS']
new_CI = np.empty_like(CI)
for kk in range(nstates):
new_CI[kk] = CI[kk]*abs_array[kk]
CI[...] = new_CI
else:
print('\n\nenable me if you wanna do something\n\n')
In [ ]: