02-volume_highconc_noacc3d.mdl 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. /****************************************************************************
  2. * Test 02: All volume rxn types, simple test of equilibrium and reaction
  3. * rates, no accurate 3d reactions.
  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 = "02-volume_highconc_noacc3d"
  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. ACCURATE_3D_REACTIONS = FALSE
  36. PARTITION_X = [ [ -0.3 TO 0.3 STEP 0.025 ] ]
  37. PARTITION_Y = [ [ -0.3 TO 0.3 STEP 0.025 ] ]
  38. PARTITION_Z = [ [ -0.3 TO 0.3 STEP 0.025 ] ]
  39. ITERATIONS = iterations
  40. TIME_STEP = timestep
  41. TIME_STEP_MAX = 1.0
  42. INCLUDE_FILE = "volmols.mdl"
  43. DEFINE_REACTIONS {
  44. V_u -> I_u [rf_u] : fwd_u /* unimol */
  45. V_b1 + V_b2 -> I_b [rf_b] : fwd_b /* bimol */
  46. V_bt1 + V_bt2 -> I_bt [rf_b] : fwd_bt /* bimol (via trimol code) */
  47. V_b3 + V_b4to -> I_b2 [rf_b] : fwd_b2 /* bimol (1 target only) */
  48. V_bt3 + V_bt4to -> I_bt2 [rf_b] : fwd_bt2 /* bimol (1 target only, via trimol code) */
  49. V_t1 + V_t2 + V_t3 -> I_t [rf_t/5] : fwd_t /* trimol */
  50. V_t4 + V_t5to + V_t6 -> I_t2 [rf_t/5] : fwd_t2 /* trimol (1 target only) */
  51. V_t7 + V_t8to + V_t9to -> I_t3 [rf_t/5] : fwd_t3 /* trimol (2 target only) */
  52. I_u -> V_u [rr_u] : rev_u
  53. I_b -> V_b1 + V_b2 [rr_b] : rev_b
  54. I_bt -> V_bt1 + V_bt2 [rr_b] : rev_bt
  55. I_b2 -> V_b3 + V_b4to [rr_b] : rev_b2
  56. I_bt2 -> V_bt3 + V_bt4to [rr_b] : rev_bt2
  57. I_t -> V_t1 + V_t2 + V_t3 [rr_t/5] : rev_t
  58. I_t2 -> V_t4 + V_t5to + V_t6 [rr_t/5] : rev_t2
  59. I_t3 -> V_t7 + V_t8to + V_t9to [rr_t/5] : rev_t3
  60. /* Dummy reactions to trick mcell into using trimol. pathway for bimol rxn. */
  61. V_bt1 + V_a + V_a -> V_a [1e2]
  62. V_bt2 + V_a + V_a -> V_a [1e2]
  63. V_bt3 + V_a + V_a -> V_a [1e2]
  64. }
  65. main_box BOX
  66. {
  67. CORNERS = [-boxdims, -boxdims, -boxdims], [boxdims, boxdims, boxdims]
  68. }
  69. INSTANTIATE world OBJECT
  70. {
  71. main_box OBJECT main_box {}
  72. release_site_1r RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_u NUMBER_TO_RELEASE = num_u / 2 }
  73. release_site_1p RELEASE_SITE { SHAPE = world.main_box MOLECULE = I_u NUMBER_TO_RELEASE = num_u / 2 }
  74. /* V_b1 + V_b2 <-> I_b */
  75. release_site_2r1 RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_b1 NUMBER_TO_RELEASE = num_b / 2 }
  76. release_site_2r2 RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_b2 NUMBER_TO_RELEASE = num_b / 2 }
  77. release_site_2p RELEASE_SITE { SHAPE = world.main_box MOLECULE = I_b NUMBER_TO_RELEASE = num_b / 2 }
  78. /* V_bt1 + V_bt2 <-> I_bt */
  79. release_site_2tr1 RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_bt1 NUMBER_TO_RELEASE = num_b / 2 }
  80. release_site_2tr2 RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_bt2 NUMBER_TO_RELEASE = num_b / 2 }
  81. release_site_2tp RELEASE_SITE { SHAPE = world.main_box MOLECULE = I_bt NUMBER_TO_RELEASE = num_b / 2 }
  82. /* V_b3 + V_b4 <-> I_b2 */
  83. release_site_2r1t RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_b3 NUMBER_TO_RELEASE = num_b / 2 }
  84. release_site_2r2t RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_b4to NUMBER_TO_RELEASE = num_b / 2 }
  85. release_site_2pt RELEASE_SITE { SHAPE = world.main_box MOLECULE = I_b2 NUMBER_TO_RELEASE = num_b / 2 }
  86. /* V_bt3 + V_bt4 <-> I_bt2 */
  87. release_site_2tr1t RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_bt3 NUMBER_TO_RELEASE = num_b / 2 }
  88. release_site_2tr2t RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_bt4to NUMBER_TO_RELEASE = num_b / 2 }
  89. release_site_2tpt RELEASE_SITE { SHAPE = world.main_box MOLECULE = I_bt2 NUMBER_TO_RELEASE = num_b / 2 }
  90. /* V_t1 + V_t2 + V_t3 <-> I_t */
  91. release_site_3r1 RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_t1 NUMBER_TO_RELEASE = num_t / 2 }
  92. release_site_3r2 RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_t2 NUMBER_TO_RELEASE = num_t / 2 }
  93. release_site_3r3 RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_t3 NUMBER_TO_RELEASE = num_t / 2 }
  94. release_site_3p RELEASE_SITE { SHAPE = world.main_box MOLECULE = I_t NUMBER_TO_RELEASE = num_t / 2 }
  95. /* V_t4 + V_t5to + V_t6 <-> I_t2 */
  96. release_site_3r1t RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_t4 NUMBER_TO_RELEASE = num_t / 2 }
  97. release_site_3r2t RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_t5to NUMBER_TO_RELEASE = num_t / 2 }
  98. release_site_3r3t RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_t6 NUMBER_TO_RELEASE = num_t / 2 }
  99. release_site_3pt RELEASE_SITE { SHAPE = world.main_box MOLECULE = I_t2 NUMBER_TO_RELEASE = num_t / 2 }
  100. /* V_t7 + V_t8to + V_t9to <-> I_t3 */
  101. release_site_3r1tt RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_t7 NUMBER_TO_RELEASE = num_t / 2 }
  102. release_site_3r2tt RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_t8to NUMBER_TO_RELEASE = num_t / 2 }
  103. release_site_3r3tt RELEASE_SITE { SHAPE = world.main_box MOLECULE = V_t9to NUMBER_TO_RELEASE = num_t / 2 }
  104. release_site_3ptt RELEASE_SITE { SHAPE = world.main_box MOLECULE = I_t3 NUMBER_TO_RELEASE = num_t / 2 }
  105. }
  106. REACTION_DATA_OUTPUT {
  107. OUTPUT_BUFFER_SIZE = 50
  108. STEP = timestep*10
  109. HEADER = "# "
  110. {
  111. COUNT[V_u,world.main_box] : "V_u",
  112. COUNT[V_b1,world.main_box] : "V_b1",
  113. COUNT[V_b2,world.main_box] : "V_b2",
  114. COUNT[V_bt1,world.main_box] : "V_bt1",
  115. COUNT[V_bt2,world.main_box] : "V_bt2",
  116. COUNT[V_b3,world.main_box] : "V_b3",
  117. COUNT[V_b4to,world.main_box] : "V_b4",
  118. COUNT[V_bt3,world.main_box] : "V_bt3",
  119. COUNT[V_bt4to,world.main_box] : "V_bt4",
  120. COUNT[V_t1,world.main_box] : "V_t1",
  121. COUNT[V_t2,world.main_box] : "V_t2",
  122. COUNT[V_t3,world.main_box] : "V_t3",
  123. COUNT[V_t4,world.main_box] : "V_t4",
  124. COUNT[V_t5to,world.main_box] : "V_t5",
  125. COUNT[V_t6,world.main_box] : "V_t6",
  126. COUNT[V_t7,world.main_box] : "V_t7",
  127. COUNT[V_t8to,world.main_box] : "V_t8",
  128. COUNT[V_t9to,world.main_box] : "V_t9",
  129. COUNT[I_u,world.main_box] : "I_u",
  130. COUNT[I_b,world.main_box] : "I_b",
  131. COUNT[I_bt,world.main_box] : "I_bt",
  132. COUNT[I_b2,world.main_box] : "I_b2",
  133. COUNT[I_bt2,world.main_box] : "I_bt2",
  134. COUNT[I_t,world.main_box] : "I_t",
  135. COUNT[I_t2,world.main_box] : "I_t2",
  136. COUNT[I_t3,world.main_box] : "I_t3"
  137. } => countdir & "V_out.dat"
  138. {
  139. COUNT[fwd_u,WORLD] : "fwd_u",
  140. COUNT[fwd_b,WORLD] : "fwd_b",
  141. COUNT[fwd_bt,WORLD] : "fwd_bt",
  142. COUNT[fwd_b2,WORLD] : "fwd_b2",
  143. COUNT[fwd_bt2,WORLD] : "fwd_bt2",
  144. COUNT[fwd_t,WORLD] : "fwd_t",
  145. COUNT[fwd_t2,WORLD] : "fwd_t2",
  146. COUNT[fwd_t3,WORLD] : "fwd_t3",
  147. COUNT[rev_u,WORLD] : "rev_u",
  148. COUNT[rev_b,WORLD] : "rev_b",
  149. COUNT[rev_bt,WORLD] : "rev_bt",
  150. COUNT[rev_b2,WORLD] : "rev_b2",
  151. COUNT[rev_bt2,WORLD] : "rev_bt2",
  152. COUNT[rev_t,WORLD] : "rev_t",
  153. COUNT[rev_t2,WORLD] : "rev_t2",
  154. COUNT[rev_t3,WORLD] : "rev_t3"
  155. } => countdir & "rxn_out.dat"
  156. }