annealing_steps = 200 # steps per temperature in annealing - 100-200 sufficient nsteps = 10000 # equilibrium steps. 5000 to 10000 ############################### ### System Setup: ############################### # Initialize model sys = system.System(output_dir=outputdir, noclobber=False) mol = sys.add_macromolecule(inseq, "VDR", initialize_apo=False) # Import data datasets = hxio.import_HDXWorkbench( workbench_file, # Workbench input file macromolecule=mol, sequence=None, # FASTA sequence string sigma0=sigma0 ) # The initial estimate for experimental SD in % deuterium untis. print(datasets) # Add data to molecule states and initialize models for s in range(len(mol.get_states())): print(s) state = mol.get_states()[s] state.add_dataset(datasets[s]) output_model = state.set_output_model( model.ResidueGridModel(state, grid_size=num_exp_bins)) sys.output.initialize_output_model_file(state, output_model.pf_grids) sampler = sampling.MCSampler(sys, sigma_sample_level="timepoint") # First, run a short minimization step
def test_import_workbench(self): infile = input_path + "Workbench_VDR_VD3_01.csv" datasets = hxio.import_HDXWorkbench(infile) self.assertEqual(len(datasets), 2)
import hxio from matplotlib import pyplot as plt # Script for plotting timepoint avg vs. std from a HDXWorkbench file datafiles = ["Data_Export_HDX_Workbench.csv"] error_dict = {} i = 0 pctd_error = [] d2_error = [] for df in datafiles: datasets = hxio.import_HDXWorkbench(df) for d in datasets: j = 0 d_error = {} for pep in d.get_peptides(): #print(pep.sequence) nam = pep.get_number_of_observable_amides() for tp in pep.get_timepoints(): (avg, sd) = tp.get_avg_sd() #print(tp.time, avg, sd) d_error[j] = { "sd": sd, "avg": avg, "amides": nam, "time": tp.time } if sd is not None and avg is not None: pctd_error.append((avg, sd)) d2_error.append(((avg * nam) / 100, sd * (avg) / 100))
300 : [22.86113], 900 : [31.88971], 3600 : [42.51679] } print "Hello" ############################### ### System Setup: ############################### # Initialize model (name, FASTA sequence, offset) sys = system.System(output_dir=outputdir, noclobber=False) mol = sys.add_macromolecule(sequence, "Single", initialize_apo=False) datasets = hxio.import_HDXWorkbench(workbench_file, # Workbench input file macromolecule=mol, sequence=None, # FASTA sequence string error_estimate=sigma0) sys.get_output().write_datasets() for state in mol.get_states(): output_model = model.ResidueGridModel(state, grid_size=num_exp_bins) state.set_output_model(output_model) sys.output.initialize_output_model_file(state, output_model.pf_grids) state.initialize() sampler = sampling.MCSampler(sys, sigma_sample_level=None) # First, run a short minimization step #sampler.run(50, 0.0001) ''' for dataset in datasets: