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,23 +1,42 @@
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
  */
6
- import { __assign } from "tslib";
7
6
  import { Color } from '../../mol-util/color';
8
7
  import { StructureElement, Unit, Bond } from '../../mol-model/structure';
9
8
  import { ParamDefinition as PD } from '../../mol-util/param-definition';
10
9
  import { ChainIdColorTheme, ChainIdColorThemeParams } from './chain-id';
10
+ import { UniformColorTheme, UniformColorThemeParams } from './uniform';
11
+ import { assertUnreachable } from '../../mol-util/type-helpers';
12
+ import { EntityIdColorTheme, EntityIdColorThemeParams } from './entity-id';
13
+ import { MoleculeTypeColorTheme, MoleculeTypeColorThemeParams } from './molecule-type';
14
+ import { EntitySourceColorTheme, EntitySourceColorThemeParams } from './entity-source';
11
15
  var DefaultIllustrativeColor = Color(0xEEEEEE);
12
- var Description = "Assigns an illustrative color that gives every chain a unique color with lighter carbons (inspired by David Goodsell's Molecule of the Month style).";
13
- export var IllustrativeColorThemeParams = __assign(__assign({}, ChainIdColorThemeParams), { carbonLightness: PD.Numeric(0.8, { min: -6, max: 6, step: 0.1 }) });
16
+ var Description = "Assigns an illustrative color that gives every chain a color based on the choosen style but with lighter carbons (inspired by David Goodsell's Molecule of the Month style).";
17
+ export var IllustrativeColorThemeParams = {
18
+ style: PD.MappedStatic('entity-id', {
19
+ uniform: PD.Group(UniformColorThemeParams),
20
+ 'chain-id': PD.Group(ChainIdColorThemeParams),
21
+ 'entity-id': PD.Group(EntityIdColorThemeParams),
22
+ 'entity-source': PD.Group(EntitySourceColorThemeParams),
23
+ 'molecule-type': PD.Group(MoleculeTypeColorThemeParams),
24
+ }),
25
+ carbonLightness: PD.Numeric(0.8, { min: -6, max: 6, step: 0.1 })
26
+ };
14
27
  export function getIllustrativeColorThemeParams(ctx) {
15
- return IllustrativeColorThemeParams; // TODO return copy
28
+ var params = PD.clone(IllustrativeColorThemeParams);
29
+ return params;
16
30
  }
