Location: BG_Inhib1 @ f03e6eb6109e / parameter_finder / kinetic_parameters.m

Author:
Shelley Fong <s.fong@auckland.ac.nz>
Date:
2021-10-19 16:28:01+13:00
Desc:
Renaming folder
Permanent Source URI:
https://models.cellml.org/workspace/6d6/rawfile/f03e6eb6109eab36c897370420e23d3b30bae4a6/parameter_finder/kinetic_parameters.m

% PLB module
% all rxn directions align with kinetic Saucerman model (Km unchanged,
% aside from dimensional scaling)

% 5 AUG PLB separated into PLB and Inhib1 submodules
% (parameter error was large with both submodules together)

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


function [k_kinetic, N_cT, K_C, W] = kinetic_parameters(M, include_all_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/(bigNum^2);
    
    cPP2A = 0.224; % uM (Bhalla Iyengar a on PMR)    but not sure what cell type this is

    % reaction IDs
%         PKAi1 (reverse), PKAi2 (reverse)
%         PP2ai1, PP2ai2

    k_pka_i1 = 60; %: per_sec 60
    Km_pka_i1 = 1; %: uM 1
    Vmax_pp2a_i1 = 14; %: uM_per_sec 14
    Km_pp2a_i1 = 1; %: uM 1

    vKm = [Km_pka_i1, Km_pp2a_i1];
    vkcat = [
        k_pka_i1, ...
        Vmax_pp2a_i1/cPP2A...
        ];

    N = length(vKm); 
    k1m = zeros(1,N);
    k1p = zeros(1,N);
    k2m = zeros(1,N);
    k2p = zeros(1,N);

    for i=1:N % forward rxns
            k2p(i) = vkcat(i);
            k1m(i) = fastKineticConstant; % 1/s
            k1p(i) = (k1m(i) + k2p(i)) / (vKm(i));
            k2m(i) = k1p(i)*k2p(i)/k1m(i); % detailed balance
    end
        
    if include_all_reactions
        k_kinetic = [
            k1p, k2p, k1m, k2m
            ]';
    else
        irr = [1 2 3];
        k_kinetic = [
            k1p(irr), k2p(irr), k1m(irr), k2m(irr)
            ]';
    end

    % CONSTRAINTS
    N_cT = [];
%     N_cT = zeros(1,size(M,2)); 
% %     % Reaction i: [PKA:PKI] = [C][PKI] at SS   big error. Not isolated reaction
%     % repeat for type 1 and 2
%     if false
%         N_cT(1,num_cols + 2) = 1;
%         N_cT(1,num_cols + 6) = 1;
%         N_cT(1,num_cols + 8) = -1;
%     end
%     % Gibbs free energy of L + R binding                            **MED_ERROR**
%     if false
%         N_cT(3,num_cols + 4) = 1;   % ARC
%         N_cT(3,num_cols + 1) = -1;  % cAMP
%         N_cT(3,num_cols + 3) = -1;  % RC
%         G_0_bind = -45.1872; % kJ/mol
%         R = 8.314;
%         T = 310;
%         K_bind = exp(G_0_bind/(R*T))*10^6;
%     end
    
    K_C = ones(1,size(N_cT,1));

    % volume vector
    W = [ones(num_cols,1); V.V_myo*ones(num_rows,1)];
    
return