 %  DOQCS : http://doqcs.ncbs.res.in/ 
 %  Accession Name = 3d_fold_model 
 %  Accession Number = 8 
 %  Transcriber = Upinder S. Bhalla, NCBS 
 %  Developer = Upinder S. Bhalla, NCBS 
 %  Species = Generic mammalian 
 %  Tissue = NIH 3T3 Expression 
 %  Cell Compartment = Surface - Nucleus 
 %  Notes =  This model is an annotated version of the synaptic signaling network.<br>The primary reference is <a href= http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=9888852&dopt=Abstract >Bhalla US and Iyengar R. Science (1999) 283(5400):381-7</a> but several of the model pathways have been updated <a href =http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=12169734&query_hl=2>Bhalla US, Ram PT, Iyengar R. Science. 2002 Aug 9;297(5583):1018-23</a>. 
 
   % Note: All the concentrations are in micro Mole (uM)

function moose_convert
%Matlab simulation for chemical kinetics

% Saved on Wed Jul 18 14:58:33 2007
% Automatically generated from kkit model in MOOSE by conv_matlab

global buff;
global t;
global y;

% Define Tables here
tspan=[0, 4000];
% Molecule names
molnames = {
'1 /kinetics/PKC/PKC-Ca'
'2 /kinetics/PKC/PKC-DAG-AA*'
'3 /kinetics/PKC/PKC-Ca-AA*'
'4 /kinetics/PKC/PKC-Ca-memb*'
'5 /kinetics/PKC/PKC-DAG-memb*'
'6 /kinetics/PKC/PKC-basal*'
'7 /kinetics/PKC/PKC-AA*'
'8 /kinetics/PKC/PKC-Ca-DAG'
'9 /kinetics/PKC/PKC-DAG'
'10 /kinetics/PKC/PKC-DAG-AA'
'11 /kinetics/PKC/PKC-cytosolic'
'12 /kinetics/AA'
'13 /kinetics/PKC-active/PKC-act-raf/PKC-act-raf_cplx'
'14 /kinetics/PKC-active/PKC-inact-GAP/PKC-inact-GAP_cplx'
'15 /kinetics/PKC-active/PKC-act-GEF/PKC-act-GEF_cplx'
'16 /kinetics/MAPK/craf-1'
'17 /kinetics/MAPK/craf-1*'
'18 /kinetics/MAPK/MAPKK'
'19 /kinetics/MAPK/MAPK'
'20 /kinetics/MAPK/craf-1**'
'21 /kinetics/MAPK/MAPK-tyr'
'22 /kinetics/MAPK/MAPKK*'
'23 /kinetics/MAPK/MAPKK*/MAPKKtyr/MAPKKtyr_cplx'
'24 /kinetics/MAPK/MAPKK*/MAPKKthr/MAPKKthr_cplx'
'25 /kinetics/MAPK/MAPKK-ser'
'26 /kinetics/MAPK/Raf-GTP-Ras*'
'27 /kinetics/MAPK/Raf-GTP-Ras*/Raf-GTP-Ras*.1/Raf-GTP-Ras*.1_cplx'
'28 /kinetics/MAPK/Raf-GTP-Ras*/Raf-GTP-Ras*.2/Raf-GTP-Ras*.2_cplx'
'29 /kinetics/MAPK*'
'30 /kinetics/MAPK*/MAPK*-feedback/MAPK*-feedback_cplx'
'31 /kinetics/MAPK*/MAPK*/MAPK*_cplx'
'32 /kinetics/MKP-1'
'33 /kinetics/MKP-1/MKP1-tyr-deph/MKP1-tyr-deph_cplx'
'34 /kinetics/MKP-1/MKP1-thr-deph/MKP1-thr-deph_cplx'
'35 /kinetics/PPhosphatase2A'
'36 /kinetics/PPhosphatase2A/craf-deph/craf-deph_cplx'
'37 /kinetics/PPhosphatase2A/MAPKK-deph/MAPKK-deph_cplx'
'38 /kinetics/PPhosphatase2A/MAPKK-deph-ser/MAPKK-deph-ser_cplx'
'39 /kinetics/PPhosphatase2A/craf**-deph/craf**-deph_cplx'
'40 /kinetics/PLA2/PLA2-cytosolic'
'41 /kinetics/PLA2/PLA2-Ca*'
'42 /kinetics/PLA2/PLA2-Ca*/kenz/kenz_cplx'
'43 /kinetics/PLA2/PIP2-PLA2*'
'44 /kinetics/PLA2/PIP2-PLA2*/kenz/kenz_cplx'
'45 /kinetics/PLA2/PIP2-Ca-PLA2*'
'46 /kinetics/PLA2/PIP2-Ca-PLA2*/kenz/kenz_cplx'
'47 /kinetics/PLA2/DAG-Ca-PLA2*'
'48 /kinetics/PLA2/DAG-Ca-PLA2*/kenz/kenz_cplx'
'49 /kinetics/PLA2/PLA2*-Ca'
'50 /kinetics/PLA2/PLA2*-Ca/kenz/kenz_cplx'
'51 /kinetics/PLA2/PLA2*'
'52 /kinetics/Ras/inact-GEF'
'53 /kinetics/Ras/GEF*'
'54 /kinetics/Ras/GEF*/GEF*-act-ras/GEF*-act-ras_cplx'
'55 /kinetics/Ras/GTP-Ras'
'56 /kinetics/Ras/GDP-Ras'
'57 /kinetics/Ras/GAP*'
'58 /kinetics/Ras/GAP'
'59 /kinetics/Ras/GAP/GAP-inact-ras/GAP-inact-ras_cplx'
};

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

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

