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, [timesteps], [solve_ivp_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.
  • timesteps (float, optional, default=10): Number of timesteps to solve for.
  • solve_ivp_method (string (enum), optional, default=‘RK45’): Integration method. Valid options: 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_endtimestepsmethod
10.01.02.01.00.05.010RK45

Excel formula:

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

Expected output:

tSE
0.00010.0001.000
0.5568.9951.000
1.1118.0011.000
1.6677.0201.000
2.2226.0571.000
2.7785.1151.000
3.3334.2011.000
3.8893.3241.000
4.4442.4981.000
5.0001.7461.000

Example 2: With Optional Method (RK23)

Inputs:

s_initiale_initialk_catk_mt_startt_endtimestepsmethod
5.00.51.50.50.02.010RK23

Excel formula:

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

Expected output:

tSE
0.0005.0000.500
0.2224.8490.500
0.4444.6980.500
0.6674.5470.500
0.8894.3980.500
1.1114.2480.500
1.3334.0990.500
1.5563.9510.500
1.7783.8030.500
2.0003.6560.500

Example 3: All Arguments Specified

Inputs:

s_initiale_initialk_catk_mt_startt_endtimestepsmethod
8.02.03.02.00.03.010RK45

Excel formula:

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

Expected output:

tSE
0.0008.0002.000
0.3336.4352.000
0.6674.9572.000
1.0003.5982.000
1.3332.4042.000
1.6671.4362.000
2.0000.7462.000
2.3330.3372.000
2.6670.1372.000
3.0000.0532.000

Example 4: Short Time Span

Inputs:

s_initiale_initialk_catk_mt_startt_endtimestepsmethod
2.00.21.00.20.00.510RK45

Excel formula:

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

Expected output:

tSE
0.0002.0000.200
0.0561.9900.200
0.1111.9800.200
0.1671.9700.200
0.2221.9600.200
0.2781.9500.200
0.3331.9390.200
0.3891.9290.200
0.4441.9190.200
0.5001.9090.200

Python Code

from scipy.integrate import solve_ivp import numpy as np def michaelis_menten(s_initial, e_initial, k_cat, k_m, t_start, t_end, timesteps=10, solve_ivp_method='RK45'): """ 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. timesteps: Number of timesteps to solve for. Default is 10. solve_ivp_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) ntp = int(timesteps) except Exception: return "Invalid input: all initial values, parameters, and timesteps must be numbers." if t1 <= t0: return "Invalid input: t_end must be greater than t_start." if ntp <= 0: return "Invalid input: timesteps must be a positive integer." 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 solve_ivp_method not in allowed_methods: return f"Invalid input: solve_ivp_method must be one of {allowed_methods}." # Create time array for evaluation t_eval = np.linspace(t0, t1, ntp) # 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=solve_ivp_method, dense_output=False, t_eval=t_eval, 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