def test_allene_logall_single_parse(self): with open('testfiles/out_testdir/allene/dd_data_nm/gwp1_V1/gwp1_V1_dd_data_nm.logall') as f: data = f.read() all_out, _ = ParseLogAll.parse(data) with open('testfiles/out_testdir/allene/dd_data_nm/gwp2_V1/gwp2_V1_dd_data_nm.logall') as f: data = f.read() all_out, _ = ParseLogAll.parse(data)
def test_pullall_gly_full(self): data = ParseLogAll.I_ImportLogalls('testfiles/out_testdir/glycine/dd_data_nm', 15, print_steps=False)
def test_pullall_gly_partial_minq(self): data = ParseLogAll.I_ImportLogalls('testfiles/out_testdir/glycine/dd_data_nm', 15, step_lim=3, print_steps=False, quantities=['xyz', 'an', 'am'])
def test_pullall_gly_partial_allq(self): data = ParseLogAll.I_ImportLogalls('testfiles/out_testdir/glycine/dd_data_nm', 15, step_lim=3, print_steps=False, quantities=['xyz', 'ci', 'csf', 'mq', 'sd', 'dp', 'an', 'am', 'fo', 'maxf', 'rmsf', 'case', 'casde'])
q_inp_data_2 = QuanticsParsers.parse_input(data2) print(f'QINP file 2 parsed OK') # Quick check that the output path exists datadir1 = os.path.join(os.path.dirname(dir1), q_inp_data_1['data']) print(datadir1) assert (os.path.exists(datadir1)) datadir2 = os.path.join(os.path.dirname(dir2), q_inp_data_2['data']) print(datadir2) # Load in all GWP logalls print('Parsing data 1') data_gwpx1 = ParseLogAll.I_ImportLogalls( datadir1, q_inp_data_1['ngwp'], quantities=['case', 'ci', 'csf', 'fo'], fname='gwp{}_V1_gaussian_data.logall') print('Parsing data 2') data_gwpx2 = ParseLogAll.I_ImportLogalls( datadir2, q_inp_data_2['ngwp'], quantities=['case', 'ci', 'csf', 'fo'], fname='gwp{}_V1_gaussian_data.logall') # Do the comparisons state = 0 print('Compare CAS Energy') state += compare(data_gwpx1['case'], data_gwpx2['case']) print('Compare adibatic populations') state += compare(data_gwpx1['adiabats'], data_gwpx2['adiabats'])
with open(qoutf, 'r') as f: data = f.read() q_out_data = QuanticsParsers.parse_output(data) if STEPLIMS != None: q_out_data = q_out_data[: STEPLIMS] # Truncate the quantics log if necessary times = np.array([x['time'] for x in q_out_data]) gwp_sf = np.array([x['GGP'] for x in q_out_data]) gwp_sf /= 10 # Sum up to 10 - not 1 print(f'QOUT file parsed') # Load in all GWP logalls tasks = ['an', 'am'] + args.tasks data_gwpx = ParseLogAll.I_ImportLogalls(datadir, q_inp_data['ngwp'], step_lim=STEPLIMS, quantities=tasks, fname='gwp{}_V1_' + q_inp_data['data'] + '.logall') nsteps = data_gwpx['steps'] assert (nsteps == len(q_out_data)) # Check against manifest if manifest != None: try: assert (nsteps == manifest['steps']) except: raise Exception( 'Conflicting step numbers in script/manifest! Run with --redo to rebuild' ) else: manifest = {'steps': nsteps}