% Initial concs of 59 molecules
y0(1) = 3.72083e-17;
y0(2) = 4.91367e-18;
y0(3) = 1.75e-16;
y0(4) = 1.3896e-17;
y0(5) = 9.43517e-21;
y0(6) = 0.02;
y0(7) = 1.81333e-17;
y0(8) = 8.46317e-23;
y0(9) = 1.16102e-16;
y0(10) = 2.51883e-19;
y0(11) = 1;
y0(12) = 0;
y0(13) = 0;
y0(14) = 0;
y0(15) = 0;
y0(16) = 0.2;
y0(17) = 0;
y0(18) = 0.18;
y0(19) = 0.36;
y0(20) = 0;
y0(21) = 0;
y0(22) = 0;
y0(23) = 0;
y0(24) = 0;
y0(25) = 0;
y0(26) = 0;
y0(27) = 0;
y0(28) = 0;
y0(29) = 0;
y0(30) = 0;
y0(31) = 0;
y0(32) = 0.0032;
y0(33) = 0;
y0(34) = 0;
y0(35) = 0.224;
y0(36) = 0;
y0(37) = 0;
y0(38) = 0;
y0(39) = 0;
y0(40) = 0.4;
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;
y0(50) = 0;
y0(51) = 0;
y0(52) = 0.1;
y0(53) = 0;
y0(54) = 0;
y0(55) = 0;
y0(56) = 0.2;
y0(57) = 0;
y0(58) = 0.002;
y0(59) = 0;
buff(1) = 11.661;
buff(2) = 0.08;
buff(3) = 30;
buff(4) = 2.5;
% Sumtotal eqn for /kinetics/PKC-active: sumtot(1) =  (y(2) + y(4) + y(3) + y(5) + y(6) + y(7) - y(13) - y(14) - y(15))

% Call the ODE solver and display results
[t, y] = ode23s(@f, tspan, y0);

hold on;
do_plots;

