 %  DOQCS : http://doqcs.ncbs.res.in/ 
 %  Accession Name = MAPK-bistability-fig1c 
 %  Accession Number = 35 
 %  Transcriber = Upinder S. Bhalla, NCBS 
 %  Developer = Upinder S. Bhalla, NCBS 
 %  Species = Generic mammalian 
 %  Tissue = NIH 3T3 Expression 
 %  Cell Compartment = Surface - Nucleus 
 %  Notes =  Model for figure 1c in <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>.<br>The demo for this figure is available <a href= http://www.ncbs.res.in/~bhalla/ltploop/mkpfeedback/demos/ >here</a>. This synaptic signaling model is without the MKP-1 feedback, so it is bistable and remains so over long periods. 
 
   % Note: All the concentrations are in micro Mole (uM)

 %  DOQCS : http://doqcs.ncbs.res.in/ 
 %  Accession Name = MAPK-bistability-fig1c 
 %  Accession Number = 35 
 %  Transcriber = Upinder S. Bhalla, NCBS 
 %  Developer = Upinder S. Bhalla, NCBS 
 %  Species = Generic mammalian 
 %  Tissue = NIH 3T3 Expression 
 %  Cell Compartment = Surface - Nucleus 
 %  Notes =  Model for figure 1c in <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>.<br>The demo for this figure is available <a href= http://www.ncbs.res.in/~bhalla/ltploop/mkpfeedback/demos/ >here</a>. This synaptic signaling model is without the MKP-1 feedback, so it is bistable and remains so over long periods. 
 
   % Note: All the concentrations are in micro Mole (uM)

function moose_convert
%Matlab simulation for chemical kinetics

% Saved on Wed Feb  2 15:58:00 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/Raf*-GTP-Ras'
'37 /kinetics/MAPK/Raf*-GTP-Ras/Raf*-GTP-Ras.1/Raf*-GTP-Ras.1_cplx'
'38 /kinetics/MAPK/Raf*-GTP-Ras/Raf*-GTP-Ras.2/Raf*-GTP-Ras.2_cplx'
'39 /kinetics/MAPK*'
'40 /kinetics/MAPK*/MAPK*-feedback/MAPK*-feedback_cplx'
'41 /kinetics/MAPK*/MAPK*/MAPK*_cplx'
'42 /kinetics/PPhosphatase2A'
'43 /kinetics/PPhosphatase2A/craf-deph/craf-deph_cplx'
'44 /kinetics/PPhosphatase2A/MAPKK-deph/MAPKK-deph_cplx'
'45 /kinetics/PPhosphatase2A/MAPKK-deph-ser/MAPKK-deph-ser_cplx'
'46 /kinetics/PPhosphatase2A/craf**-deph/craf**-deph_cplx'
'47 /kinetics/PLA2/PLA2-cytosolic'
'48 /kinetics/PLA2/PLA2-Ca*'
'49 /kinetics/PLA2/PLA2-Ca*/kenz/kenz_cplx'
'50 /kinetics/PLA2/PIP2-PLA2*'
'51 /kinetics/PLA2/PIP2-PLA2*/kenz/kenz_cplx'
'52 /kinetics/PLA2/PIP2-Ca-PLA2*'
'53 /kinetics/PLA2/PIP2-Ca-PLA2*/kenz/kenz_cplx'
'54 /kinetics/PLA2/DAG-Ca-PLA2*'
'55 /kinetics/PLA2/DAG-Ca-PLA2*/kenz/kenz_cplx'
'56 /kinetics/PLA2/PLA2*-Ca'
'57 /kinetics/PLA2/PLA2*-Ca/kenz/kenz_cplx'
'58 /kinetics/PLA2/PLA2*'
'59 /kinetics/Ras/inact-GEF'
'60 /kinetics/Ras/GEF*'
'61 /kinetics/Ras/GEF*/GEF*-act-ras/GEF*-act-ras_cplx'
'62 /kinetics/Ras/GTP-Ras'
'63 /kinetics/Ras/GDP-Ras'
'64 /kinetics/Ras/GAP*'
'65 /kinetics/Ras/GAP'
'66 /kinetics/Ras/GAP/GAP-inact-ras/GAP-inact-ras_cplx'
'67 /kinetics/PDGFR/PDGFR'
'68 /kinetics/PDGFR/L.PDGFR'
'69 /kinetics/PDGFR/L.PDGFR/phosph_Shc/phosph_Shc_cplx'
'70 /kinetics/PDGFR/SHC'
'71 /kinetics/PDGFR/SHC*'
'72 /kinetics/PDGFR/Internal_L.PDGFR'
'73 /kinetics/MKP-2'
'74 /kinetics/MKP-2/MKP2-tyr-deph/MKP2-tyr-deph_cplx'
'75 /kinetics/MKP-2/MKP2-thr-deph/MKP2-thr-deph_cplx'
};

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

