molstar 3.0.0-dev.8 → 3.0.2

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 (316) 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/viewer/app.d.ts +230 -0
  5. package/lib/apps/viewer/app.js +528 -0
  6. package/lib/apps/viewer/index.d.ts +2 -225
  7. package/lib/apps/viewer/index.html +2 -2
  8. package/lib/apps/viewer/index.js +2 -509
  9. package/lib/commonjs/apps/viewer/app.d.ts +230 -0
  10. package/lib/commonjs/apps/viewer/app.js +534 -0
  11. package/lib/commonjs/apps/viewer/index.d.ts +2 -225
  12. package/lib/commonjs/apps/viewer/index.js +2 -512
  13. package/lib/commonjs/examples/basic-wrapper/index.js +7 -3
  14. package/lib/commonjs/examples/proteopedia-wrapper/index.js +7 -1
  15. package/lib/commonjs/extensions/anvil/representation.js +1 -1
  16. package/lib/commonjs/extensions/model-export/export.d.ts +9 -0
  17. package/lib/commonjs/extensions/model-export/export.js +129 -0
  18. package/lib/commonjs/extensions/model-export/index.d.ts +7 -0
  19. package/lib/commonjs/extensions/model-export/index.js +36 -0
  20. package/lib/commonjs/extensions/model-export/ui.d.ts +11 -0
  21. package/lib/commonjs/extensions/model-export/ui.js +77 -0
  22. package/lib/commonjs/extensions/mp4-export/encoder.js +1 -1
  23. package/lib/commonjs/extensions/rcsb/assembly-symmetry/behavior.d.ts +2 -2
  24. package/lib/commonjs/extensions/rcsb/graphql/types.d.ts +2 -2
  25. package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +12 -4
  26. package/lib/commonjs/mol-canvas3d/canvas3d.js +2 -2
  27. package/lib/commonjs/mol-canvas3d/controls/trackball.d.ts +9 -4
  28. package/lib/commonjs/mol-canvas3d/controls/trackball.js +50 -11
  29. package/lib/commonjs/mol-canvas3d/helper/interaction-events.js +1 -1
  30. package/lib/commonjs/mol-canvas3d/passes/draw.d.ts +1 -1
  31. package/lib/commonjs/mol-canvas3d/passes/draw.js +3 -3
  32. package/lib/commonjs/mol-gl/renderer.d.ts +2 -2
  33. package/lib/commonjs/mol-gl/renderer.js +3 -3
  34. package/lib/commonjs/mol-io/reader/cif/schema/bird.d.ts +1 -1
  35. package/lib/commonjs/mol-io/reader/cif/schema/bird.js +1 -1
  36. package/lib/commonjs/mol-io/reader/cif/schema/ccd.d.ts +1 -1
  37. package/lib/commonjs/mol-io/reader/cif/schema/ccd.js +1 -1
  38. package/lib/commonjs/mol-io/reader/cif/schema/mmcif.d.ts +2 -2
  39. package/lib/commonjs/mol-io/reader/cif/schema/mmcif.js +1 -1
  40. package/lib/commonjs/mol-io/reader/mol/parser.d.ts +23 -1
  41. package/lib/commonjs/mol-io/reader/mol/parser.js +116 -4
  42. package/lib/commonjs/mol-io/reader/mol2/parser.d.ts +1 -1
  43. package/lib/commonjs/mol-io/reader/mol2/parser.js +33 -3
  44. package/lib/commonjs/mol-io/reader/mol2/schema.d.ts +12 -1
  45. package/lib/commonjs/mol-io/reader/mol2/schema.js +1 -1
  46. package/lib/commonjs/mol-io/reader/sdf/parser-v3-util.d.ts +6 -0
  47. package/lib/commonjs/mol-io/reader/sdf/parser-v3-util.js +9 -0
  48. package/lib/commonjs/mol-io/reader/sdf/parser.d.ts +3 -1
  49. package/lib/commonjs/mol-io/reader/sdf/parser.js +11 -2
  50. package/lib/commonjs/mol-io/writer/cif/encoder/binary.js +9 -2
  51. package/lib/commonjs/mol-math/geometry/primitives/sphere3d.d.ts +1 -1
  52. package/lib/commonjs/mol-math/geometry/primitives/sphere3d.js +17 -4
  53. package/lib/commonjs/mol-math/geometry/symmetry-operator.d.ts +1 -1
  54. package/lib/commonjs/mol-math/geometry/symmetry-operator.js +10 -4
  55. package/lib/commonjs/mol-model/structure/export/mmcif.d.ts +1 -1
  56. package/lib/commonjs/mol-model/structure/export/mmcif.js +8 -5
  57. package/lib/commonjs/mol-model/structure/model/properties/coarse/hierarchy.d.ts +1 -1
  58. package/lib/commonjs/mol-model/structure/model/properties/coarse/hierarchy.js +24 -2
  59. package/lib/commonjs/mol-model/structure/model/properties/common.d.ts +1 -1
  60. package/lib/commonjs/mol-model/structure/structure/element/loci.d.ts +1 -1
  61. package/lib/commonjs/mol-model/structure/structure/element/loci.js +4 -2
  62. package/lib/commonjs/mol-model/structure/structure/element/stats.js +8 -0
  63. package/lib/commonjs/mol-model/structure/structure/properties.d.ts +1 -0
  64. package/lib/commonjs/mol-model/structure/structure/properties.js +2 -1
  65. package/lib/commonjs/mol-model/structure/structure/symmetry.js +1 -3
  66. package/lib/commonjs/mol-model/structure/structure/unit/bonds/common.d.ts +2 -1
  67. package/lib/commonjs/mol-model/structure/structure/unit/bonds/common.js +11 -2
  68. package/lib/commonjs/mol-model/structure/structure/unit/bonds/inter-compute.d.ts +1 -1
  69. package/lib/commonjs/mol-model/structure/structure/unit/bonds/inter-compute.js +20 -10
  70. package/lib/commonjs/mol-model/structure/structure/unit/bonds/intra-compute.d.ts +1 -1
  71. package/lib/commonjs/mol-model/structure/structure/unit/bonds/intra-compute.js +21 -11
  72. package/lib/commonjs/mol-model/structure/structure/util/superposition-db-mapping.js +10 -5
  73. package/lib/commonjs/mol-model/volume/volume.d.ts +7 -0
  74. package/lib/commonjs/mol-model/volume/volume.js +18 -0
  75. package/lib/commonjs/mol-model-formats/structure/basic/atomic.d.ts +2 -2
  76. package/lib/commonjs/mol-model-formats/structure/basic/atomic.js +6 -6
  77. package/lib/commonjs/mol-model-formats/structure/basic/coarse.d.ts +1 -1
  78. package/lib/commonjs/mol-model-formats/structure/basic/coarse.js +3 -3
  79. package/lib/commonjs/mol-model-formats/structure/basic/entities.d.ts +2 -1
  80. package/lib/commonjs/mol-model-formats/structure/basic/entities.js +28 -24
  81. package/lib/commonjs/mol-model-formats/structure/basic/parser.js +17 -8
  82. package/lib/commonjs/mol-model-formats/structure/basic/properties.d.ts +6 -1
  83. package/lib/commonjs/mol-model-formats/structure/basic/properties.js +12 -22
  84. package/lib/commonjs/mol-model-formats/structure/mol.d.ts +2 -1
  85. package/lib/commonjs/mol-model-formats/structure/mol.js +19 -5
  86. package/lib/commonjs/mol-model-formats/structure/mol2.d.ts +1 -1
  87. package/lib/commonjs/mol-model-formats/structure/mol2.js +37 -7
  88. package/lib/commonjs/mol-model-formats/structure/property/bonds/index-pair.d.ts +18 -1
  89. package/lib/commonjs/mol-model-formats/structure/property/bonds/index-pair.js +18 -5
  90. package/lib/commonjs/mol-model-props/common/custom-property.d.ts +1 -1
  91. package/lib/commonjs/mol-model-props/computed/interactions/common.d.ts +1 -1
  92. package/lib/commonjs/mol-model-props/computed/interactions/common.js +16 -24
  93. package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +1 -1
  94. package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.js +44 -18
  95. package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +1 -1
  96. package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.js +38 -13
  97. package/lib/commonjs/mol-model-props/sequence/best-database-mapping.js +15 -15
  98. package/lib/commonjs/mol-plugin/animation-loop.d.ts +2 -0
  99. package/lib/commonjs/mol-plugin/animation-loop.js +1 -1
  100. package/lib/commonjs/mol-plugin/behavior/dynamic/representation.d.ts +1 -1
  101. package/lib/commonjs/mol-plugin/behavior/dynamic/representation.js +11 -6
  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/config.d.ts +1 -1
  105. package/lib/commonjs/mol-plugin/spec.d.ts +1 -1
  106. package/lib/commonjs/mol-plugin/spec.js +3 -1
  107. package/lib/commonjs/mol-plugin-state/actions/file.d.ts +3 -2
  108. package/lib/commonjs/mol-plugin-state/actions/file.js +67 -31
  109. package/lib/commonjs/mol-plugin-state/actions/structure.d.ts +1 -0
  110. package/lib/commonjs/mol-plugin-state/actions/structure.js +41 -8
  111. package/lib/commonjs/mol-plugin-state/actions/volume.d.ts +1 -1
  112. package/lib/commonjs/mol-plugin-state/actions/volume.js +3 -3
  113. package/lib/commonjs/mol-plugin-state/animation/built-in/camera-rock.d.ts +16 -0
  114. package/lib/commonjs/mol-plugin-state/animation/built-in/camera-rock.js +62 -0
  115. package/lib/commonjs/mol-plugin-state/animation/built-in/camera-spin.d.ts +1 -1
  116. package/lib/commonjs/mol-plugin-state/animation/built-in/camera-spin.js +9 -8
  117. package/lib/commonjs/mol-plugin-state/animation/model.d.ts +4 -0
  118. package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +6 -6
  119. package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy.d.ts +1 -1
  120. package/lib/commonjs/mol-plugin-state/builder/structure/representation-preset.d.ts +172 -6
  121. package/lib/commonjs/mol-plugin-state/builder/structure/representation-preset.js +74 -2
  122. package/lib/commonjs/mol-plugin-state/formats/volume.js +1 -11
  123. package/lib/commonjs/mol-plugin-state/manager/animation.d.ts +5 -1
  124. package/lib/commonjs/mol-plugin-state/manager/animation.js +5 -5
  125. package/lib/commonjs/mol-plugin-ui/structure/superposition.js +2 -2
  126. package/lib/commonjs/mol-plugin-ui/viewport/simple-settings.d.ts +1 -1
  127. package/lib/commonjs/mol-plugin-ui/viewport/simple-settings.js +4 -8
  128. package/lib/commonjs/mol-repr/shape/loci/common.d.ts +1 -1
  129. package/lib/commonjs/mol-repr/shape/loci/common.js +3 -3
  130. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +1 -1
  131. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.js +8 -4
  132. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +1 -1
  133. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.js +10 -6
  134. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +1 -1
  135. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.js +8 -4
  136. package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -1
  137. package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.js +2 -2
  138. package/lib/commonjs/mol-repr/structure/visual/util/bond.d.ts +1 -1
  139. package/lib/commonjs/mol-repr/structure/visual/util/bond.js +5 -4
  140. package/lib/commonjs/mol-repr/visual.d.ts +1 -1
  141. package/lib/commonjs/mol-repr/visual.js +2 -1
  142. package/lib/commonjs/mol-state/transform.js +12 -2
  143. package/lib/commonjs/mol-state/tree/immutable.d.ts +18 -0
  144. package/lib/commonjs/mol-state/tree/transient.d.ts +3 -4
  145. package/lib/commonjs/mol-theme/color/element-symbol.d.ts +289 -3
  146. package/lib/commonjs/mol-theme/color/element-symbol.js +25 -15
  147. package/lib/commonjs/mol-theme/color/entity-id.d.ts +1 -1
  148. package/lib/commonjs/mol-theme/color/entity-id.js +29 -5
  149. package/lib/commonjs/mol-theme/color/illustrative.d.ts +100 -29
  150. package/lib/commonjs/mol-theme/color/illustrative.js +26 -7
  151. package/lib/commonjs/mol-theme/color/molecule-type.d.ts +19 -1
  152. package/lib/commonjs/mol-theme/color/molecule-type.js +10 -5
  153. package/lib/commonjs/mol-theme/color/residue-name.d.ts +77 -1
  154. package/lib/commonjs/mol-theme/color/residue-name.js +10 -5
  155. package/lib/commonjs/mol-theme/color/secondary-structure.d.ts +27 -1
  156. package/lib/commonjs/mol-theme/color/secondary-structure.js +10 -5
  157. package/lib/commonjs/mol-theme/color.d.ts +253 -15
  158. package/lib/commonjs/mol-util/color/color.d.ts +1 -1
  159. package/lib/commonjs/mol-util/color/color.js +1 -1
  160. package/lib/commonjs/mol-util/color/params.d.ts +10 -0
  161. package/lib/commonjs/mol-util/color/params.js +19 -0
  162. package/lib/commonjs/servers/volume/config.js +3 -3
  163. package/lib/commonjs/servers/volume/query.js +1 -1
  164. package/lib/examples/basic-wrapper/index.js +7 -3
  165. package/lib/examples/proteopedia-wrapper/index.js +7 -1
  166. package/lib/extensions/anvil/representation.js +1 -1
  167. package/lib/extensions/model-export/export.d.ts +9 -0
  168. package/lib/extensions/model-export/export.js +125 -0
  169. package/lib/extensions/model-export/index.d.ts +7 -0
  170. package/lib/extensions/model-export/index.js +33 -0
  171. package/lib/extensions/model-export/ui.d.ts +11 -0
  172. package/lib/extensions/model-export/ui.js +74 -0
  173. package/lib/extensions/mp4-export/encoder.js +1 -1
  174. package/lib/extensions/rcsb/assembly-symmetry/behavior.d.ts +2 -2
  175. package/lib/extensions/rcsb/graphql/types.d.ts +2 -2
  176. package/lib/mol-canvas3d/canvas3d.d.ts +12 -4
  177. package/lib/mol-canvas3d/canvas3d.js +2 -2
  178. package/lib/mol-canvas3d/controls/trackball.d.ts +9 -4
  179. package/lib/mol-canvas3d/controls/trackball.js +51 -12
  180. package/lib/mol-canvas3d/helper/interaction-events.js +1 -1
  181. package/lib/mol-canvas3d/passes/draw.d.ts +1 -1
  182. package/lib/mol-canvas3d/passes/draw.js +3 -3
  183. package/lib/mol-gl/renderer.d.ts +2 -2
  184. package/lib/mol-gl/renderer.js +3 -3
  185. package/lib/mol-io/reader/cif/schema/bird.d.ts +1 -1
  186. package/lib/mol-io/reader/cif/schema/bird.js +1 -1
  187. package/lib/mol-io/reader/cif/schema/ccd.d.ts +1 -1
  188. package/lib/mol-io/reader/cif/schema/ccd.js +1 -1
  189. package/lib/mol-io/reader/cif/schema/mmcif.d.ts +2 -2
  190. package/lib/mol-io/reader/cif/schema/mmcif.js +1 -1
  191. package/lib/mol-io/reader/mol/parser.d.ts +23 -1
  192. package/lib/mol-io/reader/mol/parser.js +112 -3
  193. package/lib/mol-io/reader/mol2/parser.d.ts +1 -1
  194. package/lib/mol-io/reader/mol2/parser.js +33 -3
  195. package/lib/mol-io/reader/mol2/schema.d.ts +12 -1
  196. package/lib/mol-io/reader/mol2/schema.js +1 -1
  197. package/lib/mol-io/reader/sdf/parser-v3-util.d.ts +6 -0
  198. package/lib/mol-io/reader/sdf/parser-v3-util.js +9 -0
  199. package/lib/mol-io/reader/sdf/parser.d.ts +3 -1
  200. package/lib/mol-io/reader/sdf/parser.js +12 -3
  201. package/lib/mol-io/writer/cif/encoder/binary.js +9 -2
  202. package/lib/mol-math/geometry/primitives/sphere3d.d.ts +1 -1
  203. package/lib/mol-math/geometry/primitives/sphere3d.js +17 -4
  204. package/lib/mol-math/geometry/symmetry-operator.d.ts +1 -1
  205. package/lib/mol-math/geometry/symmetry-operator.js +10 -4
  206. package/lib/mol-model/structure/export/mmcif.d.ts +1 -1
  207. package/lib/mol-model/structure/export/mmcif.js +8 -5
  208. package/lib/mol-model/structure/model/properties/coarse/hierarchy.d.ts +1 -1
  209. package/lib/mol-model/structure/model/properties/coarse/hierarchy.js +24 -2
  210. package/lib/mol-model/structure/model/properties/common.d.ts +1 -1
  211. package/lib/mol-model/structure/structure/element/loci.d.ts +1 -1
  212. package/lib/mol-model/structure/structure/element/loci.js +4 -2
  213. package/lib/mol-model/structure/structure/element/stats.js +8 -0
  214. package/lib/mol-model/structure/structure/properties.d.ts +1 -0
  215. package/lib/mol-model/structure/structure/properties.js +2 -1
  216. package/lib/mol-model/structure/structure/symmetry.js +1 -3
  217. package/lib/mol-model/structure/structure/unit/bonds/common.d.ts +2 -1
  218. package/lib/mol-model/structure/structure/unit/bonds/common.js +9 -1
  219. package/lib/mol-model/structure/structure/unit/bonds/inter-compute.d.ts +1 -1
  220. package/lib/mol-model/structure/structure/unit/bonds/inter-compute.js +21 -11
  221. package/lib/mol-model/structure/structure/unit/bonds/intra-compute.d.ts +1 -1
  222. package/lib/mol-model/structure/structure/unit/bonds/intra-compute.js +22 -12
  223. package/lib/mol-model/structure/structure/util/superposition-db-mapping.js +10 -5
  224. package/lib/mol-model/volume/volume.d.ts +7 -0
  225. package/lib/mol-model/volume/volume.js +18 -0
  226. package/lib/mol-model-formats/structure/basic/atomic.d.ts +2 -2
  227. package/lib/mol-model-formats/structure/basic/atomic.js +6 -6
  228. package/lib/mol-model-formats/structure/basic/coarse.d.ts +1 -1
  229. package/lib/mol-model-formats/structure/basic/coarse.js +3 -3
  230. package/lib/mol-model-formats/structure/basic/entities.d.ts +2 -1
  231. package/lib/mol-model-formats/structure/basic/entities.js +25 -22
  232. package/lib/mol-model-formats/structure/basic/parser.js +19 -10
  233. package/lib/mol-model-formats/structure/basic/properties.d.ts +6 -1
  234. package/lib/mol-model-formats/structure/basic/properties.js +12 -25
  235. package/lib/mol-model-formats/structure/mol.d.ts +2 -1
  236. package/lib/mol-model-formats/structure/mol.js +17 -3
  237. package/lib/mol-model-formats/structure/mol2.d.ts +1 -1
  238. package/lib/mol-model-formats/structure/mol2.js +37 -7
  239. package/lib/mol-model-formats/structure/property/bonds/index-pair.d.ts +18 -1
  240. package/lib/mol-model-formats/structure/property/bonds/index-pair.js +18 -5
  241. package/lib/mol-model-props/common/custom-property.d.ts +1 -1
  242. package/lib/mol-model-props/computed/interactions/common.d.ts +1 -1
  243. package/lib/mol-model-props/computed/interactions/common.js +16 -24
  244. package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +1 -1
  245. package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.js +44 -18
  246. package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +1 -1
  247. package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.js +38 -13
  248. package/lib/mol-model-props/sequence/best-database-mapping.js +15 -15
  249. package/lib/mol-plugin/animation-loop.d.ts +2 -0
  250. package/lib/mol-plugin/animation-loop.js +1 -1
  251. package/lib/mol-plugin/behavior/dynamic/representation.d.ts +1 -1
  252. package/lib/mol-plugin/behavior/dynamic/representation.js +11 -6
  253. package/lib/mol-plugin/behavior/static/representation.js +1 -1
  254. package/lib/mol-plugin/commands.d.ts +6 -2
  255. package/lib/mol-plugin/config.d.ts +1 -1
  256. package/lib/mol-plugin/spec.d.ts +1 -1
  257. package/lib/mol-plugin/spec.js +3 -1
  258. package/lib/mol-plugin/version.js +2 -2
  259. package/lib/mol-plugin-state/actions/file.d.ts +3 -2
  260. package/lib/mol-plugin-state/actions/file.js +67 -31
  261. package/lib/mol-plugin-state/actions/structure.d.ts +1 -0
  262. package/lib/mol-plugin-state/actions/structure.js +41 -8
  263. package/lib/mol-plugin-state/actions/volume.d.ts +1 -1
  264. package/lib/mol-plugin-state/actions/volume.js +3 -3
  265. package/lib/mol-plugin-state/animation/built-in/camera-rock.d.ts +16 -0
  266. package/lib/mol-plugin-state/animation/built-in/camera-rock.js +59 -0
  267. package/lib/mol-plugin-state/animation/built-in/camera-spin.d.ts +1 -1
  268. package/lib/mol-plugin-state/animation/built-in/camera-spin.js +9 -8
  269. package/lib/mol-plugin-state/animation/model.d.ts +4 -0
  270. package/lib/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +6 -6
  271. package/lib/mol-plugin-state/builder/structure/hierarchy.d.ts +1 -1
  272. package/lib/mol-plugin-state/builder/structure/representation-preset.d.ts +172 -6
  273. package/lib/mol-plugin-state/builder/structure/representation-preset.js +74 -2
  274. package/lib/mol-plugin-state/formats/volume.js +1 -11
  275. package/lib/mol-plugin-state/manager/animation.d.ts +5 -1
  276. package/lib/mol-plugin-state/manager/animation.js +5 -5
  277. package/lib/mol-plugin-ui/structure/superposition.js +2 -2
  278. package/lib/mol-plugin-ui/viewport/simple-settings.d.ts +1 -1
  279. package/lib/mol-plugin-ui/viewport/simple-settings.js +4 -8
  280. package/lib/mol-repr/shape/loci/common.d.ts +1 -1
  281. package/lib/mol-repr/shape/loci/common.js +3 -3
  282. package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +1 -1
  283. package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.js +8 -4
  284. package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +1 -1
  285. package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.js +10 -6
  286. package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +1 -1
  287. package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.js +8 -4
  288. package/lib/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -1
  289. package/lib/mol-repr/structure/visual/molecular-surface-mesh.js +2 -2
  290. package/lib/mol-repr/structure/visual/util/bond.d.ts +1 -1
  291. package/lib/mol-repr/structure/visual/util/bond.js +5 -4
  292. package/lib/mol-repr/visual.d.ts +1 -1
  293. package/lib/mol-repr/visual.js +2 -1
  294. package/lib/mol-state/transform.js +12 -2
  295. package/lib/mol-state/tree/immutable.d.ts +18 -0
  296. package/lib/mol-state/tree/transient.d.ts +3 -4
  297. package/lib/mol-theme/color/element-symbol.d.ts +289 -3
  298. package/lib/mol-theme/color/element-symbol.js +25 -15
  299. package/lib/mol-theme/color/entity-id.d.ts +1 -1
  300. package/lib/mol-theme/color/entity-id.js +29 -5
  301. package/lib/mol-theme/color/illustrative.d.ts +100 -29
  302. package/lib/mol-theme/color/illustrative.js +26 -7
  303. package/lib/mol-theme/color/molecule-type.d.ts +19 -1
  304. package/lib/mol-theme/color/molecule-type.js +10 -5
  305. package/lib/mol-theme/color/residue-name.d.ts +77 -1
  306. package/lib/mol-theme/color/residue-name.js +10 -5
  307. package/lib/mol-theme/color/secondary-structure.d.ts +27 -1
  308. package/lib/mol-theme/color/secondary-structure.js +10 -5
  309. package/lib/mol-theme/color.d.ts +253 -15
  310. package/lib/mol-util/color/color.d.ts +1 -1
  311. package/lib/mol-util/color/color.js +1 -1
  312. package/lib/mol-util/color/params.d.ts +10 -0
  313. package/lib/mol-util/color/params.js +15 -0
  314. package/lib/servers/volume/config.js +3 -3
  315. package/lib/servers/volume/query.js +1 -1
  316. package/package.json +36 -38
