BioSANS2020.propagation.law_of_localization
¶
This module is the law_of_localization module
The sole purpose of this module is to implement the law of localization
Module Contents¶
Functions¶
|
This function substitute actual values to sympy symbols. |
|
This function instantiate how the output will be printed by crea- |
|
This function prepares cs_var, cso_var, time |
|
This function prepares two list from stoichiometric matrix |
|
[summary] |
- BioSANS2020.propagation.law_of_localization.subs2(zvar, cval)¶
This function substitute actual values to sympy symbols.
- Args:
zvar (sympy.core): sympy expression cval (disct): dictionary of Symbols : value
- Returns:
(sympy.core): substituted expression
- BioSANS2020.propagation.law_of_localization.prepare_ffrrint(items)¶
This function instantiate how the output will be printed by crea- thing the function ffprint
- Args:
text (Text): text area where the outputs are written items (tuple): 3 item list of (canvas, scroll_x, scroll_y)
- Returns:
function: either print in console or in text area
- BioSANS2020.propagation.law_of_localization.prepare_dict_list1(sp_comp, conc, ks_dict)¶
This function prepares cs_var, cso_var, time
- Args:
sp_comp (dict): dictionary of components position in reaction conc (dict) : dictionary of initail concentration
- Returns:
(dict/list): cs_var, cso_var, equivals, equi_ks
- BioSANS2020.propagation.law_of_localization.prepare_list2(stch_var, slabels)¶
This function prepares two list from stoichiometric matrix
- Args:
stch_var (np.ndarray): toichiometric matrix
- Returns:
- list: [non zero row values of stch_var,
nonzero rows index of stch_var]
- BioSANS2020.propagation.law_of_localization.law_loc_symbolic(sp_comp, ks_dict, conc, r_dict, p_dict, stch_var, items=None, molar=False, mode=None, numer=False)¶
[summary]
- Args:
- 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 (np.ndarray): stoichiometric matrix items (tuple): 3 item list of (canvas, scroll_x, scroll_y) molar (bool, optional): [description]. Defaults to False. mode (str, optional): either “Numeric”, “fofks”, “fofCo”. numer (bool, optional): If True, numeric substitution will be
done. Defaults to False.
- Returns:
list: [0, 0] - useless return