molstar 3.0.0-dev.2 → 3.0.0-dev.6

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 (493) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +187 -187
  3. package/build/viewer/embedded.html +43 -43
  4. package/build/viewer/index.html +102 -94
  5. package/build/viewer/molstar.css +1 -1
  6. package/build/viewer/molstar.js +1 -1
  7. package/lib/apps/docking-viewer/index.d.ts +2 -1
  8. package/lib/apps/docking-viewer/index.html +36 -36
  9. package/lib/apps/docking-viewer/index.js +87 -74
  10. package/lib/apps/docking-viewer/viewport.js +2 -1
  11. package/lib/apps/viewer/embedded.html +43 -43
  12. package/lib/apps/viewer/index.d.ts +36 -215
  13. package/lib/apps/viewer/index.html +102 -94
  14. package/lib/apps/viewer/index.js +139 -52
  15. package/lib/cli/cifschema/index.d.ts +1 -1
  16. package/lib/cli/cifschema/index.js +15 -35
  17. package/lib/commonjs/apps/docking-viewer/index.d.ts +2 -1
  18. package/lib/commonjs/apps/docking-viewer/index.js +86 -73
  19. package/lib/commonjs/apps/docking-viewer/viewport.js +2 -1
  20. package/lib/commonjs/apps/viewer/index.d.ts +36 -215
  21. package/lib/commonjs/apps/viewer/index.js +139 -52
  22. package/lib/commonjs/cli/cifschema/index.d.ts +1 -1
  23. package/lib/commonjs/cli/cifschema/index.js +15 -35
  24. package/lib/commonjs/examples/alpha-orbitals/index.js +2 -3
  25. package/lib/commonjs/examples/basic-wrapper/index.js +23 -11
  26. package/lib/commonjs/examples/lighting/index.d.ts +1 -1
  27. package/lib/commonjs/examples/lighting/index.js +58 -41
  28. package/lib/commonjs/examples/proteopedia-wrapper/index.js +26 -14
  29. package/lib/commonjs/extensions/alpha-orbitals/transforms.d.ts +0 -1
  30. package/lib/commonjs/extensions/alpha-orbitals/transforms.js +1 -14
  31. package/lib/commonjs/extensions/anvil/behavior.d.ts +3 -0
  32. package/lib/commonjs/extensions/anvil/representation.d.ts +13 -0
  33. package/lib/commonjs/extensions/cellpack/representation.d.ts +3 -0
  34. package/lib/commonjs/extensions/dnatco/confal-pyramids/representation.d.ts +9 -0
  35. package/lib/commonjs/extensions/geo-export/obj-exporter.js +1 -1
  36. package/lib/commonjs/extensions/geo-export/usdz-exporter.js +1 -1
  37. package/lib/commonjs/extensions/model-archive/quality-assessment/behavior.d.ts +68 -0
  38. package/lib/commonjs/extensions/model-archive/quality-assessment/behavior.js +236 -0
  39. package/lib/commonjs/extensions/model-archive/quality-assessment/color/plddt.d.ts +14 -0
  40. package/lib/commonjs/extensions/model-archive/quality-assessment/color/plddt.js +125 -0
  41. package/lib/commonjs/extensions/model-archive/quality-assessment/color/qmean.d.ts +12 -0
  42. package/lib/commonjs/extensions/model-archive/quality-assessment/color/qmean.js +111 -0
  43. package/lib/commonjs/extensions/model-archive/quality-assessment/prop.d.ts +28 -0
  44. package/lib/commonjs/extensions/model-archive/quality-assessment/prop.js +130 -0
  45. package/lib/commonjs/extensions/mp4-export/controls.d.ts +1 -0
  46. package/lib/commonjs/extensions/mp4-export/controls.js +9 -7
  47. package/lib/commonjs/extensions/pdbe/structure-quality-report/prop.js +1 -1
  48. package/lib/commonjs/extensions/rcsb/assembly-symmetry/behavior.d.ts +3 -0
  49. package/lib/commonjs/extensions/rcsb/assembly-symmetry/prop.js +1 -1
  50. package/lib/commonjs/extensions/rcsb/assembly-symmetry/representation.d.ts +3 -0
  51. package/lib/commonjs/extensions/rcsb/validation-report/prop.js +1 -1
  52. package/lib/commonjs/extensions/rcsb/validation-report/representation.d.ts +15 -0
  53. package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +6 -0
  54. package/lib/commonjs/mol-canvas3d/canvas3d.js +10 -3
  55. package/lib/commonjs/mol-canvas3d/helper/camera-helper.d.ts +3 -0
  56. package/lib/commonjs/mol-canvas3d/helper/handle-helper.d.ts +3 -0
  57. package/lib/commonjs/mol-canvas3d/helper/helper.d.ts +4 -0
  58. package/lib/commonjs/mol-canvas3d/passes/image.d.ts +3 -0
  59. package/lib/commonjs/mol-canvas3d/passes/multi-sample.d.ts +2 -1
  60. package/lib/commonjs/mol-canvas3d/passes/multi-sample.js +4 -2
  61. package/lib/commonjs/mol-canvas3d/passes/postprocessing.d.ts +1 -0
  62. package/lib/commonjs/mol-canvas3d/passes/postprocessing.js +4 -2
  63. package/lib/commonjs/mol-geo/geometry/base.d.ts +2 -0
  64. package/lib/commonjs/mol-geo/geometry/base.js +2 -0
  65. package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +4 -1
  66. package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.js +4 -2
  67. package/lib/commonjs/mol-geo/geometry/direct-volume/direct-volume.d.ts +1 -0
  68. package/lib/commonjs/mol-geo/geometry/image/image.d.ts +1 -0
  69. package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +2 -0
  70. package/lib/commonjs/mol-geo/geometry/mesh/color-smoothing.js +1 -1
  71. package/lib/commonjs/mol-geo/geometry/mesh/mesh.d.ts +3 -0
  72. package/lib/commonjs/mol-geo/geometry/mesh/mesh.js +4 -2
  73. package/lib/commonjs/mol-geo/geometry/points/points.d.ts +1 -0
  74. package/lib/commonjs/mol-geo/geometry/spheres/spheres.d.ts +3 -0
  75. package/lib/commonjs/mol-geo/geometry/spheres/spheres.js +4 -2
  76. package/lib/commonjs/mol-geo/geometry/substance-data.js +3 -3
  77. package/lib/commonjs/mol-geo/geometry/text/text.d.ts +1 -0
  78. package/lib/commonjs/mol-geo/geometry/texture-mesh/color-smoothing.js +3 -3
  79. package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +3 -0
  80. package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.js +4 -2
  81. package/lib/commonjs/mol-gl/renderable/cylinders.d.ts +31 -28
  82. package/lib/commonjs/mol-gl/renderable/cylinders.js +2 -2
  83. package/lib/commonjs/mol-gl/renderable/direct-volume.d.ts +1 -0
  84. package/lib/commonjs/mol-gl/renderable/image.d.ts +1 -0
  85. package/lib/commonjs/mol-gl/renderable/lines.d.ts +1 -0
  86. package/lib/commonjs/mol-gl/renderable/mesh.d.ts +28 -25
  87. package/lib/commonjs/mol-gl/renderable/mesh.js +2 -2
  88. package/lib/commonjs/mol-gl/renderable/points.d.ts +1 -0
  89. package/lib/commonjs/mol-gl/renderable/schema.d.ts +1 -0
  90. package/lib/commonjs/mol-gl/renderable/schema.js +3 -3
  91. package/lib/commonjs/mol-gl/renderable/spheres.d.ts +31 -28
  92. package/lib/commonjs/mol-gl/renderable/spheres.js +2 -2
  93. package/lib/commonjs/mol-gl/renderable/text.d.ts +1 -0
  94. package/lib/commonjs/mol-gl/renderable/texture-mesh.d.ts +3 -0
  95. package/lib/commonjs/mol-gl/renderable/texture-mesh.js +1 -1
  96. package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +1 -1
  97. package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.js +1 -1
  98. package/lib/commonjs/mol-gl/shader/chunks/assign-color-varying.glsl.d.ts +1 -1
  99. package/lib/commonjs/mol-gl/shader/chunks/assign-color-varying.glsl.js +1 -1
  100. package/lib/commonjs/mol-gl/shader/chunks/assign-material-color.glsl.d.ts +1 -1
  101. package/lib/commonjs/mol-gl/shader/chunks/assign-material-color.glsl.js +1 -1
  102. package/lib/commonjs/mol-gl/shader/chunks/color-frag-params.glsl.d.ts +1 -1
  103. package/lib/commonjs/mol-gl/shader/chunks/color-frag-params.glsl.js +1 -1
  104. package/lib/commonjs/mol-gl/shader/chunks/color-vert-params.glsl.d.ts +1 -1
  105. package/lib/commonjs/mol-gl/shader/chunks/color-vert-params.glsl.js +1 -1
  106. package/lib/commonjs/mol-gl/shader/chunks/common-frag-params.glsl.d.ts +1 -1
  107. package/lib/commonjs/mol-gl/shader/chunks/common-frag-params.glsl.js +1 -1
  108. package/lib/commonjs/mol-gl/shader/chunks/common.glsl.d.ts +1 -1
  109. package/lib/commonjs/mol-gl/shader/chunks/common.glsl.js +1 -1
  110. package/lib/commonjs/mol-gl/shader/chunks/light-frag-params.glsl.d.ts +1 -1
  111. package/lib/commonjs/mol-gl/shader/chunks/light-frag-params.glsl.js +1 -1
  112. package/lib/commonjs/mol-gl/shader/cylinders.frag.d.ts +1 -1
  113. package/lib/commonjs/mol-gl/shader/cylinders.frag.js +1 -1
  114. package/lib/commonjs/mol-gl/shader/direct-volume.frag.d.ts +1 -1
  115. package/lib/commonjs/mol-gl/shader/direct-volume.frag.js +1 -1
  116. package/lib/commonjs/mol-gl/shader/mesh.frag.d.ts +1 -1
  117. package/lib/commonjs/mol-gl/shader/mesh.frag.js +1 -1
  118. package/lib/commonjs/mol-gl/shader/postprocessing.frag.d.ts +1 -1
  119. package/lib/commonjs/mol-gl/shader/postprocessing.frag.js +1 -1
  120. package/lib/commonjs/mol-gl/shader/spheres.frag.d.ts +1 -1
  121. package/lib/commonjs/mol-gl/shader/spheres.frag.js +1 -1
  122. package/lib/commonjs/mol-io/reader/cif/schema/mmcif.d.ts +326 -1
  123. package/lib/commonjs/mol-io/reader/cif/schema/mmcif.js +326 -1
  124. package/lib/commonjs/mol-math/geometry/symmetry-operator.js +3 -2
  125. package/lib/commonjs/mol-model/structure/model/model.d.ts +1 -0
  126. package/lib/commonjs/mol-model/structure/model/model.js +15 -5
  127. package/lib/commonjs/mol-model/structure/model/properties/atomic/hierarchy.d.ts +6 -1
  128. package/lib/commonjs/mol-model/structure/model/properties/atomic/hierarchy.js +1 -1
  129. package/lib/commonjs/mol-model/structure/model/properties/utils/atomic-derived.d.ts +1 -1
  130. package/lib/commonjs/mol-model/structure/model/properties/utils/atomic-derived.js +4 -1
  131. package/lib/commonjs/mol-model/structure/model/properties/utils/atomic-index.d.ts +1 -1
  132. package/lib/commonjs/mol-model/structure/model/properties/utils/atomic-index.js +12 -1
  133. package/lib/commonjs/mol-model/structure/model/types.js +9 -0
  134. package/lib/commonjs/mol-model/structure/structure/unit/rings.js +2 -0
  135. package/lib/commonjs/mol-model-formats/shape/ply.d.ts +6 -0
  136. package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +3 -0
  137. package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +3 -0
  138. package/lib/commonjs/mol-model-props/computed/representations/interactions.d.ts +9 -0
  139. package/lib/commonjs/mol-model-props/integrative/cross-link-restraint/representation.d.ts +12 -0
  140. package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +1 -0
  141. package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +3 -2
  142. package/lib/commonjs/mol-plugin/commands.d.ts +3 -0
  143. package/lib/commonjs/mol-plugin/config.d.ts +2 -0
  144. package/lib/commonjs/mol-plugin/config.js +10 -3
  145. package/lib/commonjs/mol-plugin/util/viewport-screenshot.d.ts +9 -0
  146. package/lib/commonjs/mol-plugin-state/actions/structure.d.ts +7 -1
  147. package/lib/commonjs/mol-plugin-state/actions/structure.js +150 -72
  148. package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +5 -355
  149. package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy-preset.js +13 -8
  150. package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy.d.ts +1 -71
  151. package/lib/commonjs/mol-plugin-state/helpers/structure-selection-query.js +33 -19
  152. package/lib/commonjs/mol-plugin-state/manager/structure/component.d.ts +2 -0
  153. package/lib/commonjs/mol-plugin-state/manager/structure/component.js +1 -1
  154. package/lib/commonjs/mol-plugin-state/transforms/representation.d.ts +22 -0
  155. package/lib/commonjs/mol-plugin-ui/controls/parameters.d.ts +3 -2
  156. package/lib/commonjs/mol-plugin-ui/controls/parameters.js +11 -6
  157. package/lib/commonjs/mol-plugin-ui/hooks/use-behavior.d.ts +1 -1
  158. package/lib/commonjs/mol-plugin-ui/hooks/use-behavior.js +8 -17
  159. package/lib/commonjs/mol-plugin-ui/index.d.ts +4 -4
  160. package/lib/commonjs/mol-plugin-ui/index.js +13 -16
  161. package/lib/commonjs/mol-plugin-ui/plugin.d.ts +1 -1
  162. package/lib/commonjs/mol-plugin-ui/plugin.js +76 -10
  163. package/lib/commonjs/mol-repr/shape/loci/angle.d.ts +3 -0
  164. package/lib/commonjs/mol-repr/shape/loci/common.d.ts +1 -0
  165. package/lib/commonjs/mol-repr/shape/loci/dihedral.d.ts +3 -0
  166. package/lib/commonjs/mol-repr/shape/loci/distance.d.ts +1 -0
  167. package/lib/commonjs/mol-repr/shape/loci/label.d.ts +1 -0
  168. package/lib/commonjs/mol-repr/shape/loci/orientation.d.ts +3 -0
  169. package/lib/commonjs/mol-repr/shape/loci/plane.d.ts +3 -0
  170. package/lib/commonjs/mol-repr/shape/model/unitcell.d.ts +3 -0
  171. package/lib/commonjs/mol-repr/structure/complex-visual.d.ts +12 -0
  172. package/lib/commonjs/mol-repr/structure/params.d.ts +16 -0
  173. package/lib/commonjs/mol-repr/structure/registry.d.ts +35 -1
  174. package/lib/commonjs/mol-repr/structure/representation/backbone.d.ts +9 -0
  175. package/lib/commonjs/mol-repr/structure/representation/backbone.js +2 -1
  176. package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.d.ts +9 -0
  177. package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.js +2 -1
  178. package/lib/commonjs/mol-repr/structure/representation/carbohydrate.d.ts +9 -0
  179. package/lib/commonjs/mol-repr/structure/representation/carbohydrate.js +2 -1
  180. package/lib/commonjs/mol-repr/structure/representation/cartoon.d.ts +9 -0
  181. package/lib/commonjs/mol-repr/structure/representation/cartoon.js +2 -1
  182. package/lib/commonjs/mol-repr/structure/representation/ellipsoid.d.ts +9 -0
  183. package/lib/commonjs/mol-repr/structure/representation/ellipsoid.js +2 -1
  184. package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.d.ts +9 -0
  185. package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.js +2 -1
  186. package/lib/commonjs/mol-repr/structure/representation/gaussian-volume.d.ts +3 -0
  187. package/lib/commonjs/mol-repr/structure/representation/label.d.ts +6 -3
  188. package/lib/commonjs/mol-repr/structure/representation/line.d.ts +3 -0
  189. package/lib/commonjs/mol-repr/structure/representation/molecular-surface.d.ts +9 -0
  190. package/lib/commonjs/mol-repr/structure/representation/molecular-surface.js +2 -1
  191. package/lib/commonjs/mol-repr/structure/representation/orientation.d.ts +9 -0
  192. package/lib/commonjs/mol-repr/structure/representation/orientation.js +2 -1
  193. package/lib/commonjs/mol-repr/structure/representation/point.d.ts +3 -0
  194. package/lib/commonjs/mol-repr/structure/representation/putty.d.ts +9 -0
  195. package/lib/commonjs/mol-repr/structure/representation/putty.js +2 -1
  196. package/lib/commonjs/mol-repr/structure/representation/spacefill.d.ts +9 -0
  197. package/lib/commonjs/mol-repr/structure/representation/spacefill.js +2 -1
  198. package/lib/commonjs/mol-repr/structure/units-visual.d.ts +16 -0
  199. package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +6 -0
  200. package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-line.d.ts +1 -0
  201. package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +6 -0
  202. package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.js +2 -2
  203. package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-line.d.ts +1 -0
  204. package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-line.js +2 -2
  205. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +3 -0
  206. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +3 -0
  207. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +3 -0
  208. package/lib/commonjs/mol-repr/structure/visual/element-cross.d.ts +1 -0
  209. package/lib/commonjs/mol-repr/structure/visual/element-point.d.ts +1 -0
  210. package/lib/commonjs/mol-repr/structure/visual/element-sphere.d.ts +6 -0
  211. package/lib/commonjs/mol-repr/structure/visual/ellipsoid-mesh.d.ts +3 -0
  212. package/lib/commonjs/mol-repr/structure/visual/gaussian-density-volume.d.ts +2 -0
  213. package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +12 -0
  214. package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +1 -0
  215. package/lib/commonjs/mol-repr/structure/visual/label-text.d.ts +3 -2
  216. package/lib/commonjs/mol-repr/structure/visual/label-text.js +2 -2
  217. package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.d.ts +3 -0
  218. package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +1 -0
  219. package/lib/commonjs/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +3 -0
  220. package/lib/commonjs/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +3 -0
  221. package/lib/commonjs/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +3 -0
  222. package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +6 -0
  223. package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +6 -0
  224. package/lib/commonjs/mol-repr/structure/visual/polymer-direction-wedge.d.ts +3 -0
  225. package/lib/commonjs/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +3 -0
  226. package/lib/commonjs/mol-repr/structure/visual/polymer-trace-mesh.d.ts +3 -0
  227. package/lib/commonjs/mol-repr/structure/visual/polymer-trace-mesh.js +1 -1
  228. package/lib/commonjs/mol-repr/structure/visual/polymer-tube-mesh.d.ts +3 -0
  229. package/lib/commonjs/mol-repr/structure/visual/util/bond.js +1 -1
  230. package/lib/commonjs/mol-repr/volume/direct-volume.d.ts +3 -0
  231. package/lib/commonjs/mol-repr/volume/isosurface.d.ts +16 -0
  232. package/lib/commonjs/mol-repr/volume/isosurface.js +2 -1
  233. package/lib/commonjs/mol-repr/volume/registry.d.ts +5 -0
  234. package/lib/commonjs/mol-repr/volume/representation.d.ts +1 -0
  235. package/lib/commonjs/mol-repr/volume/slice.d.ts +3 -0
  236. package/lib/commonjs/mol-script/language/builder.d.ts +0 -1
  237. package/lib/commonjs/mol-theme/color/illustrative.d.ts +2 -0
  238. package/lib/commonjs/mol-theme/color/illustrative.js +2 -2
  239. package/lib/commonjs/mol-theme/color.d.ts +1 -0
  240. package/lib/commonjs/mol-util/material.d.ts +5 -1
  241. package/lib/commonjs/mol-util/material.js +9 -7
  242. package/lib/examples/alpha-orbitals/index.html +61 -60
  243. package/lib/examples/alpha-orbitals/index.js +3 -4
  244. package/lib/examples/basic-wrapper/index.html +137 -136
  245. package/lib/examples/basic-wrapper/index.js +24 -12
  246. package/lib/examples/lighting/index.d.ts +1 -1
  247. package/lib/examples/lighting/index.html +88 -86
  248. package/lib/examples/lighting/index.js +59 -42
  249. package/lib/examples/proteopedia-wrapper/index.html +236 -235
  250. package/lib/examples/proteopedia-wrapper/index.js +27 -15
  251. package/lib/extensions/alpha-orbitals/transforms.d.ts +0 -1
  252. package/lib/extensions/alpha-orbitals/transforms.js +1 -14
  253. package/lib/extensions/anvil/behavior.d.ts +3 -0
  254. package/lib/extensions/anvil/representation.d.ts +13 -0
  255. package/lib/extensions/cellpack/representation.d.ts +3 -0
  256. package/lib/extensions/dnatco/confal-pyramids/representation.d.ts +9 -0
  257. package/lib/extensions/geo-export/obj-exporter.js +1 -1
  258. package/lib/extensions/geo-export/usdz-exporter.js +1 -1
  259. package/lib/extensions/model-archive/quality-assessment/behavior.d.ts +68 -0
  260. package/lib/extensions/model-archive/quality-assessment/behavior.js +233 -0
  261. package/lib/extensions/model-archive/quality-assessment/color/plddt.d.ts +14 -0
  262. package/lib/extensions/model-archive/quality-assessment/color/plddt.js +120 -0
  263. package/lib/extensions/model-archive/quality-assessment/color/qmean.d.ts +12 -0
  264. package/lib/extensions/model-archive/quality-assessment/color/qmean.js +106 -0
  265. package/lib/extensions/model-archive/quality-assessment/prop.d.ts +28 -0
  266. package/lib/extensions/model-archive/quality-assessment/prop.js +127 -0
  267. package/lib/extensions/mp4-export/controls.d.ts +1 -0
  268. package/lib/extensions/mp4-export/controls.js +9 -7
  269. package/lib/extensions/pdbe/structure-quality-report/prop.js +1 -1
  270. package/lib/extensions/rcsb/assembly-symmetry/behavior.d.ts +3 -0
  271. package/lib/extensions/rcsb/assembly-symmetry/prop.js +1 -1
  272. package/lib/extensions/rcsb/assembly-symmetry/representation.d.ts +3 -0
  273. package/lib/extensions/rcsb/validation-report/prop.js +1 -1
  274. package/lib/extensions/rcsb/validation-report/representation.d.ts +15 -0
  275. package/lib/mol-canvas3d/canvas3d.d.ts +6 -0
  276. package/lib/mol-canvas3d/canvas3d.js +10 -3
  277. package/lib/mol-canvas3d/helper/camera-helper.d.ts +3 -0
  278. package/lib/mol-canvas3d/helper/handle-helper.d.ts +3 -0
  279. package/lib/mol-canvas3d/helper/helper.d.ts +4 -0
  280. package/lib/mol-canvas3d/passes/image.d.ts +3 -0
  281. package/lib/mol-canvas3d/passes/multi-sample.d.ts +2 -1
  282. package/lib/mol-canvas3d/passes/multi-sample.js +4 -2
  283. package/lib/mol-canvas3d/passes/postprocessing.d.ts +1 -0
  284. package/lib/mol-canvas3d/passes/postprocessing.js +4 -2
  285. package/lib/mol-geo/geometry/base.d.ts +2 -0
  286. package/lib/mol-geo/geometry/base.js +2 -0
  287. package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +4 -1
  288. package/lib/mol-geo/geometry/cylinders/cylinders.js +4 -2
  289. package/lib/mol-geo/geometry/direct-volume/direct-volume.d.ts +1 -0
  290. package/lib/mol-geo/geometry/image/image.d.ts +1 -0
  291. package/lib/mol-geo/geometry/lines/lines.d.ts +2 -0
  292. package/lib/mol-geo/geometry/mesh/color-smoothing.js +1 -1
  293. package/lib/mol-geo/geometry/mesh/mesh.d.ts +3 -0
  294. package/lib/mol-geo/geometry/mesh/mesh.js +4 -2
  295. package/lib/mol-geo/geometry/points/points.d.ts +1 -0
  296. package/lib/mol-geo/geometry/spheres/spheres.d.ts +3 -0
  297. package/lib/mol-geo/geometry/spheres/spheres.js +4 -2
  298. package/lib/mol-geo/geometry/substance-data.js +3 -3
  299. package/lib/mol-geo/geometry/text/text.d.ts +1 -0
  300. package/lib/mol-geo/geometry/texture-mesh/color-smoothing.js +3 -3
  301. package/lib/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +3 -0
  302. package/lib/mol-geo/geometry/texture-mesh/texture-mesh.js +4 -2
  303. package/lib/mol-gl/renderable/cylinders.d.ts +31 -28
  304. package/lib/mol-gl/renderable/cylinders.js +3 -3
  305. package/lib/mol-gl/renderable/direct-volume.d.ts +1 -0
  306. package/lib/mol-gl/renderable/image.d.ts +1 -0
  307. package/lib/mol-gl/renderable/lines.d.ts +1 -0
  308. package/lib/mol-gl/renderable/mesh.d.ts +28 -25
  309. package/lib/mol-gl/renderable/mesh.js +3 -3
  310. package/lib/mol-gl/renderable/points.d.ts +1 -0
  311. package/lib/mol-gl/renderable/schema.d.ts +1 -0
  312. package/lib/mol-gl/renderable/schema.js +3 -3
  313. package/lib/mol-gl/renderable/spheres.d.ts +31 -28
  314. package/lib/mol-gl/renderable/spheres.js +3 -3
  315. package/lib/mol-gl/renderable/text.d.ts +1 -0
  316. package/lib/mol-gl/renderable/texture-mesh.d.ts +3 -0
  317. package/lib/mol-gl/renderable/texture-mesh.js +1 -1
  318. package/lib/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +1 -1
  319. package/lib/mol-gl/shader/chunks/apply-light-color.glsl.js +1 -1
  320. package/lib/mol-gl/shader/chunks/assign-color-varying.glsl.d.ts +1 -1
  321. package/lib/mol-gl/shader/chunks/assign-color-varying.glsl.js +1 -1
  322. package/lib/mol-gl/shader/chunks/assign-material-color.glsl.d.ts +1 -1
  323. package/lib/mol-gl/shader/chunks/assign-material-color.glsl.js +1 -1
  324. package/lib/mol-gl/shader/chunks/color-frag-params.glsl.d.ts +1 -1
  325. package/lib/mol-gl/shader/chunks/color-frag-params.glsl.js +1 -1
  326. package/lib/mol-gl/shader/chunks/color-vert-params.glsl.d.ts +1 -1
  327. package/lib/mol-gl/shader/chunks/color-vert-params.glsl.js +1 -1
  328. package/lib/mol-gl/shader/chunks/common-frag-params.glsl.d.ts +1 -1
  329. package/lib/mol-gl/shader/chunks/common-frag-params.glsl.js +1 -1
  330. package/lib/mol-gl/shader/chunks/common.glsl.d.ts +1 -1
  331. package/lib/mol-gl/shader/chunks/common.glsl.js +1 -1
  332. package/lib/mol-gl/shader/chunks/light-frag-params.glsl.d.ts +1 -1
  333. package/lib/mol-gl/shader/chunks/light-frag-params.glsl.js +1 -1
  334. package/lib/mol-gl/shader/cylinders.frag.d.ts +1 -1
  335. package/lib/mol-gl/shader/cylinders.frag.js +1 -1
  336. package/lib/mol-gl/shader/direct-volume.frag.d.ts +1 -1
  337. package/lib/mol-gl/shader/direct-volume.frag.js +1 -1
  338. package/lib/mol-gl/shader/mesh.frag.d.ts +1 -1
  339. package/lib/mol-gl/shader/mesh.frag.js +1 -1
  340. package/lib/mol-gl/shader/postprocessing.frag.d.ts +1 -1
  341. package/lib/mol-gl/shader/postprocessing.frag.js +1 -1
  342. package/lib/mol-gl/shader/spheres.frag.d.ts +1 -1
  343. package/lib/mol-gl/shader/spheres.frag.js +1 -1
  344. package/lib/mol-io/reader/cif/schema/mmcif.d.ts +326 -1
  345. package/lib/mol-io/reader/cif/schema/mmcif.js +326 -1
  346. package/lib/mol-math/geometry/symmetry-operator.js +3 -2
  347. package/lib/mol-model/structure/model/model.d.ts +1 -0
  348. package/lib/mol-model/structure/model/model.js +15 -5
  349. package/lib/mol-model/structure/model/properties/atomic/hierarchy.d.ts +6 -1
  350. package/lib/mol-model/structure/model/properties/atomic/hierarchy.js +1 -1
  351. package/lib/mol-model/structure/model/properties/utils/atomic-derived.d.ts +1 -1
  352. package/lib/mol-model/structure/model/properties/utils/atomic-derived.js +5 -2
  353. package/lib/mol-model/structure/model/properties/utils/atomic-index.d.ts +1 -1
  354. package/lib/mol-model/structure/model/properties/utils/atomic-index.js +12 -1
  355. package/lib/mol-model/structure/model/types.js +9 -0
  356. package/lib/mol-model/structure/structure/unit/rings.js +2 -0
  357. package/lib/mol-model-formats/shape/ply.d.ts +6 -0
  358. package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +3 -0
  359. package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +3 -0
  360. package/lib/mol-model-props/computed/representations/interactions.d.ts +9 -0
  361. package/lib/mol-model-props/integrative/cross-link-restraint/representation.d.ts +12 -0
  362. package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +1 -0
  363. package/lib/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +3 -2
  364. package/lib/mol-plugin/commands.d.ts +3 -0
  365. package/lib/mol-plugin/config.d.ts +2 -0
  366. package/lib/mol-plugin/config.js +9 -3
  367. package/lib/mol-plugin/util/viewport-screenshot.d.ts +9 -0
  368. package/lib/mol-plugin/version.js +2 -2
  369. package/lib/mol-plugin-state/actions/structure.d.ts +7 -1
  370. package/lib/mol-plugin-state/actions/structure.js +150 -72
  371. package/lib/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +5 -355
  372. package/lib/mol-plugin-state/builder/structure/hierarchy-preset.js +14 -9
  373. package/lib/mol-plugin-state/builder/structure/hierarchy.d.ts +1 -71
  374. package/lib/mol-plugin-state/helpers/structure-selection-query.js +34 -20
  375. package/lib/mol-plugin-state/manager/structure/component.d.ts +2 -0
  376. package/lib/mol-plugin-state/manager/structure/component.js +2 -2
  377. package/lib/mol-plugin-state/transforms/representation.d.ts +22 -0
  378. package/lib/mol-plugin-ui/controls/parameters.d.ts +3 -2
  379. package/lib/mol-plugin-ui/controls/parameters.js +12 -7
  380. package/lib/mol-plugin-ui/hooks/use-behavior.d.ts +1 -1
  381. package/lib/mol-plugin-ui/hooks/use-behavior.js +9 -18
  382. package/lib/mol-plugin-ui/index.d.ts +4 -4
  383. package/lib/mol-plugin-ui/index.js +11 -13
  384. package/lib/mol-plugin-ui/plugin.d.ts +1 -1
  385. package/lib/mol-plugin-ui/plugin.js +76 -10
  386. package/lib/mol-plugin-ui/skin/base/base.scss +32 -32
  387. package/lib/mol-plugin-ui/skin/base/components/controls-base.scss +333 -333
  388. package/lib/mol-plugin-ui/skin/base/components/controls.scss +418 -418
  389. package/lib/mol-plugin-ui/skin/base/components/help.scss +27 -27
  390. package/lib/mol-plugin-ui/skin/base/components/line-graph.scss +67 -67
  391. package/lib/mol-plugin-ui/skin/base/components/log.scss +100 -100
  392. package/lib/mol-plugin-ui/skin/base/components/misc.scss +643 -616
  393. package/lib/mol-plugin-ui/skin/base/components/sequence.scss +125 -125
  394. package/lib/mol-plugin-ui/skin/base/components/slider.scss +165 -165
  395. package/lib/mol-plugin-ui/skin/base/components/tasks.scss +99 -99
  396. package/lib/mol-plugin-ui/skin/base/components/toast.scss +83 -83
  397. package/lib/mol-plugin-ui/skin/base/components/transformer.scss +163 -163
  398. package/lib/mol-plugin-ui/skin/base/components/viewport.scss +127 -127
  399. package/lib/mol-plugin-ui/skin/base/layout/common.scss +71 -71
  400. package/lib/mol-plugin-ui/skin/base/layout/controls-landscape.scss +89 -89
  401. package/lib/mol-plugin-ui/skin/base/layout/controls-outside.scss +98 -98
  402. package/lib/mol-plugin-ui/skin/base/layout/controls-portrait.scss +108 -108
  403. package/lib/mol-plugin-ui/skin/base/layout.scss +40 -40
  404. package/lib/mol-plugin-ui/skin/base/logo.scss +12 -12
  405. package/lib/mol-plugin-ui/skin/base/normalize.scss +209 -209
  406. package/lib/mol-plugin-ui/skin/base/ui.scss +40 -40
  407. package/lib/mol-plugin-ui/skin/base/variables.scss +85 -85
  408. package/lib/mol-plugin-ui/skin/blue.scss +1 -1
  409. package/lib/mol-plugin-ui/skin/colors/blue.scss +23 -23
  410. package/lib/mol-plugin-ui/skin/colors/dark.scss +23 -23
  411. package/lib/mol-plugin-ui/skin/colors/light.scss +29 -29
  412. package/lib/mol-plugin-ui/skin/dark.scss +1 -1
  413. package/lib/mol-plugin-ui/skin/light.scss +1 -1
  414. package/lib/mol-repr/shape/loci/angle.d.ts +3 -0
  415. package/lib/mol-repr/shape/loci/common.d.ts +1 -0
  416. package/lib/mol-repr/shape/loci/dihedral.d.ts +3 -0
  417. package/lib/mol-repr/shape/loci/distance.d.ts +1 -0
  418. package/lib/mol-repr/shape/loci/label.d.ts +1 -0
  419. package/lib/mol-repr/shape/loci/orientation.d.ts +3 -0
  420. package/lib/mol-repr/shape/loci/plane.d.ts +3 -0
  421. package/lib/mol-repr/shape/model/unitcell.d.ts +3 -0
  422. package/lib/mol-repr/structure/complex-visual.d.ts +12 -0
  423. package/lib/mol-repr/structure/params.d.ts +16 -0
  424. package/lib/mol-repr/structure/registry.d.ts +35 -1
  425. package/lib/mol-repr/structure/representation/backbone.d.ts +9 -0
  426. package/lib/mol-repr/structure/representation/backbone.js +2 -1
  427. package/lib/mol-repr/structure/representation/ball-and-stick.d.ts +9 -0
  428. package/lib/mol-repr/structure/representation/ball-and-stick.js +2 -1
  429. package/lib/mol-repr/structure/representation/carbohydrate.d.ts +9 -0
  430. package/lib/mol-repr/structure/representation/carbohydrate.js +2 -1
  431. package/lib/mol-repr/structure/representation/cartoon.d.ts +9 -0
  432. package/lib/mol-repr/structure/representation/cartoon.js +2 -1
  433. package/lib/mol-repr/structure/representation/ellipsoid.d.ts +9 -0
  434. package/lib/mol-repr/structure/representation/ellipsoid.js +2 -1
  435. package/lib/mol-repr/structure/representation/gaussian-surface.d.ts +9 -0
  436. package/lib/mol-repr/structure/representation/gaussian-surface.js +2 -1
  437. package/lib/mol-repr/structure/representation/gaussian-volume.d.ts +3 -0
  438. package/lib/mol-repr/structure/representation/label.d.ts +6 -3
  439. package/lib/mol-repr/structure/representation/line.d.ts +3 -0
  440. package/lib/mol-repr/structure/representation/molecular-surface.d.ts +9 -0
  441. package/lib/mol-repr/structure/representation/molecular-surface.js +2 -1
  442. package/lib/mol-repr/structure/representation/orientation.d.ts +9 -0
  443. package/lib/mol-repr/structure/representation/orientation.js +2 -1
  444. package/lib/mol-repr/structure/representation/point.d.ts +3 -0
  445. package/lib/mol-repr/structure/representation/putty.d.ts +9 -0
  446. package/lib/mol-repr/structure/representation/putty.js +2 -1
  447. package/lib/mol-repr/structure/representation/spacefill.d.ts +9 -0
  448. package/lib/mol-repr/structure/representation/spacefill.js +2 -1
  449. package/lib/mol-repr/structure/units-visual.d.ts +16 -0
  450. package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +6 -0
  451. package/lib/mol-repr/structure/visual/bond-inter-unit-line.d.ts +1 -0
  452. package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +6 -0
  453. package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.js +2 -2
  454. package/lib/mol-repr/structure/visual/bond-intra-unit-line.d.ts +1 -0
  455. package/lib/mol-repr/structure/visual/bond-intra-unit-line.js +2 -2
  456. package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +3 -0
  457. package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +3 -0
  458. package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +3 -0
  459. package/lib/mol-repr/structure/visual/element-cross.d.ts +1 -0
  460. package/lib/mol-repr/structure/visual/element-point.d.ts +1 -0
  461. package/lib/mol-repr/structure/visual/element-sphere.d.ts +6 -0
  462. package/lib/mol-repr/structure/visual/ellipsoid-mesh.d.ts +3 -0
  463. package/lib/mol-repr/structure/visual/gaussian-density-volume.d.ts +2 -0
  464. package/lib/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +12 -0
  465. package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +1 -0
  466. package/lib/mol-repr/structure/visual/label-text.d.ts +3 -2
  467. package/lib/mol-repr/structure/visual/label-text.js +2 -2
  468. package/lib/mol-repr/structure/visual/molecular-surface-mesh.d.ts +3 -0
  469. package/lib/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +1 -0
  470. package/lib/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +3 -0
  471. package/lib/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +3 -0
  472. package/lib/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +3 -0
  473. package/lib/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +6 -0
  474. package/lib/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +6 -0
  475. package/lib/mol-repr/structure/visual/polymer-direction-wedge.d.ts +3 -0
  476. package/lib/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +3 -0
  477. package/lib/mol-repr/structure/visual/polymer-trace-mesh.d.ts +3 -0
  478. package/lib/mol-repr/structure/visual/polymer-trace-mesh.js +1 -1
  479. package/lib/mol-repr/structure/visual/polymer-tube-mesh.d.ts +3 -0
  480. package/lib/mol-repr/structure/visual/util/bond.js +1 -1
  481. package/lib/mol-repr/volume/direct-volume.d.ts +3 -0
  482. package/lib/mol-repr/volume/isosurface.d.ts +16 -0
  483. package/lib/mol-repr/volume/isosurface.js +2 -1
  484. package/lib/mol-repr/volume/registry.d.ts +5 -0
  485. package/lib/mol-repr/volume/representation.d.ts +1 -0
  486. package/lib/mol-repr/volume/slice.d.ts +3 -0
  487. package/lib/mol-script/language/builder.d.ts +0 -1
  488. package/lib/mol-theme/color/illustrative.d.ts +2 -0
  489. package/lib/mol-theme/color/illustrative.js +2 -2
  490. package/lib/mol-theme/color.d.ts +1 -0
  491. package/lib/mol-util/material.d.ts +5 -1
  492. package/lib/mol-util/material.js +9 -7
  493. package/package.json +162 -160
