molstar 3.4.0 → 3.6.1

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 (401) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +202 -197
  3. package/build/viewer/embedded.html +43 -43
  4. package/build/viewer/index.html +106 -106
  5. package/build/viewer/molstar.js +1 -1
  6. package/build/viewer/molstar.js.LICENSE.txt +12 -14
  7. package/lib/apps/docking-viewer/index.html +36 -36
  8. package/lib/apps/docking-viewer/index.js +1 -1
  9. package/lib/apps/viewer/app.js +1 -1
  10. package/lib/apps/viewer/embedded.html +43 -43
  11. package/lib/apps/viewer/index.html +106 -106
  12. package/lib/cli/chem-comp-dict/util.d.ts +20 -20
  13. package/lib/cli/cif2bcif/converter.js +1 -1
  14. package/lib/cli/cif2bcif/index.js +4 -4
  15. package/lib/cli/cifschema/util/cif-dic.d.ts +1 -1
  16. package/lib/cli/cifschema/util/cif-dic.js +7 -5
  17. package/lib/cli/cifschema/util/generate.d.ts +1 -1
  18. package/lib/cli/cifschema/util/generate.js +12 -3
  19. package/lib/cli/cifschema/util/schema.d.ts +3 -3
  20. package/lib/cli/cifschema/util/schema.js +1 -1
  21. package/lib/commonjs/apps/docking-viewer/index.js +2 -2
  22. package/lib/commonjs/apps/viewer/app.js +2 -2
  23. package/lib/commonjs/cli/chem-comp-dict/util.d.ts +20 -20
  24. package/lib/commonjs/cli/cif2bcif/converter.js +1 -1
  25. package/lib/commonjs/cli/cif2bcif/index.js +4 -4
  26. package/lib/commonjs/cli/cifschema/util/cif-dic.d.ts +1 -1
  27. package/lib/commonjs/cli/cifschema/util/cif-dic.js +7 -5
  28. package/lib/commonjs/cli/cifschema/util/generate.d.ts +1 -1
  29. package/lib/commonjs/cli/cifschema/util/generate.js +12 -3
  30. package/lib/commonjs/cli/cifschema/util/schema.d.ts +3 -3
  31. package/lib/commonjs/cli/cifschema/util/schema.js +1 -1
  32. package/lib/commonjs/examples/alpha-orbitals/index.js +2 -2
  33. package/lib/commonjs/examples/basic-wrapper/index.js +2 -2
  34. package/lib/commonjs/examples/lighting/index.js +2 -2
  35. package/lib/commonjs/examples/proteopedia-wrapper/index.js +2 -2
  36. package/lib/commonjs/extensions/anvil/behavior.d.ts +1 -0
  37. package/lib/commonjs/extensions/anvil/representation.d.ts +4 -0
  38. package/lib/commonjs/extensions/cellpack/representation.d.ts +1 -0
  39. package/lib/commonjs/extensions/dnatco/confal-pyramids/color.d.ts +397 -2
  40. package/lib/commonjs/extensions/dnatco/confal-pyramids/color.js +223 -131
  41. package/lib/commonjs/extensions/dnatco/confal-pyramids/property.js +1 -3
  42. package/lib/commonjs/extensions/dnatco/confal-pyramids/representation.d.ts +3 -0
  43. package/lib/commonjs/extensions/dnatco/confal-pyramids/util.js +18 -19
  44. package/lib/commonjs/extensions/rcsb/assembly-symmetry/behavior.d.ts +1 -0
  45. package/lib/commonjs/extensions/rcsb/assembly-symmetry/representation.d.ts +1 -0
  46. package/lib/commonjs/extensions/rcsb/validation-report/representation.d.ts +5 -0
  47. package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +2 -0
  48. package/lib/commonjs/mol-canvas3d/helper/camera-helper.d.ts +1 -0
  49. package/lib/commonjs/mol-canvas3d/helper/handle-helper.d.ts +1 -0
  50. package/lib/commonjs/mol-canvas3d/helper/helper.d.ts +2 -0
  51. package/lib/commonjs/mol-canvas3d/passes/image.d.ts +1 -0
  52. package/lib/commonjs/mol-data/db/column.d.ts +10 -3
  53. package/lib/commonjs/mol-data/db/column.js +39 -17
  54. package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +4 -2
  55. package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.js +2 -2
  56. package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +0 -1
  57. package/lib/commonjs/mol-geo/geometry/mesh/color-smoothing.d.ts +1 -1
  58. package/lib/commonjs/mol-geo/geometry/mesh/color-smoothing.js +5 -3
  59. package/lib/commonjs/mol-geo/geometry/mesh/mesh.d.ts +2 -1
  60. package/lib/commonjs/mol-geo/geometry/mesh/mesh.js +2 -2
  61. package/lib/commonjs/mol-geo/geometry/points/points.d.ts +1 -1
  62. package/lib/commonjs/mol-geo/geometry/spheres/spheres.d.ts +2 -1
  63. package/lib/commonjs/mol-geo/geometry/spheres/spheres.js +2 -2
  64. package/lib/commonjs/mol-geo/geometry/texture-mesh/color-smoothing.d.ts +1 -1
  65. package/lib/commonjs/mol-geo/geometry/texture-mesh/color-smoothing.js +6 -4
  66. package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +2 -1
  67. package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.js +2 -2
  68. package/lib/commonjs/mol-gl/shader/chunks/wboit-write.glsl.d.ts +2 -2
  69. package/lib/commonjs/mol-gl/shader/chunks/wboit-write.glsl.js +2 -2
  70. package/lib/commonjs/mol-gl/shader/direct-volume.frag.d.ts +1 -1
  71. package/lib/commonjs/mol-gl/shader/direct-volume.frag.js +1 -1
  72. package/lib/commonjs/mol-gl/shader/image.frag.d.ts +2 -2
  73. package/lib/commonjs/mol-gl/shader/image.frag.js +2 -2
  74. package/lib/commonjs/mol-gl/shader/lines.frag.d.ts +2 -2
  75. package/lib/commonjs/mol-gl/shader/lines.frag.js +2 -2
  76. package/lib/commonjs/mol-gl/shader/points.frag.d.ts +2 -2
  77. package/lib/commonjs/mol-gl/shader/points.frag.js +2 -2
  78. package/lib/commonjs/mol-gl/shader/text.frag.d.ts +2 -2
  79. package/lib/commonjs/mol-gl/shader/text.frag.js +2 -2
  80. package/lib/commonjs/mol-gl/webgl/buffer.d.ts +2 -2
  81. package/lib/commonjs/mol-gl/webgl/buffer.js +12 -12
  82. package/lib/commonjs/mol-gl/webgl/context.d.ts +1 -1
  83. package/lib/commonjs/mol-gl/webgl/context.js +2 -2
  84. package/lib/commonjs/mol-gl/webgl/program.d.ts +1 -1
  85. package/lib/commonjs/mol-gl/webgl/program.js +10 -4
  86. package/lib/commonjs/mol-io/reader/cif/schema/bird.d.ts +8 -8
  87. package/lib/commonjs/mol-io/reader/cif/schema/bird.js +12 -11
  88. package/lib/commonjs/mol-io/reader/cif/schema/ccd-extras.d.ts +1 -1
  89. package/lib/commonjs/mol-io/reader/cif/schema/ccd.d.ts +12 -12
  90. package/lib/commonjs/mol-io/reader/cif/schema/ccd.js +13 -12
  91. package/lib/commonjs/mol-io/reader/cif/schema/mmcif-extras.d.ts +5 -5
  92. package/lib/commonjs/mol-io/reader/cif/schema/mmcif-extras.js +2 -2
  93. package/lib/commonjs/mol-io/reader/cif/schema/mmcif.d.ts +30 -26
  94. package/lib/commonjs/mol-io/reader/cif/schema/mmcif.js +44 -39
  95. package/lib/commonjs/mol-io/reader/cif/schema.d.ts +1 -1
  96. package/lib/commonjs/mol-io/reader/cif/schema.js +22 -2
  97. package/lib/commonjs/mol-io/writer/mol/encoder.js +1 -1
  98. package/lib/commonjs/mol-math/geometry/common.d.ts +2 -1
  99. package/lib/commonjs/mol-math/geometry/common.js +1 -1
  100. package/lib/commonjs/mol-math/geometry/gaussian-density/cpu.d.ts +1 -1
  101. package/lib/commonjs/mol-math/geometry/gaussian-density/cpu.js +2 -2
  102. package/lib/commonjs/mol-math/geometry/gaussian-density/gpu.d.ts +1 -1
  103. package/lib/commonjs/mol-math/geometry/gaussian-density/gpu.js +7 -7
  104. package/lib/commonjs/mol-math/geometry/gaussian-density.d.ts +2 -2
  105. package/lib/commonjs/mol-math/geometry/gaussian-density.js +1 -1
  106. package/lib/commonjs/mol-math/geometry/molecular-surface.d.ts +2 -1
  107. package/lib/commonjs/mol-math/geometry/molecular-surface.js +2 -2
  108. package/lib/commonjs/mol-math/geometry/primitives/box3d.js +2 -1
  109. package/lib/commonjs/mol-math/geometry/primitives/sphere3d.js +12 -6
  110. package/lib/commonjs/mol-model/structure/model/model.js +14 -6
  111. package/lib/commonjs/mol-model/structure/model/properties/common.js +1 -1
  112. package/lib/commonjs/mol-model/structure/model/types.d.ts +19 -17
  113. package/lib/commonjs/mol-model/structure/model/types.js +30 -31
  114. package/lib/commonjs/mol-model/structure/query/queries/generators.js +1 -1
  115. package/lib/commonjs/mol-model/structure/structure/properties.d.ts +1 -1
  116. package/lib/commonjs/mol-model/structure/structure/unit/bonds/inter-compute.js +2 -4
  117. package/lib/commonjs/mol-model/structure/structure/unit/bonds/intra-compute.js +1 -3
  118. package/lib/commonjs/mol-model/structure/structure/unit/rings.js +3 -0
  119. package/lib/commonjs/mol-model-formats/shape/ply.d.ts +2 -0
  120. package/lib/commonjs/mol-model-formats/structure/basic/entities.js +1 -1
  121. package/lib/commonjs/mol-model-formats/structure/basic/schema.d.ts +2 -2
  122. package/lib/commonjs/mol-model-formats/structure/common/component.d.ts +3 -3
  123. package/lib/commonjs/mol-model-formats/structure/common/component.js +46 -46
  124. package/lib/commonjs/mol-model-formats/structure/pdb/atom-site.d.ts +2 -2
  125. package/lib/commonjs/mol-model-formats/structure/pdb/atom-site.js +72 -7
  126. package/lib/commonjs/mol-model-formats/structure/pdb/secondary-structure.js +11 -11
  127. package/lib/commonjs/mol-model-formats/structure/pdb/to-cif.js +7 -2
  128. package/lib/commonjs/mol-model-formats/structure/property/bonds/chem_comp.js +1 -1
  129. package/lib/commonjs/mol-model-formats/structure/property/bonds/struct_conn.js +1 -1
  130. package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +1 -0
  131. package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +1 -0
  132. package/lib/commonjs/mol-model-props/computed/representations/interactions.d.ts +3 -0
  133. package/lib/commonjs/mol-model-props/integrative/cross-link-restraint/representation.d.ts +4 -0
  134. package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -3
  135. package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/util.js +4 -2
  136. package/lib/commonjs/mol-plugin/commands.d.ts +1 -0
  137. package/lib/commonjs/mol-plugin/util/viewport-screenshot.d.ts +3 -0
  138. package/lib/commonjs/mol-plugin-state/actions/structure.d.ts +6 -6
  139. package/lib/commonjs/mol-plugin-state/helpers/structure-selection-query.d.ts +1 -1
  140. package/lib/commonjs/mol-plugin-state/helpers/structure-selection-query.js +1 -1
  141. package/lib/commonjs/mol-plugin-state/transforms/representation.d.ts +6 -0
  142. package/lib/commonjs/mol-plugin-ui/react18.d.ts +11 -0
  143. package/lib/commonjs/mol-plugin-ui/react18.js +38 -0
  144. package/lib/commonjs/mol-plugin-ui/state/common.js +6 -7
  145. package/lib/commonjs/mol-plugin-ui/structure/focus.d.ts +1 -1
  146. package/lib/commonjs/mol-plugin-ui/structure/focus.js +2 -2
  147. package/lib/commonjs/mol-plugin-ui/task.d.ts +2 -21
  148. package/lib/commonjs/mol-plugin-ui/task.js +39 -43
  149. package/lib/commonjs/mol-repr/shape/loci/angle.d.ts +1 -0
  150. package/lib/commonjs/mol-repr/shape/loci/dihedral.d.ts +1 -0
  151. package/lib/commonjs/mol-repr/shape/loci/orientation.d.ts +1 -0
  152. package/lib/commonjs/mol-repr/shape/loci/plane.d.ts +1 -0
  153. package/lib/commonjs/mol-repr/shape/model/unitcell.d.ts +1 -0
  154. package/lib/commonjs/mol-repr/structure/complex-visual.d.ts +3 -0
  155. package/lib/commonjs/mol-repr/structure/params.d.ts +4 -0
  156. package/lib/commonjs/mol-repr/structure/registry.d.ts +10 -0
  157. package/lib/commonjs/mol-repr/structure/representation/backbone.d.ts +3 -0
  158. package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.d.ts +3 -0
  159. package/lib/commonjs/mol-repr/structure/representation/carbohydrate.d.ts +3 -0
  160. package/lib/commonjs/mol-repr/structure/representation/cartoon.d.ts +3 -0
  161. package/lib/commonjs/mol-repr/structure/representation/ellipsoid.d.ts +3 -0
  162. package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.d.ts +3 -0
  163. package/lib/commonjs/mol-repr/structure/representation/molecular-surface.d.ts +3 -0
  164. package/lib/commonjs/mol-repr/structure/representation/orientation.d.ts +3 -0
  165. package/lib/commonjs/mol-repr/structure/representation/putty.d.ts +3 -0
  166. package/lib/commonjs/mol-repr/structure/representation/spacefill.d.ts +3 -0
  167. package/lib/commonjs/mol-repr/structure/units-visual.d.ts +4 -0
  168. package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +2 -0
  169. package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +2 -0
  170. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +1 -0
  171. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +1 -0
  172. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +1 -0
  173. package/lib/commonjs/mol-repr/structure/visual/element-sphere.d.ts +2 -0
  174. package/lib/commonjs/mol-repr/structure/visual/ellipsoid-mesh.d.ts +1 -0
  175. package/lib/commonjs/mol-repr/structure/visual/gaussian-density-volume.js +2 -3
  176. package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +5 -1
  177. package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.js +9 -9
  178. package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +1 -1
  179. package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.js +4 -5
  180. package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -0
  181. package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.js +3 -3
  182. package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +1 -1
  183. package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.js +4 -4
  184. package/lib/commonjs/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +1 -0
  185. package/lib/commonjs/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +1 -0
  186. package/lib/commonjs/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +1 -0
  187. package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +2 -0
  188. package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +2 -0
  189. package/lib/commonjs/mol-repr/structure/visual/polymer-direction-wedge.d.ts +1 -0
  190. package/lib/commonjs/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +1 -0
  191. package/lib/commonjs/mol-repr/structure/visual/polymer-trace-mesh.d.ts +1 -0
  192. package/lib/commonjs/mol-repr/structure/visual/polymer-tube-mesh.d.ts +1 -0
  193. package/lib/commonjs/mol-repr/structure/visual/util/common.d.ts +1 -3
  194. package/lib/commonjs/mol-repr/structure/visual/util/common.js +2 -27
  195. package/lib/commonjs/mol-repr/util.d.ts +2 -1
  196. package/lib/commonjs/mol-repr/util.js +2 -2
  197. package/lib/commonjs/mol-repr/volume/isosurface.d.ts +5 -0
  198. package/lib/commonjs/mol-repr/volume/registry.d.ts +1 -0
  199. package/lib/commonjs/mol-script/language/builder.d.ts +1 -0
  200. package/lib/examples/alpha-orbitals/index.html +61 -61
  201. package/lib/examples/alpha-orbitals/index.js +1 -1
  202. package/lib/examples/basic-wrapper/index.html +137 -137
  203. package/lib/examples/basic-wrapper/index.js +1 -1
  204. package/lib/examples/lighting/index.html +88 -88
  205. package/lib/examples/lighting/index.js +1 -1
  206. package/lib/examples/proteopedia-wrapper/index.html +236 -236
  207. package/lib/examples/proteopedia-wrapper/index.js +1 -1
  208. package/lib/extensions/anvil/behavior.d.ts +1 -0
  209. package/lib/extensions/anvil/representation.d.ts +4 -0
  210. package/lib/extensions/cellpack/representation.d.ts +1 -0
  211. package/lib/extensions/dnatco/confal-pyramids/color.d.ts +397 -2
  212. package/lib/extensions/dnatco/confal-pyramids/color.js +224 -132
  213. package/lib/extensions/dnatco/confal-pyramids/property.js +1 -3
  214. package/lib/extensions/dnatco/confal-pyramids/representation.d.ts +3 -0
  215. package/lib/extensions/dnatco/confal-pyramids/util.js +19 -20
  216. package/lib/extensions/rcsb/assembly-symmetry/behavior.d.ts +1 -0
  217. package/lib/extensions/rcsb/assembly-symmetry/representation.d.ts +1 -0
  218. package/lib/extensions/rcsb/validation-report/representation.d.ts +5 -0
  219. package/lib/mol-canvas3d/canvas3d.d.ts +2 -0
  220. package/lib/mol-canvas3d/helper/camera-helper.d.ts +1 -0
  221. package/lib/mol-canvas3d/helper/handle-helper.d.ts +1 -0
  222. package/lib/mol-canvas3d/helper/helper.d.ts +2 -0
  223. package/lib/mol-canvas3d/passes/image.d.ts +1 -0
  224. package/lib/mol-data/db/column.d.ts +10 -3
  225. package/lib/mol-data/db/column.js +39 -18
  226. package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +4 -2
  227. package/lib/mol-geo/geometry/cylinders/cylinders.js +2 -2
  228. package/lib/mol-geo/geometry/lines/lines.d.ts +0 -1
  229. package/lib/mol-geo/geometry/mesh/color-smoothing.d.ts +1 -1
  230. package/lib/mol-geo/geometry/mesh/color-smoothing.js +5 -3
  231. package/lib/mol-geo/geometry/mesh/mesh.d.ts +2 -1
  232. package/lib/mol-geo/geometry/mesh/mesh.js +2 -2
  233. package/lib/mol-geo/geometry/points/points.d.ts +1 -1
  234. package/lib/mol-geo/geometry/spheres/spheres.d.ts +2 -1
  235. package/lib/mol-geo/geometry/spheres/spheres.js +2 -2
  236. package/lib/mol-geo/geometry/texture-mesh/color-smoothing.d.ts +1 -1
  237. package/lib/mol-geo/geometry/texture-mesh/color-smoothing.js +6 -4
  238. package/lib/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +2 -1
  239. package/lib/mol-geo/geometry/texture-mesh/texture-mesh.js +2 -2
  240. package/lib/mol-gl/shader/chunks/wboit-write.glsl.d.ts +2 -2
  241. package/lib/mol-gl/shader/chunks/wboit-write.glsl.js +2 -2
  242. package/lib/mol-gl/shader/direct-volume.frag.d.ts +1 -1
  243. package/lib/mol-gl/shader/direct-volume.frag.js +1 -1
  244. package/lib/mol-gl/shader/image.frag.d.ts +2 -2
  245. package/lib/mol-gl/shader/image.frag.js +2 -2
  246. package/lib/mol-gl/shader/lines.frag.d.ts +2 -2
  247. package/lib/mol-gl/shader/lines.frag.js +2 -2
  248. package/lib/mol-gl/shader/points.frag.d.ts +2 -2
  249. package/lib/mol-gl/shader/points.frag.js +2 -2
  250. package/lib/mol-gl/shader/text.frag.d.ts +2 -2
  251. package/lib/mol-gl/shader/text.frag.js +2 -2
  252. package/lib/mol-gl/webgl/buffer.d.ts +2 -2
  253. package/lib/mol-gl/webgl/buffer.js +12 -12
  254. package/lib/mol-gl/webgl/context.d.ts +1 -1
  255. package/lib/mol-gl/webgl/context.js +2 -2
  256. package/lib/mol-gl/webgl/program.d.ts +1 -1
  257. package/lib/mol-gl/webgl/program.js +10 -4
  258. package/lib/mol-io/reader/cif/schema/bird.d.ts +8 -8
  259. package/lib/mol-io/reader/cif/schema/bird.js +12 -11
  260. package/lib/mol-io/reader/cif/schema/ccd-extras.d.ts +1 -1
  261. package/lib/mol-io/reader/cif/schema/ccd.d.ts +12 -12
  262. package/lib/mol-io/reader/cif/schema/ccd.js +13 -12
  263. package/lib/mol-io/reader/cif/schema/mmcif-extras.d.ts +5 -5
  264. package/lib/mol-io/reader/cif/schema/mmcif-extras.js +2 -2
  265. package/lib/mol-io/reader/cif/schema/mmcif.d.ts +30 -26
  266. package/lib/mol-io/reader/cif/schema/mmcif.js +44 -39
  267. package/lib/mol-io/reader/cif/schema.d.ts +1 -1
  268. package/lib/mol-io/reader/cif/schema.js +22 -2
  269. package/lib/mol-io/writer/mol/encoder.js +1 -1
  270. package/lib/mol-math/geometry/common.d.ts +2 -1
  271. package/lib/mol-math/geometry/common.js +1 -1
  272. package/lib/mol-math/geometry/gaussian-density/cpu.d.ts +1 -1
  273. package/lib/mol-math/geometry/gaussian-density/cpu.js +2 -2
  274. package/lib/mol-math/geometry/gaussian-density/gpu.d.ts +1 -1
  275. package/lib/mol-math/geometry/gaussian-density/gpu.js +7 -7
  276. package/lib/mol-math/geometry/gaussian-density.d.ts +2 -2
  277. package/lib/mol-math/geometry/gaussian-density.js +1 -1
  278. package/lib/mol-math/geometry/molecular-surface.d.ts +2 -1
  279. package/lib/mol-math/geometry/molecular-surface.js +2 -2
  280. package/lib/mol-math/geometry/primitives/box3d.js +2 -1
  281. package/lib/mol-math/geometry/primitives/sphere3d.js +12 -6
  282. package/lib/mol-model/structure/model/model.js +14 -6
  283. package/lib/mol-model/structure/model/properties/common.js +1 -1
  284. package/lib/mol-model/structure/model/types.d.ts +19 -17
  285. package/lib/mol-model/structure/model/types.js +30 -31
  286. package/lib/mol-model/structure/query/queries/generators.js +1 -1
  287. package/lib/mol-model/structure/structure/properties.d.ts +1 -1
  288. package/lib/mol-model/structure/structure/unit/bonds/inter-compute.js +2 -4
  289. package/lib/mol-model/structure/structure/unit/bonds/intra-compute.js +1 -3
  290. package/lib/mol-model/structure/structure/unit/rings.js +3 -0
  291. package/lib/mol-model-formats/shape/ply.d.ts +2 -0
  292. package/lib/mol-model-formats/structure/basic/entities.js +1 -1
  293. package/lib/mol-model-formats/structure/basic/schema.d.ts +2 -2
  294. package/lib/mol-model-formats/structure/common/component.d.ts +3 -3
  295. package/lib/mol-model-formats/structure/common/component.js +46 -46
  296. package/lib/mol-model-formats/structure/pdb/atom-site.d.ts +2 -2
  297. package/lib/mol-model-formats/structure/pdb/atom-site.js +72 -7
  298. package/lib/mol-model-formats/structure/pdb/secondary-structure.js +11 -11
  299. package/lib/mol-model-formats/structure/pdb/to-cif.js +7 -2
  300. package/lib/mol-model-formats/structure/property/bonds/chem_comp.js +1 -1
  301. package/lib/mol-model-formats/structure/property/bonds/struct_conn.js +1 -1
  302. package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +1 -0
  303. package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +1 -0
  304. package/lib/mol-model-props/computed/representations/interactions.d.ts +3 -0
  305. package/lib/mol-model-props/integrative/cross-link-restraint/representation.d.ts +4 -0
  306. package/lib/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -3
  307. package/lib/mol-plugin/behavior/dynamic/volume-streaming/util.js +4 -2
  308. package/lib/mol-plugin/commands.d.ts +1 -0
  309. package/lib/mol-plugin/util/viewport-screenshot.d.ts +3 -0
  310. package/lib/mol-plugin/version.js +2 -2
  311. package/lib/mol-plugin-state/actions/structure.d.ts +6 -6
  312. package/lib/mol-plugin-state/helpers/structure-selection-query.d.ts +1 -1
  313. package/lib/mol-plugin-state/helpers/structure-selection-query.js +1 -1
  314. package/lib/mol-plugin-state/transforms/representation.d.ts +6 -0
  315. package/lib/mol-plugin-ui/react18.d.ts +11 -0
  316. package/lib/mol-plugin-ui/react18.js +34 -0
  317. package/lib/mol-plugin-ui/skin/base/base.scss +32 -32
  318. package/lib/mol-plugin-ui/skin/base/components/controls-base.scss +333 -333
  319. package/lib/mol-plugin-ui/skin/base/components/controls.scss +418 -418
  320. package/lib/mol-plugin-ui/skin/base/components/help.scss +27 -27
  321. package/lib/mol-plugin-ui/skin/base/components/line-graph.scss +67 -67
  322. package/lib/mol-plugin-ui/skin/base/components/log.scss +100 -100
  323. package/lib/mol-plugin-ui/skin/base/components/misc.scss +643 -643
  324. package/lib/mol-plugin-ui/skin/base/components/sequence.scss +125 -125
  325. package/lib/mol-plugin-ui/skin/base/components/slider.scss +165 -165
  326. package/lib/mol-plugin-ui/skin/base/components/tasks.scss +99 -99
  327. package/lib/mol-plugin-ui/skin/base/components/toast.scss +83 -83
  328. package/lib/mol-plugin-ui/skin/base/components/transformer.scss +163 -163
  329. package/lib/mol-plugin-ui/skin/base/components/viewport.scss +128 -128
  330. package/lib/mol-plugin-ui/skin/base/layout/common.scss +71 -71
  331. package/lib/mol-plugin-ui/skin/base/layout/controls-landscape.scss +89 -89
  332. package/lib/mol-plugin-ui/skin/base/layout/controls-outside.scss +98 -98
  333. package/lib/mol-plugin-ui/skin/base/layout/controls-portrait.scss +108 -108
  334. package/lib/mol-plugin-ui/skin/base/layout.scss +40 -40
  335. package/lib/mol-plugin-ui/skin/base/logo.scss +12 -12
  336. package/lib/mol-plugin-ui/skin/base/normalize.scss +209 -209
  337. package/lib/mol-plugin-ui/skin/base/ui.scss +40 -40
  338. package/lib/mol-plugin-ui/skin/base/variables.scss +85 -85
  339. package/lib/mol-plugin-ui/skin/blue.scss +1 -1
  340. package/lib/mol-plugin-ui/skin/colors/blue.scss +23 -23
  341. package/lib/mol-plugin-ui/skin/colors/dark.scss +23 -23
  342. package/lib/mol-plugin-ui/skin/colors/light.scss +29 -29
  343. package/lib/mol-plugin-ui/skin/dark.scss +1 -1
  344. package/lib/mol-plugin-ui/skin/light.scss +1 -1
  345. package/lib/mol-plugin-ui/state/common.js +7 -8
  346. package/lib/mol-plugin-ui/structure/focus.d.ts +1 -1
  347. package/lib/mol-plugin-ui/structure/focus.js +2 -2
  348. package/lib/mol-plugin-ui/task.d.ts +2 -21
  349. package/lib/mol-plugin-ui/task.js +40 -46
  350. package/lib/mol-repr/shape/loci/angle.d.ts +1 -0
  351. package/lib/mol-repr/shape/loci/dihedral.d.ts +1 -0
  352. package/lib/mol-repr/shape/loci/orientation.d.ts +1 -0
  353. package/lib/mol-repr/shape/loci/plane.d.ts +1 -0
  354. package/lib/mol-repr/shape/model/unitcell.d.ts +1 -0
  355. package/lib/mol-repr/structure/complex-visual.d.ts +3 -0
  356. package/lib/mol-repr/structure/params.d.ts +4 -0
  357. package/lib/mol-repr/structure/registry.d.ts +10 -0
  358. package/lib/mol-repr/structure/representation/backbone.d.ts +3 -0
  359. package/lib/mol-repr/structure/representation/ball-and-stick.d.ts +3 -0
  360. package/lib/mol-repr/structure/representation/carbohydrate.d.ts +3 -0
  361. package/lib/mol-repr/structure/representation/cartoon.d.ts +3 -0
  362. package/lib/mol-repr/structure/representation/ellipsoid.d.ts +3 -0
  363. package/lib/mol-repr/structure/representation/gaussian-surface.d.ts +3 -0
  364. package/lib/mol-repr/structure/representation/molecular-surface.d.ts +3 -0
  365. package/lib/mol-repr/structure/representation/orientation.d.ts +3 -0
  366. package/lib/mol-repr/structure/representation/putty.d.ts +3 -0
  367. package/lib/mol-repr/structure/representation/spacefill.d.ts +3 -0
  368. package/lib/mol-repr/structure/units-visual.d.ts +4 -0
  369. package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +2 -0
  370. package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +2 -0
  371. package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +1 -0
  372. package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +1 -0
  373. package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +1 -0
  374. package/lib/mol-repr/structure/visual/element-sphere.d.ts +2 -0
  375. package/lib/mol-repr/structure/visual/ellipsoid-mesh.d.ts +1 -0
  376. package/lib/mol-repr/structure/visual/gaussian-density-volume.js +2 -3
  377. package/lib/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +5 -1
  378. package/lib/mol-repr/structure/visual/gaussian-surface-mesh.js +10 -10
  379. package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +1 -1
  380. package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.js +4 -5
  381. package/lib/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -0
  382. package/lib/mol-repr/structure/visual/molecular-surface-mesh.js +4 -4
  383. package/lib/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +1 -1
  384. package/lib/mol-repr/structure/visual/molecular-surface-wireframe.js +5 -5
  385. package/lib/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +1 -0
  386. package/lib/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +1 -0
  387. package/lib/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +1 -0
  388. package/lib/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +2 -0
  389. package/lib/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +2 -0
  390. package/lib/mol-repr/structure/visual/polymer-direction-wedge.d.ts +1 -0
  391. package/lib/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +1 -0
  392. package/lib/mol-repr/structure/visual/polymer-trace-mesh.d.ts +1 -0
  393. package/lib/mol-repr/structure/visual/polymer-tube-mesh.d.ts +1 -0
  394. package/lib/mol-repr/structure/visual/util/common.d.ts +1 -3
  395. package/lib/mol-repr/structure/visual/util/common.js +1 -24
  396. package/lib/mol-repr/util.d.ts +2 -1
  397. package/lib/mol-repr/util.js +2 -2
  398. package/lib/mol-repr/volume/isosurface.d.ts +5 -0
  399. package/lib/mol-repr/volume/registry.d.ts +1 -0
  400. package/lib/mol-script/language/builder.d.ts +1 -0
  401. package/package.json +162 -160
