molstar 3.5.0 → 3.7.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 (359) hide show
  1. package/build/viewer/index.html +1 -1
  2. package/build/viewer/molstar.css +1 -1
  3. package/build/viewer/molstar.js +1 -1
  4. package/build/viewer/molstar.js.LICENSE.txt +12 -14
  5. package/lib/apps/docking-viewer/index.js +1 -1
  6. package/lib/apps/viewer/app.js +1 -1
  7. package/lib/apps/viewer/index.html +1 -1
  8. package/lib/cli/chem-comp-dict/util.d.ts +20 -20
  9. package/lib/cli/cifschema/util/cif-dic.d.ts +1 -1
  10. package/lib/cli/cifschema/util/cif-dic.js +7 -5
  11. package/lib/cli/cifschema/util/generate.d.ts +1 -1
  12. package/lib/cli/cifschema/util/generate.js +12 -3
  13. package/lib/cli/cifschema/util/schema.d.ts +3 -3
  14. package/lib/cli/cifschema/util/schema.js +1 -1
  15. package/lib/commonjs/apps/docking-viewer/index.js +2 -2
  16. package/lib/commonjs/apps/viewer/app.js +2 -2
  17. package/lib/commonjs/cli/chem-comp-dict/util.d.ts +20 -20
  18. package/lib/commonjs/cli/cifschema/util/cif-dic.d.ts +1 -1
  19. package/lib/commonjs/cli/cifschema/util/cif-dic.js +7 -5
  20. package/lib/commonjs/cli/cifschema/util/generate.d.ts +1 -1
  21. package/lib/commonjs/cli/cifschema/util/generate.js +12 -3
  22. package/lib/commonjs/cli/cifschema/util/schema.d.ts +3 -3
  23. package/lib/commonjs/cli/cifschema/util/schema.js +1 -1
  24. package/lib/commonjs/examples/alpha-orbitals/index.js +22 -17
  25. package/lib/commonjs/examples/basic-wrapper/index.js +2 -2
  26. package/lib/commonjs/examples/lighting/index.js +2 -2
  27. package/lib/commonjs/examples/proteopedia-wrapper/index.js +2 -2
  28. package/lib/commonjs/extensions/anvil/behavior.d.ts +1 -0
  29. package/lib/commonjs/extensions/anvil/representation.d.ts +4 -0
  30. package/lib/commonjs/extensions/cellpack/representation.d.ts +1 -0
  31. package/lib/commonjs/extensions/dnatco/confal-pyramids/representation.d.ts +3 -0
  32. package/lib/commonjs/extensions/rcsb/assembly-symmetry/behavior.d.ts +1 -0
  33. package/lib/commonjs/extensions/rcsb/assembly-symmetry/representation.d.ts +1 -0
  34. package/lib/commonjs/extensions/rcsb/validation-report/representation.d.ts +5 -0
  35. package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +2 -0
  36. package/lib/commonjs/mol-canvas3d/helper/camera-helper.d.ts +1 -0
  37. package/lib/commonjs/mol-canvas3d/helper/handle-helper.d.ts +1 -0
  38. package/lib/commonjs/mol-canvas3d/helper/helper.d.ts +2 -0
  39. package/lib/commonjs/mol-canvas3d/passes/image.d.ts +1 -0
  40. package/lib/commonjs/mol-data/db/column.d.ts +10 -3
  41. package/lib/commonjs/mol-data/db/column.js +39 -17
  42. package/lib/commonjs/mol-geo/geometry/color-data.d.ts +2 -8
  43. package/lib/commonjs/mol-geo/geometry/color-data.js +16 -3
  44. package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +4 -2
  45. package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.js +4 -3
  46. package/lib/commonjs/mol-geo/geometry/mesh/mesh.d.ts +2 -1
  47. package/lib/commonjs/mol-geo/geometry/mesh/mesh.js +4 -3
  48. package/lib/commonjs/mol-geo/geometry/spheres/spheres.d.ts +2 -1
  49. package/lib/commonjs/mol-geo/geometry/spheres/spheres.js +4 -3
  50. package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +2 -1
  51. package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.js +16 -5
  52. package/lib/commonjs/mol-gl/renderable/cylinders.d.ts +2 -1
  53. package/lib/commonjs/mol-gl/renderable/cylinders.js +2 -2
  54. package/lib/commonjs/mol-gl/renderable/mesh.d.ts +2 -1
  55. package/lib/commonjs/mol-gl/renderable/mesh.js +2 -2
  56. package/lib/commonjs/mol-gl/renderable/spheres.d.ts +2 -1
  57. package/lib/commonjs/mol-gl/renderable/spheres.js +2 -2
  58. package/lib/commonjs/mol-gl/renderable/texture-mesh.d.ts +2 -1
  59. package/lib/commonjs/mol-gl/renderable/texture-mesh.js +2 -2
  60. package/lib/commonjs/mol-gl/renderer.js +54 -23
  61. package/lib/commonjs/mol-gl/shader/chunks/apply-interior-color.glsl.d.ts +1 -1
  62. package/lib/commonjs/mol-gl/shader/chunks/apply-interior-color.glsl.js +1 -1
  63. package/lib/commonjs/mol-gl/shader/chunks/check-picking-alpha.glsl.d.ts +1 -1
  64. package/lib/commonjs/mol-gl/shader/chunks/check-picking-alpha.glsl.js +1 -1
  65. package/lib/commonjs/mol-gl/shader/chunks/color-vert-params.glsl.d.ts +1 -1
  66. package/lib/commonjs/mol-gl/shader/chunks/color-vert-params.glsl.js +1 -1
  67. package/lib/commonjs/mol-gl/shader/chunks/wboit-write.glsl.d.ts +2 -2
  68. package/lib/commonjs/mol-gl/shader/chunks/wboit-write.glsl.js +2 -2
  69. package/lib/commonjs/mol-gl/shader/direct-volume.frag.d.ts +1 -1
  70. package/lib/commonjs/mol-gl/shader/direct-volume.frag.js +1 -1
  71. package/lib/commonjs/mol-gl/shader/image.frag.d.ts +2 -2
  72. package/lib/commonjs/mol-gl/shader/image.frag.js +2 -2
  73. package/lib/commonjs/mol-gl/shader/lines.frag.d.ts +2 -2
  74. package/lib/commonjs/mol-gl/shader/lines.frag.js +2 -2
  75. package/lib/commonjs/mol-gl/shader/points.frag.d.ts +2 -2
  76. package/lib/commonjs/mol-gl/shader/points.frag.js +2 -2
  77. package/lib/commonjs/mol-gl/shader/text.frag.d.ts +2 -2
  78. package/lib/commonjs/mol-gl/shader/text.frag.js +2 -2
  79. package/lib/commonjs/mol-gl/webgl/buffer.d.ts +2 -2
  80. package/lib/commonjs/mol-gl/webgl/buffer.js +12 -12
  81. package/lib/commonjs/mol-gl/webgl/program.d.ts +1 -1
  82. package/lib/commonjs/mol-gl/webgl/program.js +10 -4
  83. package/lib/commonjs/mol-io/reader/cif/schema/bird.d.ts +8 -8
  84. package/lib/commonjs/mol-io/reader/cif/schema/bird.js +12 -11
  85. package/lib/commonjs/mol-io/reader/cif/schema/ccd-extras.d.ts +1 -1
  86. package/lib/commonjs/mol-io/reader/cif/schema/ccd.d.ts +12 -12
  87. package/lib/commonjs/mol-io/reader/cif/schema/ccd.js +13 -12
  88. package/lib/commonjs/mol-io/reader/cif/schema/mmcif-extras.d.ts +5 -5
  89. package/lib/commonjs/mol-io/reader/cif/schema/mmcif-extras.js +2 -2
  90. package/lib/commonjs/mol-io/reader/cif/schema/mmcif.d.ts +30 -26
  91. package/lib/commonjs/mol-io/reader/cif/schema/mmcif.js +44 -39
  92. package/lib/commonjs/mol-io/reader/cif/schema.d.ts +1 -1
  93. package/lib/commonjs/mol-io/reader/cif/schema.js +22 -2
  94. package/lib/commonjs/mol-io/writer/ligand-encoder.d.ts +4 -2
  95. package/lib/commonjs/mol-io/writer/ligand-encoder.js +9 -4
  96. package/lib/commonjs/mol-io/writer/mol/encoder.js +17 -5
  97. package/lib/commonjs/mol-io/writer/mol2/encoder.js +17 -4
  98. package/lib/commonjs/mol-model/structure/model/model.js +14 -6
  99. package/lib/commonjs/mol-model/structure/model/properties/common.js +1 -1
  100. package/lib/commonjs/mol-model/structure/model/types.d.ts +19 -17
  101. package/lib/commonjs/mol-model/structure/model/types.js +30 -31
  102. package/lib/commonjs/mol-model/structure/query/queries/generators.js +1 -1
  103. package/lib/commonjs/mol-model/structure/structure/properties.d.ts +1 -1
  104. package/lib/commonjs/mol-model/structure/structure/unit/bonds/inter-compute.js +2 -4
  105. package/lib/commonjs/mol-model/structure/structure/unit/bonds/intra-compute.js +1 -3
  106. package/lib/commonjs/mol-model/structure/structure/unit/rings.js +3 -0
  107. package/lib/commonjs/mol-model-formats/shape/ply.d.ts +2 -0
  108. package/lib/commonjs/mol-model-formats/structure/basic/entities.js +1 -1
  109. package/lib/commonjs/mol-model-formats/structure/basic/schema.d.ts +2 -2
  110. package/lib/commonjs/mol-model-formats/structure/common/component.d.ts +3 -3
  111. package/lib/commonjs/mol-model-formats/structure/common/component.js +46 -46
  112. package/lib/commonjs/mol-model-formats/structure/pdb/atom-site.d.ts +2 -2
  113. package/lib/commonjs/mol-model-formats/structure/pdb/atom-site.js +72 -7
  114. package/lib/commonjs/mol-model-formats/structure/pdb/secondary-structure.js +11 -11
  115. package/lib/commonjs/mol-model-formats/structure/pdb/to-cif.js +7 -2
  116. package/lib/commonjs/mol-model-formats/structure/property/bonds/chem_comp.js +1 -1
  117. package/lib/commonjs/mol-model-formats/structure/property/bonds/struct_conn.js +1 -1
  118. package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +1 -0
  119. package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +1 -0
  120. package/lib/commonjs/mol-model-props/computed/representations/interactions.d.ts +3 -0
  121. package/lib/commonjs/mol-model-props/integrative/cross-link-restraint/representation.d.ts +4 -0
  122. package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/util.js +3 -2
  123. package/lib/commonjs/mol-plugin/commands.d.ts +1 -0
  124. package/lib/commonjs/mol-plugin/util/viewport-screenshot.d.ts +3 -0
  125. package/lib/commonjs/mol-plugin-state/actions/structure.d.ts +6 -6
  126. package/lib/commonjs/mol-plugin-state/helpers/structure-selection-query.d.ts +1 -1
  127. package/lib/commonjs/mol-plugin-state/helpers/structure-selection-query.js +1 -1
  128. package/lib/commonjs/mol-plugin-state/transforms/representation.d.ts +6 -0
  129. package/lib/commonjs/mol-plugin-ui/base.d.ts +3 -1
  130. package/lib/commonjs/mol-plugin-ui/controls/color.d.ts +1 -1
  131. package/lib/commonjs/mol-plugin-ui/controls/common.d.ts +2 -0
  132. package/lib/commonjs/mol-plugin-ui/hooks/use-behavior.d.ts +1 -1
  133. package/lib/commonjs/mol-plugin-ui/hooks/use-behavior.js +21 -7
  134. package/lib/commonjs/mol-plugin-ui/plugin.d.ts +2 -0
  135. package/lib/commonjs/mol-plugin-ui/plugin.js +2 -2
  136. package/lib/commonjs/mol-plugin-ui/react18.d.ts +11 -0
  137. package/lib/commonjs/mol-plugin-ui/react18.js +38 -0
  138. package/lib/commonjs/mol-plugin-ui/spec.d.ts +1 -0
  139. package/lib/commonjs/mol-plugin-ui/state/common.js +6 -7
  140. package/lib/commonjs/mol-plugin-ui/structure/focus.d.ts +1 -1
  141. package/lib/commonjs/mol-plugin-ui/structure/focus.js +2 -2
  142. package/lib/commonjs/mol-plugin-ui/task.d.ts +2 -21
  143. package/lib/commonjs/mol-plugin-ui/task.js +39 -43
  144. package/lib/commonjs/mol-plugin-ui/viewport/help.d.ts +4 -1
  145. package/lib/commonjs/mol-repr/shape/loci/angle.d.ts +1 -0
  146. package/lib/commonjs/mol-repr/shape/loci/dihedral.d.ts +1 -0
  147. package/lib/commonjs/mol-repr/shape/loci/orientation.d.ts +1 -0
  148. package/lib/commonjs/mol-repr/shape/loci/plane.d.ts +1 -0
  149. package/lib/commonjs/mol-repr/shape/model/unitcell.d.ts +1 -0
  150. package/lib/commonjs/mol-repr/structure/complex-visual.d.ts +3 -0
  151. package/lib/commonjs/mol-repr/structure/params.d.ts +4 -0
  152. package/lib/commonjs/mol-repr/structure/registry.d.ts +10 -0
  153. package/lib/commonjs/mol-repr/structure/representation/backbone.d.ts +3 -0
  154. package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.d.ts +3 -0
  155. package/lib/commonjs/mol-repr/structure/representation/carbohydrate.d.ts +3 -0
  156. package/lib/commonjs/mol-repr/structure/representation/cartoon.d.ts +3 -0
  157. package/lib/commonjs/mol-repr/structure/representation/ellipsoid.d.ts +3 -0
  158. package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.d.ts +3 -0
  159. package/lib/commonjs/mol-repr/structure/representation/molecular-surface.d.ts +3 -0
  160. package/lib/commonjs/mol-repr/structure/representation/orientation.d.ts +3 -0
  161. package/lib/commonjs/mol-repr/structure/representation/putty.d.ts +3 -0
  162. package/lib/commonjs/mol-repr/structure/representation/spacefill.d.ts +3 -0
  163. package/lib/commonjs/mol-repr/structure/units-visual.d.ts +4 -0
  164. package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +2 -0
  165. package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +2 -0
  166. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +1 -0
  167. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +1 -0
  168. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +1 -0
  169. package/lib/commonjs/mol-repr/structure/visual/element-sphere.d.ts +2 -0
  170. package/lib/commonjs/mol-repr/structure/visual/ellipsoid-mesh.d.ts +1 -0
  171. package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +4 -0
  172. package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -0
  173. package/lib/commonjs/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +1 -0
  174. package/lib/commonjs/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +1 -0
  175. package/lib/commonjs/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +1 -0
  176. package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +2 -0
  177. package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +2 -0
  178. package/lib/commonjs/mol-repr/structure/visual/polymer-direction-wedge.d.ts +1 -0
  179. package/lib/commonjs/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +1 -0
  180. package/lib/commonjs/mol-repr/structure/visual/polymer-trace-mesh.d.ts +1 -0
  181. package/lib/commonjs/mol-repr/structure/visual/polymer-tube-mesh.d.ts +1 -0
  182. package/lib/commonjs/mol-repr/util.d.ts +2 -1
  183. package/lib/commonjs/mol-repr/util.js +2 -2
  184. package/lib/commonjs/mol-repr/volume/isosurface.d.ts +5 -0
  185. package/lib/commonjs/mol-repr/volume/registry.d.ts +1 -0
  186. package/lib/commonjs/mol-theme/color.d.ts +9 -2
  187. package/lib/commonjs/mol-theme/color.js +1 -1
  188. package/lib/commonjs/servers/model/server/query.js +1 -3
  189. package/lib/commonjs/servers/model/version.d.ts +1 -1
  190. package/lib/commonjs/servers/model/version.js +1 -1
  191. package/lib/examples/alpha-orbitals/index.js +21 -16
  192. package/lib/examples/basic-wrapper/index.js +1 -1
  193. package/lib/examples/lighting/index.js +1 -1
  194. package/lib/examples/proteopedia-wrapper/index.js +1 -1
  195. package/lib/extensions/anvil/behavior.d.ts +1 -0
  196. package/lib/extensions/anvil/representation.d.ts +4 -0
  197. package/lib/extensions/cellpack/representation.d.ts +1 -0
  198. package/lib/extensions/dnatco/confal-pyramids/representation.d.ts +3 -0
  199. package/lib/extensions/rcsb/assembly-symmetry/behavior.d.ts +1 -0
  200. package/lib/extensions/rcsb/assembly-symmetry/representation.d.ts +1 -0
  201. package/lib/extensions/rcsb/validation-report/representation.d.ts +5 -0
  202. package/lib/mol-canvas3d/canvas3d.d.ts +2 -0
  203. package/lib/mol-canvas3d/helper/camera-helper.d.ts +1 -0
  204. package/lib/mol-canvas3d/helper/handle-helper.d.ts +1 -0
  205. package/lib/mol-canvas3d/helper/helper.d.ts +2 -0
  206. package/lib/mol-canvas3d/passes/image.d.ts +1 -0
  207. package/lib/mol-data/db/column.d.ts +10 -3
  208. package/lib/mol-data/db/column.js +39 -18
  209. package/lib/mol-geo/geometry/color-data.d.ts +2 -8
  210. package/lib/mol-geo/geometry/color-data.js +16 -3
  211. package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +4 -2
  212. package/lib/mol-geo/geometry/cylinders/cylinders.js +4 -3
  213. package/lib/mol-geo/geometry/mesh/mesh.d.ts +2 -1
  214. package/lib/mol-geo/geometry/mesh/mesh.js +4 -3
  215. package/lib/mol-geo/geometry/spheres/spheres.d.ts +2 -1
  216. package/lib/mol-geo/geometry/spheres/spheres.js +4 -3
  217. package/lib/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +2 -1
  218. package/lib/mol-geo/geometry/texture-mesh/texture-mesh.js +16 -5
  219. package/lib/mol-gl/renderable/cylinders.d.ts +2 -1
  220. package/lib/mol-gl/renderable/cylinders.js +2 -2
  221. package/lib/mol-gl/renderable/mesh.d.ts +2 -1
  222. package/lib/mol-gl/renderable/mesh.js +2 -2
  223. package/lib/mol-gl/renderable/spheres.d.ts +2 -1
  224. package/lib/mol-gl/renderable/spheres.js +2 -2
  225. package/lib/mol-gl/renderable/texture-mesh.d.ts +2 -1
  226. package/lib/mol-gl/renderable/texture-mesh.js +2 -2
  227. package/lib/mol-gl/renderer.js +54 -23
  228. package/lib/mol-gl/shader/chunks/apply-interior-color.glsl.d.ts +1 -1
  229. package/lib/mol-gl/shader/chunks/apply-interior-color.glsl.js +1 -1
  230. package/lib/mol-gl/shader/chunks/check-picking-alpha.glsl.d.ts +1 -1
  231. package/lib/mol-gl/shader/chunks/check-picking-alpha.glsl.js +1 -1
  232. package/lib/mol-gl/shader/chunks/color-vert-params.glsl.d.ts +1 -1
  233. package/lib/mol-gl/shader/chunks/color-vert-params.glsl.js +1 -1
  234. package/lib/mol-gl/shader/chunks/wboit-write.glsl.d.ts +2 -2
  235. package/lib/mol-gl/shader/chunks/wboit-write.glsl.js +2 -2
  236. package/lib/mol-gl/shader/direct-volume.frag.d.ts +1 -1
  237. package/lib/mol-gl/shader/direct-volume.frag.js +1 -1
  238. package/lib/mol-gl/shader/image.frag.d.ts +2 -2
  239. package/lib/mol-gl/shader/image.frag.js +2 -2
  240. package/lib/mol-gl/shader/lines.frag.d.ts +2 -2
  241. package/lib/mol-gl/shader/lines.frag.js +2 -2
  242. package/lib/mol-gl/shader/points.frag.d.ts +2 -2
  243. package/lib/mol-gl/shader/points.frag.js +2 -2
  244. package/lib/mol-gl/shader/text.frag.d.ts +2 -2
  245. package/lib/mol-gl/shader/text.frag.js +2 -2
  246. package/lib/mol-gl/webgl/buffer.d.ts +2 -2
  247. package/lib/mol-gl/webgl/buffer.js +12 -12
  248. package/lib/mol-gl/webgl/program.d.ts +1 -1
  249. package/lib/mol-gl/webgl/program.js +10 -4
  250. package/lib/mol-io/reader/cif/schema/bird.d.ts +8 -8
  251. package/lib/mol-io/reader/cif/schema/bird.js +12 -11
  252. package/lib/mol-io/reader/cif/schema/ccd-extras.d.ts +1 -1
  253. package/lib/mol-io/reader/cif/schema/ccd.d.ts +12 -12
  254. package/lib/mol-io/reader/cif/schema/ccd.js +13 -12
  255. package/lib/mol-io/reader/cif/schema/mmcif-extras.d.ts +5 -5
  256. package/lib/mol-io/reader/cif/schema/mmcif-extras.js +2 -2
  257. package/lib/mol-io/reader/cif/schema/mmcif.d.ts +30 -26
  258. package/lib/mol-io/reader/cif/schema/mmcif.js +44 -39
  259. package/lib/mol-io/reader/cif/schema.d.ts +1 -1
  260. package/lib/mol-io/reader/cif/schema.js +22 -2
  261. package/lib/mol-io/writer/ligand-encoder.d.ts +4 -2
  262. package/lib/mol-io/writer/ligand-encoder.js +9 -4
  263. package/lib/mol-io/writer/mol/encoder.js +17 -5
  264. package/lib/mol-io/writer/mol2/encoder.js +17 -4
  265. package/lib/mol-model/structure/model/model.js +14 -6
  266. package/lib/mol-model/structure/model/properties/common.js +1 -1
  267. package/lib/mol-model/structure/model/types.d.ts +19 -17
  268. package/lib/mol-model/structure/model/types.js +30 -31
  269. package/lib/mol-model/structure/query/queries/generators.js +1 -1
  270. package/lib/mol-model/structure/structure/properties.d.ts +1 -1
  271. package/lib/mol-model/structure/structure/unit/bonds/inter-compute.js +2 -4
  272. package/lib/mol-model/structure/structure/unit/bonds/intra-compute.js +1 -3
  273. package/lib/mol-model/structure/structure/unit/rings.js +3 -0
  274. package/lib/mol-model-formats/shape/ply.d.ts +2 -0
  275. package/lib/mol-model-formats/structure/basic/entities.js +1 -1
  276. package/lib/mol-model-formats/structure/basic/schema.d.ts +2 -2
  277. package/lib/mol-model-formats/structure/common/component.d.ts +3 -3
  278. package/lib/mol-model-formats/structure/common/component.js +46 -46
  279. package/lib/mol-model-formats/structure/pdb/atom-site.d.ts +2 -2
  280. package/lib/mol-model-formats/structure/pdb/atom-site.js +72 -7
  281. package/lib/mol-model-formats/structure/pdb/secondary-structure.js +11 -11
  282. package/lib/mol-model-formats/structure/pdb/to-cif.js +7 -2
  283. package/lib/mol-model-formats/structure/property/bonds/chem_comp.js +1 -1
  284. package/lib/mol-model-formats/structure/property/bonds/struct_conn.js +1 -1
  285. package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +1 -0
  286. package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +1 -0
  287. package/lib/mol-model-props/computed/representations/interactions.d.ts +3 -0
  288. package/lib/mol-model-props/integrative/cross-link-restraint/representation.d.ts +4 -0
  289. package/lib/mol-plugin/behavior/dynamic/volume-streaming/util.js +3 -2
  290. package/lib/mol-plugin/commands.d.ts +1 -0
  291. package/lib/mol-plugin/util/viewport-screenshot.d.ts +3 -0
  292. package/lib/mol-plugin/version.js +2 -2
  293. package/lib/mol-plugin-state/actions/structure.d.ts +6 -6
  294. package/lib/mol-plugin-state/helpers/structure-selection-query.d.ts +1 -1
  295. package/lib/mol-plugin-state/helpers/structure-selection-query.js +1 -1
  296. package/lib/mol-plugin-state/transforms/representation.d.ts +6 -0
  297. package/lib/mol-plugin-ui/base.d.ts +3 -1
  298. package/lib/mol-plugin-ui/controls/color.d.ts +1 -1
  299. package/lib/mol-plugin-ui/controls/common.d.ts +2 -0
  300. package/lib/mol-plugin-ui/hooks/use-behavior.d.ts +1 -1
  301. package/lib/mol-plugin-ui/hooks/use-behavior.js +20 -7
  302. package/lib/mol-plugin-ui/plugin.d.ts +2 -0
  303. package/lib/mol-plugin-ui/plugin.js +2 -2
  304. package/lib/mol-plugin-ui/react18.d.ts +11 -0
  305. package/lib/mol-plugin-ui/react18.js +34 -0
  306. package/lib/mol-plugin-ui/spec.d.ts +1 -0
  307. package/lib/mol-plugin-ui/state/common.js +7 -8
  308. package/lib/mol-plugin-ui/structure/focus.d.ts +1 -1
  309. package/lib/mol-plugin-ui/structure/focus.js +2 -2
  310. package/lib/mol-plugin-ui/task.d.ts +2 -21
  311. package/lib/mol-plugin-ui/task.js +40 -46
  312. package/lib/mol-plugin-ui/viewport/help.d.ts +4 -1
  313. package/lib/mol-repr/shape/loci/angle.d.ts +1 -0
  314. package/lib/mol-repr/shape/loci/dihedral.d.ts +1 -0
  315. package/lib/mol-repr/shape/loci/orientation.d.ts +1 -0
  316. package/lib/mol-repr/shape/loci/plane.d.ts +1 -0
  317. package/lib/mol-repr/shape/model/unitcell.d.ts +1 -0
  318. package/lib/mol-repr/structure/complex-visual.d.ts +3 -0
  319. package/lib/mol-repr/structure/params.d.ts +4 -0
  320. package/lib/mol-repr/structure/registry.d.ts +10 -0
  321. package/lib/mol-repr/structure/representation/backbone.d.ts +3 -0
  322. package/lib/mol-repr/structure/representation/ball-and-stick.d.ts +3 -0
  323. package/lib/mol-repr/structure/representation/carbohydrate.d.ts +3 -0
  324. package/lib/mol-repr/structure/representation/cartoon.d.ts +3 -0
  325. package/lib/mol-repr/structure/representation/ellipsoid.d.ts +3 -0
  326. package/lib/mol-repr/structure/representation/gaussian-surface.d.ts +3 -0
  327. package/lib/mol-repr/structure/representation/molecular-surface.d.ts +3 -0
  328. package/lib/mol-repr/structure/representation/orientation.d.ts +3 -0
  329. package/lib/mol-repr/structure/representation/putty.d.ts +3 -0
  330. package/lib/mol-repr/structure/representation/spacefill.d.ts +3 -0
  331. package/lib/mol-repr/structure/units-visual.d.ts +4 -0
  332. package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +2 -0
  333. package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +2 -0
  334. package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +1 -0
  335. package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +1 -0
  336. package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +1 -0
  337. package/lib/mol-repr/structure/visual/element-sphere.d.ts +2 -0
  338. package/lib/mol-repr/structure/visual/ellipsoid-mesh.d.ts +1 -0
  339. package/lib/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +4 -0
  340. package/lib/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -0
  341. package/lib/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +1 -0
  342. package/lib/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +1 -0
  343. package/lib/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +1 -0
  344. package/lib/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +2 -0
  345. package/lib/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +2 -0
  346. package/lib/mol-repr/structure/visual/polymer-direction-wedge.d.ts +1 -0
  347. package/lib/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +1 -0
  348. package/lib/mol-repr/structure/visual/polymer-trace-mesh.d.ts +1 -0
  349. package/lib/mol-repr/structure/visual/polymer-tube-mesh.d.ts +1 -0
  350. package/lib/mol-repr/util.d.ts +2 -1
  351. package/lib/mol-repr/util.js +2 -2
  352. package/lib/mol-repr/volume/isosurface.d.ts +5 -0
  353. package/lib/mol-repr/volume/registry.d.ts +1 -0
  354. package/lib/mol-theme/color.d.ts +9 -2
  355. package/lib/mol-theme/color.js +1 -1
  356. package/lib/servers/model/server/query.js +1 -3
  357. package/lib/servers/model/version.d.ts +1 -1
  358. package/lib/servers/model/version.js +1 -1
  359. package/package.json +21 -19
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2019-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ * Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
4
  *
