molstar 3.0.0-dev.3 → 3.0.0-dev.7

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 (552) hide show
  1. package/build/viewer/embedded.html +5 -5
  2. package/build/viewer/index.html +25 -17
  3. package/build/viewer/molstar.css +1 -1
  4. package/build/viewer/molstar.js +1 -1
  5. package/lib/apps/docking-viewer/index.d.ts +2 -1
  6. package/lib/apps/docking-viewer/index.html +8 -8
  7. package/lib/apps/docking-viewer/index.js +87 -74
  8. package/lib/apps/docking-viewer/viewport.js +2 -1
  9. package/lib/apps/viewer/embedded.html +5 -5
  10. package/lib/apps/viewer/index.d.ts +36 -215
  11. package/lib/apps/viewer/index.html +25 -17
  12. package/lib/apps/viewer/index.js +139 -52
  13. package/lib/cli/cifschema/index.d.ts +1 -1
  14. package/lib/cli/cifschema/index.js +15 -35
  15. package/lib/commonjs/apps/docking-viewer/index.d.ts +2 -1
  16. package/lib/commonjs/apps/docking-viewer/index.js +86 -73
  17. package/lib/commonjs/apps/docking-viewer/viewport.js +2 -1
  18. package/lib/commonjs/apps/viewer/index.d.ts +36 -215
  19. package/lib/commonjs/apps/viewer/index.js +139 -52
  20. package/lib/commonjs/cli/cifschema/index.d.ts +1 -1
  21. package/lib/commonjs/cli/cifschema/index.js +15 -35
  22. package/lib/commonjs/examples/alpha-orbitals/index.js +2 -3
  23. package/lib/commonjs/examples/basic-wrapper/index.js +23 -11
  24. package/lib/commonjs/examples/lighting/index.d.ts +1 -1
  25. package/lib/commonjs/examples/lighting/index.js +58 -41
  26. package/lib/commonjs/examples/proteopedia-wrapper/index.js +26 -14
  27. package/lib/commonjs/extensions/alpha-orbitals/transforms.d.ts +0 -1
  28. package/lib/commonjs/extensions/alpha-orbitals/transforms.js +1 -14
  29. package/lib/commonjs/extensions/anvil/behavior.d.ts +7 -0
  30. package/lib/commonjs/extensions/anvil/representation.d.ts +63 -0
  31. package/lib/commonjs/extensions/cellpack/representation.d.ts +13 -0
  32. package/lib/commonjs/extensions/dnatco/confal-pyramids/representation.d.ts +39 -0
  33. package/lib/commonjs/extensions/model-archive/quality-assessment/behavior.d.ts +68 -0
  34. package/lib/commonjs/extensions/model-archive/quality-assessment/behavior.js +236 -0
  35. package/lib/commonjs/extensions/model-archive/quality-assessment/color/plddt.d.ts +14 -0
  36. package/lib/commonjs/extensions/model-archive/quality-assessment/color/plddt.js +125 -0
  37. package/lib/commonjs/extensions/model-archive/quality-assessment/color/qmean.d.ts +12 -0
  38. package/lib/commonjs/extensions/model-archive/quality-assessment/color/qmean.js +111 -0
  39. package/lib/commonjs/extensions/model-archive/quality-assessment/prop.d.ts +28 -0
  40. package/lib/commonjs/extensions/model-archive/quality-assessment/prop.js +130 -0
  41. package/lib/commonjs/extensions/mp4-export/controls.d.ts +1 -0
  42. package/lib/commonjs/extensions/mp4-export/controls.js +9 -7
  43. package/lib/commonjs/extensions/pdbe/structure-quality-report/prop.js +1 -1
  44. package/lib/commonjs/extensions/rcsb/assembly-symmetry/behavior.d.ts +7 -0
  45. package/lib/commonjs/extensions/rcsb/assembly-symmetry/prop.js +1 -1
  46. package/lib/commonjs/extensions/rcsb/assembly-symmetry/representation.d.ts +13 -0
  47. package/lib/commonjs/extensions/rcsb/validation-report/prop.js +1 -1
  48. package/lib/commonjs/extensions/rcsb/validation-report/representation.d.ts +65 -0
  49. package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +8 -8
  50. package/lib/commonjs/mol-canvas3d/canvas3d.js +12 -4
  51. package/lib/commonjs/mol-canvas3d/helper/bounding-sphere-helper.js +3 -2
  52. package/lib/commonjs/mol-canvas3d/helper/camera-helper.d.ts +7 -0
  53. package/lib/commonjs/mol-canvas3d/helper/camera-helper.js +2 -2
  54. package/lib/commonjs/mol-canvas3d/helper/handle-helper.d.ts +7 -0
  55. package/lib/commonjs/mol-canvas3d/helper/handle-helper.js +2 -2
  56. package/lib/commonjs/mol-canvas3d/helper/helper.d.ts +6 -0
  57. package/lib/commonjs/mol-canvas3d/passes/image.d.ts +4 -0
  58. package/lib/commonjs/mol-canvas3d/passes/multi-sample.d.ts +2 -1
  59. package/lib/commonjs/mol-canvas3d/passes/multi-sample.js +4 -2
  60. package/lib/commonjs/mol-canvas3d/passes/pick.js +9 -9
  61. package/lib/commonjs/mol-canvas3d/passes/postprocessing.d.ts +1 -0
  62. package/lib/commonjs/mol-canvas3d/passes/postprocessing.js +6 -4
  63. package/lib/commonjs/mol-canvas3d/passes/smaa.js +1 -1
  64. package/lib/commonjs/mol-geo/geometry/base.d.ts +20 -0
  65. package/lib/commonjs/mol-geo/geometry/base.js +20 -1
  66. package/lib/commonjs/mol-geo/geometry/clipping-data.d.ts +1 -3
  67. package/lib/commonjs/mol-geo/geometry/clipping-data.js +3 -8
  68. package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +14 -1
  69. package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.js +5 -3
  70. package/lib/commonjs/mol-geo/geometry/direct-volume/direct-volume.d.ts +11 -0
  71. package/lib/commonjs/mol-geo/geometry/direct-volume/direct-volume.js +2 -2
  72. package/lib/commonjs/mol-geo/geometry/image/image.d.ts +11 -0
  73. package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +12 -0
  74. package/lib/commonjs/mol-geo/geometry/lines/lines.js +1 -1
  75. package/lib/commonjs/mol-geo/geometry/marker-data.d.ts +0 -1
  76. package/lib/commonjs/mol-geo/geometry/marker-data.js +0 -4
  77. package/lib/commonjs/mol-geo/geometry/mesh/color-smoothing.js +1 -1
  78. package/lib/commonjs/mol-geo/geometry/mesh/mesh.d.ts +13 -0
  79. package/lib/commonjs/mol-geo/geometry/mesh/mesh.js +5 -3
  80. package/lib/commonjs/mol-geo/geometry/points/points.d.ts +11 -0
  81. package/lib/commonjs/mol-geo/geometry/spheres/spheres.d.ts +13 -0
  82. package/lib/commonjs/mol-geo/geometry/spheres/spheres.js +5 -3
  83. package/lib/commonjs/mol-geo/geometry/substance-data.js +3 -3
  84. package/lib/commonjs/mol-geo/geometry/text/text.d.ts +11 -0
  85. package/lib/commonjs/mol-geo/geometry/texture-mesh/color-smoothing.js +3 -3
  86. package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +13 -0
  87. package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.js +5 -3
  88. package/lib/commonjs/mol-gl/render-object.d.ts +2 -1
  89. package/lib/commonjs/mol-gl/render-object.js +10 -10
  90. package/lib/commonjs/mol-gl/renderable/cylinders.d.ts +41 -33
  91. package/lib/commonjs/mol-gl/renderable/cylinders.js +4 -4
  92. package/lib/commonjs/mol-gl/renderable/direct-volume.d.ts +11 -5
  93. package/lib/commonjs/mol-gl/renderable/direct-volume.js +3 -3
  94. package/lib/commonjs/mol-gl/renderable/image.d.ts +10 -4
  95. package/lib/commonjs/mol-gl/renderable/image.js +2 -2
  96. package/lib/commonjs/mol-gl/renderable/lines.d.ts +38 -32
  97. package/lib/commonjs/mol-gl/renderable/lines.js +3 -3
  98. package/lib/commonjs/mol-gl/renderable/mesh.d.ts +38 -30
  99. package/lib/commonjs/mol-gl/renderable/mesh.js +4 -4
  100. package/lib/commonjs/mol-gl/renderable/points.d.ts +10 -4
  101. package/lib/commonjs/mol-gl/renderable/points.js +2 -2
  102. package/lib/commonjs/mol-gl/renderable/schema.d.ts +10 -11
  103. package/lib/commonjs/mol-gl/renderable/schema.js +6 -12
  104. package/lib/commonjs/mol-gl/renderable/spheres.d.ts +41 -33
  105. package/lib/commonjs/mol-gl/renderable/spheres.js +4 -4
  106. package/lib/commonjs/mol-gl/renderable/text.d.ts +10 -4
  107. package/lib/commonjs/mol-gl/renderable/text.js +2 -2
  108. package/lib/commonjs/mol-gl/renderable/texture-mesh.d.ts +13 -5
  109. package/lib/commonjs/mol-gl/renderable/texture-mesh.js +3 -3
  110. package/lib/commonjs/mol-gl/renderable.d.ts +0 -1
  111. package/lib/commonjs/mol-gl/renderer.d.ts +12 -12
  112. package/lib/commonjs/mol-gl/renderer.js +12 -74
  113. package/lib/commonjs/mol-gl/scene.d.ts +2 -2
  114. package/lib/commonjs/mol-gl/scene.js +7 -5
  115. package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +1 -1
  116. package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.js +1 -1
  117. package/lib/commonjs/mol-gl/shader/chunks/assign-color-varying.glsl.d.ts +1 -1
  118. package/lib/commonjs/mol-gl/shader/chunks/assign-color-varying.glsl.js +1 -1
  119. package/lib/commonjs/mol-gl/shader/chunks/assign-marker-varying.glsl.d.ts +1 -1
  120. package/lib/commonjs/mol-gl/shader/chunks/assign-marker-varying.glsl.js +1 -1
  121. package/lib/commonjs/mol-gl/shader/chunks/assign-material-color.glsl.d.ts +1 -1
  122. package/lib/commonjs/mol-gl/shader/chunks/assign-material-color.glsl.js +1 -1
  123. package/lib/commonjs/mol-gl/shader/chunks/color-frag-params.glsl.d.ts +1 -1
  124. package/lib/commonjs/mol-gl/shader/chunks/color-frag-params.glsl.js +1 -1
  125. package/lib/commonjs/mol-gl/shader/chunks/color-vert-params.glsl.d.ts +1 -1
  126. package/lib/commonjs/mol-gl/shader/chunks/color-vert-params.glsl.js +1 -1
  127. package/lib/commonjs/mol-gl/shader/chunks/common-frag-params.glsl.d.ts +1 -1
  128. package/lib/commonjs/mol-gl/shader/chunks/common-frag-params.glsl.js +1 -1
  129. package/lib/commonjs/mol-gl/shader/chunks/common-vert-params.glsl.d.ts +1 -1
  130. package/lib/commonjs/mol-gl/shader/chunks/common-vert-params.glsl.js +1 -1
  131. package/lib/commonjs/mol-gl/shader/chunks/common.glsl.d.ts +1 -1
  132. package/lib/commonjs/mol-gl/shader/chunks/common.glsl.js +1 -1
  133. package/lib/commonjs/mol-gl/shader/chunks/light-frag-params.glsl.d.ts +1 -1
  134. package/lib/commonjs/mol-gl/shader/chunks/light-frag-params.glsl.js +1 -1
  135. package/lib/commonjs/mol-gl/shader/cylinders.frag.d.ts +1 -1
  136. package/lib/commonjs/mol-gl/shader/cylinders.frag.js +1 -1
  137. package/lib/commonjs/mol-gl/shader/direct-volume.frag.d.ts +1 -1
  138. package/lib/commonjs/mol-gl/shader/direct-volume.frag.js +1 -1
  139. package/lib/commonjs/mol-gl/shader/image.frag.d.ts +1 -1
  140. package/lib/commonjs/mol-gl/shader/image.frag.js +1 -1
  141. package/lib/commonjs/mol-gl/shader/mesh.frag.d.ts +1 -1
  142. package/lib/commonjs/mol-gl/shader/mesh.frag.js +1 -1
  143. package/lib/commonjs/mol-gl/shader/mesh.vert.d.ts +1 -1
  144. package/lib/commonjs/mol-gl/shader/mesh.vert.js +1 -1
  145. package/lib/commonjs/mol-gl/shader/postprocessing.frag.d.ts +1 -1
  146. package/lib/commonjs/mol-gl/shader/postprocessing.frag.js +1 -1
  147. package/lib/commonjs/mol-gl/shader/spheres.frag.d.ts +1 -1
  148. package/lib/commonjs/mol-gl/shader/spheres.frag.js +1 -1
  149. package/lib/commonjs/mol-gl/shader-code.d.ts +3 -1
  150. package/lib/commonjs/mol-gl/shader-code.js +42 -13
  151. package/lib/commonjs/mol-gl/webgl/render-item.d.ts +7 -6
  152. package/lib/commonjs/mol-gl/webgl/render-item.js +10 -8
  153. package/lib/commonjs/mol-gl/webgl/resources.js +8 -1
  154. package/lib/commonjs/mol-io/reader/cif/schema/mmcif.d.ts +326 -1
  155. package/lib/commonjs/mol-io/reader/cif/schema/mmcif.js +326 -1
  156. package/lib/commonjs/mol-math/geometry/symmetry-operator.js +3 -2
  157. package/lib/commonjs/mol-math/linear-algebra/3d/quat.d.ts +9 -1
  158. package/lib/commonjs/mol-math/linear-algebra/3d/quat.js +20 -1
  159. package/lib/commonjs/mol-model/structure/model/model.d.ts +1 -0
  160. package/lib/commonjs/mol-model/structure/model/model.js +15 -5
  161. package/lib/commonjs/mol-model/structure/model/properties/atomic/hierarchy.d.ts +6 -1
  162. package/lib/commonjs/mol-model/structure/model/properties/atomic/hierarchy.js +1 -1
  163. package/lib/commonjs/mol-model/structure/model/properties/utils/atomic-derived.d.ts +1 -1
  164. package/lib/commonjs/mol-model/structure/model/properties/utils/atomic-derived.js +4 -1
  165. package/lib/commonjs/mol-model/structure/model/properties/utils/atomic-index.d.ts +1 -1
  166. package/lib/commonjs/mol-model/structure/model/properties/utils/atomic-index.js +12 -1
  167. package/lib/commonjs/mol-model/structure/model/types.js +9 -0
  168. package/lib/commonjs/mol-model/structure/structure/unit/rings.js +2 -0
  169. package/lib/commonjs/mol-model-formats/shape/ply.d.ts +26 -0
  170. package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +13 -0
  171. package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +13 -0
  172. package/lib/commonjs/mol-model-props/computed/representations/interactions.d.ts +39 -0
  173. package/lib/commonjs/mol-model-props/integrative/cross-link-restraint/representation.d.ts +52 -0
  174. package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +12 -0
  175. package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +3 -1
  176. package/lib/commonjs/mol-plugin/commands.d.ts +4 -4
  177. package/lib/commonjs/mol-plugin/config.d.ts +2 -0
  178. package/lib/commonjs/mol-plugin/config.js +10 -3
  179. package/lib/commonjs/mol-plugin/spec.js +1 -0
  180. package/lib/commonjs/mol-plugin/util/viewport-screenshot.d.ts +21 -0
  181. package/lib/commonjs/mol-plugin-state/actions/structure.d.ts +7 -1
  182. package/lib/commonjs/mol-plugin-state/actions/structure.js +150 -72
  183. package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +5 -355
  184. package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy-preset.js +13 -8
  185. package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy.d.ts +1 -71
  186. package/lib/commonjs/mol-plugin-state/helpers/structure-clipping.d.ts +1 -1
  187. package/lib/commonjs/mol-plugin-state/helpers/structure-clipping.js +1 -1
  188. package/lib/commonjs/mol-plugin-state/helpers/structure-selection-query.js +33 -19
  189. package/lib/commonjs/mol-plugin-state/manager/structure/component.d.ts +15 -1
  190. package/lib/commonjs/mol-plugin-state/manager/structure/component.js +13 -8
  191. package/lib/commonjs/mol-plugin-state/transforms/representation.d.ts +54 -0
  192. package/lib/commonjs/mol-plugin-ui/controls/parameters.d.ts +3 -2
  193. package/lib/commonjs/mol-plugin-ui/controls/parameters.js +11 -6
  194. package/lib/commonjs/mol-plugin-ui/hooks/use-behavior.d.ts +1 -1
  195. package/lib/commonjs/mol-plugin-ui/hooks/use-behavior.js +8 -17
  196. package/lib/commonjs/mol-plugin-ui/index.d.ts +4 -4
  197. package/lib/commonjs/mol-plugin-ui/index.js +13 -16
  198. package/lib/commonjs/mol-plugin-ui/plugin.d.ts +1 -1
  199. package/lib/commonjs/mol-plugin-ui/plugin.js +76 -10
  200. package/lib/commonjs/mol-plugin-ui/viewport/simple-settings.js +2 -6
  201. package/lib/commonjs/mol-repr/shape/loci/angle.d.ts +13 -0
  202. package/lib/commonjs/mol-repr/shape/loci/common.d.ts +11 -0
  203. package/lib/commonjs/mol-repr/shape/loci/dihedral.d.ts +13 -0
  204. package/lib/commonjs/mol-repr/shape/loci/distance.d.ts +11 -0
  205. package/lib/commonjs/mol-repr/shape/loci/label.d.ts +11 -0
  206. package/lib/commonjs/mol-repr/shape/loci/orientation.d.ts +13 -0
  207. package/lib/commonjs/mol-repr/shape/loci/plane.d.ts +13 -0
  208. package/lib/commonjs/mol-repr/shape/model/unitcell.d.ts +13 -0
  209. package/lib/commonjs/mol-repr/structure/complex-visual.d.ts +72 -0
  210. package/lib/commonjs/mol-repr/structure/params.d.ts +96 -0
  211. package/lib/commonjs/mol-repr/structure/registry.d.ts +175 -1
  212. package/lib/commonjs/mol-repr/structure/representation/backbone.d.ts +39 -0
  213. package/lib/commonjs/mol-repr/structure/representation/backbone.js +2 -1
  214. package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.d.ts +39 -0
  215. package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.js +2 -1
  216. package/lib/commonjs/mol-repr/structure/representation/carbohydrate.d.ts +39 -0
  217. package/lib/commonjs/mol-repr/structure/representation/carbohydrate.js +2 -1
  218. package/lib/commonjs/mol-repr/structure/representation/cartoon.d.ts +39 -0
  219. package/lib/commonjs/mol-repr/structure/representation/cartoon.js +2 -1
  220. package/lib/commonjs/mol-repr/structure/representation/ellipsoid.d.ts +39 -0
  221. package/lib/commonjs/mol-repr/structure/representation/ellipsoid.js +2 -1
  222. package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.d.ts +39 -0
  223. package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.js +2 -1
  224. package/lib/commonjs/mol-repr/structure/representation/gaussian-volume.d.ts +33 -0
  225. package/lib/commonjs/mol-repr/structure/representation/label.d.ts +36 -3
  226. package/lib/commonjs/mol-repr/structure/representation/line.d.ts +33 -0
  227. package/lib/commonjs/mol-repr/structure/representation/molecular-surface.d.ts +39 -0
  228. package/lib/commonjs/mol-repr/structure/representation/molecular-surface.js +2 -1
  229. package/lib/commonjs/mol-repr/structure/representation/orientation.d.ts +39 -0
  230. package/lib/commonjs/mol-repr/structure/representation/orientation.js +2 -1
  231. package/lib/commonjs/mol-repr/structure/representation/point.d.ts +33 -0
  232. package/lib/commonjs/mol-repr/structure/representation/putty.d.ts +39 -0
  233. package/lib/commonjs/mol-repr/structure/representation/putty.js +2 -1
  234. package/lib/commonjs/mol-repr/structure/representation/spacefill.d.ts +39 -0
  235. package/lib/commonjs/mol-repr/structure/representation/spacefill.js +2 -1
  236. package/lib/commonjs/mol-repr/structure/units-visual.d.ts +96 -0
  237. package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +26 -0
  238. package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-line.d.ts +11 -0
  239. package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +26 -0
  240. package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.js +2 -2
  241. package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-line.d.ts +11 -0
  242. package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-line.js +2 -2
  243. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +13 -0
  244. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +13 -0
  245. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +13 -0
  246. package/lib/commonjs/mol-repr/structure/visual/element-cross.d.ts +11 -0
  247. package/lib/commonjs/mol-repr/structure/visual/element-point.d.ts +11 -0
  248. package/lib/commonjs/mol-repr/structure/visual/element-sphere.d.ts +26 -0
  249. package/lib/commonjs/mol-repr/structure/visual/ellipsoid-mesh.d.ts +13 -0
  250. package/lib/commonjs/mol-repr/structure/visual/gaussian-density-volume.d.ts +22 -0
  251. package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +52 -0
  252. package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +11 -0
  253. package/lib/commonjs/mol-repr/structure/visual/label-text.d.ts +13 -2
  254. package/lib/commonjs/mol-repr/structure/visual/label-text.js +2 -2
  255. package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.d.ts +13 -0
  256. package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +11 -0
  257. package/lib/commonjs/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +13 -0
  258. package/lib/commonjs/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +13 -0
  259. package/lib/commonjs/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +13 -0
  260. package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +26 -0
  261. package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +26 -0
  262. package/lib/commonjs/mol-repr/structure/visual/polymer-direction-wedge.d.ts +13 -0
  263. package/lib/commonjs/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +13 -0
  264. package/lib/commonjs/mol-repr/structure/visual/polymer-trace-mesh.d.ts +13 -0
  265. package/lib/commonjs/mol-repr/structure/visual/polymer-trace-mesh.js +1 -1
  266. package/lib/commonjs/mol-repr/structure/visual/polymer-tube-mesh.d.ts +13 -0
  267. package/lib/commonjs/mol-repr/structure/visual/util/bond.js +1 -1
  268. package/lib/commonjs/mol-repr/visual.js +11 -7
  269. package/lib/commonjs/mol-repr/volume/direct-volume.d.ts +33 -0
  270. package/lib/commonjs/mol-repr/volume/isosurface.d.ts +76 -0
  271. package/lib/commonjs/mol-repr/volume/isosurface.js +2 -1
  272. package/lib/commonjs/mol-repr/volume/registry.d.ts +35 -0
  273. package/lib/commonjs/mol-repr/volume/representation.d.ts +11 -0
  274. package/lib/commonjs/mol-repr/volume/slice.d.ts +33 -0
  275. package/lib/commonjs/mol-theme/clipping.d.ts +7 -15
  276. package/lib/commonjs/mol-theme/clipping.js +5 -12
  277. package/lib/commonjs/mol-theme/color/illustrative.d.ts +2 -0
  278. package/lib/commonjs/mol-theme/color/illustrative.js +2 -2
  279. package/lib/commonjs/mol-theme/color.d.ts +1 -0
  280. package/lib/commonjs/mol-util/clip.d.ts +49 -0
  281. package/lib/commonjs/mol-util/clip.js +97 -0
  282. package/lib/commonjs/mol-util/material.d.ts +5 -1
  283. package/lib/commonjs/mol-util/material.js +9 -7
  284. package/lib/examples/alpha-orbitals/index.html +1 -0
  285. package/lib/examples/alpha-orbitals/index.js +3 -4
  286. package/lib/examples/basic-wrapper/index.html +3 -2
  287. package/lib/examples/basic-wrapper/index.js +24 -12
  288. package/lib/examples/lighting/index.d.ts +1 -1
  289. package/lib/examples/lighting/index.html +4 -2
  290. package/lib/examples/lighting/index.js +59 -42
  291. package/lib/examples/proteopedia-wrapper/index.html +4 -3
  292. package/lib/examples/proteopedia-wrapper/index.js +27 -15
  293. package/lib/extensions/alpha-orbitals/transforms.d.ts +0 -1
  294. package/lib/extensions/alpha-orbitals/transforms.js +1 -14
  295. package/lib/extensions/anvil/behavior.d.ts +7 -0
  296. package/lib/extensions/anvil/representation.d.ts +63 -0
  297. package/lib/extensions/cellpack/representation.d.ts +13 -0
  298. package/lib/extensions/dnatco/confal-pyramids/representation.d.ts +39 -0
  299. package/lib/extensions/model-archive/quality-assessment/behavior.d.ts +68 -0
  300. package/lib/extensions/model-archive/quality-assessment/behavior.js +233 -0
  301. package/lib/extensions/model-archive/quality-assessment/color/plddt.d.ts +14 -0
  302. package/lib/extensions/model-archive/quality-assessment/color/plddt.js +120 -0
  303. package/lib/extensions/model-archive/quality-assessment/color/qmean.d.ts +12 -0
  304. package/lib/extensions/model-archive/quality-assessment/color/qmean.js +106 -0
  305. package/lib/extensions/model-archive/quality-assessment/prop.d.ts +28 -0
  306. package/lib/extensions/model-archive/quality-assessment/prop.js +127 -0
  307. package/lib/extensions/mp4-export/controls.d.ts +1 -0
  308. package/lib/extensions/mp4-export/controls.js +9 -7
  309. package/lib/extensions/pdbe/structure-quality-report/prop.js +1 -1
  310. package/lib/extensions/rcsb/assembly-symmetry/behavior.d.ts +7 -0
  311. package/lib/extensions/rcsb/assembly-symmetry/prop.js +1 -1
  312. package/lib/extensions/rcsb/assembly-symmetry/representation.d.ts +13 -0
  313. package/lib/extensions/rcsb/validation-report/prop.js +1 -1
  314. package/lib/extensions/rcsb/validation-report/representation.d.ts +65 -0
  315. package/lib/mol-canvas3d/canvas3d.d.ts +8 -8
  316. package/lib/mol-canvas3d/canvas3d.js +12 -4
  317. package/lib/mol-canvas3d/helper/bounding-sphere-helper.js +3 -2
  318. package/lib/mol-canvas3d/helper/camera-helper.d.ts +7 -0
  319. package/lib/mol-canvas3d/helper/camera-helper.js +2 -2
  320. package/lib/mol-canvas3d/helper/handle-helper.d.ts +7 -0
  321. package/lib/mol-canvas3d/helper/handle-helper.js +2 -2
  322. package/lib/mol-canvas3d/helper/helper.d.ts +6 -0
  323. package/lib/mol-canvas3d/passes/image.d.ts +4 -0
  324. package/lib/mol-canvas3d/passes/multi-sample.d.ts +2 -1
  325. package/lib/mol-canvas3d/passes/multi-sample.js +4 -2
  326. package/lib/mol-canvas3d/passes/pick.js +9 -9
  327. package/lib/mol-canvas3d/passes/postprocessing.d.ts +1 -0
  328. package/lib/mol-canvas3d/passes/postprocessing.js +6 -4
  329. package/lib/mol-canvas3d/passes/smaa.js +1 -1
  330. package/lib/mol-geo/geometry/base.d.ts +20 -0
  331. package/lib/mol-geo/geometry/base.js +20 -1
  332. package/lib/mol-geo/geometry/clipping-data.d.ts +1 -3
  333. package/lib/mol-geo/geometry/clipping-data.js +3 -8
  334. package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +14 -1
  335. package/lib/mol-geo/geometry/cylinders/cylinders.js +5 -3
  336. package/lib/mol-geo/geometry/direct-volume/direct-volume.d.ts +11 -0
  337. package/lib/mol-geo/geometry/direct-volume/direct-volume.js +2 -2
  338. package/lib/mol-geo/geometry/image/image.d.ts +11 -0
  339. package/lib/mol-geo/geometry/lines/lines.d.ts +12 -0
  340. package/lib/mol-geo/geometry/lines/lines.js +1 -1
  341. package/lib/mol-geo/geometry/marker-data.d.ts +0 -1
  342. package/lib/mol-geo/geometry/marker-data.js +0 -4
  343. package/lib/mol-geo/geometry/mesh/color-smoothing.js +1 -1
  344. package/lib/mol-geo/geometry/mesh/mesh.d.ts +13 -0
  345. package/lib/mol-geo/geometry/mesh/mesh.js +5 -3
  346. package/lib/mol-geo/geometry/points/points.d.ts +11 -0
  347. package/lib/mol-geo/geometry/spheres/spheres.d.ts +13 -0
  348. package/lib/mol-geo/geometry/spheres/spheres.js +5 -3
  349. package/lib/mol-geo/geometry/substance-data.js +3 -3
  350. package/lib/mol-geo/geometry/text/text.d.ts +11 -0
  351. package/lib/mol-geo/geometry/texture-mesh/color-smoothing.js +3 -3
  352. package/lib/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +13 -0
  353. package/lib/mol-geo/geometry/texture-mesh/texture-mesh.js +5 -3
  354. package/lib/mol-gl/render-object.d.ts +2 -1
  355. package/lib/mol-gl/render-object.js +10 -10
  356. package/lib/mol-gl/renderable/cylinders.d.ts +41 -33
  357. package/lib/mol-gl/renderable/cylinders.js +5 -5
  358. package/lib/mol-gl/renderable/direct-volume.d.ts +11 -5
  359. package/lib/mol-gl/renderable/direct-volume.js +3 -3
  360. package/lib/mol-gl/renderable/image.d.ts +10 -4
  361. package/lib/mol-gl/renderable/image.js +2 -2
  362. package/lib/mol-gl/renderable/lines.d.ts +38 -32
  363. package/lib/mol-gl/renderable/lines.js +4 -4
  364. package/lib/mol-gl/renderable/mesh.d.ts +38 -30
  365. package/lib/mol-gl/renderable/mesh.js +5 -5
  366. package/lib/mol-gl/renderable/points.d.ts +10 -4
  367. package/lib/mol-gl/renderable/points.js +2 -2
  368. package/lib/mol-gl/renderable/schema.d.ts +10 -11
  369. package/lib/mol-gl/renderable/schema.js +6 -12
  370. package/lib/mol-gl/renderable/spheres.d.ts +41 -33
  371. package/lib/mol-gl/renderable/spheres.js +5 -5
  372. package/lib/mol-gl/renderable/text.d.ts +10 -4
  373. package/lib/mol-gl/renderable/text.js +2 -2
  374. package/lib/mol-gl/renderable/texture-mesh.d.ts +13 -5
  375. package/lib/mol-gl/renderable/texture-mesh.js +3 -3
  376. package/lib/mol-gl/renderable.d.ts +0 -1
  377. package/lib/mol-gl/renderer.d.ts +12 -12
  378. package/lib/mol-gl/renderer.js +13 -75
  379. package/lib/mol-gl/scene.d.ts +2 -2
  380. package/lib/mol-gl/scene.js +7 -5
  381. package/lib/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +1 -1
  382. package/lib/mol-gl/shader/chunks/apply-light-color.glsl.js +1 -1
  383. package/lib/mol-gl/shader/chunks/assign-color-varying.glsl.d.ts +1 -1
  384. package/lib/mol-gl/shader/chunks/assign-color-varying.glsl.js +1 -1
  385. package/lib/mol-gl/shader/chunks/assign-marker-varying.glsl.d.ts +1 -1
  386. package/lib/mol-gl/shader/chunks/assign-marker-varying.glsl.js +1 -1
  387. package/lib/mol-gl/shader/chunks/assign-material-color.glsl.d.ts +1 -1
  388. package/lib/mol-gl/shader/chunks/assign-material-color.glsl.js +1 -1
  389. package/lib/mol-gl/shader/chunks/color-frag-params.glsl.d.ts +1 -1
  390. package/lib/mol-gl/shader/chunks/color-frag-params.glsl.js +1 -1
  391. package/lib/mol-gl/shader/chunks/color-vert-params.glsl.d.ts +1 -1
  392. package/lib/mol-gl/shader/chunks/color-vert-params.glsl.js +1 -1
  393. package/lib/mol-gl/shader/chunks/common-frag-params.glsl.d.ts +1 -1
  394. package/lib/mol-gl/shader/chunks/common-frag-params.glsl.js +1 -1
  395. package/lib/mol-gl/shader/chunks/common-vert-params.glsl.d.ts +1 -1
  396. package/lib/mol-gl/shader/chunks/common-vert-params.glsl.js +1 -1
  397. package/lib/mol-gl/shader/chunks/common.glsl.d.ts +1 -1
  398. package/lib/mol-gl/shader/chunks/common.glsl.js +1 -1
  399. package/lib/mol-gl/shader/chunks/light-frag-params.glsl.d.ts +1 -1
  400. package/lib/mol-gl/shader/chunks/light-frag-params.glsl.js +1 -1
  401. package/lib/mol-gl/shader/cylinders.frag.d.ts +1 -1
  402. package/lib/mol-gl/shader/cylinders.frag.js +1 -1
  403. package/lib/mol-gl/shader/direct-volume.frag.d.ts +1 -1
  404. package/lib/mol-gl/shader/direct-volume.frag.js +1 -1
  405. package/lib/mol-gl/shader/image.frag.d.ts +1 -1
  406. package/lib/mol-gl/shader/image.frag.js +1 -1
  407. package/lib/mol-gl/shader/mesh.frag.d.ts +1 -1
  408. package/lib/mol-gl/shader/mesh.frag.js +1 -1
  409. package/lib/mol-gl/shader/mesh.vert.d.ts +1 -1
  410. package/lib/mol-gl/shader/mesh.vert.js +1 -1
  411. package/lib/mol-gl/shader/postprocessing.frag.d.ts +1 -1
  412. package/lib/mol-gl/shader/postprocessing.frag.js +1 -1
  413. package/lib/mol-gl/shader/spheres.frag.d.ts +1 -1
  414. package/lib/mol-gl/shader/spheres.frag.js +1 -1
  415. package/lib/mol-gl/shader-code.d.ts +3 -1
  416. package/lib/mol-gl/shader-code.js +42 -13
  417. package/lib/mol-gl/webgl/render-item.d.ts +7 -6
  418. package/lib/mol-gl/webgl/render-item.js +8 -6
  419. package/lib/mol-gl/webgl/resources.js +8 -1
  420. package/lib/mol-io/reader/cif/schema/mmcif.d.ts +326 -1
  421. package/lib/mol-io/reader/cif/schema/mmcif.js +326 -1
  422. package/lib/mol-math/geometry/symmetry-operator.js +3 -2
  423. package/lib/mol-math/linear-algebra/3d/quat.d.ts +9 -1
  424. package/lib/mol-math/linear-algebra/3d/quat.js +20 -1
  425. package/lib/mol-model/structure/model/model.d.ts +1 -0
  426. package/lib/mol-model/structure/model/model.js +15 -5
  427. package/lib/mol-model/structure/model/properties/atomic/hierarchy.d.ts +6 -1
  428. package/lib/mol-model/structure/model/properties/atomic/hierarchy.js +1 -1
  429. package/lib/mol-model/structure/model/properties/utils/atomic-derived.d.ts +1 -1
  430. package/lib/mol-model/structure/model/properties/utils/atomic-derived.js +5 -2
  431. package/lib/mol-model/structure/model/properties/utils/atomic-index.d.ts +1 -1
  432. package/lib/mol-model/structure/model/properties/utils/atomic-index.js +12 -1
  433. package/lib/mol-model/structure/model/types.js +9 -0
  434. package/lib/mol-model/structure/structure/unit/rings.js +2 -0
  435. package/lib/mol-model-formats/shape/ply.d.ts +26 -0
  436. package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +13 -0
  437. package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +13 -0
  438. package/lib/mol-model-props/computed/representations/interactions.d.ts +39 -0
  439. package/lib/mol-model-props/integrative/cross-link-restraint/representation.d.ts +52 -0
  440. package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +12 -0
  441. package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +3 -1
  442. package/lib/mol-plugin/commands.d.ts +4 -4
  443. package/lib/mol-plugin/config.d.ts +2 -0
  444. package/lib/mol-plugin/config.js +9 -3
  445. package/lib/mol-plugin/spec.js +1 -0
  446. package/lib/mol-plugin/util/viewport-screenshot.d.ts +21 -0
  447. package/lib/mol-plugin/version.js +2 -2
  448. package/lib/mol-plugin-state/actions/structure.d.ts +7 -1
  449. package/lib/mol-plugin-state/actions/structure.js +150 -72
  450. package/lib/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +5 -355
  451. package/lib/mol-plugin-state/builder/structure/hierarchy-preset.js +14 -9
  452. package/lib/mol-plugin-state/builder/structure/hierarchy.d.ts +1 -71
  453. package/lib/mol-plugin-state/helpers/structure-clipping.d.ts +1 -1
  454. package/lib/mol-plugin-state/helpers/structure-clipping.js +1 -1
  455. package/lib/mol-plugin-state/helpers/structure-selection-query.js +34 -20
  456. package/lib/mol-plugin-state/manager/structure/component.d.ts +15 -1
  457. package/lib/mol-plugin-state/manager/structure/component.js +14 -9
  458. package/lib/mol-plugin-state/transforms/representation.d.ts +54 -0
  459. package/lib/mol-plugin-ui/controls/parameters.d.ts +3 -2
  460. package/lib/mol-plugin-ui/controls/parameters.js +12 -7
  461. package/lib/mol-plugin-ui/hooks/use-behavior.d.ts +1 -1
  462. package/lib/mol-plugin-ui/hooks/use-behavior.js +9 -18
  463. package/lib/mol-plugin-ui/index.d.ts +4 -4
  464. package/lib/mol-plugin-ui/index.js +11 -13
  465. package/lib/mol-plugin-ui/plugin.d.ts +1 -1
  466. package/lib/mol-plugin-ui/plugin.js +76 -10
  467. package/lib/mol-plugin-ui/skin/base/components/misc.scss +27 -0
  468. package/lib/mol-plugin-ui/viewport/simple-settings.js +2 -6
  469. package/lib/mol-repr/shape/loci/angle.d.ts +13 -0
  470. package/lib/mol-repr/shape/loci/common.d.ts +11 -0
  471. package/lib/mol-repr/shape/loci/dihedral.d.ts +13 -0
  472. package/lib/mol-repr/shape/loci/distance.d.ts +11 -0
  473. package/lib/mol-repr/shape/loci/label.d.ts +11 -0
  474. package/lib/mol-repr/shape/loci/orientation.d.ts +13 -0
  475. package/lib/mol-repr/shape/loci/plane.d.ts +13 -0
  476. package/lib/mol-repr/shape/model/unitcell.d.ts +13 -0
  477. package/lib/mol-repr/structure/complex-visual.d.ts +72 -0
  478. package/lib/mol-repr/structure/params.d.ts +96 -0
  479. package/lib/mol-repr/structure/registry.d.ts +175 -1
  480. package/lib/mol-repr/structure/representation/backbone.d.ts +39 -0
  481. package/lib/mol-repr/structure/representation/backbone.js +2 -1
  482. package/lib/mol-repr/structure/representation/ball-and-stick.d.ts +39 -0
  483. package/lib/mol-repr/structure/representation/ball-and-stick.js +2 -1
  484. package/lib/mol-repr/structure/representation/carbohydrate.d.ts +39 -0
  485. package/lib/mol-repr/structure/representation/carbohydrate.js +2 -1
  486. package/lib/mol-repr/structure/representation/cartoon.d.ts +39 -0
  487. package/lib/mol-repr/structure/representation/cartoon.js +2 -1
  488. package/lib/mol-repr/structure/representation/ellipsoid.d.ts +39 -0
  489. package/lib/mol-repr/structure/representation/ellipsoid.js +2 -1
  490. package/lib/mol-repr/structure/representation/gaussian-surface.d.ts +39 -0
  491. package/lib/mol-repr/structure/representation/gaussian-surface.js +2 -1
  492. package/lib/mol-repr/structure/representation/gaussian-volume.d.ts +33 -0
  493. package/lib/mol-repr/structure/representation/label.d.ts +36 -3
  494. package/lib/mol-repr/structure/representation/line.d.ts +33 -0
  495. package/lib/mol-repr/structure/representation/molecular-surface.d.ts +39 -0
  496. package/lib/mol-repr/structure/representation/molecular-surface.js +2 -1
  497. package/lib/mol-repr/structure/representation/orientation.d.ts +39 -0
  498. package/lib/mol-repr/structure/representation/orientation.js +2 -1
  499. package/lib/mol-repr/structure/representation/point.d.ts +33 -0
  500. package/lib/mol-repr/structure/representation/putty.d.ts +39 -0
  501. package/lib/mol-repr/structure/representation/putty.js +2 -1
  502. package/lib/mol-repr/structure/representation/spacefill.d.ts +39 -0
  503. package/lib/mol-repr/structure/representation/spacefill.js +2 -1
  504. package/lib/mol-repr/structure/units-visual.d.ts +96 -0
  505. package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +26 -0
  506. package/lib/mol-repr/structure/visual/bond-inter-unit-line.d.ts +11 -0
  507. package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +26 -0
  508. package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.js +2 -2
  509. package/lib/mol-repr/structure/visual/bond-intra-unit-line.d.ts +11 -0
  510. package/lib/mol-repr/structure/visual/bond-intra-unit-line.js +2 -2
  511. package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +13 -0
  512. package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +13 -0
  513. package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +13 -0
  514. package/lib/mol-repr/structure/visual/element-cross.d.ts +11 -0
  515. package/lib/mol-repr/structure/visual/element-point.d.ts +11 -0
  516. package/lib/mol-repr/structure/visual/element-sphere.d.ts +26 -0
  517. package/lib/mol-repr/structure/visual/ellipsoid-mesh.d.ts +13 -0
  518. package/lib/mol-repr/structure/visual/gaussian-density-volume.d.ts +22 -0
  519. package/lib/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +52 -0
  520. package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +11 -0
  521. package/lib/mol-repr/structure/visual/label-text.d.ts +13 -2
  522. package/lib/mol-repr/structure/visual/label-text.js +2 -2
  523. package/lib/mol-repr/structure/visual/molecular-surface-mesh.d.ts +13 -0
  524. package/lib/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +11 -0
  525. package/lib/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +13 -0
  526. package/lib/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +13 -0
  527. package/lib/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +13 -0
  528. package/lib/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +26 -0
  529. package/lib/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +26 -0
  530. package/lib/mol-repr/structure/visual/polymer-direction-wedge.d.ts +13 -0
  531. package/lib/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +13 -0
  532. package/lib/mol-repr/structure/visual/polymer-trace-mesh.d.ts +13 -0
  533. package/lib/mol-repr/structure/visual/polymer-trace-mesh.js +1 -1
  534. package/lib/mol-repr/structure/visual/polymer-tube-mesh.d.ts +13 -0
  535. package/lib/mol-repr/structure/visual/util/bond.js +1 -1
  536. package/lib/mol-repr/visual.js +11 -7
  537. package/lib/mol-repr/volume/direct-volume.d.ts +33 -0
  538. package/lib/mol-repr/volume/isosurface.d.ts +76 -0
  539. package/lib/mol-repr/volume/isosurface.js +2 -1
  540. package/lib/mol-repr/volume/registry.d.ts +35 -0
  541. package/lib/mol-repr/volume/representation.d.ts +11 -0
  542. package/lib/mol-repr/volume/slice.d.ts +33 -0
  543. package/lib/mol-theme/clipping.d.ts +7 -15
  544. package/lib/mol-theme/clipping.js +5 -12
  545. package/lib/mol-theme/color/illustrative.d.ts +2 -0
  546. package/lib/mol-theme/color/illustrative.js +2 -2
  547. package/lib/mol-theme/color.d.ts +1 -0
  548. package/lib/mol-util/clip.d.ts +49 -0
  549. package/lib/mol-util/clip.js +93 -0
  550. package/lib/mol-util/material.d.ts +5 -1
  551. package/lib/mol-util/material.js +9 -7
  552. package/package.json +5 -3
