molstar 3.26.0 → 3.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (499) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +202 -202
  3. package/build/viewer/embedded.html +52 -52
  4. package/build/viewer/index.html +115 -115
  5. package/build/viewer/molstar.css +1 -1
  6. package/build/viewer/molstar.js +1 -1
  7. package/lib/apps/docking-viewer/index.html +36 -36
  8. package/lib/apps/docking-viewer/viewport.d.ts +2 -0
  9. package/lib/apps/docking-viewer/viewport.js +1 -0
  10. package/lib/apps/viewer/app.d.ts +3 -1
  11. package/lib/apps/viewer/app.js +4 -0
  12. package/lib/apps/viewer/embedded.html +52 -52
  13. package/lib/apps/viewer/index.html +115 -115
  14. package/lib/cli/structure-info/volume.js +1 -1
  15. package/lib/commonjs/apps/docking-viewer/viewport.d.ts +2 -0
  16. package/lib/commonjs/apps/docking-viewer/viewport.js +1 -0
  17. package/lib/commonjs/apps/viewer/app.d.ts +3 -1
  18. package/lib/commonjs/apps/viewer/app.js +4 -0
  19. package/lib/commonjs/cli/structure-info/volume.js +1 -1
  20. package/lib/commonjs/examples/lighting/index.js +1 -1
  21. package/lib/commonjs/extensions/anvil/behavior.d.ts +1 -0
  22. package/lib/commonjs/extensions/cellpack/model.js +2 -1
  23. package/lib/commonjs/extensions/dnatco/confal-pyramids/behavior.d.ts +1 -0
  24. package/lib/commonjs/extensions/meshes/choice.d.ts +26 -0
  25. package/lib/commonjs/extensions/meshes/choice.js +31 -0
  26. package/lib/commonjs/extensions/meshes/examples.d.ts +26 -0
  27. package/lib/commonjs/extensions/meshes/examples.js +337 -0
  28. package/lib/commonjs/extensions/meshes/mesh-cif-schema.d.ts +29 -0
  29. package/lib/commonjs/extensions/meshes/mesh-cif-schema.js +34 -0
  30. package/lib/commonjs/extensions/meshes/mesh-extension.d.ts +66 -0
  31. package/lib/commonjs/extensions/meshes/mesh-extension.js +221 -0
  32. package/lib/commonjs/extensions/meshes/mesh-streaming/behavior.d.ts +105 -0
  33. package/lib/commonjs/extensions/meshes/mesh-streaming/behavior.js +379 -0
  34. package/lib/commonjs/extensions/meshes/mesh-streaming/server-info.d.ts +54 -0
  35. package/lib/commonjs/extensions/meshes/mesh-streaming/server-info.js +30 -0
  36. package/lib/commonjs/extensions/meshes/mesh-streaming/transformers.d.ts +42 -0
  37. package/lib/commonjs/extensions/meshes/mesh-streaming/transformers.js +273 -0
  38. package/lib/commonjs/extensions/meshes/mesh-utils.d.ts +41 -0
  39. package/lib/commonjs/extensions/meshes/mesh-utils.js +357 -0
  40. package/lib/commonjs/extensions/meshes/metadata.d.ts +108 -0
  41. package/lib/commonjs/extensions/meshes/metadata.js +72 -0
  42. package/lib/commonjs/extensions/model-archive/quality-assessment/behavior.d.ts +2 -0
  43. package/lib/commonjs/extensions/model-archive/quality-assessment/prop.d.ts +1 -0
  44. package/lib/commonjs/extensions/model-archive/quality-assessment/prop.js +16 -4
  45. package/lib/commonjs/extensions/rcsb/assembly-symmetry/behavior.d.ts +4 -2
  46. package/lib/commonjs/extensions/rcsb/validation-report/behavior.d.ts +3 -0
  47. package/lib/commonjs/extensions/volumes-and-segmentations/entry-meshes.d.ts +17 -0
  48. package/lib/commonjs/extensions/volumes-and-segmentations/entry-meshes.js +156 -0
  49. package/lib/commonjs/extensions/volumes-and-segmentations/entry-models.d.ts +12 -0
  50. package/lib/commonjs/extensions/volumes-and-segmentations/entry-models.js +96 -0
  51. package/lib/commonjs/extensions/volumes-and-segmentations/entry-root.d.ts +122 -0
  52. package/lib/commonjs/extensions/volumes-and-segmentations/entry-root.js +576 -0
  53. package/lib/commonjs/extensions/volumes-and-segmentations/entry-segmentation.d.ts +20 -0
  54. package/lib/commonjs/extensions/volumes-and-segmentations/entry-segmentation.js +200 -0
  55. package/lib/commonjs/extensions/volumes-and-segmentations/entry-state.d.ts +88 -0
  56. package/lib/commonjs/extensions/volumes-and-segmentations/entry-state.js +32 -0
  57. package/lib/commonjs/extensions/volumes-and-segmentations/entry-volume.d.ts +35 -0
  58. package/lib/commonjs/extensions/volumes-and-segmentations/entry-volume.js +234 -0
  59. package/lib/commonjs/extensions/volumes-and-segmentations/external-api.d.ts +11 -0
  60. package/lib/commonjs/extensions/volumes-and-segmentations/external-api.js +85 -0
  61. package/lib/commonjs/extensions/volumes-and-segmentations/global-state.d.ts +51 -0
  62. package/lib/commonjs/extensions/volumes-and-segmentations/global-state.js +83 -0
  63. package/lib/commonjs/extensions/volumes-and-segmentations/helpers.d.ts +56 -0
  64. package/lib/commonjs/extensions/volumes-and-segmentations/helpers.js +171 -0
  65. package/lib/commonjs/extensions/volumes-and-segmentations/index.d.ts +20 -0
  66. package/lib/commonjs/extensions/volumes-and-segmentations/index.js +130 -0
  67. package/lib/commonjs/extensions/volumes-and-segmentations/transformers.d.ts +33 -0
  68. package/lib/commonjs/extensions/volumes-and-segmentations/transformers.js +85 -0
  69. package/lib/commonjs/extensions/volumes-and-segmentations/ui.d.ts +29 -0
  70. package/lib/commonjs/extensions/volumes-and-segmentations/ui.js +232 -0
  71. package/lib/commonjs/extensions/volumes-and-segmentations/volseg-api/api.d.ts +22 -0
  72. package/lib/commonjs/extensions/volumes-and-segmentations/volseg-api/api.js +83 -0
  73. package/lib/commonjs/extensions/volumes-and-segmentations/volseg-api/data.d.ts +92 -0
  74. package/lib/commonjs/extensions/volumes-and-segmentations/volseg-api/data.js +7 -0
  75. package/lib/commonjs/extensions/volumes-and-segmentations/volseg-api/utils.d.ts +23 -0
  76. package/lib/commonjs/extensions/volumes-and-segmentations/volseg-api/utils.js +78 -0
  77. package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +2 -0
  78. package/lib/commonjs/mol-canvas3d/passes/draw.js +3 -3
  79. package/lib/commonjs/mol-canvas3d/passes/image.d.ts +1 -0
  80. package/lib/commonjs/mol-canvas3d/passes/postprocessing.d.ts +2 -1
  81. package/lib/commonjs/mol-canvas3d/passes/postprocessing.js +27 -13
  82. package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +2 -1
  83. package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.js +3 -2
  84. package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +0 -1
  85. package/lib/commonjs/mol-geo/geometry/points/points.d.ts +1 -1
  86. package/lib/commonjs/mol-geo/geometry/spheres/spheres.d.ts +1 -0
  87. package/lib/commonjs/mol-geo/geometry/spheres/spheres.js +3 -2
  88. package/lib/commonjs/mol-gl/compute/histogram-pyramid/reduction.js +1 -2
  89. package/lib/commonjs/mol-gl/compute/marching-cubes/isosurface.js +4 -6
  90. package/lib/commonjs/mol-gl/renderable/cylinders.d.ts +1 -0
  91. package/lib/commonjs/mol-gl/renderable/cylinders.js +1 -1
  92. package/lib/commonjs/mol-gl/renderable/spheres.d.ts +1 -0
  93. package/lib/commonjs/mol-gl/renderable/spheres.js +1 -1
  94. package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +1 -1
  95. package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.js +1 -1
  96. package/lib/commonjs/mol-gl/shader/chunks/clip-instance.glsl.d.ts +1 -1
  97. package/lib/commonjs/mol-gl/shader/chunks/clip-instance.glsl.js +1 -1
  98. package/lib/commonjs/mol-gl/shader/chunks/clip-pixel.glsl.d.ts +1 -1
  99. package/lib/commonjs/mol-gl/shader/chunks/clip-pixel.glsl.js +1 -1
  100. package/lib/commonjs/mol-gl/shader/chunks/common-clip.glsl.d.ts +2 -2
  101. package/lib/commonjs/mol-gl/shader/chunks/common-clip.glsl.js +2 -2
  102. package/lib/commonjs/mol-gl/shader/cylinders.frag.d.ts +1 -1
  103. package/lib/commonjs/mol-gl/shader/cylinders.frag.js +1 -1
  104. package/lib/commonjs/mol-gl/shader/cylinders.vert.d.ts +2 -2
  105. package/lib/commonjs/mol-gl/shader/cylinders.vert.js +2 -2
  106. package/lib/commonjs/mol-gl/shader/direct-volume.frag.d.ts +1 -1
  107. package/lib/commonjs/mol-gl/shader/direct-volume.frag.js +1 -1
  108. package/lib/commonjs/mol-gl/shader/outlines.frag.d.ts +1 -1
  109. package/lib/commonjs/mol-gl/shader/outlines.frag.js +1 -1
  110. package/lib/commonjs/mol-gl/shader/postprocessing.frag.d.ts +1 -1
  111. package/lib/commonjs/mol-gl/shader/postprocessing.frag.js +1 -1
  112. package/lib/commonjs/mol-gl/shader/spheres.frag.d.ts +1 -1
  113. package/lib/commonjs/mol-gl/shader/spheres.frag.js +1 -1
  114. package/lib/commonjs/mol-gl/shader/spheres.vert.d.ts +2 -2
  115. package/lib/commonjs/mol-gl/shader/spheres.vert.js +2 -2
  116. package/lib/commonjs/mol-gl/webgl/renderbuffer.d.ts +1 -1
  117. package/lib/commonjs/mol-gl/webgl/renderbuffer.js +15 -0
  118. package/lib/commonjs/mol-gl/webgl/state.d.ts +12 -0
  119. package/lib/commonjs/mol-gl/webgl/state.js +136 -0
  120. package/lib/commonjs/mol-io/reader/cif/schema/segmentation.d.ts +38 -0
  121. package/lib/commonjs/mol-io/reader/cif/schema/segmentation.js +22 -0
  122. package/lib/commonjs/mol-io/reader/cif.d.ts +3 -1
  123. package/lib/commonjs/mol-io/reader/cif.js +3 -1
  124. package/lib/commonjs/mol-model/location.d.ts +2 -1
  125. package/lib/commonjs/mol-model/loci.d.ts +11 -11
  126. package/lib/commonjs/mol-model/loci.js +13 -1
  127. package/lib/commonjs/mol-model/sequence/alignment/sequence.d.ts +4 -1
  128. package/lib/commonjs/mol-model/sequence/alignment/sequence.js +4 -1
  129. package/lib/commonjs/mol-model/structure/model/properties/atomic/hierarchy.d.ts +6 -0
  130. package/lib/commonjs/mol-model/structure/model/properties/utils/atomic-index.js +8 -0
  131. package/lib/commonjs/mol-model/structure/structure/unit/bonds/inter-compute.js +21 -5
  132. package/lib/commonjs/mol-model/structure/structure/util/superposition.d.ts +1 -0
  133. package/lib/commonjs/mol-model/structure/structure/util/superposition.js +2 -1
  134. package/lib/commonjs/mol-model/volume/volume.d.ts +35 -2
  135. package/lib/commonjs/mol-model/volume/volume.js +77 -2
  136. package/lib/commonjs/mol-model-formats/volume/segmentation.d.ts +23 -0
  137. package/lib/commonjs/mol-model-formats/volume/segmentation.js +138 -0
  138. package/lib/commonjs/mol-plugin/behavior/dynamic/representation.d.ts +2 -2
  139. package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +1 -0
  140. package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +2 -1
  141. package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -3
  142. package/lib/commonjs/mol-plugin/commands.d.ts +1 -0
  143. package/lib/commonjs/mol-plugin-state/animation/built-in/model-index.js +4 -1
  144. package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +2 -0
  145. package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy.d.ts +1 -0
  146. package/lib/commonjs/mol-plugin-state/builder/structure/representation-preset.d.ts +13 -4
  147. package/lib/commonjs/mol-plugin-state/builder/structure/representation-preset.js +6 -1
  148. package/lib/commonjs/mol-plugin-state/builder/structure/representation.d.ts +1 -0
  149. package/lib/commonjs/mol-plugin-state/formats/provider.d.ts +2 -2
  150. package/lib/commonjs/mol-plugin-state/formats/provider.js +11 -3
  151. package/lib/commonjs/mol-plugin-state/formats/registry.js +6 -5
  152. package/lib/commonjs/mol-plugin-state/formats/volume.d.ts +27 -0
  153. package/lib/commonjs/mol-plugin-state/formats/volume.js +65 -1
  154. package/lib/commonjs/mol-plugin-state/manager/structure/component.d.ts +1 -1
  155. package/lib/commonjs/mol-plugin-state/manager/structure/component.js +18 -13
  156. package/lib/commonjs/mol-plugin-state/transforms/representation.d.ts +1 -2
  157. package/lib/commonjs/mol-plugin-state/transforms/representation.js +5 -6
  158. package/lib/commonjs/mol-plugin-state/transforms/volume.d.ts +11 -1
  159. package/lib/commonjs/mol-plugin-state/transforms/volume.js +55 -2
  160. package/lib/commonjs/mol-plugin-ui/controls/line-graph/line-graph-component.d.ts +1 -0
  161. package/lib/commonjs/mol-plugin-ui/controls/line-graph/line-graph-component.js +33 -13
  162. package/lib/commonjs/mol-plugin-ui/controls/parameters.d.ts +1 -0
  163. package/lib/commonjs/mol-plugin-ui/controls/parameters.js +22 -5
  164. package/lib/commonjs/mol-plugin-ui/sequence/sequence.d.ts +25 -17
  165. package/lib/commonjs/mol-plugin-ui/sequence.d.ts +19 -1
  166. package/lib/commonjs/mol-plugin-ui/sequence.js +8 -1
  167. package/lib/commonjs/mol-plugin-ui/state/apply-action.d.ts +2 -10
  168. package/lib/commonjs/mol-plugin-ui/state/apply-action.js +2 -2
  169. package/lib/commonjs/mol-plugin-ui/structure/quick-styles.js +2 -2
  170. package/lib/commonjs/mol-plugin-ui/structure/superposition.d.ts +1 -1
  171. package/lib/commonjs/mol-plugin-ui/structure/volume.d.ts +1 -1
  172. package/lib/commonjs/mol-plugin-ui/structure/volume.js +3 -2
  173. package/lib/commonjs/mol-repr/structure/complex-visual.d.ts +1 -0
  174. package/lib/commonjs/mol-repr/structure/params.d.ts +2 -0
  175. package/lib/commonjs/mol-repr/structure/registry.d.ts +12 -0
  176. package/lib/commonjs/mol-repr/structure/representation/backbone.d.ts +3 -0
  177. package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.d.ts +6 -0
  178. package/lib/commonjs/mol-repr/structure/representation/ellipsoid.d.ts +6 -0
  179. package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.d.ts +3 -0
  180. package/lib/commonjs/mol-repr/structure/representation/gaussian-volume.d.ts +3 -0
  181. package/lib/commonjs/mol-repr/structure/representation/line.d.ts +3 -0
  182. package/lib/commonjs/mol-repr/structure/representation/molecular-surface.d.ts +3 -0
  183. package/lib/commonjs/mol-repr/structure/representation/point.d.ts +3 -0
  184. package/lib/commonjs/mol-repr/structure/representation/spacefill.d.ts +6 -0
  185. package/lib/commonjs/mol-repr/structure/units-visual.d.ts +2 -0
  186. package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +4 -0
  187. package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.js +2 -0
  188. package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-line.d.ts +1 -0
  189. package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-line.js +1 -0
  190. package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +4 -0
  191. package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.js +2 -0
  192. package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-line.d.ts +1 -0
  193. package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-line.js +1 -0
  194. package/lib/commonjs/mol-repr/structure/visual/element-cross.d.ts +1 -0
  195. package/lib/commonjs/mol-repr/structure/visual/element-cross.js +2 -1
  196. package/lib/commonjs/mol-repr/structure/visual/element-point.d.ts +1 -0
  197. package/lib/commonjs/mol-repr/structure/visual/element-point.js +2 -1
  198. package/lib/commonjs/mol-repr/structure/visual/element-sphere.d.ts +4 -0
  199. package/lib/commonjs/mol-repr/structure/visual/element-sphere.js +3 -1
  200. package/lib/commonjs/mol-repr/structure/visual/gaussian-density-volume.d.ts +2 -0
  201. package/lib/commonjs/mol-repr/structure/visual/gaussian-density-volume.js +6 -2
  202. package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +4 -0
  203. package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.js +9 -1
  204. package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +1 -0
  205. package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.js +3 -1
  206. package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -0
  207. package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.js +4 -0
  208. package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +1 -0
  209. package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.js +2 -0
  210. package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +2 -0
  211. package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +2 -0
  212. package/lib/commonjs/mol-repr/structure/visual/util/bond.d.ts +7 -0
  213. package/lib/commonjs/mol-repr/structure/visual/util/bond.js +18 -7
  214. package/lib/commonjs/mol-repr/structure/visual/util/common.d.ts +4 -1
  215. package/lib/commonjs/mol-repr/structure/visual/util/common.js +10 -6
  216. package/lib/commonjs/mol-repr/structure/visual/util/element.d.ts +1 -0
  217. package/lib/commonjs/mol-repr/structure/visual/util/element.js +2 -3
  218. package/lib/commonjs/mol-repr/structure/visual/util/gaussian.d.ts +2 -0
  219. package/lib/commonjs/mol-repr/volume/direct-volume.d.ts +4 -4
  220. package/lib/commonjs/mol-repr/volume/direct-volume.js +8 -6
  221. package/lib/commonjs/mol-repr/volume/isosurface.d.ts +4 -4
  222. package/lib/commonjs/mol-repr/volume/isosurface.js +17 -16
  223. package/lib/commonjs/mol-repr/volume/registry.d.ts +54 -1
  224. package/lib/commonjs/mol-repr/volume/registry.js +3 -1
  225. package/lib/commonjs/mol-repr/volume/representation.d.ts +11 -7
  226. package/lib/commonjs/mol-repr/volume/representation.js +142 -47
  227. package/lib/commonjs/mol-repr/volume/segment.d.ts +291 -0
  228. package/lib/commonjs/mol-repr/volume/segment.js +289 -0
  229. package/lib/commonjs/mol-repr/volume/slice.d.ts +2 -2
  230. package/lib/commonjs/mol-repr/volume/slice.js +5 -5
  231. package/lib/commonjs/mol-repr/volume/util.d.ts +12 -3
  232. package/lib/commonjs/mol-repr/volume/util.js +72 -6
  233. package/lib/commonjs/mol-script/language/builder.d.ts +1 -0
  234. package/lib/commonjs/mol-theme/color/volume-segment.d.ts +41 -0
  235. package/lib/commonjs/mol-theme/color/volume-segment.js +58 -0
  236. package/lib/commonjs/mol-theme/color/volume-value.js +2 -1
  237. package/lib/commonjs/mol-theme/color.d.ts +15 -0
  238. package/lib/commonjs/mol-theme/color.js +2 -0
  239. package/lib/commonjs/mol-theme/label.d.ts +1 -1
  240. package/lib/commonjs/mol-theme/label.js +13 -1
  241. package/lib/commonjs/mol-util/param-definition.d.ts +4 -1
  242. package/lib/commonjs/mol-util/param-definition.js +5 -2
  243. package/lib/examples/alpha-orbitals/index.html +72 -72
  244. package/lib/examples/basic-wrapper/index.html +137 -137
  245. package/lib/examples/lighting/index.html +88 -88
  246. package/lib/examples/lighting/index.js +1 -1
  247. package/lib/examples/proteopedia-wrapper/index.html +236 -236
  248. package/lib/extensions/anvil/behavior.d.ts +1 -0
  249. package/lib/extensions/cellpack/model.js +2 -1
  250. package/lib/extensions/dnatco/confal-pyramids/behavior.d.ts +1 -0
  251. package/lib/extensions/meshes/choice.d.ts +26 -0
  252. package/lib/extensions/meshes/choice.js +28 -0
  253. package/lib/extensions/meshes/examples.d.ts +26 -0
  254. package/lib/extensions/meshes/examples.js +325 -0
  255. package/lib/extensions/meshes/mesh-cif-schema.d.ts +29 -0
  256. package/lib/extensions/meshes/mesh-cif-schema.js +30 -0
  257. package/lib/extensions/meshes/mesh-extension.d.ts +66 -0
  258. package/lib/extensions/meshes/mesh-extension.js +218 -0
  259. package/lib/extensions/meshes/mesh-streaming/behavior.d.ts +105 -0
  260. package/lib/extensions/meshes/mesh-streaming/behavior.js +375 -0
  261. package/lib/extensions/meshes/mesh-streaming/server-info.d.ts +54 -0
  262. package/lib/extensions/meshes/mesh-streaming/server-info.js +26 -0
  263. package/lib/extensions/meshes/mesh-streaming/transformers.d.ts +42 -0
  264. package/lib/extensions/meshes/mesh-streaming/transformers.js +270 -0
  265. package/lib/extensions/meshes/mesh-utils.d.ts +41 -0
  266. package/lib/extensions/meshes/mesh-utils.js +346 -0
  267. package/lib/extensions/meshes/metadata.d.ts +108 -0
  268. package/lib/extensions/meshes/metadata.js +69 -0
  269. package/lib/extensions/model-archive/quality-assessment/behavior.d.ts +2 -0
  270. package/lib/extensions/model-archive/quality-assessment/prop.d.ts +1 -0
  271. package/lib/extensions/model-archive/quality-assessment/prop.js +16 -4
  272. package/lib/extensions/rcsb/assembly-symmetry/behavior.d.ts +4 -2
  273. package/lib/extensions/rcsb/validation-report/behavior.d.ts +3 -0
  274. package/lib/extensions/volumes-and-segmentations/entry-meshes.d.ts +17 -0
  275. package/lib/extensions/volumes-and-segmentations/entry-meshes.js +153 -0
  276. package/lib/extensions/volumes-and-segmentations/entry-models.d.ts +12 -0
  277. package/lib/extensions/volumes-and-segmentations/entry-models.js +93 -0
  278. package/lib/extensions/volumes-and-segmentations/entry-root.d.ts +122 -0
  279. package/lib/extensions/volumes-and-segmentations/entry-root.js +571 -0
  280. package/lib/extensions/volumes-and-segmentations/entry-segmentation.d.ts +20 -0
  281. package/lib/extensions/volumes-and-segmentations/entry-segmentation.js +197 -0
  282. package/lib/extensions/volumes-and-segmentations/entry-state.d.ts +88 -0
  283. package/lib/extensions/volumes-and-segmentations/entry-state.js +29 -0
  284. package/lib/extensions/volumes-and-segmentations/entry-volume.d.ts +35 -0
  285. package/lib/extensions/volumes-and-segmentations/entry-volume.js +231 -0
  286. package/lib/extensions/volumes-and-segmentations/external-api.d.ts +11 -0
  287. package/lib/extensions/volumes-and-segmentations/external-api.js +80 -0
  288. package/lib/extensions/volumes-and-segmentations/global-state.d.ts +51 -0
  289. package/lib/extensions/volumes-and-segmentations/global-state.js +80 -0
  290. package/lib/extensions/volumes-and-segmentations/helpers.d.ts +56 -0
  291. package/lib/extensions/volumes-and-segmentations/helpers.js +163 -0
  292. package/lib/extensions/volumes-and-segmentations/index.d.ts +20 -0
  293. package/lib/extensions/volumes-and-segmentations/index.js +127 -0
  294. package/lib/extensions/volumes-and-segmentations/transformers.d.ts +33 -0
  295. package/lib/extensions/volumes-and-segmentations/transformers.js +82 -0
  296. package/lib/extensions/volumes-and-segmentations/ui.d.ts +29 -0
  297. package/lib/extensions/volumes-and-segmentations/ui.js +229 -0
  298. package/lib/extensions/volumes-and-segmentations/volseg-api/api.d.ts +22 -0
  299. package/lib/extensions/volumes-and-segmentations/volseg-api/api.js +80 -0
  300. package/lib/extensions/volumes-and-segmentations/volseg-api/data.d.ts +92 -0
  301. package/lib/extensions/volumes-and-segmentations/volseg-api/data.js +6 -0
  302. package/lib/extensions/volumes-and-segmentations/volseg-api/utils.d.ts +23 -0
  303. package/lib/extensions/volumes-and-segmentations/volseg-api/utils.js +75 -0
  304. package/lib/mol-canvas3d/canvas3d.d.ts +2 -0
  305. package/lib/mol-canvas3d/passes/draw.js +3 -3
  306. package/lib/mol-canvas3d/passes/image.d.ts +1 -0
  307. package/lib/mol-canvas3d/passes/postprocessing.d.ts +2 -1
  308. package/lib/mol-canvas3d/passes/postprocessing.js +27 -13
  309. package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +2 -1
  310. package/lib/mol-geo/geometry/cylinders/cylinders.js +3 -2
  311. package/lib/mol-geo/geometry/lines/lines.d.ts +0 -1
  312. package/lib/mol-geo/geometry/points/points.d.ts +1 -1
  313. package/lib/mol-geo/geometry/spheres/spheres.d.ts +1 -0
  314. package/lib/mol-geo/geometry/spheres/spheres.js +3 -2
  315. package/lib/mol-gl/compute/histogram-pyramid/reduction.js +1 -2
  316. package/lib/mol-gl/compute/marching-cubes/isosurface.js +4 -6
  317. package/lib/mol-gl/renderable/cylinders.d.ts +1 -0
  318. package/lib/mol-gl/renderable/cylinders.js +1 -1
  319. package/lib/mol-gl/renderable/spheres.d.ts +1 -0
  320. package/lib/mol-gl/renderable/spheres.js +1 -1
  321. package/lib/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +1 -1
  322. package/lib/mol-gl/shader/chunks/apply-light-color.glsl.js +1 -1
  323. package/lib/mol-gl/shader/chunks/clip-instance.glsl.d.ts +1 -1
  324. package/lib/mol-gl/shader/chunks/clip-instance.glsl.js +1 -1
  325. package/lib/mol-gl/shader/chunks/clip-pixel.glsl.d.ts +1 -1
  326. package/lib/mol-gl/shader/chunks/clip-pixel.glsl.js +1 -1
  327. package/lib/mol-gl/shader/chunks/common-clip.glsl.d.ts +2 -2
  328. package/lib/mol-gl/shader/chunks/common-clip.glsl.js +2 -2
  329. package/lib/mol-gl/shader/cylinders.frag.d.ts +1 -1
  330. package/lib/mol-gl/shader/cylinders.frag.js +1 -1
  331. package/lib/mol-gl/shader/cylinders.vert.d.ts +2 -2
  332. package/lib/mol-gl/shader/cylinders.vert.js +2 -2
  333. package/lib/mol-gl/shader/direct-volume.frag.d.ts +1 -1
  334. package/lib/mol-gl/shader/direct-volume.frag.js +1 -1
  335. package/lib/mol-gl/shader/outlines.frag.d.ts +1 -1
  336. package/lib/mol-gl/shader/outlines.frag.js +1 -1
  337. package/lib/mol-gl/shader/postprocessing.frag.d.ts +1 -1
  338. package/lib/mol-gl/shader/postprocessing.frag.js +1 -1
  339. package/lib/mol-gl/shader/spheres.frag.d.ts +1 -1
  340. package/lib/mol-gl/shader/spheres.frag.js +1 -1
  341. package/lib/mol-gl/shader/spheres.vert.d.ts +2 -2
  342. package/lib/mol-gl/shader/spheres.vert.js +2 -2
  343. package/lib/mol-gl/webgl/renderbuffer.d.ts +1 -1
  344. package/lib/mol-gl/webgl/renderbuffer.js +15 -0
  345. package/lib/mol-gl/webgl/state.d.ts +12 -0
  346. package/lib/mol-gl/webgl/state.js +136 -0
  347. package/lib/mol-io/reader/cif/schema/segmentation.d.ts +38 -0
  348. package/lib/mol-io/reader/cif/schema/segmentation.js +19 -0
  349. package/lib/mol-io/reader/cif.d.ts +3 -1
  350. package/lib/mol-io/reader/cif.js +3 -1
  351. package/lib/mol-model/location.d.ts +2 -1
  352. package/lib/mol-model/loci.d.ts +11 -11
  353. package/lib/mol-model/loci.js +13 -1
  354. package/lib/mol-model/sequence/alignment/sequence.d.ts +4 -1
  355. package/lib/mol-model/sequence/alignment/sequence.js +3 -2
  356. package/lib/mol-model/structure/model/properties/atomic/hierarchy.d.ts +6 -0
  357. package/lib/mol-model/structure/model/properties/utils/atomic-index.js +8 -0
  358. package/lib/mol-model/structure/structure/unit/bonds/inter-compute.js +21 -5
  359. package/lib/mol-model/structure/structure/util/superposition.d.ts +1 -0
  360. package/lib/mol-model/structure/structure/util/superposition.js +1 -1
  361. package/lib/mol-model/volume/volume.d.ts +35 -2
  362. package/lib/mol-model/volume/volume.js +79 -4
  363. package/lib/mol-model-formats/volume/segmentation.d.ts +23 -0
  364. package/lib/mol-model-formats/volume/segmentation.js +135 -0
  365. package/lib/mol-plugin/behavior/dynamic/representation.d.ts +2 -2
  366. package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +1 -0
  367. package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +2 -1
  368. package/lib/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -3
  369. package/lib/mol-plugin/commands.d.ts +1 -0
  370. package/lib/mol-plugin/version.js +2 -2
  371. package/lib/mol-plugin-state/animation/built-in/model-index.js +4 -1
  372. package/lib/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +2 -0
  373. package/lib/mol-plugin-state/builder/structure/hierarchy.d.ts +1 -0
  374. package/lib/mol-plugin-state/builder/structure/representation-preset.d.ts +13 -4
  375. package/lib/mol-plugin-state/builder/structure/representation-preset.js +6 -1
  376. package/lib/mol-plugin-state/builder/structure/representation.d.ts +1 -0
  377. package/lib/mol-plugin-state/formats/provider.d.ts +2 -2
  378. package/lib/mol-plugin-state/formats/provider.js +11 -3
  379. package/lib/mol-plugin-state/formats/registry.js +6 -5
  380. package/lib/mol-plugin-state/formats/volume.d.ts +27 -0
  381. package/lib/mol-plugin-state/formats/volume.js +64 -0
  382. package/lib/mol-plugin-state/manager/structure/component.d.ts +1 -1
  383. package/lib/mol-plugin-state/manager/structure/component.js +18 -13
  384. package/lib/mol-plugin-state/transforms/representation.d.ts +1 -2
  385. package/lib/mol-plugin-state/transforms/representation.js +5 -6
  386. package/lib/mol-plugin-state/transforms/volume.d.ts +11 -1
  387. package/lib/mol-plugin-state/transforms/volume.js +54 -1
  388. package/lib/mol-plugin-ui/controls/line-graph/line-graph-component.d.ts +1 -0
  389. package/lib/mol-plugin-ui/controls/line-graph/line-graph-component.js +33 -13
  390. package/lib/mol-plugin-ui/controls/parameters.d.ts +1 -0
  391. package/lib/mol-plugin-ui/controls/parameters.js +22 -5
  392. package/lib/mol-plugin-ui/sequence/sequence.d.ts +25 -17
  393. package/lib/mol-plugin-ui/sequence.d.ts +19 -1
  394. package/lib/mol-plugin-ui/sequence.js +7 -7
  395. package/lib/mol-plugin-ui/skin/base/base.scss +32 -32
  396. package/lib/mol-plugin-ui/skin/base/components/controls-base.scss +333 -333
  397. package/lib/mol-plugin-ui/skin/base/components/controls.scss +418 -418
  398. package/lib/mol-plugin-ui/skin/base/components/help.scss +27 -27
  399. package/lib/mol-plugin-ui/skin/base/components/line-graph.scss +67 -67
  400. package/lib/mol-plugin-ui/skin/base/components/log.scss +100 -100
  401. package/lib/mol-plugin-ui/skin/base/components/misc.scss +643 -643
  402. package/lib/mol-plugin-ui/skin/base/components/sequence.scss +125 -125
  403. package/lib/mol-plugin-ui/skin/base/components/slider.scss +165 -165
  404. package/lib/mol-plugin-ui/skin/base/components/tasks.scss +99 -99
  405. package/lib/mol-plugin-ui/skin/base/components/toast.scss +83 -83
  406. package/lib/mol-plugin-ui/skin/base/components/transformer.scss +163 -163
  407. package/lib/mol-plugin-ui/skin/base/components/viewport.scss +137 -128
  408. package/lib/mol-plugin-ui/skin/base/layout/common.scss +71 -71
  409. package/lib/mol-plugin-ui/skin/base/layout/controls-landscape.scss +89 -89
  410. package/lib/mol-plugin-ui/skin/base/layout/controls-outside.scss +98 -98
  411. package/lib/mol-plugin-ui/skin/base/layout/controls-portrait.scss +108 -108
  412. package/lib/mol-plugin-ui/skin/base/layout.scss +40 -40
  413. package/lib/mol-plugin-ui/skin/base/logo.scss +12 -12
  414. package/lib/mol-plugin-ui/skin/base/normalize.scss +209 -209
  415. package/lib/mol-plugin-ui/skin/base/ui.scss +40 -40
  416. package/lib/mol-plugin-ui/skin/base/variables.scss +85 -85
  417. package/lib/mol-plugin-ui/skin/blue.scss +1 -1
  418. package/lib/mol-plugin-ui/skin/colors/blue.scss +23 -23
  419. package/lib/mol-plugin-ui/skin/colors/dark.scss +23 -23
  420. package/lib/mol-plugin-ui/skin/colors/light.scss +29 -29
  421. package/lib/mol-plugin-ui/skin/dark.scss +1 -1
  422. package/lib/mol-plugin-ui/skin/light.scss +1 -1
  423. package/lib/mol-plugin-ui/state/apply-action.d.ts +2 -10
  424. package/lib/mol-plugin-ui/state/apply-action.js +2 -2
  425. package/lib/mol-plugin-ui/structure/quick-styles.js +2 -2
  426. package/lib/mol-plugin-ui/structure/superposition.d.ts +1 -1
  427. package/lib/mol-plugin-ui/structure/volume.d.ts +1 -1
  428. package/lib/mol-plugin-ui/structure/volume.js +3 -2
  429. package/lib/mol-repr/structure/complex-visual.d.ts +1 -0
  430. package/lib/mol-repr/structure/params.d.ts +2 -0
  431. package/lib/mol-repr/structure/registry.d.ts +12 -0
  432. package/lib/mol-repr/structure/representation/backbone.d.ts +3 -0
  433. package/lib/mol-repr/structure/representation/ball-and-stick.d.ts +6 -0
  434. package/lib/mol-repr/structure/representation/ellipsoid.d.ts +6 -0
  435. package/lib/mol-repr/structure/representation/gaussian-surface.d.ts +3 -0
  436. package/lib/mol-repr/structure/representation/gaussian-volume.d.ts +3 -0
  437. package/lib/mol-repr/structure/representation/line.d.ts +3 -0
  438. package/lib/mol-repr/structure/representation/molecular-surface.d.ts +3 -0
  439. package/lib/mol-repr/structure/representation/point.d.ts +3 -0
  440. package/lib/mol-repr/structure/representation/spacefill.d.ts +6 -0
  441. package/lib/mol-repr/structure/units-visual.d.ts +2 -0
  442. package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +4 -0
  443. package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.js +2 -0
  444. package/lib/mol-repr/structure/visual/bond-inter-unit-line.d.ts +1 -0
  445. package/lib/mol-repr/structure/visual/bond-inter-unit-line.js +1 -0
  446. package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +4 -0
  447. package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.js +2 -0
  448. package/lib/mol-repr/structure/visual/bond-intra-unit-line.d.ts +1 -0
  449. package/lib/mol-repr/structure/visual/bond-intra-unit-line.js +1 -0
  450. package/lib/mol-repr/structure/visual/element-cross.d.ts +1 -0
  451. package/lib/mol-repr/structure/visual/element-cross.js +2 -1
  452. package/lib/mol-repr/structure/visual/element-point.d.ts +1 -0
  453. package/lib/mol-repr/structure/visual/element-point.js +2 -1
  454. package/lib/mol-repr/structure/visual/element-sphere.d.ts +4 -0
  455. package/lib/mol-repr/structure/visual/element-sphere.js +3 -1
  456. package/lib/mol-repr/structure/visual/gaussian-density-volume.d.ts +2 -0
  457. package/lib/mol-repr/structure/visual/gaussian-density-volume.js +6 -2
  458. package/lib/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +4 -0
  459. package/lib/mol-repr/structure/visual/gaussian-surface-mesh.js +9 -1
  460. package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +1 -0
  461. package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.js +3 -1
  462. package/lib/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -0
  463. package/lib/mol-repr/structure/visual/molecular-surface-mesh.js +4 -0
  464. package/lib/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +1 -0
  465. package/lib/mol-repr/structure/visual/molecular-surface-wireframe.js +2 -0
  466. package/lib/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +2 -0
  467. package/lib/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +2 -0
  468. package/lib/mol-repr/structure/visual/util/bond.d.ts +7 -0
  469. package/lib/mol-repr/structure/visual/util/bond.js +19 -8
  470. package/lib/mol-repr/structure/visual/util/common.d.ts +4 -1
  471. package/lib/mol-repr/structure/visual/util/common.js +10 -6
  472. package/lib/mol-repr/structure/visual/util/element.d.ts +1 -0
  473. package/lib/mol-repr/structure/visual/util/element.js +3 -4
  474. package/lib/mol-repr/structure/visual/util/gaussian.d.ts +2 -0
  475. package/lib/mol-repr/volume/direct-volume.d.ts +4 -4
  476. package/lib/mol-repr/volume/direct-volume.js +8 -6
  477. package/lib/mol-repr/volume/isosurface.d.ts +4 -4
  478. package/lib/mol-repr/volume/isosurface.js +17 -16
  479. package/lib/mol-repr/volume/registry.d.ts +54 -1
  480. package/lib/mol-repr/volume/registry.js +3 -1
  481. package/lib/mol-repr/volume/representation.d.ts +11 -7
  482. package/lib/mol-repr/volume/representation.js +144 -49
  483. package/lib/mol-repr/volume/segment.d.ts +291 -0
  484. package/lib/mol-repr/volume/segment.js +279 -0
  485. package/lib/mol-repr/volume/slice.d.ts +2 -2
  486. package/lib/mol-repr/volume/slice.js +5 -5
  487. package/lib/mol-repr/volume/util.d.ts +12 -3
  488. package/lib/mol-repr/volume/util.js +71 -6
  489. package/lib/mol-script/language/builder.d.ts +1 -0
  490. package/lib/mol-theme/color/volume-segment.d.ts +41 -0
  491. package/lib/mol-theme/color/volume-segment.js +53 -0
  492. package/lib/mol-theme/color/volume-value.js +2 -1
  493. package/lib/mol-theme/color.d.ts +15 -0
  494. package/lib/mol-theme/color.js +2 -0
  495. package/lib/mol-theme/label.d.ts +1 -1
  496. package/lib/mol-theme/label.js +13 -1
  497. package/lib/mol-util/param-definition.d.ts +4 -1
  498. package/lib/mol-util/param-definition.js +5 -2
  499. package/package.json +169 -168
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright (c) 2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ *
4
+ * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
+ */
6
+ import { Column } from '../../../../mol-data/db';
7
+ import { DensityServer_Data_Schema } from './density-server';
8
+ var Schema = Column.Schema;
9
+ var int = Schema.int;
10
+ export var Segmentation_Data_Schema = {
11
+ volume_data_3d_info: DensityServer_Data_Schema.volume_data_3d_info,
12
+ segmentation_data_table: {
13
+ set_id: int,
14
+ segment_id: int,
15
+ },
16
+ segmentation_data_3d: {
17
+ values: int
18
+ }
19
+ };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2017-2018 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2017-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author David Sehnal <david.sehnal@gmail.com>
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
@@ -14,6 +14,7 @@ import { BIRD_Database } from './cif/schema/bird';
14
14
  import { dic_Database } from './cif/schema/dic';
