 %  DOQCS :http://doqcs.ncbs.res.in/ 
 %  Accession Name = MAPK_network_2003 
 %  Accession Number = 50 
 %  Pathway Name = AC 
 %  Pathway Number = 221 
 %  Transcriber = Upinder S. Bhalla, NCBS 
 %  Developer = Upinder S. Bhalla, NCBS 
 %  Species = Generic mammalian 
 %  Tissue =  Brain - Neuronal 
 %  Cell Compartment = Synapse 
 %  Notes =  This is a network model of many pathways present at the neuronal synapse. The network has properties of temporal tuning as well as steady-state computational properties. In its default form the network is bistable.<a href="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=15298883&query_hl=11">Bhalla US Biophys J. 2004 Aug;87(2):745-53</a>
 
  % Note: All the concentrations are in micro Mole (uM)

function moose_convert
%Matlab simulation for chemical kinetics

% Saved on Mon Feb 14 12:53:51 2005

% Automatically generated from kkit model in MOOSE by conv_matlab

global buff;
tspan=[0, 300];
% Molecule names
molnames = {
'1 /kinetics/AC/cAMP-PDE'
'2 /kinetics/AC/cAMP-PDE/PDE/PDE_cplx'
'3 /kinetics/AC/cAMP-PDE*'
'4 /kinetics/AC/cAMP-PDE*/PDE*/PDE*_cplx'
'5 /kinetics/AC/Gs.AC'
'6 /kinetics/AC/AC'
'7 /kinetics/cAMP'
'8 /kinetics/PKA-active'
'9 /kinetics/PKA-active/phosph-PDE/phosph-PDE_cplx'
'10 /kinetics/GTP.Ga'
};

bufnames = {
'1 /kinetics/AC/ATP'
'2 /kinetics/AC/AMP'
};

sumtotnames = {
};

% Initial concs of 10 molecules
y0(1) = 0.5;
y0(2) = 0;
y0(3) = 0;
y0(4) = 0;
y0(5) = 0;
y0(6) = 0.015;
y0(7) = 0;
y0(8) = 0;
y0(9) = 0;
y0(10) = 0;
buff(1) = 5000;
buff(2) = 1000;
% Call the ODE solver and display results
[t, y] = ode23s(@f, tspan, y0);

hold on;
plot(t,y(:,5));
plot(t,buff(:,2)*ones(size(t)));
plot(t,y(:,6));
plot(t,buff(:,1)*ones(size(t)));
% Evaluation function
function dydt = f(t, y)
global buff;
dydt = [
 - 2.52 * y(7) * y(1) + 40 * y(2) + 10 * y(2) + 0.1 * y(3) - 6 * y(1) * y(8) + 36 * y(9)
 + 2.52 * y(7) * y(1) - 40 * y(2) - 10 * y(2)
 - 5.04 * y(7) * y(3) + 80 * y(4) + 20 * y(4) - 0.1 * y(3) + 9 * y(9)
 + 5.04 * y(7) * y(3) - 80 * y(4) - 20 * y(4)
 + 499.998 * y(6) * y(10) - 1 * y(5)
 - 499.998 * y(6) * y(10) + 1 * y(5)
 + 1.08e+07 * y(5) * buff(1) / ( 1.2e+07 + buff(1) ) - 5.04 * y(7) * y(3) + 80 * y(4) - 2.52 * y(7) * y(1) + 40 * y(2)
 - 6 * y(1) * y(8) + 36 * y(9) + 9 * y(9)
 + 6 * y(1) * y(8) - 36 * y(9) - 9 * y(9)
 - 499.998 * y(6) * y(10) + 1 * y(5)
];

% end of model
