geometry.yaml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. Color:
  2. superclass: BaseDataClass
  3. doc: |
  4. Represents color with alpha component.
  5. Provides two means to set value, either red, green, blue and alpha,
  6. or rgba. If both color individual components and rgba are set in initialization,
  7. the individual components are used.
  8. items:
  9. - name: red
  10. type: float
  11. default: unset
  12. doc: Red component in range 0-1.
  13. - name: green
  14. type: float
  15. default: unset
  16. doc: Green component in range 0-1.
  17. - name: blue
  18. type: float
  19. default: unset
  20. doc: Blue component in range 0-1.
  21. - name: alpha
  22. type: float
  23. default: 1
  24. doc: Alpha component in range 0-1. 1 means nontransparent.
  25. - name: rgba
  26. type: uint32
  27. default: 0
  28. doc: |
  29. This attribute provides an alternative way of defining colors by supplying a
  30. 32-bit unsigned integer representation of the color with an aplha channel.
  31. In hexadecimal notation the first 2 digits are value for red, second 2 digits are
  32. green, third 2 digits are blue and the last two digits are alpha.
  33. The range for each component is thus 0x0-0xFF (0-255).
  34. Example\: 0x0000ffcc represents the same color as rgba(0, 0, 100%, 80%).
  35. All values are valid.
  36. Region:
  37. superclass: BaseDataClass
  38. doc: Represents region construted from 1 or more multiple, usually unnamed?
  39. items:
  40. - name: node_type
  41. type: RegionNodeType
  42. default: RegionNodeType.UNSET
  43. doc: |
  44. When this values is LeafGeometryObject, then this object is of class GeometryObject,
  45. when LeafSurfaceRegion, then it is of class SurfaceRegion.
  46. - name: left_node
  47. type: Region*
  48. default: unset
  49. doc: Internal, do not use. When node_type is not Leaf, this is the left operand
  50. - name: right_node
  51. type: Region*
  52. default: unset
  53. doc: Internal, do not use. When node_type is not Leaf, this is the right operand
  54. methods:
  55. - name: __add__
  56. doc: Computes union of two regions, use with Python operator '+'.
  57. return_type: Region*
  58. params:
  59. - name: other
  60. type: Region*
  61. - name: __sub__
  62. doc: Computes difference of two regions, use with Python operator '-'.
  63. return_type: Region*
  64. params:
  65. - name: other
  66. type: Region*
  67. - name: __mul__
  68. doc: Computes intersection of two regions, use with Python operator '*'.
  69. return_type: Region*
  70. params:
  71. - name: other
  72. type: Region*
  73. SurfaceRegion:
  74. superclass: Region
  75. doc: |
  76. Defines a region on the object. The extent of a region is given by the wall_indices list.
  77. Molecules can be added and surface properties can be set with the optional regional surface commands.
  78. You can have an arbitrary number of regions on an object, and they may overlap if
  79. you wish. Molecules added to overlapping regions accumulate. Triangles belonging to
  80. multiple regions inherit all parent regions’ surface properties. Users
  81. have to make sure that in case of overlapped regions their surface properties
  82. are compatible.
  83. examples: tests/pymcell4_positive/1700_linear_conc_gradient_w_conc_clamp/geometry.py
  84. items:
  85. - name: name
  86. type: str
  87. doc: Name of this region.
  88. - name: wall_indices
  89. type: List[int]
  90. doc: |
  91. Surface region must be a part of a GeometryObject, items in this list are indices to
  92. its wall_list array.
  93. - name: surface_class
  94. type: SurfaceClass*
  95. default: unset
  96. doc: |
  97. Optional surface class assigned to this surface region.
  98. If not set, it is inherited from the parent geometry object's surface_class.
  99. - name: initial_surface_releases
  100. type: List[InitialSurfaceRelease*]
  101. default: empty
  102. doc: |
  103. Each item of this list defines either density or number of molecules to be released on this surface
  104. regions when simulation starts.
  105. internal: Equivalent to MDL's MODIFY_SURFACE_REGIONS/MOLECULE_DENSITY or MOLECULE_NUMBER.
  106. - name: initial_color
  107. type: Color*
  108. default: unset
  109. doc: Initial color for this specific surface region. If not set, color of the parent's GeometryObject is used.
  110. GeometryObject:
  111. superclass: Region
  112. doc: Class represents geometry objects defined by triangular surface elements.
  113. examples: tests/pymcell4_positive/1330_get_wall/geometry.py
  114. items:
  115. - name: name
  116. type: str
  117. doc: |
  118. Name of the object. Also represents BNGL compartment name if 'is_bngl_compartment' is True.
  119. - name: vertex_list
  120. type: List[List[float]]
  121. doc: |
  122. List of [x,y,z] triplets specifying positions of individual vertices of each triangle.
  123. - name: wall_list
  124. type: List[List[int]]
  125. doc: |
  126. List of [a,b,c] triplets specifying each wall, individual values are indices into the
  127. vertex_list attribute.
  128. - name: is_bngl_compartment
  129. type: bool
  130. default: false
  131. doc: |
  132. Set to True if this object represents a 3D BNGL compartment.
  133. Its name will be then the BNGL compartment name.
  134. - name: surface_compartment_name
  135. type: str
  136. default: unset
  137. doc: |
  138. When is_bngl_compartment is True, this attribute can be set to specify its
  139. membrane (2D) compartment name.
  140. - name: surface_regions
  141. type: List[SurfaceRegion*]
  142. default: empty
  143. doc: |
  144. All surface regions associated with this geometry object.
  145. - name: surface_class
  146. type: SurfaceClass*
  147. default: unset
  148. doc: |
  149. Surface class for the whole object's surface. It is applied to the whole surface of this object
  150. except for those surface regions that have their specific surface class set explicitly.
  151. - name: initial_surface_releases
  152. type: List[InitialSurfaceRelease*]
  153. default: empty
  154. doc: |
  155. Each item in this list defines either density or number of molecules to be released on this surface
  156. regions when simulation starts.
  157. internal: Shouldn't we be inheriting this from Region?
  158. - name: initial_color
  159. type: Color*
  160. default: unset
  161. doc: |
  162. Initial color for this geometry object. If a surface region has its color set, its value
  163. is used for the walls of that surface region.
  164. methods:
  165. - name: translate
  166. doc: |
  167. Move object by a specified vector.
  168. Cannot be called after model was initialized.
  169. examples: tests/pymcell4_positive/1400_object_translate/model.py
  170. params:
  171. - name: move
  172. type: List[float]
  173. doc: 3D vector [x, y, z] that will be added to each vertex of this object.