@@ -30,11 +30,14 @@ export declare const CrossLinkRestraintCylinderParams: {
30
30
  flatShaded: PD.BooleanParam;
31
31
  ignoreLight: PD.BooleanParam;
32
32
  xrayShaded: PD.BooleanParam;
33
+ bumpFrequency: PD.Numeric;
34
+ bumpAmplitude: PD.Numeric;
33
35
  alpha: PD.Numeric;
34
36
  quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
35
37
  material: PD.Group<PD.Normalize<{
36
38
  metalness: number;
37
39
  roughness: number;
40
+ bumpiness: number;
38
41
  }>>;
39
42
  };
40
43
  export declare type CrossLinkRestraintCylinderParams = typeof CrossLinkRestraintCylinderParams;
@@ -59,11 +62,14 @@ export declare const CrossLinkRestraintParams: {
59
62
  flatShaded: PD.BooleanParam;
60
63
  ignoreLight: PD.BooleanParam;
61
64
  xrayShaded: PD.BooleanParam;
65
+ bumpFrequency: PD.Numeric;
66
+ bumpAmplitude: PD.Numeric;
62
67
  alpha: PD.Numeric;
63
68
  quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
64
69
  material: PD.Group<PD.Normalize<{
65
70
  metalness: number;
66
71
  roughness: number;
72
+ bumpiness: number;
67
73
  }>>;
68
74
  };