sumtotnames = {
'1 /kinetics/PKC-active'
};

% Initial concs of 75 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;
y0(41) = 0;
y0(42) = 0.224;
y0(43) = 0;
y0(44) = 0;
y0(45) = 0;
y0(46) = 0;
y0(47) = 0.4;
y0(48) = 0;
y0(49) = 0;
y0(50) = 0;
y0(51) = 0;
y0(52) = 0;
y0(53) = 0;
y0(54) = 0;
y0(55) = 0;
y0(56) = 0;
y0(57) = 0;
y0(58) = 0;
y0(59) = 0.1;
y0(60) = 0;
y0(61) = 0;
y0(62) = 0;
y0(63) = 0.2;
y0(64) = 0;
y0(65) = 0.002;
y0(66) = 0;
y0(67) = 0.108333;
y0(68) = 0;
y0(69) = 0;
y0(70) = 0.5;
y0(71) = 0;
y0(72) = 0;
y0(73) = 0.0024;
y0(74) = 0;
y0(75) = 0;
buff(1) = 11.661;
buff(2) = 0.08;
buff(3) = 30;
buff(4) = 2.5;
buff(5) = 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) )
% Call the ODE solver and display results
[t, y] = ode23s(@f, tspan, y0);

hold on;
plot(t,y(:,39));
plot(t, (y(:,9) + y(:,11) + y(:,10) + y(:,12) + y(:,13) + y(:,14) - y(:,20) - y(:,21) - y(:,22) ));
plot(t,y(:,67));
plot(t,buff(:,5)*ones(size(t)));

