BioSANS2020.propagation.stochastic.tau_leaping2
¶
This module is the tau_leaping2 module
The purpose of this module is to propagate stochastic trajectories using the tau-leaping algorithm.
The functions in this module are the following;
tau_leaping2
step_3to5
ssa_support
Module Contents¶
Functions¶
|
This functions performs the tau-leaping integration |
|
Additional steps in tau-leaping2 |
|
SSA steps of tau-leaping2 |
- BioSANS2020.propagation.stochastic.tau_leaping2.tau_leaping2(tvar, sp_comp, ks_dict, conc, r_dict, p_dict, stch_var, rand_seed, del_coef=1, implicit=False, rfile='')¶
This functions performs the tau-leaping integration
- Args:
tvar ([type]): [description] sp_comp (dict): dictionary of appearance or position of species
or component in the reaction tag of BioSANS topology file.
For example;
#REACTIONS A => B, -kf1 # negative means to be estimated B => C, kf2
The value of sp_comp is
sp_comp = {‘A’: {0}, ‘B’: {0, 1}, ‘C’: {1}}
A appears in first reaction with index 0 B appears in first and second reaction with index 0, 1 C appears in second reaction with index 1
- ks_dict (dict): dictionary of rate constant that appear in each
reactions.
For example;
#REACTIONS A => B , 0.3 # first reaction B <=> C, 0.1, 0.2 # second reaction
The value of ks_dict is
- ks_dict = {
0 : [0.3], # first reaction 1 : [0.1, 0.2] # second reaction
}
conc (dict): dictionary of initial concentration.
For example;
{‘A’: 100.0, ‘B’: -1.0, ‘C’: 0.0} negative means unknown or for estimation
r_dict (dict): dictionary of reactant stoichiometry. For example
- r_dict = {
0: {‘A’: 1}, # first reaction, coefficient of A is 1 1: {‘B’: 1} # second reaction, coefficient of B is 1
}
p_dict (dict): dictionary of product stoichiometry. For example
- p_dict = {
0: {‘B’: 1}, # first reaction, coefficient of B is 1 1: {‘C’: 1} # second reaction, coefficient of C is 1
}
stch_var (numpy.ndarray): stoichiometric matrix. For example
- v_stoich = np.array([
[ -1, 0 ] # species A [ 1, -1 ] # species B [ 0, 1 ] # species C
#1st rxn 2nd rxn
])
rand_seed ([type]): [description] rand_seed (float): random seed value picked at random for each
trajectory. They have been sampled from the calling program.
- implicit (bool, optional): True means report in time intervals
similar to the input time intervals even if actual step is more or less. Defaults to False.
- rfile (string, optional): name of topology file where some
parameters or components are negative indicating they have to be estimated. Defaults to None.
- Returns:
tuple : (time, trajectories)
- BioSANS2020.propagation.stochastic.tau_leaping2.step_3to5(prop_flux, lcri, dt1)¶
Additional steps in tau-leaping2
- BioSANS2020.propagation.stochastic.tau_leaping2.ssa_support(tvar, ks_dict, r_dict, p_dict, stch_var, rfile='', tindex=0, index=0, t_c=0, z_conc=[], spc=None, spc2=None, concz=None, yconc=None, update_sp=None)¶
SSA steps of tau-leaping2