molstar 4.14.1 → 4.16.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 (560) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +205 -205
  3. package/build/viewer/embedded.html +52 -52
  4. package/build/viewer/index.html +141 -141
  5. package/build/viewer/molstar.js +1 -1
  6. package/build/viewer/molstar.js.LICENSE.txt +0 -9
  7. package/lib/apps/docking-viewer/index.html +36 -36
  8. package/lib/apps/mesoscale-explorer/embedded.html +78 -78
  9. package/lib/apps/mesoscale-explorer/index.html +115 -115
  10. package/lib/apps/mesoscale-explorer/style.scss +68 -68
  11. package/lib/apps/mesoscale-explorer/ui/states.js +1 -2
  12. package/lib/apps/viewer/app.d.ts +3 -2
  13. package/lib/apps/viewer/app.js +2 -1
  14. package/lib/apps/viewer/embedded.html +52 -52
  15. package/lib/apps/viewer/index.html +141 -141
  16. package/lib/cli/chem-comp-dict/create-ions.js +9 -9
  17. package/lib/cli/chem-comp-dict/create-saccharides.js +9 -9
  18. package/lib/cli/cif2bcif/converter.js +5 -9
  19. package/lib/cli/cifschema/util/generate.js +12 -12
  20. package/lib/cli/lipid-params/index.js +9 -9
  21. package/lib/cli/mvs/mvs-render.js +1 -1
  22. package/lib/commonjs/apps/mesoscale-explorer/ui/states.js +1 -2
  23. package/lib/commonjs/apps/viewer/app.d.ts +3 -2
  24. package/lib/commonjs/apps/viewer/app.js +2 -1
  25. package/lib/commonjs/cli/chem-comp-dict/create-ions.js +9 -9
  26. package/lib/commonjs/cli/chem-comp-dict/create-saccharides.js +9 -9
  27. package/lib/commonjs/cli/cif2bcif/converter.js +5 -9
  28. package/lib/commonjs/cli/cifschema/util/generate.js +12 -12
  29. package/lib/commonjs/cli/lipid-params/index.js +9 -9
  30. package/lib/commonjs/cli/mvs/mvs-render.js +1 -1
  31. package/lib/commonjs/examples/alpha-orbitals/example-data.js +160 -160
  32. package/lib/commonjs/examples/ihm-restraints/index.js +26 -26
  33. package/lib/commonjs/examples/interactions/index.js +2 -2
  34. package/lib/commonjs/examples/ligand-editor/edits.d.ts +20 -0
  35. package/lib/commonjs/examples/ligand-editor/edits.js +203 -0
  36. package/lib/commonjs/examples/ligand-editor/example-data.d.ts +6 -0
  37. package/lib/commonjs/examples/ligand-editor/example-data.js +55 -0
  38. package/lib/commonjs/examples/ligand-editor/index.d.ts +7 -0
  39. package/lib/commonjs/examples/ligand-editor/index.js +341 -0
  40. package/lib/commonjs/examples/ligand-editor/molfile.d.ts +10 -0
  41. package/lib/commonjs/examples/ligand-editor/molfile.js +89 -0
  42. package/lib/commonjs/examples/ligand-editor/r-groups.d.ts +12 -0
  43. package/lib/commonjs/examples/ligand-editor/r-groups.js +97 -0
  44. package/lib/commonjs/examples/ligand-editor/utils.d.ts +10 -0
  45. package/lib/commonjs/examples/ligand-editor/utils.js +39 -0
  46. package/lib/commonjs/examples/mvs-stories/elements/viewer.js +4 -3
  47. package/lib/commonjs/examples/mvs-stories/stories/kinase.js +109 -109
  48. package/lib/commonjs/examples/mvs-stories/stories/tbp.js +74 -74
  49. package/lib/commonjs/extensions/alpha-orbitals/gpu/shader.frag.js +136 -136
  50. package/lib/commonjs/extensions/assembly-symmetry/prop.d.ts +1 -1
  51. package/lib/commonjs/extensions/assembly-symmetry/prop.js +29 -29
  52. package/lib/commonjs/extensions/dnatco/confal-pyramids/behavior.js +5 -5
  53. package/lib/commonjs/extensions/dnatco/ntc-tube/behavior.js +5 -5
  54. package/lib/commonjs/extensions/geo-export/usdz-exporter.js +41 -41
  55. package/lib/commonjs/extensions/json-cif/encoder.d.ts +33 -0
  56. package/lib/commonjs/extensions/json-cif/encoder.js +99 -0
  57. package/lib/commonjs/extensions/json-cif/ligand-graph.d.ts +56 -0
  58. package/lib/commonjs/extensions/json-cif/ligand-graph.js +261 -0
  59. package/lib/commonjs/extensions/json-cif/model.d.ts +23 -0
  60. package/lib/commonjs/extensions/json-cif/model.js +13 -0
  61. package/lib/commonjs/extensions/json-cif/parser.d.ts +11 -0
  62. package/lib/commonjs/extensions/json-cif/parser.js +95 -0
  63. package/lib/commonjs/extensions/json-cif/transformers.d.ts +12 -0
  64. package/lib/commonjs/extensions/json-cif/transformers.js +29 -0
  65. package/lib/commonjs/extensions/json-cif/utils.d.ts +11 -0
  66. package/lib/commonjs/extensions/json-cif/utils.js +34 -0
  67. package/lib/commonjs/extensions/mvs/behavior.js +2 -2
  68. package/lib/commonjs/extensions/mvs/components/formats.d.ts +2 -2
  69. package/lib/commonjs/extensions/mvs/components/formats.js +4 -3
  70. package/lib/commonjs/extensions/mvs/components/primitives.js +2 -1
  71. package/lib/commonjs/extensions/mvs/load-generic.d.ts +0 -6
  72. package/lib/commonjs/extensions/mvs/load-generic.js +0 -9
  73. package/lib/commonjs/extensions/mvs/load.d.ts +7 -9
  74. package/lib/commonjs/extensions/mvs/load.js +23 -58
  75. package/lib/commonjs/extensions/mvs/mvs-data.d.ts +2 -0
  76. package/lib/commonjs/extensions/mvs/mvs-data.js +18 -0
  77. package/lib/commonjs/extensions/rcsb/validation-report/prop.d.ts +1 -1
  78. package/lib/commonjs/extensions/rcsb/validation-report/prop.js +2 -2
  79. package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +3 -3
  80. package/lib/commonjs/mol-canvas3d/canvas3d.js +23 -5
  81. package/lib/commonjs/mol-canvas3d/passes/draw.d.ts +1 -1
  82. package/lib/commonjs/mol-canvas3d/passes/draw.js +3 -2
  83. package/lib/commonjs/mol-canvas3d/passes/illumination.d.ts +3 -2
  84. package/lib/commonjs/mol-canvas3d/passes/illumination.js +10 -3
  85. package/lib/commonjs/mol-canvas3d/passes/image.d.ts +1 -1
  86. package/lib/commonjs/mol-canvas3d/passes/image.js +2 -2
  87. package/lib/commonjs/mol-canvas3d/passes/pick.d.ts +1 -0
  88. package/lib/commonjs/mol-canvas3d/passes/pick.js +21 -0
  89. package/lib/commonjs/mol-canvas3d/passes/postprocessing.d.ts +2 -1
  90. package/lib/commonjs/mol-canvas3d/passes/postprocessing.js +4 -1
  91. package/lib/commonjs/mol-canvas3d/passes/ssao.d.ts +2 -1
  92. package/lib/commonjs/mol-canvas3d/passes/ssao.js +5 -1
  93. package/lib/commonjs/mol-canvas3d/passes/tracing.d.ts +3 -2
  94. package/lib/commonjs/mol-canvas3d/passes/tracing.js +15 -2
  95. package/lib/commonjs/mol-geo/geometry/direct-volume/direct-volume.d.ts +4 -0
  96. package/lib/commonjs/mol-geo/geometry/direct-volume/direct-volume.js +3 -1
  97. package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +3 -1
  98. package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.js +1 -1
  99. package/lib/commonjs/mol-gl/compute/histogram-pyramid/reduction.d.ts +1 -1
  100. package/lib/commonjs/mol-gl/compute/histogram-pyramid/reduction.js +2 -2
  101. package/lib/commonjs/mol-gl/renderable/direct-volume.d.ts +19 -18
  102. package/lib/commonjs/mol-gl/renderable/direct-volume.js +2 -1
  103. package/lib/commonjs/mol-gl/shader/background.frag.js +95 -95
  104. package/lib/commonjs/mol-gl/shader/background.vert.js +11 -11
  105. package/lib/commonjs/mol-gl/shader/blend-back-dpoit.frag.js +13 -13
  106. package/lib/commonjs/mol-gl/shader/bloom/blur.frag.js +28 -28
  107. package/lib/commonjs/mol-gl/shader/bloom/composite.frag.js +33 -33
  108. package/lib/commonjs/mol-gl/shader/bloom/luminosity.frag.js +52 -52
  109. package/lib/commonjs/mol-gl/shader/cas.frag.js +144 -144
  110. package/lib/commonjs/mol-gl/shader/chunks/apply-fog.glsl.js +36 -36
  111. package/lib/commonjs/mol-gl/shader/chunks/apply-interior-color.glsl.js +12 -12
  112. package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.js +103 -103
  113. package/lib/commonjs/mol-gl/shader/chunks/apply-marker-color.glsl.js +16 -16
  114. package/lib/commonjs/mol-gl/shader/chunks/assign-clipping-varying.glsl.js +8 -8
  115. package/lib/commonjs/mol-gl/shader/chunks/assign-color-varying.glsl.js +140 -140
  116. package/lib/commonjs/mol-gl/shader/chunks/assign-group.glsl.js +6 -6
  117. package/lib/commonjs/mol-gl/shader/chunks/assign-marker-varying.glsl.js +8 -8
  118. package/lib/commonjs/mol-gl/shader/chunks/assign-material-color.glsl.js +127 -127
  119. package/lib/commonjs/mol-gl/shader/chunks/assign-position.glsl.js +14 -14
  120. package/lib/commonjs/mol-gl/shader/chunks/assign-size.glsl.js +18 -18
  121. package/lib/commonjs/mol-gl/shader/chunks/check-picking-alpha.glsl.js +12 -12
  122. package/lib/commonjs/mol-gl/shader/chunks/check-transparency.glsl.js +22 -22
  123. package/lib/commonjs/mol-gl/shader/chunks/clip-instance.glsl.js +8 -8
  124. package/lib/commonjs/mol-gl/shader/chunks/clip-pixel.glsl.js +5 -5
  125. package/lib/commonjs/mol-gl/shader/chunks/color-frag-params.glsl.js +63 -63
  126. package/lib/commonjs/mol-gl/shader/chunks/color-vert-params.glsl.js +122 -122
  127. package/lib/commonjs/mol-gl/shader/chunks/common-clip.glsl.js +102 -102
  128. package/lib/commonjs/mol-gl/shader/chunks/common-frag-params.glsl.js +163 -163
  129. package/lib/commonjs/mol-gl/shader/chunks/common-vert-params.glsl.js +62 -62
  130. package/lib/commonjs/mol-gl/shader/chunks/common.glsl.js +267 -267
  131. package/lib/commonjs/mol-gl/shader/chunks/dpoit-write.glsl.js +62 -62
  132. package/lib/commonjs/mol-gl/shader/chunks/fade-lod.glsl.js +42 -42
  133. package/lib/commonjs/mol-gl/shader/chunks/float-to-rgba.glsl.js +39 -39
  134. package/lib/commonjs/mol-gl/shader/chunks/light-frag-params.glsl.js +127 -127
  135. package/lib/commonjs/mol-gl/shader/chunks/matrix-scale.glsl.js +5 -5
  136. package/lib/commonjs/mol-gl/shader/chunks/normal-frag-params.glsl.js +2 -2
  137. package/lib/commonjs/mol-gl/shader/chunks/read-from-texture.glsl.js +14 -14
  138. package/lib/commonjs/mol-gl/shader/chunks/rgba-to-float.glsl.js +84 -84
  139. package/lib/commonjs/mol-gl/shader/chunks/size-vert-params.glsl.js +11 -11
  140. package/lib/commonjs/mol-gl/shader/chunks/texture3d-from-1d-trilinear.glsl.js +23 -23
  141. package/lib/commonjs/mol-gl/shader/chunks/texture3d-from-2d-linear.glsl.js +17 -17
  142. package/lib/commonjs/mol-gl/shader/chunks/texture3d-from-2d-nearest.glsl.js +8 -8
  143. package/lib/commonjs/mol-gl/shader/chunks/wboit-write.glsl.js +25 -25
  144. package/lib/commonjs/mol-gl/shader/compose.frag.js +12 -12
  145. package/lib/commonjs/mol-gl/shader/compute/color-smoothing/accumulate.frag.js +23 -23
  146. package/lib/commonjs/mol-gl/shader/compute/color-smoothing/accumulate.vert.js +43 -43
  147. package/lib/commonjs/mol-gl/shader/compute/color-smoothing/normalize.frag.js +15 -15
  148. package/lib/commonjs/mol-gl/shader/copy.frag.js +11 -11
  149. package/lib/commonjs/mol-gl/shader/cylinders.frag.js +283 -283
  150. package/lib/commonjs/mol-gl/shader/cylinders.vert.js +91 -91
  151. package/lib/commonjs/mol-gl/shader/direct-volume.frag.js +369 -369
  152. package/lib/commonjs/mol-gl/shader/direct-volume.vert.js +41 -41
  153. package/lib/commonjs/mol-gl/shader/dof.frag.js +112 -112
  154. package/lib/commonjs/mol-gl/shader/evaluate-dpoit.frag.js +10 -10
  155. package/lib/commonjs/mol-gl/shader/evaluate-wboit.frag.js +17 -17
  156. package/lib/commonjs/mol-gl/shader/fxaa.frag.js +228 -228
  157. package/lib/commonjs/mol-gl/shader/gaussian-density.frag.js +49 -49
  158. package/lib/commonjs/mol-gl/shader/gaussian-density.vert.js +27 -27
  159. package/lib/commonjs/mol-gl/shader/hi-z.frag.js +18 -18
  160. package/lib/commonjs/mol-gl/shader/histogram-pyramid/reduction.frag.js +58 -58
  161. package/lib/commonjs/mol-gl/shader/histogram-pyramid/sum.frag.js +19 -19
  162. package/lib/commonjs/mol-gl/shader/illumination/accumulate.frag.js +12 -12
  163. package/lib/commonjs/mol-gl/shader/illumination/compose.frag.js +270 -270
  164. package/lib/commonjs/mol-gl/shader/illumination/trace.frag.js +366 -366
  165. package/lib/commonjs/mol-gl/shader/image.frag.js +306 -306
  166. package/lib/commonjs/mol-gl/shader/image.vert.js +23 -23
  167. package/lib/commonjs/mol-gl/shader/lines.frag.js +47 -47
  168. package/lib/commonjs/mol-gl/shader/lines.vert.js +118 -118
  169. package/lib/commonjs/mol-gl/shader/marching-cubes/active-voxels.frag.js +75 -75
  170. package/lib/commonjs/mol-gl/shader/marching-cubes/isosurface.frag.js +321 -321
  171. package/lib/commonjs/mol-gl/shader/marking/edge.frag.js +28 -28
  172. package/lib/commonjs/mol-gl/shader/marking/overlay.frag.js +26 -26
  173. package/lib/commonjs/mol-gl/shader/mesh.frag.js +74 -74
  174. package/lib/commonjs/mol-gl/shader/mesh.vert.js +51 -51
  175. package/lib/commonjs/mol-gl/shader/outlines.frag.js +95 -95
  176. package/lib/commonjs/mol-gl/shader/points.frag.js +64 -64
  177. package/lib/commonjs/mol-gl/shader/points.vert.js +40 -40
  178. package/lib/commonjs/mol-gl/shader/postprocessing.frag.js +188 -188
  179. package/lib/commonjs/mol-gl/shader/quad.vert.js +10 -10
  180. package/lib/commonjs/mol-gl/shader/shadows.frag.js +121 -121
  181. package/lib/commonjs/mol-gl/shader/smaa/blend.frag.js +56 -56
  182. package/lib/commonjs/mol-gl/shader/smaa/blend.vert.js +25 -25
  183. package/lib/commonjs/mol-gl/shader/smaa/edges.frag.js +66 -66
  184. package/lib/commonjs/mol-gl/shader/smaa/edges.vert.js +26 -26
  185. package/lib/commonjs/mol-gl/shader/smaa/weights.frag.js +206 -206
  186. package/lib/commonjs/mol-gl/shader/smaa/weights.vert.js +32 -32
  187. package/lib/commonjs/mol-gl/shader/spheres.frag.js +157 -157
  188. package/lib/commonjs/mol-gl/shader/spheres.vert.js +134 -134
  189. package/lib/commonjs/mol-gl/shader/ssao-blur.frag.js +101 -101
  190. package/lib/commonjs/mol-gl/shader/ssao.frag.js +283 -283
  191. package/lib/commonjs/mol-gl/shader/text.frag.js +76 -76
  192. package/lib/commonjs/mol-gl/shader/text.vert.js +87 -87
  193. package/lib/commonjs/mol-gl/shader/util/grid3d-template.frag.js +46 -46
  194. package/lib/commonjs/mol-gl/shader-code.js +13 -13
  195. package/lib/commonjs/mol-gl/webgl/compat.js +12 -12
  196. package/lib/commonjs/mol-gl/webgl/context.d.ts +3 -3
  197. package/lib/commonjs/mol-gl/webgl/context.js +3 -3
  198. package/lib/commonjs/mol-gl/webgl/extensions.d.ts +2 -1
  199. package/lib/commonjs/mol-gl/webgl/extensions.js +19 -1
  200. package/lib/commonjs/mol-gl/webgl/resources.d.ts +1 -1
  201. package/lib/commonjs/mol-gl/webgl/resources.js +3 -1
  202. package/lib/commonjs/mol-gl/webgl/texture.d.ts +1 -1
  203. package/lib/commonjs/mol-gl/webgl/texture.js +40 -26
  204. package/lib/commonjs/mol-gl/webgl/timer.d.ts +1 -1
  205. package/lib/commonjs/mol-gl/webgl/timer.js +7 -6
  206. package/lib/commonjs/mol-io/common/string-like.d.ts +97 -0
  207. package/lib/commonjs/mol-io/common/string-like.js +194 -0
  208. package/lib/commonjs/mol-io/common/utf8.d.ts +5 -1
  209. package/lib/commonjs/mol-io/common/utf8.js +12 -1
  210. package/lib/commonjs/mol-io/reader/cif/binary/parser.js +3 -3
  211. package/lib/commonjs/mol-io/reader/cif/text/parser.d.ts +2 -1
  212. package/lib/commonjs/mol-io/reader/cif.d.ts +2 -1
  213. package/lib/commonjs/mol-io/reader/cif.js +2 -1
  214. package/lib/commonjs/mol-io/reader/common/text/number-parser.d.ts +5 -4
  215. package/lib/commonjs/mol-io/reader/common/text/tokenizer.d.ts +7 -6
  216. package/lib/commonjs/mol-io/reader/cube/parser.d.ts +2 -1
  217. package/lib/commonjs/mol-io/reader/dx/parser.d.ts +2 -1
  218. package/lib/commonjs/mol-io/reader/dx/parser.js +3 -2
  219. package/lib/commonjs/mol-io/reader/gro/parser.d.ts +2 -1
  220. package/lib/commonjs/mol-io/reader/lammps/data/parser.d.ts +2 -1
  221. package/lib/commonjs/mol-io/reader/lammps/traj/parser.d.ts +2 -1
  222. package/lib/commonjs/mol-io/reader/mol/parser.d.ts +10 -4
  223. package/lib/commonjs/mol-io/reader/mol/parser.js +16 -5
  224. package/lib/commonjs/mol-io/reader/mol2/parser.d.ts +2 -1
  225. package/lib/commonjs/mol-io/reader/pdb/parser.d.ts +2 -1
  226. package/lib/commonjs/mol-io/reader/ply/parser.d.ts +2 -1
  227. package/lib/commonjs/mol-io/reader/prmtop/parser.d.ts +2 -1
  228. package/lib/commonjs/mol-io/reader/prmtop/parser.js +4 -4
  229. package/lib/commonjs/mol-io/reader/psf/parser.d.ts +2 -1
  230. package/lib/commonjs/mol-io/reader/sdf/parser.d.ts +2 -1
  231. package/lib/commonjs/mol-io/reader/sdf/parser.js +2 -2
  232. package/lib/commonjs/mol-io/reader/top/parser.d.ts +2 -1
  233. package/lib/commonjs/mol-io/reader/top/parser.js +6 -6
  234. package/lib/commonjs/mol-io/reader/xyz/parser.d.ts +2 -1
  235. package/lib/commonjs/mol-model/structure/export/categories/atom_site.d.ts +3 -1
  236. package/lib/commonjs/mol-model/structure/export/categories/atom_site.js +49 -40
  237. package/lib/commonjs/mol-model/structure/export/categories/molstar_bond_site.d.ts +19 -0
  238. package/lib/commonjs/mol-model/structure/export/categories/molstar_bond_site.js +123 -0
  239. package/lib/commonjs/mol-model/structure/export/mmcif.d.ts +18 -2
  240. package/lib/commonjs/mol-model/structure/export/mmcif.js +29 -8
  241. package/lib/commonjs/mol-model/structure/model/model.js +2 -0
  242. package/lib/commonjs/mol-model-formats/structure/mmcif.js +72 -0
  243. package/lib/commonjs/mol-model-formats/structure/mol.js +1 -1
  244. package/lib/commonjs/mol-model-formats/structure/pdb/anisotropic.d.ts +2 -1
  245. package/lib/commonjs/mol-model-formats/structure/pdb/atom-site.d.ts +2 -1
  246. package/lib/commonjs/mol-model-formats/structure/pdb/header.d.ts +5 -4
  247. package/lib/commonjs/mol-model-formats/structure/pdb/header.js +5 -0
  248. package/lib/commonjs/mol-model-formats/structure/pdb/to-cif.js +2 -2
  249. package/lib/commonjs/mol-model-formats/structure/util.d.ts +2 -1
  250. package/lib/commonjs/mol-plugin-state/formats/provider.d.ts +4 -3
  251. package/lib/commonjs/mol-plugin-state/formats/volume.d.ts +4 -4
  252. package/lib/commonjs/mol-plugin-state/manager/snapshots.js +4 -4
  253. package/lib/commonjs/mol-plugin-state/objects.d.ts +4 -3
  254. package/lib/commonjs/mol-plugin-state/transforms/data.d.ts +1 -1
  255. package/lib/commonjs/mol-plugin-state/transforms/data.js +4 -3
  256. package/lib/commonjs/mol-plugin-ui/viewport/screenshot.js +4 -4
  257. package/lib/commonjs/mol-repr/structure/visual/gaussian-density-volume.d.ts +1 -1
  258. package/lib/commonjs/mol-repr/structure/visual/gaussian-density-volume.js +42 -25
  259. package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +1 -1
  260. package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.js +47 -31
  261. package/lib/commonjs/mol-repr/structure/visual/util/gaussian.d.ts +5 -5
  262. package/lib/commonjs/mol-repr/structure/visual/util/gaussian.js +5 -13
  263. package/lib/commonjs/mol-repr/util.js +4 -2
  264. package/lib/commonjs/mol-repr/volume/isosurface.d.ts +1 -1
  265. package/lib/commonjs/mol-repr/volume/isosurface.js +20 -8
  266. package/lib/commonjs/mol-util/data-source.d.ts +3 -2
  267. package/lib/commonjs/mol-util/data-source.js +18 -41
  268. package/lib/commonjs/mol-util/file-info.js +2 -3
  269. package/lib/commonjs/mol-util/map.d.ts +3 -1
  270. package/lib/commonjs/mol-util/map.js +12 -1
  271. package/lib/commonjs/mol-util/string.d.ts +2 -1
  272. package/lib/commonjs/mol-util/zip/inflate.d.ts +1 -1
  273. package/lib/commonjs/mol-util/zip/zip.d.ts +3 -3
  274. package/lib/commonjs/servers/common/swagger-ui/indexTemplate.js +66 -66
  275. package/lib/commonjs/servers/volume/config.js +5 -5
  276. package/lib/examples/alpha-orbitals/example-data.js +160 -160
  277. package/lib/examples/alpha-orbitals/index.html +72 -72
  278. package/lib/examples/alphafolddb-pae/index.html +57 -57
  279. package/lib/examples/basic-wrapper/index.html +137 -137
  280. package/lib/examples/ihm-restraints/index.html +48 -48
  281. package/lib/examples/ihm-restraints/index.js +26 -26
  282. package/lib/examples/interactions/index.html +45 -45
  283. package/lib/examples/interactions/index.js +2 -2
  284. package/lib/examples/ligand-editor/edits.d.ts +20 -0
  285. package/lib/examples/ligand-editor/edits.js +200 -0
  286. package/lib/examples/ligand-editor/example-data.d.ts +6 -0
  287. package/lib/examples/ligand-editor/example-data.js +52 -0
  288. package/lib/examples/ligand-editor/index.d.ts +7 -0
  289. package/lib/examples/ligand-editor/index.html +58 -0
  290. package/lib/examples/ligand-editor/index.js +339 -0
  291. package/lib/examples/ligand-editor/molfile.d.ts +10 -0
  292. package/lib/examples/ligand-editor/molfile.js +86 -0
  293. package/lib/examples/ligand-editor/r-groups.d.ts +12 -0
  294. package/lib/examples/ligand-editor/r-groups.js +94 -0
  295. package/lib/examples/ligand-editor/utils.d.ts +10 -0
  296. package/lib/examples/ligand-editor/utils.js +35 -0
  297. package/lib/examples/lighting/index.html +88 -88
  298. package/lib/examples/mvs-stories/elements/viewer.js +4 -3
  299. package/lib/examples/mvs-stories/index.html +115 -115
  300. package/lib/examples/mvs-stories/stories/kinase.js +109 -109
  301. package/lib/examples/mvs-stories/stories/tbp.js +74 -74
  302. package/lib/examples/mvs-stories/styles.scss +181 -181
  303. package/lib/examples/proteopedia-wrapper/index.html +236 -236
  304. package/lib/extensions/alpha-orbitals/gpu/shader.frag.js +136 -136
  305. package/lib/extensions/assembly-symmetry/prop.d.ts +1 -1
  306. package/lib/extensions/assembly-symmetry/prop.js +29 -29
  307. package/lib/extensions/dnatco/confal-pyramids/behavior.js +5 -5
  308. package/lib/extensions/dnatco/ntc-tube/behavior.js +5 -5
  309. package/lib/extensions/geo-export/usdz-exporter.js +41 -41
  310. package/lib/extensions/json-cif/encoder.d.ts +33 -0
  311. package/lib/extensions/json-cif/encoder.js +95 -0
  312. package/lib/extensions/json-cif/ligand-graph.d.ts +56 -0
  313. package/lib/extensions/json-cif/ligand-graph.js +257 -0
  314. package/lib/extensions/json-cif/model.d.ts +23 -0
  315. package/lib/extensions/json-cif/model.js +9 -0
  316. package/lib/extensions/json-cif/parser.d.ts +11 -0
  317. package/lib/extensions/json-cif/parser.js +91 -0
  318. package/lib/extensions/json-cif/transformers.d.ts +12 -0
  319. package/lib/extensions/json-cif/transformers.js +26 -0
  320. package/lib/extensions/json-cif/utils.d.ts +11 -0
  321. package/lib/extensions/json-cif/utils.js +31 -0
  322. package/lib/extensions/mvs/behavior.js +2 -2
  323. package/lib/extensions/mvs/components/formats.d.ts +2 -2
  324. package/lib/extensions/mvs/components/formats.js +4 -3
  325. package/lib/extensions/mvs/components/primitives.js +2 -1
  326. package/lib/extensions/mvs/load-generic.d.ts +0 -6
  327. package/lib/extensions/mvs/load-generic.js +0 -8
  328. package/lib/extensions/mvs/load.d.ts +7 -9
  329. package/lib/extensions/mvs/load.js +25 -60
  330. package/lib/extensions/mvs/mvs-data.d.ts +2 -0
  331. package/lib/extensions/mvs/mvs-data.js +18 -0
  332. package/lib/extensions/rcsb/validation-report/prop.d.ts +1 -1
  333. package/lib/extensions/rcsb/validation-report/prop.js +2 -2
  334. package/lib/mol-canvas3d/canvas3d.d.ts +3 -3
  335. package/lib/mol-canvas3d/canvas3d.js +23 -5
  336. package/lib/mol-canvas3d/passes/draw.d.ts +1 -1
  337. package/lib/mol-canvas3d/passes/draw.js +3 -2
  338. package/lib/mol-canvas3d/passes/illumination.d.ts +3 -2
  339. package/lib/mol-canvas3d/passes/illumination.js +10 -3
  340. package/lib/mol-canvas3d/passes/image.d.ts +1 -1
  341. package/lib/mol-canvas3d/passes/image.js +2 -2
  342. package/lib/mol-canvas3d/passes/pick.d.ts +1 -0
  343. package/lib/mol-canvas3d/passes/pick.js +21 -0
  344. package/lib/mol-canvas3d/passes/postprocessing.d.ts +2 -1
  345. package/lib/mol-canvas3d/passes/postprocessing.js +4 -1
  346. package/lib/mol-canvas3d/passes/ssao.d.ts +2 -1
  347. package/lib/mol-canvas3d/passes/ssao.js +5 -1
  348. package/lib/mol-canvas3d/passes/tracing.d.ts +3 -2
  349. package/lib/mol-canvas3d/passes/tracing.js +15 -2
  350. package/lib/mol-geo/geometry/direct-volume/direct-volume.d.ts +4 -0
  351. package/lib/mol-geo/geometry/direct-volume/direct-volume.js +3 -1
  352. package/lib/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +3 -1
  353. package/lib/mol-geo/geometry/texture-mesh/texture-mesh.js +1 -1
  354. package/lib/mol-gl/compute/histogram-pyramid/reduction.d.ts +1 -1
  355. package/lib/mol-gl/compute/histogram-pyramid/reduction.js +2 -2
  356. package/lib/mol-gl/renderable/direct-volume.d.ts +19 -18
  357. package/lib/mol-gl/renderable/direct-volume.js +3 -2
  358. package/lib/mol-gl/shader/background.frag.js +95 -95
  359. package/lib/mol-gl/shader/background.vert.js +11 -11
  360. package/lib/mol-gl/shader/blend-back-dpoit.frag.js +13 -13
  361. package/lib/mol-gl/shader/bloom/blur.frag.js +28 -28
  362. package/lib/mol-gl/shader/bloom/composite.frag.js +33 -33
  363. package/lib/mol-gl/shader/bloom/luminosity.frag.js +52 -52
  364. package/lib/mol-gl/shader/cas.frag.js +144 -144
  365. package/lib/mol-gl/shader/chunks/apply-fog.glsl.js +36 -36
  366. package/lib/mol-gl/shader/chunks/apply-interior-color.glsl.js +12 -12
  367. package/lib/mol-gl/shader/chunks/apply-light-color.glsl.js +103 -103
  368. package/lib/mol-gl/shader/chunks/apply-marker-color.glsl.js +16 -16
  369. package/lib/mol-gl/shader/chunks/assign-clipping-varying.glsl.js +8 -8
  370. package/lib/mol-gl/shader/chunks/assign-color-varying.glsl.js +140 -140
  371. package/lib/mol-gl/shader/chunks/assign-group.glsl.js +6 -6
  372. package/lib/mol-gl/shader/chunks/assign-marker-varying.glsl.js +8 -8
  373. package/lib/mol-gl/shader/chunks/assign-material-color.glsl.js +127 -127
  374. package/lib/mol-gl/shader/chunks/assign-position.glsl.js +14 -14
  375. package/lib/mol-gl/shader/chunks/assign-size.glsl.js +18 -18
  376. package/lib/mol-gl/shader/chunks/check-picking-alpha.glsl.js +12 -12
  377. package/lib/mol-gl/shader/chunks/check-transparency.glsl.js +22 -22
  378. package/lib/mol-gl/shader/chunks/clip-instance.glsl.js +8 -8
  379. package/lib/mol-gl/shader/chunks/clip-pixel.glsl.js +5 -5
  380. package/lib/mol-gl/shader/chunks/color-frag-params.glsl.js +63 -63
  381. package/lib/mol-gl/shader/chunks/color-vert-params.glsl.js +122 -122
  382. package/lib/mol-gl/shader/chunks/common-clip.glsl.js +102 -102
  383. package/lib/mol-gl/shader/chunks/common-frag-params.glsl.js +163 -163
  384. package/lib/mol-gl/shader/chunks/common-vert-params.glsl.js +62 -62
  385. package/lib/mol-gl/shader/chunks/common.glsl.js +267 -267
  386. package/lib/mol-gl/shader/chunks/dpoit-write.glsl.js +62 -62
  387. package/lib/mol-gl/shader/chunks/fade-lod.glsl.js +42 -42
  388. package/lib/mol-gl/shader/chunks/float-to-rgba.glsl.js +39 -39
  389. package/lib/mol-gl/shader/chunks/light-frag-params.glsl.js +127 -127
  390. package/lib/mol-gl/shader/chunks/matrix-scale.glsl.js +5 -5
  391. package/lib/mol-gl/shader/chunks/normal-frag-params.glsl.js +2 -2
  392. package/lib/mol-gl/shader/chunks/read-from-texture.glsl.js +14 -14
  393. package/lib/mol-gl/shader/chunks/rgba-to-float.glsl.js +84 -84
  394. package/lib/mol-gl/shader/chunks/size-vert-params.glsl.js +11 -11
  395. package/lib/mol-gl/shader/chunks/texture3d-from-1d-trilinear.glsl.js +23 -23
  396. package/lib/mol-gl/shader/chunks/texture3d-from-2d-linear.glsl.js +17 -17
  397. package/lib/mol-gl/shader/chunks/texture3d-from-2d-nearest.glsl.js +8 -8
  398. package/lib/mol-gl/shader/chunks/wboit-write.glsl.js +25 -25
  399. package/lib/mol-gl/shader/compose.frag.js +12 -12
  400. package/lib/mol-gl/shader/compute/color-smoothing/accumulate.frag.js +23 -23
  401. package/lib/mol-gl/shader/compute/color-smoothing/accumulate.vert.js +43 -43
  402. package/lib/mol-gl/shader/compute/color-smoothing/normalize.frag.js +15 -15
  403. package/lib/mol-gl/shader/copy.frag.js +11 -11
  404. package/lib/mol-gl/shader/cylinders.frag.js +283 -283
  405. package/lib/mol-gl/shader/cylinders.vert.js +91 -91
  406. package/lib/mol-gl/shader/direct-volume.frag.js +369 -369
  407. package/lib/mol-gl/shader/direct-volume.vert.js +41 -41
  408. package/lib/mol-gl/shader/dof.frag.js +112 -112
  409. package/lib/mol-gl/shader/evaluate-dpoit.frag.js +10 -10
  410. package/lib/mol-gl/shader/evaluate-wboit.frag.js +17 -17
  411. package/lib/mol-gl/shader/fxaa.frag.js +228 -228
  412. package/lib/mol-gl/shader/gaussian-density.frag.js +49 -49
  413. package/lib/mol-gl/shader/gaussian-density.vert.js +27 -27
  414. package/lib/mol-gl/shader/hi-z.frag.js +18 -18
  415. package/lib/mol-gl/shader/histogram-pyramid/reduction.frag.js +58 -58
  416. package/lib/mol-gl/shader/histogram-pyramid/sum.frag.js +19 -19
  417. package/lib/mol-gl/shader/illumination/accumulate.frag.js +12 -12
  418. package/lib/mol-gl/shader/illumination/compose.frag.js +270 -270
  419. package/lib/mol-gl/shader/illumination/trace.frag.js +366 -366
  420. package/lib/mol-gl/shader/image.frag.js +306 -306
  421. package/lib/mol-gl/shader/image.vert.js +23 -23
  422. package/lib/mol-gl/shader/lines.frag.js +47 -47
  423. package/lib/mol-gl/shader/lines.vert.js +118 -118
  424. package/lib/mol-gl/shader/marching-cubes/active-voxels.frag.js +75 -75
  425. package/lib/mol-gl/shader/marching-cubes/isosurface.frag.js +321 -321
  426. package/lib/mol-gl/shader/marking/edge.frag.js +28 -28
  427. package/lib/mol-gl/shader/marking/overlay.frag.js +26 -26
  428. package/lib/mol-gl/shader/mesh.frag.js +74 -74
  429. package/lib/mol-gl/shader/mesh.vert.js +51 -51
  430. package/lib/mol-gl/shader/outlines.frag.js +95 -95
  431. package/lib/mol-gl/shader/points.frag.js +64 -64
  432. package/lib/mol-gl/shader/points.vert.js +40 -40
  433. package/lib/mol-gl/shader/postprocessing.frag.js +188 -188
  434. package/lib/mol-gl/shader/quad.vert.js +10 -10
  435. package/lib/mol-gl/shader/shadows.frag.js +121 -121
  436. package/lib/mol-gl/shader/smaa/blend.frag.js +56 -56
  437. package/lib/mol-gl/shader/smaa/blend.vert.js +25 -25
  438. package/lib/mol-gl/shader/smaa/edges.frag.js +66 -66
  439. package/lib/mol-gl/shader/smaa/edges.vert.js +26 -26
  440. package/lib/mol-gl/shader/smaa/weights.frag.js +206 -206
  441. package/lib/mol-gl/shader/smaa/weights.vert.js +32 -32
  442. package/lib/mol-gl/shader/spheres.frag.js +157 -157
  443. package/lib/mol-gl/shader/spheres.vert.js +134 -134
  444. package/lib/mol-gl/shader/ssao-blur.frag.js +101 -101
  445. package/lib/mol-gl/shader/ssao.frag.js +283 -283
  446. package/lib/mol-gl/shader/text.frag.js +76 -76
  447. package/lib/mol-gl/shader/text.vert.js +87 -87
  448. package/lib/mol-gl/shader/util/grid3d-template.frag.js +46 -46
  449. package/lib/mol-gl/shader-code.js +13 -13
  450. package/lib/mol-gl/webgl/compat.js +12 -12
  451. package/lib/mol-gl/webgl/context.d.ts +3 -3
  452. package/lib/mol-gl/webgl/context.js +5 -5
  453. package/lib/mol-gl/webgl/extensions.d.ts +2 -1
  454. package/lib/mol-gl/webgl/extensions.js +18 -1
  455. package/lib/mol-gl/webgl/resources.d.ts +1 -1
  456. package/lib/mol-gl/webgl/resources.js +3 -1
  457. package/lib/mol-gl/webgl/texture.d.ts +1 -1
  458. package/lib/mol-gl/webgl/texture.js +40 -26
  459. package/lib/mol-gl/webgl/timer.d.ts +1 -1
  460. package/lib/mol-gl/webgl/timer.js +7 -6
  461. package/lib/mol-io/common/string-like.d.ts +97 -0
  462. package/lib/mol-io/common/string-like.js +190 -0
  463. package/lib/mol-io/common/utf8.d.ts +5 -1
  464. package/lib/mol-io/common/utf8.js +11 -1
  465. package/lib/mol-io/reader/cif/binary/parser.js +3 -3
  466. package/lib/mol-io/reader/cif/text/parser.d.ts +2 -1
  467. package/lib/mol-io/reader/cif.d.ts +2 -1
  468. package/lib/mol-io/reader/cif.js +2 -1
  469. package/lib/mol-io/reader/common/text/number-parser.d.ts +5 -4
  470. package/lib/mol-io/reader/common/text/tokenizer.d.ts +7 -6
  471. package/lib/mol-io/reader/cube/parser.d.ts +2 -1
  472. package/lib/mol-io/reader/dx/parser.d.ts +2 -1
  473. package/lib/mol-io/reader/dx/parser.js +3 -2
  474. package/lib/mol-io/reader/gro/parser.d.ts +2 -1
  475. package/lib/mol-io/reader/lammps/data/parser.d.ts +2 -1
  476. package/lib/mol-io/reader/lammps/traj/parser.d.ts +2 -1
  477. package/lib/mol-io/reader/mol/parser.d.ts +10 -4
  478. package/lib/mol-io/reader/mol/parser.js +16 -5
  479. package/lib/mol-io/reader/mol2/parser.d.ts +2 -1
  480. package/lib/mol-io/reader/pdb/parser.d.ts +2 -1
  481. package/lib/mol-io/reader/ply/parser.d.ts +2 -1
  482. package/lib/mol-io/reader/prmtop/parser.d.ts +2 -1
  483. package/lib/mol-io/reader/prmtop/parser.js +4 -4
  484. package/lib/mol-io/reader/psf/parser.d.ts +2 -1
  485. package/lib/mol-io/reader/sdf/parser.d.ts +2 -1
  486. package/lib/mol-io/reader/sdf/parser.js +2 -2
  487. package/lib/mol-io/reader/top/parser.d.ts +2 -1
  488. package/lib/mol-io/reader/top/parser.js +6 -6
  489. package/lib/mol-io/reader/xyz/parser.d.ts +2 -1
  490. package/lib/mol-model/structure/export/categories/atom_site.d.ts +3 -1
  491. package/lib/mol-model/structure/export/categories/atom_site.js +48 -40
  492. package/lib/mol-model/structure/export/categories/molstar_bond_site.d.ts +19 -0
  493. package/lib/mol-model/structure/export/categories/molstar_bond_site.js +119 -0
  494. package/lib/mol-model/structure/export/mmcif.d.ts +18 -2
  495. package/lib/mol-model/structure/export/mmcif.js +29 -8
  496. package/lib/mol-model/structure/model/model.js +2 -0
  497. package/lib/mol-model-formats/structure/mmcif.js +72 -0
  498. package/lib/mol-model-formats/structure/mol.js +1 -1
  499. package/lib/mol-model-formats/structure/pdb/anisotropic.d.ts +2 -1
  500. package/lib/mol-model-formats/structure/pdb/atom-site.d.ts +2 -1
  501. package/lib/mol-model-formats/structure/pdb/header.d.ts +5 -4
  502. package/lib/mol-model-formats/structure/pdb/header.js +5 -0
  503. package/lib/mol-model-formats/structure/pdb/to-cif.js +2 -2
  504. package/lib/mol-model-formats/structure/util.d.ts +2 -1
  505. package/lib/mol-plugin/version.js +2 -2
  506. package/lib/mol-plugin-state/formats/provider.d.ts +4 -3
  507. package/lib/mol-plugin-state/formats/volume.d.ts +4 -4
  508. package/lib/mol-plugin-state/manager/snapshots.js +4 -4
  509. package/lib/mol-plugin-state/objects.d.ts +4 -3
  510. package/lib/mol-plugin-state/transforms/data.d.ts +1 -1
  511. package/lib/mol-plugin-state/transforms/data.js +5 -4
  512. package/lib/mol-plugin-ui/skin/base/base.scss +43 -43
  513. package/lib/mol-plugin-ui/skin/base/components/controls-base.scss +337 -337
  514. package/lib/mol-plugin-ui/skin/base/components/controls.scss +463 -463
  515. package/lib/mol-plugin-ui/skin/base/components/help.scss +27 -27
  516. package/lib/mol-plugin-ui/skin/base/components/line-graph.scss +67 -67
  517. package/lib/mol-plugin-ui/skin/base/components/log.scss +102 -102
  518. package/lib/mol-plugin-ui/skin/base/components/misc.scss +668 -668
  519. package/lib/mol-plugin-ui/skin/base/components/sequence.scss +133 -133
  520. package/lib/mol-plugin-ui/skin/base/components/slider.scss +165 -165
  521. package/lib/mol-plugin-ui/skin/base/components/tasks.scss +99 -99
  522. package/lib/mol-plugin-ui/skin/base/components/toast.scss +83 -83
  523. package/lib/mol-plugin-ui/skin/base/components/transformer.scss +163 -163
  524. package/lib/mol-plugin-ui/skin/base/components/viewport.scss +197 -197
  525. package/lib/mol-plugin-ui/skin/base/layout/common.scss +71 -71
  526. package/lib/mol-plugin-ui/skin/base/layout/controls-landscape.scss +89 -89
  527. package/lib/mol-plugin-ui/skin/base/layout/controls-outside.scss +98 -98
  528. package/lib/mol-plugin-ui/skin/base/layout/controls-portrait.scss +108 -108
  529. package/lib/mol-plugin-ui/skin/base/layout.scss +40 -40
  530. package/lib/mol-plugin-ui/skin/base/logo.scss +12 -12
  531. package/lib/mol-plugin-ui/skin/base/normalize.scss +209 -209
  532. package/lib/mol-plugin-ui/skin/base/ui.scss +41 -41
  533. package/lib/mol-plugin-ui/skin/base/variables.scss +91 -91
  534. package/lib/mol-plugin-ui/skin/blue.scss +1 -1
  535. package/lib/mol-plugin-ui/skin/colors/blue.scss +25 -25
  536. package/lib/mol-plugin-ui/skin/colors/dark.scss +25 -25
  537. package/lib/mol-plugin-ui/skin/colors/light.scss +27 -27
  538. package/lib/mol-plugin-ui/skin/dark.scss +1 -1
  539. package/lib/mol-plugin-ui/skin/light.scss +1 -1
  540. package/lib/mol-plugin-ui/viewport/screenshot.js +4 -4
  541. package/lib/mol-repr/structure/visual/gaussian-density-volume.d.ts +1 -1
  542. package/lib/mol-repr/structure/visual/gaussian-density-volume.js +42 -25
  543. package/lib/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +1 -1
  544. package/lib/mol-repr/structure/visual/gaussian-surface-mesh.js +47 -31
  545. package/lib/mol-repr/structure/visual/util/gaussian.d.ts +5 -5
  546. package/lib/mol-repr/structure/visual/util/gaussian.js +5 -13
  547. package/lib/mol-repr/util.js +4 -2
  548. package/lib/mol-repr/volume/isosurface.d.ts +1 -1
  549. package/lib/mol-repr/volume/isosurface.js +20 -8
  550. package/lib/mol-util/data-source.d.ts +3 -2
  551. package/lib/mol-util/data-source.js +19 -42
  552. package/lib/mol-util/file-info.js +2 -3
  553. package/lib/mol-util/map.d.ts +3 -1
  554. package/lib/mol-util/map.js +11 -1
  555. package/lib/mol-util/string.d.ts +2 -1
  556. package/lib/mol-util/zip/inflate.d.ts +1 -1
  557. package/lib/mol-util/zip/zip.d.ts +3 -3
  558. package/lib/servers/common/swagger-ui/indexTemplate.js +66 -66
  559. package/lib/servers/volume/config.js +5 -5
  560. package/package.json +220 -220
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License
2
-
3
- Copyright (c) 2017 - now, Mol* contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1
+ The MIT License
2
+
3
+ Copyright (c) 2017 - now, Mol* contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
21
  THE SOFTWARE.
