% Synchronized repressilator simulation
% MATLAB: called by HSL_wrapper.m
% Authors: Alex Wissner-Gross (alexwg@mit.edu), Peter Carr (carr@media.mit.edu)
% Last modified: January 29, 2003
% this version models 2 copies of the TetR gene, one activated by LuxR+HSL, one repressed by cI
% in this version, LuxR concentration is "invisible" i.e. part of the background, not seen in the eqns
% cI represses LacI
% LacI represses LuxI
% LuxI makes HSL
% HSL activates TetR
% TetR represses cI
% TetR represses GFP
% GFP matures into active form, GFPmat
% HSL can diffuse between cells and media
% Aiia degrades HSL (use LacI term in place of Aiia species)
% most equations are steady-state Michaelis-Menten like:
% i.e. occupancy of a promoter (by a repressor or activator) determines the transcription/tranlsation rate
function dydt = genenet(t, y)
population = 3;
% Rate constants
k1 = 1e-8; % transcription/translation from free promoter; Vmax; Ms-1
%kd1 = 0.001; % degradation x -> 0 t1/2 ~ 10 min; s-1
kdeg = 0.001; % degradation x -> 0 t1/2 ~ 10 min; s-1
kdgfp = 0.0003; % degradation GFP -> 0 t1/2 ~ 30 min; s-1
kmat = 0.001; % maturation GFP -> GFPmat t1/2 ~ 10 min; s-1
kh = 0.02; % LuxI making HSL; k est from McMillen
khd = 0.01; % degradation/removal of HSL; Aiia degradation
%khd = 0.001; % degradation/removal of HSL; 10 min t1/2 (probably faster than we can do)
khdiff = 1.0; % diffusion of HSL across cell membranes
rmult = (1.5 + rand(1))/2; % random from 0.75 to 1.25
% Michaelis-Menten constant
Km = 1e-8; % promoter 1/2-bound when repressor=Km
Km2 = 1e-8; % saturation of Aiia by HSL
nvars = 8; % Number of internal cell variables
dydt = zeros(1+population*nvars, 1);
HSLenv = y(1);
dydt(1) = 0;
for n=0:(population-1),
% vars
HSL = y(n*nvars+2);
LacI = y(n*nvars+3);
TetR = y(n*nvars+4);
cI = y(n*nvars+5);
LuxI = y(n*nvars+6);
GFP = y(n*nvars+7);
GFPmat = y(n*nvars+8);
rmult = y(n*nvars+9);
%variable degradation rate
%kdeg = rmult*kd1;
kdeg = 1.0*kdeg;
% Rate equations
%dydt(1) = dydt(1); % HSL in the media (uncoupled from cells)
dydt(1) = dydt(1) + (0.001/population)*khdiff*(HSL-HSLenv); % HSL in the media (1000x the cell volume)
%dydt(n*nvars+2) = kh*LuxI - khd*HSL/(HSL+Km2)*LacI; % HSL in the cell (uncoupled from media)
dydt(n*nvars+2) = kh*LuxI - khd*HSL/(HSL+Km2)*LacI - khdiff*(HSL-HSLenv); % HSL in the cell
dydt(n*nvars+3) = k1*Km^2/(Km^2+cI^2) - kdeg*LacI; % rate of LacI production & degradation; repressed by cI
%dydt(n*nvars+4) = k1*HSL^2/(Km^2+HSL^2)*Km^2/(Km^2+LacI^2)- kdeg*TetR; % TetR on one gene, hybrid promoter (1 activated by HSL/LuxR, 1 repressed by cI)
%dydt(n*nvars+4) = k1*HSL^2/(Km^2+HSL^2) + k1*Km^2/(Km^2+LacI^2)- kdeg*TetR; % TetR on 2 genes (1 activated by HSL/LuxR, 1 repressed by cI)
dydt(n*nvars+4) = k1*HSL^2/(Km^2+HSL^2) - kdeg*TetR; % TetR activated by HSL/LuxR
%dydt(n*nvars+4) = k1*Km^2/(Km^2+LacI^2)- kdeg*TetR; % TetR repressed by cI
dydt(n*nvars+5) = k1*Km^2/(Km^2+TetR^2) - kdeg*cI; % rate of cI production & degradation; repressed by TetR
dydt(n*nvars+6) = k1*Km^2/(Km^2+LacI^2) - kdeg*LuxI; % rate of LuxI production & degradation; repressed by LacI
dydt(n*nvars+7) = k1*Km^2/(Km^2+TetR^2) - kdgfp*GFP - kmat*GFP; % rate of GFP production, degradation, & maturation
dydt(n*nvars+8) = kmat*GFP - kdgfp*GFPmat; % rate of GFP maturation & degradation
end;