@@ -10,19 +10,24 @@ import { CellPack } from '../../extensions/cellpack';
10
10
  import { DnatcoConfalPyramids } from '../../extensions/dnatco';
11
11
  import { G3DFormat, G3dProvider } from '../../extensions/g3d/format';
12
12
  import { GeometryExport } from '../../extensions/geo-export';
13
+ import { MAQualityAssessment } from '../../extensions/model-archive/quality-assessment/behavior';
14
+ import { QualityAssessmentPLDDTPreset, QualityAssessmentQmeanPreset } from '../../extensions/model-archive/quality-assessment/behavior';
15
+ import { QualityAssessment } from '../../extensions/model-archive/quality-assessment/prop';
13
16
  import { Mp4Export } from '../../extensions/mp4-export';
14
17
  import { PDBeStructureQualityReport } from '../../extensions/pdbe';
15
18
  import { RCSBAssemblySymmetry, RCSBValidationReport } from '../../extensions/rcsb';
16
19
  import { DownloadStructure, PdbDownloadProvider } from '../../mol-plugin-state/actions/structure';
17
20
  import { DownloadDensity } from '../../mol-plugin-state/actions/volume';
21
+ import { PresetStructureRepresentations, StructureRepresentationPresetProvider } from '../../mol-plugin-state/builder/structure/representation-preset';
18
22
  import { createVolumeRepresentationParams } from '../../mol-plugin-state/helpers/volume-representation-params';
19
23
  import { StateTransforms } from '../../mol-plugin-state/transforms';
20
24
  import { TrajectoryFromModelAndCoordinates } from '../../mol-plugin-state/transforms/model';
21
- import { createPlugin } from '../../mol-plugin-ui';
25
+ import { createPluginUI } from '../../mol-plugin-ui';
22
26
  import { DefaultPluginUISpec } from '../../mol-plugin-ui/spec';
23
27
  import { PluginCommands } from '../../mol-plugin/commands';
24
28
  import { PluginConfig } from '../../mol-plugin/config';
25
29
  import { PluginSpec } from '../../mol-plugin/spec';
30
+ import { StateObjectRef } from '../../mol-state';
26
31
  import { Asset } from '../../mol-util/assets';
27
32
  import '../../mol-util/polyfill';
28
33
  import { ObjectKeys } from '../../mol-util/type-helpers';
@@ -44,7 +49,8 @@ var Extensions = {
44
49
  'anvil-membrane-orientation': PluginSpec.Behavior(ANVILMembraneOrientation),
45
50
  'g3d': PluginSpec.Behavior(G3DFormat),
46
51
  'mp4-export': PluginSpec.Behavior(Mp4Export),
47
- 'geo-export': PluginSpec.Behavior(GeometryExport)
52
+ 'geo-export': PluginSpec.Behavior(GeometryExport),
53
+ 'ma-quality-assessment': PluginSpec.Behavior(MAQualityAssessment),
48
54
  };
