subsystem.yaml 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690
  1. ComponentType:
  2. superclass: BaseDataClass
  3. doc:
  4. Multiple functional attributes for each molecule type are described using
  5. components. And this class defines a type of a component.
  6. For example, proteins have multiple functional substructures such as
  7. domains, motifs, and binding sites. These components can be unchanging
  8. (called stateless) or exist in one of many different internal states
  9. For example, certain binding motifs may have different behaviors depending
  10. on whether they are unphosphorylated or phosphorylated.
  11. examples: tests/pymcell4_positive/0040_to_bngl_str/model.py
  12. items:
  13. - name: name
  14. type: str
  15. doc: Name of this component type.
  16. - name: states
  17. type: List[str]
  18. default: empty
  19. doc: List of states allowed by this component.
  20. methods:
  21. - name: inst
  22. doc: Instantiate a component from this component type.
  23. return_type: Component*
  24. params:
  25. - name: state
  26. type: str
  27. default: STATE_UNSET
  28. doc: Selected state, must be from the list of the allowed states.
  29. - name: bond
  30. type: int
  31. default: BOND_UNBOUND
  32. doc: Bond information for the created component instance.
  33. - name: inst
  34. doc: Instantiate a component from this component type.
  35. return_type: Component*
  36. params:
  37. - name: state
  38. type: int
  39. default: STATE_UNSET_INT
  40. doc: Selected state, must be from the list of the allowed, converted to string.
  41. - name: bond
  42. type: int
  43. default: BOND_UNBOUND
  44. doc: Bond information for the created component instance.
  45. - name: to_bngl_str
  46. return_type: str
  47. doc: Creates a string that corresponds to its BNGL representation.
  48. is_const: true
  49. Component:
  50. superclass: BaseDataClass
  51. doc: |
  52. Instance of a component type belonging to a molecule instance.
  53. A component instance must have its state set if there is at least one allowed state.
  54. It is also used to connect molecule instance in a complex instance through bonds.
  55. examples: tests/pymcell4_positive/0040_to_bngl_str/model.py
  56. items:
  57. - name: component_type
  58. type: ComponentType*
  59. doc: Reference to a component type.
  60. - name: state
  61. type: str
  62. default: STATE_UNSET
  63. doc: Specific state value of this component instance.
  64. - name: bond
  65. type: int
  66. default: BOND_UNBOUND
  67. doc: |
  68. Specific bond for this component instance.
  69. It is either a numberical value such as in A(c!1),
  70. or one of special values BOND_UNBOUND in A(c),
  71. BOND_BOUND in A(c!+) or BOND_ANY in A(c!?).
  72. methods:
  73. - name: to_bngl_str
  74. return_type: str
  75. doc: Creates a string that corresponds to this component's BNGL representation.
  76. is_const: true
  77. ElementaryMoleculeType:
  78. todo: |
  79. How can we share members such as diff const between this class and Species?
  80. custom_time_step, custom_space_step and target_only are currently supported
  81. only when used in Species
  82. superclass: BaseDataClass
  83. doc: |
  84. An elementary molecule type is a base indivisible entity. It is the same as
  85. a molecule type in BNGL entered in section molecule types.
  86. The 'elementary' prefix was added to distinguish it clearly from molecules in
  87. simulation.
  88. examples: tests/pymcell4_positive/0040_to_bngl_str/model.py
  89. items:
  90. - name: name
  91. type: str
  92. doc: Name of this elementary molecule type.
  93. - name: components
  94. type: List[ComponentType*]
  95. default: empty
  96. doc: List of components used by this elementary molecule type.
  97. - name: diffusion_constant_2d
  98. type: float
  99. default: unset
  100. doc: |
  101. Elementary molecule based on this type is constrained to a surface
  102. and diffuses with the specified diffusion constant.
  103. D can be zero, in which case the molecule doesn’t move.
  104. The units of D are cm^2 /s.
  105. - name: diffusion_constant_3d
  106. type: float
  107. default: unset
  108. doc: |
  109. Elementary molecule based on this type diffuses in space with the
  110. specified diffusion constant D.
  111. D can be zero, in which case the molecule doesn’t move.
  112. The units of D are cm^2 /s.
  113. - name: custom_time_step
  114. type: float
  115. default: unset
  116. doc: |
  117. This molecule should take timesteps of length custom_time_step (in seconds).
  118. Use either this or custom_time_step, not both.
  119. - name: custom_space_step
  120. type: float
  121. default: unset
  122. doc: |
  123. This molecule should take steps of average length given by the custom_space_step value (in microns).
  124. Use either this or custom_time_step, not both.
  125. - name: target_only
  126. type: bool
  127. default: False
  128. doc: |
  129. This molecule will not initiate reactions when it runs into other molecules. This
  130. setting can speed up simulations when applied to a molecule at high concentrations
  131. that reacts with a molecule at low concentrations (it is more efficient for
  132. the low-concentration molecule to trigger the reactions). This directive does
  133. not affect unimolecular reactions.
  134. methods:
  135. - name: inst
  136. return_type: ElementaryMolecule*
  137. doc: Create an elementary molecule based on this elementary molecule type.
  138. params:
  139. - name: components
  140. type: List[Component*]
  141. default: empty
  142. doc: |
  143. Instances of components for the the created elementary molecule.
  144. Not all components need to be specified in case when the elementary
  145. molecule is used in a pattern.
  146. - name: compartment_name
  147. type: str
  148. default: unset
  149. doc: |
  150. Optional specification of compartment name for the created elementary molecule.
  151. - name: to_bngl_str
  152. return_type: str
  153. doc: Creates a string that corresponds to its BNGL representation.
  154. is_const: true
  155. ElementaryMolecule:
  156. superclass: BaseDataClass
  157. doc:
  158. Instance of an elementary molecule type. A BNGL complex is composed of
  159. elementary molecules.
  160. examples: tests/pymcell4_positive/0040_to_bngl_str/model.py
  161. items:
  162. - name: elementary_molecule_type
  163. type: ElementaryMoleculeType*
  164. doc: Reference to the type of this elementary molecule.
  165. - name: components
  166. type: List[Component*]
  167. default: empty
  168. doc: |
  169. List of component instances. Not all components need to be specified
  170. in case when this elementary molecule is used in a pattern.
  171. - name: compartment_name
  172. type: str
  173. default: unset
  174. doc:
  175. Optional BNGL compartment name for this elemenrary molecule.
  176. If a 2D/surface compartment is specified, the elementary moelcule must be of surface type.
  177. If a 3D/volume compartment is specified, the elementary moelcule must be of volume type.
  178. methods:
  179. - name: to_bngl_str
  180. return_type: str
  181. doc: Creates a string that corresponds to its BNGL representation
  182. is_const: true
  183. params:
  184. - name: with_compartment
  185. type: bool
  186. default: true
  187. doc: Include compartment name in the returned BNGL string.
  188. Complex:
  189. superclass: BaseDataClass
  190. doc: |
  191. This class represents a complex molecule composed of molecule instances.
  192. It is either defined using a BNGL string or using a list of elementary molecule instances.
  193. On top of that, orientation may be defined.
  194. This class is most often by calling its constructor as m.Complex(bngl_string) in cases where a
  195. fully qualified instance (such as for molecule releases) or a pattern (in observable counts) is needed.
  196. Comparison operator __eq__ first converts complexes to their canonical representation and
  197. then does comparison so for instance m.Complex('A(b!1).B(a!1)') == m.Complex('B(a!2).A(b!2)').
  198. examples: tests/pymcell4_positive/0040_to_bngl_str/model.py
  199. internal: |
  200. Ctor Species(Complex& cplx_inst) must be updated if if attributes change
  201. items:
  202. - name: name
  203. type: str
  204. default: empty
  205. doc: |
  206. When set, this complex instance is initialized from a BNGL string passed as this argument,
  207. the string is parsed and elementary_molecules and compartment are initialized.
  208. Only one of name or elementary_molecules can be set.
  209. - name: elementary_molecules
  210. type: List[ElementaryMolecule*]
  211. default: empty
  212. doc: |
  213. Individual molecule instances contained in the complex.
  214. Only one of name or elementary_molecules can be set.
  215. - name: orientation
  216. type: Orientation
  217. default: Orientation.DEFAULT
  218. doc: |
  219. Specifies orientation of a molecule.
  220. When Orientation.DEFAULT if kept then during model initialization is
  221. 'orientation' set to Orientation.NONE for volume complexes and to
  222. Orientation.UP for surface complexes.
  223. Ignored by derived class Species.
  224. - name: compartment_name
  225. type: str
  226. default: unset
  227. doc: |
  228. Specifies compartment name of this Complex.
  229. Only one of 'orientation' and 'compartment_name' can be set.
  230. Corresponds to BNGL specification of a compartment for the whole complex '@COMP\:'.
  231. If a 2D/surface compartment is specified, the complex must be a surface complex and
  232. orientation is set to Orientation.UP.
  233. If a 3D/volume compartment is specified, the complex must be a volume complex and
  234. orientation is set to Orientation.NONE.
  235. Sets compartment to all elementary molecules whose compartment is unset. Does not override
  236. specific compartments of elementary molecules that were already set.
  237. If this is a volume complex (all elementary molecules have their diffusion_constant_3d set),
  238. all compartments of elementary molecules must be the same volume compartment.
  239. If this is a surface complex (at least one elementary molecule has its their diffusion_constant_2d
  240. set), all compartments of surface elementary molecules must be the same, and
  241. all compartments of volume elementary molecules must be from the two neighboring
  242. volume compartments.
  243. methods:
  244. - name: to_bngl_str
  245. return_type: str
  246. doc: Creates a string that corresponds to its BNGL representation including compartments.
  247. is_const: true
  248. - name: as_species
  249. return_type: Species*
  250. doc: |
  251. Returns a Species object based on this Complex. All species-specific
  252. attributes are set to their default values and 'name' is set to value returned by
  253. 'to_bngl_str()'.
  254. Species:
  255. superclass: Complex
  256. TODO: |
  257. Ignore orientation when comparing species on equality.
  258. doc: |
  259. There are three ways how to use this class\:
  260. 1) definition of simple species - in this case 'name' is
  261. a single identifier and at least 'diffusion_constant_2d' or
  262. 'diffusion_constant_3d' must be provided.
  263. Example\: m.Species('A', diffusion_constant_3d=1e-6).
  264. Such a definition must be added to subsystem or model so that
  265. during model initialization this species is transformed to MCell
  266. representation and an ElementaryMoleculeType 'A' with a given
  267. diffusion constant is created as well.
  268. 2) full definition of complex species - in this case the
  269. inherited attribute 'elementary_molecules' from Complex
  270. is used as a definition of the complex and this gives information
  271. on diffusion constants of the used elementary molecules.
  272. Example\: m.Species(elementary_molecules=[ei1, ei2]).
  273. Such a definition must be added to subsystem or model.
  274. 3) declaration of species - in this case only 'name' in the form of
  275. an BNGL string is provided. The complex instance specified by the name
  276. must be fully qualified (i.e. all components are present and those
  277. components that have a state have their state set).
  278. No information on diffusion constants and other properties of
  279. used elementary molecules is provided, it must be provided elsewhere.
  280. Example\: m.Species('A(b!1).B(a!1)').
  281. This is a common form of usage when reaction rules are provided in a BNGL file.
  282. Such declaration does no need to be added to subsystem or model.
  283. This form is used as argument in cases where a fully qualified instance
  284. must be provided such as in molecule releases.
  285. examples: tests/pymcell4_positive/0040_to_bngl_str/model.py
  286. items:
  287. - name: name
  288. type: str
  289. default: unset
  290. doc: |
  291. Name of the species in the BNGL format.
  292. One must either specify name or elementary_molecules (inherited from Complex).
  293. This argument name is parsed during model initialization.
  294. - name: diffusion_constant_2d
  295. type: float
  296. default: unset
  297. doc: |
  298. This molecule is constrained to surface with diffusion constant D.
  299. D can be zero, in which case the molecule doesn’t move.
  300. The units of D are cm^2/s.
  301. - name: diffusion_constant_3d
  302. type: float
  303. default: unset # the value is optional and might need to be checked with a more complex check
  304. doc: |
  305. This molecule diffuses in space with diffusion constant D.
  306. D can be zero, in which case the molecule doesn’t move.
  307. The units of D are cm^2/s.
  308. - name: custom_time_step
  309. type: float
  310. default: unset
  311. doc: |
  312. Optional setting of a custom time step for this specific species.
  313. A molecule of this species should take timesteps of length custom_time_step (in seconds).
  314. Use either this or custom_time_step.
  315. - name: custom_space_step
  316. type: float
  317. default: unset
  318. doc: |
  319. Optional setting of a custom space step for this specific species.
  320. A molecule of this species should take steps of average length custom_space_step (in microns).
  321. Use either this or custom_time_step.
  322. - name: target_only
  323. type: bool
  324. default: False
  325. doc: |
  326. A molecule of this species will not initiate reactions when it runs into other molecules. This
  327. setting can speed up simulations when applied to a molecule at high concentrations
  328. that reacts with a molecule at low concentrations (it is more efficient for
  329. the low-concentration molecule to trigger the reactions). This directive does
  330. not affect unimolecular reactions.
  331. methods:
  332. - name: inst
  333. return_type: Complex*
  334. doc: |
  335. Creates a copy of a Complex from this Species with specified orientation and compartment name.
  336. params:
  337. - name: orientation
  338. type: Orientation
  339. default: Orientation.DEFAULT
  340. doc: Maximum one of orientation or compartment_name can be set, not both.
  341. - name: compartment_name
  342. type: str
  343. default: unset
  344. doc: Maximum one of orientation or compartment_name can be set, not both.
  345. SurfaceProperty:
  346. superclass: BaseDataClass
  347. doc: Single property for a SurfaceClass.
  348. items:
  349. - name: type
  350. type: SurfacePropertyType
  351. default: SurfacePropertyType.UNSET
  352. doc: |
  353. Must be set. See SurfacePropertyType for options.
  354. todo: Links in documentation
  355. - name: affected_complex_pattern
  356. type: Complex*
  357. default: unset
  358. doc: |
  359. A complex pattern with optional orientation must be set.
  360. Default orientation means that the pattern matches any orientation.
  361. For concentration or flux clamp the orientation specifies on which side
  362. will be the concentration held (UP is front or outside, DOWN is back or
  363. inside, and DEFAULT, ANY or NONE is on both sides).
  364. The complex pattern must not use compartments.
  365. - name: concentration
  366. type: float
  367. default: unset
  368. doc: |
  369. Specifies concentration when type is SurfacePropertyType.CLAMP_CONCENTRATION or
  370. SurfacePropertyType.CLAMP_FLUX. Represents concentration of the imagined opposide side
  371. of the wall that has this concentration or flux clamped.
  372. SurfaceClass:
  373. superclass: SurfaceProperty
  374. doc: |
  375. Defining a surface class allows surfaces to behave like species. For instance, one may wish
  376. to specify that a surface does not block the diffusion of molecules. Each type of surface is defined
  377. by name, and each surface name must be unique in the simulation and should not match any molecule names.
  378. To define a reaction with a surface class, use constructor call m.Complex(name) as one of the reactants.
  379. examples: tests/pymcell4/1600_crossing_transparent_compartment_wall/model.py tests/pymcell4_positive/1840_vol_plus_surf_class_rxn_callback/model.py
  380. items:
  381. - name: name
  382. type: str
  383. doc: Name of the surface class.
  384. - name: properties
  385. type: List[SurfaceProperty*]
  386. default: empty
  387. doc: |
  388. A surface class can either have a list of properties or just one property.
  389. In the usual case of having one property, one can set the attributes
  390. type, affected_species, etc. inherited from SurfaceProperty directly.
  391. ReactionRule:
  392. superclass: BaseDataClass
  393. doc: |
  394. Represents a BioNetGen Language (BNGL) reaction rule.
  395. In BNGL, a reaction is simply one or more transformations
  396. applied simultaneously to one or more species. The following
  397. transformations (and their combinations) are allowed\:
  398. * Forming a bond, e.g. A(b) + B(a) -> A(b!0).B(a!0)
  399. * Breaking a bond, e.g. A(b!0).B(a!0)-> A(b)+ B(a)
  400. * Changing of component state, e.g. X(y~0) -> X(y~p)
  401. * Creating a molecule, e.g. A(b) -> A(b) + C(d)
  402. * Destroying a molecule, e.g. A(b) + B(a) -> A(b) or A -> Null
  403. (Null here means that there is no product)
  404. * Changing species of a bound molecule when the molecule type has the
  405. same components, e.g. A(b!0).B(a!0)-> A(b!0).C(a!0)
  406. Also compartments may be specified in reactants (patterns) and for products.
  407. Special compartment classes supported by MCell4 are @IN and @OUT.
  408. They can be used in surface reactions to constrain a reaction with a volume molecule
  409. hitting a surface molecule from the inside or outside of the compartment,
  410. e.g. A(s)@IN + S(a) -> S(a!1).A(s!1) and/or to define the location of the
  411. product, e.g. S(a!1).A(s!1) -> S(a) + A(s)@OUT.
  412. examples: tests/pymcell4_positive/0040_to_bngl_str/model.py tests/pymcell4_positive/1840_vol_plus_surf_class_rxn_callback/model.py
  413. items:
  414. - name: name
  415. type: str
  416. default: unset
  417. doc: |
  418. Name of the reaction. If this is a reversible reaction, then it is the name of the
  419. reaction in forward direction.
  420. - name: reactants
  421. type: List[Complex*]
  422. default: empty # must be set, but C++ ordering of arguments requires that all defaults are at the end
  423. doc: List of reactant patterns. Must contain one or two patterns.
  424. - name: products
  425. type: List[Complex*]
  426. default: empty
  427. doc: List of reactant patterns. May be empty.
  428. - name: fwd_rate
  429. type: float
  430. default: unset
  431. examples: tests/pymcell4/2500_rxn_rate_change_bimol_box_it_100/model.py tests/pymcell4/2700_concentration_based_rxn_rate/model.py
  432. doc: |
  433. The units of the reaction rate for uni- and bimolecular reactions are\:
  434. * [s^-1] for unimolecular reactions,
  435. * [N^-1*s^-1] bimolecular reactions between two surface molecules on different objects
  436. (this is a highly experimental feature and the unit will likely change in the future,
  437. not sure if probability is computed correctly, it works the way that the surface molecule
  438. is first diffused and then a potential collisions within the distance of Config.intermembrane_interaction_radius
  439. are evaluated).
  440. Other bimolecular reaction units depend on Model.config.use_bng_units settings.
  441. When use_bng_units is False (default), traditional MCell units are used:
  442. * [M^-1*s^-1] for bimolecular reactions between either two volume molecules, a volume molecule
  443. and a surface (molecule),
  444. * [um^2*N^-1*s^-1] bimolecular reactions between two surface molecules on the same surface, and
  445. When use_bng_units is True, units compatible with BioNetGen's ODE, SSA, and PLA solvers are used:
  446. * [um^3*N^-1*s^-1] for any bimolecular reactions, surface-surface reaction rate conversion assumes 10nm membrane thickness.
  447. M is the molarity of the solution and N the number of reactants.
  448. May be changed after model initialization.
  449. Setting of value is ignored if the rate does not change.
  450. If the new value differs from previous, updates all information related
  451. to the new rate including recomputation of reaction times for molecules if this is a
  452. unimolecular reaction.
  453. - name: rev_name
  454. type: str
  455. default: unset
  456. doc: |
  457. Name of the reaction in reverse direction.
  458. - name: rev_rate
  459. type: float
  460. default: unset
  461. doc: |
  462. Reverse reactions rate, reaction is unidirectional when not specified.
  463. May be changed after model initialization, in the case behaves the same was as for
  464. changing the 'fwd_rate'.
  465. Uses the same units as 'fwd_rate'.
  466. - name: variable_rate
  467. type: List[List[float]]
  468. default: empty
  469. doc: |
  470. The array passed as this argument must have as its items a pair of floats (time in s, rate).
  471. Must be sorted by time (this is not checked).
  472. Variable rate is applicable only for irreversible reactions.
  473. When simulation starts and the table does not contain value for time 0, the initial fwd_rate is set to 0.
  474. When time advances after the last time in this table, the last rate is used for all subsequent iterations.
  475. Members fwd_rate and rev_rate must not be set when setting this attribute through a constructor.
  476. When this attribute is set outside of the class constructor, fwd_rate is automatically reset to an 'unset' value.
  477. Cannot be set after model initialization.
  478. - name: is_intermembrane_surface_reaction
  479. type: bool
  480. default: false
  481. doc: |
  482. Experimental, see addintinal explanation in 'fwd' rate.
  483. Then set to true, this is a special type of surface-surface reaction that
  484. allows for two surface molecules to react when they are on different geometrical objects.
  485. Note\: This support is limited for now, the reaction rule must be in the form of A + B -> C + D
  486. where all reactants and products must be surface molecules and their orientation must be 'any' (default).
  487. examples: tests/pymcell4/3000_intermembrane_rxns/customization.py
  488. todo: not sure whether we should allow this rxn also for standard surf-surf rxns
  489. methods:
  490. - name: to_bngl_str
  491. return_type: str
  492. doc: Creates a string that corresponds to the reaction rule's BNGL representation, does not contain rates.
  493. is_const: true
  494. Subsystem:
  495. doc: |
  496. Subsystem usually defines a reaction network. It is a collection of
  497. species and reaction rules that use these species.
  498. The main motivation for introducing such an object to MCell4 is to have
  499. a class independent on that particular initial model state and observables that
  500. only contains reactions. This way, one can define independent reusable subsystems
  501. and possibly merge them together when creating a model that includes multiple reaction
  502. networks.
  503. examples: tests/pymcell4/2550_variable_rate_unimol_w_rxn_class_cleanup/sybsystem.py
  504. items:
  505. - name: species
  506. type: List[Species*]
  507. default: empty
  508. doc: |
  509. List of species to be included in the model for initialization.
  510. Used usually only for simple species (species that are defined using a
  511. single molecule type without components such as 'A').
  512. Other species may be created inside simulation
  513. - name: reaction_rules
  514. type: List[ReactionRule*]
  515. default: empty
  516. - name: surface_classes
  517. type: List[SurfaceClass*]
  518. default: empty
  519. - name: elementary_molecule_types
  520. type: List[ElementaryMoleculeType*]
  521. default: empty
  522. doc: |
  523. Contains list of elementary molecule types with their diffusion constants and other information.
  524. Populated when a BNGL file is loaded and also on initialization from Species objects present in
  525. the species list.
  526. methods:
  527. - name: add_species
  528. doc: Add a reference to a Species object to the species list.
  529. params:
  530. - name: s
  531. type: Species*
  532. - name: find_species
  533. doc: |
  534. Find a Species object using name in the species list.
  535. Returns None if no such species is found.
  536. return_type: Species*
  537. params:
  538. - name: name
  539. type: str
  540. - name: add_reaction_rule
  541. doc: Add a reference to a ReactionRule object to the reaction_rules list.
  542. params:
  543. - name: r
  544. type: ReactionRule*
  545. - name: find_reaction_rule
  546. doc: |
  547. Find a ReactionRule object using name in the reaction_rules list.
  548. Returns None if no such reaction rule is found.
  549. return_type: ReactionRule*
  550. params:
  551. - name: name
  552. type: str
  553. - name: add_surface_class
  554. doc: Add a reference to a SurfaceClass object to the surface_classes list.
  555. params:
  556. - name: sc
  557. type: SurfaceClass*
  558. - name: find_surface_class
  559. doc: |
  560. Find a SurfaceClass object using name in the surface_classes list.
  561. Returns None if no such surface class is found.
  562. return_type: SurfaceClass*
  563. params:
  564. - name: name
  565. type: str
  566. - name: add_elementary_molecule_type
  567. doc: Add a reference to an ElementaryMoleculeType object to the elementary_molecule_types list.
  568. params:
  569. - name: mt
  570. type: ElementaryMoleculeType*
  571. - name: find_elementary_molecule_type
  572. doc: |
  573. Find an ElementaryMoleculeType object using name in the elementary_molecule_types list.
  574. Returns None if no such elementary molecule type is found.
  575. return_type: ElementaryMoleculeType*
  576. params:
  577. - name: name
  578. type: str
  579. - name: load_bngl_molecule_types_and_reaction_rules
  580. doc: |
  581. Parses a BNGL file, only reads molecule types and reaction rules sections,
  582. i.e. ignores observables and seed species.
  583. Parameter values are evaluated and the result value is directly used.
  584. Compartments names are stored in rxn rules as strings because compartments belong
  585. to geometry objects and the subsystem is independent on specific geometry.
  586. However, the compartments and their objects must be defined before initialization.
  587. examples: tests/pymcell4/2100_gradual_bngl_load/model.py
  588. params:
  589. - name: file_name
  590. type: str
  591. doc: Path to the BNGL file to be loaded.
  592. - name: parameter_overrides
  593. type: Dict[str, float]
  594. default: empty
  595. doc: |
  596. For each key k in the parameter_overrides, if it is defined in the BNGL's parameters section,
  597. its value is ignored and instead value parameter_overrides[k] is used.