-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsim_2D_Golf.m
58 lines (45 loc) · 1.31 KB
/
sim_2D_Golf.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
function [ AC_basal, AC_dip, t_half ] = sim_2D_Golf(mults, targs, species, params, model, Toffset)
nums = [numel(concs{1}), numel(concs{2})] ;
t_half = zeros( nums );
AC_basal = zeros( nums );
AC_dip = zeros( nums );
targ_output = 'ACprimed';
%%
reserv = {}
for k = 1:2;
if strcmp(targs{k}, 'tau_Golf')
reserv{k} = [ params{'kon_AC_Golf' ,'Obj'}.Value, params{'koff_AC_Golf' ,'Obj'}.Value ];
else
reserv{k} = species{targs{k},'Obj'}.InitialAmount;
end
end
%%
fprintf('Target1: %s \n', targs{1});
fprintf('Target2: %s \n', targs{2});
fprintf('\n');
%%
for i = 1:nums(1);
for j = 1:nums(2);
%%
for k = 1:2;
if strcmp(targs{k}, 'tau_Golf')
params{'kon_AC_Golf' ,'Obj'}.Value = reserv{k}(1) / mults{k}(i);
params{'koff_AC_Golf' ,'Obj'}.Value = reserv{k}(2) / mults{k}(i);
else
species{targs{k},'Obj'}.InitialAmount = reserv{k} * mults{k}(i) ;
end
end
%%
sd = sbiosimulate(model);
%% time
t_half_sim(i,j) = obtain_half('ACact', sd, Toffset);
%%
AC1tot = obtain_conc('AC1' , sd, 0 );
ACprimed = obtain_conc(targ_output, sd, Toffset );
ACprimed_end = sd.Data(end, find( strcmp( sd.DataNames, targ_output )) );
AC_basal(i,j) = ACprimed;
AC_dip(i,j) = ACprimed_end;
%%
end
end
end