01-volume_highconc.mdl 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. /****************************************************************************
  2. * Test 01: All volume rxn types, simple test of equilibrium and reaction
  3. * rates.
  4. *
  5. * A quantitative test of the basic volume-volume reaction types (uni, bi,
  6. * tri). Note that the bi-directional pathways are in here twice. This is
  7. * so that they can be tested via both the non-trimolecular and trimolecular
  8. * code pathways. The latter is accomplished by adding a bogus trimolecular
  9. * reaction involving the relevant molecules.
  10. *
  11. * Author: Jed Wing <[email protected]>
  12. * Date: 2008-11-07
  13. ****************************************************************************/
  14. basename = "01-volume_highconc"
  15. countdir = "dat/" & basename & "/"
  16. vizdir = "./viz_dat/" & basename & "/"
  17. iterations = 10000
  18. timestep = 1e-6
  19. boxdims = 0.25
  20. voldiffconst = 2.0e-6
  21. num_u = 1000
  22. num_b = 1000
  23. num_t = 1000
  24. // Set reverse rates to expect approx 1 rxn every 10 timesteps
  25. rr_u = 2.0e2
  26. rr_b = 2.0e2
  27. rr_t = 2.0e2
  28. // Compute forward rates to give equilibrium of 50% reacted
  29. boxvol = 8*boxdims*boxdims*boxdims
  30. c_b = (num_b / 2. / boxvol) * 1e15 / 6.022e23
  31. c_t = (num_t / 2. / boxvol) * 1e15 / 6.022e23
  32. rf_u = rr_u
  33. rf_b = rr_b / c_b
  34. rf_t = rr_t / c_t / c_t
  35. PARTITION_X = [ [ -0.3 TO 0.3 STEP 0.025 ] ]
  36. PARTITION_Y = [ [ -0.3 TO 0.3 STEP 0.025 ] ]
  37. PARTITION_Z = [ [ -0.3 TO 0.3 STEP 0.025 ] ]
  38. ITERATIONS = iterations
  39. TIME_STEP = timestep
  40. TIME_STEP_MAX = 1.0
  41. INCLUDE_FILE = "volmols.mdl"
  42. DEFINE_REACTIONS {
  43. V_u -> I_u [rf_u] : fwd_u /* unimol */
  44. V_b1 + V_b2 -> I_b [rf_b] : fwd_b /* bimol */
  45. V_bt1 + V_bt2 -> I_bt [rf_b] : fwd_bt /* bimol (via trimol code) */
  46. V_b3 + V_b4to -> I_b2 [rf_b] : fwd_b2 /* bimol (1 target only) */
  47. V_bt3 + V_bt4to -> I_bt2 [rf_b] : fwd_bt2 /* bimol (1 target only, via trimol code) */
  48. V_t1 + V_t2 + V_t3 -> I_t [rf_t] : fwd_t /* trimol */
  49. V_t4 + V_t5to + V_t6 -> I_t2 [rf_t] : fwd_t2 /* trimol (1 target only) */
  50. V_t7 + V_t8to + V_t9to -> I_t3 [rf_t/3] : fwd_t3 /* trimol (2 target only) */
  51. I_u -> V_u [rr_u] : rev_u
  52. I_b -> V_b1 + V_b2 [rr_b] : rev_b
  53. I_bt -> V_bt1 + V_bt2 [rr_b] : rev_bt
  54. I_b2 -> V_b3 + V_b4to [rr_b] : rev_b2
  55. I_bt2 -> V_bt3 + V_bt4to [rr_b] : rev_bt2
  56. I_t -> V_t1 + V_t2 + V_t3 [rr_t] : rev_t
  57. I_t2 -> V_t4 + V_t5to + V_t6 [rr_t] : rev_t2
  58. I_t3 -> V_t7 + V_t8to + V_t9to [rr_t/3] : rev_t3
  59. /* Dummy reactions to trick mcell into using trimol. pathway for bimol rxn. */
  60. V_bt1 + V_a + V_a -> V_a [1e2]
  61. V_bt2 + V_a + V_a -> V_a [1e2]
  62. V_bt3 + V_a + V_a -> V_a [1e2]
  63. }
  64. main_box BOX
  65. {
  66. CORNERS = [-boxdims, -boxdims, -boxdims], [boxdims, boxdims, boxdims]
  67. }
  68. INSTANTIATE world OBJECT
  69. {
  70. main_box OBJECT main_box {}
  71. release_site_1r RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_u NUMBER_TO_RELEASE = num_u / 2 }
  72. release_site_1p RELEASE_SITE { SHAPE = world.main_box MOLECULE = I_u NUMBER_TO_RELEASE = num_u / 2 }
  73. /* V_b1 + V_b2 <-> I_b */
  74. release_site_2r1 RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_b1 NUMBER_TO_RELEASE = num_b / 2 }
  75. release_site_2r2 RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_b2 NUMBER_TO_RELEASE = num_b / 2 }
  76. release_site_2p RELEASE_SITE { SHAPE = world.main_box MOLECULE = I_b NUMBER_TO_RELEASE = num_b / 2 }
  77. /* V_bt1 + V_bt2 <-> I_bt */
  78. release_site_2tr1 RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_bt1 NUMBER_TO_RELEASE = num_b / 2 }
  79. release_site_2tr2 RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_bt2 NUMBER_TO_RELEASE = num_b / 2 }
  80. release_site_2tp RELEASE_SITE { SHAPE = world.main_box MOLECULE = I_bt NUMBER_TO_RELEASE = num_b / 2 }
  81. /* V_b3 + V_b4 <-> I_b2 */
  82. release_site_2r1t RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_b3 NUMBER_TO_RELEASE = num_b / 2 }
  83. release_site_2r2t RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_b4to NUMBER_TO_RELEASE = num_b / 2 }
  84. release_site_2pt RELEASE_SITE { SHAPE = world.main_box MOLECULE = I_b2 NUMBER_TO_RELEASE = num_b / 2 }
  85. /* V_bt3 + V_bt4 <-> I_bt2 */
  86. release_site_2tr1t RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_bt3 NUMBER_TO_RELEASE = num_b / 2 }
  87. release_site_2tr2t RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_bt4to NUMBER_TO_RELEASE = num_b / 2 }
  88. release_site_2tpt RELEASE_SITE { SHAPE = world.main_box MOLECULE = I_bt2 NUMBER_TO_RELEASE = num_b / 2 }
  89. /* V_t1 + V_t2 + V_t3 <-> I_t */
  90. release_site_3r1 RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_t1 NUMBER_TO_RELEASE = num_t / 2 }
  91. release_site_3r2 RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_t2 NUMBER_TO_RELEASE = num_t / 2 }
  92. release_site_3r3 RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_t3 NUMBER_TO_RELEASE = num_t / 2 }
  93. release_site_3p RELEASE_SITE { SHAPE = world.main_box MOLECULE = I_t NUMBER_TO_RELEASE = num_t / 2 }
  94. /* V_t4 + V_t5to + V_t6 <-> I_t2 */
  95. release_site_3r1t RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_t4 NUMBER_TO_RELEASE = num_t / 2 }
  96. release_site_3r2t RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_t5to NUMBER_TO_RELEASE = num_t / 2 }
  97. release_site_3r3t RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_t6 NUMBER_TO_RELEASE = num_t / 2 }
  98. release_site_3pt RELEASE_SITE { SHAPE = world.main_box MOLECULE = I_t2 NUMBER_TO_RELEASE = num_t / 2 }
  99. /* V_t7 + V_t8to + V_t9to <-> I_t3 */
  100. release_site_3r1tt RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_t7 NUMBER_TO_RELEASE = num_t / 2 }
  101. release_site_3r2tt RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_t8to NUMBER_TO_RELEASE = num_t / 2 }
  102. release_site_3r3tt RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_t9to NUMBER_TO_RELEASE = num_t / 2 }
  103. release_site_3ptt RELEASE_SITE { SHAPE = world.main_box MOLECULE = I_t3 NUMBER_TO_RELEASE = num_t / 2 }
  104. }
  105. REACTION_DATA_OUTPUT {
  106. OUTPUT_BUFFER_SIZE = 50
  107. STEP = timestep*10
  108. HEADER = "# "
  109. {
  110. COUNT[V_u,world.main_box] : "V_u",
  111. COUNT[V_b1,world.main_box] : "V_b1",
  112. COUNT[V_b2,world.main_box] : "V_b2",
  113. COUNT[V_bt1,world.main_box] : "V_bt1",
  114. COUNT[V_bt2,world.main_box] : "V_bt2",
  115. COUNT[V_b3,world.main_box] : "V_b3",
  116. COUNT[V_b4to,world.main_box] : "V_b4",
  117. COUNT[V_bt3,world.main_box] : "V_bt3",
  118. COUNT[V_bt4to,world.main_box] : "V_bt4",
  119. COUNT[V_t1,world.main_box] : "V_t1",
  120. COUNT[V_t2,world.main_box] : "V_t2",
  121. COUNT[V_t3,world.main_box] : "V_t3",
  122. COUNT[V_t4,world.main_box] : "V_t4",
  123. COUNT[V_t5to,world.main_box] : "V_t5",
  124. COUNT[V_t6,world.main_box] : "V_t6",
  125. COUNT[V_t7,world.main_box] : "V_t7",
  126. COUNT[V_t8to,world.main_box] : "V_t8",
  127. COUNT[V_t9to,world.main_box] : "V_t9",
  128. COUNT[I_u,world.main_box] : "I_u",
  129. COUNT[I_b,world.main_box] : "I_b",
  130. COUNT[I_bt,world.main_box] : "I_bt",
  131. COUNT[I_b2,world.main_box] : "I_b2",
  132. COUNT[I_bt2,world.main_box] : "I_bt2",
  133. COUNT[I_t,world.main_box] : "I_t",
  134. COUNT[I_t2,world.main_box] : "I_t2",
  135. COUNT[I_t3,world.main_box] : "I_t3"
  136. } => countdir & "V_out.dat"
  137. {
  138. COUNT[fwd_u,WORLD] : "fwd_u",
  139. COUNT[fwd_b,WORLD] : "fwd_b",
  140. COUNT[fwd_bt,WORLD] : "fwd_bt",
  141. COUNT[fwd_b2,WORLD] : "fwd_b2",
  142. COUNT[fwd_bt2,WORLD] : "fwd_bt2",
  143. COUNT[fwd_t,WORLD] : "fwd_t",
  144. COUNT[fwd_t2,WORLD] : "fwd_t2",
  145. COUNT[fwd_t3,WORLD] : "fwd_t3",
  146. COUNT[rev_u,WORLD] : "rev_u",
  147. COUNT[rev_b,WORLD] : "rev_b",
  148. COUNT[rev_bt,WORLD] : "rev_bt",
  149. COUNT[rev_b2,WORLD] : "rev_b2",
  150. COUNT[rev_bt2,WORLD] : "rev_bt2",
  151. COUNT[rev_t,WORLD] : "rev_t",
  152. COUNT[rev_t2,WORLD] : "rev_t2",
  153. COUNT[rev_t3,WORLD] : "rev_t3"
  154. } => countdir & "rxn_out.dat"
  155. }