q2_list = [] rmse_list = [] for experiment in experiments: print(experiment) if experiment in experiments_with_unif_prior: print("Use uniform prior for concentrations") uniform_P0 = True uniform_Ls = True else: uniform_P0 = False uniform_Ls = False print("Use lognormal prior for concentrations") actual_q_micro_cal = load_heat_micro_cal( os.path.join(args.heat_dir, experiment + ".DAT")) actual_q_cal = actual_q_micro_cal * 10**(-6) exper_info_2cbm = ITCExperiment( os.path.join(args.two_component_mcmc_dir, experiment, args.exper_info_file)) exper_info_rmbm = ITCExperiment( os.path.join(args.racemic_mixture_mcmc_dir, experiment, args.exper_info_file)) exper_info_embm = ITCExperiment( os.path.join(args.enantiomer_mcmc_dir, experiment, args.exper_info_file)) trace_2cbm = pickle.load( open( os.path.join(args.two_component_mcmc_dir, experiment,
exper_info_file = "/home/tnguye46/bayesian_itc_racemic/05.exper_info/Baum_59/experimental_information.pickle" heat_file = "/home/tnguye46/bayesian_itc_racemic/04.heat_in_origin_format/Baum_59.DAT" # "2cbm", "rmbm", "embm" model_name = "2cbm" dcell = 0.1 dsyringe = 0.1 uniform_P0 = True uniform_Ls = True concentration_range_factor = 10. auto_transform = False exper_info = ITCExperiment(exper_info_file) q_actual_micro_cal = load_heat_micro_cal(heat_file) q_actual_cal = q_actual_micro_cal * 10. ** (-6) if model_name == "2cbm": pm_model = make_TwoComponentBindingModel(q_actual_cal, exper_info, dcell=dcell, dsyringe=dsyringe, uniform_P0=uniform_P0, uniform_Ls=uniform_Ls, concentration_range_factor=concentration_range_factor, auto_transform=auto_transform) elif model_name == "rmbm": pm_model = make_RacemicMixtureBindingModel(q_actual_cal, exper_info, dcell=dcell, dsyringe=dsyringe, uniform_P0=uniform_P0, uniform_Ls=uniform_Ls, concentration_range_factor=concentration_range_factor, is_rho_free_param=False,
dP0 = args.dP0 dLs = args.dLs concentration_range_factor = args.concentration_range_factor models = ["2cbm", "rmbm", "embm"] list_data_dirs = [two_component_dirs, racemic_mixture_dirs, enantiomer_dirs] info_criteria = [] for exper in experiments: print("") print(exper) heat_file = os.path.join(args.heat_data_dir, exper + ".DAT") print("heat_file:", heat_file) n_samples = load_heat_micro_cal(heat_file).shape[0] print("n_samples:", n_samples) if exper in experiments_flat_prior_P0: uniform_P0 = True else: uniform_P0 = False if exper in experiments_flat_prior_Ls: uniform_Ls = True else: uniform_Ls = False for model, data_dirs in zip(models, list_data_dirs): print("") print("model", model)