- Author:
- Shelley Fong <s.fong@auckland.ac.nz>
- Date:
- 2022-03-09 10:55:28+13:00
- Desc:
- Adding units
- Permanent Source URI:
- https://models.physiomeproject.org/workspace/823/rawfile/71ec64bebb03fc9a01a240250a92c352d982975b/parameter_finder/kinetic_parameters_K.py
# fast Na module
# Return kinetic parameters, constraints, and vector of volumes in each
# compartment (pL) (1 if gating variable, or in element corresponding to
# kappa)
# Translated from Pan 2018 cardiac AP
import numpy as np
def kinetic_parameters(M, include_type2_reactions, dims, V):
# Set the kinetic rate constants
num_cols = dims['num_cols']
num_rows = dims['num_rows']
# load gate transition parameters
params_K1 = [1.1273394822768654, 0.03356898582323646, 13544.806358561376, 3.115336723982081]
alpha_K1_bg = params_K1[0] * 1e3 #unit s ^ -1
beta_K1_bg = params_K1[2] * 1e3 # unit s ^ -1
# constants are stored in V
F = V['F']
R = V['R']
T = V['T']
N_A = V['N_A']
cKo = V['cKo']
G_GHK = 2.2180307905110876E-8 # Unit mA/mM
P_K = G_GHK/F * 1e12 # Unit pL/s . G_GHK [=] Amp/(mol/s)
x_K_channel = 5369 / N_A * 1e15 # unit fmol
# Calculate bond graph constants from kinetic parameters
# Note: units of kappa are fmol/s, units of K are fmol^-1
params_X = [2.231715978758744, 0.5192318115907739, 0.5749888974379704, -0.731689511547001]
# Calculate parameters for X_i gate
A = np.exp(-56.26 / 32.1)
K = 1 / (1 + A * np.exp(-120 / 32.1))
alpha0 = K # Unit ms ^ -1
beta0 = A * K # Unit ms ^ -1
zf = 0
zr = R * T / 32.1 / F
params_Xi = [alpha0, zf * 1e3, beta0, zr * 1e3]
alpha_X_bg = params_X[0] # unit s ^ -1
beta_X_bg = params_X[2] # unit s ^ -1
alpha_Xi_bg = params_Xi[0] * 1e3 # unit s ^ -1
beta_Xi_bg = params_Xi[2] * 1e3 # unit s ^ -1
kf_K = [P_K / x_K_channel / np.sqrt(cKo) , # R_GHK
2 * alpha_X_bg , # RX00
alpha_X_bg ,# RX00
2 * alpha_X_bg , # RX00
alpha_X_bg ,# RX00
alpha_Xi_bg ,# RX00
alpha_Xi_bg ,# RX00
alpha_Xi_bg] # RX00
kr_K = [P_K / x_K_channel / np.sqrt(cKo), # R_GHK
beta_X_bg, # RX00
2 * beta_X_bg, # RX00
beta_X_bg , # RX00
2 * beta_X_bg , # RX00
beta_Xi_bg , # RX00
beta_Xi_bg , # RX00
beta_Xi_bg] # RX00
k_kinetic = kf_K + kr_K
# CONSTRAINTS
N_cT = []
K_C = []
# volume vector
# W = list(np.append([1] * num_cols, [V['V_myo']] * num_rows))
W = [1] * num_cols + [V['V_myo'], V['V_o']] + [1] * (num_rows-2)
return (k_kinetic, N_cT, K_C, W)