-
Notifications
You must be signed in to change notification settings - Fork 0
/
week7.nb
3181 lines (3111 loc) · 141 KB
/
week7.nb
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Mathematica 10.2' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[ 158, 7]
NotebookDataLength[ 144420, 3172]
NotebookOptionsPosition[ 136584, 2984]
NotebookOutlinePosition[ 141757, 3095]
CellTagsIndexPosition[ 141341, 3085]
WindowFrame->Normal*)
(* Beginning of Notebook Content *)
Notebook[{
Cell["\<\
I remind that last week I completed a circuit by inputting concentrations and \
outputting concentrations.\
\>", "Text",
CellChangeTimes->{{3.672977114387246*^9, 3.6729771749936113`*^9}}],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{
RowBox[{"Clear", "[", "enhancedGRN5", "]"}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"enhancedGRN5", "[",
RowBox[{"Rconc_", ",", "Cconc_", ",",
RowBox[{"k1_:", "1.0"}], ",",
RowBox[{"ktx_:", "500.0"}], ",",
RowBox[{"kON_:", "100.0"}], ",",
RowBox[{"kOFF_:", "25"}], ",",
RowBox[{"tot_:", "10"}], ",",
RowBox[{"tmax_:", "100"}], ",",
RowBox[{"kc_:", "1000"}], ",",
RowBox[{"ktl_:", "1.0"}], ",",
RowBox[{"kpd_:", "1.0"}], ",",
RowBox[{"krd_:", "5.0"}], ",",
RowBox[{"kftx_:", "5.2"}]}], "]"}], ":=", "\[IndentingNewLine]",
RowBox[{"Module", "[",
RowBox[{
RowBox[{"{",
RowBox[{
"null", ",", "r", ",", "c", ",", "rG1", ",", "cG1c", ",", "G1", ",",
"G1c", ",", "T1", ",", "T1c", ",", "R1", ",", "C1", ",", "sol", ",",
"rsys", ",", "OFF", ",", "ON", ",", "T", ",", "OUT"}], "}"}], ",",
"\[IndentingNewLine]",
RowBox[{
RowBox[{"rsys", "=",
RowBox[{"{", "\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{"Gene", " ", "R1"}], " ", "*)"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"revrxn", "[",
RowBox[{
RowBox[{"r", "+", "G1"}], ",", "rG1", ",", "k1", ",", "k1"}], "]"}],
",", "\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"rG1", ",",
RowBox[{"rG1", "+", "T1"}], ",", "ktx"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"T1", ",",
RowBox[{"T1", "+", "R1"}], ",", "ktl"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"T1", ",", "null", ",", "krd"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"R1", ",", "null", ",", "kpd"}], "]"}], ",",
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{"Titrant", " ", "Gene", " ", "C1"}], " ", "*)"}],
"\[IndentingNewLine]",
RowBox[{"revrxn", "[",
RowBox[{
RowBox[{"c", "+", "G1c"}], ",", "cG1c", ",", "k1", ",", "k1"}],
"]"}], ",", "\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"cG1c", ",",
RowBox[{"cG1c", "+", "T1c"}], ",", "ktx"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"T1c", ",",
RowBox[{"T1c", "+", "C1"}], ",", "ktl"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"T1c", ",", "null", ",", "krd"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"C1", ",", "null", ",", "kpd"}], "]"}], ",",
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"(*", " ", "Titration", " ", "*)"}], "\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{
RowBox[{"C1", "+", "R1"}], ",", "null", ",", "kc"}], "]"}], ",",
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{"\"\<Reporter\>\"", " ", "Gene"}], " ", "*)"}],
"\[IndentingNewLine]",
RowBox[{"revrxn", "[",
RowBox[{
RowBox[{"R1", "+", "OFF"}], ",", "ON", ",", "kON", ",", "kOFF"}],
"]"}], ",", "\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"ON", ",",
RowBox[{"ON", "+", "T"}], ",", "kftx"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"T", ",",
RowBox[{"T", "+", "OUT"}], ",", "ktl"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"T", ",", "null", ",", "krd"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"OUT", ",", "null", ",", "kpd"}], "]"}], ",",
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"conc", "[",
RowBox[{"r", ",", "Rconc"}], "]"}], ",", "\[IndentingNewLine]",
RowBox[{"conc", "[",
RowBox[{"c", ",", "Cconc"}], "]"}], ",", "\[IndentingNewLine]",
RowBox[{"conc", "[",
RowBox[{"G1", ",", "1"}], "]"}], ",", "\[IndentingNewLine]",
RowBox[{"conc", "[",
RowBox[{"G1c", ",", "1"}], "]"}], ",", "\[IndentingNewLine]",
RowBox[{"conc", "[",
RowBox[{"OFF", ",", "tot"}], "]"}]}], "\[IndentingNewLine]", "}"}]}],
";", "\[IndentingNewLine]",
RowBox[{"sol", "=",
RowBox[{"SimulateRxnsys", "[",
RowBox[{"rsys", ",", "tmax"}], "]"}]}], ";", "\[IndentingNewLine]",
RowBox[{"Return", "[",
RowBox[{
RowBox[{"{",
RowBox[{"OUT", "[", "t", "]"}], "}"}], "/.", "sol"}], "]"}]}]}],
"\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"plotter", "=",
RowBox[{"enhancedGRN5", "[",
RowBox[{"2", ",", "5"}], "]"}]}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"enhancedGRN5Plot", "[",
RowBox[{"r_", ",", "c_"}], "]"}], ":=",
RowBox[{"(", "\[IndentingNewLine]",
RowBox[{
RowBox[{"plotter", "=",
RowBox[{"enhancedGRN5", "[",
RowBox[{"r", ",", "c"}], "]"}]}], ";", "\[IndentingNewLine]",
RowBox[{"Plot", "[",
RowBox[{"plotter", ",",
RowBox[{"{",
RowBox[{"t", ",", "0", ",", "100"}], "}"}], ",",
RowBox[{"PlotRange", "\[Rule]", "All"}], ",",
RowBox[{"PlotStyle", "\[Rule]",
RowBox[{"{",
RowBox[{
RowBox[{"{", "Red", "}"}], ",",
RowBox[{"{", "Green", "}"}]}], "}"}]}], ",",
RowBox[{"PlotLabel", "\[Rule]", "\"\<G1f\>\""}]}], " ", "]"}]}],
")"}]}], "\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"tmax", "=", "60"}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"c", "=", "5"}], ";"}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{"Manipulate", "[",
RowBox[{
RowBox[{"enhancedGRN5Plot", "[",
RowBox[{"a", ",", "5"}], "]"}], ",",
RowBox[{"{",
RowBox[{"a", ",", "0", ",", "10"}], "}"}]}], "]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"y", "=",
RowBox[{"Table", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"10", "-", "i"}], ",",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"enhancedGRN5", "[",
RowBox[{"i", ",", "c"}], "]"}], "[",
RowBox[{"[", "1", "]"}], "]"}], "[",
RowBox[{"[", "0", "]"}], "]"}], "[", "tmax", "]"}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"i", ",", "0", ",", "10", ",", "0.1"}], "}"}]}], "]"}]}],
";"}], "\[IndentingNewLine]",
RowBox[{"ListPlot", "[", "y", "]"}]}], "Input",
CellChangeTimes->{{3.674784013729014*^9, 3.67478405629151*^9}, {
3.674784533830372*^9, 3.674784547654339*^9}},
FontSize->14],
Cell[BoxData[
TagBox[
StyleBox[
DynamicModuleBox[{$CellContext`a$$ = 0, Typeset`show$$ = True,
Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu",
Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ =
"\"untitled\"", Typeset`specs$$ = {{
Hold[$CellContext`a$$], 0, 10}}, Typeset`size$$ = {360., {111., 116.}},
Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ =
True, $CellContext`a$102739$$ = 0},
DynamicBox[Manipulate`ManipulateBoxes[
1, StandardForm, "Variables" :> {$CellContext`a$$ = 0},
"ControllerVariables" :> {
Hold[$CellContext`a$$, $CellContext`a$102739$$, 0]},
"OtherVariables" :> {
Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$,
Typeset`animator$$, Typeset`animvar$$, Typeset`name$$,
Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$,
Typeset`skipInitDone$$},
"Body" :> $CellContext`enhancedGRN5Plot[$CellContext`a$$, 5],
"Specifications" :> {{$CellContext`a$$, 0, 10}}, "Options" :> {},
"DefaultOptions" :> {}],
ImageSizeCache->{405., {156., 162.}},
SingleEvaluation->True],
Deinitialization:>None,
DynamicModuleValues:>{},
SynchronousInitialization->True,
UndoTrackedVariables:>{Typeset`show$$, Typeset`bookmarkMode$$},
UnsavedVariables:>{Typeset`initDone$$},
UntrackedVariables:>{Typeset`size$$}], "Manipulate",
Deployed->True,
StripOnInput->False],
Manipulate`InterpretManipulate[1]]], "Output",
CellChangeTimes->{
3.672976827598877*^9, {3.6747840052485857`*^9, 3.674784056601029*^9}, {
3.674784534746839*^9, 3.674784548050305*^9}},
FontSize->14],
Cell[BoxData[
GraphicsBox[{{}, {{},
{RGBColor[0.368417, 0.506779, 0.709798], PointSize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/tkm
+7oKRM8GqUd0y5YfEb3JcFkpm29RJ3rW8Dh/8tOpWtGbBI/D9SljOtGbCH3Q
sWfaG6I3Efd3h6zO6RE9K1SORlTl6EXPEhVH7ax7HomeBcyt01SZg6I3AXn7
hgerR0Tv5Z5zyov+R/TM0dLhUl5kxpNnhqDQnwc2WfHkmUL1cHOqYTJPngm2
P9WZ+Un+++4hqKLWy1PK4yOh/wXr90nL6XbioRPqn7PKF7bWS9x4zBDmGVjY
+pqmAoXoP2OTkoNQoRa9p6wyIq4glxe9YXY4RhoVNlX0/mL5kqsXHnqL3hDr
G+rTrnhV9AaZZzV355Sv6D1hl1p/T388g8c1oX+AFfaWN9nO4pEn1P/K2u8F
Ztn784gV5j1gVYW+pWOzRV/PLgUqizoDRe8O09ecu1c8l0e60H+LyZ0NXfOD
eaiE+g62u9+x+n6IeL2VmdZF79zAxH0Dm9aaGzOA//8bU65+6Bv9Bo9/AbNG
iYs=
"]]}, {}}, {}},
AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948],
Axes->{True, True},
AxesLabel->{None, None},
AxesOrigin->{0, 0},
DisplayFunction->Identity,
Frame->{{False, False}, {False, False}},
FrameLabel->{{None, None}, {None, None}},
FrameTicks->{{Automatic, Automatic}, {Automatic, Automatic}},
GridLines->{None, None},
GridLinesStyle->Directive[
GrayLevel[0.5, 0.4]],
Method->{},
PlotRange->{{0, 10.}, {0, 10.129586649104594`}},
PlotRangeClipping->True,
PlotRangePadding->{{
Scaled[0.02],
Scaled[0.02]}, {
Scaled[0.02],
Scaled[0.05]}},
Ticks->{Automatic, Automatic}]], "Output",
CellChangeTimes->{
3.672976827598877*^9, {3.6747840052485857`*^9, 3.674784056601029*^9}, {
3.674784534746839*^9, 3.6747845503483553`*^9}},
FontSize->14]
}, Open ]],
Cell["\<\
First, I would like to reduce the concentration of titrant as an input \
parameter. So exactly 1 input for a GRN corresponds to exactly 1 output.
(Actually, I don\[CloseCurlyQuote]t really need this, but I guess it\
\[CloseCurlyQuote]s a proof-of-concept that it can still work. In my work \
below, I just go back to the old way, as I find it simpler to abstract away a \
GRN).\
\>", "Text",
CellChangeTimes->{{3.672986194262794*^9, 3.672986249942876*^9}, {
3.672987340458654*^9, 3.672987387531155*^9}}],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{
RowBox[{"Clear", "[", "enhancedGRN6", "]"}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"enhancedGRN6", "[",
RowBox[{"Rconc_", ",",
RowBox[{"k1_:", "1.0"}], ",",
RowBox[{"ktx_:", "500.0"}], ",",
RowBox[{"kON_:", "100.0"}], ",",
RowBox[{"kOFF_:", "25"}], ",",
RowBox[{"tot_:", "10"}], ",",
RowBox[{"tmax_:", "100"}], ",",
RowBox[{"kc_:", "1000"}], ",",
RowBox[{"ktl_:", "1.0"}], ",",
RowBox[{"kpd_:", "1.0"}], ",",
RowBox[{"krd_:", "5.0"}], ",",
RowBox[{"kftx_:", "5.2"}]}], "]"}], ":=", "\[IndentingNewLine]",
RowBox[{"Module", "[",
RowBox[{
RowBox[{"{",
RowBox[{
"null", ",", "r", ",", "rG1", ",", "cG1c", ",", "G1", ",", "G1c", ",",
"T1", ",", "T1c", ",", "R1", ",", "C1", ",", "sol", ",", "rsys", ",",
"OFF", ",", "ON", ",", "T", ",", "OUT"}], "}"}], ",",
"\[IndentingNewLine]",
RowBox[{
RowBox[{"kctx", "=", "400.0"}], ";", "\[IndentingNewLine]",
RowBox[{"rsys", "=",
RowBox[{"{", "\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{"Gene", " ", "R1"}], " ", "*)"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"revrxn", "[",
RowBox[{
RowBox[{"r", "+", "G1"}], ",", "rG1", ",", "k1", ",", "k1"}], "]"}],
",", "\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"rG1", ",",
RowBox[{"rG1", "+", "T1"}], ",", "ktx"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"T1", ",",
RowBox[{"T1", "+", "R1"}], ",", "ktl"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"T1", ",", "null", ",", "krd"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"R1", ",", "null", ",", "kpd"}], "]"}], ",",
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{"Titrant", " ", "Gene", " ", "C1"}], " ", "*)"}],
"\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"G1c", ",",
RowBox[{"G1c", "+", "T1c"}], ",", "kctx"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"T1c", ",",
RowBox[{"T1c", "+", "C1"}], ",", "ktl"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"T1c", ",", "null", ",", "krd"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"C1", ",", "null", ",", "kpd"}], "]"}], ",",
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"(*", " ", "Titration", " ", "*)"}], "\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{
RowBox[{"C1", "+", "R1"}], ",", "null", ",", "kc"}], "]"}], ",",
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{"\"\<Reporter\>\"", " ", "Gene"}], " ", "*)"}],
"\[IndentingNewLine]",
RowBox[{"revrxn", "[",
RowBox[{
RowBox[{"R1", "+", "OFF"}], ",", "ON", ",", "kON", ",", "kOFF"}],
"]"}], ",", "\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"ON", ",",
RowBox[{"ON", "+", "T"}], ",", "kftx"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"T", ",",
RowBox[{"T", "+", "OUT"}], ",", "ktl"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"T", ",", "null", ",", "krd"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"OUT", ",", "null", ",", "kpd"}], "]"}], ",",
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"conc", "[",
RowBox[{"r", ",", "Rconc"}], "]"}], ",", "\[IndentingNewLine]",
RowBox[{"conc", "[",
RowBox[{"G1", ",", "1"}], "]"}], ",", "\[IndentingNewLine]",
RowBox[{"conc", "[",
RowBox[{"G1c", ",", "1"}], "]"}], ",", "\[IndentingNewLine]",
RowBox[{"conc", "[",
RowBox[{"OFF", ",", "tot"}], "]"}]}], "\[IndentingNewLine]", "}"}]}],
";", "\[IndentingNewLine]",
RowBox[{"sol", "=",
RowBox[{"SimulateRxnsys", "[",
RowBox[{"rsys", ",", "tmax"}], "]"}]}], ";", "\[IndentingNewLine]",
RowBox[{"Return", "[",
RowBox[{
RowBox[{"{",
RowBox[{"OUT", "[", "t", "]"}], "}"}], "/.", "sol"}], "]"}]}]}],
"\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"enhancedGRN6Plot", "[", "r_", "]"}], ":=",
RowBox[{"(", "\[IndentingNewLine]",
RowBox[{
RowBox[{"plotter", "=",
RowBox[{"enhancedGRN6", "[", "r", "]"}]}], ";", "\[IndentingNewLine]",
RowBox[{"Plot", "[",
RowBox[{"plotter", ",",
RowBox[{"{",
RowBox[{"t", ",", "0", ",", "100"}], "}"}], ",",
RowBox[{"PlotRange", "\[Rule]", "All"}], ",",
RowBox[{"PlotStyle", "\[Rule]",
RowBox[{"{",
RowBox[{
RowBox[{"{", "Red", "}"}], ",",
RowBox[{"{", "Green", "}"}]}], "}"}]}], ",",
RowBox[{"PlotLabel", "\[Rule]", "\"\<G1f\>\""}]}], " ", "]"}]}],
")"}]}], "\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"tmax", "=", "60"}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"c", "=", "5"}], ";"}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{"Manipulate", "[",
RowBox[{
RowBox[{"enhancedGRN6Plot", "[", "a", "]"}], ",",
RowBox[{"{",
RowBox[{"a", ",", "0", ",", "10"}], "}"}]}], "]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"y", "=",
RowBox[{"Table", "[",
RowBox[{
RowBox[{"{",
RowBox[{"i", ",",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"enhancedGRN6", "[", "i", "]"}], "[",
RowBox[{"[", "1", "]"}], "]"}], "[",
RowBox[{"[", "0", "]"}], "]"}], "[", "tmax", "]"}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"i", ",", "0", ",", "10", ",", "0.1"}], "}"}]}], "]"}]}],
";"}], "\[IndentingNewLine]",
RowBox[{"ListPlot", "[", "y", "]"}], "\[IndentingNewLine]"}], "Input",
CellChangeTimes->{{3.6729862507317*^9, 3.6729863138457336`*^9},
3.672986374588283*^9, {3.672986491154286*^9, 3.672986592591238*^9}, {
3.6729866980092783`*^9, 3.672986762994952*^9}},
FontSize->14],
Cell[BoxData[
TagBox[
StyleBox[
DynamicModuleBox[{$CellContext`a$$ = 5.28, Typeset`show$$ = True,
Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu",
Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ =
"\"untitled\"", Typeset`specs$$ = {{
Hold[$CellContext`a$$], 0, 10}}, Typeset`size$$ = {
184., {2.6318359375, 9.}}, Typeset`update$$ = 0, Typeset`initDone$$,
Typeset`skipInitDone$$ = True, $CellContext`a$174876$$ = 0},
DynamicBox[Manipulate`ManipulateBoxes[
1, StandardForm, "Variables" :> {$CellContext`a$$ = 0},
"ControllerVariables" :> {
Hold[$CellContext`a$$, $CellContext`a$174876$$, 0]},
"OtherVariables" :> {
Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$,
Typeset`animator$$, Typeset`animvar$$, Typeset`name$$,
Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$,
Typeset`skipInitDone$$},
"Body" :> $CellContext`enhancedGRN6Plot[$CellContext`a$$],
"Specifications" :> {{$CellContext`a$$, 0, 10}}, "Options" :> {},
"DefaultOptions" :> {}],
ImageSizeCache->{247., {50., 56.}},
SingleEvaluation->True],
Deinitialization:>None,
DynamicModuleValues:>{},
SynchronousInitialization->True,
UndoTrackedVariables:>{Typeset`show$$, Typeset`bookmarkMode$$},
UnsavedVariables:>{Typeset`initDone$$},
UntrackedVariables:>{Typeset`size$$}], "Manipulate",
Deployed->True,
StripOnInput->False],
Manipulate`InterpretManipulate[1]]], "Output",
CellChangeTimes->{
3.672986323489936*^9, 3.6729863768721857`*^9, {3.672986491680367*^9,
3.672986557068255*^9}, 3.672986593435063*^9, {3.672986720480679*^9,
3.672986765317066*^9}},
FontSize->14],
Cell[BoxData[
GraphicsBox[{{}, {{},
{RGBColor[0.368417, 0.506779, 0.709798], PointSize[0.009166666666666668],
AbsoluteThickness[1.6], PointBox[CompressedData["
1:eJxd0n9Qk3UcB3AcrA3EOcavMQZse6YiMQ3RQwT6fsChIOV5s1+GGIHAGQQl
BkckwiE/NcB+gHDmMVAEpDgycqKQQhkQQw2VHzcEmqkkJCAKi4Cifb7/9L57
7rnvPZ/36/Pcc480IkEVxTIxMYn691q6/z9lpUu5RIRWWfk3HKOJ8dxBdrVI
rYufJpGNnkvpIbU16UcshjLweT95nDyoT2zOJUZlmMwdPrPNgleE83rSPP11
ifuyL0hM9FIekEemqjmB70nsjxLPQ/uPGFpPEW3XUsbIdl1fgI+2HL0Jouto
qroeWYnzk+RivSxiZE0V+k/JwOk98WXiGuxPk3KvjxPeDqzDfc/JSPXekqmz
9ejNktQrn/e9oW5Az0CkDQkPPYouoDdHNlfFlwdVNKL3N9HnLt7RDFxEb4G0
KfM4fL8m9Ew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io->NCache[GoldenRatio^(-1), 0.6180339887498948],
Axes->{True, True},
AxesLabel->{None, None},
AxesOrigin->{0, 0},
DisplayFunction->Identity,
Frame->{{False, False}, {False, False}},
FrameLabel->{{None, None}, {None, None}},
FrameTicks->{{Automatic, Automatic}, {Automatic, Automatic}},
GridLines->{None, None},
GridLinesStyle->Directive[
GrayLevel[0.5, 0.4]],
Method->{},
PlotRange->{{0, 10.}, {0, 10.148936937946784`}},
PlotRangeClipping->True,
PlotRangePadding->{{
Scaled[0.02],
Scaled[0.02]}, {
Scaled[0.02],
Scaled[0.05]}},
Ticks->{Automatic, Automatic}]], "Output",
CellChangeTimes->{
3.672986323489936*^9, 3.6729863768721857`*^9, {3.672986491680367*^9,
3.672986557068255*^9}, 3.672986593435063*^9, {3.672986720480679*^9,
3.6729867678546867`*^9}},
FontSize->14]
}, Open ]],
Cell["Titrant Module", "Text",
CellChangeTimes->{{3.6729771856720963`*^9, 3.672977193445121*^9}}],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{
RowBox[{
RowBox[{"titrantGRN", "[", "gene_", "]"}], ":=",
RowBox[{"Module", "[",
RowBox[{
RowBox[{"{", "null", "}"}], ",", "\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{"Gene", " ", "C1"}], " ", "*)"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"gn", "=",
RowBox[{"Symbol", "[",
RowBox[{"\"\<G\>\"", "<>", "gene", "<>", "\"\<C\>\""}], "]"}]}], ";",
"\[IndentingNewLine]",
RowBox[{"ts", "=",
RowBox[{"Symbol", "[",
RowBox[{"\"\<T\>\"", "<>", "gene", "<>", "\"\<C\>\""}], "]"}]}], ";",
"\[IndentingNewLine]",
RowBox[{"out", "=",
RowBox[{"Symbol", "[",
RowBox[{"\"\<C\>\"", "<>", "gene"}], "]"}]}], ";",
"\[IndentingNewLine]",
RowBox[{"Seq", "[", "\[IndentingNewLine]",
RowBox[{
RowBox[{"rxn", "[",
RowBox[{"gn", ",",
RowBox[{"gn", "+", "ts"}], ",", "ktx"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"ts", ",",
RowBox[{"ts", "+", "out"}], ",", "ktl"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"ts", ",", "null", ",", "krd"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"out", ",", "null", ",", "kpd"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"conc", "[",
RowBox[{"gn", ",", "c"}], "]"}]}], "\[IndentingNewLine]", "]"}]}]}],
"\[IndentingNewLine]", "]"}]}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"ktx", "=", "5.0"}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"ktl", "=",
RowBox[{"krd", "=",
RowBox[{"kpd", "=", "1.0"}]}]}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"c", "=", "1"}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"tmax", "=", "50"}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"rsys", "=",
RowBox[{"{", "\[IndentingNewLine]",
RowBox[{"titrantGRN", "[", "\"\<X\>\"", "]"}], "\[IndentingNewLine]",
"}"}]}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"sol", "=",
RowBox[{"SimulateRxnsys", "[",
RowBox[{"rsys", ",", "tmax"}], "]"}]}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"plotter", "=",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"Symbol", "[",
RowBox[{"\"\<C\>\"", "<>", "\"\<X\>\""}], "]"}], "[", "t", "]"}],
"}"}], "/.", "sol"}]}], ";"}], "\[IndentingNewLine]",
RowBox[{"Plot", "[",
RowBox[{"plotter", ",",
RowBox[{"{",
RowBox[{"t", ",", "0", ",", "50"}], "}"}]}],
"]"}], "\[IndentingNewLine]"}], "Input",
CellChangeTimes->{{3.6729772845394382`*^9, 3.672977298345179*^9}, {
3.672977498655394*^9, 3.672977545248466*^9}, {3.672977670681621*^9,
3.672977864523999*^9}, {3.6729779389149227`*^9, 3.672978032777163*^9},
3.672978079826342*^9, {3.672978115379147*^9, 3.672978298383993*^9}, {
3.6729784899791603`*^9, 3.672978567320815*^9}, {3.67297934798521*^9,
3.6729793571119432`*^9}},
FontSize->14],
Cell[BoxData[
GraphicsBox[{{}, {},
{RGBColor[0.368417, 0.506779, 0.709798], AbsoluteThickness[1.6], Opacity[
1.], LineBox[CompressedData["
1:eJwt1Xk4lF0UAHBEISJjKwxmbGOGWUxKkSOytMpnSVISaUFIKKS0UQht0kLI
EiGlrIkWa7Y2FFKR7HvZv3tHf73P77n3Pfe+5557XkXHoxbOPFxcXObcXFz4
mTvYFb4nnQhZ1g0/dXsJoB0ZKF6QTwSu7/kBp5A1vN6abvlChOpaobvifQSQ
1d752IMoDyXiY1vY/QSYLPYPzk+Sh003wpOMBgkwphl/JzhXHmxN1EKCkYfi
Xj/b/FYeXssoXypB7j4j3Nv6Sx4UXMUntIcI0JtQRzkjoQBq/crlMsMEaDmw
L/rBTgUoG3zfUDJCgLv2uXknHBRAL60trx/ZwVKgfetBBUh9qrtIZpQAXQaP
qRO+CtBUmFx1DHlElvuN8U0F6Oo+ups4RoCl7+P//PqoAOFK/sq24wSorRyT
K2pVgKrjtyinkKNfmhpFdirA9irZrARk6cyhyDXjCrDlpsjGHmSlUFAPFVeE
Ng3J8mMTBNDV/7Zb/T9FYIn7HPf8Q4D5Veyzc7sUIVUmwfQKchktJK3RURH6
Zs/lZiCbrmRMnPRSBMIPl31dyFbjQVeqoxRhUzUoWf0lgHu6fJlrvSJEO244
ojhJAGbCsW5oUgTnS7buOshjMeXLJL4pQld7EXEH8skLR+2KBxVh3/Jjl4OQ
L+wrGRMWIcGu17PZTchxUntVs7aS4MWpMJHAKQK8LJXbS7NGzhmYi0L+duTr
jbQ9JPho9Dku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{None, None},
AxesOrigin->{0, 4.979},
DisplayFunction->Identity,
Frame->{{False, False}, {False, False}},
FrameLabel->{{None, None}, {None, None}},
FrameTicks->{{Automatic, Automatic}, {Automatic, Automatic}},
GridLines->{None, None},
GridLinesStyle->Directive[
GrayLevel[0.5, 0.4]],
Method->{
"DefaultBoundaryStyle" -> Automatic, "DefaultMeshStyle" ->
AbsolutePointSize[6], "ScalingFunctions" -> None},
PlotRange->{{0, 50}, {4.9797244789858, 5.000000002893252}},
PlotRangeClipping->True,
PlotRangePadding->{{
Scaled[0.02],
Scaled[0.02]}, {
Scaled[0.05],
Scaled[0.05]}},
Ticks->{Automatic, Automatic}]], "Output",
CellChangeTimes->{3.672978507736225*^9, 3.672978544424726*^9,
3.672986625094161*^9},
FontSize->14]
}, Open ]],
Cell["\<\
This works as desired (see the sample circuit I built last week). Now I will \
build parts of the other genes, and continue abstracting away parts of the \
enhanced GRN model.
\
\>", "Text",
CellChangeTimes->{{3.6729785148832617`*^9, 3.67297852864408*^9}, {
3.6729787543164673`*^9, 3.672978797308682*^9}, 3.6729789579451733`*^9, {
3.672980967349231*^9, 3.672980967842373*^9}}],
Cell[BoxData[{
RowBox[{"Clear", "[", "GRN", "]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"GRN", "[",
RowBox[{
RowBox[{"{",
RowBox[{"IN_", ",", "OUT_"}], "}"}], ",",
RowBox[{"init_:",
RowBox[{"{",
RowBox[{
RowBox[{"x", "[", "0", "]"}], "\[Equal]", "0"}], "}"}]}], ",",
RowBox[{"kON_:", "1.0"}], ",",
RowBox[{"kOFF_:", "1.0"}]}], "]"}], ":=",
RowBox[{"Module", "[",
RowBox[{
RowBox[{"{",
RowBox[{"null", ",", "initIN"}], "}"}], ",", "\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{"Gene", " ", "A1"}], " ", "*)"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"With", "[", "\[IndentingNewLine]",
RowBox[{
RowBox[{"{",
RowBox[{"c", "=", "\[IndentingNewLine]",
RowBox[{"Cases", "[",
RowBox[{"init", ",",
RowBox[{
RowBox[{
RowBox[{"v_", "[", "0", "]"}], "\[Equal]", " ", "b_"}], " ",
"\[Rule]", "b"}]}], "]"}]}], "}"}], ",", "\[IndentingNewLine]",
RowBox[{"initIN", "=",
RowBox[{"c", "[",
RowBox[{"[", "1", "]"}], "]"}]}]}], "]"}], ";",
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"out", "=",
RowBox[{"ToString", "[", "OUT", "]"}]}], ";", "\[IndentingNewLine]",
RowBox[{"in", "=",
RowBox[{"ToString", "[", "IN", "]"}]}], ";", "\[IndentingNewLine]",
RowBox[{"gn", "=",
RowBox[{"Symbol", "[",
RowBox[{"\"\<GN\>\"", "<>", "out"}], "]"}]}], ";",
"\[IndentingNewLine]",
RowBox[{"ts", "=",
RowBox[{"Symbol", "[",
RowBox[{"\"\<TS\>\"", "<>", "out"}], "]"}]}], ";",
"\[IndentingNewLine]",
RowBox[{"actGene", "=",
RowBox[{"Symbol", "[",
RowBox[{"in", "<>",
RowBox[{"ToString", "[", "gn", "]"}]}], "]"}]}], ";",
"\[IndentingNewLine]",
RowBox[{"Seq", "[", "\[IndentingNewLine]",
RowBox[{
RowBox[{"revrxn", "[",
RowBox[{
RowBox[{"IN", "+", "gn"}], ",", "actGene", ",", "kON", ",", "kOFF"}],
"]"}], ",", "\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"actGene", ",",
RowBox[{"actGene", "+", "ts"}], ",", "ktx"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"ts", ",",
RowBox[{"ts", "+", "OUT"}], ",", "ktl"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"ts", ",", "null", ",", "krd"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"rxn", "[",
RowBox[{"OUT", ",", "null", ",", "kpd"}], "]"}], ",",
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"conc", "[",
RowBox[{"IN", ",", "initIN"}], "]"}], ",", "\[IndentingNewLine]",
RowBox[{"conc", "[",
RowBox[{"gn", ",", "Gtot"}], "]"}]}], "\[IndentingNewLine]",
"\[IndentingNewLine]", "]"}]}]}], "\[IndentingNewLine]",
"]"}]}]}], "Input",
CellChangeTimes->{{3.672978678992873*^9, 3.6729786866967907`*^9}, {
3.672978745689644*^9, 3.672978751194312*^9}, 3.672978889060902*^9, {
3.6729789846988487`*^9, 3.672979002713835*^9}, {3.672979050815267*^9,
3.672979149107048*^9}, {3.672979246763752*^9, 3.672979247417429*^9}, {
3.672979288901638*^9, 3.672979332062792*^9}, {3.6729793652025347`*^9,
3.672979506832879*^9}, {3.6729795754235897`*^9, 3.672979652250333*^9},
3.672979703213629*^9, {3.672979811221746*^9, 3.672979811668457*^9}, {
3.672979987666095*^9, 3.672979988582858*^9}, {3.6729801543954983`*^9,
3.672980192820912*^9}, {3.672980244432003*^9, 3.67298031748459*^9},
3.6729803754899807`*^9, {3.672980458558586*^9, 3.672980482478272*^9}, {
3.672980535316779*^9, 3.672980705228489*^9}, {3.672980848689724*^9,
3.6729809734286633`*^9}, {3.672981015905642*^9, 3.6729811466152897`*^9}, {
3.67298120325072*^9, 3.672981319538458*^9}, 3.672981355478408*^9, {
3.672981388709137*^9, 3.672981396618724*^9}, {3.672981488703582*^9,
3.6729815203827343`*^9}, {3.672981589587929*^9, 3.6729816736720877`*^9}, {
3.672981744810979*^9, 3.672981756510964*^9}, {3.672982057547696*^9,
3.672982081515292*^9}, {3.6729821467770367`*^9, 3.672982151359723*^9}, {
3.672982250289405*^9, 3.672982290442463*^9}, {3.672982420966116*^9,
3.67298252307428*^9}, {3.6729825697999353`*^9, 3.672982748971365*^9}, {
3.672982859300745*^9, 3.672982936419916*^9}, {3.672982993160328*^9,
3.672982996048286*^9}, {3.6729833677106323`*^9, 3.672983388580373*^9}, {
3.672983428210277*^9, 3.672983441233715*^9}, {3.672983473012553*^9,
3.672983670018848*^9}, {3.672983749752721*^9, 3.672983802901225*^9}, {
3.672985164021546*^9, 3.672985250207919*^9}, 3.672985363817361*^9, {
3.672986032414547*^9, 3.672986146995747*^9}, {3.672987102492234*^9,
3.672987106195589*^9}, {3.6729871783938723`*^9, 3.6729872276913757`*^9}, {
3.6729872678084784`*^9, 3.672987329082159*^9}, {3.672987409545116*^9,
3.672987464931116*^9}, {3.6729874959991913`*^9, 3.672987584498608*^9}, {
3.672987618568145*^9, 3.672987700261005*^9}, {3.672987738621423*^9,
3.6729877491249027`*^9}, {3.672989039933271*^9, 3.672989062165737*^9}, {
3.6729891529081087`*^9, 3.672989183045948*^9}, {3.672989291955154*^9,
3.6729893009456863`*^9}, {3.672989343583612*^9, 3.672989347629287*^9}, {
3.672989405060093*^9, 3.672989449949329*^9}, {3.672989508733088*^9,
3.672989531029512*^9}, {3.672989631320898*^9, 3.6729896502155724`*^9}, {
3.672989681147642*^9, 3.672989691250993*^9}, {3.672989739890129*^9,
3.672989740023525*^9}, {3.672989773556836*^9, 3.6729898339674683`*^9},
3.672989906403016*^9, {3.672989987100444*^9, 3.672989990307423*^9}, {
3.672990023527252*^9, 3.6729900247025003`*^9}, {3.672990070131806*^9,
3.672990072722619*^9}, {3.672991397375238*^9, 3.672991401499344*^9}},
FontSize->14],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{"Clear", "[",
RowBox[{
"Gtot", ",", "ktl", ",", "krd", ",", "kpd", ",", "ktx", ",", "X", ",", "Y",
",", "Z"}], "]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"tmax", "=", "50"}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"Gtot", "=", "10"}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"ktl", "=",
RowBox[{"kpd", "=", "1.0"}]}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"krd", "=", "5.0"}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"ktx", "=", "5.0"}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"dummySys", "=",
RowBox[{"{", "\[IndentingNewLine]",
RowBox[{
RowBox[{"GRN", "[",
RowBox[{
RowBox[{"{",
RowBox[{"X", ",", "Y"}], "}"}], ",",
RowBox[{"{",
RowBox[{
RowBox[{"X", "[", "0", "]"}], "\[Equal]", "1"}], "}"}]}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"GRN", "[",
RowBox[{"{",
RowBox[{"Y", ",", "Z"}], "}"}], "]"}]}], "\[IndentingNewLine]",
"}"}]}], "\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"sol", "=",
RowBox[{"SimulateRxnsys", "[",
RowBox[{"dummySys", ",", "tmax"}], "]"}]}],
";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"plotter", "=",
RowBox[{
RowBox[{"{",
RowBox[{"Z", "[", "t", "]"}], "}"}], "/.", "sol"}]}],
";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"Plot", "[",
RowBox[{"plotter", ",",
RowBox[{"{",
RowBox[{"t", ",", "0", ",", "50"}], "}"}]}], "]"}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]"}], "Input",
CellChangeTimes->{{3.672989907357766*^9, 3.672989907845482*^9}, {
3.672989999827763*^9, 3.672990083802479*^9}, {3.6729902263933563`*^9,
3.672990270154295*^9}, {3.672990307150877*^9, 3.672990346256729*^9}, {
3.672990423975267*^9, 3.672990436408061*^9}, {3.672990499382155*^9,
3.672990585060783*^9}, {3.6729906153279543`*^9, 3.672990793767149*^9}, {
3.672990847579688*^9, 3.6729908919538393`*^9}, {3.672990929525402*^9,
3.672991013013126*^9}, {3.672991062248621*^9, 3.672991149428299*^9}},
FontSize->14],
Cell[BoxData[
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"X", "+", "GNY"}], " ",
OverscriptBox["\[RightArrow]",
RowBox[{" ", "1.`", " "}]], " ", "XGNY"}], " ", ",",
RowBox[{"XGNY", " ",
OverscriptBox["\[RightArrow]",
RowBox[{" ", "1.`", " "}]], " ",
RowBox[{"X", "+", "GNY"}]}], " ", ",",
RowBox[{"XGNY", " ",
OverscriptBox["\[RightArrow]",
RowBox[{" ", "5.`", " "}]], " ",
RowBox[{"XGNY", "+", "TSY"}]}], " ", ",",
RowBox[{"TSY", " ",
OverscriptBox["\[RightArrow]",
RowBox[{" ", "1.`", " "}]], " ",
RowBox[{"TSY", "+", "Y"}]}], " ", ",",
RowBox[{"TSY", " ",
OverscriptBox["\[RightArrow]",
RowBox[{" ", "5.`", " "}]], " ", "null$269822"}], " ", ",",
RowBox[{"Y", " ",
OverscriptBox["\[RightArrow]",
RowBox[{" ", "1.`", " "}]], " ", "null$269822"}], " ", ",",