69
75
  export declare type CrossLinkRestraintParams = typeof CrossLinkRestraintParams;
@@ -87,11 +93,14 @@ export declare function getCrossLinkRestraintParams(ctx: ThemeRegistryContext, s
87
93
  flatShaded: PD.BooleanParam;
88
94
  ignoreLight: PD.BooleanParam;
89
95
  xrayShaded: PD.BooleanParam;
96
+ bumpFrequency: PD.Numeric;
97
+ bumpAmplitude: PD.Numeric;
90
98
  alpha: PD.Numeric;
91
99
  quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
92
100
  material: PD.Group<PD.Normalize<{
93
101
  metalness: number;
94
102
  roughness: number;
103
+ bumpiness: number;
95
104
  }>>;
96
105
  };
97
106
  export declare type CrossLinkRestraintRepresentation = StructureRepresentation<CrossLinkRestraintParams>;
@@ -116,10 +125,13 @@ export declare const CrossLinkRestraintRepresentationProvider: StructureRepresen
116
125
  flatShaded: PD.BooleanParam;
117
126
  ignoreLight: PD.BooleanParam;
118
127
  xrayShaded: PD.BooleanParam;
128
+ bumpFrequency: PD.Numeric;
129
+ bumpAmplitude: PD.Numeric;
119
130
  alpha: PD.Numeric;
