molstar 3.0.0-dev.9 → 3.0.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 (212) 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 +1 -1
  5. package/lib/apps/viewer/app.js +15 -5
  6. package/lib/apps/viewer/index.html +2 -2
  7. package/lib/commonjs/apps/viewer/app.d.ts +1 -1
  8. package/lib/commonjs/apps/viewer/app.js +15 -5
  9. package/lib/commonjs/examples/basic-wrapper/index.js +7 -3
  10. package/lib/commonjs/examples/proteopedia-wrapper/index.js +7 -1
  11. package/lib/commonjs/extensions/anvil/representation.js +1 -1
  12. package/lib/commonjs/extensions/model-export/export.d.ts +9 -0
  13. package/lib/commonjs/extensions/model-export/export.js +129 -0
  14. package/lib/commonjs/extensions/model-export/index.d.ts +7 -0
  15. package/lib/commonjs/extensions/model-export/index.js +36 -0
  16. package/lib/commonjs/extensions/model-export/ui.d.ts +11 -0
  17. package/lib/commonjs/extensions/model-export/ui.js +77 -0
  18. package/lib/commonjs/extensions/mp4-export/encoder.js +1 -1
  19. package/lib/commonjs/extensions/rcsb/assembly-symmetry/behavior.d.ts +2 -2
  20. package/lib/commonjs/extensions/rcsb/graphql/types.d.ts +2 -2
  21. package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +12 -4
  22. package/lib/commonjs/mol-canvas3d/canvas3d.js +1 -1
  23. package/lib/commonjs/mol-canvas3d/controls/trackball.d.ts +9 -4
  24. package/lib/commonjs/mol-canvas3d/controls/trackball.js +50 -11
  25. package/lib/commonjs/mol-io/reader/cif/schema/bird.d.ts +1 -1
  26. package/lib/commonjs/mol-io/reader/cif/schema/bird.js +1 -1
  27. package/lib/commonjs/mol-io/reader/cif/schema/ccd.d.ts +1 -1
  28. package/lib/commonjs/mol-io/reader/cif/schema/ccd.js +1 -1
  29. package/lib/commonjs/mol-io/reader/cif/schema/mmcif.d.ts +2 -2
  30. package/lib/commonjs/mol-io/reader/cif/schema/mmcif.js +1 -1
  31. package/lib/commonjs/mol-io/reader/mol/parser.d.ts +23 -1
  32. package/lib/commonjs/mol-io/reader/mol/parser.js +116 -4
  33. package/lib/commonjs/mol-io/reader/sdf/parser-v3-util.d.ts +6 -0
  34. package/lib/commonjs/mol-io/reader/sdf/parser-v3-util.js +9 -0
  35. package/lib/commonjs/mol-io/reader/sdf/parser.d.ts +3 -1
  36. package/lib/commonjs/mol-io/reader/sdf/parser.js +11 -2
  37. package/lib/commonjs/mol-io/writer/cif/encoder/binary.js +9 -2
  38. package/lib/commonjs/mol-math/geometry/symmetry-operator.d.ts +1 -1
  39. package/lib/commonjs/mol-math/geometry/symmetry-operator.js +10 -4
  40. package/lib/commonjs/mol-model/structure/export/mmcif.d.ts +1 -1
  41. package/lib/commonjs/mol-model/structure/export/mmcif.js +8 -5
  42. package/lib/commonjs/mol-model/structure/model/properties/common.d.ts +1 -1
  43. package/lib/commonjs/mol-model/structure/structure/properties.d.ts +1 -0
  44. package/lib/commonjs/mol-model/structure/structure/properties.js +2 -1
  45. package/lib/commonjs/mol-model/structure/structure/symmetry.js +1 -3
  46. package/lib/commonjs/mol-model/structure/structure/util/superposition-db-mapping.js +10 -5
  47. package/lib/commonjs/mol-model-formats/structure/basic/atomic.d.ts +2 -2
  48. package/lib/commonjs/mol-model-formats/structure/basic/atomic.js +6 -6
  49. package/lib/commonjs/mol-model-formats/structure/basic/coarse.d.ts +1 -1
  50. package/lib/commonjs/mol-model-formats/structure/basic/coarse.js +3 -3
  51. package/lib/commonjs/mol-model-formats/structure/basic/entities.d.ts +2 -1
  52. package/lib/commonjs/mol-model-formats/structure/basic/entities.js +28 -24
  53. package/lib/commonjs/mol-model-formats/structure/basic/parser.js +17 -8
  54. package/lib/commonjs/mol-model-formats/structure/basic/properties.d.ts +6 -1
  55. package/lib/commonjs/mol-model-formats/structure/basic/properties.js +12 -22
  56. package/lib/commonjs/mol-model-formats/structure/mol.d.ts +2 -1
  57. package/lib/commonjs/mol-model-formats/structure/mol.js +19 -5
  58. package/lib/commonjs/mol-model-props/common/custom-property.d.ts +1 -1
  59. package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +1 -1
  60. package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.js +25 -10
  61. package/lib/commonjs/mol-model-props/sequence/best-database-mapping.js +15 -15
  62. package/lib/commonjs/mol-plugin/animation-loop.d.ts +2 -0
  63. package/lib/commonjs/mol-plugin/animation-loop.js +1 -1
  64. package/lib/commonjs/mol-plugin/commands.d.ts +6 -2
  65. package/lib/commonjs/mol-plugin/spec.d.ts +1 -1
  66. package/lib/commonjs/mol-plugin/spec.js +3 -1
  67. package/lib/commonjs/mol-plugin-state/actions/file.d.ts +3 -2
  68. package/lib/commonjs/mol-plugin-state/actions/file.js +67 -31
  69. package/lib/commonjs/mol-plugin-state/animation/built-in/camera-rock.d.ts +16 -0
  70. package/lib/commonjs/mol-plugin-state/animation/built-in/camera-rock.js +62 -0
  71. package/lib/commonjs/mol-plugin-state/animation/built-in/camera-spin.d.ts +1 -1
  72. package/lib/commonjs/mol-plugin-state/animation/built-in/camera-spin.js +9 -8
  73. package/lib/commonjs/mol-plugin-state/animation/model.d.ts +4 -0
  74. package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +6 -6
  75. package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy.d.ts +1 -1
  76. package/lib/commonjs/mol-plugin-state/builder/structure/representation-preset.d.ts +149 -5
  77. package/lib/commonjs/mol-plugin-state/builder/structure/representation-preset.js +74 -2
  78. package/lib/commonjs/mol-plugin-state/manager/animation.d.ts +5 -1
  79. package/lib/commonjs/mol-plugin-state/manager/animation.js +5 -5
  80. package/lib/commonjs/mol-plugin-ui/structure/superposition.js +2 -2
  81. package/lib/commonjs/mol-plugin-ui/viewport/simple-settings.d.ts +1 -1
  82. package/lib/commonjs/mol-plugin-ui/viewport/simple-settings.js +4 -8
  83. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +1 -1
  84. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.js +8 -4
  85. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +1 -1
  86. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.js +10 -6
  87. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +1 -1
  88. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.js +8 -4
  89. package/lib/commonjs/mol-repr/visual.d.ts +1 -1
  90. package/lib/commonjs/mol-repr/visual.js +2 -1
  91. package/lib/commonjs/mol-state/tree/immutable.d.ts +18 -0
  92. package/lib/commonjs/mol-state/tree/transient.d.ts +3 -4
  93. package/lib/commonjs/mol-theme/color/element-symbol.d.ts +243 -1
  94. package/lib/commonjs/mol-theme/color/element-symbol.js +10 -5
  95. package/lib/commonjs/mol-theme/color/entity-id.d.ts +1 -1
  96. package/lib/commonjs/mol-theme/color/entity-id.js +26 -5
  97. package/lib/commonjs/mol-theme/color/illustrative.d.ts +100 -29
  98. package/lib/commonjs/mol-theme/color/illustrative.js +26 -7
  99. package/lib/commonjs/mol-theme/color/molecule-type.d.ts +19 -1
  100. package/lib/commonjs/mol-theme/color/molecule-type.js +10 -5
  101. package/lib/commonjs/mol-theme/color/residue-name.d.ts +77 -1
  102. package/lib/commonjs/mol-theme/color/residue-name.js +10 -5
  103. package/lib/commonjs/mol-theme/color/secondary-structure.d.ts +27 -1
  104. package/lib/commonjs/mol-theme/color/secondary-structure.js +10 -5
  105. package/lib/commonjs/mol-theme/color.d.ts +230 -14
  106. package/lib/commonjs/mol-util/color/color.d.ts +1 -1
  107. package/lib/commonjs/mol-util/color/color.js +1 -1
  108. package/lib/commonjs/mol-util/color/params.d.ts +10 -0
  109. package/lib/commonjs/mol-util/color/params.js +19 -0
  110. package/lib/examples/basic-wrapper/index.js +7 -3
  111. package/lib/examples/proteopedia-wrapper/index.js +7 -1
  112. package/lib/extensions/anvil/representation.js +1 -1
  113. package/lib/extensions/model-export/export.d.ts +9 -0
  114. package/lib/extensions/model-export/export.js +125 -0
  115. package/lib/extensions/model-export/index.d.ts +7 -0
  116. package/lib/extensions/model-export/index.js +33 -0
  117. package/lib/extensions/model-export/ui.d.ts +11 -0
  118. package/lib/extensions/model-export/ui.js +74 -0
  119. package/lib/extensions/mp4-export/encoder.js +1 -1
  120. package/lib/extensions/rcsb/assembly-symmetry/behavior.d.ts +2 -2
  121. package/lib/extensions/rcsb/graphql/types.d.ts +2 -2
  122. package/lib/mol-canvas3d/canvas3d.d.ts +12 -4
  123. package/lib/mol-canvas3d/canvas3d.js +1 -1
  124. package/lib/mol-canvas3d/controls/trackball.d.ts +9 -4
  125. package/lib/mol-canvas3d/controls/trackball.js +51 -12
  126. package/lib/mol-io/reader/cif/schema/bird.d.ts +1 -1
  127. package/lib/mol-io/reader/cif/schema/bird.js +1 -1
  128. package/lib/mol-io/reader/cif/schema/ccd.d.ts +1 -1
  129. package/lib/mol-io/reader/cif/schema/ccd.js +1 -1
  130. package/lib/mol-io/reader/cif/schema/mmcif.d.ts +2 -2
  131. package/lib/mol-io/reader/cif/schema/mmcif.js +1 -1
  132. package/lib/mol-io/reader/mol/parser.d.ts +23 -1
  133. package/lib/mol-io/reader/mol/parser.js +112 -3
  134. package/lib/mol-io/reader/sdf/parser-v3-util.d.ts +6 -0
  135. package/lib/mol-io/reader/sdf/parser-v3-util.js +9 -0
  136. package/lib/mol-io/reader/sdf/parser.d.ts +3 -1
  137. package/lib/mol-io/reader/sdf/parser.js +12 -3
  138. package/lib/mol-io/writer/cif/encoder/binary.js +9 -2
  139. package/lib/mol-math/geometry/symmetry-operator.d.ts +1 -1
  140. package/lib/mol-math/geometry/symmetry-operator.js +10 -4
  141. package/lib/mol-model/structure/export/mmcif.d.ts +1 -1
  142. package/lib/mol-model/structure/export/mmcif.js +8 -5
  143. package/lib/mol-model/structure/model/properties/common.d.ts +1 -1
  144. package/lib/mol-model/structure/structure/properties.d.ts +1 -0
  145. package/lib/mol-model/structure/structure/properties.js +2 -1
  146. package/lib/mol-model/structure/structure/symmetry.js +1 -3
  147. package/lib/mol-model/structure/structure/util/superposition-db-mapping.js +10 -5
  148. package/lib/mol-model-formats/structure/basic/atomic.d.ts +2 -2
  149. package/lib/mol-model-formats/structure/basic/atomic.js +6 -6
  150. package/lib/mol-model-formats/structure/basic/coarse.d.ts +1 -1
  151. package/lib/mol-model-formats/structure/basic/coarse.js +3 -3
  152. package/lib/mol-model-formats/structure/basic/entities.d.ts +2 -1
  153. package/lib/mol-model-formats/structure/basic/entities.js +25 -22
  154. package/lib/mol-model-formats/structure/basic/parser.js +19 -10
  155. package/lib/mol-model-formats/structure/basic/properties.d.ts +6 -1
  156. package/lib/mol-model-formats/structure/basic/properties.js +12 -25
  157. package/lib/mol-model-formats/structure/mol.d.ts +2 -1
  158. package/lib/mol-model-formats/structure/mol.js +17 -3
  159. package/lib/mol-model-props/common/custom-property.d.ts +1 -1
  160. package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +1 -1
  161. package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.js +25 -10
  162. package/lib/mol-model-props/sequence/best-database-mapping.js +15 -15
  163. package/lib/mol-plugin/animation-loop.d.ts +2 -0
  164. package/lib/mol-plugin/animation-loop.js +1 -1
  165. package/lib/mol-plugin/commands.d.ts +6 -2
  166. package/lib/mol-plugin/spec.d.ts +1 -1
  167. package/lib/mol-plugin/spec.js +3 -1
  168. package/lib/mol-plugin/version.js +2 -2
  169. package/lib/mol-plugin-state/actions/file.d.ts +3 -2
  170. package/lib/mol-plugin-state/actions/file.js +67 -31
  171. package/lib/mol-plugin-state/animation/built-in/camera-rock.d.ts +16 -0
  172. package/lib/mol-plugin-state/animation/built-in/camera-rock.js +59 -0
  173. package/lib/mol-plugin-state/animation/built-in/camera-spin.d.ts +1 -1
  174. package/lib/mol-plugin-state/animation/built-in/camera-spin.js +9 -8
  175. package/lib/mol-plugin-state/animation/model.d.ts +4 -0
  176. package/lib/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +6 -6
  177. package/lib/mol-plugin-state/builder/structure/hierarchy.d.ts +1 -1
  178. package/lib/mol-plugin-state/builder/structure/representation-preset.d.ts +149 -5
  179. package/lib/mol-plugin-state/builder/structure/representation-preset.js +74 -2
  180. package/lib/mol-plugin-state/manager/animation.d.ts +5 -1
  181. package/lib/mol-plugin-state/manager/animation.js +5 -5
  182. package/lib/mol-plugin-ui/structure/superposition.js +2 -2
  183. package/lib/mol-plugin-ui/viewport/simple-settings.d.ts +1 -1
  184. package/lib/mol-plugin-ui/viewport/simple-settings.js +4 -8
  185. package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +1 -1
  186. package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.js +8 -4
  187. package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +1 -1
  188. package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.js +10 -6
  189. package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +1 -1
  190. package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.js +8 -4
  191. package/lib/mol-repr/visual.d.ts +1 -1
  192. package/lib/mol-repr/visual.js +2 -1
  193. package/lib/mol-state/tree/immutable.d.ts +18 -0
  194. package/lib/mol-state/tree/transient.d.ts +3 -4
  195. package/lib/mol-theme/color/element-symbol.d.ts +243 -1
  196. package/lib/mol-theme/color/element-symbol.js +10 -5
  197. package/lib/mol-theme/color/entity-id.d.ts +1 -1
  198. package/lib/mol-theme/color/entity-id.js +26 -5
  199. package/lib/mol-theme/color/illustrative.d.ts +100 -29
  200. package/lib/mol-theme/color/illustrative.js +26 -7
  201. package/lib/mol-theme/color/molecule-type.d.ts +19 -1
  202. package/lib/mol-theme/color/molecule-type.js +10 -5
  203. package/lib/mol-theme/color/residue-name.d.ts +77 -1
  204. package/lib/mol-theme/color/residue-name.js +10 -5
  205. package/lib/mol-theme/color/secondary-structure.d.ts +27 -1
  206. package/lib/mol-theme/color/secondary-structure.js +10 -5
  207. package/lib/mol-theme/color.d.ts +230 -14
  208. package/lib/mol-util/color/color.d.ts +1 -1
  209. package/lib/mol-util/color/color.js +1 -1
  210. package/lib/mol-util/color/params.d.ts +10 -0
  211. package/lib/mol-util/color/params.js +15 -0
  212. package/package.json +36 -35
