Location: BG_PKA @ 959a1eab6b85 / parameter_finder / kinetic_parameters_PKA.py

Author:
Shelley Fong <s.fong@auckland.ac.nz>
Date:
2021-11-17 10:26:39+13:00
Desc:
Using sympy for rational nullspace
Permanent Source URI:
https://models.physiomeproject.org/workspace/6cc/rawfile/959a1eab6b859e88de73c065526e3aff5828cd39/parameter_finder/kinetic_parameters_PKA.py

# PKA module

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

import numpy as np 

def kinetic_parameters(M, include_type2_reactions, dims, V):
    # Set the kinetic rate constants.
    # all reactions are reversible. no closed loops.
    # cAMP binds to R subunit one at a time
    
    num_cols = dims['num_cols']
    num_rows = dims['num_rows']

    bigNum = 1e3
    fastKineticConstant = bigNum
    smallReverse = fastKineticConstant/(pow(bigNum,2))
    
    # [Ka, Kb, Kd, Kpki]
    Km = [9.14, 1.64, 4.375, 2e-4]    
    N = len(Km)
    kim = []
    kip = []
    for i in range(4):
        kim.append(fastKineticConstant) # 1/s
        kip.append(kim[i] / Km[i])
    
    
    # repeat exct reactions for type I and type II holoenzymes
    # No closed loop, so no detailed balance
    k_kinetic = kip + kip + kim + kim

    # CONSTRAINTS
    N_cT = [] 
#     # Reaction i: [PKA:PKI] = [C][PKI] at SS   big error. Not isolated reaction
    # repeat for type 1 and 2
    if False:
        N_cT[0][num_cols + 1] = 1
        N_cT[0][num_cols + 5] = 1
        N_cT[0][num_cols + 7] = -1
    
    # Gibbs free energy of L + R binding                            **MED_ERROR**
    if False:
        N_cT[2][num_cols + 3] = 1   # ARC
        N_cT[2][num_cols] = -1  # cAMP
        N_cT[2][num_cols + 2] = -1  # RC
        G_0_bind = -45.1872 # kJ/mol
        R = 8.314
        T = 310
        K_bind = np.exp(G_0_bind/(R*T))*10^6
    
    
    K_C = []
    
    # volume vector
    W = list(np.append([1] * num_cols, [V['V_myo']] * num_rows))

    return (k_kinetic, [N_cT], K_C, W)