15
15
  import { DensityServer_Data_Database } from './cif/schema/density-server';
16
16
  import { CifCore_Database } from './cif/schema/cif-core';
17
+ import { Segmentation_Data_Database } from './cif/schema/segmentation';
17
18
  export declare const CIF: {
18
19
  parse: (data: string | Uint8Array) => import("../../mol-task/task").Task<import("./result").ReaderResult<import("./cif/data-model").CifFile>>;
19
20
  parseText: typeof parseCifText;
@@ -27,6 +28,7 @@ export declare const CIF: {
27
28
  dic: (frame: CifFrame) => dic_Database;
28
29
  cifCore: (frame: CifFrame) => CifCore_Database;
29
30
  densityServer: (frame: CifFrame) => DensityServer_Data_Database;
31
+ segmentation: (frame: CifFrame) => Segmentation_Data_Database;
30
32
  };
31
33
  };
32
34
  export * from './cif/data-model';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2017-2018 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2017-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author David Sehnal <david.sehnal@gmail.com>
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
@@ -13,6 +13,7 @@ import { BIRD_Schema } from './cif/schema/bird';
13
13
  import { dic_Schema } from './cif/schema/dic';
14
14
  import { DensityServer_Data_Schema } from './cif/schema/density-server';
15
15
  import { CifCore_Schema, CifCore_Aliases } from './cif/schema/cif-core';