function do_plots()
global t;
global y;
global buff;
plot(t,y(:,55));
plot(t,y(:,26));
plot(t,y(:,22));
plot(t,y(:,29));
plot(t,y(:,12));
plot(t, (y(:,2) + y(:,4) + y(:,3) + y(:,5) + y(:,6) + y(:,7) - y(:,13) - y(:,14) - y(:,15));
plot(t,y(:,49));
plot(t,y(:,51));
plot(t,y(:,32));
plot(t,y(:,35));

% Evaluation function
function dydt = f(t, y)
global buff;
dydt = [
 + 0.6 * y(11) * buff(2) - 0.5 * y(1) - 0.0079998 * buff(1) * y(1) + 8.6348 * y(8) - 1.2705 * y(1) + 3.5026 * y(4) - 0.0012 * y(1) * y(12) + 0.1 * y(3)
 + 2 * y(10) - 0.2 * y(2)
 + 0.0012 * y(1) * y(12) - 0.1 * y(3)
 + 1.2705 * y(1) - 3.5026 * y(4)
 + 1 * y(8) - 0.1 * y(5)
 + 1 * y(11) - 50 * y(6)
 + 0.00012 * y(12) * y(11) - 0.1 * y(7)
 + 0.0079998 * buff(1) * y(1) - 8.6348 * y(8) - 1 * y(8) + 0.1 * y(5)
 + 0.0006 * y(11) * buff(1) - 0.1 * y(9) - 0.018 * y(9) * y(12) + 2 * y(10)
 + 0.018 * y(9) * y(12) - 2 * y(10) - 2 * y(10) + 0.2 * y(2)
 - 0.6 * y(11) * buff(2) + 0.5 * y(1) - 1 * y(11) + 50 * y(6) - 0.00012 * y(12) * y(11) + 0.1 * y(7) - 0.0006 * y(11) * buff(1) + 0.1 * y(9)
 - 0.0012 * y(1) * y(12) + 0.1 * y(3) - 0.00012 * y(12) * y(11) + 0.1 * y(7) - 0.018 * y(9) * y(12) + 2 * y(10) + 5.4 * y(42) + 11.04 * y(44) + 36 * y(46) + 60 * y(48) + 120 * y(50) - 0.4 * y(12)
 + 0.3 * y(16) *  (y(2) + y(4) + y(3) + y(5) + y(6) + y(7) - y(13) - y(14) - y(15) ) - 16 * y(13) - 4 * y(13)
 + 6 * y(58) *  (y(2) + y(4) + y(3) + y(5) + y(6) + y(7) - y(13) - y(14) - y(15) ) - 16 * y(14) - 4 * y(14)
 + 6 * y(52) *  (y(2) + y(4) + y(3) + y(5) + y(6) + y(7)  - y(13) - y(14) - y(15)) - 16 * y(15) - 4 * y(15)
 - 0.3 * y(16) *  (y(2) + y(4) + y(3) + y(5) + y(6) + y(7)  - y(13) - y(14) - y(15)) + 16 * y(13) + 6 * y(36)
 + 4 * y(13) - 1.95 * y(17) * y(29) + 40 * y(30) - 1.98 * y(17) * y(35) + 25 * y(36) + 6 * y(39) - 24 * y(17) * y(55) + 0.5 * y(26)
 + 6 * y(38) - 3.3 * y(18) * y(26) + 0.42 * y(27)
 - 16.2 * y(19) * y(22) + 0.6 * y(23) + 1 * y(33)
 + 10 * y(30) - 1.98 * y(20) * y(35) + 25 * y(39)
 + 0.15 * y(23) - 16.2 * y(21) * y(22) + 0.6 * y(24) - 75 * y(21) * y(32) + 4 * y(33) + 1 * y(34)
 - 16.2 * y(19) * y(22) + 0.6 * y(23) + 0.15 * y(23) - 16.2 * y(21) * y(22) + 0.6 * y(24) + 0.15 * y(24) - 1.98 * y(22) * y(35) + 25 * y(37) + 0.105 * y(28)
 + 16.2 * y(19) * y(22) - 0.6 * y(23) - 0.15 * y(23)
 + 16.2 * y(21) * y(22) - 0.6 * y(24) - 0.15 * y(24)
 + 6 * y(37) - 1.98 * y(25) * y(35) + 25 * y(38) + 0.105 * y(27) - 3.3 * y(25) * y(26) + 0.42 * y(28)
 + 24 * y(17) * y(55) - 0.5 * y(26) - 3.3 * y(18) * y(26) + 0.42 * y(27) + 0.105 * y(27) - 3.3 * y(25) * y(26) + 0.42 * y(28) + 0.105 * y(28)
 + 3.3 * y(18) * y(26) - 0.42 * y(27) - 0.105 * y(27)
 + 3.3 * y(25) * y(26) - 0.42 * y(28) - 0.105 * y(28)
 - 1.95 * y(17) * y(29) + 40 * y(30) + 10 * y(30) + 0.15 * y(24) - 75 * y(29) * y(32) + 4 * y(34) - 3.9 * y(40) * y(29) + 80 * y(31) + 20 * y(31)
 + 1.95 * y(17) * y(29) - 40 * y(30) - 10 * y(30)
 + 3.9 * y(40) * y(29) - 80 * y(31) - 20 * y(31)
 - 75 * y(21) * y(32) + 4 * y(33) + 1 * y(33) - 75 * y(29) * y(32) + 4 * y(34) + 1 * y(34)
 + 75 * y(21) * y(32) - 4 * y(33) - 1 * y(33)
 + 75 * y(29) * y(32) - 4 * y(34) - 1 * y(34)
 - 1.98 * y(17) * y(35) + 25 * y(36) + 6 * y(36) - 1.98 * y(22) * y(35) + 25 * y(37) + 6 * y(37) - 1.98 * y(25) * y(35) + 25 * y(38) + 6 * y(38) - 1.98 * y(20) * y(35) + 25 * y(39) + 6 * y(39)
 + 1.98 * y(17) * y(35) - 25 * y(36) - 6 * y(36)
 + 1.98 * y(22) * y(35) - 25 * y(37) - 6 * y(37)
 + 1.98 * y(25) * y(35) - 25 * y(38) - 6 * y(38)
 + 1.98 * y(20) * y(35) - 25 * y(39) - 6 * y(39)
 - 1.00002 * y(40) * buff(2) + 0.1 * y(41) - 0.0012 * buff(4) * y(40) + 0.5 * y(43) - 3.9 * y(40) * y(29) + 80 * y(31) + 0.17 * y(51)
 + 1.00002 * y(40) * buff(2) - 0.1 * y(41) - 1.35 * buff(3) * y(41) + 21.6 * y(42) + 5.4 * y(42) - 0.012 * buff(4) * y(41) + 0.1 * y(45) - 0.003 * buff(1) * y(41) + 4 * y(47)
 + 1.35 * buff(3) * y(41) - 21.6 * y(42) - 5.4 * y(42)
 + 0.0012 * buff(4) * y(40) - 0.5 * y(43) - 2.76 * buff(3) * y(43) + 44.16 * y(44) + 11.04 * y(44)
 + 2.76 * buff(3) * y(43) - 44.16 * y(44) - 11.04 * y(44)
 + 0.012 * buff(4) * y(41) - 0.1 * y(45) - 9 * buff(3) * y(45) + 144 * y(46) + 36 * y(46)
 + 9 * buff(3) * y(45) - 144 * y(46) - 36 * y(46)
 + 0.003 * buff(1) * y(41) - 4 * y(47) - 15 * buff(3) * y(47) + 240 * y(48) + 60 * y(48)
 + 15 * buff(3) * y(47) - 240 * y(48) - 60 * y(48)
 - 30 * buff(3) * y(49) + 480 * y(50) + 120 * y(50) + 6 * y(51) * buff(2) - 0.1 * y(49)
 + 30 * buff(3) * y(49) - 480 * y(50) - 120 * y(50)
 + 20 * y(31) - 6 * y(51) * buff(2) + 0.1 * y(49) - 0.17 * y(51)
 - 6 * y(52) *  (y(2) + y(4) + y(3) + y(5) + y(6) + y(7) - y(13) - y(14) - y(15) ) + 16 * y(15) + 1 * y(53)
 + 4 * y(15) - 1 * y(53) - 0.198 * y(56) * y(53) + 0.08 * y(54) + 0.02 * y(54)
 + 0.198 * y(56) * y(53) - 0.08 * y(54) - 0.02 * y(54)
 - 999.6 * y(55) * y(58) + 1000 * y(59) - 0.0001 * y(55) + 0.02 * y(54) - 24 * y(17) * y(55) + 0.5 * y(26)
 + 10 * y(59) + 0.0001 * y(55) - 0.198 * y(56) * y(53) + 0.08 * y(54)
 + 4 * y(14) - 0.1 * y(57)
 - 999.6 * y(55) * y(58) + 1000 * y(59) + 10 * y(59) - 6 * y(58) *  (y(2) + y(4) + y(3) + y(5) + y(6) + y(7) - y(13) - y(14) - y(15) ) + 16 * y(14) + 0.1 * y(57)
 + 999.6 * y(55) * y(58) - 1000 * y(59) - 10 * y(59)
];

% end of model
