Uploaded by Hugh Toomey

Chemical Reaction Models Lab: Systems Biology Simulation

advertisement
Systems Biology, Computer Lab # 1: Chemical Reaction Models
The goal of this lab is for you to practice building dynamics models and simulating them
numerically. For this problem you will consider the following open reaction network:
1. In the figure above, the lowercase v’s represent the 5 reaction rates in the system. Use the
law of mass action to write down the 5 reaction rates using vi to represent each reaction
and ki to represent the corresponding rate constant.
v1 = k1 v2 = k2 A v3 = k3 AB v4 = k4 C v5 = k5 D
2. Let a, b, c, d denote the concentrations of the corresponding species A, B, C, D. Write down
the corresponding system of differential equations that track the rate of change of a, b, c, d.
da
= k1 − k2 A − k3 AB db
= k2 A − k3 AB dc
= k3 AB − k4 C dd
= k3 AB − k5 D
dt
dt
dt
dt
3. Use MATLAB to numerically simulate the system of equations. Use initial conditions of
zero for all species (this is ok due to the inflow) and simulation from t = 0 to t = 4 You
can download the templates lab1 driver.m and lab1 model.m to get you started
4. Make a plot of the solutions. Your plot should look like:
lab1 driver.m
clear all
% TODO define the timespan to simulation
tspan = [0,4];
% TODO define the initial conditions
y0 = [0;0;0;0];
% call the solver of choice (ode45 is fine)
[tSol,ySol] = ode45(@lab1_model,tspan,y0);
% plot solutions to look like figure in lab
hold on
plot(tSol,ySol(:,1),’r’,’linewidth’,3)
plot(tSol,ySol(:,2),’--m’,’linewidth’,3)
plot(tSol,ySol(:,3),’:b’,’linewidth’,3)
plot(tSol,ySol(:,4),’-.g’,’linewidth’,3)
% make axis labels and change linestyles as desired
xlabel(’Time (sec)’)
ylabel(’Concentration (mM)’)
set(gca,’FontSize’, 16)
title("Concentration vs Time")
% make a legend
legend(’A’, ’B’, ’C’, ’D’, ’Location’, ’Best’)
grid on
hold off
lab1 model.m
function dydt = lab1_model(t,y) % TODO - Write the function declaration.
% Name of the function is lab1_model
% TODO - Extract a, b, c, and d from input vector Y
dydt = zeros(4,1);
a = y(1); % a
b = y(2); % b
c = y(3); % c
d = y(4); % d
% TODO - Define the constants k1 through k5
k1=3;
k2=2;
k3=2.5;
k4=3;
k5=4;
% TODO - Define dydt from the ODEs
dydt(1)=k1-k2*a-k3*a*b;
dydt(2)=k2*a-k3*a*b;
dydt(3)=k3*a*b-k4*c;
dydt(4)=k3*a*b-k5*d;
end
5. Briefly describe the dynamics.
After beginning with concentrations of zero, A’s concentration shot up fastest and had the
highest concentration at its peak. B, C, and D had slower growth and lower concentrations
in that order. By time t=2 B’s concentration had surpassed A and each species was
entering a steady state.
6. Determine the steady-state concentrations using your numerical solutions.
As = 0.7504mM Bs = 0.7996mM Cs = 0.4999mM Ds = 0.3750mM
Download