5
5
  * @author David Sehnal <david.sehnal@gmail.com>
6
6
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
@@ -37,31 +37,96 @@ function getAtomSiteTemplate(data, count) {
37
37
  };
38
38
  }
39
39
  exports.getAtomSiteTemplate = getAtomSiteTemplate;
40
- function getAtomSite(sites) {
40
+ function getAtomSite(sites, hasTer) {
41
+ var pdbx_PDB_model_num = cif_1.CifField.ofStrings(sites.pdbx_PDB_model_num);
41
42
  var auth_asym_id = cif_1.CifField.ofTokens(sites.auth_asym_id);
43
+ var auth_seq_id = cif_1.CifField.ofTokens(sites.auth_seq_id);
42
44
  var auth_atom_id = cif_1.CifField.ofTokens(sites.auth_atom_id);
43
45
  var auth_comp_id = cif_1.CifField.ofTokens(sites.auth_comp_id);
46
+ var id = cif_1.CifField.ofStrings(sites.id);
47
+ //
48
+ var currModelNum = pdbx_PDB_model_num.str(0);
49
+ var currAsymId = auth_asym_id.str(0);
50
+ var currSeqId = auth_seq_id.int(0);
51
+ var currLabelAsymId = currAsymId;
52
+ var asymIdCounts = new Map();
53
+ var atomIdCounts = new Map();
54
+ var labelAsymIds = [];
55
+ var labelAtomIds = [];
56
+ // ensure unique asym ids per model and unique atom ids per seq id
57
+ for (var i = 0, il = id.rowCount; i < il; ++i) {
58
+ var modelNum = pdbx_PDB_model_num.str(i);
59
+ var asymId = auth_asym_id.str(i);
60
+ var seqId = auth_seq_id.int(i);
61
+ var atomId = auth_atom_id.str(i);
62
+ var asymIdChanged = false;
63
+ if (modelNum !== currModelNum) {
64
+ asymIdCounts.clear();
65
+ atomIdCounts.clear();
66
+ currModelNum = modelNum;
67
+ currAsymId = asymId;
68
+ currSeqId = seqId;
69
+ asymIdChanged = true;
70
+ currLabelAsymId = asymId;
71
+ }
72
+ else if (currAsymId !== asymId) {
73
+ atomIdCounts.clear();
74
+ currAsymId = asymId;
75
+ currSeqId = seqId;
76
+ asymIdChanged = true;
77
+ currLabelAsymId = asymId;
78
+ }
79
+ else if (currSeqId !== seqId) {
80
+ atomIdCounts.clear();
81
+ currSeqId = seqId;
82
+ }
83
+ if (asymIdCounts.has(asymId)) {
84
+ // only change the chains name if there are TER records
85
+ // otherwise assume repeated chain name use is from interleaved chains
86
+ if (hasTer && asymIdChanged) {
87
+ var asymIdCount = asymIdCounts.get(asymId) + 1;
88
+ asymIdCounts.set(asymId, asymIdCount);
89
+ currLabelAsymId = "".concat(asymId, "_").concat(asymIdCount);
90
+ }
91
+ }
92
+ else {
93
+ asymIdCounts.set(asymId, 0);
94
+ }
95
+ labelAsymIds[i] = currLabelAsymId;
96
+ if (atomIdCounts.has(atomId)) {
97
+ var atomIdCount = atomIdCounts.get(atomId) + 1;
98
+ atomIdCounts.set(atomId, atomIdCount);
99
+ atomId = "".concat(atomId, "_").concat(atomIdCount);
100
+ }
101
+ else {
102
+ atomIdCounts.set(atomId, 0);
103
+ }
104
+ labelAtomIds[i] = atomId;
105
+ }
106
+ var labelAsymId = db_1.Column.ofStringArray(labelAsymIds);
107
+ var labelAtomId = db_1.Column.ofStringArray(labelAtomIds);
108
+ //
44
109
  return {
45
110
  auth_asym_id: auth_asym_id,
46
111
  auth_atom_id: auth_atom_id,
47
112
  auth_comp_id: auth_comp_id,
48
- auth_seq_id: cif_1.CifField.ofTokens(sites.auth_seq_id),
113
+ auth_seq_id: auth_seq_id,
49
114
  B_iso_or_equiv: cif_1.CifField.ofTokens(sites.B_iso_or_equiv),
50
115
  Cartn_x: cif_1.CifField.ofTokens(sites.Cartn_x),
51
116
  Cartn_y: cif_1.CifField.ofTokens(sites.Cartn_y),
52
117
  Cartn_z: cif_1.CifField.ofTokens(sites.Cartn_z),
53
118
  group_PDB: cif_1.CifField.ofTokens(sites.group_PDB),
54
- id: cif_1.CifField.ofStrings(sites.id),
119
+ id: id,
55
120
  label_alt_id: cif_1.CifField.ofTokens(sites.label_alt_id),
56
- label_asym_id: auth_asym_id,
57
- label_atom_id: auth_atom_id,
121
+ label_asym_id: cif_1.CifField.ofColumn(labelAsymId),
122
+ label_atom_id: cif_1.CifField.ofColumn(labelAtomId),
58
123
  label_comp_id: auth_comp_id,
59
124
  label_seq_id: cif_1.CifField.ofUndefined(sites.index, db_1.Column.Schema.int),
60
125
  label_entity_id: cif_1.CifField.ofStrings(sites.label_entity_id),
61
126
  occupancy: (0, token_1.areTokensEmpty)(sites.occupancy) ? cif_1.CifField.ofUndefined(sites.index, db_1.Column.Schema.float) : cif_1.CifField.ofTokens(sites.occupancy),
62
127
  type_symbol: cif_1.CifField.ofTokens(sites.type_symbol),
63
128
  pdbx_PDB_ins_code: cif_1.CifField.ofTokens(sites.pdbx_PDB_ins_code),
64
- pdbx_PDB_model_num: cif_1.CifField.ofStrings(sites.pdbx_PDB_model_num),
129
+ pdbx_PDB_model_num: pdbx_PDB_model_num,
65
130
  partial_charge: cif_1.CifField.ofTokens(sites.partial_charge)
66
131
  };
67
132
  }
@@ -22,19 +22,19 @@ var HelixTypes = {
22
22
  // Left-handed gamma 8
23
23
  // 2 - 7 ribbon/helix 9
24
24
  // Polyproline 10
25
- 1: 'HELX_RH_AL_P',
26
- 2: 'HELX_RH_OM_P',
27
- 3: 'HELX_RH_PI_P',
28
- 4: 'HELX_RH_GA_P',
29
- 5: 'HELX_RH_3T_P',
30
- 6: 'HELX_LH_AL_P',
31
- 7: 'HELX_LH_OM_P',
32
- 8: 'HELX_LH_GA_P',
33
- 9: 'HELX_RH_27_P',
34
- 10: 'HELX_RH_PP_P', // TODO or left-handed???
25
+ 1: 'helx_rh_al_p',
26
+ 2: 'helx_rh_om_p',
27
+ 3: 'helx_rh_pi_p',
28
+ 4: 'helx_rh_ga_p',
29
+ 5: 'helx_rh_3t_p',
30
+ 6: 'helx_lh_al_p',
31
+ 7: 'helx_lh_om_p',
32
+ 8: 'helx_lh_ga_p',
33
+ 9: 'helx_rh_27_p',
34
+ 10: 'helx_rh_pp_p', // TODO or left-handed???
35
35
  };
36
36
  function getStructConfTypeId(type) {
37
- return HelixTypes[type] || 'HELX_P';
37
+ return HelixTypes[type] || 'helx_p';
38
38
  }
39
39
  function parseHelix(lines, lineStart, lineEnd) {
40
40
  var helices = [];
@@ -24,7 +24,7 @@ var conect_1 = require("./conect");
24
24
  var debug_1 = require("../../../mol-util/debug");
25
25
  function pdbToMmCif(pdb) {
26
26
  return tslib_1.__awaiter(this, void 0, void 0, function () {
27
- var lines, data, indices, tokenizer, isPdbqt, atomCount, anisotropicCount, i, _i, s, e, atomSite, anisotropic, entityBuilder, helperCategories, heteroNames, modelNum, modelStr, conectRange, i, _i, s, e, j, j, j, j, j, j, j, seqIds, atomIds, compIds, asymIds, componentBuilder, i, il, compId, moleculeType, atom_site, categories, _a, helperCategories_1, c;
27
+ var lines, data, indices, tokenizer, isPdbqt, atomCount, anisotropicCount, i, _i, s, e, atomSite, anisotropic, entityBuilder, helperCategories, heteroNames, modelNum, modelStr, conectRange, hasTer, i, _i, s, e, j, j, j, j, j, j, j, seqIds, atomIds, compIds, asymIds, componentBuilder, i, il, compId, moleculeType, atom_site, categories, _a, helperCategories_1, c;
28
28
  return tslib_1.__generator(this, function (_b) {
29
29
  lines = pdb.lines;
30
30
  data = lines.data, indices = lines.indices;
@@ -54,6 +54,7 @@ function pdbToMmCif(pdb) {
54
54
  heteroNames = [];
55
55
  modelNum = 0, modelStr = '';
56
56
  conectRange = undefined;
57
+ hasTer = false;
57
58
  for (i = 0, _i = lines.count; i < _i; i++) {
58
59
  s = indices[2 * i], e = indices[2 * i + 1];
59
60
  switch (data[s]) {
@@ -189,6 +190,10 @@ function pdbToMmCif(pdb) {
189
190
  }
190
191
  // TODO: SCALE record => cif.atom_sites.fract_transf_matrix, cif.atom_sites.fract_transf_vector
191
192
  break;
193
+ case 'T':
194
+ if ((0, string_1.substringStartsWith)(data, s, e, 'TER')) {
195
+ hasTer = true;
196
+ }
192
197
  }
193
198
  }
194
199
  seqIds = db_1.Column.ofIntTokens(atomSite.auth_seq_id);
@@ -203,7 +208,7 @@ function pdbToMmCif(pdb) {
203
208
  moleculeType = (0, types_1.getMoleculeType)(componentBuilder.add(compId, i).type, compId);
204
209
  atomSite.label_entity_id[i] = entityBuilder.getEntityId(compId, moleculeType, asymIds.value(i));
205
210
  }
206
- atom_site = (0, atom_site_1.getAtomSite)(atomSite);
211
+ atom_site = (0, atom_site_1.getAtomSite)(atomSite, hasTer);
207
212
  if (!isPdbqt)
208
213
  delete atom_site.partial_charge;
209
214
  if (conectRange) {
@@ -63,7 +63,7 @@ var ComponentBond;
63
63
  var nameA = atom_id_1.value(i);
64
64
  var nameB = atom_id_2.value(i);
65
65
  var order = value_order.value(i);
66
- var aromatic = pdbx_aromatic_flag.value(i) === 'Y';
66
+ var aromatic = pdbx_aromatic_flag.value(i) === 'y';
67
67
  if (entry.id !== id) {
68
68
  entry = addEntry(id);
69
69
  }
@@ -118,7 +118,7 @@ var StructConn;
118
118
  if (partnerA === undefined || partnerB === undefined)
119
119
  continue;
120
120
  var type = conn_type_id.value(i);
121
- var orderType = (pdbx_value_order.value(i) || '').toLowerCase();
121
+ var orderType = (pdbx_value_order.value(i) || '');
122
122
  var flags = 0 /* None */;
123
123
  var order = 1;
124
124
  switch (orderType) {
@@ -25,6 +25,7 @@ export declare const InteractionsInterUnitParams: {
25
25
  flatShaded: PD.BooleanParam;
26
26
  ignoreLight: PD.BooleanParam;
27
27
  xrayShaded: PD.BooleanParam;
28
+ transparentBackfaces: PD.Select<string>;
28
29
  bumpFrequency: PD.Numeric;
29
30
  bumpAmplitude: PD.Numeric;
30
31
  alpha: PD.Numeric;
@@ -25,6 +25,7 @@ export declare const InteractionsIntraUnitParams: {
25
25
  flatShaded: PD.BooleanParam;
26
26
  ignoreLight: PD.BooleanParam;
27
27
  xrayShaded: PD.BooleanParam;
28
+ transparentBackfaces: PD.Select<string>;
28
29
  bumpFrequency: PD.Numeric;
29
30
  bumpAmplitude: PD.Numeric;
30
31
  alpha: PD.Numeric;
@@ -29,6 +29,7 @@ export declare const InteractionsParams: {
29
29
  flatShaded: PD.BooleanParam;
30
30
  ignoreLight: PD.BooleanParam;
31
31
  xrayShaded: PD.BooleanParam;
32
+ transparentBackfaces: PD.Select<string>;
32
33
  bumpFrequency: PD.Numeric;
33
34
  bumpAmplitude: PD.Numeric;
34
35
  alpha: PD.Numeric;
@@ -71,6 +72,7 @@ export declare function getInteractionParams(ctx: ThemeRegistryContext, structur
71
72
  flatShaded: PD.BooleanParam;
72
73
  ignoreLight: PD.BooleanParam;
73
74
  xrayShaded: PD.BooleanParam;
75
+ transparentBackfaces: PD.Select<string>;
74
76
  bumpFrequency: PD.Numeric;
75
77
  bumpAmplitude: PD.Numeric;
76
78
  alpha: PD.Numeric;
@@ -114,6 +116,7 @@ export declare const InteractionsRepresentationProvider: StructureRepresentation
114
116
  flatShaded: PD.BooleanParam;
115
117
  ignoreLight: PD.BooleanParam;
116
118
  xrayShaded: PD.BooleanParam;
119
+ transparentBackfaces: PD.Select<string>;
117
120
  bumpFrequency: PD.Numeric;
118
121
  bumpAmplitude: PD.Numeric;
119
122
  alpha: PD.Numeric;
@@ -30,6 +30,7 @@ export declare const CrossLinkRestraintCylinderParams: {
30
30
  flatShaded: PD.BooleanParam;
31
31
  ignoreLight: PD.BooleanParam;
32
32
  xrayShaded: PD.BooleanParam;
33
+ transparentBackfaces: PD.Select<string>;
33
34
  bumpFrequency: PD.Numeric;
34
35
  bumpAmplitude: PD.Numeric;
35
36
  alpha: PD.Numeric;
@@ -72,6 +73,7 @@ export declare const CrossLinkRestraintParams: {
72
73
  flatShaded: PD.BooleanParam;
73
74
  ignoreLight: PD.BooleanParam;
74
75
  xrayShaded: PD.BooleanParam;
76
+ transparentBackfaces: PD.Select<string>;
75
77
  bumpFrequency: PD.Numeric;
76
78
  bumpAmplitude: PD.Numeric;
77
79
  alpha: PD.Numeric;
@@ -113,6 +115,7 @@ export declare function getCrossLinkRestraintParams(ctx: ThemeRegistryContext, s
113
115
  flatShaded: PD.BooleanParam;
114
116
  ignoreLight: PD.BooleanParam;
115
117
  xrayShaded: PD.BooleanParam;
118
+ transparentBackfaces: PD.Select<string>;
116
119
  bumpFrequency: PD.Numeric;
117
120
  bumpAmplitude: PD.Numeric;
118
121
  alpha: PD.Numeric;
@@ -155,6 +158,7 @@ export declare const CrossLinkRestraintRepresentationProvider: StructureRepresen
155
158
  flatShaded: PD.BooleanParam;
156
159
  ignoreLight: PD.BooleanParam;
157
160
  xrayShaded: PD.BooleanParam;
161
+ transparentBackfaces: PD.Select<string>;
158
162
  bumpFrequency: PD.Numeric;
159
163
  bumpAmplitude: PD.Numeric;
160
164
  alpha: PD.Numeric;
@@ -76,7 +76,7 @@ function getContourLevel(provider, plugin, taskCtx, emdbId) {
76
76
  exports.getContourLevel = getContourLevel;
77
77
  function getContourLevelEmdb(plugin, taskCtx, emdbId) {
78
78
  return tslib_1.__awaiter(this, void 0, void 0, function () {
79
- var emdbHeaderServer, header, contours, primaryContour, i, contourLevel;
79
+ var emdbHeaderServer, header, map, contours, primaryContour, i, contourLevel;
80
80
  return tslib_1.__generator(this, function (_a) {
81
81
  switch (_a.label) {
82
82
  case 0:
@@ -84,7 +84,8 @@ function getContourLevelEmdb(plugin, taskCtx, emdbId) {
84
84
  return [4 /*yield*/, plugin.fetch({ url: "".concat(emdbHeaderServer, "/").concat(emdbId.toUpperCase(), "/header/").concat(emdbId.toLowerCase(), ".xml"), type: 'xml' }).runInContext(taskCtx)];
85
85
  case 1:
86
86
  header = _a.sent();
87
- contours = header.getElementsByTagName('contour');
87
+ map = header.getElementsByTagName('map')[0];
88
+ contours = map.getElementsByTagName('contour');
88
89
  primaryContour = contours[0];
89
90
  for (i = 1; i < contours.length; i++) {
90
91
  if (contours[i].getAttribute('primary') === 'true') {
@@ -331,6 +331,7 @@ export declare const PluginCommands: {
331
331
  flipSided: any;
332
332
  flatShaded: any;
333
333
  xrayShaded: any;
334
+ transparentBackfaces: any;
334
335
  bumpFrequency: any;
335
336
  bumpAmplitude: any;
336
337
  quality: any;
@@ -37,6 +37,7 @@ declare class ViewportScreenshotHelper extends PluginComponent {
37
37
  flipSided: boolean;
38
38
  flatShaded: boolean;
39
39
  xrayShaded: boolean;
40
+ transparentBackfaces: string;
40
41
  bumpFrequency: number;
41
42
  bumpAmplitude: number;
42
43
  quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
@@ -69,6 +70,7 @@ declare class ViewportScreenshotHelper extends PluginComponent {
69
70
  flipSided: boolean;
70
71
  flatShaded: boolean;
71
72
  xrayShaded: boolean;
73
+ transparentBackfaces: string;
72
74
  bumpFrequency: number;
73
75
  bumpAmplitude: number;
74
76
  quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
@@ -109,6 +111,7 @@ declare class ViewportScreenshotHelper extends PluginComponent {
109
111
  flipSided: boolean;
110
112
  flatShaded: boolean;
111
113
  xrayShaded: boolean;
114
+ transparentBackfaces: string;
112
115
  bumpFrequency: number;
113
116
  bumpAmplitude: number;
114
117
  quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
@@ -26,6 +26,12 @@ declare const DownloadStructure: StateAction<PluginStateObject.Root, void, PD.No
26
26
  isBinary: any;
27
27
  options: any;
28
28
  }>, "url"> | PD.NamedParams<PD.Normalize<{
29
+ id: any;
30
+ options: any;
31
+ }>, "alphafolddb"> | PD.NamedParams<PD.Normalize<{
32
+ id: any;
33
+ options: any;
34
+ }>, "modelarchive"> | PD.NamedParams<PD.Normalize<{
29
35
  provider: any;
30
36
  options: any;
31
37
  }>, "pdb"> | PD.NamedParams<PD.Normalize<{
@@ -37,12 +43,6 @@ declare const DownloadStructure: StateAction<PluginStateObject.Root, void, PD.No
37
43
  }>, "swissmodel"> | PD.NamedParams<PD.Normalize<{
38
44
  id: any;
39
45
  options: any;
40
- }>, "alphafolddb"> | PD.NamedParams<PD.Normalize<{
41
- id: any;
42
- options: any;
43
- }>, "modelarchive"> | PD.NamedParams<PD.Normalize<{
44
- id: any;
45
- options: any;
46
46
  }>, "pubchem">;
47
47
  }>>;
48
48
  export declare const UpdateTrajectory: StateAction<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, void, PD.Normalize<{
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2019-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  * @author David Sehnal <david.sehnal@gmail.com>
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2019-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ * Copyright (c) 2019-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
  * @author David Sehnal <david.sehnal@gmail.com>
@@ -150,6 +150,7 @@ declare const ModelUnitcell3D: StateTransformer<SO.Molecule.Model, SO.Shape.Repr
150
150
  flatShaded: boolean;
151
151
  ignoreLight: boolean;
152
152
  xrayShaded: boolean;
153
+ transparentBackfaces: string;
153
154
  bumpFrequency: number;
154
155
  bumpAmplitude: number;
155
156
  alpha: number;
@@ -172,6 +173,7 @@ declare const StructureBoundingBox3D: StateTransformer<SO.Molecule.Structure, SO
172
173
  flatShaded: boolean;
173
174
  ignoreLight: boolean;
174
175
  xrayShaded: boolean;
176
+ transparentBackfaces: string;
175
177
  bumpFrequency: number;
176
178
  bumpAmplitude: number;
177
179
  alpha: number;
@@ -276,6 +278,7 @@ declare const StructureSelectionsAngle3D: StateTransformer<SO.Molecule.Structure
276
278
  flipSided: boolean;
277
279
  flatShaded: boolean;
278
280
  xrayShaded: boolean;
281
+ transparentBackfaces: string;
279
282
  bumpFrequency: number;
280
283
  bumpAmplitude: number;
281
284
  lineSizeAttenuation: boolean;
@@ -327,6 +330,7 @@ declare const StructureSelectionsDihedral3D: StateTransformer<SO.Molecule.Struct
327
330
  flipSided: boolean;
328
331
  flatShaded: boolean;
329
332
  xrayShaded: boolean;
333
+ transparentBackfaces: string;
330
334
  bumpFrequency: number;
331
335
  bumpAmplitude: number;
332
336
  lineSizeAttenuation: boolean;
@@ -384,6 +388,7 @@ declare const StructureSelectionsOrientation3D: StateTransformer<SO.Molecule.Str
384
388
  flatShaded: boolean;
385
389
  ignoreLight: boolean;
386
390
  xrayShaded: boolean;
391
+ transparentBackfaces: string;
387
392
  bumpFrequency: number;
388
393
  bumpAmplitude: number;
389
394
  alpha: number;
@@ -409,6 +414,7 @@ declare const StructureSelectionsPlane3D: StateTransformer<SO.Molecule.Structure
409
414
  flatShaded: boolean;
410
415
  ignoreLight: boolean;
411
416
  xrayShaded: boolean;
417
+ transparentBackfaces: string;
412
418
  bumpFrequency: number;
413
419
  bumpAmplitude: number;
414
420
  alpha: number;
@@ -9,7 +9,9 @@ import { Observable } from 'rxjs';
9
9
  import { PluginUIContext } from './context';
10
10
  import { ColorAccent } from './controls/common';
11
11
  export declare const PluginReactContext: React.Context<PluginUIContext>;
12
- export declare abstract class PluginUIComponent<P = {}, S = {}, SS = {}> extends React.Component<P, S, SS> {
12
+ export declare abstract class PluginUIComponent<P = {}, S = {}, SS = {}> extends React.Component<P & {
13
+ children?: any;
14
+ }, S, SS> {
13
15
  static contextType: React.Context<PluginUIContext>;
14
16
  readonly plugin: PluginUIContext;
15
17
  private subs;
@@ -27,5 +27,5 @@ export declare class CombinedColorControl extends React.PureComponent<ParamProps
27
27
  swatch(): JSX.Element;
28
28
  render(): JSX.Element;
29
29
  }
30
- export declare function ColorOptions(): React.ReactFragment;
30
+ export declare function ColorOptions(): any;
31
31
  export declare function ColorValueOption(color: Color): JSX.Element | null;
@@ -18,6 +18,7 @@ export declare class ControlGroup extends React.Component<{
18
18
  noTopMargin?: boolean;
19
19
  childrenClassName?: string;
20
20
  maxHeight?: string;
21
+ children?: any;
21
22
  }, {
22
23
  isExpanded: boolean;
23
24
  }> {
@@ -139,6 +140,7 @@ export declare class ToggleButton extends React.PureComponent<ToggleButtonProps>
139
140
  render(): JSX.Element;
140
141
  }
141
142
  export declare class ExpandGroup extends React.PureComponent<{
143
+ children?: any;
142
144
  header: string;
143
145
  headerStyle?: React.CSSProperties;
144
146
  initiallyExpanded?: boolean;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2020-21 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2020-22 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author David Sehnal <david.sehnal@gmail.com>
5
5
  */
@@ -1,18 +1,19 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2020-21 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ * Copyright (c) 2020-22 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
4
  *
5
5
  * @author David Sehnal <david.sehnal@gmail.com>
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.useBehavior = void 0;
9
- var react_1 = require("react");
10
- // eslint-disable-next-line
11
- function useBehavior(s) {
12
- var _a = (0, react_1.useState)({}), next = _a[1];
13
- var current = (0, react_1.useRef)();
9
+ var tslib_1 = require("tslib");
10
+ var react_1 = tslib_1.__importDefault(require("react"));
11
+ var rxjs_1 = require("rxjs");
12
+ function useBehaviorLegacy(s) {
13
+ var _a = react_1.default.useState({}), next = _a[1];
14
+ var current = react_1.default.useRef();
14
15
  current.current = s === null || s === void 0 ? void 0 : s.value;
15
- (0, react_1.useEffect)(function () {
16
+ react_1.default.useEffect(function () {
16
17
  if (!s) {
17
18
  return;
18
19
  }
@@ -24,4 +25,17 @@ function useBehavior(s) {
24
25
  }, [s]);
25
26
  return s === null || s === void 0 ? void 0 : s.value;
26
27
  }
28
+ function useBehaviorReact18(s) {
29
+ return react_1.default.useSyncExternalStore(react_1.default.useCallback(function (callback) {
30
+ var sub = s === null || s === void 0 ? void 0 : s.pipe((0, rxjs_1.skip)(1)).subscribe(callback);
31
+ return function () { return sub === null || sub === void 0 ? void 0 : sub.unsubscribe(); };
32
+ }, [s]), react_1.default.useCallback(function () { return s === null || s === void 0 ? void 0 : s.value; }, [s]));
33
+ }
34
+ var _useBehavior = !!react_1.default.useSyncExternalStore
35
+ ? useBehaviorReact18
36
+ : useBehaviorLegacy;
37
+ // eslint-disable-next-line
38
+ function useBehavior(s) {
39
+ return _useBehavior(s);
40
+ }
27
41
  exports.useBehavior = useBehavior;
@@ -11,12 +11,14 @@ import { PluginUIComponent } from './base';
11
11
  import { PluginUIContext } from './context';
12
12
  export declare class Plugin extends React.Component<{
13
13
  plugin: PluginUIContext;
14
+ children?: any;
14
15
  }, {}> {
15
16
  region(kind: 'left' | 'right' | 'bottom' | 'main', element: JSX.Element): JSX.Element;
16
17
  render(): JSX.Element;
17
18
  }
18
19
  export declare class PluginContextContainer extends React.Component<{
19
20
  plugin: PluginUIContext;
21
+ children?: any;
20
22
  }> {
21
23
  render(): JSX.Element;
22
24
  }
@@ -137,11 +137,11 @@ var Layout = /** @class */ (function (_super) {
137
137
  configurable: true
138
138
  });
139
139
  Layout.prototype.render = function () {
140
- var _a, _b, _c, _d;
140
+ var _a, _b, _c, _d, _e;
141
141
  var layout = this.plugin.layout.state;
142
142
  var controls = ((_a = this.plugin.spec.components) === null || _a === void 0 ? void 0 : _a.controls) || {};
143
143
  var viewport = ((_c = (_b = this.plugin.spec.components) === null || _b === void 0 ? void 0 : _b.viewport) === null || _c === void 0 ? void 0 : _c.view) || DefaultViewport;
144
- return (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-plugin' }, { children: (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: this.layoutClassName, onDragEnter: this.onDragEnter }, { children: [(0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: this.layoutVisibilityClassName }, { children: [this.region('main', viewport), layout.showControls && controls.top !== 'none' && this.region('top', controls.top || sequence_1.SequenceView), layout.showControls && controls.left !== 'none' && this.region('left', controls.left || left_panel_1.LeftPanelControls), layout.showControls && controls.right !== 'none' && this.region('right', controls.right || ControlsWrapper), layout.showControls && controls.bottom !== 'none' && this.region('bottom', controls.bottom || Log)] })), !((_d = this.plugin.spec.components) === null || _d === void 0 ? void 0 : _d.hideTaskOverlay) && (0, jsx_runtime_1.jsx)(task_1.OverlayTaskProgress, {}), (0, jsx_runtime_1.jsx)(DragOverlay, { plugin: this.plugin, showDragOverlay: this.showDragOverlay })] })) }));
144
+ return (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-plugin' }, { children: (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: this.layoutClassName, onDragEnter: this.onDragEnter }, { children: [(0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: this.layoutVisibilityClassName }, { children: [this.region('main', viewport), layout.showControls && controls.top !== 'none' && this.region('top', controls.top || sequence_1.SequenceView), layout.showControls && controls.left !== 'none' && this.region('left', controls.left || left_panel_1.LeftPanelControls), layout.showControls && controls.right !== 'none' && this.region('right', controls.right || ControlsWrapper), layout.showControls && controls.bottom !== 'none' && this.region('bottom', controls.bottom || Log)] })), !((_d = this.plugin.spec.components) === null || _d === void 0 ? void 0 : _d.hideTaskOverlay) && (0, jsx_runtime_1.jsx)(task_1.OverlayTaskProgress, {}), !((_e = this.plugin.spec.components) === null || _e === void 0 ? void 0 : _e.disableDragOverlay) && (0, jsx_runtime_1.jsx)(DragOverlay, { plugin: this.plugin, showDragOverlay: this.showDragOverlay })] })) }));
145
145
  };
146
146
  return Layout;
147
147
  }(base_1.PluginUIComponent));
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ *
4
+ * @author David Sehnal <david.sehnal@gmail.com>
5
+ * @author Alexander Rose <alexander.rose@weirdbyte.de>
6
+ */
7
+ import { PluginUIContext } from './context';
8
+ import { PluginUISpec } from './spec';
9
+ export declare function createPluginUI(target: HTMLElement, spec?: PluginUISpec, options?: {
10
+ onBeforeUIRender?: (ctx: PluginUIContext) => (Promise<void> | void);
11
+ }): Promise<PluginUIContext>;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
+ *
5
+ * @author David Sehnal <david.sehnal@gmail.com>
6
+ * @author Alexander Rose <alexander.rose@weirdbyte.de>
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.createPluginUI = void 0;
10
+ var tslib_1 = require("tslib");
11
+ var react_1 = require("react");
12
+ var client_1 = require("react-dom/client");
13
+ var plugin_1 = require("./plugin");
14
+ var context_1 = require("./context");
15
+ var spec_1 = require("./spec");
16
+ function createPluginUI(target, spec, options) {
17
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
18
+ var ctx;
19
+ return tslib_1.__generator(this, function (_a) {
20
+ switch (_a.label) {
21
+ case 0:
22
+ ctx = new context_1.PluginUIContext(spec || (0, spec_1.DefaultPluginUISpec)());
23
+ return [4 /*yield*/, ctx.init()];
24
+ case 1:
25
+ _a.sent();
26
+ if (!(options === null || options === void 0 ? void 0 : options.onBeforeUIRender)) return [3 /*break*/, 3];
27
+ return [4 /*yield*/, options.onBeforeUIRender(ctx)];
28
+ case 2:
29
+ _a.sent();
30
+ _a.label = 3;
31
+ case 3:
32
+ (0, client_1.createRoot)(target).render((0, react_1.createElement)(plugin_1.Plugin, { plugin: ctx }));
33
+ return [2 /*return*/, ctx];
34
+ }
35
+ });
36
+ });
37
+ }
38
+ exports.createPluginUI = createPluginUI;
@@ -20,6 +20,7 @@ interface PluginUISpec extends PluginSpec {
20
20
  controls?: React.ComponentClass;
21
21
  };
22
22
  hideTaskOverlay?: boolean;
23
+ disableDragOverlay?: boolean;
23
24
  };
24
25
  }
25
26
  declare namespace PluginUISpec {
@@ -75,7 +75,7 @@ var TransformControlBase = /** @class */ (function (_super) {
75
75
  tslib_1.__extends(TransformControlBase, _super);
76
76
  function TransformControlBase() {
77
77
  var _this = _super !== null && _super.apply(this, arguments) || this;
78
- _this.busy = new rxjs_1.Subject();
78
+ _this.busy = new rxjs_1.BehaviorSubject(false);
79
79
  _this.onEnter = function () {
80
80
  if (_this.state.error)
81
81
  return;
@@ -142,13 +142,12 @@ var TransformControlBase = /** @class */ (function (_super) {
142
142
  };
143
143
  TransformControlBase.prototype.componentDidMount = function () {
144
144
  var _this = this;
145
- this.subscribe(this.plugin.behaviors.state.isBusy, function (b) {
146
- if (_this.state.busy !== b)
147
- _this.busy.next(b);
145
+ this.subscribe(this.plugin.behaviors.state.isBusy, function (busy) {
146
+ if (_this.busy.value !== busy)
147
+ _this.busy.next(busy);
148
148
  });
149
- this.subscribe(this.busy, function (busy) {
150
- if (_this.state.busy !== busy)
151
- _this.setState({ busy: busy });
149
+ this.subscribe(this.busy.pipe((0, rxjs_1.skip)(1)), function (busy) {
150
+ _this.setState({ busy: busy });
152
151
  });
153
152
  };
154
153
  TransformControlBase.prototype.renderApply = function () {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2020-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */