Location: BG_ns_Ca @ 0084fa749de7 / parameter_finder / kinetic_parameters_ns.py

Author:
Shelley Fong <s.fong@auckland.ac.nz>
Date:
2022-04-11 14:53:16+12:00
Desc:
Changing method of number of channels present. Guess density. Using SA of human iPSC for Kernik. Updating volumes
Permanent Source URI:
https://models.physiomeproject.org/workspace/83b/rawfile/0084fa749de7bc58ba31705633cf1a77e7eb0603/parameter_finder/kinetic_parameters_ns.py

# Return kinetic parameters, constraints, and vector of volumes in each
# compartment (pL) (1 if gating variable, or in element corresponding to
# kappa)

# Adapted 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 must be positive
    G_GHK_Ca = 1.321393816363888e-14    # Unit mA/mM
    G_GHK_Na = 3.504413071719025e-16
    G_GHK_K = 3.587541555438427e-16
    P_Ca = G_GHK_Ca/F * 1e12 # Unit pL/s . G_GHK_Ca [=] Amp/(mol/s)
    P_Na = G_GHK_Na / F * 1e12
    P_K = G_GHK_K / F * 1e12
    x_ns = 5e3*2508 / N_A * 1e15 # unit    fmol
    x_ns = 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_ns = [P_Ca/x_ns, P_Na/x_ns, P_K/x_ns]
    kr_ns = [P_Ca/x_ns, P_Na/x_ns, P_K/x_ns]

    k_kinetic = kf_ns + kr_ns

    # CONSTRAINTS
    N_cT = []
    K_C = []

    # volume vector
    # W = list(np.append([1] * num_cols, [V['V_myo']] * num_rows))
    W = [1] * num_cols + 3*[V['V_myo'], V['V_o']]

    return (k_kinetic, N_cT, K_C, W)