%pset 7, Gross and Lodish model

%initial conditions, all from Gross & Lodish, 2006, Single Cycle Assay
EpoRsurface = 2000; %#/cell
%note, at start of experiment, almost all EpoR will be bound to EPO or NESP
%since k_on=0, we do not really care about the initial amount of EPO or NESP
EPO_init = 1e-9; %mol/L
NESP_init = 5e-9; %mol/L

%In the beginning of this assay, cells were preincubated for 5 minutes 
%with EPO or NESP, so we assume that the initial amount of EPO-EpoR complex 
%or NESP-EpoR complex is the same as the number of receptors on the cell 
%surface: 2000.  

%parameters
k_on = 0; %L/mol*min
k_off = 0.029; %min^-1
k_in = 0.06; %min^-1
k_resec = 0.347; %min^-1
k_lys = 0.204; %min^-1
k_lag = 0.2; %min^-1
k_deg = 3; %min^-1

t = [0 60]; %min

%Note that all concentrations in this model are in units of #/cell.
initial_conditions = [0,EpoRsurface,0,0,0,0,0,0,0,0,0];

%EPO
[t,y] = ode23(@gross_lodish, t, initial_conditions, [], k_on,k_off, k_in,k_resec,k_lys,k_lag,k_deg);
intact_EPO = y(:,1);
%NESP
k_off = 0.042; %min^-1
[t,y] = ode23(@gross_lodish, t, initial_conditions, [], k_on,k_off, k_in,k_resec,k_lys,k_lag,k_deg);
intact_NESP = y(:,1);
figure(1)
plot(t,intact_EPO,'b');
hold on
plot(t,intact_NESP,'r');
title('intact EPO or NESP in media over time');
xlabel ('time');
ylabel ('EPO or NESP, #/cell');
legend('EPO','NESP');

%part b
%EPO
k_on = 5e8; %L/mol*min
%NESP
k_on = 1.1e8; %L/mol*min
