@@ -38,7 +38,7 @@ dna_rs = @reaction_network begin
3838 k4, P --> 0
3939 k5, DNA + P --> DNAR
4040 k6, DNAR --> DNA + P
41- end k1 k2 k3 k4 k5 k6
41+ end
4242rates = [0.5 , (20 * log (2.0 ) / 120.0 ), (log (2.0 ) / 120.0 ), (log (2.0 ) / 600.0 ), 0.025 , 1.0 ]
4343tf = 1000.0
4444u0 = [1 , 0 , 0 , 0 ]
@@ -54,7 +54,7 @@ prob_jump_dnarepressor = JumpProblemNetwork(dna_rs, rates, tf, u0, prob, prob_da
5454bd_rs = @reaction_network begin
5555 k1, 0 --> A
5656 k2, A --> 0
57- end k1 k2
57+ end
5858rates = [1000.0 , 10.0 ]
5959tf = 1.0
6060u0 = [0 ]
@@ -73,7 +73,7 @@ nonlin_rs = @reaction_network begin
7373 k3, A + B --> C
7474 k4, C --> A + B
7575 k5, 3 C --> 3 A
76- end k1 k2 k3 k4 k5
76+ end
7777rates = [1.0 , 2.0 , 0.5 , 0.75 , 0.25 ]
7878tf = 0.01
7979u0 = [200 , 100 , 150 ]
@@ -137,7 +137,7 @@ rs = @reaction_network begin
137137 kAoff, S8 --> S1 + S9
138138 kAdp, S8 --> S5
139139 kAdp, S9 --> S3
140- end kon kAon koff kAoff kAp kAdp
140+ end
141141rsi = rates_sym_to_idx
142142rates = params[[rsi[:kon ], rsi[:kAon ], rsi[:koff ], rsi[:kAoff ], rsi[:kAp ], rsi[:kAdp ]]]
143143u0 = zeros (Int, 9 )
@@ -160,8 +160,8 @@ prob_jump_multistate = JumpProblemNetwork(rs, rates, tf, u0, prob,
160160
161161# generate the network
162162N = 10 # number of genes
163- @parameters t
164- @variables G [1 : (2 N)](t) M [1 : (2 N)](t) P [1 : (2 N)](t) G_ind [1 : (2 N)](t)
163+ @variables t
164+ @species ( G (t)) [1 : (2 N)] ( M (t)) [1 : (2 N)] ( P (t)) [1 : (2 N)] ( G_ind (t)) [1 : (2 N)]
165165
166166function construct_genenetwork (N)
167167 genenetwork = make_empty_network ()
@@ -209,6 +209,7 @@ for i in 1:(2 * N)
209209end
210210tf = 2000.0
211211prob = DiscreteProblem (rs, u0, (0.0 , tf), eval_module = @__MODULE__ )
212+
212213"""
213214 Twenty-gene model from McCollum et al,
214215 "The sorting direct method for stochastic simulation of biochemical systems with varying reaction execution behavior"
@@ -225,7 +226,7 @@ rn = @reaction_network begin
225226 c6, P2 --> 2 P
226227 c7, P2 + G --> P2G
227228 c8, P2G --> P2 + G
228- end c1 c2 c3 c4 c5 c6 c7 c8
229+ end
229230rnpar = [0.09 , 0.05 , 0.001 , 0.0009 , 0.00001 , 0.0005 , 0.005 , 0.9 ]
230231varlabels = [" G" , " M" , " P" , " P2" , " P2G" ]
231232u0 = [1000 , 0 , 0 , 0 , 0 ]
@@ -243,8 +244,9 @@ prob_jump_dnadimer_repressor = JumpProblemNetwork(rn, rnpar, tf, u0, prob,
243244# diffusion model
244245function getDiffNetwork (N)
245246 diffnetwork = make_empty_network ()
246- @parameters t K
247- @variables X[1 : N](t)
247+ @parameters K
248+ @variables t
249+ @species (X (t))[1 : N]
248250 for i in 1 : N
249251 addspecies! (diffnetwork, X[i])
250252 end
0 commit comments