submodules.yaml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. geometry_utils:
  2. doc: |
  3. Submodule geometry_utils provides several functions to define
  4. model geometry. Rather limited for now.
  5. type: submodule # default type is class
  6. methods:
  7. - name: create_box
  8. doc: Creates a GeometryObject in the shape of a cube whose center is at (0, 0, 0).
  9. return_type: GeometryObject*
  10. examples: tests/pymcell4/1400_rel_site_for_each_it/model.py tests/pymcell4/1105_point_release_w_create_box_not_cube/model.py
  11. params:
  12. - name: name
  13. type: str
  14. doc: Name of the created geometry object.
  15. - name: edge_dimension
  16. type: float
  17. default: unset
  18. doc: |
  19. Specifies length of each edge of the box in um.
  20. None of x/y/z dimensions can be set.
  21. - name: xyz_dimensions
  22. type: List[float]
  23. default: unset
  24. doc: Specifies x/y/z sizes of the box in um. Parameter edge_dimension must not be set.
  25. - name: create_icosphere
  26. doc: Creates a GeometryObject in the shape of an icosphere whose center is at (0, 0, 0).
  27. return_type: GeometryObject*
  28. examples: tests/pymcell4/1110_point_release_w_create_icosphere/model.py
  29. params:
  30. - name: name
  31. type: str
  32. doc: Name of the created geometry object.
  33. - name: radius
  34. type: float
  35. doc: Specifies radius of the sphere.
  36. - name: subdivisions
  37. type: int
  38. min: 1
  39. max: 8
  40. doc: |
  41. Number of subdivisions from the initial icosphere.
  42. The higher this value will be the smoother the icosphere will be.
  43. Allowed range is between 1 and 8.
  44. - name: validate_volumetric_mesh
  45. doc: |
  46. Checks that the mesh was correctly analyzed, that it has volume and
  47. all edges have neighboring walls.
  48. Must be called after model initialization.
  49. Throws exception with detained message if validation did not pass.
  50. params:
  51. - name: model
  52. type: Model*
  53. doc: Model object after initialization.
  54. - name: geometry_object
  55. type: GeometryObject*
  56. doc: Geometry object to be checked.
  57. bngl_utils:
  58. doc: |
  59. Submodule bngl_utils provides a function to load parameters from a BNGL file.
  60. type: submodule
  61. methods:
  62. - name: load_bngl_parameters
  63. return_type: Dict[str, float]
  64. doc: Load parameters section from a BNGL file and return it as a dictionary name->value.
  65. examples: tests/pymcell4_positive/2010_bng_parameter_override/model.py
  66. params:
  67. - name: file_name
  68. type: str
  69. doc: Path to the BNGL file to be loaded.
  70. - name: parameter_overrides
  71. type: Dict[str, float]
  72. default: empty
  73. doc: |
  74. For each key k in the parameter_overrides, if it is defined in the BNGL's parameters section,
  75. its value is ignored and instead value parameter_overrides[k] is used.
  76. run_utils:
  77. doc: |
  78. Submodule run_utils provides functions used by checkpointing.
  79. type: submodule
  80. methods:
  81. - name: get_last_checkpoint_dir
  82. doc: |
  83. Searches the directory checkpoints for the last checkpoint for the given
  84. parameters and returns the directory name if such a directory exists.
  85. Returns empty string if no checkpoint directory was found.
  86. Currently supports only the seed argument.
  87. todo: extend to handle additional parameters, not just seed
  88. return_type: str
  89. params:
  90. - name: seed
  91. type: int
  92. - name: remove_cwd
  93. doc: |
  94. Removes all directory names items pointing to the current working directory from a list and
  95. returns a new list.
  96. return_type: List[str]
  97. params:
  98. - name: paths
  99. type: List[str]
  100. data_utils:
  101. doc: |
  102. Submodule data_utils provides data loading and manipulation functions.
  103. type: submodule
  104. methods:
  105. - name: load_dat_file
  106. doc: |
  107. Loads a two-column file where the first column is usually time and the second is a
  108. floating point value. Returns a two-column list.
  109. Can be used to load a file with variable rate constants.
  110. return_type: List[List[float]]
  111. params:
  112. - name: file_name
  113. type: str
  114. doc: Path to the .dat file to be loaded.