 %  DOQCS : http://doqcs.ncbs.res.in/ 
 %  Accession Name = mkp1_feedback_effects 
 %  Accession Number = 4 
 %  Transcriber = Upinder S. Bhalla, NCBS 
 %  Developer = Upinder S. Bhalla, NCBS 
 %  Species = Generic mammalian 
 %  Tissue = NIH 3T3 Expression 
 %  Cell Compartment = Surface - nucleus 
 %  Notes =  This is a network involving the MAPK-PKC feedback loop with input from the PDGFR in the synapse. The distinctive feature of this model is that it includes MKP-1 induction by MAPK, and the consequent inhibitory regulation of MAPK and the feedback loop. Lots of interesting dynamics arise from this. This <a href= http://www.ncbs.res.in/~bhalla/ltploop/mkpfeedback/index.html >link</a> provides supplementary material for the paper <a href= http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=12169734 >Bhalla US et al. Science (2002) 297(5583):1018-23</a>. In the form of several example simulations and demos for the figures in the paper. 
 
   % Note: All the concentrations are in micro Mole (uM)

function moose_convert
%Matlab simulation for chemical kinetics

% Saved on Tue Feb  1 14:51:53 2005

% Automatically generated from kkit model in MOOSE by conv_matlab

global buff;
tspan=[0, 2000];
% Molecule names
molnames = {
'1 /kinetics/Shc*.Sos.Grb2'
'2 /kinetics/Shc*.Sos.Grb2/Sos.Ras_GEF/Sos.Ras_GEF_cplx'
'3 /kinetics/Sos/Sos*.Grb2'
'4 /kinetics/Sos/Grb2'
'5 /kinetics/Sos/Sos.Grb2'
'6 /kinetics/Sos/Sos*'
'7 /kinetics/Sos/Sos'
'8 /kinetics/PKC/PKC-Ca'
'9 /kinetics/PKC/PKC-DAG-AA*'
'10 /kinetics/PKC/PKC-Ca-AA*'
'11 /kinetics/PKC/PKC-Ca-memb*'
'12 /kinetics/PKC/PKC-DAG-memb*'
'13 /kinetics/PKC/PKC-basal*'
'14 /kinetics/PKC/PKC-AA*'
'15 /kinetics/PKC/PKC-Ca-DAG'
'16 /kinetics/PKC/PKC-DAG'
'17 /kinetics/PKC/PKC-DAG-AA'
'18 /kinetics/PKC/PKC-cytosolic'
'19 /kinetics/AA'
'20 /kinetics/PKC-active/PKC-act-raf/PKC-act-raf_cplx'
'21 /kinetics/PKC-active/PKC-inact-GAP/PKC-inact-GAP_cplx'
'22 /kinetics/PKC-active/PKC-act-GEF/PKC-act-GEF_cplx'
'23 /kinetics/MAPK/craf-1'
'24 /kinetics/MAPK/craf-1*'
'25 /kinetics/MAPK/MAPKK'
'26 /kinetics/MAPK/MAPK'
'27 /kinetics/MAPK/craf-1**'
'28 /kinetics/MAPK/MAPK-tyr'
'29 /kinetics/MAPK/MAPKK*'
'30 /kinetics/MAPK/MAPKK*/MAPKKtyr/MAPKKtyr_cplx'
'31 /kinetics/MAPK/MAPKK*/MAPKKthr/MAPKKthr_cplx'
'32 /kinetics/MAPK/MAPKK-ser'
'33 /kinetics/MAPK/RGR'
'34 /kinetics/MAPK/RGR/RGR.1/RGR.1_cplx'
'35 /kinetics/MAPK/RGR/RGR.2/RGR.2_cplx'
'36 /kinetics/MAPK/MKP-1-ser359*'
'37 /kinetics/MAPK/MKP-1**'
'38 /kinetics/MAPK/nuc_MAPK*'
'39 /kinetics/MAPK/nuc_MAPK*/act_transcription/act_transcription_cplx'
'40 /kinetics/MAPK/MKP1-RNA'
'41 /kinetics/MAPK/Raf*-GTP-Ras'
'42 /kinetics/MAPK/Raf*-GTP-Ras/Raf*-GTP-Ras.1/Raf*-GTP-Ras.1_cplx'
'43 /kinetics/MAPK/Raf*-GTP-Ras/Raf*-GTP-Ras.2/Raf*-GTP-Ras.2_cplx'
'44 /kinetics/MAPK*'
'45 /kinetics/MAPK*/MAPK*-feedback/MAPK*-feedback_cplx'
'46 /kinetics/MAPK*/MAPK*/MAPK*_cplx'
'47 /kinetics/MAPK*/MKP-1-phosph/MKP-1-phosph_cplx'
'48 /kinetics/MAPK*/MKP-1-phosph2/MKP-1-phosph2_cplx'
'49 /kinetics/MKP-1'
'50 /kinetics/PPhosphatase2A'
'51 /kinetics/PPhosphatase2A/craf-deph/craf-deph_cplx'
'52 /kinetics/PPhosphatase2A/MAPKK-deph/MAPKK-deph_cplx'
'53 /kinetics/PPhosphatase2A/MAPKK-deph-ser/MAPKK-deph-ser_cplx'
'54 /kinetics/PPhosphatase2A/craf**-deph/craf**-deph_cplx'
'55 /kinetics/PLA2/PLA2-cytosolic'
'56 /kinetics/PLA2/PLA2-Ca*'
'57 /kinetics/PLA2/PLA2-Ca*/kenz/kenz_cplx'
'58 /kinetics/PLA2/PIP2-PLA2*'
'59 /kinetics/PLA2/PIP2-PLA2*/kenz/kenz_cplx'
'60 /kinetics/PLA2/PIP2-Ca-PLA2*'
'61 /kinetics/PLA2/PIP2-Ca-PLA2*/kenz/kenz_cplx'
'62 /kinetics/PLA2/DAG-Ca-PLA2*'
'63 /kinetics/PLA2/DAG-Ca-PLA2*/kenz/kenz_cplx'
'64 /kinetics/PLA2/PLA2*-Ca'
'65 /kinetics/PLA2/PLA2*-Ca/kenz/kenz_cplx'
'66 /kinetics/PLA2/PLA2*'
'67 /kinetics/Ras/inact-GEF'
'68 /kinetics/Ras/GEF*'
'69 /kinetics/Ras/GEF*/GEF*-act-ras/GEF*-act-ras_cplx'
'70 /kinetics/Ras/GTP-Ras'
'71 /kinetics/Ras/GDP-Ras'
'72 /kinetics/Ras/GAP*'
'73 /kinetics/Ras/GAP'
'74 /kinetics/Ras/GAP/GAP-inact-ras/GAP-inact-ras_cplx'
'75 /kinetics/PDGFR/PDGFR'
'76 /kinetics/PDGFR/L.PDGFR'
'77 /kinetics/PDGFR/L.PDGFR/phosph_Shc/phosph_Shc_cplx'
'78 /kinetics/PDGFR/L.PDGFR/phosph_PLC_g/phosph_PLC_g_cplx'
'79 /kinetics/PDGFR/SHC'
'80 /kinetics/PDGFR/SHC*'
'81 /kinetics/PDGFR/Internal_L.PDGFR'
'82 /kinetics/MKP-2'
'83 /kinetics/MKP-2/MKP2-tyr-deph/MKP2-tyr-deph_cplx'
'84 /kinetics/MKP-2/MKP2-thr-deph/MKP2-thr-deph_cplx'
};

