molstar 3.0.0-dev.9 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (338) hide show
  1. package/README.md +7 -0
  2. package/build/viewer/index.html +2 -2
  3. package/build/viewer/molstar.js +1 -1
  4. package/lib/apps/docking-viewer/viewport.d.ts +2 -0
  5. package/lib/apps/viewer/app.d.ts +2 -1
  6. package/lib/apps/viewer/app.js +21 -8
  7. package/lib/apps/viewer/index.html +2 -2
  8. package/lib/commonjs/apps/docking-viewer/viewport.d.ts +2 -0
  9. package/lib/commonjs/apps/viewer/app.d.ts +2 -1
  10. package/lib/commonjs/apps/viewer/app.js +23 -10
  11. package/lib/commonjs/examples/basic-wrapper/index.js +7 -3
  12. package/lib/commonjs/examples/proteopedia-wrapper/index.js +7 -1
  13. package/lib/commonjs/extensions/anvil/behavior.d.ts +1 -0
  14. package/lib/commonjs/extensions/anvil/representation.js +1 -1
  15. package/lib/commonjs/extensions/dnatco/confal-pyramids/behavior.d.ts +1 -0
  16. package/lib/commonjs/extensions/model-archive/quality-assessment/behavior.d.ts +2 -0
  17. package/lib/commonjs/extensions/model-export/export.d.ts +9 -0
  18. package/lib/commonjs/extensions/model-export/export.js +129 -0
  19. package/lib/commonjs/extensions/model-export/index.d.ts +7 -0
  20. package/lib/commonjs/extensions/model-export/index.js +36 -0
  21. package/lib/commonjs/extensions/model-export/ui.d.ts +11 -0
  22. package/lib/commonjs/extensions/model-export/ui.js +77 -0
  23. package/lib/commonjs/extensions/mp4-export/encoder.js +1 -1
  24. package/lib/commonjs/extensions/rcsb/assembly-symmetry/behavior.d.ts +4 -2
  25. package/lib/commonjs/extensions/rcsb/graphql/types.d.ts +13 -13
  26. package/lib/commonjs/extensions/rcsb/validation-report/behavior.d.ts +3 -0
  27. package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +12 -4
  28. package/lib/commonjs/mol-canvas3d/canvas3d.js +1 -1
  29. package/lib/commonjs/mol-canvas3d/controls/trackball.d.ts +9 -4
  30. package/lib/commonjs/mol-canvas3d/controls/trackball.js +50 -11
  31. package/lib/commonjs/mol-canvas3d/helper/interaction-events.js +1 -1
  32. package/lib/commonjs/mol-canvas3d/passes/draw.d.ts +1 -1
  33. package/lib/commonjs/mol-canvas3d/passes/draw.js +3 -3
  34. package/lib/commonjs/mol-gl/renderer.d.ts +2 -2
  35. package/lib/commonjs/mol-gl/renderer.js +3 -3
  36. package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +2 -2
  37. package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.js +2 -2
  38. package/lib/commonjs/mol-gl/shader/cylinders.frag.d.ts +2 -2
  39. package/lib/commonjs/mol-gl/shader/cylinders.frag.js +2 -2
  40. package/lib/commonjs/mol-gl/shader/direct-volume.frag.d.ts +2 -2
  41. package/lib/commonjs/mol-gl/shader/direct-volume.frag.js +2 -2
  42. package/lib/commonjs/mol-gl/shader/mesh.frag.d.ts +2 -2
  43. package/lib/commonjs/mol-gl/shader/mesh.frag.js +2 -2
  44. package/lib/commonjs/mol-gl/shader/spheres.frag.d.ts +2 -2
  45. package/lib/commonjs/mol-gl/shader/spheres.frag.js +2 -2
  46. package/lib/commonjs/mol-io/reader/cif/schema/bird.d.ts +1 -1
  47. package/lib/commonjs/mol-io/reader/cif/schema/bird.js +1 -1
  48. package/lib/commonjs/mol-io/reader/cif/schema/ccd.d.ts +1 -1
  49. package/lib/commonjs/mol-io/reader/cif/schema/ccd.js +1 -1
  50. package/lib/commonjs/mol-io/reader/cif/schema/mmcif.d.ts +2 -2
  51. package/lib/commonjs/mol-io/reader/cif/schema/mmcif.js +1 -1
  52. package/lib/commonjs/mol-io/reader/mol/parser.d.ts +23 -1
  53. package/lib/commonjs/mol-io/reader/mol/parser.js +116 -4
  54. package/lib/commonjs/mol-io/reader/sdf/parser-v3-util.d.ts +6 -0
  55. package/lib/commonjs/mol-io/reader/sdf/parser-v3-util.js +9 -0
  56. package/lib/commonjs/mol-io/reader/sdf/parser.d.ts +3 -1
  57. package/lib/commonjs/mol-io/reader/sdf/parser.js +11 -2
  58. package/lib/commonjs/mol-io/writer/cif/encoder/binary.js +9 -2
  59. package/lib/commonjs/mol-math/geometry/primitives/sphere3d.d.ts +1 -1
  60. package/lib/commonjs/mol-math/geometry/primitives/sphere3d.js +17 -4
  61. package/lib/commonjs/mol-math/geometry/symmetry-operator.d.ts +1 -1
  62. package/lib/commonjs/mol-math/geometry/symmetry-operator.js +10 -4
  63. package/lib/commonjs/mol-model/structure/export/categories/secondary-structure.js +8 -8
  64. package/lib/commonjs/mol-model/structure/export/mmcif.d.ts +1 -1
  65. package/lib/commonjs/mol-model/structure/export/mmcif.js +8 -5
  66. package/lib/commonjs/mol-model/structure/model/properties/coarse/hierarchy.d.ts +1 -1
  67. package/lib/commonjs/mol-model/structure/model/properties/coarse/hierarchy.js +24 -2
  68. package/lib/commonjs/mol-model/structure/model/properties/common.d.ts +1 -1
  69. package/lib/commonjs/mol-model/structure/structure/element/loci.d.ts +1 -1
  70. package/lib/commonjs/mol-model/structure/structure/element/loci.js +4 -2
  71. package/lib/commonjs/mol-model/structure/structure/properties.d.ts +1 -0
  72. package/lib/commonjs/mol-model/structure/structure/properties.js +2 -1
  73. package/lib/commonjs/mol-model/structure/structure/symmetry.js +1 -3
  74. package/lib/commonjs/mol-model/structure/structure/util/superposition-db-mapping.js +10 -5
  75. package/lib/commonjs/mol-model/volume/volume.d.ts +7 -0
  76. package/lib/commonjs/mol-model/volume/volume.js +18 -0
  77. package/lib/commonjs/mol-model-formats/structure/basic/atomic.d.ts +2 -2
  78. package/lib/commonjs/mol-model-formats/structure/basic/atomic.js +6 -6
  79. package/lib/commonjs/mol-model-formats/structure/basic/coarse.d.ts +1 -1
  80. package/lib/commonjs/mol-model-formats/structure/basic/coarse.js +3 -3
  81. package/lib/commonjs/mol-model-formats/structure/basic/entities.d.ts +2 -1
  82. package/lib/commonjs/mol-model-formats/structure/basic/entities.js +28 -24
  83. package/lib/commonjs/mol-model-formats/structure/basic/parser.js +17 -8
  84. package/lib/commonjs/mol-model-formats/structure/basic/properties.d.ts +6 -1
  85. package/lib/commonjs/mol-model-formats/structure/basic/properties.js +12 -22
  86. package/lib/commonjs/mol-model-formats/structure/mol.d.ts +2 -1
  87. package/lib/commonjs/mol-model-formats/structure/mol.js +19 -5
  88. package/lib/commonjs/mol-model-props/common/custom-property.d.ts +1 -1
  89. package/lib/commonjs/mol-model-props/computed/interactions/common.d.ts +1 -1
  90. package/lib/commonjs/mol-model-props/computed/interactions/common.js +16 -24
  91. package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +1 -1
  92. package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.js +44 -18
  93. package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +1 -1
  94. package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.js +38 -13
  95. package/lib/commonjs/mol-model-props/sequence/best-database-mapping.js +15 -15
  96. package/lib/commonjs/mol-plugin/animation-loop.d.ts +2 -0
  97. package/lib/commonjs/mol-plugin/animation-loop.js +1 -1
  98. package/lib/commonjs/mol-plugin/behavior/dynamic/representation.d.ts +1 -1
  99. package/lib/commonjs/mol-plugin/behavior/dynamic/representation.js +11 -6
  100. package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +2 -1
  101. package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +16 -7
  102. package/lib/commonjs/mol-plugin/behavior/static/representation.js +1 -1
  103. package/lib/commonjs/mol-plugin/commands.d.ts +6 -2
  104. package/lib/commonjs/mol-plugin/spec.d.ts +1 -1
  105. package/lib/commonjs/mol-plugin/spec.js +3 -1
  106. package/lib/commonjs/mol-plugin-state/actions/file.d.ts +3 -2
  107. package/lib/commonjs/mol-plugin-state/actions/file.js +67 -31
  108. package/lib/commonjs/mol-plugin-state/actions/volume.d.ts +1 -1
  109. package/lib/commonjs/mol-plugin-state/actions/volume.js +3 -3
  110. package/lib/commonjs/mol-plugin-state/animation/built-in/camera-rock.d.ts +16 -0
  111. package/lib/commonjs/mol-plugin-state/animation/built-in/camera-rock.js +62 -0
  112. package/lib/commonjs/mol-plugin-state/animation/built-in/camera-spin.d.ts +1 -1
  113. package/lib/commonjs/mol-plugin-state/animation/built-in/camera-spin.js +9 -8
  114. package/lib/commonjs/mol-plugin-state/animation/model.d.ts +4 -0
  115. package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +8 -6
  116. package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy.d.ts +2 -1
  117. package/lib/commonjs/mol-plugin-state/builder/structure/representation-preset.d.ts +180 -6
  118. package/lib/commonjs/mol-plugin-state/builder/structure/representation-preset.js +48 -2
  119. package/lib/commonjs/mol-plugin-state/builder/structure/representation.d.ts +2 -1
  120. package/lib/commonjs/mol-plugin-state/formats/volume.js +1 -11
  121. package/lib/commonjs/mol-plugin-state/manager/animation.d.ts +5 -1
  122. package/lib/commonjs/mol-plugin-state/manager/animation.js +5 -5
  123. package/lib/commonjs/mol-plugin-state/manager/structure/component.d.ts +2 -1
  124. package/lib/commonjs/mol-plugin-state/manager/structure/component.js +11 -8
  125. package/lib/commonjs/mol-plugin-ui/controls/icons.d.ts +2 -1
  126. package/lib/commonjs/mol-plugin-ui/controls/icons.js +8 -5
  127. package/lib/commonjs/mol-plugin-ui/controls.d.ts +1 -1
  128. package/lib/commonjs/mol-plugin-ui/controls.js +2 -1
  129. package/lib/commonjs/mol-plugin-ui/structure/quick-styles.d.ts +25 -0
  130. package/lib/commonjs/mol-plugin-ui/structure/quick-styles.js +131 -0
  131. package/lib/commonjs/mol-plugin-ui/structure/superposition.js +2 -2
  132. package/lib/commonjs/mol-plugin-ui/structure/volume.js +4 -4
  133. package/lib/commonjs/mol-plugin-ui/viewport/simple-settings.d.ts +1 -1
  134. package/lib/commonjs/mol-plugin-ui/viewport/simple-settings.js +4 -8
  135. package/lib/commonjs/mol-repr/shape/loci/common.d.ts +1 -1
  136. package/lib/commonjs/mol-repr/shape/loci/common.js +3 -3
  137. package/lib/commonjs/mol-repr/structure/registry.d.ts +1 -1
  138. package/lib/commonjs/mol-repr/structure/representation/cartoon.d.ts +4 -4
  139. package/lib/commonjs/mol-repr/structure/representation/cartoon.js +3 -3
  140. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +1 -1
  141. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.js +8 -4
  142. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +1 -1
  143. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.js +10 -6
  144. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +1 -1
  145. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.js +8 -4
  146. package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -1
  147. package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.js +2 -2
  148. package/lib/commonjs/mol-repr/structure/visual/util/bond.d.ts +1 -1
  149. package/lib/commonjs/mol-repr/structure/visual/util/bond.js +5 -4
  150. package/lib/commonjs/mol-repr/visual.d.ts +1 -1
  151. package/lib/commonjs/mol-repr/visual.js +2 -1
  152. package/lib/commonjs/mol-state/transform.js +12 -2
  153. package/lib/commonjs/mol-state/tree/immutable.d.ts +18 -0
  154. package/lib/commonjs/mol-state/tree/transient.d.ts +3 -4
  155. package/lib/commonjs/mol-theme/color/element-symbol.d.ts +289 -3
  156. package/lib/commonjs/mol-theme/color/element-symbol.js +25 -15
  157. package/lib/commonjs/mol-theme/color/entity-id.d.ts +1 -1
  158. package/lib/commonjs/mol-theme/color/entity-id.js +29 -5
  159. package/lib/commonjs/mol-theme/color/illustrative.d.ts +100 -29
  160. package/lib/commonjs/mol-theme/color/illustrative.js +26 -7
  161. package/lib/commonjs/mol-theme/color/molecule-type.d.ts +19 -1
  162. package/lib/commonjs/mol-theme/color/molecule-type.js +10 -5
  163. package/lib/commonjs/mol-theme/color/residue-name.d.ts +77 -1
  164. package/lib/commonjs/mol-theme/color/residue-name.js +10 -5
  165. package/lib/commonjs/mol-theme/color/secondary-structure.d.ts +27 -1
  166. package/lib/commonjs/mol-theme/color/secondary-structure.js +10 -5
  167. package/lib/commonjs/mol-theme/color.d.ts +253 -15
  168. package/lib/commonjs/mol-util/color/color.d.ts +1 -1
  169. package/lib/commonjs/mol-util/color/color.js +1 -1
  170. package/lib/commonjs/mol-util/color/params.d.ts +10 -0
  171. package/lib/commonjs/mol-util/color/params.js +19 -0
  172. package/lib/commonjs/servers/volume/config.js +3 -3
  173. package/lib/commonjs/servers/volume/query.js +1 -1
  174. package/lib/examples/basic-wrapper/index.js +7 -3
  175. package/lib/examples/proteopedia-wrapper/index.js +7 -1
  176. package/lib/extensions/anvil/behavior.d.ts +1 -0
  177. package/lib/extensions/anvil/representation.js +1 -1
  178. package/lib/extensions/dnatco/confal-pyramids/behavior.d.ts +1 -0
  179. package/lib/extensions/model-archive/quality-assessment/behavior.d.ts +2 -0
  180. package/lib/extensions/model-export/export.d.ts +9 -0
  181. package/lib/extensions/model-export/export.js +125 -0
  182. package/lib/extensions/model-export/index.d.ts +7 -0
  183. package/lib/extensions/model-export/index.js +33 -0
  184. package/lib/extensions/model-export/ui.d.ts +11 -0
  185. package/lib/extensions/model-export/ui.js +74 -0
  186. package/lib/extensions/mp4-export/encoder.js +1 -1
  187. package/lib/extensions/rcsb/assembly-symmetry/behavior.d.ts +4 -2
  188. package/lib/extensions/rcsb/graphql/types.d.ts +13 -13
  189. package/lib/extensions/rcsb/validation-report/behavior.d.ts +3 -0
  190. package/lib/mol-canvas3d/canvas3d.d.ts +12 -4
  191. package/lib/mol-canvas3d/canvas3d.js +1 -1
  192. package/lib/mol-canvas3d/controls/trackball.d.ts +9 -4
  193. package/lib/mol-canvas3d/controls/trackball.js +51 -12
  194. package/lib/mol-canvas3d/helper/interaction-events.js +1 -1
  195. package/lib/mol-canvas3d/passes/draw.d.ts +1 -1
  196. package/lib/mol-canvas3d/passes/draw.js +3 -3
  197. package/lib/mol-gl/renderer.d.ts +2 -2
  198. package/lib/mol-gl/renderer.js +3 -3
  199. package/lib/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +2 -2
  200. package/lib/mol-gl/shader/chunks/apply-light-color.glsl.js +2 -2
  201. package/lib/mol-gl/shader/cylinders.frag.d.ts +2 -2
  202. package/lib/mol-gl/shader/cylinders.frag.js +2 -2
  203. package/lib/mol-gl/shader/direct-volume.frag.d.ts +2 -2
  204. package/lib/mol-gl/shader/direct-volume.frag.js +2 -2
  205. package/lib/mol-gl/shader/mesh.frag.d.ts +2 -2
  206. package/lib/mol-gl/shader/mesh.frag.js +2 -2
  207. package/lib/mol-gl/shader/spheres.frag.d.ts +2 -2
  208. package/lib/mol-gl/shader/spheres.frag.js +2 -2
  209. package/lib/mol-io/reader/cif/schema/bird.d.ts +1 -1
  210. package/lib/mol-io/reader/cif/schema/bird.js +1 -1
  211. package/lib/mol-io/reader/cif/schema/ccd.d.ts +1 -1
  212. package/lib/mol-io/reader/cif/schema/ccd.js +1 -1
  213. package/lib/mol-io/reader/cif/schema/mmcif.d.ts +2 -2
  214. package/lib/mol-io/reader/cif/schema/mmcif.js +1 -1
  215. package/lib/mol-io/reader/mol/parser.d.ts +23 -1
  216. package/lib/mol-io/reader/mol/parser.js +112 -3
  217. package/lib/mol-io/reader/sdf/parser-v3-util.d.ts +6 -0
  218. package/lib/mol-io/reader/sdf/parser-v3-util.js +9 -0
  219. package/lib/mol-io/reader/sdf/parser.d.ts +3 -1
  220. package/lib/mol-io/reader/sdf/parser.js +12 -3
  221. package/lib/mol-io/writer/cif/encoder/binary.js +9 -2
  222. package/lib/mol-math/geometry/primitives/sphere3d.d.ts +1 -1
  223. package/lib/mol-math/geometry/primitives/sphere3d.js +17 -4
  224. package/lib/mol-math/geometry/symmetry-operator.d.ts +1 -1
  225. package/lib/mol-math/geometry/symmetry-operator.js +10 -4
  226. package/lib/mol-model/structure/export/categories/secondary-structure.js +8 -8
  227. package/lib/mol-model/structure/export/mmcif.d.ts +1 -1
  228. package/lib/mol-model/structure/export/mmcif.js +8 -5
  229. package/lib/mol-model/structure/model/properties/coarse/hierarchy.d.ts +1 -1
  230. package/lib/mol-model/structure/model/properties/coarse/hierarchy.js +24 -2
  231. package/lib/mol-model/structure/model/properties/common.d.ts +1 -1
  232. package/lib/mol-model/structure/structure/element/loci.d.ts +1 -1
  233. package/lib/mol-model/structure/structure/element/loci.js +4 -2
  234. package/lib/mol-model/structure/structure/properties.d.ts +1 -0
  235. package/lib/mol-model/structure/structure/properties.js +2 -1
  236. package/lib/mol-model/structure/structure/symmetry.js +1 -3
  237. package/lib/mol-model/structure/structure/util/superposition-db-mapping.js +10 -5
  238. package/lib/mol-model/volume/volume.d.ts +7 -0
  239. package/lib/mol-model/volume/volume.js +18 -0
  240. package/lib/mol-model-formats/structure/basic/atomic.d.ts +2 -2
  241. package/lib/mol-model-formats/structure/basic/atomic.js +6 -6
  242. package/lib/mol-model-formats/structure/basic/coarse.d.ts +1 -1
  243. package/lib/mol-model-formats/structure/basic/coarse.js +3 -3
  244. package/lib/mol-model-formats/structure/basic/entities.d.ts +2 -1
  245. package/lib/mol-model-formats/structure/basic/entities.js +25 -22
  246. package/lib/mol-model-formats/structure/basic/parser.js +19 -10
  247. package/lib/mol-model-formats/structure/basic/properties.d.ts +6 -1
  248. package/lib/mol-model-formats/structure/basic/properties.js +12 -25
  249. package/lib/mol-model-formats/structure/mol.d.ts +2 -1
  250. package/lib/mol-model-formats/structure/mol.js +17 -3
  251. package/lib/mol-model-props/common/custom-property.d.ts +1 -1
  252. package/lib/mol-model-props/computed/interactions/common.d.ts +1 -1
  253. package/lib/mol-model-props/computed/interactions/common.js +16 -24
  254. package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +1 -1
  255. package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.js +44 -18
  256. package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +1 -1
  257. package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.js +38 -13
  258. package/lib/mol-model-props/sequence/best-database-mapping.js +15 -15
  259. package/lib/mol-plugin/animation-loop.d.ts +2 -0
  260. package/lib/mol-plugin/animation-loop.js +1 -1
  261. package/lib/mol-plugin/behavior/dynamic/representation.d.ts +1 -1
  262. package/lib/mol-plugin/behavior/dynamic/representation.js +11 -6
  263. package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +2 -1
  264. package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +16 -7
  265. package/lib/mol-plugin/behavior/static/representation.js +1 -1
  266. package/lib/mol-plugin/commands.d.ts +6 -2
  267. package/lib/mol-plugin/spec.d.ts +1 -1
  268. package/lib/mol-plugin/spec.js +3 -1
  269. package/lib/mol-plugin/version.js +2 -2
  270. package/lib/mol-plugin-state/actions/file.d.ts +3 -2
  271. package/lib/mol-plugin-state/actions/file.js +67 -31
  272. package/lib/mol-plugin-state/actions/volume.d.ts +1 -1
  273. package/lib/mol-plugin-state/actions/volume.js +3 -3
  274. package/lib/mol-plugin-state/animation/built-in/camera-rock.d.ts +16 -0
  275. package/lib/mol-plugin-state/animation/built-in/camera-rock.js +59 -0
  276. package/lib/mol-plugin-state/animation/built-in/camera-spin.d.ts +1 -1
  277. package/lib/mol-plugin-state/animation/built-in/camera-spin.js +9 -8
  278. package/lib/mol-plugin-state/animation/model.d.ts +4 -0
  279. package/lib/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +8 -6
  280. package/lib/mol-plugin-state/builder/structure/hierarchy.d.ts +2 -1
  281. package/lib/mol-plugin-state/builder/structure/representation-preset.d.ts +180 -6
  282. package/lib/mol-plugin-state/builder/structure/representation-preset.js +48 -2
  283. package/lib/mol-plugin-state/builder/structure/representation.d.ts +2 -1
  284. package/lib/mol-plugin-state/formats/volume.js +1 -11
  285. package/lib/mol-plugin-state/manager/animation.d.ts +5 -1
  286. package/lib/mol-plugin-state/manager/animation.js +5 -5
  287. package/lib/mol-plugin-state/manager/structure/component.d.ts +2 -1
  288. package/lib/mol-plugin-state/manager/structure/component.js +11 -8
  289. package/lib/mol-plugin-ui/controls/icons.d.ts +2 -1
  290. package/lib/mol-plugin-ui/controls/icons.js +5 -3
  291. package/lib/mol-plugin-ui/controls.d.ts +1 -1
  292. package/lib/mol-plugin-ui/controls.js +2 -1
  293. package/lib/mol-plugin-ui/structure/quick-styles.d.ts +25 -0
  294. package/lib/mol-plugin-ui/structure/quick-styles.js +128 -0
  295. package/lib/mol-plugin-ui/structure/superposition.js +2 -2
  296. package/lib/mol-plugin-ui/structure/volume.js +4 -4
  297. package/lib/mol-plugin-ui/viewport/simple-settings.d.ts +1 -1
  298. package/lib/mol-plugin-ui/viewport/simple-settings.js +4 -8
  299. package/lib/mol-repr/shape/loci/common.d.ts +1 -1
  300. package/lib/mol-repr/shape/loci/common.js +3 -3
  301. package/lib/mol-repr/structure/registry.d.ts +1 -1
  302. package/lib/mol-repr/structure/representation/cartoon.d.ts +4 -4
  303. package/lib/mol-repr/structure/representation/cartoon.js +3 -3
  304. package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +1 -1
  305. package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.js +8 -4
  306. package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +1 -1
  307. package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.js +10 -6
  308. package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +1 -1
  309. package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.js +8 -4
  310. package/lib/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -1
  311. package/lib/mol-repr/structure/visual/molecular-surface-mesh.js +2 -2
  312. package/lib/mol-repr/structure/visual/util/bond.d.ts +1 -1
  313. package/lib/mol-repr/structure/visual/util/bond.js +5 -4
  314. package/lib/mol-repr/visual.d.ts +1 -1
  315. package/lib/mol-repr/visual.js +2 -1
  316. package/lib/mol-state/transform.js +12 -2
  317. package/lib/mol-state/tree/immutable.d.ts +18 -0
  318. package/lib/mol-state/tree/transient.d.ts +3 -4
  319. package/lib/mol-theme/color/element-symbol.d.ts +289 -3
  320. package/lib/mol-theme/color/element-symbol.js +25 -15
  321. package/lib/mol-theme/color/entity-id.d.ts +1 -1
  322. package/lib/mol-theme/color/entity-id.js +29 -5
  323. package/lib/mol-theme/color/illustrative.d.ts +100 -29
  324. package/lib/mol-theme/color/illustrative.js +26 -7
  325. package/lib/mol-theme/color/molecule-type.d.ts +19 -1
  326. package/lib/mol-theme/color/molecule-type.js +10 -5
  327. package/lib/mol-theme/color/residue-name.d.ts +77 -1
  328. package/lib/mol-theme/color/residue-name.js +10 -5
  329. package/lib/mol-theme/color/secondary-structure.d.ts +27 -1
  330. package/lib/mol-theme/color/secondary-structure.js +10 -5
  331. package/lib/mol-theme/color.d.ts +253 -15
  332. package/lib/mol-util/color/color.d.ts +1 -1
  333. package/lib/mol-util/color/color.js +1 -1
  334. package/lib/mol-util/color/params.d.ts +10 -0
  335. package/lib/mol-util/color/params.js +15 -0
  336. package/lib/servers/volume/config.js +3 -3
  337. package/lib/servers/volume/query.js +1 -1
  338. package/package.json +38 -40
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MoreHorizSvg = exports.LinearScaleSvg = exports.LaunchSvg = exports.HomeOutlinedSvg = exports.HelpOutlineSvg = exports.GetAppSvg = exports.FullscreenSvg = exports.FlipToFrontSvg = exports.ExtensionSvg = exports.ErrorSvg = exports.DeleteSvg = exports.DeleteOutlinedSvg = exports.CropOrginalSvg = exports.CropFreeSvg = exports.CropSvg = exports.CopySvg = exports.CodeSvg = exports.CloudUploadSvg = exports.CloseSvg = exports.ClearSvg = exports.CheckSvg = exports.CenterFocusStrongSvg = exports.CancelSvg = exports.CancelOutlinedSvg = exports.CameraSvg = exports.CameraOutlinedSvg = exports.BuildSvg = exports.BuildOutlinedSvg = exports.BrushSvg = exports.BookmarksOutlinedSvg = exports.BlurOnSvg = exports.AutorenewSvg = exports.ArrowUpwardSvg = exports.ArrowRightSvg = exports.ArrowDropDownSvg = exports.ArrowDownwardSvg = exports.AddSvg = exports.AccountTreeOutlinedSvg = exports.PencilRulerSvg = exports.FileOutlineSvg = exports.CursorDefaultOutlineSvg = exports.CubeSendSvg = exports.CubeScanSvg = exports.CubeOutlineSvg = exports.MoleculeSvg = exports.SetSvg = exports.IntersectSvg = exports.SubtractSvg = exports.UnionSvg = exports.Icon = void 0;
4
- exports.SuperpositionSvg = exports.SuperposeChainsSvg = exports.SuperposeAtomsSvg = exports.SelectionModeSvg = exports.WarningSvg = exports.VisibilityOutlinedSvg = exports.VisibilityOffOutlinedSvg = exports.TuneSvg = exports.SwapHorizSvg = exports.SubscriptionsOutlinedSvg = exports.StopSvg = exports.SkipPreviousSvg = exports.ScatterPlotSvg = exports.SaveOutlinedSvg = exports.RestoreSvg = exports.RemoveSvg = exports.RefreshSvg = exports.PlayArrowSvg = exports.OpenInBrowserSvg = exports.NavigateNextSvg = exports.NavigateBeforeSvg = void 0;
3
+ exports.LinearScaleSvg = exports.LaunchSvg = exports.HomeOutlinedSvg = exports.HelpOutlineSvg = exports.GetAppSvg = exports.FullscreenSvg = exports.FlipToFrontSvg = exports.ExtensionSvg = exports.ErrorSvg = exports.DeleteSvg = exports.DeleteOutlinedSvg = exports.CropOrginalSvg = exports.CropFreeSvg = exports.CropSvg = exports.CopySvg = exports.CodeSvg = exports.CloudUploadSvg = exports.CloseSvg = exports.ClearSvg = exports.CheckSvg = exports.CenterFocusStrongSvg = exports.CancelSvg = exports.CancelOutlinedSvg = exports.CameraSvg = exports.CameraOutlinedSvg = exports.BuildSvg = exports.BuildOutlinedSvg = exports.BrushSvg = exports.BookmarksOutlinedSvg = exports.BlurOnSvg = exports.AutorenewSvg = exports.ArrowUpwardSvg = exports.ArrowRightSvg = exports.ArrowDropDownSvg = exports.ArrowDownwardSvg = exports.AddSvg = exports.AccountTreeOutlinedSvg = exports.MagicWandSvg = exports.PencilRulerSvg = exports.FileOutlineSvg = exports.CursorDefaultOutlineSvg = exports.CubeSendSvg = exports.CubeScanSvg = exports.CubeOutlineSvg = exports.MoleculeSvg = exports.SetSvg = exports.IntersectSvg = exports.SubtractSvg = exports.UnionSvg = exports.Icon = void 0;
4
+ exports.SuperpositionSvg = exports.SuperposeChainsSvg = exports.SuperposeAtomsSvg = exports.SelectionModeSvg = exports.WarningSvg = exports.VisibilityOutlinedSvg = exports.VisibilityOffOutlinedSvg = exports.TuneSvg = exports.SwapHorizSvg = exports.SubscriptionsOutlinedSvg = exports.StopSvg = exports.SkipPreviousSvg = exports.ScatterPlotSvg = exports.SaveOutlinedSvg = exports.RestoreSvg = exports.RemoveSvg = exports.RefreshSvg = exports.PlayArrowSvg = exports.OpenInBrowserSvg = exports.NavigateNextSvg = exports.NavigateBeforeSvg = exports.MoreHorizSvg = void 0;
5
5
  var tslib_1 = require("tslib");
