Location: BG_Kp @ 4e1d102e1319 / parameter_finder / kinetic_parameters_Kp.py

Author:
Shelley Fong <s.fong@auckland.ac.nz>
Date:
2022-04-26 08:59:38+12:00
Desc:
Adding matlab curve and gate fitting files from Pan
Permanent Source URI:
https://staging.physiomeproject.org/workspace/825/rawfile/4e1d102e131954573132c707b5f2e764fb008587/parameter_finder/kinetic_parameters_Kp.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']

    # load gate transition parameters
    A = np.exp(7.488 / 5.98)
    K = 1 / (1 + A * np.exp(-60 / 5.98))

    alpha0 = K # Unit    ms ^ -1
    beta0 = A * K # Unit    ms ^ -1

    zf = 0
    zr = -R * T / 5.98 / F

    params_Kp = [alpha0,    zf * 1e3,
        beta0,    zr * 1e3]

    alpha_Kp_bg = params_Kp[0] * 1e3 # unit    s ^ -1
    beta_Kp_bg = params_Kp[2] * 1e3 # unit    s ^ -1

    G_GHK = 9.058056491539798e-11    # Unit mA/mM
    P_Kp = G_GHK/F * 1e12 # Unit pL/s . G_GHK [=] Amp/(mol/s)
    x_Kp_channel = 725 / N_A * 1e15 # unit    fmol
    x_Kp_channel = V['numChannels']/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
    kf_Kp = [P_Kp/x_Kp_channel,
        alpha_Kp_bg]

    kr_Kp = [P_Kp/x_Kp_channel,
             beta_Kp_bg]

    k_kinetic = kf_Kp + kr_Kp

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