package/README.md CHANGED
@@ -1,205 +1,205 @@
1
- [![License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](./LICENSE)
2
- [![npm version](https://badge.fury.io/js/molstar.svg)](https://www.npmjs.com/package/molstar)
3
- [![Build](https://github.com/molstar/molstar/actions/workflows/node.yml/badge.svg)](https://github.com/molstar/molstar/actions/workflows/node.yml)
4
- [![Gitter](https://badges.gitter.im/molstar/Lobby.svg)](https://gitter.im/molstar/Lobby)
5
-
6
- # Mol*
7
-
8
- The goal of **Mol\*** (*/'mol-star/*) is to provide a technology stack that serves as a basis for the next-generation data delivery and analysis tools for (not only) macromolecular structure data. Mol* development was jointly initiated by PDBe and RCSB PDB to combine and build on the strengths of [LiteMol](https://litemol.org) (developed by PDBe) and [NGL](https://nglviewer.org) (developed by RCSB PDB) viewers.
9
-
10
- When using Mol*, please cite:
11
-
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
-
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
-
21
- ## Project Structure Overview
22
-
23
- The core of Mol* consists of these modules (see under `src/`):
24
-
25
- - `mol-task` Computation abstraction with progress tracking and cancellation support.
26
- - `mol-data` Collections (integer-based sets, interface to columns/tables, etc.)
27
- - `mol-math` Math related (loosely) algorithms and data structures.
28
- - `mol-io` Parsing library. Each format is parsed into an interface that corresponds to the data stored by it. Support for common coordinate, experimental/map, and annotation data formats.
29
- - `mol-model` Data structures and algorithms (such as querying) for representing molecular data (including coordinate, experimental/map, and annotation data).
30
- - `mol-model-formats` Data format parsers for `mol-model`.
31
- - `mol-model-props` Common "custom properties".
32
- - `mol-script` A scripting language for creating representations/scenes and querying (includes the [MolQL query language](https://molql.github.io)).
33
- - `mol-geo` Creating (molecular) geometries.
34
- - `mol-theme` Theming for structure, volume and shape representations.
35
- - `mol-repr` Molecular representations for structures, volumes and shapes.
36
- - `mol-gl` A wrapper around WebGL.
37
- - `mol-canvas3d` A low-level 3d view component. Uses `mol-geo` to generate geometries.
38
- - `mol-state` State representation tree with state saving and automatic updates.
39
- - `mol-plugin` Allow to define modular Mol* plugin instances utilizing `mol-state` and `mol-canvas3d`.
40
- - `mol-plugin-state` State transformations, builders, and managers.
41
- - `mol-plugin-ui` React-based user interface for the Mol* plugin. Some components of the UI are usable outside the main plugin and can be integrated into 3rd party solutions.
42
- - `mol-util` Useful things that do not fit elsewhere.
43
-
44
- Moreover, the project contains the implementation of `servers`, including
45
-
46
- - `servers/model` A tool for accessing coordinate and annotation data of molecular structures.
47
- - `servers/volume` A tool for accessing volumetric experimental data related to molecular structures.
48
- - `servers/plugin-state` A basic server to store Mol* Plugin states.
49
-
50
- The project also contains performance tests (`perf-tests`), `examples`, and `cli` apps (CIF to BinaryCIF converter and JSON domain annotation to CIF converter).
51
-
52
- ## Previous Work
53
- This project builds on experience from previous solutions:
54
- - [LiteMol Suite](https://www.litemol.org)
55
- - [WebChemistry](https://webchem.ncbr.muni.cz)
56
- - [NGL Viewer](http://nglviewer.org)
57
- - [MMTF](http://mmtf.rcsb.org)
58
- - [MolQL](http://molql.org)
59
- - [PDB Component Library](https://www.ebi.ac.uk/pdbe/pdb-component-library/)
60
- - And many others (list will be continuously expanded).
61
-
62
- ## Building & Running
63
-
64
- ### Build:
65
- npm install
66
- npm run build
67
-
68
- ### Build automatically on file save:
69
- npm run watch
70
-
71
- If working on just the viewer, ``npm run watch-viewer`` will provide shorter compile times.
72
-
73
- ### Build with debug mode enabled:
74
- DEBUG=molstar npm run watch
75
-
76
- Debug/production mode in browsers can be turned on/off during runtime by calling ``setMolStarDebugMode(true/false, true/false)`` from the dev console.
77
-
78
- ### Cleaning and forcing a full rebuild
79
- npm run clean
80
-
81
- Wipes the `build` and `lib` directories and `.tsbuildinfo` files.
82
-
83
- npm run rebuild
84
-
85
- Runs the cleanup script prior to building the project, forcing a full rebuild of the project.
86
-
87
- Use these commands to resolve occasional build failures which may arise after some dependency updates. Once done, `npm run build` should work again. Note that full rebuilds take more time to complete.
88
-
89
- ### Develop with `esbuild`
90
-
91
- Experimental support for faster builds with `esbuild`
92
- - `npm run dev:all` - watch mode for all apps and examples
93
- - `npm run dev:viewer` - watch mode for viewer
94
- - `npm run dev:apps` - watch mode for all apps
95
- - `npm run dev:examples` - watch mode for all examples
96
- - `npm run dev -- -a <app name 1> <app name 2> -e <example name 1> ...` - watch mode for specified apps/examples. `-a`/`-e` with without any names will build everything.
97
-
98
- ### Build for production:
99
- NODE_ENV=production npm run build
100
-
101
- **Run**
102
-
103
- If not installed previously:
104
-
105
- npm install -g http-server
106
-
107
- ...or a similar solution.
108
-
109
- From the root of the project:
110
-
111
- http-server -p PORT-NUMBER
112
-
113
- and navigate to `build/viewer`
114
-
115
- ### Code generation
116
- **CIF schemas**
117
-
118
- node ./lib/commonjs/cli/cifschema -mip ../../../../mol-data -o src/mol-io/reader/cif/schema/mmcif.ts -p mmCIF
119
- node ./lib/commonjs/cli/cifschema -mip ../../../../mol-data -o src/mol-io/reader/cif/schema/ccd.ts -p CCD
120
- node ./lib/commonjs/cli/cifschema -mip ../../../../mol-data -o src/mol-io/reader/cif/schema/bird.ts -p BIRD
121
- node ./lib/commonjs/cli/cifschema -mip ../../../../mol-data -o src/mol-io/reader/cif/schema/cif-core.ts -p CifCore -aa
122
-
123
- **Lipid names**
124
-
125
- node lib/commonjs/cli/lipid-params -o src/mol-model/structure/model/types/lipids.ts
126
-
127
- **Ion names**
128
-
129
- node --max-old-space-size=4096 lib/commonjs/cli/chem-comp-dict/create-ions.js src/mol-model/structure/model/types/ions.ts
130
-
131
- **Saccharide names**
132
-
133
- node --max-old-space-size=4096 lib/commonjs/cli/chem-comp-dict/create-saccharides.js src/mol-model/structure/model/types/saccharides.ts
134
-
135
- ### Other scripts
136
- **Create chem comp bond table**
137
-
138
- node --max-old-space-size=4096 lib/commonjs/cli/chem-comp-dict/create-table.js build/data/ccb.bcif -b
139
-
140
- **Test model server**
141
-
142
- export NODE_PATH="lib"; node build/src/servers/model/test.js
143
-
144
- **State Transformer Docs**
145
-
146
- export NODE_PATH="lib"; node build/state-docs
147
-
148
- **Convert any CIF to BinaryCIF (or vice versa)**
149
-
150
- node lib/commonjs/servers/model/preprocess -i file.cif -ob file.bcif
151
-
152
- To see all available commands, use ``node lib/commonjs/servers/model/preprocess -h``.
153
-
154
- Or
155
-
156
- node lib/commonjs/cli/cif2bcif
157
-
158
- E.g.
159
-
160
- node lib/commonjs/cli/cif2bcif src.cif out.bcif.gz
161
- node lib/commonjs/cli/cif2bcif src.bcif.gz out.cif
162
-
163
- ## Development
164
-
165
- ### Installation
166
-
167
- If node complains about a missing acorn peer dependency, run the following commands
168
-
169
- npm update acorn --depth 20
170
- npm dedupe
171
-
172
- ### Editor
173
-
174
- To get syntax highlighting for shader files add the following to Visual Code's settings files and make sure relevant extensions are installed in the editor.
175
-
176
- "files.associations": {
177
- "*.glsl.ts": "glsl",
178
- "*.frag.ts": "glsl",
179
- "*.vert.ts": "glsl"
180
- },
181
-
182
- ## Publish
183
-
184
- ### Prerelease
185
- npm version prerelease # assumes the current version ends with '-dev.X'
186
- npm publish --tag next
187
-
188
- ### Release
189
- npm version 0.X.0 # provide valid semver string
190
- npm publish
191
-
192
- ## Deploy
193
- npm run test
194
- npm run build
195
- node ./scripts/deploy.js # currently updates the viewer on molstar.org/viewer
196
-
197
- ## Contributing
198
- Just open an issue or make a pull request. All contributions are welcome.
199
-
200
- ## Funding
201
- Funding sources include but are not limited to:
202
- * [RCSB PDB](https://www.rcsb.org) funding by a grant [DBI-1338415; PI: SK Burley] from the NSF, the NIH, and the US DoE
203
- * [PDBe, EMBL-EBI](https://pdbe.org)
204
- * [CEITEC](https://www.ceitec.eu/)
205
- * [EntosAI](https://www.entos.ai)
1
+ [![License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](./LICENSE)
2
+ [![npm version](https://badge.fury.io/js/molstar.svg)](https://www.npmjs.com/package/molstar)
3
+ [![Build](https://github.com/molstar/molstar/actions/workflows/node.yml/badge.svg)](https://github.com/molstar/molstar/actions/workflows/node.yml)
4
+ [![Gitter](https://badges.gitter.im/molstar/Lobby.svg)](https://gitter.im/molstar/Lobby)
5
+
6
+ # Mol*
7
+
8
+ The goal of **Mol\*** (*/'mol-star/*) is to provide a technology stack that serves as a basis for the next-generation data delivery and analysis tools for (not only) macromolecular structure data. Mol* development was jointly initiated by PDBe and RCSB PDB to combine and build on the strengths of [LiteMol](https://litemol.org) (developed by PDBe) and [NGL](https://nglviewer.org) (developed by RCSB PDB) viewers.
9
+
10
+ When using Mol*, please cite:
11
+
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
+
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
+
21
+ ## Project Structure Overview
22
+
23
+ The core of Mol* consists of these modules (see under `src/`):
24
+
25
+ - `mol-task` Computation abstraction with progress tracking and cancellation support.
26
+ - `mol-data` Collections (integer-based sets, interface to columns/tables, etc.)
27
+ - `mol-math` Math related (loosely) algorithms and data structures.
28
+ - `mol-io` Parsing library. Each format is parsed into an interface that corresponds to the data stored by it. Support for common coordinate, experimental/map, and annotation data formats.
29
+ - `mol-model` Data structures and algorithms (such as querying) for representing molecular data (including coordinate, experimental/map, and annotation data).
30
+ - `mol-model-formats` Data format parsers for `mol-model`.
31
+ - `mol-model-props` Common "custom properties".
32
+ - `mol-script` A scripting language for creating representations/scenes and querying (includes the [MolQL query language](https://molql.github.io)).
33
+ - `mol-geo` Creating (molecular) geometries.
34
+ - `mol-theme` Theming for structure, volume and shape representations.
35
+ - `mol-repr` Molecular representations for structures, volumes and shapes.
36
+ - `mol-gl` A wrapper around WebGL.
37
+ - `mol-canvas3d` A low-level 3d view component. Uses `mol-geo` to generate geometries.
38
+ - `mol-state` State representation tree with state saving and automatic updates.
39
+ - `mol-plugin` Allow to define modular Mol* plugin instances utilizing `mol-state` and `mol-canvas3d`.
40
+ - `mol-plugin-state` State transformations, builders, and managers.
41
+ - `mol-plugin-ui` React-based user interface for the Mol* plugin. Some components of the UI are usable outside the main plugin and can be integrated into 3rd party solutions.
42
+ - `mol-util` Useful things that do not fit elsewhere.
43
+
44
+ Moreover, the project contains the implementation of `servers`, including
45
+
46
+ - `servers/model` A tool for accessing coordinate and annotation data of molecular structures.
47
+ - `servers/volume` A tool for accessing volumetric experimental data related to molecular structures.
48
+ - `servers/plugin-state` A basic server to store Mol* Plugin states.
49
+
50
+ The project also contains performance tests (`perf-tests`), `examples`, and `cli` apps (CIF to BinaryCIF converter and JSON domain annotation to CIF converter).
51
+
52
+ ## Previous Work
53
+ This project builds on experience from previous solutions:
54
+ - [LiteMol Suite](https://www.litemol.org)
55
+ - [WebChemistry](https://webchem.ncbr.muni.cz)
56
+ - [NGL Viewer](http://nglviewer.org)
57
+ - [MMTF](http://mmtf.rcsb.org)
58
+ - [MolQL](http://molql.org)
59
+ - [PDB Component Library](https://www.ebi.ac.uk/pdbe/pdb-component-library/)
60
+ - And many others (list will be continuously expanded).
61
+
62
+ ## Building & Running
63
+
64
+ ### Build:
65
+ npm install
66
+ npm run build
67
+
68
+ ### Build automatically on file save:
69
+ npm run watch
70
+
71
+ If working on just the viewer, ``npm run watch-viewer`` will provide shorter compile times.
72
+
73
+ ### Build with debug mode enabled:
74
+ DEBUG=molstar npm run watch
75
+
76
+ Debug/production mode in browsers can be turned on/off during runtime by calling ``setMolStarDebugMode(true/false, true/false)`` from the dev console.
77
+
78
+ ### Cleaning and forcing a full rebuild
79
+ npm run clean
80
+
81
+ Wipes the `build` and `lib` directories and `.tsbuildinfo` files.
82
+
83
+ npm run rebuild
84
+
85
+ Runs the cleanup script prior to building the project, forcing a full rebuild of the project.
86
+
87
+ Use these commands to resolve occasional build failures which may arise after some dependency updates. Once done, `npm run build` should work again. Note that full rebuilds take more time to complete.
88
+
89
+ ### Develop with `esbuild`
90
+
91
+ Experimental support for faster builds with `esbuild`
92
+ - `npm run dev:all` - watch mode for all apps and examples
93
+ - `npm run dev:viewer` - watch mode for viewer
94
+ - `npm run dev:apps` - watch mode for all apps
95
+ - `npm run dev:examples` - watch mode for all examples
96
+ - `npm run dev -- -a <app name 1> <app name 2> -e <example name 1> ...` - watch mode for specified apps/examples. `-a`/`-e` with without any names will build everything.
97
+
98
+ ### Build for production:
99
+ NODE_ENV=production npm run build
100
+
101
+ **Run**
102
+
103
+ If not installed previously:
104
+
105
+ npm install -g http-server
106
+
107
+ ...or a similar solution.
108
+
109
+ From the root of the project:
110
+
111
+ http-server -p PORT-NUMBER
112
+
113
+ and navigate to `build/viewer`
114
+
115
+ ### Code generation
116
+ **CIF schemas**
117
+
118
+ node ./lib/commonjs/cli/cifschema -mip ../../../../mol-data -o src/mol-io/reader/cif/schema/mmcif.ts -p mmCIF
119
+ node ./lib/commonjs/cli/cifschema -mip ../../../../mol-data -o src/mol-io/reader/cif/schema/ccd.ts -p CCD
120
+ node ./lib/commonjs/cli/cifschema -mip ../../../../mol-data -o src/mol-io/reader/cif/schema/bird.ts -p BIRD
121
+ node ./lib/commonjs/cli/cifschema -mip ../../../../mol-data -o src/mol-io/reader/cif/schema/cif-core.ts -p CifCore -aa
122
+
123
+ **Lipid names**
124
+
125
+ node lib/commonjs/cli/lipid-params -o src/mol-model/structure/model/types/lipids.ts
126
+
127
+ **Ion names**
128
+
129
+ node --max-old-space-size=4096 lib/commonjs/cli/chem-comp-dict/create-ions.js src/mol-model/structure/model/types/ions.ts
130
+
131
+ **Saccharide names**
132
+
133
+ node --max-old-space-size=4096 lib/commonjs/cli/chem-comp-dict/create-saccharides.js src/mol-model/structure/model/types/saccharides.ts
134
+
135
+ ### Other scripts
136
+ **Create chem comp bond table**
137
+
138
+ node --max-old-space-size=4096 lib/commonjs/cli/chem-comp-dict/create-table.js build/data/ccb.bcif -b
139
+
140
+ **Test model server**
141
+
142
+ export NODE_PATH="lib"; node build/src/servers/model/test.js
143
+
144
+ **State Transformer Docs**
145
+
146
+ export NODE_PATH="lib"; node build/state-docs
147
+
148
+ **Convert any CIF to BinaryCIF (or vice versa)**
149
+
150
+ node lib/commonjs/servers/model/preprocess -i file.cif -ob file.bcif
151
+
152
+ To see all available commands, use ``node lib/commonjs/servers/model/preprocess -h``.
153
+
154
+ Or
155
+
156
+ node lib/commonjs/cli/cif2bcif
157
+
158
+ E.g.
159
+
160
+ node lib/commonjs/cli/cif2bcif src.cif out.bcif.gz
161
+ node lib/commonjs/cli/cif2bcif src.bcif.gz out.cif
162
+
163
+ ## Development
164
+
165
+ ### Installation
166
+
167
+ If node complains about a missing acorn peer dependency, run the following commands
168
+
169
+ npm update acorn --depth 20
170
+ npm dedupe
171
+
172
+ ### Editor
173
+
174
+ To get syntax highlighting for shader files add the following to Visual Code's settings files and make sure relevant extensions are installed in the editor.
175
+
176
+ "files.associations": {
177
+ "*.glsl.ts": "glsl",
178
+ "*.frag.ts": "glsl",
179
+ "*.vert.ts": "glsl"
180
+ },
181
+
182
+ ## Publish
183
+
184
+ ### Prerelease
185
+ npm version prerelease # assumes the current version ends with '-dev.X'
186
+ npm publish --tag next
187
+
188
+ ### Release
189
+ npm version 0.X.0 # provide valid semver string
190
+ npm publish
191
+
192
+ ## Deploy
193
+ npm run test
194
+ npm run build
195
+ node ./scripts/deploy.js # currently updates the viewer on molstar.org/viewer
196
+
197
+ ## Contributing
198
+ Just open an issue or make a pull request. All contributions are welcome.
199
+
200
+ ## Funding
201
+ Funding sources include but are not limited to:
202
+ * [RCSB PDB](https://www.rcsb.org) funding by a grant [DBI-1338415; PI: SK Burley] from the NSF, the NIH, and the US DoE
203
+ * [PDBe, EMBL-EBI](https://pdbe.org)
204
+ * [CEITEC](https://www.ceitec.eu/)
205
+ * [EntosAI](https://www.entos.ai)
@@ -1,53 +1,53 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
6
- <link rel="icon" href="./favicon.ico" type="image/x-icon">
7
- <title>Embedded Mol* Viewer</title>
8
- <style>
9
- #app {
10
- position: absolute;
11
- left: 100px;
12
- top: 100px;
13
- width: 800px;
14
- height: 600px;
15
- }
16
- </style>
17
- <link rel="stylesheet" type="text/css" href="molstar.css" />
18
- </head>
19
- <body>
20
- <div id="app"></div>
21
- <script type="text/javascript" src="./molstar.js"></script>
22
- <script type="text/javascript">
23
- molstar.Viewer.create('app', {
24
- layoutIsExpanded: true,
25
- layoutShowControls: false,
26
- layoutShowRemoteState: false,
27
- layoutShowSequence: true,
28
- layoutShowLog: false,
29
- layoutShowLeftPanel: true,
30
-
31
- viewportShowExpand: true,
32
- viewportShowSelectionMode: false,
33
- viewportShowAnimation: false,
34
-
35
- pdbProvider: 'rcsb',
36
- emdbProvider: 'rcsb',
37
- }).then(viewer => {
38
- viewer.loadPdb('7bv2');
39
- viewer.loadEmdb('EMD-30210', { detail: 6 });
40
- // viewer.loadAllModelsOrAssemblyFromUrl('https://cs.litemol.org/5ire/full', 'mmcif', false, { representationParams: { theme: { globalName: 'operator-name' } } })
41
- // viewer.loadStructureFromUrl('my url', 'pdb', false, {
42
- // representationParams: {
43
- // theme: {
44
- // globalName: 'uniform',
45
- // globalColorParams: { value: 0xff0000 }
46
- // }
47
- // },
48
- // label: 'my structure'
49
- // });
50
- });
51
- </script>
52
- </body>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
6
+ <link rel="icon" href="./favicon.ico" type="image/x-icon">
7
+ <title>Embedded Mol* Viewer</title>
8
+ <style>
9
+ #app {
10
+ position: absolute;
11
+ left: 100px;
12
+ top: 100px;
13
+ width: 800px;
14
+ height: 600px;
15
+ }
16
+ </style>
17
+ <link rel="stylesheet" type="text/css" href="molstar.css" />
18
+ </head>
19
+ <body>
20
+ <div id="app"></div>
21
+ <script type="text/javascript" src="./molstar.js"></script>
22
+ <script type="text/javascript">
23
+ molstar.Viewer.create('app', {
24
+ layoutIsExpanded: true,
25
+ layoutShowControls: false,
26
+ layoutShowRemoteState: false,
27
+ layoutShowSequence: true,
28
+ layoutShowLog: false,
29
+ layoutShowLeftPanel: true,
30
+
31
+ viewportShowExpand: true,
32
+ viewportShowSelectionMode: false,
33
+ viewportShowAnimation: false,
34
+
35
+ pdbProvider: 'rcsb',
36
+ emdbProvider: 'rcsb',
37
+ }).then(viewer => {
38
+ viewer.loadPdb('7bv2');
39
+ viewer.loadEmdb('EMD-30210', { detail: 6 });
40
+ // viewer.loadAllModelsOrAssemblyFromUrl('https://cs.litemol.org/5ire/full', 'mmcif', false, { representationParams: { theme: { globalName: 'operator-name' } } })
41
+ // viewer.loadStructureFromUrl('my url', 'pdb', false, {
42
+ // representationParams: {
43
+ // theme: {
44
+ // globalName: 'uniform',
45
+ // globalColorParams: { value: 0xff0000 }
46
+ // }
47
+ // },
48
+ // label: 'my structure'
49
+ // });
50
+ });
51
+ </script>
52
+ </body>
53
53
  </html>