Location: Kraeutler_Logic_Models @ fc1538ccb8fb / parameter_finder / kinetic_parameters_KrToy.py

Author:
Shelley Fong <s.fong@auckland.ac.nz>
Date:
2021-12-16 14:07:08+13:00
Desc:
Removing unnecessary files
Permanent Source URI:
http://models.cellml.org/workspace/7e8/rawfile/fc1538ccb8fbc57bcededcadd30f74643e34ac16/parameter_finder/kinetic_parameters_KrToy.py

# Kraeutler Reduced Hill Toy module

# Return kinetic parameters, constraints, and vector of volumes in each compartment (pL) 

# 8 reactions - 4 MM schemes of 2 reactions each
    # Re_AC1        
    # Re_AC2
    # Re_EC1
    # Re_EC2
    # Re_BD1
    # Re_BD2
    # Re_AND_E1
    # Re_AND_E2


# assume an OR gate is the same as a 1 node

# assume reactions follow classical Hill equation for (1) A*+B <-> complex
# then complex instantaneously breaks into (2) complex -> A* + B*
# the derivations for Km using Kraeutler parameters apply to reaction (1)


import numpy as np

def kinetic_parameters(M, dims, V):
    # Set the kinetic rate constants
    
    num_cols = dims['num_cols']
    num_rows = dims['num_rows']
    
    K_Kraeut = 1.37695668165159
    E0 = [1,1,1,1] # normalised enzyme concentrations
    Ymax = [1,1,1,1,1] # A,B,C,D,E
    W = 1
    tau = 1
    EC50 = 0.5
    n = 1.4
    beta = (pow(EC50,n) - 1)/(2*pow(EC50,n) - 1)

    K1_m = K_Kraeut        # units?
    K2_m = K_Kraeut        # units?
    K3_m = K_Kraeut        # units?
    K4_m = K_Kraeut        # units?

    Vmax = [0]*4
    Vmax[0] = W*beta*Ymax[2]/tau
    Vmax[1] = W*beta*Ymax[2]/tau
    Vmax[2] = W*beta*Ymax[3]/tau
    Vmax[3] = W*beta*Ymax[4]/tau #W*beta*YmaxE/tau        # AND gate
    vkcat = []
    for iv, v in enumerate(Vmax):
        vkcat.append(v/E0[iv])  # NOT fastKineticConstant as it is NOT transient
    
    # initialise arrays
    vkap = np.zeros(4)
    vkam = np.zeros(4)
    vkbp = np.zeros(4)
    vkbm = np.zeros(4)
    vK_m = [K1_m,K2_m,K3_m,K4_m]

    fastKineticConstant = 1e6 # 1/s
    smallReverse = 1

    for i in range(len(Vmax)):
        vkap[i] = fastKineticConstant
        vkam[i] = vkap[i]*vK_m[i] - vkcat[i]
        vkbp[i] = vkcat[i]
        vkbm[i] = (vkap[i]*vkbp[i])/vkam[i]    
        

    # Calculate bond graph constants from kinetic parameters
    # Note: units of kappa are fmol/s, units of K are fmol^-1
    k_kinetic = [vkap[0], vkbp[0], 
        vkap[1], vkbp[1],
        vkap[2], vkbp[2],
        vkap[3], vkbp[3],
        vkam[0], vkbm[0],
        vkam[1], vkbm[1],
        vkam[2], vkbm[2],
        vkam[3], vkbm[3],
        ]

    # CONSTRAINTS
    N_cT = []
    K_C = []

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

    return (k_kinetic, N_cT, K_C, W)