bufnames = {
'1 /kinetics/DAG'
'2 /kinetics/Ca'
'3 /kinetics/MAPK/Ubiquitination'
'4 /kinetics/MAPK/Nucleotides'
'5 /kinetics/PLA2/APC'
'6 /kinetics/temp-PIP2'
'7 /kinetics/PDGFR/PDGF'
};

sumtotnames = {
'1 /kinetics/PKC-active'
'2 /kinetics/tot_MKP1'
'3 /kinetics/tot_MAPK'
};

% Initial concs of 84 molecules
y0(1) = 0;
y0(2) = 0;
y0(3) = 0;
y0(4) = 1;
y0(5) = 0;
y0(6) = 0;
y0(7) = 0.1;
y0(8) = 3.72083e-17;
y0(9) = 4.91367e-18;
y0(10) = 1.75e-16;
y0(11) = 1.3896e-17;
y0(12) = 9.43517e-21;
y0(13) = 0.02;
y0(14) = 1.81333e-17;
y0(15) = 8.46317e-23;
y0(16) = 0;
y0(17) = 2.51883e-19;
y0(18) = 1;
y0(19) = 6.12;
y0(20) = 0;
y0(21) = 0;
y0(22) = 0;
y0(23) = 0.2;
y0(24) = 0;
y0(25) = 0.18;
y0(26) = 0.36;
y0(27) = 0;
y0(28) = 0;
y0(29) = 0;
y0(30) = 0;
y0(31) = 0;
y0(32) = 0;
y0(33) = 0;
y0(34) = 0;
y0(35) = 0;
y0(36) = 0;
y0(37) = 0;
y0(38) = 0;
y0(39) = 0;
y0(40) = 0.0001;
y0(41) = 0;
y0(42) = 0;
y0(43) = 0;
y0(44) = 0;
y0(45) = 0;
y0(46) = 0;
y0(47) = 0;
y0(48) = 0;
y0(49) = 0.0004;
y0(50) = 0.224;
y0(51) = 0;
y0(52) = 0;
y0(53) = 0;
y0(54) = 0;
y0(55) = 0.4;
y0(56) = 0;
y0(57) = 0;
y0(58) = 0;
y0(59) = 0;
y0(60) = 0;
y0(61) = 0;
y0(62) = 0;
y0(63) = 0;
y0(64) = 0;
y0(65) = 0;
y0(66) = 0;
y0(67) = 0.1;
y0(68) = 0;
y0(69) = 0;
y0(70) = 0;
y0(71) = 0.2;
y0(72) = 0;
y0(73) = 0.002;
y0(74) = 0;
y0(75) = 0.108333;
y0(76) = 0;
y0(77) = 0;
y0(78) = 0;
y0(79) = 0.5;
y0(80) = 0;
y0(81) = 0;
y0(82) = 0.002;
y0(83) = 0;
y0(84) = 0;
buff(1) = 11.661;
buff(2) = 0.08;
buff(3) = 0;
buff(4) = 0.1;
buff(5) = 30;
buff(6) = 2.5;
buff(7) = 0;
% Sumtotal eqn for /kinetics/PKC-active: sumtot(1) =  (y(9) + y(11) + y(10) + y(12) + y(13) + y(14)+ y(20) +y(21)+y(22) )
% Sumtotal eqn for /kinetics/tot_MKP1: sumtot(2) =  (y(49) + y(36) + y(37) )
% Sumtotal eqn for /kinetics/tot_MAPK: sumtot(3) =  (y(44) + y(38) )
% Call the ODE solver and display results
[t, y] = ode23s(@f, tspan, y0);