16
+ import { Segmentation_Data_Schema } from './cif/schema/segmentation';
16
17
  export var CIF = {
17
18
  parse: function (data) { return typeof data === 'string' ? parseCifText(data) : parseCifBinary(data); },
18
19
  parseText: parseCifText,
@@ -26,6 +27,7 @@ export var CIF = {
26
27
  dic: function (frame) { return toDatabase(dic_Schema, frame); },
27
28
  cifCore: function (frame) { return toDatabase(CifCore_Schema, frame, CifCore_Aliases); },
28
29
  densityServer: function (frame) { return toDatabase(DensityServer_Data_Schema, frame); },
30
+ segmentation: function (frame) { return toDatabase(Segmentation_Data_Schema, frame); },
29
31
  }
30
32
  };
31
33
  export * from './cif/data-model';
@@ -7,6 +7,7 @@ import { StructureElement } from './structure';
7
7
  import { Bond } from './structure/structure/unit/bonds';
8
8
  import { ShapeGroup } from './shape/shape';
9
9
  import { PositionLocation } from '../mol-geo/util/location-iterator';
10
+ import { Volume } from './volume';
10
11
  /** A null value Location */
11
12
  export declare const NullLocation: {
12
13
  kind: "null-location";
@@ -22,4 +23,4 @@ export interface DataLocation<T = unknown, E = unknown> {
22
23
  }
23
24
  export declare function DataLocation<T = unknown, E = unknown>(tag: string, data: T, element: E): DataLocation<T, E>;
24
25
  export declare function isDataLocation(x: any): x is DataLocation;
25
- export type Location = StructureElement.Location | Bond.Location | ShapeGroup.Location | PositionLocation | DataLocation | NullLocation;
26
+ export type Location = StructureElement.Location | Bond.Location | ShapeGroup.Location | PositionLocation | DataLocation | NullLocation | Volume.Segment.Location;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */
@@ -39,7 +39,7 @@ export declare function areDataLociEqual(a: DataLoci, b: DataLoci): boolean;
39
39
  export declare function isDataLociEmpty(loci: DataLoci): boolean;
40
40
  export declare function DataLoci<T = unknown, E = unknown>(tag: string, data: T, elements: ReadonlyArray<E>, getBoundingSphere: DataLoci<T, E>['getBoundingSphere'], getLabel: DataLoci<T, E>['getLabel']): DataLoci<T, E>;
41
41
  export { Loci };
42
- type Loci = StructureElement.Loci | Structure.Loci | Bond.Loci | EveryLoci | EmptyLoci | DataLoci | Shape.Loci | ShapeGroup.Loci | Volume.Loci | Volume.Isosurface.Loci | Volume.Cell.Loci;
42
+ type Loci = StructureElement.Loci | Structure.Loci | Bond.Loci | EveryLoci | EmptyLoci | DataLoci | Shape.Loci | ShapeGroup.Loci | Volume.Loci | Volume.Isosurface.Loci | Volume.Cell.Loci | Volume.Segment.Loci;
43
43
  declare namespace Loci {
44
44
  export interface Bundle<L extends number> {
45
45
  loci: FiniteArray<Loci, L>;
@@ -54,47 +54,47 @@ declare namespace Loci {
54
54
  export function getPrincipalAxes(loci: Loci): PrincipalAxes | undefined;
55
55
  const Granularity: {
56
56
  element: (loci: Loci) => Loci;
57
- residue: (loci: Loci) => StructureElement.Loci | Structure.Loci | Bond.Loci | Volume.Loci | Volume.Isosurface.Loci | Volume.Cell.Loci | {
57
+ residue: (loci: Loci) => StructureElement.Loci | Structure.Loci | Bond.Loci | Volume.Loci | Volume.Isosurface.Loci | Volume.Cell.Loci | Volume.Segment.Loci | {
58
58
  kind: "every-loci";
59
59
  } | {
60
60
  kind: "empty-loci";
61
61
  } | DataLoci<unknown, unknown> | Shape.Loci | ShapeGroup.Loci;
62
- chain: (loci: Loci) => StructureElement.Loci | Structure.Loci | Bond.Loci | Volume.Loci | Volume.Isosurface.Loci | Volume.Cell.Loci | {
62
+ chain: (loci: Loci) => StructureElement.Loci | Structure.Loci | Bond.Loci | Volume.Loci | Volume.Isosurface.Loci | Volume.Cell.Loci | Volume.Segment.Loci | {
63
63
  kind: "every-loci";
64
64
  } | {
65
65
  kind: "empty-loci";
66
66
  } | DataLoci<unknown, unknown> | Shape.Loci | ShapeGroup.Loci;
67
- entity: (loci: Loci) => StructureElement.Loci | Structure.Loci | Bond.Loci | Volume.Loci | Volume.Isosurface.Loci | Volume.Cell.Loci | {
67
+ entity: (loci: Loci) => StructureElement.Loci | Structure.Loci | Bond.Loci | Volume.Loci | Volume.Isosurface.Loci | Volume.Cell.Loci | Volume.Segment.Loci | {
68
68
  kind: "every-loci";
69
69
  } | {
70
70
  kind: "empty-loci";
71
71
  } | DataLoci<unknown, unknown> | Shape.Loci | ShapeGroup.Loci;
72
- model: (loci: Loci) => StructureElement.Loci | Structure.Loci | Bond.Loci | Volume.Loci | Volume.Isosurface.Loci | Volume.Cell.Loci | {
72
+ model: (loci: Loci) => StructureElement.Loci | Structure.Loci | Bond.Loci | Volume.Loci | Volume.Isosurface.Loci | Volume.Cell.Loci | Volume.Segment.Loci | {
73
73
  kind: "every-loci";
74
74
  } | {
75
75
  kind: "empty-loci";
76
76
  } | DataLoci<unknown, unknown> | Shape.Loci | ShapeGroup.Loci;
77
- operator: (loci: Loci) => StructureElement.Loci | Structure.Loci | Bond.Loci | Volume.Loci | Volume.Isosurface.Loci | Volume.Cell.Loci | {
77
+ operator: (loci: Loci) => StructureElement.Loci | Structure.Loci | Bond.Loci | Volume.Loci | Volume.Isosurface.Loci | Volume.Cell.Loci | Volume.Segment.Loci | {
78
78
  kind: "every-loci";
79
79
  } | {
80
80
  kind: "empty-loci";
81
81
  } | DataLoci<unknown, unknown> | Shape.Loci | ShapeGroup.Loci;
82
- structure: (loci: Loci) => StructureElement.Loci | Structure.Loci | Bond.Loci | Volume.Loci | Volume.Isosurface.Loci | {
82
+ structure: (loci: Loci) => StructureElement.Loci | Structure.Loci | Bond.Loci | Volume.Loci | Volume.Isosurface.Loci | Volume.Segment.Loci | {
83
83
  kind: "every-loci";
84
84
  } | {
85
85
  kind: "empty-loci";
86
86
  } | DataLoci<unknown, unknown> | Shape.Loci;
87
- elementInstances: (loci: Loci) => StructureElement.Loci | Structure.Loci | Bond.Loci | Volume.Loci | Volume.Isosurface.Loci | Volume.Cell.Loci | {
87
+ elementInstances: (loci: Loci) => StructureElement.Loci | Structure.Loci | Bond.Loci | Volume.Loci | Volume.Isosurface.Loci | Volume.Cell.Loci | Volume.Segment.Loci | {
88
88
  kind: "every-loci";
89
89
  } | {
90
90
  kind: "empty-loci";
91
91
  } | DataLoci<unknown, unknown> | Shape.Loci | ShapeGroup.Loci;
92
- residueInstances: (loci: Loci) => StructureElement.Loci | Structure.Loci | Bond.Loci | Volume.Loci | Volume.Isosurface.Loci | Volume.Cell.Loci | {
92
+ residueInstances: (loci: Loci) => StructureElement.Loci | Structure.Loci | Bond.Loci | Volume.Loci | Volume.Isosurface.Loci | Volume.Cell.Loci | Volume.Segment.Loci | {
93
93
  kind: "every-loci";
94
94
  } | {
95
95
  kind: "empty-loci";
96
96
  } | DataLoci<unknown, unknown> | Shape.Loci | ShapeGroup.Loci;
97
- chainInstances: (loci: Loci) => StructureElement.Loci | Structure.Loci | Bond.Loci | Volume.Loci | Volume.Isosurface.Loci | Volume.Cell.Loci | {
97
+ chainInstances: (loci: Loci) => StructureElement.Loci | Structure.Loci | Bond.Loci | Volume.Loci | Volume.Isosurface.Loci | Volume.Cell.Loci | Volume.Segment.Loci | {
98
98
  kind: "every-loci";
99
99
  } | {
100
100
  kind: "empty-loci";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */
@@ -96,6 +96,9 @@ var Loci;
96
96
  if (Volume.Cell.isLoci(lociA) && Volume.Cell.isLoci(lociB)) {
97
97
  return Volume.Cell.areLociEqual(lociA, lociB);
98
98
  }
99
+ if (Volume.Segment.isLoci(lociA) && Volume.Segment.isLoci(lociB)) {
100
+ return Volume.Segment.areLociEqual(lociA, lociB);
101
+ }
99
102
  return false;
100
103
  }
101
104
  Loci.areEqual = areEqual;
@@ -126,6 +129,8 @@ var Loci;
126
129
  return Volume.Isosurface.isLociEmpty(loci);
127
130
  if (Volume.Cell.isLoci(loci))
128
131
  return Volume.Cell.isLociEmpty(loci);
132
+ if (Volume.Segment.isLoci(loci))
133
+ return Volume.Segment.isLociEmpty(loci);
129
134
  return false;
130
135
  }
131
136
  Loci.isEmpty = isEmpty;
@@ -177,6 +182,9 @@ var Loci;
177
182
  else if (loci.kind === 'cell-loci') {
178
183
  return Volume.Cell.getBoundingSphere(loci.volume, loci.indices, boundingSphere);
179
184
  }
185
+ else if (loci.kind === 'segment-loci') {
186
+ return Volume.Segment.getBoundingSphere(loci.volume, loci.segments, boundingSphere);
187
+ }
180
188
  }
181
189
  Loci.getBoundingSphere = getBoundingSphere;
182
190
  var tmpSphere3D = Sphere3D.zero();
@@ -222,6 +230,10 @@ var Loci;
222
230
  // TODO
223
231
  return void 0;
224
232
  }
233
+ else if (loci.kind === 'segment-loci') {
234
+ // TODO
235
+ return void 0;
236
+ }
225
237
  }
226
238
  Loci.getPrincipalAxes = getPrincipalAxes;
227
239
  //
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */
6
- import { StructureElement } from '../../structure/structure';
6
+ import { StructureElement, Unit } from '../../structure/structure';
7
7
  import { AlignmentOptions } from './alignment';
8
8
  export { AlignSequences };
9
9
  declare namespace AlignSequences {
@@ -17,5 +17,8 @@ declare namespace AlignSequences {
17
17
  b: StructureElement.Loci.Element;
18
18
  score: number;
19
19
  };
20
+ function createSeqIdIndicesMap(element: StructureElement.Loci.Element): Map<number, StructureElement.UnitIndex[]>;
20
21
  function compute(input: Input, options?: Partial<AlignmentOptions>): Result;
21
22
  }
23
+ export declare function entityKey(unit: Unit): import("../../structure").EntityIndex;
24
+ export declare function getSequence(unit: Unit): import("../sequence").Sequence;
@@ -37,6 +37,7 @@ var AlignSequences;
37
37
  }
38
38
  return seqIds;
39
39
  }
40
+ AlignSequences.createSeqIdIndicesMap = createSeqIdIndicesMap;
40
41
  function compute(input, options) {
41
42
  if (options === void 0) { options = {}; }
42
43
  var seqA = getSequence(input.a.unit);
@@ -78,7 +79,7 @@ var AlignSequences;
78
79
  }
79
80
  AlignSequences.compute = compute;
80
81
  })(AlignSequences || (AlignSequences = {}));
81
- function entityKey(unit) {
82
+ export function entityKey(unit) {
82
83
  switch (unit.kind) {
83
84
  case 0 /* Unit.Kind.Atomic */:
84
85
  return unit.model.atomicHierarchy.index.getEntityFromChain(unit.chainIndex[unit.elements[0]]);
@@ -88,6 +89,6 @@ function entityKey(unit) {
88
89
  return unit.model.coarseHierarchy.gaussians.entityKey[unit.elements[0]];
89
90
  }
90
91
  }
91
- function getSequence(unit) {
92
+ export function getSequence(unit) {
92
93
  return unit.model.sequence.byEntityKey[entityKey(unit)].sequence;
93
94
  }
@@ -147,6 +147,12 @@ export interface AtomicIndex {
147
147
  */
148
148
  findResidue(key: AtomicIndex.ResidueKey): ResidueIndex;
149
149
  findResidue(label_entity_id: string, label_asym_id: string, auth_seq_id: number, pdbx_PDB_ins_code?: string): ResidueIndex;
150
+ /**
151
+ * Index of the 1st occurence of this residue using "all-label" address.
152
+ * Doesn't work for "ligands" as they don't have a label seq id assigned.
153
+ * @returns index or -1 if not present.
154
+ */
155
+ findResidueLabel(key: AtomicIndex.ResidueLabelKey): ResidueIndex;
150
156
  /**
151
157
  * Index of the 1st occurence of this residue.
152
158
  * @param key.pdbx_PDB_ins_code Empty string for undefined
@@ -97,6 +97,14 @@ var Index = /** @class */ (function () {
97
97
  var id = getResidueId(key.auth_seq_id, key.pdbx_PDB_ins_code || '');
98
98
  return rm.has(id) ? rm.get(id) : -1;
99
99
  };
100
+ Index.prototype.findResidueLabel = function (key) {
101
+ var cI = this.findChainLabel(key);
102
+ if (cI < 0)
103
+ return -1;
104
+ var rm = this.map.chain_index_label_seq_id.get(cI);
105
+ var id = getResidueId(key.label_seq_id, key.pdbx_PDB_ins_code || '');
106
+ return rm.has(id) ? rm.get(id) : -1;
107
+ };
100
108
  Index.prototype.findResidueAuth = function (key) {
101
109
  var cI = this.findChainAuth(key);
102
110
  if (cI < 0)
@@ -107,8 +107,8 @@ function findPairBonds(unitA, unitB, props, builder) {
107
107
  var structConnEntries = props.forceCompute ? void 0 : structConn && structConn.byAtomIndex.get(aI);
108
108
  if (structConnEntries && structConnEntries.length) {
109
109
  var added = false;
110
- for (var _i = 0, structConnEntries_1 = structConnEntries; _i < structConnEntries_1.length; _i++) {
111
- var se = structConnEntries_1[_i];
110
+ for (var _g = 0, structConnEntries_1 = structConnEntries; _g < structConnEntries_1.length; _g++) {
111
+ var se = structConnEntries_1[_g];
112
112
  var partnerA = se.partnerA, partnerB = se.partnerB;
113
113
  var p = partnerA.atomIndex === aI ? partnerB : partnerA;
114
114
  var _bI = SortedArray.indexOf(unitB.elements, p.atomIndex);
@@ -129,7 +129,7 @@ function findPairBonds(unitA, unitB, props, builder) {
129
129
  continue;
130
130
  var occA = occupancyA.value(aI);
131
131
  var lookup3d = unitB.lookup3d;
132
- var _g = lookup3d.find(_imageA[0], _imageA[1], _imageA[2], maxRadius), indices = _g.indices, count = _g.count, squaredDistances = _g.squaredDistances;
132
+ var _h = lookup3d.find(_imageA[0], _imageA[1], _imageA[2], maxRadius), indices = _h.indices, count = _h.count, squaredDistances = _h.squaredDistances;
133
133
  if (count === 0)
134
134
  continue;
135
135
  var aeI = getElementIdx(type_symbolA.value(aI));
@@ -200,9 +200,25 @@ function computeInterUnitBonds(structure, props) {
200
200
  var mtB = b.model.atomicHierarchy.derived.residue.moleculeType;
201
201
  var notWater = ((!Unit.isAtomic(a) || mtA[a.residueIndex[a.elements[0]]] !== 2 /* MoleculeType.Water */) &&
202
202
  (!Unit.isAtomic(b) || mtB[b.residueIndex[b.elements[0]]] !== 2 /* MoleculeType.Water */));
203
- var notIon = ((!Unit.isAtomic(a) || mtA[a.residueIndex[a.elements[0]]] !== 3 /* MoleculeType.Ion */) &&
204
- (!Unit.isAtomic(b) || mtB[b.residueIndex[b.elements[0]]] !== 3 /* MoleculeType.Ion */));
203
+ var sameModel = a.model === b.model;
204
+ var notIonA = (!Unit.isAtomic(a) || mtA[a.residueIndex[a.elements[0]]] !== 3 /* MoleculeType.Ion */) || (sameModel && hasStructConnRecord(a));
205
+ var notIonB = (!Unit.isAtomic(b) || mtB[b.residueIndex[b.elements[0]]] !== 3 /* MoleculeType.Ion */) || (sameModel && hasStructConnRecord(b));
206
+ var notIon = notIonA && notIonB;
205
207
  return Structure.validUnitPair(s, a, b) && (notWater || !p.ignoreWater) && (notIon || !p.ignoreIon);
206
208
  }) }));
207
209
  }
210
+ function hasStructConnRecord(unit) {
211
+ if (!Unit.isAtomic(unit))
212
+ return false;
213
+ var elements = unit.elements;
214
+ var structConn = StructConn.Provider.get(unit.model);
215
+ if (structConn) {
216
+ for (var i = 0, _i = elements.length; i < _i; i++) {
217
+ if (structConn.byAtomIndex.get(elements[i])) {
218
+ return true;
219
+ }
220
+ }
221
+ }
222
+ return false;
223
+ }
208
224
  export { computeInterUnitBonds };
@@ -11,4 +11,5 @@ type AlignAndSuperposeResult = MinimizeRmsd.Result & {
11
11
  alignmentScore: number;
12
12
  };
13
13
  export declare function alignAndSuperpose(xs: StructureElement.Loci[]): AlignAndSuperposeResult[];
14
+ export declare function getPositionTable(xs: StructureElement.Loci, n: number): MinimizeRmsd.Positions;
14
15
  export {};
@@ -50,7 +50,7 @@ export function alignAndSuperpose(xs) {
50
50
  }
51
51
  return ret;
52
52
  }
53
- function getPositionTable(xs, n) {
53
+ export function getPositionTable(xs, n) {
54
54
  var ret = MinimizeRmsd.Positions.empty(n);
55
55
  var o = 0;
56
56
  for (var _a = 0, _b = xs.elements; _a < _b.length; _a++) {
@@ -4,8 +4,8 @@
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */
6
6
  import { Grid } from './grid';
7
- import { OrderedSet } from '../../mol-data/int';
8
- import { Sphere3D } from '../../mol-math/geometry';
7
+ import { OrderedSet, SortedArray } from '../../mol-data/int';
8
+ import { Box3D, Sphere3D } from '../../mol-math/geometry';
9
9
  import { ModelFormat } from '../../mol-model-formats/format';
10
10
  import { CustomProperties } from '../custom-property';
11
11
  import { ParamDefinition as PD } from '../../mol-util/param-definition';
@@ -137,9 +137,42 @@ export declare namespace Volume {
137
137
  function isLociEmpty(loci: Loci): boolean;
138
138
  function getBoundingSphere(volume: Volume, indices: OrderedSet<CellIndex>, boundingSphere?: Sphere3D): Sphere3D;
139
139
  }
140
+ namespace Segment {
141
+ interface Loci {
142
+ readonly kind: 'segment-loci';
143
+ readonly volume: Volume;
144
+ readonly segments: SortedArray;
145
+ }
146
+ function Loci(volume: Volume, segments: ArrayLike<number>): Loci;
147
+ function isLoci(x: any): x is Loci;
148
+ function areLociEqual(a: Loci, b: Loci): boolean;
149
+ function isLociEmpty(loci: Loci): boolean;
150
+ function getBoundingSphere(volume: Volume, segments: ArrayLike<number>, boundingSphere?: Sphere3D): Sphere3D;
151
+ interface Location {
152
+ readonly kind: 'segment-location';
153
+ volume: Volume;
154
+ segment: number;
155
+ }
156
+ function Location(volume?: Volume, segment?: number): Location;
157
+ function isLocation(x: any): x is Location;
158
+ }
140
159
  type PickingGranularity = 'volume' | 'object' | 'voxel';
141
160
  const PickingGranularity: {
142
161
  set(volume: Volume, granularity: PickingGranularity): void;
143
162
  get(volume: Volume): PickingGranularity;
144
163
  };
164
+ type Segmentation = {
165
+ segments: Map<number, Set<number>>;
166
+ sets: Map<number, Set<number>>;
167
+ bounds: {
168
+ [k: number]: Box3D;
169
+ };
170
+ labels: {
171
+ [k: number]: string;
172
+ };
173
+ };
174
+ const Segmentation: {
175
+ set(volume: Volume, segmentation: Segmentation): void;
176
+ get(volume: Volume): Segmentation | undefined;
177
+ };
145
178
  }
@@ -4,8 +4,8 @@
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */
6
6
  import { Grid } from './grid';
7
- import { OrderedSet } from '../../mol-data/int';
8
- import { Sphere3D } from '../../mol-math/geometry';
7
+ import { OrderedSet, SortedArray } from '../../mol-data/int';
8
+ import { Box3D, Sphere3D } from '../../mol-math/geometry';
9
9
  import { Vec3, Mat4 } from '../../mol-math/linear-algebra';
10
10
  import { BoundaryHelper } from '../../mol-math/geometry/boundary-helper';
11
11
  import { CubeFormat } from '../../mol-model-formats/volume/cube';
@@ -145,9 +145,38 @@ export var Volume;
145
145
  Isosurface.areLociEqual = areLociEqual;
146
146
  function isLociEmpty(loci) { return loci.volume.grid.cells.data.length === 0; }
147
147
  Isosurface.isLociEmpty = isLociEmpty;
148
+ var bbox = Box3D();
148
149
  function getBoundingSphere(volume, isoValue, boundingSphere) {
149
- // TODO get bounding sphere for subgrid with values >= isoValue
150
- return Volume.getBoundingSphere(volume, boundingSphere);
150
+ var value = Volume.IsoValue.toAbsolute(isoValue, volume.grid.stats).absoluteValue;
151
+ var neg = value < 0;
152
+ var c = [0, 0, 0];
153
+ var getCoords = volume.grid.cells.space.getCoords;
154
+ var d = volume.grid.cells.data;
155
+ var _a = volume.grid.cells.space.dimensions, xn = _a[0], yn = _a[1], zn = _a[2];
156
+ var minx = xn - 1, miny = yn - 1, minz = zn - 1;
157
+ var maxx = 0, maxy = 0, maxz = 0;
158
+ for (var i = 0, il = d.length; i < il; ++i) {
159
+ if ((neg && d[i] <= value) || (!neg && d[i] >= value)) {
160
+ getCoords(i, c);
161
+ if (c[0] < minx)
162
+ minx = c[0];
163
+ if (c[1] < miny)
164
+ miny = c[1];
165
+ if (c[2] < minz)
166
+ minz = c[2];
167
+ if (c[0] > maxx)
168
+ maxx = c[0];
169
+ if (c[1] > maxy)
170
+ maxy = c[1];
171
+ if (c[2] > maxz)
172
+ maxz = c[2];
173
+ }
174
+ }
175
+ Vec3.set(bbox.min, minx - 1, miny - 1, minz - 1);
176
+ Vec3.set(bbox.max, maxx + 1, maxy + 1, maxz + 1);
177
+ var transform = Grid.getGridToCartesianTransform(volume.grid);
178
+ Box3D.transform(bbox, bbox, transform);
179
+ return Sphere3D.fromBox3D(boundingSphere || Sphere3D(), bbox);
151
180
  }
152
181
  Isosurface.getBoundingSphere = getBoundingSphere;
153
182
  })(Isosurface = Volume.Isosurface || (Volume.Isosurface = {}));
@@ -185,6 +214,44 @@ export var Volume;
185
214
  }
186
215
  Cell.getBoundingSphere = getBoundingSphere;
187
216
  })(Cell = Volume.Cell || (Volume.Cell = {}));
217
+ var Segment;
218
+ (function (Segment) {
219
+ function Loci(volume, segments) { return { kind: 'segment-loci', volume: volume, segments: SortedArray.ofUnsortedArray(segments) }; }
220
+ Segment.Loci = Loci;
221
+ function isLoci(x) { return !!x && x.kind === 'segment-loci'; }
222
+ Segment.isLoci = isLoci;
223
+ function areLociEqual(a, b) { return a.volume === b.volume && SortedArray.areEqual(a.segments, b.segments); }
224
+ Segment.areLociEqual = areLociEqual;
225
+ function isLociEmpty(loci) { return loci.volume.grid.cells.data.length === 0 || loci.segments.length === 0; }
226
+ Segment.isLociEmpty = isLociEmpty;
227
+ var bbox = Box3D();
228
+ function getBoundingSphere(volume, segments, boundingSphere) {
229
+ var segmentation = Volume.Segmentation.get(volume);
230
+ if (segmentation) {
231
+ Box3D.setEmpty(bbox);
232
+ for (var i = 0, il = segments.length; i < il; ++i) {
233
+ var b = segmentation.bounds[segments[i]];
234
+ Box3D.add(bbox, b.min);
235
+ Box3D.add(bbox, b.max);
236
+ }
237
+ var transform = Grid.getGridToCartesianTransform(volume.grid);
238
+ Box3D.transform(bbox, bbox, transform);
239
+ return Sphere3D.fromBox3D(boundingSphere || Sphere3D(), bbox);
240
+ }
241
+ else {
242
+ return Volume.getBoundingSphere(volume, boundingSphere);
243
+ }
244
+ }
245
+ Segment.getBoundingSphere = getBoundingSphere;
246
+ function Location(volume, segment) {
247
+ return { kind: 'segment-location', volume: volume, segment: segment };
248
+ }
249
+ Segment.Location = Location;
250
+ function isLocation(x) {
251
+ return !!x && x.kind === 'segment-location';
252
+ }
253
+ Segment.isLocation = isLocation;
254
+ })(Segment = Volume.Segment || (Volume.Segment = {}));
188
255
  Volume.PickingGranularity = {
189
256
  set: function (volume, granularity) {
190
257
  volume._propertyData['__picking_granularity__'] = granularity;
@@ -194,4 +261,12 @@ export var Volume;
194
261
  return (_a = volume._propertyData['__picking_granularity__']) !== null && _a !== void 0 ? _a : 'voxel';
195
262
  }
196
263
  };
264
+ Volume.Segmentation = {
265
+ set: function (volume, segmentation) {
266
+ volume._propertyData['__segmentation__'] = segmentation;
267
+ },
268
+ get: function (volume) {
269
+ return volume._propertyData['__segmentation__'];
270
+ }
271
+ };
197
272
  })(Volume || (Volume = {}));
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ *
4
+ * @author David Sehnal <david.sehnal@gmail.com>
5
+ * @author Alexander Rose <alexander.rose@weirdbyte.de>
6
+ */
7
+ import { Volume } from '../../mol-model/volume';
8
+ import { Task } from '../../mol-task';
9
+ import { ModelFormat } from '../format';
10
+ import { Segmentation_Data_Database } from '../../mol-io/reader/cif/schema/segmentation';
11
+ export declare function volumeFromSegmentationData(source: Segmentation_Data_Database, params?: Partial<{
12
+ label: string;
13
+ segmentLabels: {
14
+ [id: number]: string;
15
+ };
16
+ ownerId: string;
17
+ }>): Task<Volume>;
18
+ export { SegcifFormat };
19
+ type SegcifFormat = ModelFormat<Segmentation_Data_Database>;
20
+ declare namespace SegcifFormat {
21
+ function is(x?: ModelFormat): x is SegcifFormat;
22
+ function create(segcif: Segmentation_Data_Database): SegcifFormat;
23
+ }