6
6
  var jsx_runtime_1 = require("react/jsx-runtime");
7
7
  function Icon(props) {
@@ -30,10 +30,10 @@ function MoleculeSvg() { return _Molecule; }
30
30
  exports.MoleculeSvg = MoleculeSvg;
31
31
  // The following icons are adapted from https://materialdesignicons.com/ and
32
32
  // licensed with https://github.com/Templarian/MaterialDesign/blob/master/LICENSE
33
- var _CubeOutline = (0, jsx_runtime_1.jsx)("svg", (0, tslib_1.__assign)({ width: '24px', height: '24px', viewBox: '0 0 24 24', strokeWidth: '0.1px' }, { children: (0, jsx_runtime_1.jsx)("path", { d: "M21,16.5C21,16.88 20.79,17.21 20.47,17.38L12.57,21.82C12.41,21.94 12.21,22 12,22C11.79,22 11.59,21.94 11.43,21.82L3.53,17.38C3.21,17.21 3,16.88 3,16.5V7.5C3,7.12 3.21,6.79 3.53,6.62L11.43,2.18C11.59,2.06 11.79,2 12,2C12.21,2 12.41,2.06 12.57,2.18L20.47,6.62C20.79,6.79 21,7.12 21,7.5V16.5M12,4.15L6.04,7.5L12,10.85L17.96,7.5L12,4.15M5,15.91L11,19.29V12.58L5,9.21V15.91M19,15.91V9.21L13,12.58V19.29L19,15.91Z" }, void 0) }), void 0);
33
+ var _CubeOutline = (0, jsx_runtime_1.jsx)("svg", (0, tslib_1.__assign)({ width: '24px', height: '24px', viewBox: '0 0 24 24', strokeWidth: '0.1px' }, { children: (0, jsx_runtime_1.jsx)("path", { d: 'M21,16.5C21,16.88 20.79,17.21 20.47,17.38L12.57,21.82C12.41,21.94 12.21,22 12,22C11.79,22 11.59,21.94 11.43,21.82L3.53,17.38C3.21,17.21 3,16.88 3,16.5V7.5C3,7.12 3.21,6.79 3.53,6.62L11.43,2.18C11.59,2.06 11.79,2 12,2C12.21,2 12.41,2.06 12.57,2.18L20.47,6.62C20.79,6.79 21,7.12 21,7.5V16.5M12,4.15L6.04,7.5L12,10.85L17.96,7.5L12,4.15M5,15.91L11,19.29V12.58L5,9.21V15.91M19,15.91V9.21L13,12.58V19.29L19,15.91Z' }, void 0) }), void 0);
34
34
  function CubeOutlineSvg() { return _CubeOutline; }
35
35
  exports.CubeOutlineSvg = CubeOutlineSvg;
36
- var _CubeScan = (0, jsx_runtime_1.jsx)("svg", (0, tslib_1.__assign)({ width: '24px', height: '24px', viewBox: '0 0 24 24', strokeWidth: '0.1px' }, { children: (0, jsx_runtime_1.jsx)("path", { d: "M17,22V20H20V17H22V20.5C22,20.89 21.84,21.24 21.54,21.54C21.24,21.84 20.89,22 20.5,22H17M7,22H3.5C3.11,22 2.76,21.84 2.46,21.54C2.16,21.24 2,20.89 2,20.5V17H4V20H7V22M17,2H20.5C20.89,2 21.24,2.16 21.54,2.46C21.84,2.76 22,3.11 22,3.5V7H20V4H17V2M7,2V4H4V7H2V3.5C2,3.11 2.16,2.76 2.46,2.46C2.76,2.16 3.11,2 3.5,2H7M13,17.25L17,14.95V10.36L13,12.66V17.25M12,10.92L16,8.63L12,6.28L8,8.63L12,10.92M7,14.95L11,17.25V12.66L7,10.36V14.95M18.23,7.59C18.73,7.91 19,8.34 19,8.91V15.23C19,15.8 18.73,16.23 18.23,16.55L12.75,19.73C12.25,20.05 11.75,20.05 11.25,19.73L5.77,16.55C5.27,16.23 5,15.8 5,15.23V8.91C5,8.34 5.27,7.91 5.77,7.59L11.25,4.41C11.5,4.28 11.75,4.22 12,4.22C12.25,4.22 12.5,4.28 12.75,4.41L18.23,7.59Z" }, void 0) }), void 0);
36
+ var _CubeScan = (0, jsx_runtime_1.jsx)("svg", (0, tslib_1.__assign)({ width: '24px', height: '24px', viewBox: '0 0 24 24', strokeWidth: '0.1px' }, { children: (0, jsx_runtime_1.jsx)("path", { d: 'M17,22V20H20V17H22V20.5C22,20.89 21.84,21.24 21.54,21.54C21.24,21.84 20.89,22 20.5,22H17M7,22H3.5C3.11,22 2.76,21.84 2.46,21.54C2.16,21.24 2,20.89 2,20.5V17H4V20H7V22M17,2H20.5C20.89,2 21.24,2.16 21.54,2.46C21.84,2.76 22,3.11 22,3.5V7H20V4H17V2M7,2V4H4V7H2V3.5C2,3.11 2.16,2.76 2.46,2.46C2.76,2.16 3.11,2 3.5,2H7M13,17.25L17,14.95V10.36L13,12.66V17.25M12,10.92L16,8.63L12,6.28L8,8.63L12,10.92M7,14.95L11,17.25V12.66L7,10.36V14.95M18.23,7.59C18.73,7.91 19,8.34 19,8.91V15.23C19,15.8 18.73,16.23 18.23,16.55L12.75,19.73C12.25,20.05 11.75,20.05 11.25,19.73L5.77,16.55C5.27,16.23 5,15.8 5,15.23V8.91C5,8.34 5.27,7.91 5.77,7.59L11.25,4.41C11.5,4.28 11.75,4.22 12,4.22C12.25,4.22 12.5,4.28 12.75,4.41L18.23,7.59Z' }, void 0) }), void 0);
37
37
  function CubeScanSvg() { return _CubeScan; }
38
38
  exports.CubeScanSvg = CubeScanSvg;
39
39
  var _CubeSend = (0, jsx_runtime_1.jsx)("svg", (0, tslib_1.__assign)({ width: '24px', height: '24px', viewBox: '0 0 24 24', strokeWidth: '0.1px' }, { children: (0, jsx_runtime_1.jsx)("path", { d: "M16,4L9,8.04V15.96L16,20L23,15.96V8.04M16,6.31L19.8,8.5L16,10.69L12.21,8.5M0,7V9H7V7M11,10.11L15,12.42V17.11L11,14.81M21,10.11V14.81L17,17.11V12.42M2,11V13H7V11M4,15V17H7V15" }, void 0) }), void 0);
@@ -45,9 +45,12 @@ exports.CursorDefaultOutlineSvg = CursorDefaultOutlineSvg;
45
45
  var _FileOutline = (0, jsx_runtime_1.jsx)("svg", (0, tslib_1.__assign)({ width: '24px', height: '24px', viewBox: '0 0 24 24', strokeWidth: '0.1px' }, { children: (0, jsx_runtime_1.jsx)("path", { fill: 'currentColor', d: 'M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z' }, void 0) }), void 0);
46
46
  function FileOutlineSvg() { return _FileOutline; }
47
47
  exports.FileOutlineSvg = FileOutlineSvg;
48
- var _PencilRuler = (0, jsx_runtime_1.jsx)("svg", (0, tslib_1.__assign)({ width: '24px', height: '24px', viewBox: '0 0 24 24', strokeWidth: '0.1px' }, { children: (0, jsx_runtime_1.jsx)("path", { d: "M3 17.25V21H6.75L17.81 9.93L14.06 6.18L3 17.25M22.61 18.36L18.36 22.61L13.16 17.41L14.93 15.64L15.93 16.64L18.4 14.16L19.82 15.58L18.36 17L19.42 18L20.84 16.6L22.61 18.36M6.61 10.83L1.39 5.64L5.64 1.39L7.4 3.16L4.93 5.64L6 6.7L8.46 4.22L9.88 5.64L8.46 7.05L9.46 8.05L6.61 10.83M20.71 7C21.1 6.61 21.1 6 20.71 5.59L18.37 3.29C18 2.9 17.35 2.9 16.96 3.29L15.12 5.12L18.87 8.87L20.71 7Z" }, void 0) }), void 0);
48
+ var _PencilRuler = (0, jsx_runtime_1.jsx)("svg", (0, tslib_1.__assign)({ width: '24px', height: '24px', viewBox: '0 0 24 24', strokeWidth: '0.1px' }, { children: (0, jsx_runtime_1.jsx)("path", { d: 'M3 17.25V21H6.75L17.81 9.93L14.06 6.18L3 17.25M22.61 18.36L18.36 22.61L13.16 17.41L14.93 15.64L15.93 16.64L18.4 14.16L19.82 15.58L18.36 17L19.42 18L20.84 16.6L22.61 18.36M6.61 10.83L1.39 5.64L5.64 1.39L7.4 3.16L4.93 5.64L6 6.7L8.46 4.22L9.88 5.64L8.46 7.05L9.46 8.05L6.61 10.83M20.71 7C21.1 6.61 21.1 6 20.71 5.59L18.37 3.29C18 2.9 17.35 2.9 16.96 3.29L15.12 5.12L18.87 8.87L20.71 7Z' }, void 0) }), void 0);
49
49
  function PencilRulerSvg() { return _PencilRuler; }
50
50
  exports.PencilRulerSvg = PencilRulerSvg;
51
+ var _MagicWand = (0, jsx_runtime_1.jsx)("svg", (0, tslib_1.__assign)({ width: '24px', height: '24px', viewBox: '0 0 24 24' }, { children: (0, jsx_runtime_1.jsx)("path", { fill: 'currentColor', d: 'M7.5,5.6L5,7L6.4,4.5L5,2L7.5,3.4L10,2L8.6,4.5L10,7L7.5,5.6M19.5,15.4L22,14L20.6,16.5L22,19L19.5,17.6L17,19L18.4,16.5L17,14L19.5,15.4M22,2L20.6,4.5L22,7L19.5,5.6L17,7L18.4,4.5L17,2L19.5,3.4L22,2M13.34,12.78L15.78,10.34L13.66,8.22L11.22,10.66L13.34,12.78M14.37,7.29L16.71,9.63C17.1,10 17.1,10.65 16.71,11.04L5.04,22.71C4.65,23.1 4,23.1 3.63,22.71L1.29,20.37C0.9,20 0.9,19.35 1.29,18.96L12.96,7.29C13.35,6.9 14,6.9 14.37,7.29Z' }, void 0) }), void 0);
52
+ function MagicWandSvg() { return _MagicWand; }
53
+ exports.MagicWandSvg = MagicWandSvg;
51
54
  // The following icons are adapted from https://material-ui.com/components/material-icons/ and
52
55
  // licensed with https://github.com/mui-org/material-ui/blob/master/LICENSE
53
56
  var _AccountTreeOutlined = (0, jsx_runtime_1.jsx)("svg", (0, tslib_1.__assign)({ width: '24px', height: '24px', viewBox: '0 0 24 24' }, { children: (0, jsx_runtime_1.jsx)("path", { d: 'M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3h7zM7 9H4V5h3v4zm10 6h3v4h-3v-4zm0-10h3v4h-3V5z' }, void 0) }), void 0);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author David Sehnal <david.sehnal@gmail.com>
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
@@ -17,6 +17,7 @@ var source_1 = require("./structure/source");
17
17
  var volume_1 = require("./structure/volume");
18
18
  var config_1 = require("../mol-plugin/config");
19
19
  var superposition_1 = require("./structure/superposition");
20
+ var quick_styles_1 = require("./structure/quick-styles");
20
21
  var TrajectoryViewportControls = /** @class */ (function (_super) {
21
22
  (0, tslib_1.__extends)(TrajectoryViewportControls, _super);
22
23
  function TrajectoryViewportControls() {
@@ -293,7 +294,7 @@ var DefaultStructureTools = /** @class */ (function (_super) {
293
294
  return _super !== null && _super.apply(this, arguments) || this;
294
295
  }
295
296
  DefaultStructureTools.prototype.render = function () {
296
- return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", (0, tslib_1.__assign)({ className: 'msp-section-header' }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: icons_1.BuildSvg }, void 0), "Structure Tools"] }), void 0), (0, jsx_runtime_1.jsx)(source_1.StructureSourceControls, {}, void 0), (0, jsx_runtime_1.jsx)(measurements_1.StructureMeasurementsControls, {}, void 0), (0, jsx_runtime_1.jsx)(superposition_1.StructureSuperpositionControls, {}, void 0), (0, jsx_runtime_1.jsx)(components_1.StructureComponentControls, {}, void 0), this.plugin.config.get(config_1.PluginConfig.VolumeStreaming.Enabled) && (0, jsx_runtime_1.jsx)(volume_1.VolumeStreamingControls, {}, void 0), (0, jsx_runtime_1.jsx)(volume_1.VolumeSourceControls, {}, void 0), (0, jsx_runtime_1.jsx)(CustomStructureControls, {}, void 0)] }, void 0);
297
+ return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", (0, tslib_1.__assign)({ className: 'msp-section-header' }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: icons_1.BuildSvg }, void 0), "Structure Tools"] }), void 0), (0, jsx_runtime_1.jsx)(source_1.StructureSourceControls, {}, void 0), (0, jsx_runtime_1.jsx)(measurements_1.StructureMeasurementsControls, {}, void 0), (0, jsx_runtime_1.jsx)(superposition_1.StructureSuperpositionControls, {}, void 0), (0, jsx_runtime_1.jsx)(quick_styles_1.StructureQuickStylesControls, {}, void 0), (0, jsx_runtime_1.jsx)(components_1.StructureComponentControls, {}, void 0), this.plugin.config.get(config_1.PluginConfig.VolumeStreaming.Enabled) && (0, jsx_runtime_1.jsx)(volume_1.VolumeStreamingControls, {}, void 0), (0, jsx_runtime_1.jsx)(volume_1.VolumeSourceControls, {}, void 0), (0, jsx_runtime_1.jsx)(CustomStructureControls, {}, void 0)] }, void 0);
297
298
  };
298
299
  return DefaultStructureTools;
299
300
  }(base_1.PluginUIComponent));
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Copyright (c) 2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ *
4
+ * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
+ */
6
+ /// <reference types="react" />
7
+ import { CollapsableControls, PurePluginUIComponent } from '../base';
8
+ import { MagicWandSvg } from '../controls/icons';
9
+ export declare class StructureQuickStylesControls extends CollapsableControls {
10
+ defaultState(): {
11
+ isCollapsed: boolean;
12
+ header: string;
13
+ brand: {
14
+ accent: "gray";
15
+ svg: typeof MagicWandSvg;
16
+ };
17
+ };
18
+ renderControls(): JSX.Element;
19
+ }
20
+ export declare class QuickStyles extends PurePluginUIComponent {
21
+ default(): Promise<void>;
22
+ illustrative(): Promise<void>;
23
+ stylized(): Promise<void>;
24
+ render(): JSX.Element;
25
+ }
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QuickStyles = exports.StructureQuickStylesControls = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var jsx_runtime_1 = require("react/jsx-runtime");
6
+ /**
7
+ * Copyright (c) 2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
8
+ *
9
+ * @author Alexander Rose <alexander.rose@weirdbyte.de>
10
+ */
11
+ var representation_preset_1 = require("../../mol-plugin-state/builder/structure/representation-preset");
12
+ var color_1 = require("../../mol-util/color");
13
+ var base_1 = require("../base");
14
+ var common_1 = require("../controls/common");
15
+ var icons_1 = require("../controls/icons");
16
+ var param_definition_1 = require("../../mol-util/param-definition");
17
+ var postprocessing_1 = require("../../mol-canvas3d/passes/postprocessing");
18
+ var config_1 = require("../../mol-plugin/config");
19
+ var component_1 = require("../../mol-plugin-state/manager/structure/component");
20
+ var StructureQuickStylesControls = /** @class */ (function (_super) {
21
+ (0, tslib_1.__extends)(StructureQuickStylesControls, _super);
22
+ function StructureQuickStylesControls() {
23
+ return _super !== null && _super.apply(this, arguments) || this;
24
+ }
25
+ StructureQuickStylesControls.prototype.defaultState = function () {
26
+ return {
27
+ isCollapsed: false,
28
+ header: 'Quick Styles',
29
+ brand: { accent: 'gray', svg: icons_1.MagicWandSvg }
30
+ };
31
+ };
32
+ StructureQuickStylesControls.prototype.renderControls = function () {
33
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(QuickStyles, {}, void 0) }, void 0);
34
+ };
35
+ return StructureQuickStylesControls;
36
+ }(base_1.CollapsableControls));
37
+ exports.StructureQuickStylesControls = StructureQuickStylesControls;
38
+ var QuickStyles = /** @class */ (function (_super) {
39
+ (0, tslib_1.__extends)(QuickStyles, _super);
40
+ function QuickStyles() {
41
+ return _super !== null && _super.apply(this, arguments) || this;
42
+ }
43
+ QuickStyles.prototype.default = function () {
44
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
45
+ var structures, preset, provider, p;
46
+ return (0, tslib_1.__generator)(this, function (_a) {
47
+ switch (_a.label) {
48
+ case 0:
49
+ structures = this.plugin.managers.structure.hierarchy.selection.structures;
50
+ preset = this.plugin.config.get(config_1.PluginConfig.Structure.DefaultRepresentationPreset) || representation_preset_1.PresetStructureRepresentations.auto.id;
51
+ provider = this.plugin.builders.structure.representation.resolveProvider(preset);
52
+ return [4 /*yield*/, this.plugin.managers.structure.component.applyPreset(structures, provider)];
53
+ case 1:
54
+ _a.sent();
55
+ this.plugin.managers.structure.component.setOptions(param_definition_1.ParamDefinition.getDefaultValues(component_1.StructureComponentManager.OptionsParams));
56
+ if (this.plugin.canvas3d) {
57
+ p = param_definition_1.ParamDefinition.getDefaultValues(postprocessing_1.PostprocessingParams);
58
+ this.plugin.canvas3d.setProps({
59
+ postprocessing: { outline: p.outline, occlusion: p.occlusion }
60
+ });
61
+ }
62
+ return [2 /*return*/];
63
+ }
64
+ });
65
+ });
66
+ };
67
+ QuickStyles.prototype.illustrative = function () {
68
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
69
+ var structures;
70
+ return (0, tslib_1.__generator)(this, function (_a) {
71
+ switch (_a.label) {
72
+ case 0:
73
+ structures = this.plugin.managers.structure.hierarchy.selection.structures;
74
+ return [4 /*yield*/, this.plugin.managers.structure.component.applyPreset(structures, representation_preset_1.PresetStructureRepresentations.illustrative)];
75
+ case 1:
76
+ _a.sent();
77
+ if (this.plugin.canvas3d) {
78
+ this.plugin.canvas3d.setProps({
79
+ postprocessing: {
80
+ outline: {
81
+ name: 'on',
82
+ params: { scale: 1, color: (0, color_1.Color)(0x000000), threshold: 0.25 }
83
+ },
84
+ occlusion: {
85
+ name: 'on',
86
+ params: { bias: 0.9, blurKernelSize: 15, radius: 5, samples: 32 }
87
+ },
88
+ }
89
+ });
90
+ }
91
+ return [2 /*return*/];
92
+ }
93
+ });
94
+ });
95
+ };
96
+ QuickStyles.prototype.stylized = function () {
97
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
98
+ var pp;
99
+ return (0, tslib_1.__generator)(this, function (_a) {
100
+ this.plugin.managers.structure.component.setOptions((0, tslib_1.__assign)((0, tslib_1.__assign)({}, this.plugin.managers.structure.component.state.options), { ignoreLight: true }));
101
+ if (this.plugin.canvas3d) {
102
+ pp = this.plugin.canvas3d.props.postprocessing;
103
+ this.plugin.canvas3d.setProps({
104
+ postprocessing: {
105
+ outline: {
106
+ name: 'on',
107
+ params: pp.outline.name === 'on'
108
+ ? pp.outline.params
109
+ : { scale: 1, color: (0, color_1.Color)(0x000000), threshold: 0.33 }
110
+ },
111
+ occlusion: {
112
+ name: 'on',
113
+ params: pp.occlusion.name === 'on'
114
+ ? pp.occlusion.params
115
+ : { bias: 0.9, blurKernelSize: 15, radius: 5, samples: 32 }
116
+ },
117
+ }
118
+ });
119
+ }
120
+ return [2 /*return*/];
121
+ });
122
+ });
123
+ };
124
+ QuickStyles.prototype.render = function () {
125
+ var _this = this;
126
+ return (0, jsx_runtime_1.jsxs)("div", (0, tslib_1.__assign)({ className: 'msp-flex-row' }, { children: [(0, jsx_runtime_1.jsx)(common_1.Button, (0, tslib_1.__assign)({ noOverflow: true, title: 'Applies default representation preset. Set outline and occlusion effects to defaults.', onClick: function () { return _this.default(); }, style: { width: 'auto' } }, { children: "Default" }), void 0), (0, jsx_runtime_1.jsx)(common_1.Button, (0, tslib_1.__assign)({ noOverflow: true, title: 'Applies no representation preset. Enables outline and occlusion effects. Enables ignore-light representation parameter.', onClick: function () { return _this.stylized(); }, style: { width: 'auto' } }, { children: "Stylized" }), void 0), (0, jsx_runtime_1.jsx)(common_1.Button, (0, tslib_1.__assign)({ noOverflow: true, title: 'Applies illustrative representation preset. Enables outline and occlusion effects. Enables ignore-light parameter.', onClick: function () { return _this.illustrative(); }, style: { width: 'auto' } }, { children: "Illustrative" }), void 0)] }), void 0);
127
+ };
128
+ return QuickStyles;
129
+ }(base_1.PurePluginUIComponent));
130
+ exports.QuickStyles = QuickStyles;
131
+ //# sourceMappingURL=quick-styles.js.map
@@ -162,8 +162,8 @@ var SuperpositionControls = /** @class */ (function (_super) {
162
162
  _i++;
163
163
  return [3 /*break*/, 1];
164
164
  case 4:
165
- rmsd /= transforms.length - 1;
166
- this.plugin.log.info("Superposed ".concat(input.length, " structures with avg. RMSD ").concat(rmsd.toFixed(2), "."));
165
+ rmsd /= Math.max(transforms.length - 1, 1);
166
+ this.plugin.log.info("Superposed ".concat(input.length, " structures with avg. RMSD ").concat(rmsd.toFixed(2), " \u00C5."));
167
167
  return [4 /*yield*/, new Promise(function (res) { return requestAnimationFrame(res); })];
168
168
  case 5:
169
169
  _a.sent();
@@ -68,16 +68,16 @@ var VolumeStreamingControls = /** @class */ (function (_super) {
68
68
  return !!((_b = (_a = transformers_1.InitVolumeStreaming.definition).isApplicable) === null || _b === void 0 ? void 0 : _b.call(_a, pivot.obj, pivot.transform, this.plugin));
69
69
  };
70
70
  VolumeStreamingControls.prototype.renderEnable = function () {
71
- var _a;
71
+ var _a, _b;
72
72
  var pivot = this.pivot;
73
73
  if (!pivot.cell.parent)
74
74
  return null;
75
75
  var root = mol_state_1.StateSelection.findTagInSubtree(pivot.cell.parent.tree, this.pivot.cell.transform.ref, behavior_1.VolumeStreaming.RootTag);
76
76
  var rootCell = root && pivot.cell.parent.cells.get(root);
77
77
  var simpleApply = rootCell && rootCell.status === 'error'
78
- ? { header: 'Error enabling', icon: icons_1.ErrorSvg, title: rootCell.errorText }
79
- : rootCell && ((_a = rootCell.obj) === null || _a === void 0 ? void 0 : _a.data.entries.length) === 0
80
- ? { header: 'Error enabling', icon: icons_1.ErrorSvg, title: 'No entry for streaming found' }
78
+ ? { header: !!rootCell.errorText && ((_a = rootCell.errorText) === null || _a === void 0 ? void 0 : _a.includes('404')) ? 'No Density Data Available' : 'Error Enabling', icon: icons_1.ErrorSvg, title: rootCell.errorText }
79
+ : rootCell && ((_b = rootCell.obj) === null || _b === void 0 ? void 0 : _b.data.entries.length) === 0
80
+ ? { header: 'Error Enabling', icon: icons_1.ErrorSvg, title: 'No Entry for Streaming Found' }
81
81
  : { header: 'Enable', icon: icons_1.CheckSvg, title: 'Enable' };
82
82
  return (0, jsx_runtime_1.jsx)(apply_action_1.ApplyActionControl, { state: pivot.cell.parent, action: transformers_1.InitVolumeStreaming, initiallyCollapsed: true, nodeRef: pivot.cell.transform.ref, simpleApply: simpleApply }, void 0);
83
83
  };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2019-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  * @author David Sehnal <david.sehnal@gmail.com>
@@ -4,7 +4,7 @@ exports.SimpleSettingsControl = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  var jsx_runtime_1 = require("react/jsx-runtime");
6
6
  /**
7
- * Copyright (c) 2019-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
7
+ * Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
8
8
  *
9
9
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
10
10
  * @author David Sehnal <david.sehnal@gmail.com>
@@ -47,10 +47,7 @@ var LayoutOptions = {
47
47
  'left': 'Left Panel'
48
48
  };
49
49
  var SimpleSettingsParams = {
50
- spin: param_definition_1.ParamDefinition.Group({
51
- spin: canvas3d_1.Canvas3DParams.trackball.params.spin,
52
- speed: canvas3d_1.Canvas3DParams.trackball.params.spinSpeed
53
- }, { pivot: 'spin' }),
50
+ animate: canvas3d_1.Canvas3DParams.trackball.params.animate,
54
51
  camera: canvas3d_1.Canvas3DParams.camera,
55
52
  background: param_definition_1.ParamDefinition.Group({
56
53
  color: param_definition_1.ParamDefinition.Color((0, color_1.Color)(0xFCFBF9), { label: 'Background', description: 'Custom background color' }),
@@ -100,7 +97,7 @@ var SimpleSettingsMapping = (0, param_mapping_1.ParamMapping)({
100
97
  var renderer = canvas.renderer;
101
98
  return {
102
99
  layout: props.layout,
103
- spin: { spin: !!canvas.trackball.spin, speed: canvas.trackball.spinSpeed },
100
+ animate: canvas.trackball.animate,
104
101
  camera: canvas.camera,
105
102
  background: {
106
103
  color: renderer.backgroundColor,
@@ -116,8 +113,7 @@ var SimpleSettingsMapping = (0, param_mapping_1.ParamMapping)({
116
113
  },
117
114
  update: function (s, props) {
118
115
  var canvas = props.canvas;
119
- canvas.trackball.spin = s.spin.spin;
120
- canvas.trackball.spinSpeed = s.spin.speed;
116
+ canvas.trackball.animate = s.animate;
121
117
  canvas.camera = s.camera;
122
118
  canvas.transparentBackground = s.background.transparent;
123
119
  canvas.renderer.backgroundColor = s.background.color;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2020-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  * @author David Sehnal <david.sehnal@gmail.com>
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ * Copyright (c) 2020-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
4
  *
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
6
6
  * @author David Sehnal <david.sehnal@gmail.com>
@@ -12,9 +12,9 @@ var param_definition_1 = require("../../../mol-util/param-definition");
12
12
  var names_1 = require("../../../mol-util/color/names");
13
13
  var text_1 = require("../../../mol-geo/geometry/text/text");
14
14
  exports.MeasurementRepresentationCommonTextParams = {
15
- customText: param_definition_1.ParamDefinition.Text('', { label: 'Text', description: 'Override the label with custom value.' }),
15
+ customText: param_definition_1.ParamDefinition.Text('', { label: 'Text', description: 'Override the label with custom value.', isEssential: true }),
16
16
  textColor: param_definition_1.ParamDefinition.Color(names_1.ColorNames.black, { isEssential: true }),
17
- textSize: param_definition_1.ParamDefinition.Numeric(0.5, { min: 0.1, max: 5, step: 0.1 }, { isEssential: true }),
17
+ textSize: param_definition_1.ParamDefinition.Numeric(0.5, { min: 0.1, max: 10, step: 0.1 }, { isEssential: true }),
18
18
  };
19
19
  exports.LociLabelTextParams = (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, text_1.Text.Params), exports.MeasurementRepresentationCommonTextParams), { borderWidth: param_definition_1.ParamDefinition.Numeric(0.2, { min: 0, max: 0.5, step: 0.01 }) });
20
20
  //# sourceMappingURL=common.js.map
@@ -13,7 +13,7 @@ export declare namespace StructureRepresentationRegistry {
13
13
  export const BuiltIn: {
14
14
  cartoon: import("./representation").StructureRepresentationProvider<{
15
15
  sizeFactor: import("../../mol-util/param-definition").ParamDefinition.Numeric;
16
- visuals: import("../../mol-util/param-definition").ParamDefinition.MultiSelect<"polymer-trace" | "polymer-gap" | "nucleotide-block" | "nucleotide-ring" | "direction-wedge">;
16
+ visuals: import("../../mol-util/param-definition").ParamDefinition.MultiSelect<"polymer-trace" | "polymer-gap" | "nucleotide-ring" | "nucleotide-block" | "direction-wedge">;
17
17
  bumpFrequency: import("../../mol-util/param-definition").ParamDefinition.Numeric;
18
18
  unitKinds: import("../../mol-util/param-definition").ParamDefinition.MultiSelect<"spheres" | "gaussians" | "atomic">;
19
19
  includeParent: import("../../mol-util/param-definition").ParamDefinition.BooleanParam;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */
@@ -10,7 +10,7 @@ import { ParamDefinition as PD } from '../../../mol-util/param-definition';
10
10
  import { StructureRepresentation, StructureRepresentationProvider } from '../representation';
11
11
  export declare const CartoonParams: {
12
12
  sizeFactor: PD.Numeric;
13
- visuals: PD.MultiSelect<"polymer-trace" | "polymer-gap" | "nucleotide-block" | "nucleotide-ring" | "direction-wedge">;
13
+ visuals: PD.MultiSelect<"polymer-trace" | "polymer-gap" | "nucleotide-ring" | "nucleotide-block" | "direction-wedge">;
14
14
  bumpFrequency: PD.Numeric;
15
15
  unitKinds: PD.MultiSelect<"spheres" | "gaussians" | "atomic">;
16
16
  includeParent: PD.BooleanParam;
@@ -48,7 +48,7 @@ export declare const CartoonParams: {
48
48
  export declare type CartoonParams = typeof CartoonParams;
49
49
  export declare function getCartoonParams(ctx: ThemeRegistryContext, structure: Structure): {
50
50
  sizeFactor: PD.Numeric;
51
- visuals: PD.MultiSelect<"polymer-trace" | "polymer-gap" | "nucleotide-block" | "nucleotide-ring" | "direction-wedge">;
51
+ visuals: PD.MultiSelect<"polymer-trace" | "polymer-gap" | "nucleotide-ring" | "nucleotide-block" | "direction-wedge">;
52
52
  bumpFrequency: PD.Numeric;
53
53
  unitKinds: PD.MultiSelect<"spheres" | "gaussians" | "atomic">;
54
54
  includeParent: PD.BooleanParam;
@@ -87,7 +87,7 @@ export declare type CartoonRepresentation = StructureRepresentation<CartoonParam
87
87
  export declare function CartoonRepresentation(ctx: RepresentationContext, getParams: RepresentationParamsGetter<Structure, CartoonParams>): CartoonRepresentation;
88
88
  export declare const CartoonRepresentationProvider: StructureRepresentationProvider<{
89
89
  sizeFactor: PD.Numeric;
90
- visuals: PD.MultiSelect<"polymer-trace" | "polymer-gap" | "nucleotide-block" | "nucleotide-ring" | "direction-wedge">;
90
+ visuals: PD.MultiSelect<"polymer-trace" | "polymer-gap" | "nucleotide-ring" | "nucleotide-block" | "direction-wedge">;
91
91
  bumpFrequency: PD.Numeric;
92
92
  unitKinds: PD.MultiSelect<"spheres" | "gaussians" | "atomic">;
93
93
  includeParent: PD.BooleanParam;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
4
  *
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
6
6
  */
@@ -27,7 +27,7 @@ var CartoonVisuals = {
27
27
  'nucleotide-ring': function (ctx, getParams) { return (0, units_representation_1.UnitsRepresentation)('Nucleotide ring mesh', ctx, getParams, nucleotide_ring_mesh_1.NucleotideRingVisual); },
28
28
  'direction-wedge': function (ctx, getParams) { return (0, units_representation_1.UnitsRepresentation)('Polymer direction wedge', ctx, getParams, polymer_direction_wedge_1.PolymerDirectionVisual); }
29
29
  };
30
- exports.CartoonParams = (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, polymer_trace_mesh_1.PolymerTraceParams), polymer_gap_cylinder_1.PolymerGapParams), nucleotide_block_mesh_1.NucleotideBlockParams), nucleotide_ring_mesh_1.NucleotideRingParams), polymer_direction_wedge_1.PolymerDirectionParams), { sizeFactor: param_definition_1.ParamDefinition.Numeric(0.2, { min: 0, max: 10, step: 0.01 }), visuals: param_definition_1.ParamDefinition.MultiSelect(['polymer-trace', 'polymer-gap', 'nucleotide-block'], param_definition_1.ParamDefinition.objectToOptions(CartoonVisuals)), bumpFrequency: param_definition_1.ParamDefinition.Numeric(2, { min: 0, max: 10, step: 0.1 }, base_1.BaseGeometry.ShadingCategory) });
30
+ exports.CartoonParams = (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, polymer_trace_mesh_1.PolymerTraceParams), polymer_gap_cylinder_1.PolymerGapParams), nucleotide_block_mesh_1.NucleotideBlockParams), nucleotide_ring_mesh_1.NucleotideRingParams), polymer_direction_wedge_1.PolymerDirectionParams), { sizeFactor: param_definition_1.ParamDefinition.Numeric(0.2, { min: 0, max: 10, step: 0.01 }), visuals: param_definition_1.ParamDefinition.MultiSelect(['polymer-trace', 'polymer-gap', 'nucleotide-ring'], param_definition_1.ParamDefinition.objectToOptions(CartoonVisuals)), bumpFrequency: param_definition_1.ParamDefinition.Numeric(2, { min: 0, max: 10, step: 0.1 }, base_1.BaseGeometry.ShadingCategory) });
31
31
  function getCartoonParams(ctx, structure) {
32
32
  var params = param_definition_1.ParamDefinition.clone(exports.CartoonParams);
33
33
  var hasNucleotides = false;
@@ -40,7 +40,7 @@ function getCartoonParams(ctx, structure) {
40
40
  });