% Evaluation function
function dydt = f(t, y)
global buff;
dydt = [
 + 0.49998 * y(5) * y(71) - 0.1 * y(1) - 0.198 * y(63) * y(1) + 0.08 * y(2) + 0.02 * y(2)
 + 0.198 * y(63) * 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(71) + 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(49) + 11.04 * y(51) + 36 * y(53) + 60 * y(55) + 120 * y(57) - 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(65) *  (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(59) *  (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(43) - 6 * y(23) * y(62) + 1 * y(33)
 + 4 * y(20) - 1.95 * y(24) * y(39) + 40 * y(40) - 1.98 * y(24) * y(42) + 25 * y(43) + 6 * y(46) - 60 * y(24) * y(62) + 0.5 * y(36)
 + 6 * y(45) - 3.3 * y(25) * y(36) + 0.42 * y(37) - 3.3 * y(25) * y(33) + 0.42 * y(34)
 - 16.2 * y(26) * y(29) + 0.6 * y(30) + 1 * y(74)
 + 10 * y(40) - 1.98 * y(27) * y(42) + 25 * y(46)
 + 0.15 * y(30) - 16.2 * y(28) * y(29) + 0.6 * y(31) - 75 * y(28) * y(73) + 4 * y(74) + 1 * y(75)
 - 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(42) + 25 * y(44) + 0.105 * y(38) + 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(44) - 1.98 * y(32) * y(42) + 25 * y(45) + 0.105 * y(37) - 3.3 * y(32) * y(36) + 0.42 * y(38) + 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(62) - 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)
 + 60 * y(24) * y(62) - 0.5 * y(36) - 3.3 * y(25) * y(36) + 0.42 * y(37) + 0.105 * y(37) - 3.3 * y(32) * y(36) + 0.42 * y(38) + 0.105 * y(38)
 + 3.3 * y(25) * y(36) - 0.42 * y(37) - 0.105 * y(37)
 + 3.3 * y(32) * y(36) - 0.42 * y(38) - 0.105 * y(38)
 - 1.95 * y(24) * y(39) + 40 * y(40) + 10 * y(40) + 0.15 * y(31) - 3.9 * y(47) * y(39) + 80 * y(41) + 20 * y(41) - 75 * y(39) * y(73) + 4 * y(75)
 + 1.95 * y(24) * y(39) - 40 * y(40) - 10 * y(40)
 + 3.9 * y(47) * y(39) - 80 * y(41) - 20 * y(41)
 - 1.98 * y(24) * y(42) + 25 * y(43) + 6 * y(43) - 1.98 * y(29) * y(42) + 25 * y(44) + 6 * y(44) - 1.98 * y(32) * y(42) + 25 * y(45) + 6 * y(45) - 1.98 * y(27) * y(42) + 25 * y(46) + 6 * y(46)
 + 1.98 * y(24) * y(42) - 25 * y(43) - 6 * y(43)
 + 1.98 * y(29) * y(42) - 25 * y(44) - 6 * y(44)
 + 1.98 * y(32) * y(42) - 25 * y(45) - 6 * y(45)
 + 1.98 * y(27) * y(42) - 25 * y(46) - 6 * y(46)
 - 1.00002 * y(47) * buff(2) + 0.1 * y(48) - 0.0012 * buff(4) * y(47) + 0.5 * y(50) - 3.9 * y(47) * y(39) + 80 * y(41) + 0.17 * y(58)
 + 1.00002 * y(47) * buff(2) - 0.1 * y(48) - 1.35 * buff(3) * y(48) + 21.6 * y(49) + 5.4 * y(49) - 0.012 * buff(4) * y(48) + 0.1 * y(52) - 0.003 * buff(1) * y(48) + 4 * y(54)
 + 1.35 * buff(3) * y(48) - 21.6 * y(49) - 5.4 * y(49)
 + 0.0012 * buff(4) * y(47) - 0.5 * y(50) - 2.76 * buff(3) * y(50) + 44.16 * y(51) + 11.04 * y(51)
 + 2.76 * buff(3) * y(50) - 44.16 * y(51) - 11.04 * y(51)
 + 0.012 * buff(4) * y(48) - 0.1 * y(52) - 9 * buff(3) * y(52) + 144 * y(53) + 36 * y(53)
 + 9 * buff(3) * y(52) - 144 * y(53) - 36 * y(53)
 + 0.003 * buff(1) * y(48) - 4 * y(54) - 15 * buff(3) * y(54) + 240 * y(55) + 60 * y(55)
 + 15 * buff(3) * y(54) - 240 * y(55) - 60 * y(55)
 - 30 * buff(3) * y(56) + 480 * y(57) + 120 * y(57) + 6 * y(58) * buff(2) - 0.1 * y(56)
 + 30 * buff(3) * y(56) - 480 * y(57) - 120 * y(57)
 + 20 * y(41) - 6 * y(58) * buff(2) + 0.1 * y(56) - 0.17 * y(58)
 - 0.3 * y(59) *  (y(9) + y(11) + y(10) + y(12) + y(13) + y(14)- y(20) - y(21) - y(22) ) + 16 * y(22) + 0.1 * y(60)
 + 4 * y(22) - 0.1 * y(60) - 0.198 * y(63) * y(60) + 0.08 * y(61) + 0.02 * y(61)
 + 0.198 * y(63) * y(60) - 0.08 * y(61) - 0.02 * y(61)
 - 999.6 * y(62) * y(65) + 1000 * y(66) - 0.0001 * y(62) + 0.02 * y(61) - 60 * y(24) * y(62) + 0.5 * y(36) + 0.02 * y(2) - 6 * y(23) * y(62) + 1 * y(33)
 + 10 * y(66) + 0.0001 * y(62) - 0.198 * y(63) * y(60) + 0.08 * y(61) - 0.198 * y(63) * y(1) + 0.08 * y(2)
 + 25 * y(21) - 0.1 * y(64)
 - 999.6 * y(62) * y(65) + 1000 * y(66) + 10 * y(66) - 1.875 * y(65) *  (y(9) + y(11) + y(10) + y(12) + y(13) + y(14)- y(20) - y(21) - y(22) ) + 100 * y(21) + 0.1 * y(64)
 + 999.6 * y(62) * y(65) - 1000 * y(66) - 10 * y(66)
 - 199.998 * y(67) * buff(5) + 0.1 * y(68)
 + 199.998 * y(67) * buff(5) - 0.1 * y(68) - 0.3 * y(70) * y(68) + 0.2 * y(69) + 0.05 * y(69) - 0.001 * y(68) + 0.00066 * y(72)
 + 0.3 * y(70) * y(68) - 0.2 * y(69) - 0.05 * y(69)
 + 0.01 * y(71) - 0.3 * y(70) * y(68) + 0.2 * y(69)
 - 0.01 * y(71) - 0.49998 * y(5) * y(71) + 0.1 * y(1) + 0.05 * y(69)
 + 0.001 * y(68) - 0.00066 * y(72)
 - 75 * y(28) * y(73) + 4 * y(74) + 1 * y(74) - 75 * y(39) * y(73) + 4 * y(75) + 1 * y(75)
 + 75 * y(28) * y(73) - 4 * y(74) - 1 * y(74)
 + 75 * y(39) * y(73) - 4 * y(75) - 1 * y(75)
];

% end of model
