Location: BG_to_channel @ 1fb000a5cf2d / parameter_finder / kinetic_parameters_TO.py

Author:
Shelley Fong <sfon036@UoA.auckland.ac.nz>
Date:
2024-11-12 10:57:09+13:00
Desc:
Updating cellml and sedml
Permanent Source URI:
https://models.physiomeproject.org/workspace/82e/rawfile/1fb000a5cf2d6895c9c41e37dbe0565db663ea67/parameter_finder/kinetic_parameters_TO.py

# transient outward, translated from Kernik19 model

# 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']
    # constants are stored in V
    F = V['F']
    R = V['R']
    T = V['T']
    N_A = V['N_A']

    G_GHK = 1.154140674723088e-08    # Unit mA/mM
    P_to = G_GHK/F * 1e12 # Unit pL/s . G_GHK [=] Amp/(mol/s)
    x_to_channel = 8800e3/N_A*1e15 # unit    fmol
    x_to_channel = V['numChannels']/N_A*1e15 # unit fmol

    # load gate transition parameters
    params_r = [0.029380177124271,2.608456313221509,0.196830579136332,-0.101962639822750]
    params_s = [3.977695957311321e-04,-1.352897405948804,0.037512325129369,1.404170222801920]
    z_rf = params_r[1]
    z_rr = params_r[3]
    z_sf = params_s[1]
    z_sr = params_s[3]
    zf = [z_rf, z_sf]
    zr = [z_rr, z_sr]

    # unit    s ^ -1
    alpha_r_bg = params_r[0]*1e3 # unit    s ^ -1
    beta_r_bg = params_r[2]*1e3 # unit    s ^ -1

    alpha_s_bg = params_s[0]*1e3 # unit    s ^ -1
    beta_s_bg = params_s[2]*1e3 # unit    s ^ -1

    kf_to = [P_to / x_to_channel,     # R_GHK
    alpha_r_bg,     # Rr_00
    alpha_r_bg,     # Rr_01
    alpha_s_bg,     # Rs_00
    alpha_s_bg]     # Rs_10

    kr_to = [P_to / x_to_channel,     # R_GHK
    beta_r_bg,     # Rr_00
    beta_r_bg,     # Rr_01
    beta_s_bg,     # Rs_00
    beta_s_bg]     # Rs_10

    k_kinetic = kf_to + kr_to

    # 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)