Location: BG_funny @ 13ccd45033f7 / parameter_finder / kinetic_parameters_funny.py

Author:
Shelley Fong <s.fong@auckland.ac.nz>
Date:
2022-03-07 13:07:15+13:00
Desc:
Rename comp
Permanent Source URI:
https://models.cellml.org/workspace/838/rawfile/13ccd45033f712bd29772d87a155d16643a5ffa0/parameter_finder/kinetic_parameters_funny.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']
    # constants are stored in V
    F = V['F']
    R = V['R']
    T = V['T']
    N_A = V['N_A']

    G_GHK_Na = 5.324602021695781E-6    # Unit mA/mM
    G_GHK_K = 1.5424020420430937E-5    # Unit mA/mM
    P_f_Na = G_GHK_Na/F * 1e12 # Unit pL/s . G_GHK [=] Amp/(mol/s)
    P_f_K = G_GHK_K/F * 1e12 # Unit pL/s . G_GHK [=] Amp/(mol/s)
    x_f_channel = 5369/N_A*1e15 # unit    fmol

    # load gate transition parameters
    params_gate = [8.806849257471848E-8,	-2.2956878362897646,	0.009357671936340822,	0.7076589313540619]
    # unit    s ^ -1
    alpha = params_gate[0] # unit    s ^ -1
    beta = params_gate[2] # unit    s ^ -1

    kf = [P_f_Na / x_f_channel,     # R_GHK
          P_f_K / x_f_channel,     # R_GHK
          alpha]

    kr = [P_f_Na / x_f_channel,     # R_GHK
          P_f_K / x_f_channel,     # R_GHK
          beta]

    k_kinetic = kf + kr

    # 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'], V['V_myo'], V['V_o']] + [1] * (num_rows-4)

    return (k_kinetic, N_cT, K_C, W)