@@ -19,6 +19,7 @@ export declare const ElementSphereParams: {
19
19
  doubleSided: PD.BooleanParam;
20
20
  ignoreLight: PD.BooleanParam;
21
21
  xrayShaded: PD.BooleanParam;
22
+ allowTransparentBackfaces: PD.BooleanParam;
22
23
  bumpFrequency: PD.Numeric;
23
24
  bumpAmplitude: PD.Numeric;
24
25
  alpha: PD.Numeric;
@@ -53,6 +54,7 @@ export declare function ElementSphereVisual(materialId: number, structure: Struc
53
54
  doubleSided: PD.BooleanParam;
54
55
  ignoreLight: PD.BooleanParam;
55
56
  xrayShaded: PD.BooleanParam;
57
+ allowTransparentBackfaces: PD.BooleanParam;
56
58
  bumpFrequency: PD.Numeric;
57
59
  bumpAmplitude: PD.Numeric;
58
60
  alpha: PD.Numeric;
@@ -20,6 +20,7 @@ export declare const EllipsoidMeshParams: {
20
20
  flatShaded: PD.BooleanParam;
21
21
  ignoreLight: PD.BooleanParam;
22
22
  xrayShaded: PD.BooleanParam;
23
+ allowTransparentBackfaces: PD.BooleanParam;
23
24
  bumpFrequency: PD.Numeric;
24
25
  bumpAmplitude: PD.Numeric;
25
26
  alpha: PD.Numeric;
@@ -15,7 +15,6 @@ var linear_algebra_1 = require("../../../mol-math/linear-algebra");
15
15
  var element_1 = require("./util/element");
16
16
  var geometry_1 = require("../../../mol-math/geometry");
17
17
  var units_visual_1 = require("../units-visual");
18
- var common_1 = require("./util/common");
19
18
  function createGaussianDensityVolume(ctx, structure, theme, props, directVolume) {
20
19
  return tslib_1.__awaiter(this, void 0, void 0, function () {
21
20
  var runtime, webgl, oldTexture, densityTextureData, transform, texture, bbox, gridDim, stats, unitToCartn, cellDim, axisOrder, vol, sphere;
@@ -36,7 +35,7 @@ function createGaussianDensityVolume(ctx, structure, theme, props, directVolume)
36
35
  cellDim = linear_algebra_1.Mat4.getScaling((0, linear_algebra_1.Vec3)(), transform);
37
36
  axisOrder = linear_algebra_1.Vec3.create(0, 1, 2);
38
37
  vol = direct_volume_1.DirectVolume.create(bbox, gridDim, transform, unitToCartn, cellDim, texture, stats, true, axisOrder, directVolume);
39
- sphere = geometry_1.Sphere3D.expand((0, geometry_1.Sphere3D)(), structure.boundary.sphere, props.radiusOffset + (0, common_1.getStructureExtraRadius)(structure));
38
+ sphere = geometry_1.Sphere3D.expand((0, geometry_1.Sphere3D)(), structure.boundary.sphere, densityTextureData.maxRadius);
40
39
  vol.setBoundingSphere(sphere);
41
40
  return [2 /*return*/, vol];
42
41
  }
@@ -95,7 +94,7 @@ function createUnitsGaussianDensityVolume(ctx, unit, structure, theme, props, di
95
94
  cellDim = linear_algebra_1.Mat4.getScaling((0, linear_algebra_1.Vec3)(), transform);
96
95
  axisOrder = linear_algebra_1.Vec3.create(0, 1, 2);
97
96
  vol = direct_volume_1.DirectVolume.create(bbox, gridDim, transform, unitToCartn, cellDim, texture, stats, true, axisOrder, directVolume);
98
- sphere = geometry_1.Sphere3D.expand((0, geometry_1.Sphere3D)(), unit.boundary.sphere, props.radiusOffset + (0, common_1.getUnitExtraRadius)(unit));
97
+ sphere = geometry_1.Sphere3D.expand((0, geometry_1.Sphere3D)(), unit.boundary.sphere, densityTextureData.maxRadius);
99
98
  vol.setBoundingSphere(sphere);
100
99
  return [2 /*return*/, vol];
101
100
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */
@@ -26,6 +26,7 @@ export declare const GaussianSurfaceMeshParams: {
26
26
  flatShaded: PD.BooleanParam;
27
27
  ignoreLight: PD.BooleanParam;
28
28
  xrayShaded: PD.BooleanParam;
29
+ allowTransparentBackfaces: PD.BooleanParam;
29
30
  bumpFrequency: PD.Numeric;
30
31
  bumpAmplitude: PD.Numeric;
31
32
  alpha: PD.Numeric;
@@ -65,6 +66,7 @@ export declare const StructureGaussianSurfaceMeshParams: {
65
66
  flatShaded: PD.BooleanParam;
66
67
  ignoreLight: PD.BooleanParam;
67
68
  xrayShaded: PD.BooleanParam;
69
+ allowTransparentBackfaces: PD.BooleanParam;
68
70
  bumpFrequency: PD.Numeric;
69
71
  bumpAmplitude: PD.Numeric;
70
72
  alpha: PD.Numeric;
@@ -104,6 +106,7 @@ export declare function GaussianSurfaceVisual(materialId: number, structure: Str
104
106
  flatShaded: PD.BooleanParam;
105
107
  ignoreLight: PD.BooleanParam;
106
108
  xrayShaded: PD.BooleanParam;
109
+ allowTransparentBackfaces: PD.BooleanParam;
107
110
  bumpFrequency: PD.Numeric;
108
111
  bumpAmplitude: PD.Numeric;
109
112
  alpha: PD.Numeric;
@@ -142,6 +145,7 @@ export declare function StructureGaussianSurfaceVisual(materialId: number, struc
142
145
  flatShaded: PD.BooleanParam;
143
146
  ignoreLight: PD.BooleanParam;
144
147
  xrayShaded: PD.BooleanParam;
148
+ allowTransparentBackfaces: PD.BooleanParam;
145
149
  bumpFrequency: PD.Numeric;
146
150
  bumpAmplitude: PD.Numeric;
147
151
  alpha: PD.Numeric;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
4
  *
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
6
6
  */
@@ -56,14 +56,14 @@ exports.StructureGaussianSurfaceVisual = StructureGaussianSurfaceVisual;
56
56
  //
57
57
  function createGaussianSurfaceMesh(ctx, unit, structure, theme, props, mesh) {
58
58
  return tslib_1.__awaiter(this, void 0, void 0, function () {
59
- var smoothness, _a, transform, field, idField, radiusFactor, resolution, params, surface, sphere;
59
+ var smoothness, _a, transform, field, idField, radiusFactor, resolution, maxRadius, params, surface, sphere;
60
60
  return tslib_1.__generator(this, function (_b) {
61
61
  switch (_b.label) {
62
62
  case 0:
63
63
  smoothness = props.smoothness;
64
64
  return [4 /*yield*/, (0, gaussian_1.computeUnitGaussianDensity)(structure, unit, theme.size, props).runInContext(ctx.runtime)];
65
65
  case 1:
66
- _a = _b.sent(), transform = _a.transform, field = _a.field, idField = _a.idField, radiusFactor = _a.radiusFactor, resolution = _a.resolution;
66
+ _a = _b.sent(), transform = _a.transform, field = _a.field, idField = _a.idField, radiusFactor = _a.radiusFactor, resolution = _a.resolution, maxRadius = _a.maxRadius;
67
67
  params = {
68
68
  isoLevel: Math.exp(-smoothness) / radiusFactor,
69
69
  scalarField: field,
@@ -76,7 +76,7 @@ function createGaussianSurfaceMesh(ctx, unit, structure, theme, props, mesh) {
76
76
  mesh_1.Mesh.transform(surface, transform);
77
77
  if (ctx.webgl && !ctx.webgl.isWebGL2)
78
78
  mesh_1.Mesh.uniformTriangleGroup(surface);
79
- sphere = geometry_1.Sphere3D.expand((0, geometry_1.Sphere3D)(), unit.boundary.sphere, props.radiusOffset + (0, common_1.getUnitExtraRadius)(unit));
79
+ sphere = geometry_1.Sphere3D.expand((0, geometry_1.Sphere3D)(), unit.boundary.sphere, maxRadius);
80
80
  surface.setBoundingSphere(sphere);
81
81
  return [2 /*return*/, surface];
82
82
  }
@@ -134,14 +134,14 @@ exports.GaussianSurfaceMeshVisual = GaussianSurfaceMeshVisual;
134
134
  //
135
135
  function createStructureGaussianSurfaceMesh(ctx, structure, theme, props, mesh) {
136
136
  return tslib_1.__awaiter(this, void 0, void 0, function () {
137
- var smoothness, _a, transform, field, idField, radiusFactor, resolution, params, surface, sphere;
137
+ var smoothness, _a, transform, field, idField, radiusFactor, resolution, maxRadius, params, surface, sphere;
138
138
  return tslib_1.__generator(this, function (_b) {
139
139
  switch (_b.label) {
140
140
  case 0:
141
141
  smoothness = props.smoothness;
142
142
  return [4 /*yield*/, (0, gaussian_1.computeStructureGaussianDensity)(structure, theme.size, props).runInContext(ctx.runtime)];
143
143
  case 1:
144
- _a = _b.sent(), transform = _a.transform, field = _a.field, idField = _a.idField, radiusFactor = _a.radiusFactor, resolution = _a.resolution;
144
+ _a = _b.sent(), transform = _a.transform, field = _a.field, idField = _a.idField, radiusFactor = _a.radiusFactor, resolution = _a.resolution, maxRadius = _a.maxRadius;
145
145
  params = {
146
146
  isoLevel: Math.exp(-smoothness) / radiusFactor,
147
147
  scalarField: field,
@@ -154,7 +154,7 @@ function createStructureGaussianSurfaceMesh(ctx, structure, theme, props, mesh)
154
154
  mesh_1.Mesh.transform(surface, transform);
155
155
  if (ctx.webgl && !ctx.webgl.isWebGL2)
156
156
  mesh_1.Mesh.uniformTriangleGroup(surface);
157
- sphere = geometry_1.Sphere3D.expand((0, geometry_1.Sphere3D)(), structure.boundary.sphere, props.radiusOffset + (0, common_1.getStructureExtraRadius)(structure));
157
+ sphere = geometry_1.Sphere3D.expand((0, geometry_1.Sphere3D)(), structure.boundary.sphere, maxRadius);
158
158
  surface.setBoundingSphere(sphere);
159
159
  return [2 /*return*/, surface];
160
160
  }
@@ -232,7 +232,7 @@ function createGaussianSurfaceTextureMesh(ctx, unit, structure, theme, props, te
232
232
  axisOrder = linear_algebra_1.Vec3.create(0, 1, 2);
233
233
  buffer = textureMesh === null || textureMesh === void 0 ? void 0 : textureMesh.doubleBuffer.get();
234
234
  gv = (0, isosurface_1.extractIsosurface)(ctx.webgl, densityTextureData.texture, densityTextureData.gridDim, densityTextureData.gridTexDim, densityTextureData.gridTexScale, densityTextureData.transform, isoLevel, false, true, axisOrder, buffer === null || buffer === void 0 ? void 0 : buffer.vertex, buffer === null || buffer === void 0 ? void 0 : buffer.group, buffer === null || buffer === void 0 ? void 0 : buffer.normal);
235
- boundingSphere = geometry_1.Sphere3D.expand((0, geometry_1.Sphere3D)(), unit.boundary.sphere, props.radiusOffset + (0, common_1.getStructureExtraRadius)(structure));
235
+ boundingSphere = geometry_1.Sphere3D.expand((0, geometry_1.Sphere3D)(), unit.boundary.sphere, densityTextureData.maxRadius);
236
236
  surface = texture_mesh_1.TextureMesh.create(gv.vertexCount, 1, gv.vertexTexture, gv.groupTexture, gv.normalTexture, boundingSphere, textureMesh);
237
237
  surface.meta.resolution = densityTextureData.resolution;
238
238
  return [2 /*return*/, surface];
@@ -316,7 +316,7 @@ function createStructureGaussianSurfaceTextureMesh(ctx, structure, theme, props,
316
316
  axisOrder = linear_algebra_1.Vec3.create(0, 1, 2);
317
317
  buffer = textureMesh === null || textureMesh === void 0 ? void 0 : textureMesh.doubleBuffer.get();
318
318
  gv = (0, isosurface_1.extractIsosurface)(ctx.webgl, densityTextureData.texture, densityTextureData.gridDim, densityTextureData.gridTexDim, densityTextureData.gridTexScale, densityTextureData.transform, isoLevel, false, true, axisOrder, buffer === null || buffer === void 0 ? void 0 : buffer.vertex, buffer === null || buffer === void 0 ? void 0 : buffer.group, buffer === null || buffer === void 0 ? void 0 : buffer.normal);
319
- boundingSphere = geometry_1.Sphere3D.expand((0, geometry_1.Sphere3D)(), structure.boundary.sphere, props.radiusOffset + (0, common_1.getStructureExtraRadius)(structure));
319
+ boundingSphere = geometry_1.Sphere3D.expand((0, geometry_1.Sphere3D)(), structure.boundary.sphere, densityTextureData.maxRadius);
320
320
  surface = texture_mesh_1.TextureMesh.create(gv.vertexCount, 1, gv.vertexTexture, gv.groupTexture, gv.normalTexture, boundingSphere, textureMesh);
321
321
  surface.meta.resolution = densityTextureData.resolution;
322
322
  return [2 /*return*/, surface];
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
4
  *
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
6
6
  */
@@ -14,17 +14,16 @@ var algorithm_1 = require("../../../mol-geo/util/marching-cubes/algorithm");
14
14
  var units_visual_1 = require("../units-visual");
15
15
  var element_1 = require("./util/element");
16
16
  var geometry_1 = require("../../../mol-math/geometry");
17
- var common_1 = require("./util/common");
18
17
  function createGaussianWireframe(ctx, unit, structure, theme, props, lines) {
19
18
  return tslib_1.__awaiter(this, void 0, void 0, function () {
20
- var smoothness, _a, transform, field, idField, params, wireframe, sphere;
19
+ var smoothness, _a, transform, field, idField, maxRadius, params, wireframe, sphere;
21
20
  return tslib_1.__generator(this, function (_b) {
22
21
  switch (_b.label) {
23
22
  case 0:
24
23
  smoothness = props.smoothness;
25
24
  return [4 /*yield*/, (0, gaussian_1.computeUnitGaussianDensity)(structure, unit, theme.size, props).runInContext(ctx.runtime)];
26
25
  case 1:
27
- _a = _b.sent(), transform = _a.transform, field = _a.field, idField = _a.idField;
26
+ _a = _b.sent(), transform = _a.transform, field = _a.field, idField = _a.idField, maxRadius = _a.maxRadius;
28
27
  params = {
29
28
  isoLevel: Math.exp(-smoothness),
30
29
  scalarField: field,
@@ -34,7 +33,7 @@ function createGaussianWireframe(ctx, unit, structure, theme, props, lines) {
34
33
  case 2:
35
34
  wireframe = _b.sent();
36
35
  lines_1.Lines.transform(wireframe, transform);
37
- sphere = geometry_1.Sphere3D.expand((0, geometry_1.Sphere3D)(), unit.boundary.sphere, props.radiusOffset + (0, common_1.getUnitExtraRadius)(unit));
36
+ sphere = geometry_1.Sphere3D.expand((0, geometry_1.Sphere3D)(), unit.boundary.sphere, maxRadius);
38
37
  wireframe.setBoundingSphere(sphere);
39
38
  return [2 /*return*/, wireframe];
40
39
  }
@@ -22,6 +22,7 @@ export declare const MolecularSurfaceMeshParams: {
22
22
  flatShaded: PD.BooleanParam;
23
23
  ignoreLight: PD.BooleanParam;
24
24
  xrayShaded: PD.BooleanParam;
25
+ allowTransparentBackfaces: PD.BooleanParam;
25
26
  bumpFrequency: PD.Numeric;
26
27
  bumpAmplitude: PD.Numeric;
27
28
  alpha: PD.Numeric;
@@ -22,12 +22,12 @@ exports.MolecularSurfaceMeshParams = tslib_1.__assign(tslib_1.__assign(tslib_1._
22
22
  //
23
23
  function createMolecularSurfaceMesh(ctx, unit, structure, theme, props, mesh) {
24
24
  return tslib_1.__awaiter(this, void 0, void 0, function () {
25
- var _a, transform, field, idField, resolution, params, surface, iterations, sphere;
25
+ var _a, transform, field, idField, resolution, maxRadius, params, surface, iterations, sphere;
26
26
  return tslib_1.__generator(this, function (_b) {
27
27
  switch (_b.label) {
28
28
  case 0: return [4 /*yield*/, (0, molecular_surface_2.computeUnitMolecularSurface)(structure, unit, theme.size, props).runInContext(ctx.runtime)];
29
29
  case 1:
30
- _a = _b.sent(), transform = _a.transform, field = _a.field, idField = _a.idField, resolution = _a.resolution;
30
+ _a = _b.sent(), transform = _a.transform, field = _a.field, idField = _a.idField, resolution = _a.resolution, maxRadius = _a.maxRadius;
31
31
  params = {
32
32
  isoLevel: props.probeRadius,
33
33
  scalarField: field,
@@ -43,7 +43,7 @@ function createMolecularSurfaceMesh(ctx, unit, structure, theme, props, mesh) {
43
43
  mesh_1.Mesh.transform(surface, transform);
44
44
  if (ctx.webgl && !ctx.webgl.isWebGL2)
45
45
  mesh_1.Mesh.uniformTriangleGroup(surface);
46
- sphere = geometry_1.Sphere3D.expand((0, geometry_1.Sphere3D)(), unit.boundary.sphere, (0, common_1.getUnitExtraRadius)(unit));
46
+ sphere = geometry_1.Sphere3D.expand((0, geometry_1.Sphere3D)(), unit.boundary.sphere, maxRadius);
47
47
  surface.setBoundingSphere(sphere);
48
48
  surface.meta.resolution = resolution;
49
49
  return [2 /*return*/, surface];
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2019-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2019-2020 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
  */
@@ -20,12 +20,12 @@ exports.MolecularSurfaceWireframeParams = tslib_1.__assign(tslib_1.__assign(tsli
20
20
  //
21
21
  function createMolecularSurfaceWireframe(ctx, unit, structure, theme, props, lines) {
22
22
  return tslib_1.__awaiter(this, void 0, void 0, function () {
23
- var _a, transform, field, idField, params, wireframe, sphere;
23
+ var _a, transform, field, idField, maxRadius, params, wireframe, sphere;
24
24
  return tslib_1.__generator(this, function (_b) {
25
25
  switch (_b.label) {
26
26
  case 0: return [4 /*yield*/, (0, molecular_surface_2.computeUnitMolecularSurface)(structure, unit, theme.size, props).runInContext(ctx.runtime)];
27
27
  case 1:
28
- _a = _b.sent(), transform = _a.transform, field = _a.field, idField = _a.idField;
28
+ _a = _b.sent(), transform = _a.transform, field = _a.field, idField = _a.idField, maxRadius = _a.maxRadius;
29
29
  params = {
30
30
  isoLevel: props.probeRadius,
31
31
  scalarField: field,
@@ -35,7 +35,7 @@ function createMolecularSurfaceWireframe(ctx, unit, structure, theme, props, lin
35
35
  case 2:
36
36
  wireframe = _b.sent();
37
37
  lines_1.Lines.transform(wireframe, transform);
38
- sphere = geometry_1.Sphere3D.expand((0, geometry_1.Sphere3D)(), unit.boundary.sphere, props.probeRadius + (0, common_1.getUnitExtraRadius)(unit));
38
+ sphere = geometry_1.Sphere3D.expand((0, geometry_1.Sphere3D)(), unit.boundary.sphere, maxRadius);
39
39
  wireframe.setBoundingSphere(sphere);
40
40
  return [2 /*return*/, wireframe];
41
41
  }
@@ -24,6 +24,7 @@ export declare const NucleotideBlockParams: {
24
24
  flatShaded: PD.BooleanParam;
25
25
  ignoreLight: PD.BooleanParam;
26
26
  xrayShaded: PD.BooleanParam;
27
+ allowTransparentBackfaces: PD.BooleanParam;
27
28
  bumpFrequency: PD.Numeric;
28
29
  bumpAmplitude: PD.Numeric;
29
30
  alpha: PD.Numeric;
@@ -27,6 +27,7 @@ export declare const NucleotideRingParams: {
27
27
  flatShaded: PD.BooleanParam;
28
28
  ignoreLight: PD.BooleanParam;
29
29
  xrayShaded: PD.BooleanParam;
30
+ allowTransparentBackfaces: PD.BooleanParam;
30
31
  bumpFrequency: PD.Numeric;
31
32
  bumpAmplitude: PD.Numeric;
32
33
  alpha: PD.Numeric;
@@ -19,6 +19,7 @@ export declare const OrientationEllipsoidMeshParams: {
19
19
  flatShaded: PD.BooleanParam;
20
20
  ignoreLight: PD.BooleanParam;
21
21
  xrayShaded: PD.BooleanParam;
22
+ allowTransparentBackfaces: PD.BooleanParam;
22
23
  bumpFrequency: PD.Numeric;
23
24
  bumpAmplitude: PD.Numeric;
24
25
  alpha: PD.Numeric;
@@ -17,6 +17,7 @@ export declare const PolymerBackboneCylinderParams: {
17
17
  doubleSided: PD.BooleanParam;
18
18
  ignoreLight: PD.BooleanParam;
19
19
  xrayShaded: PD.BooleanParam;
20
+ allowTransparentBackfaces: PD.BooleanParam;
20
21
  bumpFrequency: PD.Numeric;
21
22
  bumpAmplitude: PD.Numeric;
22
23
  alpha: PD.Numeric;
@@ -50,6 +51,7 @@ export declare function PolymerBackboneCylinderVisual(materialId: number, struct
50
51
  doubleSided: PD.BooleanParam;
51
52
  ignoreLight: PD.BooleanParam;
52
53
  xrayShaded: PD.BooleanParam;
54
+ allowTransparentBackfaces: PD.BooleanParam;
53
55
  bumpFrequency: PD.Numeric;
54
56
  bumpAmplitude: PD.Numeric;
55
57
  alpha: PD.Numeric;
@@ -16,6 +16,7 @@ export declare const PolymerBackboneSphereParams: {
16
16
  doubleSided: PD.BooleanParam;
17
17
  ignoreLight: PD.BooleanParam;
18
18
  xrayShaded: PD.BooleanParam;
19
+ allowTransparentBackfaces: PD.BooleanParam;
19
20
  bumpFrequency: PD.Numeric;
20
21
  bumpAmplitude: PD.Numeric;
21
22
  alpha: PD.Numeric;
@@ -48,6 +49,7 @@ export declare function PolymerBackboneSphereVisual(materialId: number, structur
48
49
  doubleSided: PD.BooleanParam;
49
50
  ignoreLight: PD.BooleanParam;
50
51
  xrayShaded: PD.BooleanParam;
52
+ allowTransparentBackfaces: PD.BooleanParam;
51
53
  bumpFrequency: PD.Numeric;
52
54
  bumpAmplitude: PD.Numeric;
53
55
  alpha: PD.Numeric;
@@ -21,6 +21,7 @@ export declare const PolymerDirectionParams: {
21
21
  flatShaded: PD.BooleanParam;
22
22
  ignoreLight: PD.BooleanParam;
23
23
  xrayShaded: PD.BooleanParam;
24
+ allowTransparentBackfaces: PD.BooleanParam;
24
25
  bumpFrequency: PD.Numeric;
25
26
  bumpAmplitude: PD.Numeric;
26
27
  alpha: PD.Numeric;
@@ -24,6 +24,7 @@ export declare const PolymerGapParams: {
24
24
  flatShaded: PD.BooleanParam;
25
25
  ignoreLight: PD.BooleanParam;
26
26
  xrayShaded: PD.BooleanParam;
27
+ allowTransparentBackfaces: PD.BooleanParam;
27
28
  bumpFrequency: PD.Numeric;
28
29
  bumpAmplitude: PD.Numeric;
29
30
  alpha: PD.Numeric;
@@ -42,6 +42,7 @@ export declare const PolymerTraceParams: {
42
42
  flatShaded: PD.BooleanParam;
43
43
  ignoreLight: PD.BooleanParam;
44
44
  xrayShaded: PD.BooleanParam;
45
+ allowTransparentBackfaces: PD.BooleanParam;
45
46
  bumpFrequency: PD.Numeric;
46
47
  bumpAmplitude: PD.Numeric;
47
48
  alpha: PD.Numeric;
@@ -30,6 +30,7 @@ export declare const PolymerTubeParams: {
30
30
  flatShaded: PD.BooleanParam;
31
31
  ignoreLight: PD.BooleanParam;
32
32
  xrayShaded: PD.BooleanParam;
33
+ allowTransparentBackfaces: PD.BooleanParam;
33
34
  bumpFrequency: PD.Numeric;
34
35
  bumpAmplitude: PD.Numeric;
35
36
  alpha: PD.Numeric;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */
@@ -85,5 +85,3 @@ export declare function getStructureConformationAndRadius(structure: Structure,
85
85
  export declare function isHydrogen(unit: Unit, element: ElementIndex): boolean;
86
86
  export declare function isH(atomicNumber: ArrayLike<number>, element: ElementIndex): boolean;
87
87
  export declare function isTrace(unit: Unit, element: ElementIndex): boolean;
88
- export declare function getUnitExtraRadius(unit: Unit): number;
89
- export declare function getStructureExtraRadius(structure: Structure): number;
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
4
  *
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.getStructureExtraRadius = exports.getUnitExtraRadius = exports.isTrace = exports.isH = exports.isHydrogen = exports.getStructureConformationAndRadius = exports.getUnitConformationAndRadius = exports.DefaultCommonSurfaceProps = exports.CommonSurfaceParams = exports.getConformation = exports.ensureReasonableResolution = exports.getVolumeSliceInfo = exports.includesUnitKind = exports.UnitKindOptions = exports.UnitKindInfo = exports.createUnitsTransform = exports.getAltResidueLociFromId = exports.getAltResidueLoci = exports.getResidueLoci = void 0;
8
+ exports.isTrace = exports.isH = exports.isHydrogen = exports.getStructureConformationAndRadius = exports.getUnitConformationAndRadius = exports.DefaultCommonSurfaceProps = exports.CommonSurfaceParams = exports.getConformation = exports.ensureReasonableResolution = exports.getVolumeSliceInfo = exports.includesUnitKind = exports.UnitKindOptions = exports.UnitKindInfo = exports.createUnitsTransform = exports.getAltResidueLociFromId = exports.getAltResidueLoci = exports.getResidueLoci = void 0;
9
9
  var tslib_1 = require("tslib");
10
10
  var structure_1 = require("../../../../mol-model/structure");
11
11
  var linear_algebra_1 = require("../../../../mol-math/linear-algebra");
@@ -289,28 +289,3 @@ function isTrace(unit, element) {
289
289
  return false;
290
290
  }
291
291
  exports.isTrace = isTrace;
292
- function getUnitExtraRadius(unit) {
293
- if (structure_1.Unit.isAtomic(unit))
294
- return 4;
295
- var max = 0;
296
- var elements = unit.elements;
297
- var r = unit.conformation.r;
298
- for (var i = 0, _i = elements.length; i < _i; i++) {
299
- var _r = r(elements[i]);
300
- if (_r > max)
301
- max = _r;
302
- }
303
- return max + 1;
304
- }
305
- exports.getUnitExtraRadius = getUnitExtraRadius;
306
- function getStructureExtraRadius(structure) {
307
- var max = 0;
308
- for (var _a = 0, _b = structure.unitSymmetryGroups; _a < _b.length; _a++) {
309
- var ug = _b[_a];
310
- var r = getUnitExtraRadius(ug.units[0]);
311
- if (r > max)
312
- max = r;
313
- }
314
- return max;
315
- }
316
- exports.getStructureExtraRadius = getStructureExtraRadius;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */
@@ -31,6 +31,7 @@ export interface QualityProps {
31
31
  doubleSided: boolean;
32
32
  xrayShaded: boolean;
33
33
  alpha: number;
34
+ allowTransparentBackfaces: boolean;
34
35
  }
35
36
  export declare const DefaultQualityThresholds: {
36
37
  lowestElementCount: number;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
4
  *
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
6
6
  */
@@ -169,7 +169,7 @@ function getQualityProps(props, data) {
169
169
  // max resolution based on volume (for 'auto' quality)
170
170
  resolution = Math.max(resolution, volume / 500000000);
171
171
  resolution = Math.min(resolution, 20);
172
- if ((props.alpha !== undefined && props.alpha < 1) || !!props.xrayShaded) {
172
+ if (!props.allowTransparentBackfaces && ((props.alpha !== undefined && props.alpha < 1) || !!props.xrayShaded)) {
173
173
  doubleSided = false;
174
174
  }
175
175
  return {
@@ -93,6 +93,7 @@ export declare function IsosurfaceVisual(materialId: number, volume: Volume, pro
93
93
  flatShaded: PD.BooleanParam;
94
94
  ignoreLight: PD.BooleanParam;
95
95
  xrayShaded: PD.BooleanParam;
96
+ allowTransparentBackfaces: PD.BooleanParam;
96
97
  bumpFrequency: PD.Numeric;
97
98
  bumpAmplitude: PD.Numeric;
98
99
  alpha: PD.Numeric;
@@ -166,6 +167,7 @@ export declare const IsosurfaceMeshParams: {
166
167
  flatShaded: PD.BooleanParam;
167
168
  ignoreLight: PD.BooleanParam;
168
169
  xrayShaded: PD.BooleanParam;
170
+ allowTransparentBackfaces: PD.BooleanParam;
169
171
  bumpFrequency: PD.Numeric;
170
172
  bumpAmplitude: PD.Numeric;
171
173
  alpha: PD.Numeric;
@@ -328,6 +330,7 @@ export declare const IsosurfaceParams: {
328
330
  flatShaded: PD.BooleanParam;
329
331
  ignoreLight: PD.BooleanParam;
330
332
  xrayShaded: PD.BooleanParam;
333
+ allowTransparentBackfaces: PD.BooleanParam;
331
334
  bumpAmplitude: PD.Numeric;
332
335
  };
333
336
  export declare type IsosurfaceParams = typeof IsosurfaceParams;
@@ -403,6 +406,7 @@ export declare function getIsosurfaceParams(ctx: ThemeRegistryContext, volume: V
403
406
  flatShaded: PD.BooleanParam;
404
407
  ignoreLight: PD.BooleanParam;
405
408
  xrayShaded: PD.BooleanParam;
409
+ allowTransparentBackfaces: PD.BooleanParam;
406
410
  bumpAmplitude: PD.Numeric;
407
411
  };
408
412
  export declare type IsosurfaceRepresentation = VolumeRepresentation<IsosurfaceParams>;
@@ -479,5 +483,6 @@ export declare const IsosurfaceRepresentationProvider: VolumeRepresentationProvi
479
483
  flatShaded: PD.BooleanParam;
480
484
  ignoreLight: PD.BooleanParam;
481
485
  xrayShaded: PD.BooleanParam;
486
+ allowTransparentBackfaces: PD.BooleanParam;
482
487
  bumpAmplitude: PD.Numeric;
483
488
  }, "isosurface">;
@@ -82,6 +82,7 @@ export declare namespace VolumeRepresentationRegistry {
82
82
  flatShaded: import("../../mol-util/param-definition").ParamDefinition.BooleanParam;
83
83
  ignoreLight: import("../../mol-util/param-definition").ParamDefinition.BooleanParam;
84
84
  xrayShaded: import("../../mol-util/param-definition").ParamDefinition.BooleanParam;
85
+ allowTransparentBackfaces: import("../../mol-util/param-definition").ParamDefinition.BooleanParam;
85
86
  bumpAmplitude: import("../../mol-util/param-definition").ParamDefinition.Numeric;
86
87
  }, "isosurface">;
87
88
  slice: import("./representation").VolumeRepresentationProvider<{
@@ -10,6 +10,7 @@ export declare namespace MolScriptBuilder {
10
10
  '@header': string;
11
11
  type: {
12
12
  '@header': string;
13
+ /** atom macromolecular property set */
13
14
  bool: MSymbol<import("./symbol").Arguments<import("./symbol").Arguments.PropTypes<{
14
15
  0: import("./symbol").Argument<import("./type").Type.AnyValue>;
15
16
  }>>, import("./type").Type.OneOf<boolean>>;