Skip to Content

MICHAELIS_MENTEN

Overview

The MICHAELIS_MENTEN function numerically solves the Michaelis-Menten system of ordinary differential equations for enzyme kinetics, describing the rate of substrate conversion by an enzyme. The classic Michaelis-Menten equation is:

v=kcatESKm+Sv = \frac{k_{cat} E S}{K_m + S}

where vv is the reaction rate, EE is enzyme concentration, SS is substrate concentration, kcatk_{cat} is the turnover number, and KmK_m is the Michaelis constant. The function integrates the ODE system for substrate and enzyme concentrations over time using SciPy’s ODE solver (scipy.integrate.solve_ivp). Only the basic two-variable model is exposed; extensions for multiple substrates, inhibitors, or allosteric effects are not supported. The integration method can be selected from several common solvers, but only the most used options are exposed. This example function is provided as-is without any representation of accuracy.

Usage

To use the function in Excel:

=MICHAELIS_MENTEN(s_initial, e_initial, k_cat, k_m, t_start, t_end, [method])
  • s_initial (float, required): Initial substrate concentration.
  • e_initial (float, required): Initial enzyme concentration.
  • k_cat (float, required): Turnover number.
  • k_m (float, required): Michaelis constant.
  • t_start (float, required): Start time for integration.
  • t_end (float, required): End time for integration.
  • method (str, optional, default=‘RK45’): Integration method. One of RK45, RK23, DOP853, Radau, BDF, LSODA.

The function returns a 2D array (table) with columns: t, S, E, representing time, substrate, and enzyme concentrations at each step. If the input is invalid or integration fails, a string error message is returned.

Examples

Example 1: Basic Case (Default Method)

Inputs:

s_initiale_initialk_catk_mt_startt_endmethod
10.01.02.01.00.05.0RK45

Excel formula:

=MICHAELIS_MENTEN(10.0, 1.0, 2.0, 1.0, 0.0, 5.0)

Expected output:

tSE
0.00010.0001.000
0.0389.9311.000
0.4179.2451.000
2.2046.0891.000
3.4524.0101.000
4.3232.6741.000
5.0001.7461.000

Example 2: With Optional Method (RK23)

Inputs:

s_initiale_initialk_catk_mt_startt_endmethod
5.00.51.50.50.02.0RK23

Excel formula:

=MICHAELIS_MENTEN(5.0, 0.5, 1.5, 0.5, 0.0, 2.0, "RK23")

Expected output:

tSE
0.0005.0000.500
0.0054.9970.500
0.0524.9650.500
0.5224.6450.500
1.0024.3210.500
1.4474.0240.500
1.8563.7520.500
2.0003.6560.500

Example 3: All Arguments Specified

Inputs:

s_initiale_initialk_catk_mt_startt_endmethod
8.02.03.02.00.03.0RK45

Excel formula:

=MICHAELIS_MENTEN(8.0, 2.0, 3.0, 2.0, 0.0, 3.0, "RK45")

Expected output:

tSE
0.0008.0002.000
0.0307.8572.000
0.3286.4592.000
0.8154.3332.000
1.1832.9192.000
1.4602.0062.000
1.6771.4112.000
1.8521.0152.000
2.0010.7442.000
2.1320.5532.000
2.2620.4032.000
2.3800.2982.000
2.4880.2242.000
2.5900.1692.000
2.6870.1292.000
2.7810.0992.000
2.8730.0762.000
2.9630.0582.000
3.0000.0532.000

Example 4: Short Time Span

Inputs:

s_initiale_initialk_catk_mt_startt_endmethod
2.00.21.00.20.00.5RK45

Excel formula:

=MICHAELIS_MENTEN(2.0, 0.2, 1.0, 0.2, 0.0, 0.5)

Expected output:

tSE
0.0002.0000.200
0.0441.9920.200
0.4791.9130.200
0.5001.9090.200

Python Code

from scipy.integrate import solve_ivp from typing import List, Union def michaelis_menten(s_initial: float, e_initial: float, k_cat: float, k_m: float, t_start: float, t_end: float, method: str = 'RK45') -> Union[List[List[float]], str]: """ Numerically solves the Michaelis-Menten system of ordinary differential equations for enzyme kinetics. Args: s_initial: Initial substrate concentration. e_initial: Initial enzyme concentration. k_cat: Turnover number. k_m: Michaelis constant. t_start: Start time of integration. t_end: End time of integration. method: Integration method ('RK45', 'RK23', 'DOP853', 'Radau', 'BDF', 'LSODA'). Default is 'RK45'. Returns: 2D list with header row: t, S, E. Each row contains time and concentration values, or an error message (str) if input is invalid. This example function is provided as-is without any representation of accuracy. """ # Validate inputs try: s0 = float(s_initial) e0 = float(e_initial) kcat = float(k_cat) km = float(k_m) t0 = float(t_start) t1 = float(t_end) except Exception: return "Invalid input: all initial values and parameters must be numbers." if t1 <= t0: return "Invalid input: t_end must be greater than t_start." if s0 < 0 or e0 < 0 or kcat < 0 or km < 0: return "Invalid input: concentrations and rate constants must be non-negative." allowed_methods = ['RK45', 'RK23', 'DOP853', 'Radau', 'BDF', 'LSODA'] if method not in allowed_methods: return f"Invalid input: method must be one of {allowed_methods}." # Michaelis-Menten ODE system: dS/dt = -v, dE/dt = 0 def mm_ode(t, y): S, E = y v = (kcat * E * S) / (km + S) if (km + S) != 0 else 0.0 dSdt = -v dEdt = 0.0 return [dSdt, dEdt] try: sol = solve_ivp( mm_ode, [t0, t1], [s0, e0], method=method, dense_output=False, rtol=1e-6, atol=1e-8 ) except Exception as e: return f"ODE integration error: {e}" if not sol.success: return f"ODE integration failed: {sol.message}" # Prepare output: header row then data rows result = [["t", "S", "E"]] for i in range(len(sol.t)): t_val = float(sol.t[i]) s_val = float(sol.y[0][i]) e_val = float(sol.y[1][i]) # Disallow nan/inf if any([ not isinstance(t_val, float) or not isinstance(s_val, float) or not isinstance(e_val, float), t_val != t_val or s_val != s_val or e_val != e_val, abs(t_val) == float('inf') or abs(s_val) == float('inf') or abs(e_val) == float('inf') ]): return "Invalid output: nan or inf detected." result.append([t_val, s_val, e_val]) return result

Example Workbook

Link to Workbook

Last updated on