 %  DOQCS :http://doqcs.ncbs.res.in/ 
 %  Accession Name = MAPK_network_2003 
 %  Accession Number = 50 
 %  Pathway Name = PKC 
 %  Pathway Number = 207 
 %  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:11:14 2005

% Automatically generated from kkit model in MOOSE by conv_matlab

global buff;
tspan=[0, 2000];
% 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'
};

bufnames = {
'1 /kinetics/DAG'
'2 /kinetics/Ca'
'3 /kinetics/AA'
};

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

% Initial concs of 11 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;
buff(1) = 11;
buff(2) = 0.08;
buff(3) = 5;
% Sumtotal eqn for /kinetics/PKC-active: sumtot(1) =  (y(2) + y(4) + y(3) + y(5) + y(6) + y(7) )
% Call the ODE solver and display results
[t, y] = ode23s(@f, tspan, y0);

hold on;
plot(t, (y(:,2) + y(:,4) + y(:,3) + y(:,5) + y(:,6) + y(:,7) ));
% 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) * buff(3) + 0.1 * y(3)
 + 2 * y(10) - 0.2 * y(2)
 + 0.0012 * y(1) * buff(3) - 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 * buff(3) * 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) * buff(3) + 2 * y(10)
 + 0.018 * y(9) * buff(3) - 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 * buff(3) * y(11) + 0.1 * y(7) - 0.0006 * y(11) * buff(1) + 0.1 * y(9)
];

% end of model
