:py:mod:`BioSANS2020.propagation.create_wxmaxima_command` ========================================================= .. py:module:: BioSANS2020.propagation.create_wxmaxima_command .. autoapi-nested-parse:: This module is the create_wxmaxima_command module This module attempts to transforms topology file into wxmaxima ODE input that a user can copy and paste into wxmaxima to grab a symbolic solution Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: BioSANS2020.propagation.create_wxmaxima_command.prepare_ffrrint BioSANS2020.propagation.create_wxmaxima_command.prepare_dict1 BioSANS2020.propagation.create_wxmaxima_command.prepare_list1 BioSANS2020.propagation.create_wxmaxima_command.prepare_list2 BioSANS2020.propagation.create_wxmaxima_command.for_wxmaxima .. py:function:: 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 .. py:function:: prepare_dict1(sp_comp) This function prepares cs_var, cso_var, time Args: sp_comp (dict): dictionary of components position in reaction Returns: multitype: cs_var, cso_var, time .. py:function:: prepare_list1(ks_dict) This function prepares a list of symbol for rate constant Args: ks_dict (dict): dictionary of rate constant positions Returns: list: rate constants symbols .. py:function:: 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] .. py:function:: for_wxmaxima(sp_comp, ks_dict, conc, r_dict, p_dict, stch_var, items=None, rfile='') This function transforms topology file into wxmaxima ODE input that a user can copy and paste into wxmaxima to grab a symbolic solution. 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 appears 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 ]) items (list): list of [canvas, scroll_x, scroll_y] rfile (string, optional): name of topology file where some parameters or components are negative indicating they have to be estimated. Defaults to None. Returns: list: [0, 0] - contains nothing