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
@@ -14,6 +14,7 @@ import { StructureSourceControls } from './structure/source';
14
14
  import { VolumeStreamingControls, VolumeSourceControls } from './structure/volume';
15
15
  import { PluginConfig } from '../mol-plugin/config';
16
16
  import { StructureSuperpositionControls } from './structure/superposition';
17
+ import { StructureQuickStylesControls } from './structure/quick-styles';
17
18
  var TrajectoryViewportControls = /** @class */ (function (_super) {
18
19
  __extends(TrajectoryViewportControls, _super);
19
20
  function TrajectoryViewportControls() {
@@ -290,7 +291,7 @@ var DefaultStructureTools = /** @class */ (function (_super) {
290
291
  return _super !== null && _super.apply(this, arguments) || this;
291
292
  }
292
293
  DefaultStructureTools.prototype.render = function () {
293
- return _jsxs(_Fragment, { children: [_jsxs("div", __assign({ className: 'msp-section-header' }, { children: [_jsx(Icon, { svg: BuildSvg }, void 0), "Structure Tools"] }), void 0), _jsx(StructureSourceControls, {}, void 0), _jsx(StructureMeasurementsControls, {}, void 0), _jsx(StructureSuperpositionControls, {}, void 0), _jsx(StructureComponentControls, {}, void 0), this.plugin.config.get(PluginConfig.VolumeStreaming.Enabled) && _jsx(VolumeStreamingControls, {}, void 0), _jsx(VolumeSourceControls, {}, void 0), _jsx(CustomStructureControls, {}, void 0)] }, void 0);
294
+ return _jsxs(_Fragment, { children: [_jsxs("div", __assign({ className: 'msp-section-header' }, { children: [_jsx(Icon, { svg: BuildSvg }, void 0), "Structure Tools"] }), void 0), _jsx(StructureSourceControls, {}, void 0), _jsx(StructureMeasurementsControls, {}, void 0), _jsx(StructureSuperpositionControls, {}, void 0), _jsx(StructureQuickStylesControls, {}, void 0), _jsx(StructureComponentControls, {}, void 0), this.plugin.config.get(PluginConfig.VolumeStreaming.Enabled) && _jsx(VolumeStreamingControls, {}, void 0), _jsx(VolumeSourceControls, {}, void 0), _jsx(CustomStructureControls, {}, void 0)] }, void 0);
294
295
  };
295
296
  return DefaultStructureTools;
296
297
  }(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,128 @@
1
+ import { __assign, __awaiter, __extends, __generator } from "tslib";
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ /**
4
+ * Copyright (c) 2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
5
+ *
6
+ * @author Alexander Rose <alexander.rose@weirdbyte.de>
7
+ */
8
+ import { PresetStructureRepresentations } from '../../mol-plugin-state/builder/structure/representation-preset';
9
+ import { Color } from '../../mol-util/color';
10
+ import { CollapsableControls, PurePluginUIComponent } from '../base';
11
+ import { Button } from '../controls/common';
12
+ import { MagicWandSvg } from '../controls/icons';
13
+ import { ParamDefinition as PD } from '../../mol-util/param-definition';
14
+ import { PostprocessingParams } from '../../mol-canvas3d/passes/postprocessing';
15
+ import { PluginConfig } from '../../mol-plugin/config';
16
+ import { StructureComponentManager } from '../../mol-plugin-state/manager/structure/component';
17
+ var StructureQuickStylesControls = /** @class */ (function (_super) {
18
+ __extends(StructureQuickStylesControls, _super);
19
+ function StructureQuickStylesControls() {
20
+ return _super !== null && _super.apply(this, arguments) || this;
21
+ }
22
+ StructureQuickStylesControls.prototype.defaultState = function () {
23
+ return {
24
+ isCollapsed: false,
25
+ header: 'Quick Styles',
26
+ brand: { accent: 'gray', svg: MagicWandSvg }
27
+ };
28
+ };
29
+ StructureQuickStylesControls.prototype.renderControls = function () {
30
+ return _jsx(_Fragment, { children: _jsx(QuickStyles, {}, void 0) }, void 0);
31
+ };
32
+ return StructureQuickStylesControls;
33
+ }(CollapsableControls));
34
+ export { StructureQuickStylesControls };
35
+ var QuickStyles = /** @class */ (function (_super) {
36
+ __extends(QuickStyles, _super);
37
+ function QuickStyles() {
38
+ return _super !== null && _super.apply(this, arguments) || this;
39
+ }
40
+ QuickStyles.prototype.default = function () {
41
+ return __awaiter(this, void 0, void 0, function () {
42
+ var structures, preset, provider, p;
43
+ return __generator(this, function (_a) {
44
+ switch (_a.label) {
45
+ case 0:
46
+ structures = this.plugin.managers.structure.hierarchy.selection.structures;
47
+ preset = this.plugin.config.get(PluginConfig.Structure.DefaultRepresentationPreset) || PresetStructureRepresentations.auto.id;
48
+ provider = this.plugin.builders.structure.representation.resolveProvider(preset);
49
+ return [4 /*yield*/, this.plugin.managers.structure.component.applyPreset(structures, provider)];
50
+ case 1:
51
+ _a.sent();
52
+ this.plugin.managers.structure.component.setOptions(PD.getDefaultValues(StructureComponentManager.OptionsParams));
53
+ if (this.plugin.canvas3d) {
54
+ p = PD.getDefaultValues(PostprocessingParams);
55
+ this.plugin.canvas3d.setProps({
56
+ postprocessing: { outline: p.outline, occlusion: p.occlusion }
57
+ });
58
+ }
59
+ return [2 /*return*/];
60
+ }
61
+ });
62
+ });
63
+ };
64
+ QuickStyles.prototype.illustrative = function () {
65
+ return __awaiter(this, void 0, void 0, function () {
66
+ var structures;
67
+ return __generator(this, function (_a) {
68
+ switch (_a.label) {
69
+ case 0:
70
+ structures = this.plugin.managers.structure.hierarchy.selection.structures;
71
+ return [4 /*yield*/, this.plugin.managers.structure.component.applyPreset(structures, PresetStructureRepresentations.illustrative)];
72
+ case 1:
73
+ _a.sent();
74
+ if (this.plugin.canvas3d) {
75
+ this.plugin.canvas3d.setProps({
76
+ postprocessing: {
77
+ outline: {
78
+ name: 'on',
79
+ params: { scale: 1, color: Color(0x000000), threshold: 0.25 }
80
+ },
81
+ occlusion: {
82
+ name: 'on',
83
+ params: { bias: 0.9, blurKernelSize: 15, radius: 5, samples: 32 }
84
+ },
85
+ }
86
+ });
87
+ }
88
+ return [2 /*return*/];
89
+ }
90
+ });
91
+ });
92
+ };
93
+ QuickStyles.prototype.stylized = function () {
94
+ return __awaiter(this, void 0, void 0, function () {
95
+ var pp;
96
+ return __generator(this, function (_a) {
97
+ this.plugin.managers.structure.component.setOptions(__assign(__assign({}, this.plugin.managers.structure.component.state.options), { ignoreLight: true }));
98
+ if (this.plugin.canvas3d) {
99
+ pp = this.plugin.canvas3d.props.postprocessing;
100
+ this.plugin.canvas3d.setProps({
101
+ postprocessing: {
102
+ outline: {
103
+ name: 'on',
104
+ params: pp.outline.name === 'on'
105
+ ? pp.outline.params
106
+ : { scale: 1, color: Color(0x000000), threshold: 0.33 }
107
+ },
108
+ occlusion: {
109
+ name: 'on',
110
+ params: pp.occlusion.name === 'on'
111
+ ? pp.occlusion.params
112
+ : { bias: 0.9, blurKernelSize: 15, radius: 5, samples: 32 }
113
+ },
114
+ }
115
+ });
116
+ }
117
+ return [2 /*return*/];
118
+ });
119
+ });
120
+ };
121
+ QuickStyles.prototype.render = function () {
122
+ var _this = this;
123
+ return _jsxs("div", __assign({ className: 'msp-flex-row' }, { children: [_jsx(Button, __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), _jsx(Button, __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), _jsx(Button, __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);
124
+ };
125
+ return QuickStyles;
126
+ }(PurePluginUIComponent));
127
+ export { QuickStyles };
128
+ //# sourceMappingURL=quick-styles.js.map
@@ -159,8 +159,8 @@ var SuperpositionControls = /** @class */ (function (_super) {
159
159
  _i++;
160
160
  return [3 /*break*/, 1];
161
161
  case 4:
162
- rmsd /= transforms.length - 1;
163
- this.plugin.log.info("Superposed ".concat(input.length, " structures with avg. RMSD ").concat(rmsd.toFixed(2), "."));
162
+ rmsd /= Math.max(transforms.length - 1, 1);
163
+ this.plugin.log.info("Superposed ".concat(input.length, " structures with avg. RMSD ").concat(rmsd.toFixed(2), " \u00C5."));
164
164
  return [4 /*yield*/, new Promise(function (res) { return requestAnimationFrame(res); })];
165
165
  case 5:
166
166
  _a.sent();
@@ -65,16 +65,16 @@ var VolumeStreamingControls = /** @class */ (function (_super) {
65
65
  return !!((_b = (_a = InitVolumeStreaming.definition).isApplicable) === null || _b === void 0 ? void 0 : _b.call(_a, pivot.obj, pivot.transform, this.plugin));
66
66
  };
67
67
  VolumeStreamingControls.prototype.renderEnable = function () {
68
- var _a;
68
+ var _a, _b;
69
69
  var pivot = this.pivot;
70
70
  if (!pivot.cell.parent)
71
71
  return null;
72
72
  var root = StateSelection.findTagInSubtree(pivot.cell.parent.tree, this.pivot.cell.transform.ref, VolumeStreaming.RootTag);
73
73
  var rootCell = root && pivot.cell.parent.cells.get(root);
74
74
  var simpleApply = rootCell && rootCell.status === 'error'
75
- ? { header: 'Error enabling', icon: ErrorSvg, title: rootCell.errorText }
76
- : rootCell && ((_a = rootCell.obj) === null || _a === void 0 ? void 0 : _a.data.entries.length) === 0
77
- ? { header: 'Error enabling', icon: ErrorSvg, title: 'No entry for streaming found' }
75
+ ? { header: !!rootCell.errorText && ((_a = rootCell.errorText) === null || _a === void 0 ? void 0 : _a.includes('404')) ? 'No Density Data Available' : 'Error Enabling', icon: ErrorSvg, title: rootCell.errorText }
76
+ : rootCell && ((_b = rootCell.obj) === null || _b === void 0 ? void 0 : _b.data.entries.length) === 0
77
+ ? { header: 'Error Enabling', icon: ErrorSvg, title: 'No Entry for Streaming Found' }
78
78
  : { header: 'Enable', icon: CheckSvg, title: 'Enable' };
79
79
  return _jsx(ApplyActionControl, { state: pivot.cell.parent, action: InitVolumeStreaming, initiallyCollapsed: true, nodeRef: pivot.cell.transform.ref, simpleApply: simpleApply }, void 0);
80
80
  };
@@ -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>
@@ -1,7 +1,7 @@
1
1
  import { __assign, __awaiter, __extends, __generator } from "tslib";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  /**
4
- * Copyright (c) 2019-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
+ * Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
5
5
  *
6
6
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
7
7
  * @author David Sehnal <david.sehnal@gmail.com>
@@ -44,10 +44,7 @@ var LayoutOptions = {
44
44
  'left': 'Left Panel'
45
45
  };
46
46
  var SimpleSettingsParams = {
47
- spin: PD.Group({
48
- spin: Canvas3DParams.trackball.params.spin,
49
- speed: Canvas3DParams.trackball.params.spinSpeed
50
- }, { pivot: 'spin' }),
47
+ animate: Canvas3DParams.trackball.params.animate,
51
48
  camera: Canvas3DParams.camera,
52
49
  background: PD.Group({
53
50
  color: PD.Color(Color(0xFCFBF9), { label: 'Background', description: 'Custom background color' }),
@@ -97,7 +94,7 @@ var SimpleSettingsMapping = ParamMapping({
97
94
  var renderer = canvas.renderer;
98
95
  return {
99
96
  layout: props.layout,
100
- spin: { spin: !!canvas.trackball.spin, speed: canvas.trackball.spinSpeed },
97
+ animate: canvas.trackball.animate,
101
98
  camera: canvas.camera,
102
99
  background: {
103
100
  color: renderer.backgroundColor,
@@ -113,8 +110,7 @@ var SimpleSettingsMapping = ParamMapping({
113
110
  },
114
111
  update: function (s, props) {
115
112
  var canvas = props.canvas;
116
- canvas.trackball.spin = s.spin.spin;
117
- canvas.trackball.spinSpeed = s.spin.speed;
113
+ canvas.trackball.animate = s.animate;
118
114
  canvas.camera = s.camera;
119
115
  canvas.transparentBackground = s.background.transparent;
120
116
  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,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>
@@ -9,9 +9,9 @@ import { ParamDefinition as PD } from '../../../mol-util/param-definition';
9
9
  import { ColorNames } from '../../../mol-util/color/names';
10
10
  import { Text } from '../../../mol-geo/geometry/text/text';
11
11
  export var MeasurementRepresentationCommonTextParams = {
12
- customText: PD.Text('', { label: 'Text', description: 'Override the label with custom value.' }),
12
+ customText: PD.Text('', { label: 'Text', description: 'Override the label with custom value.', isEssential: true }),
13
13
  textColor: PD.Color(ColorNames.black, { isEssential: true }),
14
- textSize: PD.Numeric(0.5, { min: 0.1, max: 5, step: 0.1 }, { isEssential: true }),
14
+ textSize: PD.Numeric(0.5, { min: 0.1, max: 10, step: 0.1 }, { isEssential: true }),
15
15
  };
16
16
  export var LociLabelTextParams = __assign(__assign(__assign({}, Text.Params), MeasurementRepresentationCommonTextParams), { borderWidth: PD.Numeric(0.2, { min: 0, max: 0.5, step: 0.01 }) });
17
17
  //# 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,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
  */
@@ -24,7 +24,7 @@ var CartoonVisuals = {
24
24
  'nucleotide-ring': function (ctx, getParams) { return UnitsRepresentation('Nucleotide ring mesh', ctx, getParams, NucleotideRingVisual); },
25
25
  'direction-wedge': function (ctx, getParams) { return UnitsRepresentation('Polymer direction wedge', ctx, getParams, PolymerDirectionVisual); }
26
26
  };
27
- export var CartoonParams = __assign(__assign(__assign(__assign(__assign(__assign({}, PolymerTraceParams), PolymerGapParams), NucleotideBlockParams), NucleotideRingParams), PolymerDirectionParams), { sizeFactor: PD.Numeric(0.2, { min: 0, max: 10, step: 0.01 }), visuals: PD.MultiSelect(['polymer-trace', 'polymer-gap', 'nucleotide-block'], PD.objectToOptions(CartoonVisuals)), bumpFrequency: PD.Numeric(2, { min: 0, max: 10, step: 0.1 }, BaseGeometry.ShadingCategory) });
27
+ export var CartoonParams = __assign(__assign(__assign(__assign(__assign(__assign({}, PolymerTraceParams), PolymerGapParams), NucleotideBlockParams), NucleotideRingParams), PolymerDirectionParams), { sizeFactor: PD.Numeric(0.2, { min: 0, max: 10, step: 0.01 }), visuals: PD.MultiSelect(['polymer-trace', 'polymer-gap', 'nucleotide-ring'], PD.objectToOptions(CartoonVisuals)), bumpFrequency: PD.Numeric(2, { min: 0, max: 10, step: 0.1 }, BaseGeometry.ShadingCategory) });
28
28
  export function getCartoonParams(ctx, structure) {
29
29
  var params = PD.clone(CartoonParams);
30
30
  var hasNucleotides = false;
@@ -37,7 +37,7 @@ export function getCartoonParams(ctx, structure) {
37
37
  });
38
38
  params.visuals.defaultValue = ['polymer-trace'];
39
39
  if (hasNucleotides)
40
- params.visuals.defaultValue.push('nucleotide-block');
40
+ params.visuals.defaultValue.push('nucleotide-ring');
41
41
  if (hasGaps)
42
42
  params.visuals.defaultValue.push('polymer-gap');
43
43
  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,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
  */
@@ -77,6 +77,7 @@ function getLinkLoci(pickingId, structure, id) {
77
77
  }
78
78
  return EmptyLoci;
79
79
  }
80
+ var __linkIndicesSet = new Set();
80
81
  function eachCarbohydrateLink(loci, structure, apply) {
81
82
  var changed = false;
82
83
  if (!StructureElement.Loci.is(loci))
@@ -87,12 +88,15 @@ function eachCarbohydrateLink(loci, structure, apply) {
87
88
  var _loop_1 = function (unit, indices) {
88
89
  if (!Unit.isAtomic(unit))
89
90
  return "continue";
91
+ __linkIndicesSet.clear();
90
92
  OrderedSet.forEach(indices, function (v) {
91
- // TODO avoid duplicate calls to apply
92
93
  var linkIndices = getLinkIndices(unit, unit.elements[v]);
93
94
  for (var i = 0, il = linkIndices.length; i < il; ++i) {
94
- if (apply(Interval.ofSingleton(linkIndices[i])))
95
- changed = true;
95
+ if (!__linkIndicesSet.has(linkIndices[i])) {
96
+ __linkIndicesSet.add(linkIndices[i]);
97
+ if (apply(Interval.ofSingleton(linkIndices[i])))
98
+ changed = true;
99
+ }
96
100
  }
97
101
  });
98
102
  };
@@ -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,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
  */
@@ -22,8 +22,8 @@ import { EmptyLoci } from '../../../mol-model/loci';
22
22
  import { getAltResidueLociFromId } from './util/common';
23
23
  import { BaseGeometry } from '../../../mol-geo/geometry/base';
24
24
  var t = Mat4.identity();
25
- var sVec = Vec3.zero();
26
- var pd = Vec3.zero();
25
+ var sVec = Vec3();
26
+ var pd = Vec3();
27
27
  var SideFactor = 2 * 0.806; // 0.806 == Math.cos(Math.PI / 4)
28
28
  var box = Box();
29
29
  var perforatedBox = PerforatedBox();
@@ -182,6 +182,7 @@ function getCarbohydrateLoci(pickingId, structure, id) {
182
182
  }
183
183
  return EmptyLoci;
184
184
  }
185
+ var __elementIndicesSet = new Set();
185
186
  /** For each carbohydrate (usually a monosaccharide) when all its residue's elements are in a loci. */
186
187
  function eachCarbohydrate(loci, structure, apply) {
187
188
  var getElementIndices = structure.carbohydrates.getElementIndices;
@@ -193,12 +194,15 @@ function eachCarbohydrate(loci, structure, apply) {
193
194
  var _loop_1 = function (unit, indices) {
194
195
  if (!Unit.isAtomic(unit))
195
196
  return "continue";
197
+ __elementIndicesSet.clear();
196
198
  OrderedSet.forEach(indices, function (v) {
197
- // TODO avoid duplicate calls to apply
198
199
  var elementIndices = getElementIndices(unit, unit.elements[v]);
199
200
  for (var i = 0, il = elementIndices.length; i < il; ++i) {
200
- if (apply(Interval.ofSingleton(elementIndices[i] * 2)))
201
- changed = true;
201
+ if (!__elementIndicesSet.has(elementIndices[i])) {
202
+ __elementIndicesSet.add(elementIndices[i]);
203
+ if (apply(Interval.ofSingleton(elementIndices[i] * 2)))
204
+ changed = true;
205
+ }
202
206
  }
203
207
  });
204
208
  };
@@ -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,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
  */
@@ -101,6 +101,7 @@ function getTerminalLinkLoci(pickingId, structure, id) {
101
101
  }
102
102
  return EmptyLoci;
103
103
  }
104
+ var __linkIndicesSet = new Set();
104
105
  function eachTerminalLink(loci, structure, apply) {
105
106
  var changed = false;
106
107
  if (!StructureElement.Loci.is(loci))
@@ -111,12 +112,15 @@ function eachTerminalLink(loci, structure, apply) {
111
112
  var _loop_1 = function (unit, indices) {
112
113
  if (!Unit.isAtomic(unit))
113
114
  return "continue";
115
+ __linkIndicesSet.clear();
114
116
  OrderedSet.forEach(indices, function (v) {
115
- // TODO avoid duplicate calls to apply
116
117
  var linkIndices = getTerminalLinkIndices(unit, unit.elements[v]);
117
118
  for (var i = 0, il = linkIndices.length; i < il; ++i) {
118
- if (apply(Interval.ofSingleton(linkIndices[i])))
119
- changed = true;
119
+ if (!__linkIndicesSet.has(linkIndices[i])) {
120
+ __linkIndicesSet.add(linkIndices[i]);
121
+ if (apply(Interval.ofSingleton(linkIndices[i])))
122
+ changed = true;
123
+ }
120
124
  }
121
125
  });
122
126
  };
@@ -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,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
  */
@@ -40,7 +40,7 @@ function createMolecularSurfaceMesh(ctx, unit, structure, theme, props, mesh) {
40
40
  Mesh.transform(surface, transform);
41
41
  if (ctx.webgl && !ctx.webgl.isWebGL2)
42
42
  Mesh.uniformTriangleGroup(surface);
43
- sphere = Sphere3D.expand(Sphere3D(), unit.boundary.sphere, props.probeRadius + getUnitExtraRadius(unit));
43
+ sphere = Sphere3D.expand(Sphere3D(), unit.boundary.sphere, getUnitExtraRadius(unit));
44
44
  surface.setBoundingSphere(sphere);
45
45
  surface.meta.resolution = resolution;
46
46
  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
  */
@@ -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
  */
@@ -206,6 +206,7 @@ export function getInterBondLoci(pickingId, structure, id) {
206
206
  }
207
207
  return EmptyLoci;
208
208
  }
209
+ var __unitMap = new Map();
209
210
  export function eachInterBond(loci, structure, apply, isMarking) {
210
211
  var changed = false;
211
212
  if (Bond.isLoci(loci)) {
@@ -225,17 +226,16 @@ export function eachInterBond(loci, structure, apply, isMarking) {
225
226
  return false;
226
227
  if (isMarking && loci.elements.length === 1)
227
228
  return false; // only a single unit
228
- var map_1 = new Map();
229
229
  for (var _b = 0, _c = loci.elements; _b < _c.length; _b++) {
230
230
  var e = _c[_b];
231
- map_1.set(e.unit.id, e.indices);
231
+ __unitMap.set(e.unit.id, e.indices);
232
232
  }
233
233
  var _loop_2 = function (e) {
234
234
  var unit = e.unit;
235
235
  if (!Unit.isAtomic(unit))
236
236
  return "continue";
237
237
  structure.interUnitBonds.getConnectedUnits(unit.id).forEach(function (b) {
238
- var otherLociIndices = map_1.get(b.unitB);
238
+ var otherLociIndices = __unitMap.get(b.unitB);
239
239
  if (!isMarking || otherLociIndices) {
240
240
  OrderedSet.forEach(e.indices, function (v) {
241
241
  if (!b.connectedIndices.includes(v))
@@ -255,6 +255,7 @@ export function eachInterBond(loci, structure, apply, isMarking) {
255
255
  var e = _e[_d];
256
256
  _loop_2(e);
257
257
  }
258
+ __unitMap.clear();
258
259
  }
259
260
  return changed;
260
261
  }
@@ -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
  */
@@ -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
  */
@@ -49,6 +49,7 @@ var Visual;
49
49
  var array = tMarker.ref.value.array;
50
50
  var currentStatus = markerStatus.ref.value;
51
51
  if (!isEveryLoci(loci)) {
52
+ // assume that all interval are non-overlapping
52
53
  var intervalSize_1 = 0;
53
54
  lociApply(loci, function (interval) {
54
55
  intervalSize_1 += Interval.size(interval);
@@ -54,7 +54,12 @@ var Transform;
54
54
  if (!!s === !!t)
55
55
  continue;
56
56
  changed = true;
57
- a[k] = s;
57
+ if (s !== void 0) {
58
+ a[k] = s;
59
+ }
60
+ else {
61
+ delete a[k];
62
+ }
58
63
  }
59
64
  for (var _b = 0, _c = Object.keys(a); _b < _c.length; _b++) {
60
65
  var k = _c[_b];
@@ -62,7 +67,12 @@ var Transform;
62
67
  if (!!s === !!t)
63
68
  continue;
64
69
  changed = true;
65
- a[k] = s;
70
+ if (s !== void 0) {
71
+ a[k] = s;
72
+ }
73
+ else {
74
+ delete a[k];
75
+ }
66
76
  }
67
77
  return changed;
68
78
  }