49
55
  var DefaultViewerOptions = {
50
56
  customFormats: CustomFormats,
@@ -75,57 +81,78 @@ var DefaultViewerOptions = {
75
81
  emdbProvider: PluginConfig.Download.DefaultEmdbProvider.defaultValue,
76
82
  };
77
83
  var Viewer = /** @class */ (function () {
78
- function Viewer(elementOrId, options) {
79
- if (options === void 0) { options = {}; }
80
- var _a;
81
- var o = __assign(__assign({}, DefaultViewerOptions), options);
82
- var defaultSpec = DefaultPluginUISpec();
83
- var spec = {
84
- actions: defaultSpec.actions,
85
- behaviors: __spreadArray(__spreadArray([], defaultSpec.behaviors, true), o.extensions.map(function (e) { return Extensions[e]; }), true),
86
- animations: __spreadArray([], defaultSpec.animations || [], true),
87
- customParamEditors: defaultSpec.customParamEditors,
88
- customFormats: o === null || o === void 0 ? void 0 : o.customFormats,
89
- layout: {
90
- initial: {
91
- isExpanded: o.layoutIsExpanded,
92
- showControls: o.layoutShowControls,
93
- controlsDisplay: o.layoutControlsDisplay,
94
- regionState: {
95
- bottom: 'full',
96
- left: o.collapseLeftPanel ? 'collapsed' : 'full',
97
- right: o.collapseRightPanel ? 'hidden' : 'full',
98
- top: 'full',
99
- }
100
- },
101
- },
102
- components: __assign(__assign({}, defaultSpec.components), { controls: __assign(__assign({}, (_a = defaultSpec.components) === null || _a === void 0 ? void 0 : _a.controls), { top: o.layoutShowSequence ? undefined : 'none', bottom: o.layoutShowLog ? undefined : 'none', left: o.layoutShowLeftPanel ? undefined : 'none' }), remoteState: o.layoutShowRemoteState ? 'default' : 'none' }),
103
- config: [
104
- [PluginConfig.General.DisableAntialiasing, o.disableAntialiasing],
105
- [PluginConfig.General.PixelScale, o.pixelScale],
106
- [PluginConfig.General.PickScale, o.pickScale],
107
- [PluginConfig.General.PickPadding, o.pickPadding],
108
- [PluginConfig.General.EnableWboit, o.enableWboit],
109
- [PluginConfig.Viewport.ShowExpand, o.viewportShowExpand],
110
- [PluginConfig.Viewport.ShowControls, o.viewportShowControls],
111
- [PluginConfig.Viewport.ShowSettings, o.viewportShowSettings],
112
- [PluginConfig.Viewport.ShowSelectionMode, o.viewportShowSelectionMode],
113
- [PluginConfig.Viewport.ShowAnimation, o.viewportShowAnimation],
114
- [PluginConfig.State.DefaultServer, o.pluginStateServer],
115
- [PluginConfig.State.CurrentServer, o.pluginStateServer],
116
- [PluginConfig.VolumeStreaming.DefaultServer, o.volumeStreamingServer],
117
- [PluginConfig.VolumeStreaming.Enabled, !o.volumeStreamingDisabled],
118
- [PluginConfig.Download.DefaultPdbProvider, o.pdbProvider],
119
- [PluginConfig.Download.DefaultEmdbProvider, o.emdbProvider]
120
- ]
121
- };
122
- var element = typeof elementOrId === 'string'
123
- ? document.getElementById(elementOrId)
124
- : elementOrId;
125
- if (!element)
126
- throw new Error("Could not get element with id '".concat(elementOrId, "'"));
127
- this.plugin = createPlugin(element, spec);
84
+ function Viewer(plugin) {
85
+ this.plugin = plugin;
128
86
  }
87
+ Viewer.create = function (elementOrId, options) {
88
+ var _a;
89
+ if (options === void 0) { options = {}; }
90
+ return __awaiter(this, void 0, void 0, function () {
91
+ var o, defaultSpec, spec, element, plugin;
92
+ return __generator(this, function (_b) {
93
+ switch (_b.label) {
94
+ case 0:
95
+ o = __assign(__assign({}, DefaultViewerOptions), options);
96
+ defaultSpec = DefaultPluginUISpec();
97
+ spec = {
98
+ actions: defaultSpec.actions,
99
+ behaviors: __spreadArray(__spreadArray([], defaultSpec.behaviors, true), o.extensions.map(function (e) { return Extensions[e]; }), true),
100
+ animations: __spreadArray([], defaultSpec.animations || [], true),
101
+ customParamEditors: defaultSpec.customParamEditors,
102
+ customFormats: o === null || o === void 0 ? void 0 : o.customFormats,
103
+ layout: {
104
+ initial: {
105
+ isExpanded: o.layoutIsExpanded,
106
+ showControls: o.layoutShowControls,
107
+ controlsDisplay: o.layoutControlsDisplay,
108
+ regionState: {
109
+ bottom: 'full',
110
+ left: o.collapseLeftPanel ? 'collapsed' : 'full',
111
+ right: o.collapseRightPanel ? 'hidden' : 'full',
112
+ top: 'full',
113
+ }
114
+ },
115
+ },
116
+ components: __assign(__assign({}, defaultSpec.components), { controls: __assign(__assign({}, (_a = defaultSpec.components) === null || _a === void 0 ? void 0 : _a.controls), { top: o.layoutShowSequence ? undefined : 'none', bottom: o.layoutShowLog ? undefined : 'none', left: o.layoutShowLeftPanel ? undefined : 'none' }), remoteState: o.layoutShowRemoteState ? 'default' : 'none' }),
117
+ config: [
118
+ [PluginConfig.General.DisableAntialiasing, o.disableAntialiasing],
119
+ [PluginConfig.General.PixelScale, o.pixelScale],
120
+ [PluginConfig.General.PickScale, o.pickScale],
121
+ [PluginConfig.General.PickPadding, o.pickPadding],
122
+ [PluginConfig.General.EnableWboit, o.enableWboit],
123
+ [PluginConfig.Viewport.ShowExpand, o.viewportShowExpand],
124
+ [PluginConfig.Viewport.ShowControls, o.viewportShowControls],
125
+ [PluginConfig.Viewport.ShowSettings, o.viewportShowSettings],
126
+ [PluginConfig.Viewport.ShowSelectionMode, o.viewportShowSelectionMode],
127
+ [PluginConfig.Viewport.ShowAnimation, o.viewportShowAnimation],
128
+ [PluginConfig.State.DefaultServer, o.pluginStateServer],
129
+ [PluginConfig.State.CurrentServer, o.pluginStateServer],
130
+ [PluginConfig.VolumeStreaming.DefaultServer, o.volumeStreamingServer],
131
+ [PluginConfig.VolumeStreaming.Enabled, !o.volumeStreamingDisabled],
132
+ [PluginConfig.Download.DefaultPdbProvider, o.pdbProvider],
133
+ [PluginConfig.Download.DefaultEmdbProvider, o.emdbProvider],
134
+ [PluginConfig.Structure.DefaultRepresentationPreset, ViewerAutoPreset.id],
135
+ ]
136
+ };
137
+ element = typeof elementOrId === 'string'
138
+ ? document.getElementById(elementOrId)
139
+ : elementOrId;
140
+ if (!element)
141
+ throw new Error("Could not get element with id '".concat(elementOrId, "'"));
142
+ return [4 /*yield*/, createPluginUI(element, spec, {
143
+ onBeforeUIRender: function (plugin) {
144
+ // the preset needs to be added before the UI renders otherwise
145
+ // "Download Structure" wont be able to pick it up
146
+ plugin.builders.structure.representation.registerPreset(ViewerAutoPreset);
147
+ }
148
+ })];
149
+ case 1:
150
+ plugin = _b.sent();
151
+ return [2 /*return*/, new Viewer(plugin)];
152
+ }
153
+ });
154
+ });
155
+ };
129
156
  Viewer.prototype.setRemoteSnapshot = function (id) {
130
157
  var url = "".concat(this.plugin.config.get(PluginConfig.State.CurrentServer), "/get/").concat(id);
131
158
  return PluginCommands.State.Snapshots.Fetch(this.plugin, { url: url });
@@ -241,6 +268,30 @@ var Viewer = /** @class */ (function () {
241
268
  }
242
269
  }));
243
270
  };
271
+ Viewer.prototype.loadAlphaFoldDb = function (afdb) {
272
+ var params = DownloadStructure.createDefaultParams(this.plugin.state.data.root.obj, this.plugin);
273
+ return this.plugin.runTask(this.plugin.state.data.applyAction(DownloadStructure, {
274
+ source: {
275
+ name: 'alphafolddb',
276
+ params: {
277
+ id: afdb,
278
+ options: __assign(__assign({}, params.source.params.options), { representation: 'preset-structure-representation-ma-quality-assessment-plddt' }),
279
+ }
280
+ }
281
+ }));
282
+ };
283
+ Viewer.prototype.loadModelArchive = function (id) {
284
+ var params = DownloadStructure.createDefaultParams(this.plugin.state.data.root.obj, this.plugin);
285
+ return this.plugin.runTask(this.plugin.state.data.applyAction(DownloadStructure, {
286
+ source: {
287
+ name: 'modelarchive',
288
+ params: {
289
+ id: id,
290
+ options: params.source.params.options,
291
+ }
292
+ }
293
+ }));
294
+ };
244
295
  /**
245
296
  * @example Load X-ray density from volume server
246
297
  viewer.loadVolumeFromUrl({
@@ -427,4 +478,40 @@ var Viewer = /** @class */ (function () {
427
478
  return Viewer;
428
479
  }());
429
480
  export { Viewer };
481
+ export var ViewerAutoPreset = StructureRepresentationPresetProvider({
482
+ id: 'preset-structure-representation-viewer-auto',
483
+ display: {
484
+ name: 'Automatic (w/ Annotation)', group: 'Annotation',
485
+ description: 'Show standard automatic representation but colored by quality assessment (if available in the model).'
486
+ },
487
+ isApplicable: function (a) {
488
+ return (!!a.data.models.some(function (m) { return QualityAssessment.isApplicable(m, 'pLDDT'); }) ||
489
+ !!a.data.models.some(function (m) { return QualityAssessment.isApplicable(m, 'qmean'); }));
490
+ },
491
+ params: function () { return StructureRepresentationPresetProvider.CommonParams; },
492
+ apply: function (ref, params, plugin) {
493
+ var _a;
494
+ return __awaiter(this, void 0, void 0, function () {
495
+ var structureCell, structure;
496
+ return __generator(this, function (_b) {
497
+ switch (_b.label) {
498
+ case 0:
499
+ structureCell = StateObjectRef.resolveAndCheck(plugin.state.data, ref);
500
+ structure = (_a = structureCell === null || structureCell === void 0 ? void 0 : structureCell.obj) === null || _a === void 0 ? void 0 : _a.data;
501
+ if (!structureCell || !structure)
502
+ return [2 /*return*/, {}];
503
+ if (!!!structure.models.some(function (m) { return QualityAssessment.isApplicable(m, 'pLDDT'); })) return [3 /*break*/, 2];
504
+ return [4 /*yield*/, QualityAssessmentPLDDTPreset.apply(ref, params, plugin)];
505
+ case 1: return [2 /*return*/, _b.sent()];
506
+ case 2:
507
+ if (!!!structure.models.some(function (m) { return QualityAssessment.isApplicable(m, 'qmean'); })) return [3 /*break*/, 4];
508
+ return [4 /*yield*/, QualityAssessmentQmeanPreset.apply(ref, params, plugin)];
509
+ case 3: return [2 /*return*/, _b.sent()];
510
+ case 4: return [4 /*yield*/, PresetStructureRepresentations.auto.apply(ref, params, plugin)];
511
+ case 5: return [2 /*return*/, _b.sent()];
512
+ }
513
+ });
514
+ });
515
+ }
516
+ });
430
517
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * Copyright (c) 2017-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ * Copyright (c) 2017-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
4
  *
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
6
6
  */
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * Copyright (c) 2017-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ * Copyright (c) 2017-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
4
  *
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
6
6
  */
@@ -23,7 +23,7 @@ function getDicNamespace(block) {
23
23
  function runGenerateSchemaMmcif(name, fieldNamesPath, typescript, out, moldbImportPath, addAliases) {
24
24
  if (typescript === void 0) { typescript = false; }
25
25
  return __awaiter(this, void 0, void 0, function () {
26
- var mmcifDic, ihmDic, carbBranchDic, carbCompDic, mmcifDicVersion, ihmDicVersion, carbDicVersion, version, frames, schema;
26
+ var mmcifDic, ihmDic, maDic, mmcifDicVersion, ihmDicVersion, maDicVersion, version, frames, schema;
27
27
  return __generator(this, function (_a) {
28
28
  switch (_a.label) {
29
29
  case 0: return [4 /*yield*/, ensureMmcifDicAvailable()];
@@ -42,30 +42,22 @@ function runGenerateSchemaMmcif(name, fieldNamesPath, typescript, out, moldbImpo
42
42
  ihmDic = _a.sent();
43
43
  if (ihmDic.isError)
44
44
  throw ihmDic;
45
- return [4 /*yield*/, ensureCarbBranchDicAvailable()];
45
+ return [4 /*yield*/, ensureMaDicAvailable()];
46
46
  case 5:
47
47
  _a.sent();
48
- return [4 /*yield*/, parseCifText(fs.readFileSync(CARB_BRANCH_DIC_PATH, 'utf8')).run()];
48
+ return [4 /*yield*/, parseCifText(fs.readFileSync(MA_DIC_PATH, 'utf8')).run()];
49
49
  case 6:
50
- carbBranchDic = _a.sent();
51
- if (carbBranchDic.isError)
52
- throw carbBranchDic;
53
- return [4 /*yield*/, ensureCarbCompDicAvailable()];
54
- case 7:
55
- _a.sent();
56
- return [4 /*yield*/, parseCifText(fs.readFileSync(CARB_COMP_DIC_PATH, 'utf8')).run()];
57
- case 8:
58
- carbCompDic = _a.sent();
59
- if (carbCompDic.isError)
60
- throw carbCompDic;
50
+ maDic = _a.sent();
51
+ if (maDic.isError)
52
+ throw maDic;
61
53
  mmcifDicVersion = getDicVersion(mmcifDic.result.blocks[0]);
62
54
  ihmDicVersion = getDicVersion(ihmDic.result.blocks[0]);
63
- carbDicVersion = 'draft';
64
- version = "Dictionary versions: mmCIF ".concat(mmcifDicVersion, ", IHM ").concat(ihmDicVersion, ", CARB ").concat(carbDicVersion, ".");
65
- frames = __spreadArray(__spreadArray(__spreadArray(__spreadArray([], mmcifDic.result.blocks[0].saveFrames, true), ihmDic.result.blocks[0].saveFrames, true), carbBranchDic.result.blocks[0].saveFrames, true), carbCompDic.result.blocks[0].saveFrames, true);
55
+ maDicVersion = getDicVersion(maDic.result.blocks[0]);
56
+ version = "Dictionary versions: mmCIF ".concat(mmcifDicVersion, ", IHM ").concat(ihmDicVersion, ", MA ").concat(maDicVersion, ".");
57
+ frames = __spreadArray(__spreadArray(__spreadArray([], mmcifDic.result.blocks[0].saveFrames, true), ihmDic.result.blocks[0].saveFrames, true), maDic.result.blocks[0].saveFrames, true);
66
58
  schema = generateSchema(frames);
67
59
  return [4 /*yield*/, runGenerateSchema(name, version, schema, fieldNamesPath, typescript, out, moldbImportPath, addAliases)];
68
- case 9:
60
+ case 7:
69
61
  _a.sent();
70
62
  return [2 /*return*/];
71
63
  }
@@ -249,20 +241,10 @@ function ensureIhmDicAvailable() {
249
241
  }
250
242
  }); });
251
243
  }
252
- function ensureCarbBranchDicAvailable() {
253
- return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) {
254
- switch (_a.label) {
255
- case 0: return [4 /*yield*/, ensureDicAvailable(CARB_BRANCH_DIC_PATH, CARB_BRANCH_DIC_URL)];
256
- case 1:
257
- _a.sent();
258
- return [2 /*return*/];
259
- }
260
- }); });
261
- }
262
- function ensureCarbCompDicAvailable() {
244
+ function ensureMaDicAvailable() {
263
245
  return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) {
264
246
  switch (_a.label) {
265
- case 0: return [4 /*yield*/, ensureDicAvailable(CARB_COMP_DIC_PATH, CARB_COMP_DIC_URL)];
247
+ case 0: return [4 /*yield*/, ensureDicAvailable(MA_DIC_PATH, MA_DIC_URL)];
266
248
  case 1:
267
249
  _a.sent();
268
250
  return [2 /*return*/];
@@ -319,10 +301,8 @@ var MMCIF_DIC_PATH = "".concat(DIC_DIR, "/mmcif_pdbx_v50.dic");
319
301
  var MMCIF_DIC_URL = 'http://mmcif.wwpdb.org/dictionaries/ascii/mmcif_pdbx_v50.dic';
320
302
  var IHM_DIC_PATH = "".concat(DIC_DIR, "/ihm-extension.dic");
321
303
  var IHM_DIC_URL = 'https://raw.githubusercontent.com/ihmwg/IHM-dictionary/master/ihm-extension.dic';
322
- var CARB_BRANCH_DIC_PATH = "".concat(DIC_DIR, "/entity_branch-extension.dic");
323
- var CARB_BRANCH_DIC_URL = 'https://raw.githubusercontent.com/pdbxmmcifwg/carbohydrate-extension/master/dict/entity_branch-extension.dic';
324
- var CARB_COMP_DIC_PATH = "".concat(DIC_DIR, "/chem_comp-extension.dic");
325
- var CARB_COMP_DIC_URL = 'https://raw.githubusercontent.com/pdbxmmcifwg/carbohydrate-extension/master/dict/chem_comp-extension.dic';
304
+ var MA_DIC_PATH = "".concat(DIC_DIR, "/ma-extension.dic");
305
+ var MA_DIC_URL = 'https://raw.githubusercontent.com/ihmwg/MA-dictionary/master/mmcif_ma.dic';
326
306
  var CIF_CORE_DIC_PATH = "".concat(DIC_DIR, "/cif_core.dic");
327
307
  var CIF_CORE_DIC_URL = 'https://raw.githubusercontent.com/COMCIFS/cif_core/master/cif_core.dic';
328
308
  var CIF_CORE_ENUM_PATH = "".concat(DIC_DIR, "/templ_enum.cif");
@@ -14,7 +14,8 @@ export { setDebugMode, setProductionMode } from '../../mol-util/debug';
14
14
  export { Viewer as DockingViewer };
15
15
  declare class Viewer {
16
16
  plugin: PluginUIContext;
17
- constructor(elementOrId: string | HTMLElement, colors?: Color[], showButtons?: boolean);
17
+ constructor(plugin: PluginUIContext);
18
+ static create(elementOrId: string | HTMLElement, colors?: Color[], showButtons?: boolean): Promise<Viewer>;
18
19
  loadStructuresFromUrlsAndMerge(sources: {
19
20
  url: string;
20
21
  format: BuiltInTrajectoryFormat;
@@ -51,82 +51,95 @@ var DefaultViewerOptions = {
51
51
  emdbProvider: config_1.PluginConfig.Download.DefaultEmdbProvider.defaultValue,
52
52
  };
53
53
  var Viewer = /** @class */ (function () {
54
- function Viewer(elementOrId, colors, showButtons) {
55
- var _this = this;
54
+ function Viewer(plugin) {
55
+ this.plugin = plugin;
56
+ }
57
+ Viewer.create = function (elementOrId, colors, showButtons) {
58
+ var _a;
56
59
  if (colors === void 0) { colors = [(0, color_1.Color)(0x992211), (0, color_1.Color)(0xDDDDDD)]; }
57
60
  if (showButtons === void 0) { showButtons = true; }
58
- var _a;
59
- var o = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, DefaultViewerOptions), {
60
- layoutIsExpanded: false,
61
- layoutShowControls: false,
62
- layoutShowRemoteState: false,
63
- layoutShowSequence: true,
64
- layoutShowLog: false,
65
- layoutShowLeftPanel: true,
66
- viewportShowExpand: true,
67
- viewportShowControls: false,
68
- viewportShowSettings: false,
69
- viewportShowSelectionMode: false,
70
- viewportShowAnimation: false,
71
- });
72
- var defaultSpec = (0, spec_1.DefaultPluginUISpec)();
73
- var spec = {
74
- actions: defaultSpec.actions,
75
- behaviors: [
76
- spec_2.PluginSpec.Behavior(behavior_1.PluginBehaviors.Representation.HighlightLoci, { mark: false }),
77
- spec_2.PluginSpec.Behavior(behavior_1.PluginBehaviors.Representation.DefaultLociLabelProvider),
78
- spec_2.PluginSpec.Behavior(behavior_1.PluginBehaviors.Camera.FocusLoci),
79
- spec_2.PluginSpec.Behavior(behavior_1.PluginBehaviors.CustomProps.StructureInfo),
80
- spec_2.PluginSpec.Behavior(behavior_1.PluginBehaviors.CustomProps.Interactions),
81
- spec_2.PluginSpec.Behavior(behavior_1.PluginBehaviors.CustomProps.SecondaryStructure),
82
- ],
83
- animations: defaultSpec.animations,
84
- customParamEditors: defaultSpec.customParamEditors,
85
- layout: {
86
- initial: {
87
- isExpanded: o.layoutIsExpanded,
88
- showControls: o.layoutShowControls,
89
- controlsDisplay: o.layoutControlsDisplay,
90
- },
91
- },
92
- components: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, defaultSpec.components), { controls: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, (_a = defaultSpec.components) === null || _a === void 0 ? void 0 : _a.controls), { top: o.layoutShowSequence ? undefined : 'none', bottom: o.layoutShowLog ? undefined : 'none', left: o.layoutShowLeftPanel ? undefined : 'none' }), remoteState: o.layoutShowRemoteState ? 'default' : 'none', viewport: {
93
- view: viewport_1.ViewportComponent
94
- } }),
95
- config: [
96
- [config_1.PluginConfig.Viewport.ShowExpand, o.viewportShowExpand],
97
- [config_1.PluginConfig.Viewport.ShowControls, o.viewportShowControls],
98
- [config_1.PluginConfig.Viewport.ShowSettings, o.viewportShowSettings],
99
- [config_1.PluginConfig.Viewport.ShowSelectionMode, o.viewportShowSelectionMode],
100
- [config_1.PluginConfig.Viewport.ShowAnimation, o.viewportShowAnimation],
101
- [config_1.PluginConfig.State.DefaultServer, o.pluginStateServer],
102
- [config_1.PluginConfig.State.CurrentServer, o.pluginStateServer],
103
- [config_1.PluginConfig.VolumeStreaming.DefaultServer, o.volumeStreamingServer],
104
- [config_1.PluginConfig.Download.DefaultPdbProvider, o.pdbProvider],
105
- [config_1.PluginConfig.Download.DefaultEmdbProvider, o.emdbProvider],
106
- [viewport_1.ShowButtons, showButtons]
107
- ]
108
- };
109
- var element = typeof elementOrId === 'string'
110
- ? document.getElementById(elementOrId)
111
- : elementOrId;
112
- if (!element)
113
- throw new Error("Could not get element with id '".concat(elementOrId, "'"));
114
- this.plugin = (0, mol_plugin_ui_1.createPlugin)(element, spec);
115
- this.plugin.customState = {
116
- colorPalette: {
117
- name: 'colors',
118
- params: { list: { colors: colors } }
119
- }
120
- };
121
- this.plugin.behaviors.canvas3d.initialized.subscribe(function (v) {
122
- if (v) {
123
- commands_1.PluginCommands.Canvas3D.SetSettings(_this.plugin, { settings: {
124
- renderer: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, _this.plugin.canvas3d.props.renderer), { backgroundColor: names_1.ColorNames.white }),
125
- camera: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, _this.plugin.canvas3d.props.camera), { helper: { axes: { name: 'off', params: {} } } })
126
- } });
127
- }
61
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
62
+ var o, defaultSpec, spec, element, plugin;
63
+ return (0, tslib_1.__generator)(this, function (_b) {
64
+ switch (_b.label) {
65
+ case 0:
66
+ o = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, DefaultViewerOptions), {
67
+ layoutIsExpanded: false,
68
+ layoutShowControls: false,
69
+ layoutShowRemoteState: false,
70
+ layoutShowSequence: true,
71
+ layoutShowLog: false,
72
+ layoutShowLeftPanel: true,
73
+ viewportShowExpand: true,
74
+ viewportShowControls: false,
75
+ viewportShowSettings: false,
76
+ viewportShowSelectionMode: false,
77
+ viewportShowAnimation: false,
78
+ });
79
+ defaultSpec = (0, spec_1.DefaultPluginUISpec)();
80
+ spec = {
81
+ actions: defaultSpec.actions,
82
+ behaviors: [
83
+ spec_2.PluginSpec.Behavior(behavior_1.PluginBehaviors.Representation.HighlightLoci, { mark: false }),
84
+ spec_2.PluginSpec.Behavior(behavior_1.PluginBehaviors.Representation.DefaultLociLabelProvider),
85
+ spec_2.PluginSpec.Behavior(behavior_1.PluginBehaviors.Camera.FocusLoci),
86
+ spec_2.PluginSpec.Behavior(behavior_1.PluginBehaviors.CustomProps.StructureInfo),
87
+ spec_2.PluginSpec.Behavior(behavior_1.PluginBehaviors.CustomProps.Interactions),
88
+ spec_2.PluginSpec.Behavior(behavior_1.PluginBehaviors.CustomProps.SecondaryStructure),
89
+ ],
90
+ animations: defaultSpec.animations,
91
+ customParamEditors: defaultSpec.customParamEditors,
92
+ layout: {
93
+ initial: {
94
+ isExpanded: o.layoutIsExpanded,
95
+ showControls: o.layoutShowControls,
96
+ controlsDisplay: o.layoutControlsDisplay,
97
+ },
98
+ },
99
+ components: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, defaultSpec.components), { controls: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, (_a = defaultSpec.components) === null || _a === void 0 ? void 0 : _a.controls), { top: o.layoutShowSequence ? undefined : 'none', bottom: o.layoutShowLog ? undefined : 'none', left: o.layoutShowLeftPanel ? undefined : 'none' }), remoteState: o.layoutShowRemoteState ? 'default' : 'none', viewport: {
100
+ view: viewport_1.ViewportComponent
101
+ } }),
102
+ config: [
103
+ [config_1.PluginConfig.Viewport.ShowExpand, o.viewportShowExpand],
104
+ [config_1.PluginConfig.Viewport.ShowControls, o.viewportShowControls],
105
+ [config_1.PluginConfig.Viewport.ShowSettings, o.viewportShowSettings],
106
+ [config_1.PluginConfig.Viewport.ShowSelectionMode, o.viewportShowSelectionMode],
107
+ [config_1.PluginConfig.Viewport.ShowAnimation, o.viewportShowAnimation],
108
+ [config_1.PluginConfig.State.DefaultServer, o.pluginStateServer],
109
+ [config_1.PluginConfig.State.CurrentServer, o.pluginStateServer],
110
+ [config_1.PluginConfig.VolumeStreaming.DefaultServer, o.volumeStreamingServer],
111
+ [config_1.PluginConfig.Download.DefaultPdbProvider, o.pdbProvider],
112
+ [config_1.PluginConfig.Download.DefaultEmdbProvider, o.emdbProvider],
113
+ [viewport_1.ShowButtons, showButtons]
114
+ ]
115
+ };
116
+ element = typeof elementOrId === 'string'
117
+ ? document.getElementById(elementOrId)
118
+ : elementOrId;
119
+ if (!element)
120
+ throw new Error("Could not get element with id '".concat(elementOrId, "'"));
121
+ return [4 /*yield*/, (0, mol_plugin_ui_1.createPluginUI)(element, spec)];
122
+ case 1:
123
+ plugin = _b.sent();
124
+ plugin.customState = {
125
+ colorPalette: {
126
+ name: 'colors',
127
+ params: { list: { colors: colors } }
128
+ }
129
+ };
130
+ plugin.behaviors.canvas3d.initialized.subscribe(function (v) {
131
+ if (v) {
132
+ commands_1.PluginCommands.Canvas3D.SetSettings(plugin, { settings: {
133
+ renderer: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, plugin.canvas3d.props.renderer), { backgroundColor: names_1.ColorNames.white }),
134
+ camera: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, plugin.canvas3d.props.camera), { helper: { axes: { name: 'off', params: {} } } })
135
+ } });
136
+ }
137
+ });
138
+ return [2 /*return*/, new Viewer(plugin)];
139
+ }
140
+ });
128
141
  });
129
- }
142
+ };
130
143
  Viewer.prototype.loadStructuresFromUrlsAndMerge = function (sources) {
131
144
  return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
132
145
  var structures, _i, sources_1, _a, url, format, isBinary, data_1, trajectory, model, modelProperties, structure_2, structureProperties_1, dependsOn, data, structure, structureProperties;
@@ -40,7 +40,8 @@ function occlusionStyle(plugin) {
40
40
  blurKernelSize: 13
41
41
  } }, outline: { name: 'on', params: {
42
42
  scale: 1.0,
43
- threshold: 0.33
43
+ threshold: 0.33,
44
+ color: (0, color_1.Color)(0x0000),
44
45
  } } })
45
46
  } });
46
47
  }