 %  DOQCS :http://doqcs.ncbs.res.in/ 
 %  Accession Name = cAMP_pathway 
 %  Accession Number = 25 
 %  Pathway Name = AC 
 %  Pathway Number = 136 
 %  Transcriber = Upinder S. Bhalla, NCBS 
 %  Developer = Upinder S. Bhalla, NCBS 
 %  Species = Generic mammalian 
 %  Tissue =  Brain - Neuronal 
 %  Cell Compartment = Cell membrane + Cytosol 
 %  Notes =  Adenylyl cyclase, also known as adenylate cyclase. There are some ten isoforms, but here I represent only the canonical Gs-stimulated activity.
 
  % Note: All the concentrations are in micro Mole (uM)

function moose_convert
%Matlab simulation for chemical kinetics

% Saved on Fri Feb 11 15:03:14 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,buff(:,1)*ones(size(t)));
plot(t,y(:,6));
plot(t,buff(:,2)*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