120
131
  quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
121
132
  material: PD.Group<PD.Normalize<{
122
133
  metalness: number;
123
134
  roughness: number;
135
+ bumpiness: number;
124
136
  }>>;
125
137
  }, CrossLinkRestraint.Tag>;
@@ -24,6 +24,7 @@ declare const StructureFocusRepresentationParams: (plugin: PluginContext) => {
24
24
  material: PD.Group<PD.Normalize<{
25
25
  metalness: number;
26
26
  roughness: number;
27
+ bumpiness: number;
27
28
  }>>;
28
29
  };
29
30
  declare type StructureFocusRepresentationProps = PD.ValuesFor<ReturnType<typeof StructureFocusRepresentationParams>>;
@@ -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
- /** Precision data the server can show. */
13
- label: string;
12
+ label: string; /** Precision data the server can show. */
14
13
  description?: string | undefined;
15
14
  } | undefined): {
16
15
  id: import("../../../../mol-util/uuid").UUID;
17
16
  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,6 +23,7 @@ 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 */
26
27
  label: string;
27
28
  description?: string | undefined;
28
29
  data: VolumeServerInfo.Data;
@@ -232,6 +232,7 @@ export declare const PluginCommands: {
232
232
  outline: 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<{
233
233
  scale: any;
234
234
  threshold: any;
235
+ color: any;
235
236
  }>, "on">;
236
237
  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<{
237
238
  edgeThreshold: any;
@@ -329,6 +330,8 @@ export declare const PluginCommands: {
329
330
  flipSided: any;
330
331
  flatShaded: any;
331
332
  xrayShaded: any;
333
+ bumpFrequency: any;
334
+ bumpAmplitude: any;
332
335
  quality: any;
333
336
  material: any;
334
337
  }>, "on">;
@@ -16,6 +16,7 @@ export declare class PluginConfigItem<T = any> {
16
16
  constructor(key: string, defaultValue?: T | undefined);
17
17
  }
18
18
  declare function item<T>(key: string, defaultValue?: T): PluginConfigItem<T>;
19
+ export declare function preferWebGl1(): boolean;
19
20
  export declare const PluginConfig: {
20
21
  item: typeof item;
21
22
  General: {
@@ -58,6 +59,7 @@ export declare const PluginConfig: {
58
59
  highSymmetryUnitCount: number;
59
60
  fiberResidueCount: number;
60
61
  }>;
62
+ DefaultRepresentationPreset: PluginConfigItem<string>;
61
63
  DefaultRepresentationPresetParams: PluginConfigItem<StructureRepresentationPresetProvider.CommonParams>;
62
64
  };
63
65
  };
@@ -6,7 +6,7 @@
6
6
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.PluginConfigManager = exports.PluginConfig = exports.PluginConfigItem = void 0;
9
+ exports.PluginConfigManager = exports.PluginConfig = exports.preferWebGl1 = exports.PluginConfigItem = void 0;
10
10
  var structure_1 = require("../mol-model/structure");
11
11
  var PluginConfigItem = /** @class */ (function () {
12
12
  function PluginConfigItem(key, defaultValue) {
@@ -22,9 +22,14 @@ function item(key, defaultValue) { return new PluginConfigItem(key, defaultValue
22
22
  function preferWebGl1() {
23
23
  if (typeof navigator === 'undefined' || typeof window === 'undefined')
24
24
  return false;
25
- // WebGL2 isn't working in MacOS 12.0.1 Safari 15.1 (but is working in Safari tech preview)
25
+ // WebGL2 isn't working in MacOS 12.0.1 Safari 15.1, 15.2. It is working in Safari 15.4 tech preview, so disabling all versions before that.
26
26
  // prefer webgl 1 based on the userAgent substring
27
- if (navigator.userAgent.indexOf('Version/15.1 Safari') > 0) {
27
+ var unpportedSafariVersions = [
28
+ 'Version/15.1 Safari',
29
+ 'Version/15.2 Safari',
30
+ 'Version/15.3 Safari'
31
+ ];
32
+ if (unpportedSafariVersions.some(function (v) { return navigator.userAgent.indexOf(v) > 0; })) {
28
33
  return true;
29
34
  }
30
35
  // Check for iOS device which enabled WebGL2 recently but it doesn't seem
@@ -35,6 +40,7 @@ function preferWebGl1() {
35
40
  var isTouchScreen = navigator.maxTouchPoints >= 4; // true for iOS 13 (and hopefully beyond)
36
41
  return !window.MSStream && (isIOS || (isAppleDevice && isTouchScreen));
37
42
  }
43
+ exports.preferWebGl1 = preferWebGl1;
38
44
  exports.PluginConfig = {
39
45
  item: item,
40
46
  General: {
@@ -75,6 +81,7 @@ exports.PluginConfig = {
75
81
  },
76
82
  Structure: {
77
83
  SizeThresholds: item('structure.size-thresholds', structure_1.Structure.DefaultSizeThresholds),
84
+ DefaultRepresentationPreset: item('structure.default-representation-preset', 'auto'),
78
85
  DefaultRepresentationPresetParams: item('structure.default-representation-preset-params', {})
79
86
  }
80
87
  };
@@ -37,10 +37,13 @@ declare class ViewportScreenshotHelper extends PluginComponent {
37
37
  flipSided: boolean;
38
38
  flatShaded: boolean;
39
39
  xrayShaded: boolean;
40
+ bumpFrequency: number;
41
+ bumpAmplitude: number;
40
42
  quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
41
43
  material: PD.Normalize<{
42
44
  metalness: number;
43
45
  roughness: number;
46
+ bumpiness: number;
44
47
  }>;
45
48
  }>, "on">>;
46
49
  };
@@ -62,10 +65,13 @@ declare class ViewportScreenshotHelper extends PluginComponent {
62
65
  flipSided: boolean;
63
66
  flatShaded: boolean;
64
67
  xrayShaded: boolean;
68
+ bumpFrequency: number;
69
+ bumpAmplitude: number;
65
70
  quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
66
71
  material: PD.Normalize<{
67
72
  metalness: number;
68
73
  roughness: number;
74
+ bumpiness: number;
69
75
  }>;
70
76
  }>, "on">>;
71
77
  }>>;
@@ -95,10 +101,13 @@ declare class ViewportScreenshotHelper extends PluginComponent {
95
101
  flipSided: boolean;
96
102
  flatShaded: boolean;
97
103
  xrayShaded: boolean;
104
+ bumpFrequency: number;
105
+ bumpAmplitude: number;
98
106
  quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
99
107
  material: PD.Normalize<{
100
108
  metalness: number;
101
109
  roughness: number;
110
+ bumpiness: number;
102
111
  }>;
103
112
  }>, "on">>;
104
113
  }>;
@@ -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-2021 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>
@@ -36,6 +36,12 @@ declare const DownloadStructure: StateAction<PluginStateObject.Root, void, PD.No
36
36
  }>, "swissmodel"> | PD.NamedParams<PD.Normalize<{
37
37
  id: any;
38
38
  options: any;
39
+ }>, "alphafolddb"> | PD.NamedParams<PD.Normalize<{
40
+ id: any;
41
+ options: any;
42
+ }>, "modelarchive"> | PD.NamedParams<PD.Normalize<{
43
+ id: any;
44
+ options: any;
39
45
  }>, "pubchem">;
40
46
  }>>;
41
47
  export declare const UpdateTrajectory: StateAction<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, void, PD.Normalize<{
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2018-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
4
  *
5
5
  * @author David Sehnal <david.sehnal@gmail.com>
6
6
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
@@ -19,15 +19,19 @@ var transforms_1 = require("../transforms");
19
19
  var model_1 = require("../transforms/model");
20
20
  var assets_1 = require("../../mol-util/assets");
21
21
  var config_1 = require("../../mol-plugin/config");
22
- var DownloadModelRepresentationOptions = function (plugin) { return param_definition_1.ParamDefinition.Group({
23
- type: root_structure_1.RootStructureDefinition.getParams(void 0, 'auto').type,
24
- representation: param_definition_1.ParamDefinition.Select(representation_preset_1.PresetStructureRepresentations.auto.id, plugin.builders.structure.representation.getPresets().map(function (p) { return [p.id, p.display.name, p.display.group]; }), { description: 'Which representation preset to use.' }),
25
- representationParams: param_definition_1.ParamDefinition.Group(representation_preset_1.StructureRepresentationPresetProvider.CommonParams, { isHidden: true }),
26
- asTrajectory: param_definition_1.ParamDefinition.Optional(param_definition_1.ParamDefinition.Boolean(false, { description: 'Load all entries into a single trajectory.' }))
27
- }, { isExpanded: false }); };
22
+ var file_info_1 = require("../../mol-util/file-info");
23
+ var DownloadModelRepresentationOptions = function (plugin) {
24
+ var representationDefault = plugin.config.get(config_1.PluginConfig.Structure.DefaultRepresentationPreset) || representation_preset_1.PresetStructureRepresentations.auto.id;
25
+ return param_definition_1.ParamDefinition.Group({
26
+ type: root_structure_1.RootStructureDefinition.getParams(void 0, 'auto').type,
27
+ representation: param_definition_1.ParamDefinition.Select(representationDefault, plugin.builders.structure.representation.getPresets().map(function (p) { return [p.id, p.display.name, p.display.group]; }), { description: 'Which representation preset to use.' }),
28
+ representationParams: param_definition_1.ParamDefinition.Group(representation_preset_1.StructureRepresentationPresetProvider.CommonParams, { isHidden: true }),
29
+ asTrajectory: param_definition_1.ParamDefinition.Optional(param_definition_1.ParamDefinition.Boolean(false, { description: 'Load all entries into a single trajectory.' }))
30
+ }, { isExpanded: false });
31
+ };
28
32
  exports.PdbDownloadProvider = {
29
33
  'rcsb': param_definition_1.ParamDefinition.Group({
30
- encoding: param_definition_1.ParamDefinition.Select('bcif', [['cif', 'cif'], ['bcif', 'bcif']]),
34
+ encoding: param_definition_1.ParamDefinition.Select('bcif', param_definition_1.ParamDefinition.arrayToOptions(['cif', 'bcif'])),
31
35
  }, { label: 'RCSB PDB', isFlat: true }),
32
36
  'pdbe': param_definition_1.ParamDefinition.Group({
33
37
  variant: param_definition_1.ParamDefinition.Select('updated-bcif', [['updated-bcif', 'Updated (bcif)'], ['updated', 'Updated'], ['archival', 'Archival']]),
@@ -51,7 +55,7 @@ var DownloadStructure = mol_state_1.StateAction.build({
51
55
  'pdb-dev': param_definition_1.ParamDefinition.Group({
52
56
  provider: param_definition_1.ParamDefinition.Group({
53
57
  id: param_definition_1.ParamDefinition.Text('PDBDEV_00000001', { label: 'PDBDev Id(s)', description: 'One or more comma/space separated ids.' }),
54
- encoding: param_definition_1.ParamDefinition.Select('bcif', [['cif', 'cif'], ['bcif', 'bcif']]),
58
+ encoding: param_definition_1.ParamDefinition.Select('bcif', param_definition_1.ParamDefinition.arrayToOptions(['cif', 'bcif'])),
55
59
  }, { pivot: 'id' }),
56
60
  options: options
57
61
  }, { isFlat: true, label: 'PDBDEV' }),
@@ -59,6 +63,14 @@ var DownloadStructure = mol_state_1.StateAction.build({
59
63
  id: param_definition_1.ParamDefinition.Text('Q9Y2I8', { label: 'UniProtKB AC(s)', description: 'One or more comma/space separated ACs.' }),
60
64
  options: options
61
65
  }, { isFlat: true, label: 'SWISS-MODEL', description: 'Loads the best homology model or experimental structure' }),
66
+ 'alphafolddb': param_definition_1.ParamDefinition.Group({
67
+ id: param_definition_1.ParamDefinition.Text('Q8W3K0', { label: 'UniProtKB AC(s)', description: 'One or more comma/space separated ACs.' }),
68
+ options: options
69
+ }, { isFlat: true, label: 'AlphaFold DB', description: 'Loads the predicted model if available' }),
70
+ 'modelarchive': param_definition_1.ParamDefinition.Group({
71
+ id: param_definition_1.ParamDefinition.Text('ma-bak-cepc-0003', { label: 'Accession Code(s)', description: 'One or more comma/space separated ACs.' }),
72
+ options: options
73
+ }, { isFlat: true, label: 'Model Archive' }),
62
74
  'pubchem': param_definition_1.ParamDefinition.Group({
63
75
  id: param_definition_1.ParamDefinition.Text('2244,2245', { label: 'PubChem ID', description: 'One or more comma/space separated IDs.' }),
64
76
  options: options
@@ -75,58 +87,99 @@ var DownloadStructure = mol_state_1.StateAction.build({
75
87
  })(function (_a, plugin) {
76
88
  var params = _a.params, state = _a.state;
77
89
  return mol_task_1.Task.create('Download Structure', function (ctx) { return (0, tslib_1.__awaiter)(void 0, void 0, void 0, function () {
78
- var src, downloadParams, asTrajectory, format, representationPreset, showUnitcell, structure;
79
- return (0, tslib_1.__generator)(this, function (_a) {
80
- switch (_a.label) {
90
+ var src, downloadParams, asTrajectory, format, _a, representationPreset, showUnitcell, structure;
91
+ return (0, tslib_1.__generator)(this, function (_b) {
92
+ switch (_b.label) {
81
93
  case 0:
82
94
  plugin.behaviors.layout.leftPanelTabName.next('data');
83
95
  src = params.source;
84
96
  asTrajectory = false, format = 'mmcif';
85
- switch (src.name) {
86
- case 'url':
87
- downloadParams = [{ url: src.params.url, isBinary: src.params.isBinary }];
88
- format = src.params.format;
89
- break;
90
- case 'pdb':
91
- downloadParams = src.params.provider.server.name === 'pdbe'
92
- ? src.params.provider.server.params.variant === 'updated'
93
- ? getDownloadParams(src.params.provider.id, function (id) { return "https://www.ebi.ac.uk/pdbe/static/entry/".concat(id.toLowerCase(), "_updated.cif"); }, function (id) { return "PDBe: ".concat(id, " (updated cif)"); }, false)
94
- : src.params.provider.server.params.variant === 'updated-bcif'
95
- ? getDownloadParams(src.params.provider.id, function (id) { return "https://www.ebi.ac.uk/pdbe/entry-files/download/".concat(id.toLowerCase(), ".bcif"); }, function (id) { return "PDBe: ".concat(id, " (updated cif)"); }, true)
96
- : getDownloadParams(src.params.provider.id, function (id) { return "https://www.ebi.ac.uk/pdbe/static/entry/".concat(id.toLowerCase(), ".cif"); }, function (id) { return "PDBe: ".concat(id, " (cif)"); }, false)
97
- : src.params.provider.server.params.encoding === 'cif'
98
- ? getDownloadParams(src.params.provider.id, function (id) { return "https://files.rcsb.org/download/".concat(id.toUpperCase(), ".cif"); }, function (id) { return "RCSB: ".concat(id, " (cif)"); }, false)
99
- : getDownloadParams(src.params.provider.id, function (id) { return "https://models.rcsb.org/".concat(id.toUpperCase(), ".bcif"); }, function (id) { return "RCSB: ".concat(id, " (bcif)"); }, true);
100
- asTrajectory = !!src.params.options.asTrajectory;
101
- break;
102
- case 'pdb-dev':
103
- downloadParams = getDownloadParams(src.params.provider.id, function (id) {
104
- var nId = id.toUpperCase().startsWith('PDBDEV_') ? id : "PDBDEV_".concat(id.padStart(8, '0'));
105
- return src.params.provider.encoding === 'bcif'
106
- ? "https://pdb-dev.wwpdb.org/bcif/".concat(nId.toUpperCase(), ".bcif")
107
- : "https://pdb-dev.wwpdb.org/cif/".concat(nId.toUpperCase(), ".cif");
108
- }, function (id) { return id.toUpperCase().startsWith('PDBDEV_') ? id : "PDBDEV_".concat(id.padStart(8, '0')); }, src.params.provider.encoding === 'bcif');
109
- asTrajectory = !!src.params.options.asTrajectory;
110
- break;
111
- case 'swissmodel':
112
- downloadParams = getDownloadParams(src.params.id, function (id) { return "https://swissmodel.expasy.org/repository/uniprot/".concat(id.toUpperCase(), ".pdb"); }, function (id) { return "SWISS-MODEL: ".concat(id); }, false);
113
- asTrajectory = !!src.params.options.asTrajectory;
114
- format = 'pdb';
115
- break;
116
- case 'pubchem':
117
- downloadParams = getDownloadParams(src.params.id, function (id) { return "https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/CID/".concat(id.trim(), "/record/SDF/?record_type=3d"); }, function (id) { return "PubChem: ".concat(id); }, false);
118
- asTrajectory = !!src.params.options.asTrajectory;
119
- format = 'mol';
120
- break;
121
- default: throw new Error("".concat(src.name, " not supported."));
97
+ _a = src.name;
98
+ switch (_a) {
99
+ case 'url': return [3 /*break*/, 1];
100
+ case 'pdb': return [3 /*break*/, 2];
101
+ case 'pdb-dev': return [3 /*break*/, 4];
102
+ case 'swissmodel': return [3 /*break*/, 6];
103
+ case 'alphafolddb': return [3 /*break*/, 8];
104
+ case 'modelarchive': return [3 /*break*/, 10];
105
+ case 'pubchem': return [3 /*break*/, 12];
122
106
  }
123
- representationPreset = params.source.params.options.representation || representation_preset_1.PresetStructureRepresentations.auto.id;
107
+ return [3 /*break*/, 14];
108
+ case 1:
109
+ downloadParams = [{ url: src.params.url, isBinary: src.params.isBinary }];
110
+ format = src.params.format;
111
+ return [3 /*break*/, 15];
112
+ case 2: return [4 /*yield*/, (src.params.provider.server.name === 'pdbe'
113
+ ? src.params.provider.server.params.variant === 'updated'
114
+ ? getDownloadParams(src.params.provider.id, function (id) { return "https://www.ebi.ac.uk/pdbe/static/entry/".concat(id.toLowerCase(), "_updated.cif"); }, function (id) { return "PDBe: ".concat(id, " (updated cif)"); }, false)
115
+ : src.params.provider.server.params.variant === 'updated-bcif'
116
+ ? getDownloadParams(src.params.provider.id, function (id) { return "https://www.ebi.ac.uk/pdbe/entry-files/download/".concat(id.toLowerCase(), ".bcif"); }, function (id) { return "PDBe: ".concat(id, " (updated cif)"); }, true)
117
+ : getDownloadParams(src.params.provider.id, function (id) { return "https://www.ebi.ac.uk/pdbe/static/entry/".concat(id.toLowerCase(), ".cif"); }, function (id) { return "PDBe: ".concat(id, " (cif)"); }, false)
118
+ : src.params.provider.server.params.encoding === 'cif'
119
+ ? getDownloadParams(src.params.provider.id, function (id) { return "https://files.rcsb.org/download/".concat(id.toUpperCase(), ".cif"); }, function (id) { return "RCSB: ".concat(id, " (cif)"); }, false)
120
+ : getDownloadParams(src.params.provider.id, function (id) { return "https://models.rcsb.org/".concat(id.toUpperCase(), ".bcif"); }, function (id) { return "RCSB: ".concat(id, " (bcif)"); }, true))];
121
+ case 3:
122
+ downloadParams = _b.sent();
123
+ asTrajectory = !!src.params.options.asTrajectory;
124
+ return [3 /*break*/, 15];
125
+ case 4: return [4 /*yield*/, getDownloadParams(src.params.provider.id, function (id) {
126
+ var nId = id.toUpperCase().startsWith('PDBDEV_') ? id : "PDBDEV_".concat(id.padStart(8, '0'));
127
+ return src.params.provider.encoding === 'bcif'
128
+ ? "https://pdb-dev.wwpdb.org/bcif/".concat(nId.toUpperCase(), ".bcif")
129
+ : "https://pdb-dev.wwpdb.org/cif/".concat(nId.toUpperCase(), ".cif");
130
+ }, function (id) { return id.toUpperCase().startsWith('PDBDEV_') ? id : "PDBDEV_".concat(id.padStart(8, '0')); }, src.params.provider.encoding === 'bcif')];
131
+ case 5:
132
+ downloadParams = _b.sent();
133
+ asTrajectory = !!src.params.options.asTrajectory;
134
+ return [3 /*break*/, 15];
135
+ case 6: return [4 /*yield*/, getDownloadParams(src.params.id, function (id) { return "https://swissmodel.expasy.org/repository/uniprot/".concat(id.toUpperCase(), ".pdb"); }, function (id) { return "SWISS-MODEL: ".concat(id); }, false)];
136
+ case 7:
137
+ downloadParams = _b.sent();
138
+ asTrajectory = !!src.params.options.asTrajectory;
139
+ format = 'pdb';
140
+ return [3 /*break*/, 15];
141
+ case 8: return [4 /*yield*/, getDownloadParams(src.params.id, function (id) { return (0, tslib_1.__awaiter)(void 0, void 0, void 0, function () {
142
+ var url, info;
143
+ return (0, tslib_1.__generator)(this, function (_a) {
144
+ switch (_a.label) {
145
+ case 0:
146
+ url = "https://www.alphafold.ebi.ac.uk/api/prediction/".concat(id.toUpperCase());
147
+ return [4 /*yield*/, plugin.runTask(plugin.fetch({ url: url, type: 'json' }))];
148
+ case 1:
149
+ info = _a.sent();
150
+ if (Array.isArray(info) && info.length > 0)
151
+ return [2 /*return*/, info[0].cifUrl];
152
+ throw new Error("No AlphaFold DB entry for '".concat(id, "'"));
153
+ }
154
+ });
155
+ }); }, function (id) { return "AlphaFold DB: ".concat(id); }, false)];
156
+ case 9:
157
+ downloadParams = _b.sent();
158
+ asTrajectory = !!src.params.options.asTrajectory;
159
+ format = 'mmcif';
160
+ return [3 /*break*/, 15];
161
+ case 10: return [4 /*yield*/, getDownloadParams(src.params.id, function (id) { return "https://www.modelarchive.org/doi/10.5452/".concat(id.toLowerCase(), ".cif"); }, function (id) { return "Model Archive: ".concat(id); }, false)];
162
+ case 11:
163
+ downloadParams = _b.sent();
164
+ asTrajectory = !!src.params.options.asTrajectory;
165
+ format = 'mmcif';
166
+ return [3 /*break*/, 15];
167
+ case 12: return [4 /*yield*/, getDownloadParams(src.params.id, function (id) { return "https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/CID/".concat(id.trim(), "/record/SDF/?record_type=3d"); }, function (id) { return "PubChem: ".concat(id); }, false)];
168
+ case 13:
169
+ downloadParams = _b.sent();
170
+ asTrajectory = !!src.params.options.asTrajectory;
171
+ format = 'mol';
172
+ return [3 /*break*/, 15];
173
+ case 14: throw new Error("".concat(src.name, " not supported."));
174
+ case 15:
175
+ representationPreset = params.source.params.options.representation || plugin.config.get(config_1.PluginConfig.Structure.DefaultRepresentationPreset) || representation_preset_1.PresetStructureRepresentations.auto.id;
124
176
  showUnitcell = representationPreset !== representation_preset_1.PresetStructureRepresentations.empty.id;
125
177
  structure = src.params.options.type.name === 'auto' ? void 0 : src.params.options.type;
126
178
  return [4 /*yield*/, state.transaction(function () { return (0, tslib_1.__awaiter)(void 0, void 0, void 0, function () {
127
- var blob, trajectory, _i, downloadParams_1, download, data, trajectory;
128
- return (0, tslib_1.__generator)(this, function (_a) {
129
- switch (_a.label) {
179
+ var blob, trajectory, _i, downloadParams_1, download, data, provider, trajectory;
180
+ var _a;
181
+ return (0, tslib_1.__generator)(this, function (_b) {
182
+ switch (_b.label) {
130
183
  case 0:
131
184
  if (!(downloadParams.length > 0 && asTrajectory)) return [3 /*break*/, 4];
132
185
  return [4 /*yield*/, plugin.builders.data.downloadBlob({
@@ -134,10 +187,10 @@ var DownloadStructure = mol_state_1.StateAction.build({
134
187
  maxConcurrency: 6
135
188
  }, { state: { isGhost: true } })];
136
189
  case 1:
137
- blob = _a.sent();
190
+ blob = _b.sent();
138
191
  return [4 /*yield*/, plugin.builders.structure.parseTrajectory(blob, { formats: downloadParams.map(function (_, i) { return ({ id: '' + i, format: 'cif' }); }) })];
139
192
  case 2:
140
- trajectory = _a.sent();
193
+ trajectory = _b.sent();
141
194
  return [4 /*yield*/, plugin.builders.structure.hierarchy.applyPreset(trajectory, 'default', {
142
195
  structure: structure,
143
196
  showUnitcell: showUnitcell,
@@ -145,20 +198,25 @@ var DownloadStructure = mol_state_1.StateAction.build({
145
198
  representationPresetParams: params.source.params.options.representationParams
146
199
  })];
147
200
  case 3:
148
- _a.sent();
201
+ _b.sent();
149
202
  return [3 /*break*/, 10];
150
203
  case 4:
151
204
  _i = 0, downloadParams_1 = downloadParams;
152
- _a.label = 5;
205
+ _b.label = 5;
153
206
  case 5:
154
207
  if (!(_i < downloadParams_1.length)) return [3 /*break*/, 10];
155
208
  download = downloadParams_1[_i];
156
209
  return [4 /*yield*/, plugin.builders.data.download(download, { state: { isGhost: true } })];
157
210
  case 6:
158
- data = _a.sent();
159
- return [4 /*yield*/, plugin.builders.structure.parseTrajectory(data, format)];
211
+ data = _b.sent();
212
+ provider = format === 'auto'
213
+ ? plugin.dataFormats.auto((0, file_info_1.getFileInfo)(assets_1.Asset.getUrl(download.url)), (_a = data.cell) === null || _a === void 0 ? void 0 : _a.obj)
214
+ : plugin.dataFormats.get(format);
215
+ if (!provider)
216
+ throw new Error('unknown file format');
217
+ return [4 /*yield*/, plugin.builders.structure.parseTrajectory(data, provider)];
160
218
  case 7:
161
- trajectory = _a.sent();
219
+ trajectory = _b.sent();
162
220
  return [4 /*yield*/, plugin.builders.structure.hierarchy.applyPreset(trajectory, 'default', {
163
221
  structure: structure,
164
222
  showUnitcell: showUnitcell,
@@ -166,8 +224,8 @@ var DownloadStructure = mol_state_1.StateAction.build({
166
224
  representationPresetParams: params.source.params.options.representationParams
167
225
  })];
168
226
  case 8:
169
- _a.sent();
170
- _a.label = 9;
227
+ _b.sent();
228
+ _b.label = 9;
171
229
  case 9:
172
230
  _i++;
173
231
  return [3 /*break*/, 5];
@@ -175,8 +233,8 @@ var DownloadStructure = mol_state_1.StateAction.build({
175
233
  }
176
234
  });
177
235
  }); }).runInContext(ctx)];
178
- case 1:
179
- _a.sent();
236
+ case 16:
237
+ _b.sent();
180
238
  return [2 /*return*/];
181
239
  }
182
240
  });
@@ -184,18 +242,38 @@ var DownloadStructure = mol_state_1.StateAction.build({
184
242
  });
185
243
  exports.DownloadStructure = DownloadStructure;
186
244
  function getDownloadParams(src, url, label, isBinary) {
187
- var ids = src.split(/[,\s]/).map(function (id) { return id.trim(); }).filter(function (id) { return !!id && (id.length >= 4 || /^[1-9][0-9]*$/.test(id)); });
188
- var ret = [];
189
- for (var _i = 0, ids_1 = ids; _i < ids_1.length; _i++) {
190
- var id = ids_1[_i];
191
- ret.push({ url: assets_1.Asset.Url(url(id)), isBinary: isBinary, label: label(id) });
192
- }
193
- return ret;
245
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
246
+ var ids, ret, _i, ids_1, id, _a, _b, _c, _d;
247
+ var _e;
248
+ return (0, tslib_1.__generator)(this, function (_f) {
249
+ switch (_f.label) {
250
+ case 0:
251
+ ids = src.split(/[,\s]/).map(function (id) { return id.trim(); }).filter(function (id) { return !!id && (id.length >= 4 || /^[1-9][0-9]*$/.test(id)); });
252
+ ret = [];
253
+ _i = 0, ids_1 = ids;
254
+ _f.label = 1;
255
+ case 1:
256
+ if (!(_i < ids_1.length)) return [3 /*break*/, 4];
257
+ id = ids_1[_i];
258
+ _b = (_a = ret).push;
259
+ _e = {};
260
+ _d = (_c = assets_1.Asset).Url;
261
+ return [4 /*yield*/, url(id)];
262
+ case 2:
263
+ _b.apply(_a, [(_e.url = _d.apply(_c, [_f.sent()]), _e.isBinary = isBinary, _e.label = label(id), _e)]);
264
+ _f.label = 3;
265
+ case 3:
266
+ _i++;
267
+ return [3 /*break*/, 1];
268
+ case 4: return [2 /*return*/, ret];
269
+ }
270
+ });
271
+ });
194
272
  }
195
273
  exports.UpdateTrajectory = mol_state_1.StateAction.build({
196
274
  display: { name: 'Update Trajectory' },
197
275
  params: {
198
- action: param_definition_1.ParamDefinition.Select('advance', [['advance', 'Advance'], ['reset', 'Reset']]),
276
+ action: param_definition_1.ParamDefinition.Select('advance', param_definition_1.ParamDefinition.arrayToOptions(['advance', 'reset'])),
199
277
  by: param_definition_1.ParamDefinition.Optional(param_definition_1.ParamDefinition.Numeric(1, { min: -1, max: 1, step: 1 }))
200
278
  }
201
279
  })(function (_a) {