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,135 @@
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 { __awaiter, __generator } from "tslib";
8
+ import { Volume } from '../../mol-model/volume';
9
+ import { Task } from '../../mol-task';
10
+ import { SpacegroupCell, Box3D } from '../../mol-math/geometry';
11
+ import { Tensor, Vec3 } from '../../mol-math/linear-algebra';
12
+ import { CustomProperties } from '../../mol-model/custom-property';
13
+ import { objectForEach } from '../../mol-util/object';
14
+ export function volumeFromSegmentationData(source, params) {
15
+ var _this = this;
16
+ return Task.create('Create Segmentation Volume', function (ctx) { return __awaiter(_this, void 0, void 0, function () {
17
+ var info, values, cell, axis_order_fast_to_slow, normalizeOrder, sample_count, tensorSpace, t, origin, dimensions, v, segments, sets, _a, segment_id, set_id, i, il, segment, set, c, getCoords, d, _b, xn, yn, zn, xn1, yn1, zn1, setBounds, i, il, v_1, b, bounds;
18
+ var _c;
19
+ return __generator(this, function (_d) {
20
+ info = source.volume_data_3d_info, values = source.segmentation_data_3d;
21
+ cell = SpacegroupCell.create(info.spacegroup_number.value(0), Vec3.ofArray(info.spacegroup_cell_size.value(0)), Vec3.scale(Vec3(), Vec3.ofArray(info.spacegroup_cell_angles.value(0)), Math.PI / 180));
22
+ axis_order_fast_to_slow = info.axis_order.value(0);
23
+ normalizeOrder = Tensor.convertToCanonicalAxisIndicesFastToSlow(axis_order_fast_to_slow);
24
+ sample_count = normalizeOrder(info.sample_count.value(0));
25
+ tensorSpace = Tensor.Space(sample_count, Tensor.invertAxisOrder(axis_order_fast_to_slow), Float32Array);
26
+ t = Tensor.create(tensorSpace, Tensor.Data1(values.values.toArray({ array: Float32Array })));
27
+ origin = Vec3.ofArray(normalizeOrder(info.origin.value(0)));
28
+ dimensions = Vec3.ofArray(normalizeOrder(info.dimensions.value(0)));
29
+ v = {
30
+ label: params === null || params === void 0 ? void 0 : params.label,
31
+ entryId: undefined,
32
+ grid: {
33
+ transform: {
34
+ kind: 'spacegroup',
35
+ cell: cell,
36
+ fractionalBox: Box3D.create(origin, Vec3.add(Vec3(), origin, dimensions))
37
+ },
38
+ cells: t,
39
+ stats: {
40
+ min: 0, max: 1, mean: 0, sigma: 1
41
+ },
42
+ },
43
+ sourceData: SegcifFormat.create(source),
44
+ customProperties: new CustomProperties(),
45
+ _propertyData: { ownerId: params === null || params === void 0 ? void 0 : params.ownerId },
46
+ };
47
+ Volume.PickingGranularity.set(v, 'object');
48
+ segments = new Map();
49
+ sets = new Map();
50
+ _a = source.segmentation_data_table, segment_id = _a.segment_id, set_id = _a.set_id;
51
+ for (i = 0, il = segment_id.rowCount; i < il; ++i) {
52
+ segment = segment_id.value(i);
53
+ set = set_id.value(i);
54
+ if (set === 0 || segment === 0)
55
+ continue;
56
+ if (!sets.has(set))
57
+ sets.set(set, new Set());
58
+ sets.get(set).add(segment);
59
+ }
60
+ sets.forEach(function (segs, set) {
61
+ segs.forEach(function (seg) {
62
+ if (!segments.has(seg))
63
+ segments.set(seg, new Set());
64
+ segments.get(seg).add(set);
65
+ });
66
+ });
67
+ c = [0, 0, 0];
68
+ getCoords = t.space.getCoords;
69
+ d = t.data;
70
+ _b = v.grid.cells.space.dimensions, xn = _b[0], yn = _b[1], zn = _b[2];
71
+ xn1 = xn - 1;
72
+ yn1 = yn - 1;
73
+ zn1 = zn - 1;
74
+ setBounds = {};
75
+ sets.forEach(function (v, k) {
76
+ setBounds[k] = [xn1, yn1, zn1, -1, -1, -1];
77
+ });
78
+ for (i = 0, il = d.length; i < il; ++i) {
79
+ v_1 = d[i];
80
+ if (v_1 === 0)
81
+ continue;
82
+ getCoords(i, c);
83
+ b = setBounds[v_1];
84
+ if (c[0] < b[0])
85
+ b[0] = c[0];
86
+ if (c[1] < b[1])
87
+ b[1] = c[1];
88
+ if (c[2] < b[2])
89
+ b[2] = c[2];
90
+ if (c[0] > b[3])
91
+ b[3] = c[0];
92
+ if (c[1] > b[4])
93
+ b[4] = c[1];
94
+ if (c[2] > b[5])
95
+ b[5] = c[2];
96
+ }
97
+ bounds = {};
98
+ segments.forEach(function (v, k) {
99
+ bounds[k] = Box3D.create(Vec3.create(xn1, yn1, zn1), Vec3.create(-1, -1, -1));
100
+ });
101
+ objectForEach(setBounds, function (b, s) {
102
+ sets.get(parseInt(s)).forEach(function (seg) {
103
+ var sb = bounds[seg];
104
+ if (b[0] < sb.min[0])
105
+ sb.min[0] = b[0];
106
+ if (b[1] < sb.min[1])
107
+ sb.min[1] = b[1];
108
+ if (b[2] < sb.min[2])
109
+ sb.min[2] = b[2];
110
+ if (b[3] > sb.max[0])
111
+ sb.max[0] = b[3];
112
+ if (b[4] > sb.max[1])
113
+ sb.max[1] = b[4];
114
+ if (b[5] > sb.max[2])
115
+ sb.max[2] = b[5];
116
+ });
117
+ });
118
+ Volume.Segmentation.set(v, { segments: segments, sets: sets, bounds: bounds, labels: (_c = params === null || params === void 0 ? void 0 : params.segmentLabels) !== null && _c !== void 0 ? _c : {} });
119
+ return [2 /*return*/, v];
120
+ });
121
+ }); });
122
+ }
123
+ //
124
+ export { SegcifFormat };
125
+ var SegcifFormat;
126
+ (function (SegcifFormat) {
127
+ function is(x) {
128
+ return (x === null || x === void 0 ? void 0 : x.kind) === 'segcif';
129
+ }
130
+ SegcifFormat.is = is;
131
+ function create(segcif) {
132
+ return { kind: 'segcif', name: segcif._name, data: segcif };
133
+ }
134
+ SegcifFormat.create = create;
135
+ })(SegcifFormat || (SegcifFormat = {}));
@@ -12,7 +12,7 @@ export declare const HighlightLoci: import("../../../mol-state/transformer").Sta
12
12
  hoverHighlightOnly: Binding;
