3.4. kda.expressions

3.4.1. Algebraic Expressions

The expressions module contains code to convert KDA-generated string expressions into SymPy symbolic expressions.

construct_sympy_prob_funcs(state_mult_funcs)[source]

Constructs analytic state probability SymPy functions

Parameters:

state_mult_funcs (list of str) – List of length N (N is the number of states) which contains the algebraic multiplicity expressions for each state.

Returns:

sympy_funcs – List of Sympy symbolic state probability expressions.

Return type:

list

construct_sympy_net_cycle_flux_func(pi_diff_str, sigma_K_str, sigma_str)[source]

Creates the analytic net cycle flux SymPy function for a given cycle.

Parameters:
  • pi_diff_str (str) – String of difference of product of counter clockwise cycle rates and clockwise cycle rates.

  • sigma_K_str (str) – Sum of rate products of directional flux diagram edges pointing to input cycle in string form.

  • sigma_str (str) – Sum of rate products of all directional diagrams for the kinetic diagram, in string form.

Returns:

net_cycle_flux_func – Analytic net cycle flux SymPy function

Return type:

SymPy object

construct_lambda_funcs(sympy_funcs, rate_names)[source]

Constructs Python lambda functions from SymPy functions.

Parameters:
  • sympy_funcs (list of SymPy functions) – List of SymPy functions.

  • rate_names (list) – List of strings, where each element is the name of the variables for the input probability functions (e.g. ["k12", "k21", "k23", ...]).

Returns:

state_prob_funcs – List of lambdified analytic state probability functions.

Return type:

list

Functions

construct_lambda_funcs(sympy_funcs, rate_names)

Constructs Python lambda functions from SymPy functions.

construct_sympy_net_cycle_flux_func(...)

Creates the analytic net cycle flux SymPy function for a given cycle.

construct_sympy_prob_funcs(state_mult_funcs)

Constructs analytic state probability SymPy functions