@@ -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,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2018-2019 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
4
  *
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
6
6
  */
@@ -12,6 +12,7 @@ var util_1 = require("../../mol-model/structure/util");
12
12
  var param_definition_1 = require("../../mol-util/param-definition");
13
13
  var legend_1 = require("../../mol-util/legend");
14
14
  var color_2 = require("../../mol-util/color/color");
15
+ var params_1 = require("../../mol-util/color/params");
15
16
  exports.MoleculeTypeColors = (0, color_1.ColorMap)({
16
17
  water: 0x386cb0,
17
18
  ion: 0xf0027f,
@@ -25,7 +26,11 @@ var DefaultMoleculeTypeColor = (0, color_1.Color)(0xffff99);
25
26
  var Description = 'Assigns a color based on the molecule type of a residue.';
26
27
  exports.MoleculeTypeColorThemeParams = {
27
28
  saturation: param_definition_1.ParamDefinition.Numeric(0, { min: -6, max: 6, step: 0.1 }),
28
- lightness: param_definition_1.ParamDefinition.Numeric(0, { min: -6, max: 6, step: 0.1 })
29
+ lightness: param_definition_1.ParamDefinition.Numeric(0, { min: -6, max: 6, step: 0.1 }),
30
+ colors: param_definition_1.ParamDefinition.MappedStatic('default', {
31
+ 'default': param_definition_1.ParamDefinition.EmptyGroup(),
32
+ 'custom': param_definition_1.ParamDefinition.Group((0, params_1.getColorMapParams)(exports.MoleculeTypeColors))
33
+ })
29
34
  };
30
35
  function getMoleculeTypeColorThemeParams(ctx) {
31
36
  return exports.MoleculeTypeColorThemeParams; // TODO return copy
@@ -46,7 +51,7 @@ function moleculeTypeColor(colorMap, unit, element) {
46
51
  }
47
52
  exports.moleculeTypeColor = moleculeTypeColor;
48
53
  function MoleculeTypeColorTheme(ctx, props) {
49
- var colorMap = (0, color_2.getAdjustedColorMap)(exports.MoleculeTypeColors, props.saturation, props.lightness);
54
+ var colorMap = (0, color_2.getAdjustedColorMap)(props.colors.name === 'default' ? exports.MoleculeTypeColors : props.colors.params, props.saturation, props.lightness);
50
55
  function color(location) {
51
56
  if (structure_1.StructureElement.Location.is(location)) {
52
57
  return moleculeTypeColor(colorMap, location.unit, location.element);
@@ -62,8 +67,8 @@ function MoleculeTypeColorTheme(ctx, props) {
62
67
  color: color,
63
68
  props: props,
64
69
  description: Description,
65
- legend: (0, legend_1.TableLegend)(Object.keys(exports.MoleculeTypeColors).map(function (name) {
66
- return [name, exports.MoleculeTypeColors[name]];
70
+ legend: (0, legend_1.TableLegend)(Object.keys(colorMap).map(function (name) {
71
+ return [name, colorMap[name]];
67
72
  }).concat([['Other/unknown', DefaultMoleculeTypeColor]]))
68
73
  };
69
74
  }
@@ -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,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2018-2019 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
4
  *
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
6
6
  */
@@ -11,6 +11,7 @@ var structure_1 = require("../../mol-model/structure");
11
11
  var param_definition_1 = require("../../mol-util/param-definition");
12
12
  var legend_1 = require("../../mol-util/legend");
13
13
  var color_2 = require("../../mol-util/color/color");
14
+ var params_1 = require("../../mol-util/color/params");
14
15
  // protein colors from Jmol http://jmol.sourceforge.net/jscolors/
15
16
  exports.ResidueNameColors = (0, color_1.ColorMap)({
16
17
  // standard amino acids
@@ -58,7 +59,11 @@ var DefaultResidueNameColor = (0, color_1.Color)(0xFF00FF);
58
59
  var Description = 'Assigns a color to every residue according to its name.';
59
60
  exports.ResidueNameColorThemeParams = {
60
61
  saturation: param_definition_1.ParamDefinition.Numeric(0, { min: -6, max: 6, step: 0.1 }),
61
- lightness: param_definition_1.ParamDefinition.Numeric(1, { min: -6, max: 6, step: 0.1 })
62
+ lightness: param_definition_1.ParamDefinition.Numeric(1, { min: -6, max: 6, step: 0.1 }),
63
+ colors: param_definition_1.ParamDefinition.MappedStatic('default', {
64
+ 'default': param_definition_1.ParamDefinition.EmptyGroup(),
65
+ 'custom': param_definition_1.ParamDefinition.Group((0, params_1.getColorMapParams)(exports.ResidueNameColors))
66
+ })
62
67
  };
63
68
  function getResidueNameColorThemeParams(ctx) {
64
69
  return exports.ResidueNameColorThemeParams; // TODO return copy
@@ -82,7 +87,7 @@ function residueNameColor(colorMap, residueName) {
82
87
  }
83
88
  exports.residueNameColor = residueNameColor;
84
89
  function ResidueNameColorTheme(ctx, props) {
85
- var colorMap = (0, color_2.getAdjustedColorMap)(exports.ResidueNameColors, props.saturation, props.lightness);
90
+ var colorMap = (0, color_2.getAdjustedColorMap)(props.colors.name === 'default' ? exports.ResidueNameColors : props.colors.params, props.saturation, props.lightness);
86
91
  function color(location) {
87
92
  if (structure_1.StructureElement.Location.is(location)) {
88
93
  if (structure_1.Unit.isAtomic(location.unit)) {
@@ -115,8 +120,8 @@ function ResidueNameColorTheme(ctx, props) {
115
120
  color: color,
116
121
  props: props,
117
122
  description: Description,
118
- legend: (0, legend_1.TableLegend)(Object.keys(exports.ResidueNameColors).map(function (name) {
119
- return [name, exports.ResidueNameColors[name]];
123
+ legend: (0, legend_1.TableLegend)(Object.keys(colorMap).map(function (name) {
124
+ return [name, colorMap[name]];
120
125
  }).concat([['Unknown', DefaultResidueNameColor]]))
121
126
  };
122
127
  }
@@ -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,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2018-2019 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
4
  *
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
6
6
  */
@@ -14,6 +14,7 @@ var param_definition_1 = require("../../mol-util/param-definition");
14
14
  var legend_1 = require("../../mol-util/legend");
15
15
  var secondary_structure_1 = require("../../mol-model-props/computed/secondary-structure");
16
16
  var color_2 = require("../../mol-util/color/color");
17
+ var params_1 = require("../../mol-util/color/params");
17
18
  var util_2 = require("../../mol-data/util");
18
19
  // from Jmol http://jmol.sourceforge.net/jscolors/ (shapely)
19
20
  var SecondaryStructureColors = (0, color_1.ColorMap)({
@@ -33,7 +34,11 @@ var DefaultSecondaryStructureColor = (0, color_1.Color)(0x808080);
33
34
  var Description = 'Assigns a color based on the type of secondary structure and basic molecule type.';
34
35
  exports.SecondaryStructureColorThemeParams = {
35
36
  saturation: param_definition_1.ParamDefinition.Numeric(-1, { min: -6, max: 6, step: 0.1 }),
36
- lightness: param_definition_1.ParamDefinition.Numeric(0, { min: -6, max: 6, step: 0.1 })
37
+ lightness: param_definition_1.ParamDefinition.Numeric(0, { min: -6, max: 6, step: 0.1 }),
38
+ colors: param_definition_1.ParamDefinition.MappedStatic('default', {
39
+ 'default': param_definition_1.ParamDefinition.EmptyGroup(),
40
+ 'custom': param_definition_1.ParamDefinition.Group((0, params_1.getColorMapParams)(SecondaryStructureColors))
41
+ })
37
42
  };
38
43
  function getSecondaryStructureColorThemeParams(ctx) {
39
44
  return exports.SecondaryStructureColorThemeParams; // TODO return copy
@@ -85,7 +90,7 @@ exports.secondaryStructureColor = secondaryStructureColor;
85
90
  function SecondaryStructureColorTheme(ctx, props) {
86
91
  var computedSecondaryStructure = ctx.structure && secondary_structure_1.SecondaryStructureProvider.get(ctx.structure);
87
92
  var contextHash = computedSecondaryStructure ? (0, util_2.hash2)(computedSecondaryStructure.id, computedSecondaryStructure.version) : -1;
88
- var colorMap = (0, color_2.getAdjustedColorMap)(SecondaryStructureColors, props.saturation, props.lightness);
93
+ var colorMap = (0, color_2.getAdjustedColorMap)(props.colors.name === 'default' ? SecondaryStructureColors : props.colors.params, props.saturation, props.lightness);
89
94
  function color(location) {
90
95
  if (structure_1.StructureElement.Location.is(location)) {
91
96
  return secondaryStructureColor(colorMap, location.unit, location.element, computedSecondaryStructure === null || computedSecondaryStructure === void 0 ? void 0 : computedSecondaryStructure.value);
@@ -103,8 +108,8 @@ function SecondaryStructureColorTheme(ctx, props) {
103
108
  props: props,
104
109
  contextHash: contextHash,
105
110
  description: Description,
106
- legend: (0, legend_1.TableLegend)(Object.keys(SecondaryStructureColors).map(function (name) {
107
- return [name, SecondaryStructureColors[name]];
111
+ legend: (0, legend_1.TableLegend)(Object.keys(colorMap).map(function (name) {
112
+ return [name, colorMap[name]];
108
113
  }).concat([['Other', DefaultSecondaryStructureColor]]))
109
114
  };
110
115
  }
@@ -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
  */
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2018-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
4
  *
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
6
6
  */
@@ -0,0 +1,10 @@
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
+ import { ParamDefinition as PD } from '../../mol-util/param-definition';
7
+ import { ColorMap } from './color';
8
+ export declare function getColorMapParams<T extends {
9
+ [k: string]: number;
10
+ }>(map: ColorMap<T>): { [k in keyof T]: PD.Color; };
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) 2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
+ *
5
+ * @author Alexander Rose <alexander.rose@weirdbyte.de>
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.getColorMapParams = void 0;
9
+ var param_definition_1 = require("../../mol-util/param-definition");
10
+ var object_1 = require("../object");
11
+ function getColorMapParams(map) {
12
+ var colors = {};
13
+ (0, object_1.objectForEach)(map, function (_, k) {
14
+ colors[k] = param_definition_1.ParamDefinition.Color(map[k]);
15
+ });
16
+ return colors;
17
+ }
18
+ exports.getColorMapParams = getColorMapParams;
19
+ //# sourceMappingURL=params.js.map