# Get the job path and load the dcts if len(sys.argv) > 1: JOB_PATH = sys.argv[1] print(f'The job path is {JOB_PATH}') elif len(sys.argv) == 1: JOB_PATH = os.getcwd() print(f'No job path input; using the current directory, {JOB_PATH}') SPC_THERM_DCTS = ckin_parser.load_spc_therm_dcts(THERMO_FILENAMES, JOB_PATH, TEMPS) SPC_DCTS = spc_parser.load_spc_dcts(SPC_CSV_FILENAMES, JOB_PATH) # Get the algn_spc_therm_dct ALGN_SPC_THERM_DCT = compare.get_algn_spc_therm_dct( SPC_THERM_DCTS, SPC_DCTS, remove_loners=REMOVE_LONERS, write_file=WRITE_FILE) # Get the combined spc_dct (used for including SMILES and InChis) COMB_SPC_DCT = compare.get_mult_comb_spc_dct(SPC_DCTS) # Run the plotter FIGS = plot_thermo.build_plots(ALGN_SPC_THERM_DCT, spc_dct=COMB_SPC_DCT, mech_names=MECH_NAMES, sort=SORT, sort_instr=SORT_INSTR, sort_temp=SORT_TEMP) util.build_pdf(FIGS, filename=OUTPUT_FILENAME, path=JOB_PATH)
# RUN FUNCTIONS; DON'T CHANGE THIS # Get the job path and load the dcts if len(sys.argv) > 1: JOB_PATH = sys.argv[1] print(f'The job path is {JOB_PATH}') elif len(sys.argv) == 1: JOB_PATH = os.getcwd() print(f'No job path input; using the current directory, {JOB_PATH}') rxn_ktp_dcts = ckin_parser.load_rxn_ktp_dcts(mech_filenames, JOB_PATH, TEMPS_LST, pressures) spc_therm_dcts = ckin_parser.load_spc_therm_dcts( thermo_filenames, JOB_PATH, TEMPS_LST[0]) # NOTE: taking first entry spc_dcts = spc_parser.load_spc_dcts(spc_csv_filenames, JOB_PATH) # Get the algn_rxn_ktp_dct TEMPS = TEMPS_LST[0] # function receives a single Numpy array of temps algn_rxn_ktp_dct = compare.get_algn_rxn_ktp_dct(rxn_ktp_dcts, spc_therm_dcts, spc_dcts, TEMPS, rev_rates=rev_rates, remove_loners=remove_loners, write_file=write_file) # Run the plotter figs = plot_rates.build_plots(algn_rxn_ktp_dct, mech_names=mech_nicknames, ratio_sort=bool(sort_method == 'ratios')) util.build_pdf(figs, filename=output_filename, path=JOB_PATH)
def test_build_plots_ratio_sort(): """ Test the build_plots function with sorting by ratio """ figs = rates.build_plots(ALGN_RXN_KTP_DCT, ratio_sort=True) build_pdf(figs, FILENAME, TMP_DIR)
def test_build_plots(): """ Test the build_plots function """ figs = thermo.build_plots(ALGN_SPC_THERM_DCT) build_pdf(figs, FILENAME, TMP_DIR)
def test_build_plots(): """ Test the build_plots function """ figs = rates.build_plots(ALGN_RXN_KTP_DCT) build_pdf(figs, FILENAME, TMP_DIR)