13
13
  hoverHighlightOnlyExtend: Binding;
14
14
  }>;
15
- ignore: PD.Value<("element-loci" | "structure-loci" | "bond-loci" | "volume-loci" | "isosurface-loci" | "cell-loci" | "every-loci" | "empty-loci" | "data-loci" | "shape-loci" | "group-loci")[]>;
15
+ ignore: PD.Value<("element-loci" | "structure-loci" | "bond-loci" | "volume-loci" | "isosurface-loci" | "cell-loci" | "segment-loci" | "every-loci" | "empty-loci" | "data-loci" | "shape-loci" | "group-loci")[]>;
16
16
  preferAtoms: PD.BooleanParam;
17
17
  mark: PD.BooleanParam;
18
18
  }>>;
@@ -25,7 +25,7 @@ export declare const SelectLoci: import("../../../mol-state/transformer").StateT
25
25
  clickDeselect: Binding;
26
26
  clickDeselectAllOnEmpty: Binding;
27
27
  }>;
28
- ignore: PD.Value<("element-loci" | "structure-loci" | "bond-loci" | "volume-loci" | "isosurface-loci" | "cell-loci" | "every-loci" | "empty-loci" | "data-loci" | "shape-loci" | "group-loci")[]>;
28
+ ignore: PD.Value<("element-loci" | "structure-loci" | "bond-loci" | "volume-loci" | "isosurface-loci" | "cell-loci" | "segment-loci" | "every-loci" | "empty-loci" | "data-loci" | "shape-loci" | "group-loci")[]>;
29
29
  preferAtoms: PD.BooleanParam;
30
30
  mark: PD.BooleanParam;
31
31
  }>>;
