// Created by libAntimony v2.8.0
model *vasalou2010()
// Compartments and Species:
compartment extra, cytoplasm, store, nucleus;
species Ca_in in cytoplasm, Ca_store in store, Ca_ex in extra, M_P in cytoplasm;
species M_C in cytoplasm, M_B in cytoplasm, P_C in cytoplasm, C_C in cytoplasm;
species P_CP in cytoplasm, C_CP in cytoplasm, PC_C in cytoplasm, PC_N in nucleus;
species PC_CP in cytoplasm, PC_NP in nucleus, B_C in cytoplasm, B_CP in cytoplasm;
species B_N in nucleus, B_NP in nucleus, I_N in nucleus, CB in cytoplasm;
species VIP in cytoplasm, Cl_ex in extra, Cl_o in cytoplasm, $GABA in cytoplasm;
species GABA_o in cytoplasm, $K_in in cytoplasm, K_ex in extra, $Na_in in cytoplasm;
species Na_ex in extra;
// Assignment Rules:
GABA := GABA_o + (v_GABA*VIP)/(K_GABA + VIP);
K_in := K_ex/theta_K;
theta_K := exp(E_K/(k_q*(T + T_abs)*1000));
Na_in := Na_ex/theta_Na;
theta_Na := exp(E_Na/(k_q*(T + T_abs)*1000));
v_K := (V_MK*Ca_in)/(k_MK + Ca_in) + (V_b*beta)/(k_b + beta);
beta := VIP/(VIP + K_D);
f_r := -1/(tau_m*ln((theta - R_star*I_star)/(V_reset - R_star*I_star)));
tau_m := Cm*R_star;
theta := V_rest + V_theta;
R_star := 1/((g_Na + g_K + g_L + g_Ca + gK_Ca) - g_inhib - g_ex);
I_star := (g_Na*E_Na + g_Ca*E_Ca + g_K*E_K + g_L*E_L + gK_Ca*E_K) - g_inhib*E_inhib - g_ex*E_ex;
V_reset := V_rest + 4;
v_sPc := v_sP0 + (C_T*CB)/(K_C + CB);
E_Na := (E_Na_0*(T + T_abs))/(T_room + T_abs);
E_K := (E_K_0*(T + T_abs))/(T_room + T_abs);
E_L := (E_L_0*(T + T_abs))/(T_room + T_abs);
E_Ca := (k_q*(T + T_abs))/2*ln(Ca_ex/Ca_in)*1000;
Cl_in := Cl_o + M_P/(K_Cl1 + M_P)*v_Cl1 + GABA^n_Cl/(K_Cl2 + GABA^n_Cl)*v_Cl2;
E_inhib := -k_q*(T + T_abs)*ln(Cl_ex/Cl_in)*1000;
P_K := (v_PK*B_C^n_PK)/(K_PK + B_C^n_PK);
alpha := 4*P_Ca*Ca_in*10^-3 + P_K*K_in + P_Na*Na_in + P_Cl*Cl_ex;
beta_a := ((P_K*K_in - P_K*K_ex + P_Na*Na_in) - P_Na*Na_ex + P_Cl*Cl_ex) - P_Cl*Cl_in;
c := -(4*P_Ca*Ca_ex*10^-3 + P_K*K_ex + P_Na*Na_ex + P_Cl*Cl_in);
psi := (sqrt(beta_a^2 - 4*alpha*c) - beta_a)/(2*alpha);
V_rest := (R_g*(T + T_abs))/Faraday*ln(psi)*1000;
R := (V_R*V_rest)/(K_R + V_rest);
I_Na := g_Na*(V_rest - E_Na);
g_K := g_K_0 + M_P/(K_gk + M_P)*v_gk;
I_Na_abs := sqrt(I_Na^2);
g_ex := (V_ex1*I_Na_abs^n_ex1)/(K_ex1 + I_Na_abs^n_ex1) + Ca_in^n_ex2/(K_ex2 + Ca_in^n_ex2)*V_ex2;
g_L := 1/R;
g_Ca := v_Ca*(M_P^n_Ca/(K_Ca + M_P^n_Ca));
gK_Ca := VK_Ca*(C_C^n_KCa/(K_KCa + C_C^n_KCa));
// Reactions:
vo: -> 0.001Ca_in; 1000*cytoplasm*((v_vo*B_C^n_vo)/(K_vo + B_C^n_vo));
v_ca_out: 0.001Ca_in -> ; (1000*cytoplasm*v_kk*C_C^n_kk)/(K_kk + C_C^n_kk)*Ca_in^n_kCa;
v1: -> 0.001Ca_in; 1000*cytoplasm*V_M1*beta_IP3;
v2: 0.001Ca_in -> 0.001Ca_store; (1000*cytoplasm*V_M2*Ca_in^n_M2)/(K_2^n_M2 + Ca_in^n_M2);
v3: 0.001Ca_store -> 0.001Ca_in; (1000*store*((V_M3*Ca_store^n_M3)/(K_R_Ca^n_M3 + Ca_store^n_M3))*Ca_in^p_A)/(K_A^p_A + Ca_in^p_A);
v_Ca_leak: 0.001Ca_store -> 0.001Ca_in; 1000*store*k_f*Ca_store;
MP_transcription: -> M_P; (cytoplasm*(v_sP0 + (C_T*CB)/(K_C + CB))*B_N^n_BN)/(K_AP^n_BN + B_N^n_BN);
MP_decay: M_P -> ; cytoplasm*((v_mP*M_P)/(K_mP + M_P) + kd_mP*M_P);
MC_transcription: -> M_C; (cytoplasm*v_sC*B_N^n_BN)/(K_sC^n_BN + B_N^n_BN);
MC_decay: M_C -> ; cytoplasm*((v_mC*M_C)/(K_mC + M_C) + kd_mC*M_C);
MB_transcription: -> M_B; cytoplasm*((v_sB*K_IB^m_BN)/(K_IB^m_BN + B_N^m_BN));
MB_decay: M_B -> ; cytoplasm*((v_mB*M_B)/(K_mB + M_B) + kd_mB*M_B);
PC_translation: -> P_C; cytoplasm*ks_P*M_P;
PC_degradation: P_C -> ; cytoplasm*kd_n*P_C;
PC_phosphorylation: P_C -> P_CP; cytoplasm*((V1_P*P_C)/(K_p + P_C) - (V2_P*P_CP)/(K_dp + P_CP));
PCC_formation: P_C + C_C -> PC_C; cytoplasm*(k3*P_C*C_C - k4*PC_C);
CC_translation: -> C_C; cytoplasm*ks_C*M_C;
CC_degradation: C_C -> ; cytoplasm*kd_nc*C_C;
CC_phosphorylation: C_C -> C_CP; cytoplasm*((V1_C*C_C)/(K_p + C_C) - (V2_C*C_CP)/(K_dp + C_CP));
PCP_degradation: P_CP -> ; cytoplasm*((v_dPC*P_CP)/(Kd + P_CP) + kd_n*P_CP);
CCP_degradation: C_CP -> ; cytoplasm*((v_dCC*C_CP)/(Kd + C_CP) + kd_n*C_CP);
PCC_shuttling: PC_C -> PC_N; cytoplasm*k1*PC_C - nucleus*k2*PC_N;
PCC_phosphorylation: PC_C -> PC_CP; cytoplasm*((V1_PC*PC_C)/(K_p + PC_C) - (V2_PC*PC_CP)/(K_dp + PC_CP));
PCC_degradation: PC_C -> ; cytoplasm*kd_n*PC_C;
PCCP_degradation: PC_CP -> ; cytoplasm*((vd_PCC*PC_CP)/(Kd + PC_CP) + kd_n*PC_CP);
PCN_phosphorylation: PC_N -> PC_NP; nucleus*((V3_PC*PC_N)/(K_p + PC_N) - (V4_PC*PC_NP)/(K_dp + PC_NP));
PCN_degradation: PC_N -> ; nucleus*kd_n*PC_N;
PCNP_degradation: PC_NP -> ; nucleus*((vd_PCN*PC_NP)/(Kd + PC_NP) + kd_n*PC_NP);
IN_formation: B_N + PC_N -> I_N; cytoplasm*(k7*B_N*PC_N - k8*I_N);
IN_degradation: I_N -> ; nucleus*((vd_IN*I_N)/(Kd + I_N) + kd_n*I_N);
BC_translation: -> B_C; cytoplasm*ksB*M_B;
BC_phosphorylation: B_C -> B_CP; cytoplasm*((V1_B*B_C)/(K_p + B_C) - (V2_B*B_CP)/(K_dp + B_CP));
BC_shuttling: B_C -> B_N; cytoplasm*k5*B_C - nucleus*k6*B_N;
BC_degradation: B_C -> ; cytoplasm*kd_n*B_C;
BCP_degradation: B_CP -> ; cytoplasm*((vd_BC*B_CP)/(Kd + B_CP) + kd_n*B_CP);
BN_phosphorylation: B_N -> B_NP; nucleus*((V3_B*B_N)/(K_p + B_N) - (V4_B*B_NP)/(K_dp + B_NP));
BN_degradation: B_N -> ; nucleus*kd_n*B_N;
BNP_degradation: B_NP -> ; nucleus*((vd_BN*B_NP)/(Kd + B_NP) + kd_n*B_NP);
CB_activation: -> CB; (cytoplasm*((v_K*(1 - CB))/((K_1_CB + 1) - CB) - (vP*CB)/(K_2_CB + CB)))/WT;
VIP_accumulation: -> VIP; (cytoplasm*v_VIP*f_r^n_VIP)/(K_VIP + f_r^n_VIP);
VIP_depletion: VIP -> ; cytoplasm*k_dVIP*VIP^n_dVIP;
// Species initializations:
Ca_in = 0.1;
Ca_in has uM;
Ca_store = 0.1;
Ca_store has uM;
Ca_ex = 5;
Ca_ex has uM;
M_P = 2.8;
M_C = 2;
M_B = 7.94;
P_C = 0.4;
C_C = 12;
P_CP = 0.13;
C_CP = 9;
PC_C = 1.26;
PC_N = 0.16;
PC_CP = 0.2;
PC_NP = 0.091;
B_C = 2.41;
B_CP = 0.48;
B_N = 1.94;
B_NP = 0.32;
I_N = 0.05;
CB = 0.12;
VIP = 0;
Cl_ex = 114.5;
Cl_ex has mM;
Cl_o = 1;
Cl_o has mM;
GABA_o = 0.2;
K_in has mM;
K_ex = 1;
K_ex has mM;
Na_in has mM;
Na_ex = 145;
Na_ex has mM;
// Compartment initializations:
extra = 1;
cytoplasm = 1;
store = 1;
nucleus = 1;
// Variable initializations:
v_GABA = 19;
v_GABA has nM;
K_GABA = 3;
K_GABA has nM;
theta_K has mV;
theta_Na has mV;
v_vo = 0.09;
v_vo has uM_per_h;
n_vo = 4.5;
n_vo has dimensionless;
K_vo = 4.5;
K_vo has nM;
v_kk = 3.3;
v_kk has per_uM_per_h;
n_kk = 0.1;
n_kk has dimensionless;
K_kk = 0.02;
K_kk has nM;
n_kCa = 2;
n_kCa has dimensionless;
V_M1 = 0.0003;
V_M1 has uM_per_h;
beta_IP3 = 0.5;
beta_IP3 has dimensionless;
V_M2 = 149.5;
V_M2 has uM_per_h;
n_M2 = 2.2;
n_M2 has dimensionless;
K_2 = 5;
K_2 has uM;
V_M3 = 400;
V_M3 has uM_per_h;
n_M3 = 6;
n_M3 has dimensionless;
K_R_Ca = 3;
K_R_Ca has uM;
p_A = 4.2;
p_A has dimensionless;
K_A = 0.67;
K_A has uM;
k_f = 0.001;
k_f has per_h;
v_sP0 = 1;
v_sP0 has nM_per_h;
C_T = 1.6;
C_T has nM_per_h;
K_C = 0.15;
K_C has nM;
n_BN = 4;
n_BN has dimensionless;
K_AP = 0.6;
K_AP has nM;
v_mP = 1.1;
v_mP has nM_per_h;
K_mP = 0.31;
K_mP has nM;
kd_mP = 0.01;
kd_mP has per_h;
v_sC = 1.1;
v_sC has nM_per_h;
K_sC = 0.6;
K_sC has nM;
v_mC = 1;
v_mC has nM_per_h;
K_mC = 0.4;
K_mC has nM;
kd_mC = 0.01;
kd_mC has per_h;
v_sB = 1;
v_sB has nM_per_h;
K_IB = 2.2;
K_IB has nM;
m_BN = 2;
m_BN has dimensionless;
v_mB = 0.8;
v_mB has nM_per_h;
K_mB = 0.4;
K_mB has nM;
kd_mB = 0.01;
kd_mB has per_h;
ks_P = 0.6;
ks_P has per_h;
kd_n = 0.01;
kd_n has per_h;
V1_P = V_phos;
V1_P has nM_per_h;
V_phos = 0.4;
K_p = 0.1;
K_p has nM;
V2_P = 0.3;
V2_P has nM_per_h;
K_dp = 0.1;
K_dp has nM;
k3 = 0.4;
k3 has per_nM_per_h;
k4 = 0.2;
k4 has per_h;
ks_C = 1.6;
ks_C has per_h;
kd_nc = 0.12;
kd_nc has per_h;
V1_C = 0.6;
V1_C has nM_per_h;
V2_C = 0.1;
V2_C has nM_per_h;
v_dPC = 0.7;
v_dPC has per_nM_per_h;
Kd = 0.3;
Kd has nM;
v_dCC = 0.7;
v_dCC has nM_per_h;
k1 = 0.45;
k1 has per_h;
k2 = 0.2;
k2 has per_h;
V1_PC = V_phos;
V1_PC has nM_per_h;
V2_PC = 0.1;
V2_PC has nM_per_h;
vd_PCC = 0.7;
vd_PCC has nM_per_h;
V3_PC = V_phos;
V3_PC has nM_per_h;
V4_PC = 0.1;
V4_PC has nM_per_h;
vd_PCN = 0.7;
vd_PCN has nM_per_h;
k7 = 0.5;
k7 has per_nM_per_h;
k8 = 0.1;
k8 has per_h;
vd_IN = 0.8;
vd_IN has nM_per_h;
ksB = 0.12;
V1_B = 0.5;
V1_B has nM_per_h;
V2_B = 0.1;
V2_B has nM_per_h;
k5 = 0.4;
k6 = 0.2;
vd_BC = 0.5;
vd_BC has nM_per_h;
V3_B = 0.5;
V3_B has nM_per_h;
V4_B = 0.2;
V4_B has nM_per_h;
vd_BN = 0.6;
vd_BN has nM_per_h;
v_K has nM_per_h;
V_MK = 5;
k_MK = 2.9;
V_b = 2;
beta has dimensionless;
k_b = 2;
K_1_CB = 0.01;
K_1_CB has nM;
vP = 1;
vP has nM_per_h;
K_2_CB = 0.01;
K_2_CB has nM;
WT = 1;
WT has dimensionless;
v_VIP = 0.5;
v_VIP has nM_per_h;
f_r has hertz;
theta has mV;
I_star has uA;
V_reset has mV;
n_VIP = 1.9;
n_VIP has dimensionless;
K_VIP = 15;
k_dVIP = 0.5;
n_dVIP = 0.2;
n_dVIP has dimensionless;
K_D = 0.08;
E_Na has mV;
E_Na_0 = 45;
E_Na_0 has mV;
T = 37;
T has kelvin;
T_abs = 273.15;
T_abs has kelvin;
T_room = 22;
T_room has kelvin;
E_K has mV;
E_K_0 = -97;
E_K_0 has mV;
E_L has mV;
E_L_0 = -29;
E_L_0 has mV;
E_Ca has mV;
k_q = 8.75e-005;
K_Cl1 = 4;
v_Cl1 = 15.5;
n_Cl = -0.2;
K_Cl2 = 1;
v_Cl2 = 19;
E_inhib has mV;
v_PK = 1.9;
n_PK = -2;
K_PK = 1;
P_Ca = 0.05;
P_Na = 0.036;
P_Cl = 0.3;
V_rest has mV;
R_g = 8.314;
Faraday = 96485;
V_theta = 20;
V_theta has mV;
V_R = 0.41;
K_R = 34;
K_R has mV;
I_Na has uA;
g_Na = 36;
g_Na has nS;
g_K has nS;
g_K_0 = 9.7;
g_K_0 has nS;
K_gk = 10;
K_gk has nM;
v_gk = 10;
v_gk has nS;
I_Na_abs has uA;
g_ex has nS;
V_ex1 = 105;
n_ex1 = 2.5;
K_ex1 = 574050000;
K_ex1 has uA;
n_ex2 = -1;
K_ex2 = 1;
K_ex2 has per_uM;
V_ex2 = 4.4;
v_Ca = 12.3;
n_Ca = 2.2;
K_Ca = 22;
VK_Ca = 3;
n_KCa = -1;
K_KCa = 0.16;
g_inhib = 12.3;
g_inhib has nS;
E_ex = 0;
E_ex has mV;
Cm = 5;
PK_o = 1.1;
// Other declarations:
var theta_K, theta_Na, v_K, beta, f_r, tau_m, theta, R_star, I_star, V_reset;
var v_sPc, E_Na, E_K, E_L, E_Ca, Cl_in, E_inhib, P_K, alpha, beta_a, c;
var psi, V_rest, R, I_Na, g_K, I_Na_abs, g_ex, g_L, g_Ca, gK_Ca;
const extra, cytoplasm, store, nucleus, v_GABA, K_GABA, v_vo, n_vo, K_vo;
const v_kk, n_kk, K_kk, n_kCa, V_M1, beta_IP3, V_M2, n_M2, K_2, V_M3, n_M3;
const K_R_Ca, p_A, K_A, k_f, v_sP0, C_T, K_C, n_BN, K_AP, v_mP, K_mP, kd_mP;
const v_sC, K_sC, v_mC, K_mC, kd_mC, v_sB, K_IB, m_BN, v_mB, K_mB, kd_mB;
const ks_P, kd_n, V1_P, V_phos, K_p, V2_P, K_dp, k3, k4, ks_C, kd_nc, V1_C;
const V2_C, v_dPC, Kd, v_dCC, k1, k2, V1_PC, V2_PC, vd_PCC, V3_PC, V4_PC;
const vd_PCN, k7, k8, vd_IN, ksB, V1_B, V2_B, k5, k6, vd_BC, V3_B, V4_B;
const vd_BN, V_MK, k_MK, V_b, k_b, K_1_CB, vP, K_2_CB, WT, v_VIP, n_VIP;
const K_VIP, k_dVIP, n_dVIP, K_D, E_Na_0, T, T_abs, T_room, E_K_0, E_L_0;
const k_q, K_Cl1, v_Cl1, n_Cl, K_Cl2, v_Cl2, v_PK, n_PK, K_PK, P_Ca, P_Na;
const P_Cl, R_g, Faraday, V_theta, V_R, K_R, g_Na, g_K_0, K_gk, v_gk, V_ex1;
const n_ex1, K_ex1, n_ex2, K_ex2, V_ex2, v_Ca, n_Ca, K_Ca, VK_Ca, n_KCa;
const K_KCa, g_inhib, E_ex, Cm, PK_o;
// Unit definitions:
unit substance = 1e-9 mole;
unit umole = 1e-6 mole;
unit mmole = 1e-3 mole;
unit time_unit = 3600 second;
unit mV = 1e-3 volt;
unit nS = 1e-9 sievert;
unit uA = 1e-6 ampere;
unit nF = 1e-9 farad;
unit nM = 1e-9 mole / litre;
unit per_nM = litre / 1e-9 mole;
unit per_nM_2 = litre / (1e-9 mole)^2;
unit per_uM = litre / 1e-6 mole;
unit mM = 1e-3 mole / litre;
unit uM = 1e-6 mole / litre;
unit per_h = 1 / 3600 second;
unit uM_per_h = 1e-6 mole / (litre * 3600 second);
unit nM_per_h = 1e-9 mole / (litre * 3600 second);
unit per_uM_per_h = litre / (1e-6 mole * 3600 second);
unit per_nM_per_h = litre / (1e-9 mole * 3600 second);
// Display Names:
substance is "nmole";
umole is "micromole";
mmole is "millimole";
time_unit is "hour";
mV is "milliVolt";
nS is "nanoSievert";
uA is "microAmpere";
nF is "nanoFarrad";
end