41
41
  params.visuals.defaultValue = ['polymer-trace'];
42
42
  if (hasNucleotides)
43
- params.visuals.defaultValue.push('nucleotide-block');
43
+ params.visuals.defaultValue.push('nucleotide-ring');
44
44
  if (hasGaps)
45
45
  params.visuals.defaultValue.push('polymer-gap');
46
46
  return params;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */
@@ -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-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
4
  *
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
6
6
  */
@@ -81,6 +81,7 @@ function getLinkLoci(pickingId, structure, id) {
81
81
  }
82
82
  return loci_1.EmptyLoci;
83
83
  }
84
+ var __linkIndicesSet = new Set();
84
85
  function eachCarbohydrateLink(loci, structure, apply) {
85
86
  var changed = false;
86
87
  if (!structure_1.StructureElement.Loci.is(loci))
@@ -91,12 +92,15 @@ function eachCarbohydrateLink(loci, structure, apply) {
91
92
  var _loop_1 = function (unit, indices) {
92
93
  if (!structure_1.Unit.isAtomic(unit))
93
94
  return "continue";
95
+ __linkIndicesSet.clear();
94
96
  int_1.OrderedSet.forEach(indices, function (v) {
95
- // TODO avoid duplicate calls to apply
96
97
  var linkIndices = getLinkIndices(unit, unit.elements[v]);
97
98
  for (var i = 0, il = linkIndices.length; i < il; ++i) {
98
- if (apply(int_1.Interval.ofSingleton(linkIndices[i])))
99
- changed = true;
99
+ if (!__linkIndicesSet.has(linkIndices[i])) {
100
+ __linkIndicesSet.add(linkIndices[i]);
101
+ if (apply(int_1.Interval.ofSingleton(linkIndices[i])))
102
+ changed = true;
103
+ }
100
104
  }
101
105
  });
102
106
  };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */
@@ -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-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
4
  *
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
6
6
  */
@@ -25,8 +25,8 @@ var loci_1 = require("../../../mol-model/loci");
25
25
  var common_1 = require("./util/common");
26
26
  var base_1 = require("../../../mol-geo/geometry/base");
27
27
  var t = linear_algebra_1.Mat4.identity();
28
- var sVec = linear_algebra_1.Vec3.zero();
29
- var pd = linear_algebra_1.Vec3.zero();
28
+ var sVec = (0, linear_algebra_1.Vec3)();
29
+ var pd = (0, linear_algebra_1.Vec3)();
30
30
  var SideFactor = 2 * 0.806; // 0.806 == Math.cos(Math.PI / 4)
31
31
  var box = (0, box_1.Box)();
32
32
  var perforatedBox = (0, box_1.PerforatedBox)();
@@ -186,6 +186,7 @@ function getCarbohydrateLoci(pickingId, structure, id) {
186
186
  }
187
187
  return loci_1.EmptyLoci;
188
188
  }
189
+ var __elementIndicesSet = new Set();
189
190
  /** For each carbohydrate (usually a monosaccharide) when all its residue's elements are in a loci. */
190
191
  function eachCarbohydrate(loci, structure, apply) {
191
192
  var getElementIndices = structure.carbohydrates.getElementIndices;
@@ -197,12 +198,15 @@ function eachCarbohydrate(loci, structure, apply) {
197
198
  var _loop_1 = function (unit, indices) {
198
199
  if (!structure_1.Unit.isAtomic(unit))
199
200
  return "continue";
201
+ __elementIndicesSet.clear();
200
202
  int_1.OrderedSet.forEach(indices, function (v) {
201
- // TODO avoid duplicate calls to apply
202
203
  var elementIndices = getElementIndices(unit, unit.elements[v]);
203
204
  for (var i = 0, il = elementIndices.length; i < il; ++i) {
204
- if (apply(int_1.Interval.ofSingleton(elementIndices[i] * 2)))
205
- changed = true;
205
+ if (!__elementIndicesSet.has(elementIndices[i])) {
206
+ __elementIndicesSet.add(elementIndices[i]);
207
+ if (apply(int_1.Interval.ofSingleton(elementIndices[i] * 2)))
208
+ changed = true;
209
+ }
206
210
  }
207
211
  });
208
212
  };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */
@@ -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-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
4
  *
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
6
6
  */
@@ -105,6 +105,7 @@ function getTerminalLinkLoci(pickingId, structure, id) {
105
105
  }
106
106
  return loci_1.EmptyLoci;
107
107
  }
108
+ var __linkIndicesSet = new Set();
108
109
  function eachTerminalLink(loci, structure, apply) {
109
110
  var changed = false;
110
111
  if (!structure_1.StructureElement.Loci.is(loci))
@@ -115,12 +116,15 @@ function eachTerminalLink(loci, structure, apply) {
115
116
  var _loop_1 = function (unit, indices) {
116
117
  if (!structure_1.Unit.isAtomic(unit))
117
118
  return "continue";
119
+ __linkIndicesSet.clear();
118
120
  int_1.OrderedSet.forEach(indices, function (v) {
119
- // TODO avoid duplicate calls to apply
120
121
  var linkIndices = getTerminalLinkIndices(unit, unit.elements[v]);
121
122
  for (var i = 0, il = linkIndices.length; i < il; ++i) {
122
- if (apply(int_1.Interval.ofSingleton(linkIndices[i])))
123
- changed = true;
123
+ if (!__linkIndicesSet.has(linkIndices[i])) {
124
+ __linkIndicesSet.add(linkIndices[i]);
125
+ if (apply(int_1.Interval.ofSingleton(linkIndices[i])))
126
+ changed = true;
127
+ }
124
128
  }
125
129
  });
126
130
  };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2019-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2019-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ * Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
4
  *
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
6
6
  */
@@ -43,7 +43,7 @@ function createMolecularSurfaceMesh(ctx, unit, structure, theme, props, mesh) {
43
43
  mesh_1.Mesh.transform(surface, transform);
44
44
  if (ctx.webgl && !ctx.webgl.isWebGL2)
45
45
  mesh_1.Mesh.uniformTriangleGroup(surface);
46
- sphere = geometry_1.Sphere3D.expand((0, geometry_1.Sphere3D)(), unit.boundary.sphere, props.probeRadius + (0, common_1.getUnitExtraRadius)(unit));
46
+ sphere = geometry_1.Sphere3D.expand((0, geometry_1.Sphere3D)(), unit.boundary.sphere, (0, common_1.getUnitExtraRadius)(unit));
47
47
  surface.setBoundingSphere(sphere);
48
48
  surface.meta.resolution = resolution;
49
49
  return [2 /*return*/, surface];
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */