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
@@ -75,7 +75,8 @@ var StructureComponentManager = /** @class */ (function (_super) {
75
75
  case 1:
76
76
  _a.sent();
77
77
  return [4 /*yield*/, this.plugin.state.updateBehavior(StructureFocusRepresentation, function (p) {
78
- p.ignoreHydrogens = !options.showHydrogens;
78
+ p.ignoreHydrogens = options.hydrogens !== 'all';
79
+ p.ignoreHydrogensVariant = options.hydrogens === 'only-polar' ? 'non-polar' : 'all';
79
80
  p.ignoreLight = options.ignoreLight;
80
81
  p.material = options.materialStyle;
81
82
  p.clip = options.clipObjects;
@@ -95,16 +96,18 @@ var StructureComponentManager = /** @class */ (function (_super) {
95
96
  });
96
97
  };
97
98
  StructureComponentManager.prototype.updateReprParams = function (update, component) {
98
- var _a = this.state.options, showHydrogens = _a.showHydrogens, quality = _a.visualQuality, ignoreLight = _a.ignoreLight, material = _a.materialStyle, clip = _a.clipObjects;
99
- var ignoreHydrogens = !showHydrogens;
99
+ var _a = this.state.options, hydrogens = _a.hydrogens, quality = _a.visualQuality, ignoreLight = _a.ignoreLight, material = _a.materialStyle, clip = _a.clipObjects;
100
+ var ignoreHydrogens = hydrogens !== 'all';
101
+ var ignoreHydrogensVariant = hydrogens === 'only-polar' ? 'non-polar' : 'all';
100
102
  for (var _i = 0, _b = component.representations; _i < _b.length; _i++) {
101
103
  var r = _b[_i];
102
104
  if (r.cell.transform.transformer !== StructureRepresentation3D)
103
105
  continue;
104
106
  var params = r.cell.transform.params;
105
- if (!!params.type.params.ignoreHydrogens !== ignoreHydrogens || params.type.params.quality !== quality || params.type.params.ignoreLight !== ignoreLight || !shallowEqual(params.type.params.material, material) || !PD.areEqual(Clip.Params, params.type.params.clip, clip)) {
107
+ if (!!params.type.params.ignoreHydrogens !== ignoreHydrogens || params.type.params.ignoreHydrogensVariant !== ignoreHydrogensVariant || params.type.params.quality !== quality || params.type.params.ignoreLight !== ignoreLight || !shallowEqual(params.type.params.material, material) || !PD.areEqual(Clip.Params, params.type.params.clip, clip)) {
106
108
  update.to(r.cell).update(function (old) {
107
109
  old.type.params.ignoreHydrogens = ignoreHydrogens;
110
+ old.type.params.ignoreHydrogensVariant = ignoreHydrogensVariant;
108
111
  old.type.params.quality = quality;
109
112
  old.type.params.ignoreLight = ignoreLight;
110
113
  old.type.params.material = material;
@@ -380,9 +383,10 @@ var StructureComponentManager = /** @class */ (function (_super) {
380
383
  var _this = this;
381
384
  if (components.length === 0)
382
385
  return;
383
- var _a = this.state.options, showHydrogens = _a.showHydrogens, quality = _a.visualQuality, ignoreLight = _a.ignoreLight, material = _a.materialStyle, clip = _a.clipObjects;
384
- var ignoreHydrogens = !showHydrogens;
385
- var typeParams = { ignoreHydrogens: ignoreHydrogens, quality: quality, ignoreLight: ignoreLight, material: material, clip: clip };
386
+ var _a = this.state.options, hydrogens = _a.hydrogens, quality = _a.visualQuality, ignoreLight = _a.ignoreLight, material = _a.materialStyle, clip = _a.clipObjects;
387
+ var ignoreHydrogens = hydrogens !== 'all';
388
+ var ignoreHydrogensVariant = hydrogens === 'only-polar' ? 'non-polar' : 'all';
389
+ var typeParams = { ignoreHydrogens: ignoreHydrogens, ignoreHydrogensVariant: ignoreHydrogensVariant, quality: quality, ignoreLight: ignoreLight, material: material, clip: clip };
386
390
  return this.plugin.dataTransaction(function () { return __awaiter(_this, void 0, void 0, function () {
387
391
  var _i, components_9, component;
388
392
  return __generator(this, function (_a) {
@@ -443,16 +447,17 @@ var StructureComponentManager = /** @class */ (function (_super) {
443
447
  var _this = this;
444
448
  return __generator(this, function (_a) {
445
449
  return [2 /*return*/, this.plugin.dataTransaction(function () { return __awaiter(_this, void 0, void 0, function () {
446
- var xs, _a, showHydrogens, quality, ignoreLight, material, clip, ignoreHydrogens, typeParams, componentKey, _i, xs_1, s, component;
450
+ var xs, _a, hydrogens, quality, ignoreLight, material, clip, ignoreHydrogens, ignoreHydrogensVariant, typeParams, componentKey, _i, xs_1, s, component;
447
451
  return __generator(this, function (_b) {
448
452
  switch (_b.label) {
449
453
  case 0:
450
454
  xs = structures || this.currentStructures;
451
455
  if (xs.length === 0)
452
456
  return [2 /*return*/];
453
- _a = this.state.options, showHydrogens = _a.showHydrogens, quality = _a.visualQuality, ignoreLight = _a.ignoreLight, material = _a.materialStyle, clip = _a.clipObjects;
454
- ignoreHydrogens = !showHydrogens;
455
- typeParams = { ignoreHydrogens: ignoreHydrogens, quality: quality, ignoreLight: ignoreLight, material: material, clip: clip };
457
+ _a = this.state.options, hydrogens = _a.hydrogens, quality = _a.visualQuality, ignoreLight = _a.ignoreLight, material = _a.materialStyle, clip = _a.clipObjects;
458
+ ignoreHydrogens = hydrogens !== 'all';
459
+ ignoreHydrogensVariant = hydrogens === 'only-polar' ? 'non-polar' : 'all';
460
+ typeParams = { ignoreHydrogens: ignoreHydrogens, ignoreHydrogensVariant: ignoreHydrogensVariant, quality: quality, ignoreLight: ignoreLight, material: material, clip: clip };
456
461
  componentKey = UUID.create22();
457
462
  _i = 0, xs_1 = xs;
458
463
  _b.label = 1;
@@ -625,9 +630,9 @@ var StructureComponentManager = /** @class */ (function (_super) {
625
630
  }(StatefulPluginComponent));
626
631
  (function (StructureComponentManager) {
627
632
  StructureComponentManager.OptionsParams = {
628
- showHydrogens: PD.Boolean(true, { description: 'Toggle display of hydrogen atoms in representations' }),
633
+ hydrogens: PD.Select('all', [['all', 'Show All'], ['hide-all', 'Hide All'], ['only-polar', 'Only Polar']], { description: 'Determine display of hydrogen atoms in representations' }),
629
634
  visualQuality: PD.Select('auto', VisualQualityOptions, { description: 'Control the visual/rendering quality of representations' }),
630
- ignoreLight: PD.Boolean(false, { description: 'Ignore light for stylized rendering of representtions' }),
635
+ ignoreLight: PD.Boolean(false, { description: 'Ignore light for stylized rendering of representations' }),
631
636
  materialStyle: Material.getParam(),
632
637
  clipObjects: PD.Group(Clip.Params),
633
638
  interactions: PD.Group(InteractionsProvider.defaultParams, { label: 'Non-covalent Interactions' }),
@@ -8,7 +8,6 @@ import { StructureElement } from '../../mol-model/structure';
8
8
  import { Volume } from '../../mol-model/volume';
9
9
  import { PluginContext } from '../../mol-plugin/context';
10
10
  import { VolumeRepresentationRegistry } from '../../mol-repr/volume/registry';
11
- import { VolumeParams } from '../../mol-repr/volume/representation';
12
11
  import { StateTransformer } from '../../mol-state';
13
12
  import { ColorTheme } from '../../mol-theme/color';
14
13
  import { SizeTheme } from '../../mol-theme/size';
@@ -132,7 +131,7 @@ declare const ThemeStrengthRepresentation3D: StateTransformer<SO.Molecule.Struct
132
131
  substanceStrength: number;
133
132
  }>>;
134
133
  export declare namespace VolumeRepresentation3DHelpers {
135
- function getDefaultParams(ctx: PluginContext, name: VolumeRepresentationRegistry.BuiltIn, volume: Volume, volumeParams?: Partial<PD.Values<VolumeParams>>): StateTransformer.Params<VolumeRepresentation3D>;
134
+ function getDefaultParams(ctx: PluginContext, name: VolumeRepresentationRegistry.BuiltIn, volume: Volume, volumeParams?: Partial<PD.Values<PD.Params>>, colorName?: ColorTheme.BuiltIn, colorParams?: Partial<ColorTheme.Props>, sizeName?: SizeTheme.BuiltIn, sizeParams?: Partial<SizeTheme.Props>): StateTransformer.Params<VolumeRepresentation3D>;
136
135
  function getDefaultParamsStatic(ctx: PluginContext, name: VolumeRepresentationRegistry.BuiltIn, volumeParams?: Partial<PD.Values<PD.Params>>, colorName?: ColorTheme.BuiltIn, colorParams?: Partial<ColorTheme.Props>, sizeName?: SizeTheme.BuiltIn, sizeParams?: Partial<SizeTheme.Props>): StateTransformer.Params<VolumeRepresentation3D>;
137
136
  function getDescription(props: any): string | undefined;
138
137
  }
@@ -803,16 +803,15 @@ var ThemeStrengthRepresentation3D = PluginStateTransform.BuiltIn({
803
803
  //
804
804
  export var VolumeRepresentation3DHelpers;
805
805
  (function (VolumeRepresentation3DHelpers) {
806
- function getDefaultParams(ctx, name, volume, volumeParams) {
806
+ function getDefaultParams(ctx, name, volume, volumeParams, colorName, colorParams, sizeName, sizeParams) {
807
807
  var type = ctx.representation.volume.registry.get(name);
808
- var themeDataCtx = { volume: volume };
809
- var colorParams = ctx.representation.volume.themes.colorThemeRegistry.get(type.defaultColorTheme.name).getParams(themeDataCtx);
810
- var sizeParams = ctx.representation.volume.themes.sizeThemeRegistry.get(type.defaultSizeTheme.name).getParams(themeDataCtx);
808
+ var colorType = ctx.representation.volume.themes.colorThemeRegistry.get(colorName || type.defaultColorTheme.name);
809
+ var sizeType = ctx.representation.volume.themes.sizeThemeRegistry.get(sizeName || type.defaultSizeTheme.name);
811
810
  var volumeDefaultParams = PD.getDefaultValues(type.getParams(ctx.representation.volume.themes, volume));
812
811
  return ({
813
812
  type: { name: name, params: volumeParams ? __assign(__assign({}, volumeDefaultParams), volumeParams) : volumeDefaultParams },
814
- colorTheme: { name: type.defaultColorTheme.name, params: PD.getDefaultValues(colorParams) },
815
- sizeTheme: { name: type.defaultSizeTheme.name, params: PD.getDefaultValues(sizeParams) }
813
+ colorTheme: { name: colorType.name, params: colorParams ? __assign(__assign({}, colorType.defaultValues), colorParams) : colorType.defaultValues },
814
+ sizeTheme: { name: sizeType.name, params: sizeParams ? __assign(__assign({}, sizeType.defaultValues), sizeParams) : sizeType.defaultValues }
816
815
  });
817
816
  }
818
817
  VolumeRepresentation3DHelpers.getDefaultParams = getDefaultParams;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2020 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 David Sehnal <david.sehnal@gmail.com>
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
@@ -13,6 +13,7 @@ export { VolumeFromCube };
13
13
  export { VolumeFromDx };
14
14
  export { AssignColorVolume };
15
15
  export { VolumeFromDensityServerCif };
16
+ export { VolumeFromSegmentationCif };
16
17
  type VolumeFromCcp4 = typeof VolumeFromCcp4;
17
18
  declare const VolumeFromCcp4: import("../../mol-state/transformer").StateTransformer<SO.Format.Ccp4, SO.Volume.Data, PD.Normalize<{
18
19
  voxelSize: Vec3;
@@ -36,6 +37,15 @@ declare const VolumeFromDensityServerCif: import("../../mol-state/transformer").
36
37
  blockHeader: string | undefined;
37
38
  entryId: string;
38
39
  }>>;
40
+ type VolumeFromSegmentationCif = typeof VolumeFromSegmentationCif;
41
+ declare const VolumeFromSegmentationCif: import("../../mol-state/transformer").StateTransformer<SO.Format.Cif, SO.Volume.Data, PD.Normalize<{
42
+ blockHeader: string | undefined;
43
+ segmentLabels: PD.Normalize<{
44
+ id: any;
45
+ label: any;
46
+ }>[];
47
+ ownerId: string;
48
+ }>>;
39
49
  type AssignColorVolume = typeof AssignColorVolume;
40
50
  declare const AssignColorVolume: import("../../mol-state/transformer").StateTransformer<SO.Volume.Data, SO.Volume.Data, PD.Normalize<{
41
51
  ref: string;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2020 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 David Sehnal <david.sehnal@gmail.com>
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
@@ -16,12 +16,14 @@ import { PluginStateObject as SO, PluginStateTransform } from '../objects';
16
16
  import { volumeFromCube } from '../../mol-model-formats/volume/cube';
17
17
  import { volumeFromDx } from '../../mol-model-formats/volume/dx';
18
18
  import { StateSelection } from '../../mol-state';
19
+ import { volumeFromSegmentationData } from '../../mol-model-formats/volume/segmentation';
19
20
  export { VolumeFromCcp4 };
20
21
  export { VolumeFromDsn6 };
21
22
  export { VolumeFromCube };
22
23
  export { VolumeFromDx };
23
24
  export { AssignColorVolume };
24
25
  export { VolumeFromDensityServerCif };
26
+ export { VolumeFromSegmentationCif };
25
27
  var VolumeFromCcp4 = PluginStateTransform.BuiltIn({
26
28
  name: 'volume-from-ccp4',
27
29
  display: { name: 'Volume from CCP4/MRC/MAP', description: 'Create Volume from CCP4/MRC/MAP data' },
@@ -199,6 +201,57 @@ var VolumeFromDensityServerCif = PluginStateTransform.BuiltIn({
199
201
  b === null || b === void 0 ? void 0 : b.data.customProperties.dispose();
200
202
  }
201
203
  });
204
+ var VolumeFromSegmentationCif = PluginStateTransform.BuiltIn({
205
+ name: 'volume-from-segmentation-cif',
206
+ display: { name: 'Volume from Segmentation CIF' },
207
+ from: SO.Format.Cif,
208
+ to: SO.Volume.Data,
209
+ params: function (a) {
210
+ var blocks = a === null || a === void 0 ? void 0 : a.data.blocks.slice(1);
211
+ var blockHeaderParam = blocks ?
212
+ PD.Optional(PD.Select(blocks[0] && blocks[0].header, blocks.map(function (b) { return [b.header, b.header]; }), { description: 'Header of the block to parse' }))
213
+ : PD.Optional(PD.Text(void 0, { description: 'Header of the block to parse. If none is specifed, the 1st data block in the file is used.' }));
214
+ return {
215
+ blockHeader: blockHeaderParam,
216
+ segmentLabels: PD.ObjectList({ id: PD.Numeric(-1), label: PD.Text('') }, function (s) { return "".concat(s.id, " = ").concat(s.label); }, { description: 'Mapping of segment IDs to segment labels' }),
217
+ ownerId: PD.Text('', { isHidden: true, description: 'Reference to the object which manages this volume' }),
218
+ };
219
+ }
220
+ })({
221
+ isApplicable: function (a) { return a.data.blocks.length > 0; },
222
+ apply: function (_a) {
223
+ var _this = this;
224
+ var a = _a.a, params = _a.params;
225
+ return Task.create('Parse segmentation CIF', function (ctx) { return __awaiter(_this, void 0, void 0, function () {
226
+ var header, block, segmentationCif, segmentLabels, _i, _a, segment, volume, _b, x, y, z, props;
227
+ return __generator(this, function (_c) {
228
+ switch (_c.label) {
229
+ case 0:
230
+ header = params.blockHeader || a.data.blocks[1].header;
231
+ block = a.data.blocks.find(function (b) { return b.header === header; });
232
+ if (!block)
233
+ throw new Error("Data block '".concat([header], "' not found."));
234
+ segmentationCif = CIF.schema.segmentation(block);
235
+ segmentLabels = {};
236
+ for (_i = 0, _a = params.segmentLabels; _i < _a.length; _i++) {
237
+ segment = _a[_i];
238
+ segmentLabels[segment.id] = segment.label;
239
+ }
240
+ return [4 /*yield*/, volumeFromSegmentationData(segmentationCif, { segmentLabels: segmentLabels, ownerId: params.ownerId }).runInContext(ctx)];
241
+ case 1:
242
+ volume = _c.sent();
243
+ _b = volume.grid.cells.space.dimensions, x = _b[0], y = _b[1], z = _b[2];
244
+ props = { label: segmentationCif.volume_data_3d_info.name.value(0), description: "Segmentation ".concat(x, "\u00D7").concat(y, "\u00D7").concat(z) };
245
+ return [2 /*return*/, new SO.Volume.Data(volume, props)];
246
+ }
247
+ });
248
+ }); });
249
+ },
250
+ dispose: function (_a) {
251
+ var b = _a.b;
252
+ b === null || b === void 0 ? void 0 : b.data.customProperties.dispose();
253
+ }
254
+ });
202
255
  var AssignColorVolume = PluginStateTransform.BuiltIn({
203
256
  name: 'assign-color-volume',
204
257
  display: { name: 'Assign Color Volume', description: 'Assigns another volume to be available for coloring.' },
@@ -34,6 +34,7 @@ export declare class LineGraphComponent extends React.Component<any, LineGraphCo
34
34
  private normalizePoint;
35
35
  private unNormalizePoint;
36
36
  private refCallBack;
37
+ private renderHistogram;
37
38
  private renderPoints;
38
39
  private renderLines;
39
40
  }
@@ -1,13 +1,16 @@
1
1
  import { __assign, __extends } from "tslib";
2
2
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
3
3
  /**
4
- * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
5
5
  *
6
6
  * @author Paul Luna <paulluna0215@gmail.com>
7
+ * @author David Sehnal <david.sehnal@gmail.com>
7
8
  */
8
9
  import { PointComponent } from './point-component';
9
10
  import * as React from 'react';
10
11
  import { Vec2 } from '../../../mol-math/linear-algebra';
12
+ import { Grid } from '../../../mol-model/volume';
13
+ import { arrayMax } from '../../../mol-util/array';
11
14
  var LineGraphComponent = /** @class */ (function (_super) {
12
15
  __extends(LineGraphComponent, _super);
13
16
  function LineGraphComponent(props) {
@@ -106,8 +109,9 @@ var LineGraphComponent = /** @class */ (function (_super) {
106
109
  LineGraphComponent.prototype.render = function () {
107
110
  var points = this.renderPoints();
108
111
  var lines = this.renderLines();
112
+ var histogram = this.renderHistogram();
109
113
  return ([
110
- _jsx("div", { children: _jsxs("svg", __assign({ className: "msp-canvas", ref: this.refCallBack, viewBox: "0 0 ".concat(this.width + this.padding, " ").concat(this.height + this.padding), onMouseMove: this.handleDrag, onMouseUp: this.handlePointUpdate, onMouseLeave: this.handleLeave, onMouseEnter: this.handleEnter, tabIndex: 0, onKeyDown: this.handleKeyDown, onKeyUp: this.handleKeyUp, onDoubleClick: this.handleDoubleClick }, { children: [_jsxs("g", __assign({ stroke: "black", fill: "black" }, { children: [lines, points] })), _jsx("g", { className: "ghost-points", stroke: "black", fill: "black" })] })) }, "LineGraph"),
114
+ _jsx("div", { children: _jsxs("svg", __assign({ className: "msp-canvas", ref: this.refCallBack, viewBox: "0 0 ".concat(this.width + this.padding, " ").concat(this.height + this.padding), onMouseMove: this.handleDrag, onMouseUp: this.handlePointUpdate, onMouseLeave: this.handleLeave, onMouseEnter: this.handleEnter, tabIndex: 0, onKeyDown: this.handleKeyDown, onKeyUp: this.handleKeyUp, onDoubleClick: this.handleDoubleClick }, { children: [_jsxs("g", __assign({ stroke: "black", fill: "black" }, { children: [histogram, lines, points] })), _jsx("g", { className: "ghost-points", stroke: "black", fill: "black" })] })) }, "LineGraph"),
111
115
  _jsx("div", { id: "modal-root" }, "modal")
112
116
  ]);
113
117
  };
@@ -238,11 +242,11 @@ var LineGraphComponent = /** @class */ (function (_super) {
238
242
  document.removeEventListener('mouseup', this.handlePointUpdate, true);
239
243
  };
240
244
  LineGraphComponent.prototype.normalizePoint = function (point) {
241
- var min = this.padding / 2;
242
- var maxX = this.width + min;
243
- var maxY = this.height + min;
244
- var normalizedX = (point[0] * (maxX - min)) + min;
245
- var normalizedY = (point[1] * (maxY - min)) + min;
245
+ var offset = this.padding / 2;
246
+ var maxX = this.width + offset;
247
+ var maxY = this.height + offset;
248
+ var normalizedX = (point[0] * (maxX - offset)) + offset;
249
+ var normalizedY = (point[1] * (maxY - offset)) + offset;
246
250
  var reverseY = (this.height + this.padding) - normalizedY;
247
251
  var newPoint = Vec2.create(normalizedX, reverseY);
248
252
  return newPoint;
@@ -261,6 +265,23 @@ var LineGraphComponent = /** @class */ (function (_super) {
261
265
  this.myRef = element;
262
266
  }
263
267
  };
268
+ LineGraphComponent.prototype.renderHistogram = function () {
269
+ if (!this.props.volume)
270
+ return null;
271
+ var histogram = Grid.getHistogram(this.props.volume.grid, 40);
272
+ var bars = [];
273
+ var N = histogram.counts.length;
274
+ var w = this.width / N;
275
+ var offset = this.padding / 2;
276
+ var max = arrayMax(histogram.counts) || 1;
277
+ for (var i = 0; i < N; i++) {
278
+ var x = this.width * i / (N - 1) + offset;
279
+ var y1 = this.height + offset;
280
+ var y2 = this.height * (1 - histogram.counts[i] / max) + offset;
281
+ bars.push(_jsx("line", { x1: x, x2: x, y1: y1, y2: y2, stroke: "#ded9ca", strokeWidth: w }, "histogram".concat(i)));
282
+ }
283
+ return bars;
284
+ };
264
285
  LineGraphComponent.prototype.renderPoints = function () {
265
286
  var points = [];
266
287
  var point;
@@ -275,19 +296,18 @@ var LineGraphComponent = /** @class */ (function (_super) {
275
296
  LineGraphComponent.prototype.renderLines = function () {
276
297
  var points = [];
277
298
  var lines = [];
278
- var min;
279
299
  var maxX;
280
300
  var maxY;
281
301
  var normalizedX;
282
302
  var normalizedY;
283
303
  var reverseY;
304
+ var o = this.padding / 2;
284
305
  for (var _i = 0, _a = this.state.points; _i < _a.length; _i++) {
285
306
  var point = _a[_i];
286
- min = this.padding / 2;
287
- maxX = this.width + min;
288
- maxY = this.height + min;
289
- normalizedX = (point[0] * (maxX - min)) + min;
290
- normalizedY = (point[1] * (maxY - min)) + min;
307
+ maxX = this.width + o;
308
+ maxY = this.height + this.padding;
309
+ normalizedX = (point[0] * (maxX - o)) + o;
310
+ normalizedY = (point[1] * (maxY - o)) + o;
291
311
  reverseY = this.height + this.padding - normalizedY;
292
312
  points.push(Vec2.create(normalizedX, reverseY));
293
313
  }
@@ -94,6 +94,7 @@ export declare class LineGraphControl extends React.PureComponent<ParamProps<PD.
94
94
  isOverPoint: boolean;
95
95
  message: string;
96
96
  };
97
+ private pointToLabel;
97
98
  onHover: (point?: Vec2) => void;
98
99
  onDrag: (point: Vec2) => void;
99
100
  onChange: (value: PD.LineGraph['defaultValue']) => void;
@@ -277,13 +277,14 @@ var LineGraphControl = /** @class */ (function (_super) {
277
277
  _this.onHover = function (point) {
278
278
  _this.setState({ isOverPoint: !_this.state.isOverPoint });
279
279
  if (point) {
280
- _this.setState({ message: "(".concat(point[0].toFixed(2), ", ").concat(point[1].toFixed(2), ")") });
281
- return;
280
+ _this.setState({ message: _this.pointToLabel(point) });
281
+ }
282
+ else {
283
+ _this.setState({ message: "".concat(_this.props.value.length, " points") });
282
284
  }
283
- _this.setState({ message: "".concat(_this.props.value.length, " points") });
284
285
  };
285
286
  _this.onDrag = function (point) {
286
- _this.setState({ message: "(".concat(point[0].toFixed(2), ", ").concat(point[1].toFixed(2), ")") });
287
+ _this.setState({ message: _this.pointToLabel(point) });
287
288
  };
288
289
  _this.onChange = function (value) {
289
290
  _this.props.onChange({ name: _this.props.name, param: _this.props.param, value: value });
@@ -294,9 +295,25 @@ var LineGraphControl = /** @class */ (function (_super) {
294
295
  };
295
296
  return _this;
296
297
  }
298
+ LineGraphControl.prototype.pointToLabel = function (point) {
299
+ var _a, _b;
300
+ if (!point)
301
+ return '';
302
+ var volume = (_b = (_a = this.props.param).getVolume) === null || _b === void 0 ? void 0 : _b.call(_a);
303
+ if (volume) {
304
+ var _c = volume.grid.stats, min = _c.min, max = _c.max, mean = _c.mean, sigma = _c.sigma;
305
+ var v = min + (max - min) * point[0];
306
+ var s = (v - mean) / sigma;
307
+ return "(".concat(v.toFixed(2), " | ").concat(s.toFixed(2), "\u03C3, ").concat(point[1].toFixed(2), ")");
308
+ }
309
+ else {
310
+ return "(".concat(point[0].toFixed(2), ", ").concat(point[1].toFixed(2), ")");
311
+ }
312
+ };
297
313
  LineGraphControl.prototype.render = function () {
314
+ var _a, _b;
298
315
  var label = this.props.param.label || camelCaseToWords(this.props.name);
299
- return _jsxs(_Fragment, { children: [_jsx(ControlRow, { label: label, control: _jsx("button", __assign({ onClick: this.toggleExpanded, disabled: this.props.isDisabled }, { children: "".concat(this.state.message) })) }), _jsx("div", __assign({ className: 'msp-control-offset', style: { display: this.state.isExpanded ? 'block' : 'none' } }, { children: _jsx(LineGraphComponent, { data: this.props.param.defaultValue, onChange: this.onChange, onHover: this.onHover, onDrag: this.onDrag }) }))] });
316
+ return _jsxs(_Fragment, { children: [_jsx(ControlRow, { label: label, control: _jsx("button", __assign({ onClick: this.toggleExpanded, disabled: this.props.isDisabled }, { children: "".concat(this.state.message) })) }), _jsx("div", __assign({ className: 'msp-control-offset', style: { display: this.state.isExpanded ? 'block' : 'none', marginTop: 1 } }, { children: _jsx(LineGraphComponent, { data: this.props.value, volume: (_b = (_a = this.props.param).getVolume) === null || _b === void 0 ? void 0 : _b.call(_a), onChange: this.onChange, onHover: this.onHover, onDrag: this.onDrag }) }))] });
300
317
  };
301
318
  return LineGraphControl;
302
319
  }(React.PureComponent));
@@ -5,8 +5,11 @@
5
5
  * @author David Sehnal <david.sehnal@gmail.com>
6
6
  */
7
7
  import * as React from 'react';
8
- import { StructureElement } from '../../mol-model/structure';
8
+ import { Subject } from 'rxjs';
9
+ import { StructureElement, Unit } from '../../mol-model/structure';
10
+ import { Representation } from '../../mol-repr/representation';
9
11
  import { ButtonsType, ModifiersKeys } from '../../mol-util/input/input-observer';
12
+ import { MarkerAction } from '../../mol-util/marker-action';
10
13
  import { PluginUIComponent } from '../base';
11
14
  import { SequenceWrapper } from './wrapper';
12
15
  type SequenceProps = {
@@ -15,12 +18,17 @@ type SequenceProps = {
15
18
  hideSequenceNumbers?: boolean;
16
19
  };
17
20
  export declare class Sequence<P extends SequenceProps> extends PluginUIComponent<P> {
18
- private parentDiv;
19
- private lastMouseOverSeqIdx;
20
- private highlightQueue;
21
- private lociHighlightProvider;
22
- private lociSelectionProvider;
23
- private get sequenceNumberPeriod();
21
+ protected parentDiv: React.RefObject<HTMLDivElement>;
22
+ protected lastMouseOverSeqIdx: number;
23
+ protected highlightQueue: Subject<{
24
+ seqIdx: number;
25
+ buttons: number;
26
+ button: number;
27
+ modifiers: ModifiersKeys;
28
+ }>;
29
+ protected lociHighlightProvider: (loci: Representation.Loci, action: MarkerAction) => void;
30
+ protected lociSelectionProvider: (loci: Representation.Loci, action: MarkerAction) => void;
31
+ protected get sequenceNumberPeriod(): number;
24
32
  componentDidMount(): void;
25
33
  componentWillUnmount(): void;
26
34
  getLoci(seqIdx: number | undefined): StructureElement.Loci | undefined;
@@ -28,18 +36,18 @@ export declare class Sequence<P extends SequenceProps> extends PluginUIComponent
28
36
  hover(loci: StructureElement.Loci | undefined, buttons: ButtonsType, button: ButtonsType.Flag, modifiers: ModifiersKeys): void;
29
37
  click(loci: StructureElement.Loci | undefined, buttons: ButtonsType, button: ButtonsType.Flag, modifiers: ModifiersKeys): void;
30
38
  contextMenu: (e: React.MouseEvent) => void;
31
- private mouseDownLoci;
39
+ protected mouseDownLoci: StructureElement.Loci | undefined;
32
40
  mouseDown: (e: React.MouseEvent) => void;
33
41
  mouseUp: (e: React.MouseEvent) => void;
34
- private getBackgroundColor;
35
- private getResidueClass;
36
- private residue;
37
- private getSequenceNumberClass;
38
- private location;
39
- private getSequenceNumber;
40
- private padSeqNum;
41
- private getSequenceNumberSpan;
42
- private updateMarker;
42
+ protected getBackgroundColor(marker: number): "" | "rgb(51, 255, 25)" | "rgb(255, 102, 153)";
43
+ protected getResidueClass(seqIdx: number, label: string): string;
44
+ protected residue(seqIdx: number, label: string, marker: number): JSX.Element;
45
+ protected getSequenceNumberClass(seqIdx: number, seqNum: string, label: string): string;
46
+ protected location: StructureElement.Location<Unit>;
47
+ protected getSequenceNumber(seqIdx: number): string;
48
+ protected padSeqNum(n: string): string;
49
+ protected getSequenceNumberSpan(seqIdx: number, label: string): JSX.Element;
50
+ protected updateMarker(): void;
43
51
  mouseMove: (e: React.MouseEvent) => void;
44
52
  mouseLeave: (e: React.MouseEvent) => void;
45
53
  render(): JSX.Element;
@@ -6,7 +6,25 @@
6
6
  */
7
7
  /// <reference types="react" />
8
8
  import { PluginUIComponent } from './base';
9
- import { Structure } from '../mol-model/structure';
9
+ import { Structure, StructureElement } from '../mol-model/structure';
10
+ import { SequenceWrapper } from './sequence/wrapper';
11
+ import { State } from '../mol-state';
12
+ import { StructureSelectionManager } from '../mol-plugin-state/manager/structure/selection';
13
+ export declare function opKey(l: StructureElement.Location): string;
14
+ export declare function splitModelEntityId(modelEntityId: string): (string | number)[];
15
+ export declare function getSequenceWrapper(state: {
16
+ structure: Structure;
17
+ modelEntityId: string;
18
+ chainGroupId: number;
19
+ operatorKey: string;
20
+ }, structureSelection: StructureSelectionManager): SequenceWrapper.Any | string;
21
+ export declare function getModelEntityOptions(structure: Structure, polymersOnly?: boolean): [string, string][];
22
+ export declare function getChainOptions(structure: Structure, modelEntityId: string): [number, string][];
23
+ export declare function getOperatorOptions(structure: Structure, modelEntityId: string, chainGroupId: number): [string, string][];
24
+ export declare function getStructureOptions(state: State): {
25
+ options: [string, string][];
26
+ all: Structure[];
27
+ };
10
28
  export type SequenceViewMode = 'single' | 'polymers' | 'all';
11
29
  type SequenceViewState = {
12
30
  structureOptions: {
@@ -26,18 +26,18 @@ var MaxDisplaySequenceLength = 5000;
26
26
  // TODO: add virtualized Select controls (at best with a search box)?
27
27
  var MaxSelectOptionsCount = 1000;
28
28
  var MaxSequenceWrappersCount = 30;
29
- function opKey(l) {
29
+ export function opKey(l) {
30
30
  var ids = SP.unit.pdbx_struct_oper_list_ids(l);
31
31
  var ncs = SP.unit.struct_ncs_oper_id(l);
32
32
  var hkl = SP.unit.hkl(l);
33
33
  var spgrOp = SP.unit.spgrOp(l);
34
34
  return "".concat(ids.sort().join(','), "|").concat(ncs, "|").concat(hkl, "|").concat(spgrOp);
35
35
  }
36
- function splitModelEntityId(modelEntityId) {
36
+ export function splitModelEntityId(modelEntityId) {
37
37
  var _a = modelEntityId.split('|'), modelIdx = _a[0], entityId = _a[1];
38
38
  return [parseInt(modelIdx), entityId];
39
39
  }
40
- function getSequenceWrapper(state, structureSelection) {
40
+ export function getSequenceWrapper(state, structureSelection) {
41
41
  var structure = state.structure, modelEntityId = state.modelEntityId, chainGroupId = state.chainGroupId, operatorKey = state.operatorKey;
42
42
  var l = StructureElement.Location.create(structure);
43
43
  var _a = splitModelEntityId(modelEntityId), modelIdx = _a[0], entityId = _a[1];
@@ -96,7 +96,7 @@ function getSequenceWrapper(state, structureSelection) {
96
96
  return 'No sequence available';
97
97
  }
98
98
  }
99
- function getModelEntityOptions(structure, polymersOnly) {
99
+ export function getModelEntityOptions(structure, polymersOnly) {
100
100
  if (polymersOnly === void 0) { polymersOnly = false; }
101
101
  var options = [];
102
102
  var l = StructureElement.Location.create(structure);
@@ -131,7 +131,7 @@ function getModelEntityOptions(structure, polymersOnly) {
131
131
  options.push(['', 'No entities']);
132
132
  return options;
133
133
  }
134
- function getChainOptions(structure, modelEntityId) {
134
+ export function getChainOptions(structure, modelEntityId) {
135
135
  var options = [];
136
136
  var l = StructureElement.Location.create(structure);
137
137
  var seen = new Set();
@@ -159,7 +159,7 @@ function getChainOptions(structure, modelEntityId) {
159
159
  options.push([-1, 'No chains']);
160
160
  return options;
161
161
  }
162
- function getOperatorOptions(structure, modelEntityId, chainGroupId) {
162
+ export function getOperatorOptions(structure, modelEntityId, chainGroupId) {
163
163
  var options = [];
164
164
  var l = StructureElement.Location.create(structure);
165
165
  var seen = new Set();
@@ -187,7 +187,7 @@ function getOperatorOptions(structure, modelEntityId, chainGroupId) {
187
187
  options.push(['', 'No operators']);
188
188
  return options;
189
189
  }
190
- function getStructureOptions(state) {
190
+ export function getStructureOptions(state) {
191
191
  var _a;
192
192
  var options = [];
193
193
  var all = [];
@@ -1,33 +1,33 @@
1
- 
2
- @mixin user-select($select) {
3
- -webkit-user-select: $select;
4
- -moz-user-select: $select;
5
- -ms-user-select: $select; // IE10+
6
- user-select: $select;
7
- }
8
-
9
- .msp-plugin {
10
- font-family: "Helvetica Neue", "Segoe UI", Helvetica, "Source Sans Pro", Arial, sans-serif;
11
- font-size: 14px;
12
- line-height: 1.42857143;
13
-
14
- position: absolute;
15
- left: 0;
16
- top: 0;
17
- right: 0;
18
- bottom: 0;
19
-
20
- @import 'variables';
21
-
22
- @import "normalize";
23
-
24
- @import 'layout';
25
- @import 'ui';
26
- @import 'logo';
27
-
28
- .msp-plugin-content {
29
- color: $font-color;
30
- }
31
-
32
- background: $default-background;
1
+ 
2
+ @mixin user-select($select) {
3
+ -webkit-user-select: $select;
4
+ -moz-user-select: $select;
5
+ -ms-user-select: $select; // IE10+
6
+ user-select: $select;
7
+ }
8
+
9
+ .msp-plugin {
10
+ font-family: "Helvetica Neue", "Segoe UI", Helvetica, "Source Sans Pro", Arial, sans-serif;
11
+ font-size: 14px;
12
+ line-height: 1.42857143;
13
+
14
+ position: absolute;
15
+ left: 0;
16
+ top: 0;
17
+ right: 0;
18
+ bottom: 0;
19
+
20
+ @import 'variables';
21
+
22
+ @import "normalize";
23
+
24
+ @import 'layout';
25
+ @import 'ui';
26
+ @import 'logo';
27
+
28
+ .msp-plugin-content {
29
+ color: $font-color;
30
+ }
31
+
32
+ background: $default-background;
33
33
  }