package/README.md CHANGED
@@ -11,6 +11,13 @@ When using Mol*, please cite:
11
11
 
12
12
  David Sehnal, Sebastian Bittrich, Mandar Deshpande, Radka Svobodová, Karel Berka, Václav Bazgier, Sameer Velankar, Stephen K Burley, Jaroslav Koča, Alexander S Rose: [Mol* Viewer: modern web app for 3D visualization and analysis of large biomolecular structures](https://doi.org/10.1093/nar/gkab314), *Nucleic Acids Research*, 2021; https://doi.org/10.1093/nar/gkab314.
13
13
 
14
+ ### Protein Data Bank Integrations
15
+
16
+ - The [pdbe-molstar](https://github.com/molstar/pdbe-molstar) library is the Mol* implementation used by EMBL-EBI data resources such as [PDBe](https://pdbe.org/), [PDBe-KB](https://pdbe-kb.org/) and [AlphaFold DB](https://alphafold.ebi.ac.uk/). This implementation can be used as a JS plugin and a Web component and supports property/attribute-based easy customisation. It provides helper methods to facilitate programmatic interactions between the web application and the 3D viewer. It also provides a superposition view for overlaying all the observed ligand molecules on representative protein conformations.
17
+
18
+ - [rcsb-molstar](https://github.com/molstar/rcsb-molstar) is the Mol* plugin used by [RCSB PDB](https://www.rcsb.org). The project provides additional presets for the visualization of structure alignments and structure motifs such as ligand binding sites. Furthermore, [rcsb-molstar](https://github.com/molstar/rcsb-molstar) allows to interactively add or hide of (parts of) chains, as seen in the [3D Protein Feature View](https://www.rcsb.org/3d-sequence/4hhb).
19
+
20
+
14
21
  ## Project Structure Overview
15
22
 
16
23
  The core of Mol* consists of these modules (see under `src/`):
@@ -57,7 +57,7 @@
57
57
  var pickScale = getParam('pick-scale', '[^&]+').trim();
58
58
  var pickPadding = getParam('pick-padding', '[^&]+').trim();
59
59
  var disableWboit = getParam('disable-wboit', '[^&]+').trim() === '1';
60
- var preferWebgl1 = getParam('prefer-webgl1', '[^&]+').trim() === '1';
60
+ var preferWebgl1 = getParam('prefer-webgl1', '[^&]+').trim() === '1' || void 0;
61
61
 
62
62
  molstar.Viewer.create('app', {
63
63
  layoutShowControls: !hideControls,
@@ -71,7 +71,7 @@
71
71
  pixelScale: parseFloat(pixelScale) || 1,
72
72
  pickScale: parseFloat(pickScale) || 0.25,
73
73
  pickPadding: isNaN(parseFloat(pickPadding)) ? 1 : parseFloat(pickPadding),
74
- enableWboit: !disableWboit,
74
+ enableWboit: disableWboit ? true : void 0, // use default value if disable-wboit is not set
75
75
  preferWebgl1: preferWebgl1,
76
76
  }).then(viewer => {
77
77
  var snapshotId = getParam('snapshot-id', '[^&]+').trim();