Ejemplo n.º 1
0
def setup_single_state(sequence, name):
    '''Simple function that sets up a System with one Macromolecule
    and one State.  Returns the State object.
    '''
    sys = System()
    mol = sys.add_macromolecule(sequence, name)
    return mol.get_apo_state()
Ejemplo n.º 2
0
sat_pct_error = 0.05
percentD = True  # Is the data in percent D (True) or Deuterium units?
time_error = 0.02
fwd_exchange_ph = 7.4
fwd_exchange_t = 293

back_exchange_est = 0.35  # Back exchange for the entire system
back_exchange_ph = 3.0  #
back_exchange_t = 277

###########################################
####

# System Setup
sys = system.System("test_system", noclobber=False)
mol = sys.add_macromolecule(inseq, name="Test")
state = mol.get_apo_state()

# HDX model setup
hmod = model.ResidueGridModel(state, 20, protection_factors=True)

##############
# Get rates for each residue

act_sat = numpy.random.normal(saturation_est, sat_pct_error * saturation_est)
act_timepoints = [
    numpy.random.normal(tp, tp * time_error) for tp in timepoints
]

fwd_rates = [-1]
back_rates = [-1]
Ejemplo n.º 3
0
###########################################
###    Simulation Parameters
num_exp_bins = 40      # Number of log(kex) values for sampling. 15-20 is generally sufficient. 
init = "random"        # How to initialize - either "random" or "enumerate". Enumerate is slower but sampling will converge faster
nsteps = 10000          # equilibrium steps. 5000 to 10000

#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
###   Here the real work begins....
###   You should not have to change anything beneath this line.
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
############################################
###   System Setup:

# Initialize model
sys = system.System(output_dir = outputdir, noclobber=False)
mol = sys.add_macromolecule(sequence, "Test")
state = mol.get_apo_state()
state2 = mol.add_state("Apo2")

# Alternatively, you can use this single line macro, which is equivalent
#state = system.setup_single_state(sequence, "UVR8", output_dir = "test_output")
# Import data
dataset = hxio.import_HXcolumns("simulated_data.dat", # HX Columns input file
                          sequence,           # FASTA sequence string
                          name="Data",          # A string identifier for the dataset (optional)
                          percentD=False,     # Is the data in percent deuterium (True) or absolute deuterons (False)
                          conditions=None,    # A data.Conditions object specifying pH, Temp, etc...  None uses a standard set of conditions
                          error_estimate=2.0, # The initial estimate for experimental SD in % deuterium untis.
                          n_fastamides=2,     # Number of fast exchanging N-terminal amides
                          offset=offset)      # Numbering offset between data and FASTA file. (positive or negative integer)
Ejemplo n.º 4
0
###    Simulation Parameters

num_exp_bins = 71  # Number of log(kex) values for sampling. 15-20 is generally sufficient.
init = "random"  # How to initialize - either "random" or "enumerate". Enumerate is slower but sampling will converge faster
nsteps = 5000  # equilibrium steps. 5000 to 10000

#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
###   Here the real work begins....
###   You should not have to change anything beneath this line.
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
############################################
###   System Setup:

# Initialize model
sys = system.System(output_dir=outputdir, noclobber=False)
mol = sys.add_macromolecule(sequence, "UVR8")
state = mol.get_apo_state()
state1 = mol.add_state(name="Apo2")
state2 = mol.add_state(name="Apo3")
# Alternatively, you can use this single line macro, which is equivalent
#state = system.setup_single_state(sequence, "UVR8", output_dir = "test_output")
# Import data
dataset = hxio.import_HXcolumns(
    infile,  # HX Columns input file
    sequence,  # FASTA sequence string
    name="Data",  # A string identifier for the dataset (optional)
    percentD=
    False,  # Is the data in percent deuterium (True) or absolute deuterons (False)
    conditions=
    None,  # A data.Conditions object specifying pH, Temp, etc...  None uses a standard set of conditions
    error_estimate=
Ejemplo n.º 5
0
rep_deut = 50
###########################################
###    Simulation Parameters

num_exp_bins = 20  # Number of log(kex) values for sampling. 20 is generally sufficient.
init = "random"  # How to initialize - either "random" or "enumerate". Enumerate is slower but sampling will converge faster
annealing_steps = 200  # steps per temperature in annealing - 100-200 sufficient
nsteps = 10000  # equilibrium steps. 5000 to 10000

num_best_models = 200  # Number of best models to consider for analysis

#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# Input Data

sys = system.System()
mol = sys.add_macromolecule(name="Test", sequence=inseq)
state = mol.get_apo_state()

c = data.Conditions()
d = data.Dataset("Test", c, sequence=inseq)
pep = d.create_peptide("AAA", start_residue=1)
pep.add_timepoints([tp_time])
tp = pep.get_timepoint_by_time(tp_time)
tp.add_replicate(rep_deut)

state.add_dataset(d)

output_model = model.ResidueGridModel(state, grid_size=num_exp_bins)
state.set_output_model(output_model)
sampler = sampling.MCSampler(state, sigma_sample_level="timepoint")
Ejemplo n.º 6
0
###########################################
###    Simulation Parameters

num_exp_bins = 50  # Number of log(kex) values for sampling. 20 is generally sufficient.
init = "enumerate"  # How to initialize - either "random" or "enumerate". Enumerate is slower but sampling will converge faster
annealing_steps = 100  # steps per temperature in annealing - 100-200 sufficient

nsteps = 1000  # equilibrium steps. 5000 to 10000

###############################
###   System Setup:
###############################

# Initialize model
sys = system.System(output_dir=outputdir, noclobber=False)
mol = sys.add_macromolecule(inseq, "CytC", initialize_apo=False)

# Import data
datasets = hxio.import_HDXWorkbench(
    workbench_file,  # Workbench input file
    macromolecule=mol,
    sequence=None,  # FASTA sequence string
    error_estimate=sigma0
)  # The initial estimate for experimental SD in % deuterium untis.

#sys = system.System(output_dir=outputdir, noclobber=False)
#mol = sys.add_macromolecule(inseq, "CytC", initialize_apo=True)

state = mol.get_apo_state()

conditions = [data.Conditions(294, 6.5, 0.8), data.Conditions(294, 7.4, 0.8)]