constants.rst 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. .. _api-constants:
  2. *******************
  3. Enums and Constants
  4. *******************
  5. Orientation
  6. ===========
  7. | Orientation of a Complex.
  8. * | **DOWN** = -1
  9. * | **NONE** = 0
  10. * | **UP** = 1
  11. * | **NOT_SET** = 2
  12. * | **ANY** = 3
  13. * | **DEFAULT** = 4
  14. | Value DEFAULT means NONE for volume complexes and UP for surface complexes.
  15. Notification
  16. ============
  17. * | **NONE** = 0
  18. * | **BRIEF** = 1
  19. * | **FULL** = 2
  20. WarningLevel
  21. ============
  22. * | **IGNORE** = 0
  23. | Do something sensible and continue silently.
  24. * | **WARNING** = 1
  25. | Do something sensible but emit a warning message.
  26. * | **ERROR** = 2
  27. | Treat the warning as an error and stop.
  28. VizMode
  29. =======
  30. * | **ASCII** = 0
  31. | Readable molecule visualization output.
  32. * | **CELLBLENDER_V1** = 1
  33. | Binary molecule visualization output used by MCell3, format v1.
  34. | Allows only limited length of species name (256 chars) and
  35. | does not contain molecule IDs.
  36. * | **CELLBLENDER** = 2
  37. | Binary molecule visualization output, format v2.
  38. Shape
  39. =====
  40. * | **UNSET** = 0
  41. * | **SPHERICAL** = 1
  42. * | **REGION_EXPR** = 2
  43. * | **LIST** = 3
  44. * | **COMPARTMENT** = 4
  45. SurfacePropertyType
  46. ===================
  47. * | **UNSET** = 0
  48. * | **REACTIVE** = 1
  49. | This surface class does not do anything by itself, but it can be used as a reactant in
  50. | reaction rules.
  51. * | **REFLECTIVE** = 2
  52. | If used as a surface property for a volume molecule it is reflected by any surface with
  53. | this surface class. This is the default behavior for volume molecules.
  54. | If used for a surface molecule it is reflected by the border of the
  55. | surface with this surface class.
  56. | Setting orientation in affected_complex_pattern allows selective reflection of volume
  57. | molecules from only the front or back of a surface or selective reflection of surface
  58. | molecules with only a certain orientation from the surface’s border.
  59. | Using m.ALL_MOLECULES as affected_complex_pattern has the effect that all
  60. | volume molecules are reflected by surfaces with this surface class and all surface molecules
  61. | are reflected by the border of the surfaces with this surface class.
  62. | Using m.ALL_VOLUME_MOLECULES as affected_complex_pattern has the effect that all
  63. | volume molecules are reflected by surfaces with this surface class.
  64. | Using m.ALL_SURFACE_MOLECULES as affected_complex_pattern has the effect that all
  65. | surface molecules are reflected by the border of the surface with this surface class.
  66. * | **TRANSPARENT** = 3
  67. | If used as a surface property for a volume molecule it passes through all surfaces with
  68. | this surface class.
  69. | If used for a surface molecule it passes through the border of the surface with this surface
  70. | class. This is the default behavior for surface molecules.
  71. | Setting orientation in affected_complex_pattern allows selective transparency of volume
  72. | molecules from only the front or back of a surface or selective transparency for surface
  73. | molecules with only a certain orientation from the surface’s border.
  74. | To make a surface with this surface class transparent to all volume molecules,
  75. | use m.ALL_VOLUME_MOLECULES for affected_complex_pattern.
  76. | To make a border of the surface with this surface class transparent to all surface molecules,
  77. | use m.ALL_SURFACE_MOLECULES for the affected_complex_pattern.
  78. | Using m.ALL_MOLECULES for affected_complex_pattern has the effect that surfaces with this surface class
  79. | are transparent to all volume molecules and borders of the surfaces with this surface class are
  80. | transparent to all surface molecules.
  81. * | **ABSORPTIVE** = 4
  82. | If affected_complex_pattern refers to a volume molecule it is destroyed if it touches surfaces with this surface class.
  83. | If affected_complex_pattern refers to a surface molecule it is destroyed if it touches the border of the surface with
  84. | this surface class, i.e., it is allowed to release surface molecules on absorptive surfaces, they get destroyed only
  85. | when they touch the border of this surface.
  86. | Tick marks on name allow destruction from only one side of the surface for volume molecules or selective destruction
  87. | for surface molecules on the surfaces’s border based on their orientation.
  88. | To make a surface with this surface class absorptive to all volume molecules, m.ALL_VOLUME_MOLECULES
  89. | can be used for affected_complex_pattern.
  90. | To make a border of the surface with this surface class absorptive to all surface molecules,
  91. | m.ALL_SURFACE_MOLECULES can be used for name.
  92. | Using m.ALL_MOLECULES as affected_complex_pattern has the effect that surfaces with this surface
  93. | class are absorptive for all volume molecules and borders of the surfaces with this surface class
  94. | are absorptive for all surface molecules.
  95. * | **CONCENTRATION_CLAMP** = 5
  96. | Clamps concentration at a surface by periodically releasing molecules that correspond
  97. | to the wall being a transparent boundary to the area with given concentration,
  98. | and by absorbing all molecules that hit this surface.
  99. | The molecules matching affected_complex_pattern are destroyed if they touch the surface (as if they
  100. | had passed through), and new molecules are created at the surface, as if molecules had passed through
  101. | from the other side at a concentration value (units = M).
  102. | Orientation marks may be used; in this case, the other side of the surface is reflective.
  103. | Note that this command is only used to set the effective concentration of a volume molecule at a surface;
  104. | it is not valid to specify a surface molecule.
  105. * | **FLUX_CLAMP** = 6
  106. | Clamps flux at a surface by periodically releasing molecules that correspond
  107. | to the wall being a transparent boundary to the area with given concentration.
  108. | The clamped surface reflects these molecules.
  109. ExprNodeType
  110. ============
  111. | Used internally to represent expression trees.
  112. * | **UNSET** = 0
  113. * | **LEAF** = 1
  114. * | **ADD** = 2
  115. * | **SUB** = 3
  116. RegionNodeType
  117. ==============
  118. | Used internally to represent region trees.
  119. * | **UNSET** = 0
  120. * | **LEAF_GEOMETRY_OBJECT** = 1
  121. * | **LEAF_SURFACE_REGION** = 2
  122. * | **UNION** = 3
  123. * | **DIFFERENCE** = 4
  124. * | **INTERSECT** = 5
  125. ReactionType
  126. ============
  127. | Used in reaction callbacks.
  128. * | **UNSET** = 0
  129. * | **UNIMOL_VOLUME** = 1
  130. * | **UNIMOL_SURFACE** = 2
  131. * | **VOLUME_VOLUME** = 3
  132. * | **VOLUME_SURFACE** = 4
  133. * | **SURFACE_SURFACE** = 5
  134. MoleculeType
  135. ============
  136. | Used in molecule introspection and internally in checkpointing.
  137. * | **UNSET** = 0
  138. * | **VOLUME** = 1
  139. * | **SURFACE** = 2
  140. BNGSimulationMethod
  141. ===================
  142. | Specifies simulation method in exported BNGL, used in Model.export_to_bngl.
  143. * | **NONE** = 0
  144. * | **ODE** = 1
  145. * | **SSA** = 2
  146. * | **PLA** = 3
  147. * | **NF** = 4
  148. CountOutputFormat
  149. =================
  150. * | **UNSET** = 0
  151. | Invalid value.
  152. * | **AUTOMATIC_FROM_EXTENSION** = 1
  153. | Output format is determined fom extension - .dat selects DAT file format
  154. | and .gdat selects GDAT file format.
  155. * | **DAT** = 2
  156. | A two-column file with columns time and observable value is created.
  157. | Each count must have its own unique file name.
  158. * | **GDAT** = 3
  159. | A multi-column file with time and observable values is created.
  160. | The first line of the file is a header that starts with a comment
  161. | character followed by time and then by the observable names.
  162. | The order of observables is given by the order in which they were added
  163. | to the model.
  164. | Can specify the same output file name for multiple observables.
  165. Constants
  166. =========
  167. * | **STATE_UNSET**: str = STATE_UNSET
  168. * | **STATE_UNSET_INT**: int = -1
  169. * | **BOND_UNBOUND**: int = -1
  170. | Represents cases when a component must not be bound in a pattern.
  171. * | **BOND_BOUND**: int = -2
  172. | Represents bond type !+ in a pattern.
  173. * | **BOND_ANY**: int = -3
  174. | Represents bond type !? in a pattern.
  175. * | **PARTITION_EDGE_EXTRA_MARGIN_UM**: float = 0.01
  176. | Internal constant used to match partition setup when comparing models against their MDL variant.
  177. * | **DEFAULT_COUNT_BUFFER_SIZE**: int = 100
  178. | Internal constant used to initialize buffer size for molecule and reaction counts.
  179. * | **ALL_MOLECULES**: str = ALL_MOLECULES
  180. * | **ALL_VOLUME_MOLECULES**: str = ALL_VOLUME_MOLECULES
  181. * | **ALL_SURFACE_MOLECULES**: str = ALL_SURFACE_MOLECULES
  182. * | **DEFAULT_CHECKPOINTS_DIR**: str = checkpoints
  183. * | **DEFAULT_SEED_DIR_PREFIX**: str = seed_
  184. * | **DEFAULT_SEED_DIR_DIGITS**: int = 5
  185. * | **DEFAULT_ITERATION_DIR_PREFIX**: str = it_
  186. * | **AllMolecules**: Species = AllMolecules
  187. * | **AllVolumeMolecules**: Species = AllVolumeMolecules
  188. * | **AllSurfaceMolecules**: Species = AllSurfaceMolecules
  189. * | **ID_INVALID**: int = -1
  190. * | **NUMBER_OF_TRAINS_UNLIMITED**: int = -1
  191. * | **TIME_INFINITY**: float = 1e140
  192. * | **INT_UNSET**: int = INT32_MAX
  193. | This is a special integer value that means that an argument was not set,
  194. | its value is 2147483647.
  195. * | **FLT_UNSET**: float = FLT_MAX
  196. | This is a special floating-point value that means that an argument was not set,
  197. | its value is 3.40282346638528859812e+38F.
  198. * | **RNG_SIZE**: int = 256
  199. | Size of arrays of