hold on;
plot(t,y(:,44));
plot(t, (y(:,9) + y(:,11) + y(:,10) + y(:,12) + y(:,13) + y(:,14) ));
plot(t,y(:,38));
plot(t, (y(:,44) + y(:,38) ));
plot(t,y(:,49));
plot(t,y(:,75));
plot(t,buff(:,7)*ones(size(t)));
plot(t, (y(:,49) + y(:,36) + y(:,37) ));

% Evaluation function
% Evaluation function
function dydt = f(t, y)
global buff;
dydt = [
 + 0.49998 * y(5) * y(80) - 0.1 * y(1) - 0.198 * y(71) * y(1) + 0.08 * y(2) + 0.02 * y(2)
 + 0.198 * y(71) * y(1) - 0.08 * y(2) - 0.02 * y(2)
 + 0.0250002 * y(6) * y(4) - 0.0168 * y(3)
 - 0.0250002 * y(4) * y(7) + 0.0168 * y(5) - 0.0250002 * y(6) * y(4) + 0.0168 * y(3)
 + 0.0250002 * y(4) * y(7) - 0.0168 * y(5) - 0.49998 * y(5) * y(80) + 0.1 * y(1)
 - 0.0250002 * y(6) * y(4) + 0.0168 * y(3) - 0.001 * y(6)
 - 0.0250002 * y(4) * y(7) + 0.0168 * y(5) + 0.001 * y(6)
 + 0.6 * y(18) * buff(2) - 0.5 * y(8) - 0.0079998 * buff(1) * y(8) + 8.6348 * y(15) - 1.2705 * y(8) + 3.5026 * y(11) - 0.0012 * y(8) * y(19) + 0.1 * y(10)
 + 2 * y(17) - 0.2 * y(9)
 + 0.0012 * y(8) * y(19) - 0.1 * y(10)
 + 1.2705 * y(8) - 3.5026 * y(11)
 + 1 * y(15) - 0.1 * y(12)
 + 1 * y(18) - 50 * y(13)
 + 0.00012 * y(19) * y(18) - 0.1 * y(14)
 + 0.0079998 * buff(1) * y(8) - 8.6348 * y(15) - 1 * y(15) + 0.1 * y(12)
 + 0.0006 * y(18) * buff(1) - 0.1 * y(16) - 0.018 * y(16) * y(19) + 2 * y(17)
 + 0.018 * y(16) * y(19) - 2 * y(17) - 2 * y(17) + 0.2 * y(9)
 - 0.6 * y(18) * buff(2) + 0.5 * y(8) - 1 * y(18) + 50 * y(13) - 0.00012 * y(19) * y(18) + 0.1 * y(14) - 0.0006 * y(18) * buff(1) + 0.1 * y(16)
 - 0.0012 * y(8) * y(19) + 0.1 * y(10) - 0.00012 * y(19) * y(18) + 0.1 * y(14) - 0.018 * y(16) * y(19) + 2 * y(17) + 5.4 * y(57) + 11.04 * y(59) + 36 * y(61) + 60 * y(63) + 120 * y(65) - 0.4 * y(19)
 + 0.3 * y(23) *  (y(9) + y(11) + y(10) + y(12) + y(13) + y(14)+y(20) +y(21) +y(22) ) - 16 * y(20) - 4 * y(20)
 + 1.875 * y(73) *  (y(9) + y(11) + y(10) + y(12) + y(13) + y(14) +y(20) +y(21) +y(22)) - 100 * y(21) - 25 * y(21)
 + 0.3 * y(67) *  (y(9) + y(11) + y(10) + y(12) + y(13) + y(14) +y(20) +y(21) +y(22) ) - 16 * y(22) - 4 * y(22)
 - 0.3 * y(23) *  (y(9) + y(11) + y(10) + y(12) + y(13) + y(14) +y(20) +y(21) +y(22) ) + 16 * y(20) + 6 * y(51) - 6 * y(23) * y(70) + 1 * y(33)
 + 4 * y(20) - 1.95 * y(24) * y(44) + 40 * y(45) - 1.98 * y(24) * y(50) + 25 * y(51) + 6 * y(54) - 60 * y(24) * y(70) + 0.5 * y(41)
 + 6 * y(53) - 3.3 * y(25) * y(41) + 0.42 * y(42) - 3.3 * y(25) * y(33) + 0.42 * y(34)
 - 16.2 * y(26) * y(29) + 0.6 * y(30) + 600000 * y(49) * y(28) / ( 40000 + y(28) ) + 600000 * y(37) * y(28) / ( 40000 + y(28) ) + 1 * y(83)
 + 10 * y(45) - 1.98 * y(27) * y(50) + 25 * y(54)
 + 0.15 * y(30) - 16.2 * y(28) * y(29) + 0.6 * y(31) - 600000 * y(49) * y(28) / ( 40000 + y(28) ) + 600000 * y(49) * y(44) / ( 40000 + y(44) ) - 600000 * y(37) * y(28) / ( 40000 + y(28) ) + 600000 * y(37) * y(44) / ( 40000 + y(44) ) - 75 * y(28) * y(82) + 4 * y(83) + 1 * y(84)
 - 16.2 * y(26) * y(29) + 0.6 * y(30) + 0.15 * y(30) - 16.2 * y(28) * y(29) + 0.6 * y(31) + 0.15 * y(31) - 1.98 * y(29) * y(50) + 25 * y(52) + 0.105 * y(43) + 0.105 * y(35)
 + 16.2 * y(26) * y(29) - 0.6 * y(30) - 0.15 * y(30)
 + 16.2 * y(28) * y(29) - 0.6 * y(31) - 0.15 * y(31)
 + 6 * y(52) - 1.98 * y(32) * y(50) + 25 * y(53) + 0.105 * y(42) - 3.3 * y(32) * y(41) + 0.42 * y(43) + 0.105 * y(34) - 3.3 * y(32) * y(33) + 0.42 * y(35)
 - 3.3 * y(25) * y(33) + 0.42 * y(34) + 0.105 * y(34) - 3.3 * y(32) * y(33) + 0.42 * y(35) + 0.105 * y(35) + 6 * y(23) * y(70) - 1 * y(33)
 + 3.3 * y(25) * y(33) - 0.42 * y(34) - 0.105 * y(34)
 + 3.3 * y(32) * y(33) - 0.42 * y(35) - 0.105 * y(35)
 + 1 * y(47) - 0.195 * y(36) * y(44) + 4 * y(48) - 0.0001 * y(36) - 0.0001 * y(36) + 0.0001 * y(37)
 - 0.0001 * y(37) + 1 * y(48) - 0.0001 * y(37)
 + 0.050001 * y(44)*y(44) - 0.005 * y(38) - 0.000999996 * buff(4) * y(38) + 0.0032 * y(39) + 0.0008 * y(39)
 + 0.000999996 * buff(4) * y(38) - 0.0032 * y(39) - 0.0008 * y(39)
 - 0.002 * y(40) + 0.0008 * y(39) + 5e-06 * buff(4)
 + 60 * y(24) * y(70) - 0.5 * y(41) - 3.3 * y(25) * y(41) + 0.42 * y(42) + 0.105 * y(42) - 3.3 * y(32) * y(41) + 0.42 * y(43) + 0.105 * y(43)
 + 3.3 * y(25) * y(41) - 0.42 * y(42) - 0.105 * y(42)
 + 3.3 * y(32) * y(41) - 0.42 * y(43) - 0.105 * y(43)
 - 1.95 * y(24) * y(44) + 40 * y(45) + 10 * y(45) + 0.15 * y(31) - 600000 * y(49) * y(44) / ( 40000 + y(44) ) - 3.9 * y(55) * y(44) + 80 * y(46) + 20 * y(46) - 0.195 * y(49) * y(44) + 4 * y(47) + 1 * y(47) - 600000 * y(37) * y(44) / ( 40000 + y(44) ) - 0.195 * y(36) * y(44) + 4 * y(48) + 1 * y(48) - 0.0200004 * y(44)*y(44) + 0.002 * y(38) - 75 * y(44) * y(82) + 4 * y(84) - 0.0200004 * y(44)*y(44) + 0.002 * y(38)
 + 1.95 * y(24) * y(44) - 40 * y(45) - 10 * y(45)
 + 3.9 * y(55) * y(44) - 80 * y(46) - 20 * y(46)
 + 0.195 * y(49) * y(44) - 4 * y(47) - 1 * y(47)
 + 0.195 * y(36) * y(44) - 4 * y(48) - 1 * y(48)
 - 0.195 * y(49) * y(44) + 4 * y(47) - 0.00037 * y(49) + 0.0001 * y(36) + 0.0004 * y(40)
 - 1.98 * y(24) * y(50) + 25 * y(51) + 6 * y(51) - 1.98 * y(29) * y(50) + 25 * y(52) + 6 * y(52) - 1.98 * y(32) * y(50) + 25 * y(53) + 6 * y(53) - 1.98 * y(27) * y(50) + 25 * y(54) + 6 * y(54)
 + 1.98 * y(24) * y(50) - 25 * y(51) - 6 * y(51)
 + 1.98 * y(29) * y(50) - 25 * y(52) - 6 * y(52)
 + 1.98 * y(32) * y(50) - 25 * y(53) - 6 * y(53)
 + 1.98 * y(27) * y(50) - 25 * y(54) - 6 * y(54)
 - 1.00002 * y(55) * buff(2) + 0.1 * y(56) - 0.0012 * buff(6) * y(55) + 0.5 * y(58) - 3.9 * y(55) * y(44) + 80 * y(46) + 0.17 * y(66)
 + 1.00002 * y(55) * buff(2) - 0.1 * y(56) - 1.35 * buff(5) * y(56) + 21.6 * y(57) + 5.4 * y(57) - 0.012 * buff(6) * y(56) + 0.1 * y(60) - 0.003 * buff(1) * y(56) + 4 * y(62)
 + 1.35 * buff(5) * y(56) - 21.6 * y(57) - 5.4 * y(57)
 + 0.0012 * buff(6) * y(55) - 0.5 * y(58) - 2.76 * buff(5) * y(58) + 44.16 * y(59) + 11.04 * y(59)
 + 2.76 * buff(5) * y(58) - 44.16 * y(59) - 11.04 * y(59)
 + 0.012 * buff(6) * y(56) - 0.1 * y(60) - 9 * buff(5) * y(60) + 144 * y(61) + 36 * y(61)
 + 9 * buff(5) * y(60) - 144 * y(61) - 36 * y(61)
 + 0.003 * buff(1) * y(56) - 4 * y(62) - 15 * buff(5) * y(62) + 240 * y(63) + 60 * y(63)
 + 15 * buff(5) * y(62) - 240 * y(63) - 60 * y(63)
 - 30 * buff(5) * y(64) + 480 * y(65) + 120 * y(65) + 6 * y(66) * buff(2) - 0.1 * y(64)
 + 30 * buff(5) * y(64) - 480 * y(65) - 120 * y(65)
 + 20 * y(46) - 6 * y(66) * buff(2) + 0.1 * y(64) - 0.17 * y(66)
 - 0.3 * y(67) *  (y(9) + y(11) + y(10) + y(12) + y(13) + y(14)+y(20) +y(21) +y(22) ) + 16 * y(22) + 0.1 * y(68)
 + 4 * y(22) - 0.1 * y(68) - 0.198 * y(71) * y(68) + 0.08 * y(69) + 0.02 * y(69)
 + 0.198 * y(71) * y(68) - 0.08 * y(69) - 0.02 * y(69)
 - 999.6 * y(70) * y(73) + 1000 * y(74) - 0.0001 * y(70) + 0.02 * y(69) - 60 * y(24) * y(70) + 0.5 * y(41) + 0.02 * y(2) - 6 * y(23) * y(70) + 1 * y(33)
 + 10 * y(74) + 0.0001 * y(70) - 0.198 * y(71) * y(68) + 0.08 * y(69) - 0.198 * y(71) * y(1) + 0.08 * y(2)
 + 25 * y(21) - 0.1 * y(72)
 - 999.6 * y(70) * y(73) + 1000 * y(74) + 10 * y(74) - 1.875 * y(73) *  (y(9) + y(11) + y(10) + y(12) + y(13) + y(14) +y(20) +y(21) +y(22)) + 100 * y(21) + 0.1 * y(72)
 + 999.6 * y(70) * y(73) - 1000 * y(74) - 10 * y(74)
 - 199.998 * y(75) * buff(7) + 0.1 * y(76)
 + 199.998 * y(75) * buff(7) - 0.1 * y(76) - 0.3 * y(79) * y(76) + 0.2 * y(77) + 0.05 * y(77) - 0.001 * y(76) + 0.00066 * y(81) + 0.2 * y(78)
 + 0.3 * y(79) * y(76) - 0.2 * y(77) - 0.05 * y(77)
 - 0.2 * y(78)
 + 0.01 * y(80) - 0.3 * y(79) * y(76) + 0.2 * y(77)
 - 0.01 * y(80) - 0.49998 * y(5) * y(80) + 0.1 * y(1) + 0.05 * y(77)
 + 0.001 * y(76) - 0.00066 * y(81)
 - 75 * y(28) * y(82) + 4 * y(83) + 1 * y(83) - 75 * y(44) * y(82) + 4 * y(84) + 1 * y(84)
 + 75 * y(28) * y(82) - 4 * y(83) - 1 * y(83)
 + 75 * y(44) * y(82) - 4 * y(84) - 1 * y(84)
];

% end of model
