3.6. kda.ode

3.6.1. Differential Equation Solvers

This file contains a host of functions aimed at the analysis of biochemical kinetic diagrams via differential equations.

ode_solver(P, K, t_max, method='LSODA', tol=1e-16, **options)[source]

Integrates state probability ODE’s to find steady state probabilities.

Parameters:
  • P (array) – Nx1 matrix of initial state probabilities.

  • K (ndarray) – Adjacency matrix for the kinetic diagram where each element kij is the edge weight (i.e. transition rate constant). For example, for a 2-state model with k12=3 and k21=4, K=[[0, 3], [4, 0]].

  • t_max (int) – Length of time for integrator to run in seconds.

  • method (str) – Integration method used in scipy.integrate.solve_ivp(). Default is "LSODA" since it has automatic stiffness detection, and generally requires much less run time to reach convergence than "RK45".

  • tol (float, optional) – Tolerance value used as convergence criteria. Once all dp/dt values for each state are less than the tolerance the integrator will terminate. Default is 1e-16.

  • options – Options passed to scipy.integrate.solve_ivp().

Returns:

  • Bunch object with the following fields defined

  • t (ndarray, shape (n_points,)) – Time points.

  • y (ndarray, shape (n, n_points)) – Values of the solution at t.

Notes

For all parameters and returns, view the SciPy.integrate.solve_ivp() documentation (see here).

Functions

ode_solver(P, K, t_max[, method, tol])

Integrates state probability ODE's to find steady state probabilities.