17
31
  export function IllustrativeColorTheme(ctx, props) {
18
- var _a = ChainIdColorTheme(ctx, props), chainIdColor = _a.color, legend = _a.legend;
32
+ var _a = props.style.name === 'uniform' ? UniformColorTheme(ctx, props.style.params) :
33
+ props.style.name === 'chain-id' ? ChainIdColorTheme(ctx, props.style.params) :
34
+ props.style.name === 'entity-id' ? EntityIdColorTheme(ctx, props.style.params) :
35
+ props.style.name === 'entity-source' ? EntitySourceColorTheme(ctx, props.style.params) :
36
+ props.style.name === 'molecule-type' ? MoleculeTypeColorTheme(ctx, props.style.params) :
37
+ assertUnreachable(props.style), styleColor = _a.color, legend = _a.legend;
19
38
  function illustrativeColor(location, typeSymbol) {
20
- var baseColor = chainIdColor(location, false);
39
+ var baseColor = styleColor(location, false);
21
40
  return typeSymbol === 'C' ? Color.lighten(baseColor, props.carbonLightness) : baseColor;
22
41
  }
23
42
  function color(location) {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2019 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
  */
@@ -21,11 +21,29 @@ export declare type MoleculeTypeColors = typeof MoleculeTypeColors;
21
21
  export declare const MoleculeTypeColorThemeParams: {
22
22
  saturation: PD.Numeric;
23
23
  lightness: PD.Numeric;
24
+ colors: PD.Mapped<PD.NamedParams<PD.Normalize<unknown>, "default"> | PD.NamedParams<PD.Normalize<{
25
+ water: Color;
26
+ ion: Color;
27
+ protein: Color;
28
+ RNA: Color;
29
+ DNA: Color;
30
+ PNA: Color;
31
+ saccharide: Color;
32
+ }>, "custom">>;
24
33
  };
25
34
  export declare type MoleculeTypeColorThemeParams = typeof MoleculeTypeColorThemeParams;
26
35
  export declare function getMoleculeTypeColorThemeParams(ctx: ThemeDataContext): {
27
36
  saturation: PD.Numeric;
28
37
  lightness: PD.Numeric;
38
+ colors: PD.Mapped<PD.NamedParams<PD.Normalize<unknown>, "default"> | PD.NamedParams<PD.Normalize<{
39
+ water: Color;
40
+ ion: Color;
41
+ protein: Color;
42
+ RNA: Color;
43
+ DNA: Color;
44
+ PNA: Color;
45
+ saccharide: Color;
46
+ }>, "custom">>;
29
47
  };
30
48
  export declare function moleculeTypeColor(colorMap: MoleculeTypeColors, unit: Unit, element: ElementIndex): Color;
31
49
  export declare function MoleculeTypeColorTheme(ctx: ThemeDataContext, props: PD.Values<MoleculeTypeColorThemeParams>): ColorTheme<MoleculeTypeColorThemeParams>;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2019 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
  */
@@ -9,6 +9,7 @@ import { getElementMoleculeType } from '../../mol-model/structure/util';
9
9
  import { ParamDefinition as PD } from '../../mol-util/param-definition';
10
10
  import { TableLegend } from '../../mol-util/legend';
11
11
  import { getAdjustedColorMap } from '../../mol-util/color/color';
12
+ import { getColorMapParams } from '../../mol-util/color/params';
12
13
  export var MoleculeTypeColors = ColorMap({
13
14
  water: 0x386cb0,
14
15
  ion: 0xf0027f,
@@ -22,7 +23,11 @@ var DefaultMoleculeTypeColor = Color(0xffff99);
22
23
  var Description = 'Assigns a color based on the molecule type of a residue.';
23
24
  export var MoleculeTypeColorThemeParams = {
24
25
  saturation: PD.Numeric(0, { min: -6, max: 6, step: 0.1 }),
25
- lightness: PD.Numeric(0, { min: -6, max: 6, step: 0.1 })
26
+ lightness: PD.Numeric(0, { min: -6, max: 6, step: 0.1 }),
27
+ colors: PD.MappedStatic('default', {
28
+ 'default': PD.EmptyGroup(),
29
+ 'custom': PD.Group(getColorMapParams(MoleculeTypeColors))
30
+ })
26
31
  };
27
32
  export function getMoleculeTypeColorThemeParams(ctx) {
28
33
  return MoleculeTypeColorThemeParams; // TODO return copy
@@ -41,7 +46,7 @@ export function moleculeTypeColor(colorMap, unit, element) {
41
46
  return DefaultMoleculeTypeColor;
42
47
  }
43
48
  export function MoleculeTypeColorTheme(ctx, props) {
44
- var colorMap = getAdjustedColorMap(MoleculeTypeColors, props.saturation, props.lightness);
49
+ var colorMap = getAdjustedColorMap(props.colors.name === 'default' ? MoleculeTypeColors : props.colors.params, props.saturation, props.lightness);
45
50
  function color(location) {
46
51
  if (StructureElement.Location.is(location)) {
47
52
  return moleculeTypeColor(colorMap, location.unit, location.element);
@@ -57,8 +62,8 @@ export function MoleculeTypeColorTheme(ctx, props) {
57
62
  color: color,
58
63
  props: props,
59
64
  description: Description,
60
- legend: TableLegend(Object.keys(MoleculeTypeColors).map(function (name) {
61
- return [name, MoleculeTypeColors[name]];
65
+ legend: TableLegend(Object.keys(colorMap).map(function (name) {
66
+ return [name, colorMap[name]];
62
67
  }).concat([['Other/unknown', DefaultMoleculeTypeColor]]))
63
68
  };
64
69
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2019 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,11 +49,87 @@ export declare type ResidueNameColors = typeof ResidueNameColors;
49
49
  export declare const ResidueNameColorThemeParams: {
50
50
  saturation: PD.Numeric;
51
51
  lightness: PD.Numeric;
52
+ colors: PD.Mapped<PD.NamedParams<PD.Normalize<unknown>, "default"> | PD.NamedParams<PD.Normalize<{
53
+ ALA: Color;
54
+ ARG: Color;
55
+ ASN: Color;
56
+ ASP: Color;
57
+ CYS: Color;
58
+ GLN: Color;
59
+ GLU: Color;
60
+ GLY: Color;
61
+ HIS: Color;
62
+ ILE: Color;
63
+ LEU: Color;
64
+ LYS: Color;
65
+ MET: Color;
66
+ PHE: Color;
67
+ PRO: Color;
68
+ SER: Color;
69
+ THR: Color;
70
+ TRP: Color;
71
+ TYR: Color;
72
+ VAL: Color;
73
+ A: Color;
74
+ G: Color;
75
+ I: Color;
76
+ C: Color;
77
+ T: Color;
78
+ U: Color;
79
+ DA: Color;
80
+ DG: Color;
81
+ DI: Color;
82
+ DC: Color;
83
+ DT: Color;
84
+ DU: Color;
85
+ APN: Color;
86
+ GPN: Color;
87
+ CPN: Color;
88
+ TPN: Color;
89
+ }>, "custom">>;
52
90
  };
53
91
  export declare type ResidueNameColorThemeParams = typeof ResidueNameColorThemeParams;
54
92
  export declare function getResidueNameColorThemeParams(ctx: ThemeDataContext): {
55
93
  saturation: PD.Numeric;
56
94
  lightness: PD.Numeric;
95
+ colors: PD.Mapped<PD.NamedParams<PD.Normalize<unknown>, "default"> | PD.NamedParams<PD.Normalize<{
96
+ ALA: Color;
97
+ ARG: Color;
98
+ ASN: Color;
99
+ ASP: Color;
100
+ CYS: Color;
101
+ GLN: Color;
102
+ GLU: Color;
103
+ GLY: Color;
104
+ HIS: Color;
105
+ ILE: Color;
106
+ LEU: Color;
107
+ LYS: Color;
108
+ MET: Color;
109
+ PHE: Color;
110
+ PRO: Color;
111
+ SER: Color;
112
+ THR: Color;
113
+ TRP: Color;
114
+ TYR: Color;
115
+ VAL: Color;
116
+ A: Color;
117
+ G: Color;
118
+ I: Color;
119
+ C: Color;
120
+ T: Color;
121
+ U: Color;
122
+ DA: Color;
123
+ DG: Color;
124
+ DI: Color;
125
+ DC: Color;
126
+ DT: Color;
127
+ DU: Color;
128
+ APN: Color;
129
+ GPN: Color;
130
+ CPN: Color;
131
+ TPN: Color;
132
+ }>, "custom">>;
57
133
  };
58
134
  export declare function residueNameColor(colorMap: ResidueNameColors, residueName: string): Color;
59
135
  export declare function ResidueNameColorTheme(ctx: ThemeDataContext, props: PD.Values<ResidueNameColorThemeParams>): ColorTheme<ResidueNameColorThemeParams>;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2019 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
  */
@@ -8,6 +8,7 @@ import { StructureElement, Unit, Bond } from '../../mol-model/structure';
8
8
  import { ParamDefinition as PD } from '../../mol-util/param-definition';
9
9
  import { TableLegend } from '../../mol-util/legend';
10
10
  import { getAdjustedColorMap } from '../../mol-util/color/color';
11
+ import { getColorMapParams } from '../../mol-util/color/params';
11
12
  // protein colors from Jmol http://jmol.sourceforge.net/jscolors/
12
13
  export var ResidueNameColors = ColorMap({
13
14
  // standard amino acids
@@ -55,7 +56,11 @@ var DefaultResidueNameColor = Color(0xFF00FF);
55
56
  var Description = 'Assigns a color to every residue according to its name.';
56
57
  export var ResidueNameColorThemeParams = {
57
58
  saturation: PD.Numeric(0, { min: -6, max: 6, step: 0.1 }),
58
- lightness: PD.Numeric(1, { min: -6, max: 6, step: 0.1 })
59
+ lightness: PD.Numeric(1, { min: -6, max: 6, step: 0.1 }),
60
+ colors: PD.MappedStatic('default', {
61
+ 'default': PD.EmptyGroup(),
62
+ 'custom': PD.Group(getColorMapParams(ResidueNameColors))
63
+ })
59
64
  };
60
65
  export function getResidueNameColorThemeParams(ctx) {
61
66
  return ResidueNameColorThemeParams; // TODO return copy
@@ -77,7 +82,7 @@ export function residueNameColor(colorMap, residueName) {
77
82
  return c === undefined ? DefaultResidueNameColor : c;
78
83
  }
79
84
  export function ResidueNameColorTheme(ctx, props) {
80
- var colorMap = getAdjustedColorMap(ResidueNameColors, props.saturation, props.lightness);
85
+ var colorMap = getAdjustedColorMap(props.colors.name === 'default' ? ResidueNameColors : props.colors.params, props.saturation, props.lightness);
81
86
  function color(location) {
82
87
  if (StructureElement.Location.is(location)) {
83
88
  if (Unit.isAtomic(location.unit)) {
@@ -110,8 +115,8 @@ export function ResidueNameColorTheme(ctx, props) {
110
115
  color: color,
111
116
  props: props,
112
117
  description: Description,
113
- legend: TableLegend(Object.keys(ResidueNameColors).map(function (name) {
114
- return [name, ResidueNameColors[name]];
118
+ legend: TableLegend(Object.keys(colorMap).map(function (name) {
119
+ return [name, colorMap[name]];
115
120
  }).concat([['Unknown', DefaultResidueNameColor]]))
116
121
  };
117
122
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2019 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
  */
@@ -26,11 +26,37 @@ export declare type SecondaryStructureColors = typeof SecondaryStructureColors;
26
26
  export declare const SecondaryStructureColorThemeParams: {
27
27
  saturation: PD.Numeric;
28
28
  lightness: PD.Numeric;
29
+ colors: PD.Mapped<PD.NamedParams<PD.Normalize<unknown>, "default"> | PD.NamedParams<PD.Normalize<{
30
+ alphaHelix: Color;
31
+ threeTenHelix: Color;
32
+ piHelix: Color;
33
+ betaTurn: Color;
34
+ betaStrand: Color;
35
+ coil: Color;
36
+ bend: Color;
37
+ turn: Color;
38
+ dna: Color;
39
+ rna: Color;
40
+ carbohydrate: Color;
41
+ }>, "custom">>;
29
42
  };
30
43
  export declare type SecondaryStructureColorThemeParams = typeof SecondaryStructureColorThemeParams;
31
44
  export declare function getSecondaryStructureColorThemeParams(ctx: ThemeDataContext): {
32
45
  saturation: PD.Numeric;
33
46
  lightness: PD.Numeric;
47
+ colors: PD.Mapped<PD.NamedParams<PD.Normalize<unknown>, "default"> | PD.NamedParams<PD.Normalize<{
48
+ alphaHelix: Color;
49
+ threeTenHelix: Color;
50
+ piHelix: Color;
51
+ betaTurn: Color;
52
+ betaStrand: Color;
53
+ coil: Color;
54
+ bend: Color;
55
+ turn: Color;
56
+ dna: Color;
57
+ rna: Color;
58
+ carbohydrate: Color;
59
+ }>, "custom">>;
34
60
  };
35
61
  export declare function secondaryStructureColor(colorMap: SecondaryStructureColors, unit: Unit, element: ElementIndex, computedSecondaryStructure?: SecondaryStructureValue): Color;
36
62
  export declare function SecondaryStructureColorTheme(ctx: ThemeDataContext, props: PD.Values<SecondaryStructureColorThemeParams>): ColorTheme<SecondaryStructureColorThemeParams>;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2019 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
  */
@@ -11,6 +11,7 @@ import { ParamDefinition as PD } from '../../mol-util/param-definition';
11
11
  import { TableLegend } from '../../mol-util/legend';
12
12
  import { SecondaryStructureProvider } from '../../mol-model-props/computed/secondary-structure';
13
13
  import { getAdjustedColorMap } from '../../mol-util/color/color';
14
+ import { getColorMapParams } from '../../mol-util/color/params';
14
15
  import { hash2 } from '../../mol-data/util';
15
16
  // from Jmol http://jmol.sourceforge.net/jscolors/ (shapely)
16
17
  var SecondaryStructureColors = ColorMap({
@@ -30,7 +31,11 @@ var DefaultSecondaryStructureColor = Color(0x808080);
30
31
  var Description = 'Assigns a color based on the type of secondary structure and basic molecule type.';
31
32
  export var SecondaryStructureColorThemeParams = {
32
33
  saturation: PD.Numeric(-1, { min: -6, max: 6, step: 0.1 }),
33
- lightness: PD.Numeric(0, { min: -6, max: 6, step: 0.1 })
34
+ lightness: PD.Numeric(0, { min: -6, max: 6, step: 0.1 }),
35
+ colors: PD.MappedStatic('default', {
36
+ 'default': PD.EmptyGroup(),
37
+ 'custom': PD.Group(getColorMapParams(SecondaryStructureColors))
38
+ })
34
39
  };
35
40
  export function getSecondaryStructureColorThemeParams(ctx) {
36
41
  return SecondaryStructureColorThemeParams; // TODO return copy
@@ -80,7 +85,7 @@ export function secondaryStructureColor(colorMap, unit, element, computedSeconda
80
85
  export function SecondaryStructureColorTheme(ctx, props) {
81
86
  var computedSecondaryStructure = ctx.structure && SecondaryStructureProvider.get(ctx.structure);
82
87
  var contextHash = computedSecondaryStructure ? hash2(computedSecondaryStructure.id, computedSecondaryStructure.version) : -1;
83
- var colorMap = getAdjustedColorMap(SecondaryStructureColors, props.saturation, props.lightness);
88
+ var colorMap = getAdjustedColorMap(props.colors.name === 'default' ? SecondaryStructureColors : props.colors.params, props.saturation, props.lightness);
84
89
  function color(location) {
85
90
  if (StructureElement.Location.is(location)) {
86
91
  return secondaryStructureColor(colorMap, location.unit, location.element, computedSecondaryStructure === null || computedSecondaryStructure === void 0 ? void 0 : computedSecondaryStructure.value);
@@ -98,8 +103,8 @@ export function SecondaryStructureColorTheme(ctx, props) {
98
103
  props: props,
99
104
  contextHash: contextHash,
100
105
  description: Description,
101
- legend: TableLegend(Object.keys(SecondaryStructureColors).map(function (name) {
102
- return [name, SecondaryStructureColors[name]];
106
+ legend: TableLegend(Object.keys(colorMap).map(function (name) {
107
+ return [name, colorMap[name]];
103
108
  }).concat([['Other', DefaultSecondaryStructureColor]]))
104
109
  };
105
110
  }
@@ -125,9 +125,152 @@ declare namespace ColorTheme {
125
125
  }>, "generate"> | PD.NamedParams<PD.Normalize<{
126
126
  list: any;
127
127
  }>, "colors">;
128
- }>, "operator-name">>;
128
+ }>, "operator-name"> | PD.NamedParams<PD.Normalize<{
129
+ palette: PD.NamedParams<PD.Normalize<{
130
+ maxCount: any;
131
+ hue: any;
132
+ chroma: any;
133
+ luminance: any;
134
+ clusteringStepCount: any;
135
+ minSampleCount: any;
136
+ }>, "generate"> | PD.NamedParams<PD.Normalize<{
137
+ list: any;
138
+ }>, "colors">;
139
+ }>, "entity-id"> | PD.NamedParams<PD.Normalize<{
140
+ palette: PD.NamedParams<PD.Normalize<{
141
+ maxCount: any;
142
+ hue: any;
143
+ chroma: any;
144
+ luminance: any;
145
+ clusteringStepCount: any;
146
+ minSampleCount: any;
147
+ }>, "generate"> | PD.NamedParams<PD.Normalize<{
148
+ list: any;
149
+ }>, "colors">;
150
+ }>, "entity-source">>;
129
151
  saturation: PD.Numeric;
130
152
  lightness: PD.Numeric;
153
+ colors: PD.Mapped<PD.NamedParams<PD.Normalize<unknown>, "default"> | PD.NamedParams<PD.Normalize<{
154
+ H: Color;
155
+ D: Color;
156
+ T: Color;
157
+ HE: Color;
158
+ LI: Color;
159
+ BE: Color;
160
+ B: Color;
161
+ C: Color;
162
+ N: Color;
163
+ O: Color;
164
+ F: Color;
165
+ NE: Color;
166
+ NA: Color;
167
+ MG: Color;
168
+ AL: Color;
169
+ SI: Color;
170
+ P: Color;
171
+ S: Color;
172
+ CL: Color;
173
+ AR: Color;
174
+ K: Color;
175
+ CA: Color;
176
+ SC: Color;
177
+ TI: Color;
178
+ V: Color;
179
+ CR: Color;
180
+ MN: Color;
181
+ FE: Color;
182
+ CO: Color;
183
+ NI: Color;
184
+ CU: Color;
185
+ ZN: Color;
186
+ GA: Color;
187
+ GE: Color;
188
+ AS: Color;
189
+ SE: Color;
190
+ BR: Color;
191
+ KR: Color;
192
+ RB: Color;
193
+ SR: Color;
194
+ Y: Color;
195
+ ZR: Color;
196
+ NB: Color;
197
+ MO: Color;
198
+ TC: Color;
199
+ RU: Color;
200
+ RH: Color;
201
+ PD: Color;
202
+ AG: Color;
203
+ CD: Color;
204
+ IN: Color;
205
+ SN: Color;
206
+ SB: Color;
207
+ TE: Color;
208
+ I: Color;
209
+ XE: Color;
210
+ CS: Color;
211
+ BA: Color;
212
+ LA: Color;
213
+ CE: Color;
214
+ PR: Color;
215
+ ND: Color;
216
+ PM: Color;
217
+ SM: Color;
218
+ EU: Color;
219
+ GD: Color;
220
+ TB: Color;
221
+ DY: Color;
222
+ HO: Color;
223
+ ER: Color;
224
+ TM: Color;
225
+ YB: Color;
226
+ LU: Color;
227
+ HF: Color;
228
+ TA: Color;
229
+ W: Color;
230
+ RE: Color;
231
+ OS: Color;
232
+ IR: Color;
233
+ PT: Color;
234
+ AU: Color;
235
+ HG: Color;
236
+ TL: Color;
237
+ PB: Color;
238
+ BI: Color;
239
+ PO: Color;
240
+ AT: Color;
241
+ RN: Color;
242
+ FR: Color;
243
+ RA: Color;
244
+ AC: Color;
245
+ TH: Color;
246
+ PA: Color;
247
+ U: Color;
248
+ NP: Color;
249
+ PU: Color;
250
+ AM: Color;
251
+ CM: Color;
252
+ BK: Color;
253
+ CF: Color;
254
+ ES: Color;
255
+ FM: Color;
256
+ MD: Color;
257
+ NO: Color;
258
+ LR: Color;
259
+ RF: Color;
260
+ DB: Color;
261
+ SG: Color;
262
+ BH: Color;
263
+ HS: Color;
264
+ MT: Color;
265
+ DS: Color;
266
+ RG: Color;
267
+ CN: Color;
268
+ UUT: Color;
269
+ FL: Color;
270
+ UUP: Color;
271
+ LV: Color;
272
+ UUH: Color;
273
+ }>, "custom">>;
131
274
  }, "element-symbol">;
132
275
  'entity-id': Provider<{
133
276
  palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
@@ -164,21 +307,56 @@ declare namespace ColorTheme {
164
307
  scale: PD.Select<"DGwif" | "DGwoct" | "Oct-IF">;
165
308
  }, "hydrophobicity">;
166
309
  illustrative: Provider<{
310
+ style: PD.Mapped<PD.NamedParams<PD.Normalize<{
311
+ palette: PD.NamedParams<PD.Normalize<{
312
+ maxCount: any;
313
+ hue: any;
314
+ chroma: any;
315
+ luminance: any;
316
+ clusteringStepCount: any;
317
+ minSampleCount: any;
318
+ }>, "generate"> | PD.NamedParams<PD.Normalize<{
319
+ list: any;
320
+ }>, "colors">;
321
+ asymId: "label" | "auth";
322
+ }>, "chain-id"> | PD.NamedParams<PD.Normalize<{
323
+ palette: PD.NamedParams<PD.Normalize<{
324
+ maxCount: any;
325
+ hue: any;
326
+ chroma: any;
327
+ luminance: any;
328
+ clusteringStepCount: any;
329
+ minSampleCount: any;
330
+ }>, "generate"> | PD.NamedParams<PD.Normalize<{
331
+ list: any;
332
+ }>, "colors">;
333
+ }>, "entity-id"> | PD.NamedParams<PD.Normalize<{
334
+ palette: PD.NamedParams<PD.Normalize<{
335
+ maxCount: any;
336
+ hue: any;
337
+ chroma: any;
338
+ luminance: any;
339
+ clusteringStepCount: any;
340
+ minSampleCount: any;
341
+ }>, "generate"> | PD.NamedParams<PD.Normalize<{
342
+ list: any;
343
+ }>, "colors">;
344
+ }>, "entity-source"> | PD.NamedParams<PD.Normalize<{
345
+ value: Color;
346
+ }>, "uniform"> | PD.NamedParams<PD.Normalize<{
347
+ saturation: number;
348
+ lightness: number;
349
+ colors: PD.NamedParams<PD.Normalize<unknown>, "default"> | PD.NamedParams<PD.Normalize<{
350
+ water: any;
351
+ ion: any;
352
+ protein: any;
353
+ RNA: any;
354
+ DNA: any;
355
+ PNA: any;
356
+ saccharide: any;
357
+ }>, "custom">;
358
+ }>, "molecule-type">>;
167
359
  carbonLightness: PD.Numeric;
168
- palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
169
- maxCount: number;
170
- hue: [number, number];
171
- chroma: [number, number];
172
- luminance: [number, number];
173
- clusteringStepCount: number;
174
- minSampleCount: number;
175
- }>, "generate"> | PD.NamedParams<PD.Normalize<{
176
- list: {
177
- kind: "set" | "interpolate";
178
- colors: import("../mol-util/color/color").ColorListEntry[];
179
- };
180
- }>, "colors">>;
181
- asymId: PD.Select<"label" | "auth">;
182
360
  }, "illustrative">;
183
361
  'model-index': Provider<{
184
362
  palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
@@ -198,6 +376,15 @@ declare namespace ColorTheme {
198
376
  'molecule-type': Provider<{
199
377
  saturation: PD.Numeric;
200
378
  lightness: PD.Numeric;
379
+ colors: PD.Mapped<PD.NamedParams<PD.Normalize<unknown>, "default"> | PD.NamedParams<PD.Normalize<{
380
+ water: Color;
381
+ ion: Color;
382
+ protein: Color;
383
+ RNA: Color;
384
+ DNA: Color;
385
+ PNA: Color;
386
+ saccharide: Color;
387
+ }>, "custom">>;
201
388
  }, "molecule-type">;
202
389
  occupancy: Provider<{
203
390
  domain: PD.Interval;
@@ -270,10 +457,61 @@ declare namespace ColorTheme {
270
457
  'residue-name': Provider<{
271
458
  saturation: PD.Numeric;
272
459
  lightness: PD.Numeric;
460
+ colors: PD.Mapped<PD.NamedParams<PD.Normalize<unknown>, "default"> | PD.NamedParams<PD.Normalize<{
461
+ ALA: Color;
462
+ ARG: Color;
463
+ ASN: Color;
464
+ ASP: Color;
465
+ CYS: Color;
466
+ GLN: Color;
467
+ GLU: Color;
468
+ GLY: Color;
469
+ HIS: Color;
470
+ ILE: Color;
471
+ LEU: Color;
472
+ LYS: Color;
473
+ MET: Color;
474
+ PHE: Color;
475
+ PRO: Color;
476
+ SER: Color;
477
+ THR: Color;
478
+ TRP: Color;
479
+ TYR: Color;
480
+ VAL: Color;
481
+ A: Color;
482
+ G: Color;
483
+ I: Color;
484
+ C: Color;
485
+ T: Color;
486
+ U: Color;
487
+ DA: Color;
488
+ DG: Color;
489
+ DI: Color;
490
+ DC: Color;
491
+ DT: Color;
492
+ DU: Color;
493
+ APN: Color;
494
+ GPN: Color;
495
+ CPN: Color;
496
+ TPN: Color;
497
+ }>, "custom">>;
273
498
  }, "residue-name">;
274
499
  'secondary-structure': Provider<{
275
500
  saturation: PD.Numeric;
276
501
  lightness: PD.Numeric;
502
+ colors: PD.Mapped<PD.NamedParams<PD.Normalize<unknown>, "default"> | PD.NamedParams<PD.Normalize<{
503
+ alphaHelix: Color;
504
+ threeTenHelix: Color;
505
+ piHelix: Color;
506
+ betaTurn: Color;
507
+ betaStrand: Color;
508
+ coil: Color;
509
+ bend: Color;
510
+ turn: Color;
511
+ dna: Color;
512
+ rna: Color;
513
+ carbohydrate: Color;
514
+ }>, "custom">>;
277
515
  }, "secondary-structure">;
278
516
  'sequence-id': Provider<{
279
517
  list: PD.ColorList;
@@ -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
  */