@@ -22,6 +22,7 @@ declare const StructureFocusRepresentationParams: (plugin: PluginContext) => {
22
22
  components: PD.MultiSelect<"target" | "surroundings" | "interactions">;
23
23
  excludeTargetFromSurroundings: PD.BooleanParam;
24
24
  ignoreHydrogens: PD.BooleanParam;
25
+ ignoreHydrogensVariant: PD.Select<"all" | "non-polar">;
25
26
  ignoreLight: PD.BooleanParam;
26
27
  material: PD.Group<PD.Normalize<{
27
28
  metalness: number;
@@ -49,6 +49,7 @@ var StructureFocusRepresentationParams = function (plugin) {
49
49
  components: PD.MultiSelect(FocusComponents, PD.arrayToOptions(FocusComponents)),
50
50
  excludeTargetFromSurroundings: PD.Boolean(false, { label: 'Exclude Target', description: 'Exclude the focus "target" from the surroudings component.' }),
51
51
  ignoreHydrogens: PD.Boolean(false),
52
+ ignoreHydrogensVariant: PD.Select('all', PD.arrayToOptions(['all', 'non-polar'])),
52
53
  ignoreLight: PD.Boolean(false),
53
54
  material: Material.getParam(),
54
55
  clip: PD.Group(Clip.Params),
@@ -79,7 +80,7 @@ var StructureFocusRepresentationBehavior = /** @class */ (function (_super) {
79
80
  StructureFocusRepresentationBehavior.prototype.getReprParams = function (reprParams) {
80
81
  return __assign(__assign({}, reprParams), { type: {
81
82
  name: reprParams.type.name,
82
- params: __assign(__assign({}, reprParams.type.params), { ignoreHydrogens: this.params.ignoreHydrogens, ignoreLight: this.params.ignoreLight, material: this.params.material, clip: this.params.clip })
83
+ params: __assign(__assign({}, reprParams.type.params), { ignoreHydrogens: this.params.ignoreHydrogens, ignoreHydrogensVariant: this.params.ignoreHydrogensVariant, ignoreLight: this.params.ignoreLight, material: this.params.material, clip: this.params.clip })
83
84
  } });
84
85
  };
85
86
  StructureFocusRepresentationBehavior.prototype.ensureShape = function (cell) {
@@ -9,12 +9,12 @@ import { Volume } from '../../../../mol-model/volume';
9
9
  import { Structure } from '../../../../mol-model/structure';
10
10
  declare const VolumeServerInfo_base: {
11
11
  new (data: VolumeServerInfo.Data, props?: {
12
- label: string; /** Precision data the server can show. */
12
+ /** Precision data the server can show. */
13
+ label: string;
13
14
  description?: string | undefined;
14
15
  } | undefined): {
15
16
  id: import("../../../../mol-util/uuid").UUID;
16
17
  type: PluginStateObject.TypeInfo;
17
- /** The value are stored in blockSize^3 cubes */
18
18
  label: string;
19
19
  description?: string | undefined;
20
20
  data: VolumeServerInfo.Data;
@@ -23,7 +23,6 @@ declare const VolumeServerInfo_base: {
23
23
  is(obj?: import("../../../../mol-state/object").StateObject<any, import("../../../../mol-state/object").StateObject.Type<any>> | undefined): obj is {
24
24
  id: import("../../../../mol-util/uuid").UUID;
25
25
  type: PluginStateObject.TypeInfo;
26
- /** The value are stored in blockSize^3 cubes */
27
26
  label: string;
28
27
  description?: string | undefined;
29
28
  data: VolumeServerInfo.Data;
@@ -244,6 +244,7 @@ export declare const PluginCommands: {
244
244
  scale: any;
245
245
  threshold: any;
246
246
  color: any;
247
+ includeTransparent: any;
247
248
  }>, "on">;
248
249
  antialiasing: import("../mol-util/param-definition").ParamDefinition.NamedParams<import("../mol-util/param-definition").ParamDefinition.Normalize<unknown>, "off"> | import("../mol-util/param-definition").ParamDefinition.NamedParams<import("../mol-util/param-definition").ParamDefinition.Normalize<{
249
250
  edgeThreshold: any;
@@ -1,2 +1,2 @@
1
- export var PLUGIN_VERSION = '3.26.0';
2
- export var PLUGIN_VERSION_DATE = new Date(typeof __MOLSTAR_DEBUG_TIMESTAMP__ !== 'undefined' ? __MOLSTAR_DEBUG_TIMESTAMP__ : 1670184977371);
1
+ export var PLUGIN_VERSION = '3.28.0';
2
+ export var PLUGIN_VERSION_DATE = new Date(typeof __MOLSTAR_DEBUG_TIMESTAMP__ !== 'undefined' ? __MOLSTAR_DEBUG_TIMESTAMP__ : 1671492998173);
@@ -129,6 +129,10 @@ export var AnimateModelIndex = PluginStateAnimation.create({
129
129
  var durationInMs = params.duration.name === 'fixed'
130
130
  ? params.duration.params.durationInS * 1000
131
131
  : Math.ceil(1000 * traj.data.frameCount / params.duration.params.targetFps);
132
+ if (params.mode.name === 'once' && t.current >= durationInMs) {
133
+ isEnd = true;
134
+ return { modelIndex: traj.data.frameCount - 1 };
135
+ }
132
136
  var phase = (t.current % durationInMs) / durationInMs;
133
137
  if (params.mode.name === 'loop') {
134
138
  if (params.mode.params.direction === 'backward') {
@@ -141,7 +145,6 @@ export var AnimateModelIndex = PluginStateAnimation.create({
141
145
  phase = 2 - phase;
142
146
  }
143
147
  var modelIndex = Math.min(Math.floor(traj.data.frameCount * phase), traj.data.frameCount - 1);
144
- isEnd = isEnd || modelIndex === traj.data.frameCount - 1;
145
148
  return { modelIndex: modelIndex };
146
149
  }
147
150
  });
@@ -66,6 +66,7 @@ export declare const PresetTrajectoryHierarchy: {
66
66
  }>, "symmetry-assembly"> | undefined;
67
67
  representationPresetParams: PD.Normalize<{
68
68
  ignoreHydrogens: any;
69
+ ignoreHydrogensVariant: any;
69
70
  ignoreLight: any;
70
71
  quality: any;
71
72
  theme: any;
@@ -91,6 +92,7 @@ export declare const PresetTrajectoryHierarchy: {
91
92
  useDefaultIfSingleModel: boolean | undefined;
92
93
  representationPresetParams: PD.Normalize<{
93
94
  ignoreHydrogens: any;
95
+ ignoreHydrogensVariant: any;
94
96
  ignoreLight: any;
95
97
  quality: any;
96
98
  theme: any;
@@ -48,6 +48,7 @@ export declare class TrajectoryHierarchyBuilder {
48
48
  }>, "symmetry-assembly"> | undefined;
49
49
  representationPresetParams: PD.Normalize<{
50
50
  ignoreHydrogens: any;
51
+ ignoreHydrogensVariant: any;
51
52
  ignoreLight: any;
52
53
  quality: any;
53
54
  theme: any;
@@ -29,13 +29,14 @@ export declare namespace StructureRepresentationPresetProvider {
29
29
  };
30
30
  const CommonParams: {
31
31
  ignoreHydrogens: PD.Base<boolean | undefined>;
32
+ ignoreHydrogensVariant: PD.Base<"all" | "non-polar" | undefined>;
32
33
  ignoreLight: PD.Base<boolean | undefined>;
33
34
  quality: PD.Base<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest" | undefined>;
34
35
  theme: PD.Base<PD.Normalize<{
35
- globalName: "uniform" | "occupancy" | "element-index" | "element-symbol" | "hydrophobicity" | "shape-group" | "uncertainty" | "carbohydrate-symbol" | "chain-id" | "operator-name" | "entity-id" | "entity-source" | "model-index" | "structure-index" | "molecule-type" | "polymer-id" | "polymer-index" | "residue-name" | "secondary-structure" | "sequence-id" | "unit-index" | "illustrative" | "trajectory-index" | "operator-hkl" | "partial-charge" | "atom-id" | "volume-value" | "external-volume" | undefined;
36
+ globalName: "uniform" | "occupancy" | "element-index" | "element-symbol" | "hydrophobicity" | "shape-group" | "uncertainty" | "carbohydrate-symbol" | "chain-id" | "operator-name" | "entity-id" | "entity-source" | "model-index" | "structure-index" | "molecule-type" | "polymer-id" | "polymer-index" | "residue-name" | "secondary-structure" | "sequence-id" | "unit-index" | "illustrative" | "trajectory-index" | "operator-hkl" | "partial-charge" | "atom-id" | "volume-value" | "volume-segment" | "external-volume" | undefined;
36
37
  globalColorParams: any;
37
38
  carbonColor: "element-symbol" | "chain-id" | "operator-name" | undefined;
38
- symmetryColor: "uniform" | "occupancy" | "element-index" | "element-symbol" | "hydrophobicity" | "shape-group" | "uncertainty" | "carbohydrate-symbol" | "chain-id" | "operator-name" | "entity-id" | "entity-source" | "model-index" | "structure-index" | "molecule-type" | "polymer-id" | "polymer-index" | "residue-name" | "secondary-structure" | "sequence-id" | "unit-index" | "illustrative" | "trajectory-index" | "operator-hkl" | "partial-charge" | "atom-id" | "volume-value" | "external-volume" | undefined;
39
+ symmetryColor: "uniform" | "occupancy" | "element-index" | "element-symbol" | "hydrophobicity" | "shape-group" | "uncertainty" | "carbohydrate-symbol" | "chain-id" | "operator-name" | "entity-id" | "entity-source" | "model-index" | "structure-index" | "molecule-type" | "polymer-id" | "polymer-index" | "residue-name" | "secondary-structure" | "sequence-id" | "unit-index" | "illustrative" | "trajectory-index" | "operator-hkl" | "partial-charge" | "atom-id" | "volume-value" | "volume-segment" | "external-volume" | undefined;
39
40
  symmetryColorParams: any;
40
41
  focus: PD.Normalize<{
41
42
  name: any;
@@ -47,13 +48,14 @@ export declare namespace StructureRepresentationPresetProvider {
47
48
  function reprBuilder(plugin: PluginContext, params: CommonParams, structure?: Structure): {
48
49
  update: import("../../../mol-state/state/builder").StateBuilder.Root;
49
50
  builder: import("./representation").StructureRepresentationBuilder;
50
- color: "uniform" | "occupancy" | "element-index" | "element-symbol" | "hydrophobicity" | "shape-group" | "uncertainty" | "carbohydrate-symbol" | "chain-id" | "operator-name" | "entity-id" | "entity-source" | "model-index" | "structure-index" | "molecule-type" | "polymer-id" | "polymer-index" | "residue-name" | "secondary-structure" | "sequence-id" | "unit-index" | "illustrative" | "trajectory-index" | "operator-hkl" | "partial-charge" | "atom-id" | "volume-value" | "external-volume" | undefined;
51
- symmetryColor: "uniform" | "occupancy" | "element-index" | "element-symbol" | "hydrophobicity" | "shape-group" | "uncertainty" | "carbohydrate-symbol" | "chain-id" | "operator-name" | "entity-id" | "entity-source" | "model-index" | "structure-index" | "molecule-type" | "polymer-id" | "polymer-index" | "residue-name" | "secondary-structure" | "sequence-id" | "unit-index" | "illustrative" | "trajectory-index" | "operator-hkl" | "partial-charge" | "atom-id" | "volume-value" | "external-volume" | undefined;
51
+ color: "uniform" | "occupancy" | "element-index" | "element-symbol" | "hydrophobicity" | "shape-group" | "uncertainty" | "carbohydrate-symbol" | "chain-id" | "operator-name" | "entity-id" | "entity-source" | "model-index" | "structure-index" | "molecule-type" | "polymer-id" | "polymer-index" | "residue-name" | "secondary-structure" | "sequence-id" | "unit-index" | "illustrative" | "trajectory-index" | "operator-hkl" | "partial-charge" | "atom-id" | "volume-value" | "volume-segment" | "external-volume" | undefined;
52
+ symmetryColor: "uniform" | "occupancy" | "element-index" | "element-symbol" | "hydrophobicity" | "shape-group" | "uncertainty" | "carbohydrate-symbol" | "chain-id" | "operator-name" | "entity-id" | "entity-source" | "model-index" | "structure-index" | "molecule-type" | "polymer-id" | "polymer-index" | "residue-name" | "secondary-structure" | "sequence-id" | "unit-index" | "illustrative" | "trajectory-index" | "operator-hkl" | "partial-charge" | "atom-id" | "volume-value" | "volume-segment" | "external-volume" | undefined;
52
53
  symmetryColorParams: any;
53
54
  globalColorParams: any;
54
55
  typeParams: {
55
56
  quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
56
57
  ignoreHydrogens: boolean;
58
+ ignoreHydrogensVariant: "all" | "non-polar";
57
59
  ignoreLight: boolean;
58
60
  };
59
61
  ballAndStickColor: Partial<PD.Values<{
@@ -265,6 +267,7 @@ export declare const PresetStructureRepresentations: {
265
267
  empty: StructureRepresentationPresetProvider<unknown, {}>;
266
268
  auto: StructureRepresentationPresetProvider<{
267
269
  ignoreHydrogens: boolean | undefined;
270
+ ignoreHydrogensVariant: "all" | "non-polar" | undefined;
268
271
  ignoreLight: boolean | undefined;
269
272
  quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest" | undefined;
270
273
  theme: PD.Normalize<{
@@ -297,6 +300,7 @@ export declare const PresetStructureRepresentations: {
297
300
  'atomic-detail': StructureRepresentationPresetProvider<{
298
301
  showCarbohydrateSymbol: boolean;
299
302
  ignoreHydrogens: boolean | undefined;
303
+ ignoreHydrogensVariant: "all" | "non-polar" | undefined;
300
304
  ignoreLight: boolean | undefined;
301
305
  quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest" | undefined;
302
306
  theme: PD.Normalize<{
@@ -321,6 +325,7 @@ export declare const PresetStructureRepresentations: {
321
325
  }>;
322
326
  'polymer-cartoon': StructureRepresentationPresetProvider<{
323
327
  ignoreHydrogens: boolean | undefined;
328
+ ignoreHydrogensVariant: "all" | "non-polar" | undefined;
324
329
  ignoreLight: boolean | undefined;
325
330
  quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest" | undefined;
326
331
  theme: PD.Normalize<{
@@ -344,6 +349,7 @@ export declare const PresetStructureRepresentations: {
344
349
  }>;
345
350
  'polymer-and-ligand': StructureRepresentationPresetProvider<{
346
351
  ignoreHydrogens: boolean | undefined;
352
+ ignoreHydrogensVariant: "all" | "non-polar" | undefined;
347
353
  ignoreLight: boolean | undefined;
348
354
  quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest" | undefined;
349
355
  theme: PD.Normalize<{
@@ -382,6 +388,7 @@ export declare const PresetStructureRepresentations: {
382
388
  }>;
383
389
  'protein-and-nucleic': StructureRepresentationPresetProvider<{
384
390
  ignoreHydrogens: boolean | undefined;
391
+ ignoreHydrogensVariant: "all" | "non-polar" | undefined;
385
392
  ignoreLight: boolean | undefined;
386
393
  quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest" | undefined;
387
394
  theme: PD.Normalize<{
@@ -407,6 +414,7 @@ export declare const PresetStructureRepresentations: {
407
414
  }>;
408
415
  'coarse-surface': StructureRepresentationPresetProvider<{
409
416
  ignoreHydrogens: boolean | undefined;
417
+ ignoreHydrogensVariant: "all" | "non-polar" | undefined;
410
418
  ignoreLight: boolean | undefined;
411
419
  quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest" | undefined;
412
420
  theme: PD.Normalize<{
@@ -433,6 +441,7 @@ export declare const PresetStructureRepresentations: {
433
441
  illustrative: StructureRepresentationPresetProvider<{
434
442
  showCarbohydrateSymbol: boolean;
435
443
  ignoreHydrogens: boolean | undefined;
444
+ ignoreHydrogensVariant: "all" | "non-polar" | undefined;
436
445
  ignoreLight: boolean | undefined;
437
446
  quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest" | undefined;
438
447
  theme: PD.Normalize<{
@@ -22,6 +22,7 @@ export function StructureRepresentationPresetProvider(repr) { return repr; }
22
22
  (function (StructureRepresentationPresetProvider) {
23
23
  StructureRepresentationPresetProvider.CommonParams = {
24
24
  ignoreHydrogens: PD.Optional(PD.Boolean(false)),
25
+ ignoreHydrogensVariant: PD.Optional(PD.Select('all', PD.arrayToOptions(['all', 'non-polar']))),
25
26
  ignoreLight: PD.Optional(PD.Boolean(false)),
26
27
  quality: PD.Optional(PD.Select('auto', VisualQualityOptions)),
27
28
  theme: PD.Optional(PD.Group({
@@ -50,15 +51,19 @@ export function StructureRepresentationPresetProvider(repr) { return repr; }
50
51
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
51
52
  var update = plugin.state.data.build();
52
53
  var builder = plugin.builders.structure.representation;
54
+ var h = plugin.managers.structure.component.state.options.hydrogens;
53
55
  var typeParams = {
54
56
  quality: plugin.managers.structure.component.state.options.visualQuality,
55
- ignoreHydrogens: !plugin.managers.structure.component.state.options.showHydrogens,
57
+ ignoreHydrogens: h !== 'all',
58
+ ignoreHydrogensVariant: (h === 'only-polar' ? 'non-polar' : 'all'),
56
59
  ignoreLight: plugin.managers.structure.component.state.options.ignoreLight,
57
60
  };
58
61
  if (params.quality && params.quality !== 'auto')
59
62
  typeParams.quality = params.quality;
60
63
  if (params.ignoreHydrogens !== void 0)
61
64
  typeParams.ignoreHydrogens = !!params.ignoreHydrogens;
65
+ if (params.ignoreHydrogensVariant !== void 0)
66
+ typeParams.ignoreHydrogensVariant = params.ignoreHydrogensVariant;
62
67
  if (params.ignoreLight !== void 0)
63
68
  typeParams.ignoreLight = !!params.ignoreLight;
64
69
  var color = ((_a = params.theme) === null || _a === void 0 ? void 0 : _a.globalName) ? (_b = params.theme) === null || _b === void 0 ? void 0 : _b.globalName : void 0;
@@ -17,6 +17,7 @@ export declare class StructureRepresentationBuilder {
17
17
  private get dataState();
18
18
  readonly defaultProvider: StructureRepresentationPresetProvider<{
19
19
  ignoreHydrogens: boolean | undefined;
20
+ ignoreHydrogensVariant: "all" | "non-polar" | undefined;
20
21
  ignoreLight: boolean | undefined;
21
22
  quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest" | undefined;
22
23
  theme: PD.Normalize<{
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2019-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2019-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
  * @author David Sehnal <david.sehnal@gmail.com>
@@ -19,6 +19,6 @@ export interface DataFormatProvider<P = any, R = any, V = any> {
19
19
  visuals?(plugin: PluginContext, data: R): Promise<V> | undefined;
20
20
  }
21
21
  export declare function DataFormatProvider<P extends DataFormatProvider>(provider: P): P;
22
- type cifVariants = 'dscif' | 'coreCif' | -1;
22
+ type cifVariants = 'dscif' | 'segcif' | 'coreCif' | -1;
23
23
  export declare function guessCifVariant(info: FileInfo, data: Uint8Array | string): cifVariants;
24
24
  export {};
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2019-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2019-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
  * @author David Sehnal <david.sehnal@gmail.com>
@@ -11,15 +11,23 @@ export function guessCifVariant(info, data) {
11
11
  try {
12
12
  // TODO: find a way to run msgpackDecode only once
13
13
  // now it is run twice, here and during file parsing
14
- if (decodeMsgPack(data).encoder.startsWith('VolumeServer'))
14
+ var encoder = decodeMsgPack(data).encoder;
15
+ if (encoder.startsWith('VolumeServer'))
15
16
  return 'dscif';
17
+ // TODO: assumes volseg-volume-server only serves segments
18
+ if (encoder.startsWith('volseg-volume-server'))
19
+ return 'segcif';
20
+ }
21
+ catch (e) {
22
+ console.error(e);
16
23
  }
17
- catch (_a) { }
18
24
  }
19
25
  else if (info.ext === 'cif') {
20
26
  var str = data;
21
27
  if (str.startsWith('data_SERVER\n#\n_density_server_result'))
22
28
  return 'dscif';
29
+ if (str.startsWith('data_SERVER\n#\ndata_SEGMENTATION_DATA'))
30
+ return 'segcif';
23
31
  if (str.includes('atom_site_fract_x') || str.includes('atom_site.fract_x'))
24
32
  return 'coreCif';
25
33
  }
@@ -109,15 +109,16 @@ var DataFormatRegistry = /** @class */ (function () {
109
109
  this._map.delete(name);
110
110
  };
111
111
  DataFormatRegistry.prototype.auto = function (info, dataStateObject) {
112
+ var _a, _b;
112
113
  for (var i = 0, il = this.list.length; i < il; ++i) {
113
- var provider = this._list[i].provider;
114
+ var p = this._list[i].provider;
114
115
  var hasExt = false;
115
- if (provider.binaryExtensions && provider.binaryExtensions.indexOf(info.ext) >= 0)
116
+ if ((_a = p.binaryExtensions) === null || _a === void 0 ? void 0 : _a.includes(info.ext))
116
117
  hasExt = true;
117
- else if (provider.stringExtensions && provider.stringExtensions.indexOf(info.ext) >= 0)
118
+ else if ((_b = p.stringExtensions) === null || _b === void 0 ? void 0 : _b.includes(info.ext))
118
119
  hasExt = true;
119
- if (hasExt && (!provider.isApplicable || provider.isApplicable(info, dataStateObject.data)))
120
- return provider;
120
+ if (hasExt && (!p.isApplicable || p.isApplicable(info, dataStateObject.data)))
121
+ return p;
121
122
  }
122
123
  return;
123
124
  };
@@ -110,6 +110,20 @@ export declare const DscifProvider: {
110
110
  volumes: StateObjectSelector<PluginStateObject.Volume.Data>[];
111
111
  }) => Promise<StateObjectSelector<PluginStateObject.Volume.Representation3D, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>[]>;
112
112
  };
113
+ export declare const SegcifProvider: {
114
+ label: string;
115
+ description: string;
116
+ category: string;
117
+ stringExtensions: string[];
118
+ binaryExtensions: string[];
119
+ isApplicable: (info: import("../../mol-util/file-info").FileInfo, data: string | Uint8Array) => boolean;
120
+ parse: (plugin: PluginContext, data: import("../../mol-state").StateObjectRef<PluginStateObject.Data.String | PluginStateObject.Data.Binary>) => Promise<{
121
+ volumes: StateObjectSelector<PluginStateObject.Volume.Data, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>[];
122
+ }>;
123
+ visuals: (plugin: PluginContext, data: {
124
+ volumes: StateObjectSelector<PluginStateObject.Volume.Data>[];
125
+ }) => Promise<StateObjectSelector<PluginStateObject.Volume.Representation3D, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>[]>;
126
+ };
113
127
  export declare const BuiltInVolumeFormats: readonly [readonly ["ccp4", {
114
128
  label: string;
115
129
  description: string;
@@ -196,6 +210,19 @@ export declare const BuiltInVolumeFormats: readonly [readonly ["ccp4", {
196
210
  visuals: (plugin: PluginContext, data: {
197
211
  volumes: StateObjectSelector<PluginStateObject.Volume.Data>[];
198
212
  }) => Promise<StateObjectSelector<PluginStateObject.Volume.Representation3D, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>[]>;
213
+ }], readonly ["segcif", {
214
+ label: string;
215
+ description: string;
216
+ category: string;
217
+ stringExtensions: string[];
218
+ binaryExtensions: string[];
219
+ isApplicable: (info: import("../../mol-util/file-info").FileInfo, data: string | Uint8Array) => boolean;
220
+ parse: (plugin: PluginContext, data: import("../../mol-state").StateObjectRef<PluginStateObject.Data.String | PluginStateObject.Data.Binary>) => Promise<{
221
+ volumes: StateObjectSelector<PluginStateObject.Volume.Data, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>[];
222
+ }>;
223
+ visuals: (plugin: PluginContext, data: {
224
+ volumes: StateObjectSelector<PluginStateObject.Volume.Data>[];
225
+ }) => Promise<StateObjectSelector<PluginStateObject.Volume.Representation3D, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>[]>;
199
226
  }]];
200
227
  export type BuildInVolumeFormat = (typeof BuiltInVolumeFormats)[number][0];
201
228
  export {};
@@ -315,10 +315,74 @@ export var DscifProvider = DataFormatProvider({
315
315
  });
316
316
  }); }
317
317
  });
318
+ export var SegcifProvider = DataFormatProvider({
319
+ label: 'Segmentation CIF',
320
+ description: 'Segmentation CIF',
321
+ category: VolumeFormatCategory,
322
+ stringExtensions: ['cif'],
323
+ binaryExtensions: ['bcif'],
324
+ isApplicable: function (info, data) {
325
+ return guessCifVariant(info, data) === 'segcif' ? true : false;
326
+ },
327
+ parse: function (plugin, data) { return __awaiter(void 0, void 0, void 0, function () {
328
+ var cifCell, b, blocks, volumes, _i, blocks_2, block;
329
+ var _a;
330
+ return __generator(this, function (_b) {
331
+ switch (_b.label) {
332
+ case 0: return [4 /*yield*/, plugin.build().to(data).apply(StateTransforms.Data.ParseCif).commit()];
333
+ case 1:
334
+ cifCell = _b.sent();
335
+ b = plugin.build().to(cifCell);
336
+ blocks = cifCell.obj.data.blocks;
337
+ if (blocks.length === 0)
338
+ throw new Error('no data blocks');
339
+ volumes = [];
340
+ for (_i = 0, blocks_2 = blocks; _i < blocks_2.length; _i++) {
341
+ block = blocks_2[_i];
342
+ // Skip "server" data block.
343
+ if (block.header.toUpperCase() === 'SERVER')
344
+ continue;
345
+ if (((_a = block.categories['volume_data_3d_info']) === null || _a === void 0 ? void 0 : _a.rowCount) > 0) {
346
+ volumes.push(b.apply(StateTransforms.Volume.VolumeFromSegmentationCif, { blockHeader: block.header }).selector);
347
+ }
348
+ }
349
+ return [4 /*yield*/, b.commit()];
350
+ case 2:
351
+ _b.sent();
352
+ return [2 /*return*/, { volumes: volumes }];
353
+ }
354
+ });
355
+ }); },
356
+ visuals: function (plugin, data) { return __awaiter(void 0, void 0, void 0, function () {
357
+ var volumes, tree, visuals, segmentation;
358
+ return __generator(this, function (_a) {
359
+ switch (_a.label) {
360
+ case 0:
361
+ volumes = data.volumes;
362
+ tree = plugin.build();
363
+ visuals = [];
364
+ if (volumes.length > 0) {
365
+ segmentation = Volume.Segmentation.get(volumes[0].data);
366
+ if (segmentation) {
367
+ visuals[visuals.length] = tree
368
+ .to(volumes[0])
369
+ .apply(StateTransforms.Representation.VolumeRepresentation3D, VolumeRepresentation3DHelpers.getDefaultParams(plugin, 'segment', volumes[0].data, { alpha: 1, instanceGranularity: true }, 'volume-segment', {}))
370
+ .selector;
371
+ }
372
+ }
373
+ return [4 /*yield*/, tree.commit()];
374
+ case 1:
375
+ _a.sent();
376
+ return [2 /*return*/, visuals];
377
+ }
378
+ });
379
+ }); }
380
+ });
318
381
  export var BuiltInVolumeFormats = [
319
382
  ['ccp4', Ccp4Provider],
320
383
  ['dsn6', Dsn6Provider],
321
384
  ['cube', CubeProvider],
322
385
  ['dx', DxProvider],
323
386
  ['dscif', DscifProvider],
387
+ ['segcif', SegcifProvider],
324
388
  ];
@@ -58,7 +58,7 @@ declare class StructureComponentManager extends StatefulPluginComponent<Structur
58
58
  }
59
59
  declare namespace StructureComponentManager {
60
60
  const OptionsParams: {
61
- showHydrogens: PD.BooleanParam;
61
+ hydrogens: PD.Select<"all" | "hide-all" | "only-polar">;
62
62
  visualQuality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
63
63
  ignoreLight: PD.BooleanParam;
64
64
  materialStyle: PD.Group<PD.Normalize<{