molstar 3.0.0-dev.9 → 3.1.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 (338) hide show
  1. package/README.md +7 -0
  2. package/build/viewer/index.html +2 -2
  3. package/build/viewer/molstar.js +1 -1
  4. package/lib/apps/docking-viewer/viewport.d.ts +2 -0
  5. package/lib/apps/viewer/app.d.ts +2 -1
  6. package/lib/apps/viewer/app.js +21 -8
  7. package/lib/apps/viewer/index.html +2 -2
  8. package/lib/commonjs/apps/docking-viewer/viewport.d.ts +2 -0
  9. package/lib/commonjs/apps/viewer/app.d.ts +2 -1
  10. package/lib/commonjs/apps/viewer/app.js +23 -10
  11. package/lib/commonjs/examples/basic-wrapper/index.js +7 -3
  12. package/lib/commonjs/examples/proteopedia-wrapper/index.js +7 -1
  13. package/lib/commonjs/extensions/anvil/behavior.d.ts +1 -0
  14. package/lib/commonjs/extensions/anvil/representation.js +1 -1
  15. package/lib/commonjs/extensions/dnatco/confal-pyramids/behavior.d.ts +1 -0
  16. package/lib/commonjs/extensions/model-archive/quality-assessment/behavior.d.ts +2 -0
  17. package/lib/commonjs/extensions/model-export/export.d.ts +9 -0
  18. package/lib/commonjs/extensions/model-export/export.js +129 -0
  19. package/lib/commonjs/extensions/model-export/index.d.ts +7 -0
  20. package/lib/commonjs/extensions/model-export/index.js +36 -0
  21. package/lib/commonjs/extensions/model-export/ui.d.ts +11 -0
  22. package/lib/commonjs/extensions/model-export/ui.js +77 -0
  23. package/lib/commonjs/extensions/mp4-export/encoder.js +1 -1
  24. package/lib/commonjs/extensions/rcsb/assembly-symmetry/behavior.d.ts +4 -2
  25. package/lib/commonjs/extensions/rcsb/graphql/types.d.ts +13 -13
  26. package/lib/commonjs/extensions/rcsb/validation-report/behavior.d.ts +3 -0
  27. package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +12 -4
  28. package/lib/commonjs/mol-canvas3d/canvas3d.js +1 -1
  29. package/lib/commonjs/mol-canvas3d/controls/trackball.d.ts +9 -4
  30. package/lib/commonjs/mol-canvas3d/controls/trackball.js +50 -11
  31. package/lib/commonjs/mol-canvas3d/helper/interaction-events.js +1 -1
  32. package/lib/commonjs/mol-canvas3d/passes/draw.d.ts +1 -1
  33. package/lib/commonjs/mol-canvas3d/passes/draw.js +3 -3
  34. package/lib/commonjs/mol-gl/renderer.d.ts +2 -2
  35. package/lib/commonjs/mol-gl/renderer.js +3 -3
  36. package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +2 -2
  37. package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.js +2 -2
  38. package/lib/commonjs/mol-gl/shader/cylinders.frag.d.ts +2 -2
  39. package/lib/commonjs/mol-gl/shader/cylinders.frag.js +2 -2
  40. package/lib/commonjs/mol-gl/shader/direct-volume.frag.d.ts +2 -2
  41. package/lib/commonjs/mol-gl/shader/direct-volume.frag.js +2 -2
  42. package/lib/commonjs/mol-gl/shader/mesh.frag.d.ts +2 -2
  43. package/lib/commonjs/mol-gl/shader/mesh.frag.js +2 -2
  44. package/lib/commonjs/mol-gl/shader/spheres.frag.d.ts +2 -2
  45. package/lib/commonjs/mol-gl/shader/spheres.frag.js +2 -2
  46. package/lib/commonjs/mol-io/reader/cif/schema/bird.d.ts +1 -1
  47. package/lib/commonjs/mol-io/reader/cif/schema/bird.js +1 -1
  48. package/lib/commonjs/mol-io/reader/cif/schema/ccd.d.ts +1 -1
  49. package/lib/commonjs/mol-io/reader/cif/schema/ccd.js +1 -1
  50. package/lib/commonjs/mol-io/reader/cif/schema/mmcif.d.ts +2 -2
  51. package/lib/commonjs/mol-io/reader/cif/schema/mmcif.js +1 -1
  52. package/lib/commonjs/mol-io/reader/mol/parser.d.ts +23 -1
  53. package/lib/commonjs/mol-io/reader/mol/parser.js +116 -4
  54. package/lib/commonjs/mol-io/reader/sdf/parser-v3-util.d.ts +6 -0
  55. package/lib/commonjs/mol-io/reader/sdf/parser-v3-util.js +9 -0
  56. package/lib/commonjs/mol-io/reader/sdf/parser.d.ts +3 -1
  57. package/lib/commonjs/mol-io/reader/sdf/parser.js +11 -2
  58. package/lib/commonjs/mol-io/writer/cif/encoder/binary.js +9 -2
  59. package/lib/commonjs/mol-math/geometry/primitives/sphere3d.d.ts +1 -1
  60. package/lib/commonjs/mol-math/geometry/primitives/sphere3d.js +17 -4
  61. package/lib/commonjs/mol-math/geometry/symmetry-operator.d.ts +1 -1
  62. package/lib/commonjs/mol-math/geometry/symmetry-operator.js +10 -4
  63. package/lib/commonjs/mol-model/structure/export/categories/secondary-structure.js +8 -8
  64. package/lib/commonjs/mol-model/structure/export/mmcif.d.ts +1 -1
  65. package/lib/commonjs/mol-model/structure/export/mmcif.js +8 -5
  66. package/lib/commonjs/mol-model/structure/model/properties/coarse/hierarchy.d.ts +1 -1
  67. package/lib/commonjs/mol-model/structure/model/properties/coarse/hierarchy.js +24 -2
  68. package/lib/commonjs/mol-model/structure/model/properties/common.d.ts +1 -1
  69. package/lib/commonjs/mol-model/structure/structure/element/loci.d.ts +1 -1
  70. package/lib/commonjs/mol-model/structure/structure/element/loci.js +4 -2
  71. package/lib/commonjs/mol-model/structure/structure/properties.d.ts +1 -0
  72. package/lib/commonjs/mol-model/structure/structure/properties.js +2 -1
  73. package/lib/commonjs/mol-model/structure/structure/symmetry.js +1 -3
  74. package/lib/commonjs/mol-model/structure/structure/util/superposition-db-mapping.js +10 -5
  75. package/lib/commonjs/mol-model/volume/volume.d.ts +7 -0
  76. package/lib/commonjs/mol-model/volume/volume.js +18 -0
  77. package/lib/commonjs/mol-model-formats/structure/basic/atomic.d.ts +2 -2
  78. package/lib/commonjs/mol-model-formats/structure/basic/atomic.js +6 -6
  79. package/lib/commonjs/mol-model-formats/structure/basic/coarse.d.ts +1 -1
  80. package/lib/commonjs/mol-model-formats/structure/basic/coarse.js +3 -3
  81. package/lib/commonjs/mol-model-formats/structure/basic/entities.d.ts +2 -1
  82. package/lib/commonjs/mol-model-formats/structure/basic/entities.js +28 -24
  83. package/lib/commonjs/mol-model-formats/structure/basic/parser.js +17 -8
  84. package/lib/commonjs/mol-model-formats/structure/basic/properties.d.ts +6 -1
  85. package/lib/commonjs/mol-model-formats/structure/basic/properties.js +12 -22
  86. package/lib/commonjs/mol-model-formats/structure/mol.d.ts +2 -1
  87. package/lib/commonjs/mol-model-formats/structure/mol.js +19 -5
  88. package/lib/commonjs/mol-model-props/common/custom-property.d.ts +1 -1
  89. package/lib/commonjs/mol-model-props/computed/interactions/common.d.ts +1 -1
  90. package/lib/commonjs/mol-model-props/computed/interactions/common.js +16 -24
  91. package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +1 -1
  92. package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.js +44 -18
  93. package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +1 -1
  94. package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.js +38 -13
  95. package/lib/commonjs/mol-model-props/sequence/best-database-mapping.js +15 -15
  96. package/lib/commonjs/mol-plugin/animation-loop.d.ts +2 -0
  97. package/lib/commonjs/mol-plugin/animation-loop.js +1 -1
  98. package/lib/commonjs/mol-plugin/behavior/dynamic/representation.d.ts +1 -1
  99. package/lib/commonjs/mol-plugin/behavior/dynamic/representation.js +11 -6
  100. package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +2 -1
  101. package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +16 -7
  102. package/lib/commonjs/mol-plugin/behavior/static/representation.js +1 -1
  103. package/lib/commonjs/mol-plugin/commands.d.ts +6 -2
  104. package/lib/commonjs/mol-plugin/spec.d.ts +1 -1
  105. package/lib/commonjs/mol-plugin/spec.js +3 -1
  106. package/lib/commonjs/mol-plugin-state/actions/file.d.ts +3 -2
  107. package/lib/commonjs/mol-plugin-state/actions/file.js +67 -31
  108. package/lib/commonjs/mol-plugin-state/actions/volume.d.ts +1 -1
  109. package/lib/commonjs/mol-plugin-state/actions/volume.js +3 -3
  110. package/lib/commonjs/mol-plugin-state/animation/built-in/camera-rock.d.ts +16 -0
  111. package/lib/commonjs/mol-plugin-state/animation/built-in/camera-rock.js +62 -0
  112. package/lib/commonjs/mol-plugin-state/animation/built-in/camera-spin.d.ts +1 -1
  113. package/lib/commonjs/mol-plugin-state/animation/built-in/camera-spin.js +9 -8
  114. package/lib/commonjs/mol-plugin-state/animation/model.d.ts +4 -0
  115. package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +8 -6
  116. package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy.d.ts +2 -1
  117. package/lib/commonjs/mol-plugin-state/builder/structure/representation-preset.d.ts +180 -6
  118. package/lib/commonjs/mol-plugin-state/builder/structure/representation-preset.js +48 -2
  119. package/lib/commonjs/mol-plugin-state/builder/structure/representation.d.ts +2 -1
  120. package/lib/commonjs/mol-plugin-state/formats/volume.js +1 -11
  121. package/lib/commonjs/mol-plugin-state/manager/animation.d.ts +5 -1
  122. package/lib/commonjs/mol-plugin-state/manager/animation.js +5 -5
  123. package/lib/commonjs/mol-plugin-state/manager/structure/component.d.ts +2 -1
  124. package/lib/commonjs/mol-plugin-state/manager/structure/component.js +11 -8
  125. package/lib/commonjs/mol-plugin-ui/controls/icons.d.ts +2 -1
  126. package/lib/commonjs/mol-plugin-ui/controls/icons.js +8 -5
  127. package/lib/commonjs/mol-plugin-ui/controls.d.ts +1 -1
  128. package/lib/commonjs/mol-plugin-ui/controls.js +2 -1
  129. package/lib/commonjs/mol-plugin-ui/structure/quick-styles.d.ts +25 -0
  130. package/lib/commonjs/mol-plugin-ui/structure/quick-styles.js +131 -0
  131. package/lib/commonjs/mol-plugin-ui/structure/superposition.js +2 -2
  132. package/lib/commonjs/mol-plugin-ui/structure/volume.js +4 -4
  133. package/lib/commonjs/mol-plugin-ui/viewport/simple-settings.d.ts +1 -1
  134. package/lib/commonjs/mol-plugin-ui/viewport/simple-settings.js +4 -8
  135. package/lib/commonjs/mol-repr/shape/loci/common.d.ts +1 -1
  136. package/lib/commonjs/mol-repr/shape/loci/common.js +3 -3
  137. package/lib/commonjs/mol-repr/structure/registry.d.ts +1 -1
  138. package/lib/commonjs/mol-repr/structure/representation/cartoon.d.ts +4 -4
  139. package/lib/commonjs/mol-repr/structure/representation/cartoon.js +3 -3
  140. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +1 -1
  141. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.js +8 -4
  142. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +1 -1
  143. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.js +10 -6
  144. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +1 -1
  145. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.js +8 -4
  146. package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -1
  147. package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.js +2 -2
  148. package/lib/commonjs/mol-repr/structure/visual/util/bond.d.ts +1 -1
  149. package/lib/commonjs/mol-repr/structure/visual/util/bond.js +5 -4
  150. package/lib/commonjs/mol-repr/visual.d.ts +1 -1
  151. package/lib/commonjs/mol-repr/visual.js +2 -1
  152. package/lib/commonjs/mol-state/transform.js +12 -2
  153. package/lib/commonjs/mol-state/tree/immutable.d.ts +18 -0
  154. package/lib/commonjs/mol-state/tree/transient.d.ts +3 -4
  155. package/lib/commonjs/mol-theme/color/element-symbol.d.ts +289 -3
  156. package/lib/commonjs/mol-theme/color/element-symbol.js +25 -15
  157. package/lib/commonjs/mol-theme/color/entity-id.d.ts +1 -1
  158. package/lib/commonjs/mol-theme/color/entity-id.js +29 -5
  159. package/lib/commonjs/mol-theme/color/illustrative.d.ts +100 -29
  160. package/lib/commonjs/mol-theme/color/illustrative.js +26 -7
  161. package/lib/commonjs/mol-theme/color/molecule-type.d.ts +19 -1
  162. package/lib/commonjs/mol-theme/color/molecule-type.js +10 -5
  163. package/lib/commonjs/mol-theme/color/residue-name.d.ts +77 -1
  164. package/lib/commonjs/mol-theme/color/residue-name.js +10 -5
  165. package/lib/commonjs/mol-theme/color/secondary-structure.d.ts +27 -1
  166. package/lib/commonjs/mol-theme/color/secondary-structure.js +10 -5
  167. package/lib/commonjs/mol-theme/color.d.ts +253 -15
  168. package/lib/commonjs/mol-util/color/color.d.ts +1 -1
  169. package/lib/commonjs/mol-util/color/color.js +1 -1
  170. package/lib/commonjs/mol-util/color/params.d.ts +10 -0
  171. package/lib/commonjs/mol-util/color/params.js +19 -0
  172. package/lib/commonjs/servers/volume/config.js +3 -3
  173. package/lib/commonjs/servers/volume/query.js +1 -1
  174. package/lib/examples/basic-wrapper/index.js +7 -3
  175. package/lib/examples/proteopedia-wrapper/index.js +7 -1
  176. package/lib/extensions/anvil/behavior.d.ts +1 -0
  177. package/lib/extensions/anvil/representation.js +1 -1
  178. package/lib/extensions/dnatco/confal-pyramids/behavior.d.ts +1 -0
  179. package/lib/extensions/model-archive/quality-assessment/behavior.d.ts +2 -0
  180. package/lib/extensions/model-export/export.d.ts +9 -0
  181. package/lib/extensions/model-export/export.js +125 -0
  182. package/lib/extensions/model-export/index.d.ts +7 -0
  183. package/lib/extensions/model-export/index.js +33 -0
  184. package/lib/extensions/model-export/ui.d.ts +11 -0
  185. package/lib/extensions/model-export/ui.js +74 -0
  186. package/lib/extensions/mp4-export/encoder.js +1 -1
  187. package/lib/extensions/rcsb/assembly-symmetry/behavior.d.ts +4 -2
  188. package/lib/extensions/rcsb/graphql/types.d.ts +13 -13
  189. package/lib/extensions/rcsb/validation-report/behavior.d.ts +3 -0
  190. package/lib/mol-canvas3d/canvas3d.d.ts +12 -4
  191. package/lib/mol-canvas3d/canvas3d.js +1 -1
  192. package/lib/mol-canvas3d/controls/trackball.d.ts +9 -4
  193. package/lib/mol-canvas3d/controls/trackball.js +51 -12
  194. package/lib/mol-canvas3d/helper/interaction-events.js +1 -1
  195. package/lib/mol-canvas3d/passes/draw.d.ts +1 -1
  196. package/lib/mol-canvas3d/passes/draw.js +3 -3
  197. package/lib/mol-gl/renderer.d.ts +2 -2
  198. package/lib/mol-gl/renderer.js +3 -3
  199. package/lib/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +2 -2
  200. package/lib/mol-gl/shader/chunks/apply-light-color.glsl.js +2 -2
  201. package/lib/mol-gl/shader/cylinders.frag.d.ts +2 -2
  202. package/lib/mol-gl/shader/cylinders.frag.js +2 -2
  203. package/lib/mol-gl/shader/direct-volume.frag.d.ts +2 -2
  204. package/lib/mol-gl/shader/direct-volume.frag.js +2 -2
  205. package/lib/mol-gl/shader/mesh.frag.d.ts +2 -2
  206. package/lib/mol-gl/shader/mesh.frag.js +2 -2
  207. package/lib/mol-gl/shader/spheres.frag.d.ts +2 -2
  208. package/lib/mol-gl/shader/spheres.frag.js +2 -2
  209. package/lib/mol-io/reader/cif/schema/bird.d.ts +1 -1
  210. package/lib/mol-io/reader/cif/schema/bird.js +1 -1
  211. package/lib/mol-io/reader/cif/schema/ccd.d.ts +1 -1
  212. package/lib/mol-io/reader/cif/schema/ccd.js +1 -1
  213. package/lib/mol-io/reader/cif/schema/mmcif.d.ts +2 -2
  214. package/lib/mol-io/reader/cif/schema/mmcif.js +1 -1
  215. package/lib/mol-io/reader/mol/parser.d.ts +23 -1
  216. package/lib/mol-io/reader/mol/parser.js +112 -3
  217. package/lib/mol-io/reader/sdf/parser-v3-util.d.ts +6 -0
  218. package/lib/mol-io/reader/sdf/parser-v3-util.js +9 -0
  219. package/lib/mol-io/reader/sdf/parser.d.ts +3 -1
  220. package/lib/mol-io/reader/sdf/parser.js +12 -3
  221. package/lib/mol-io/writer/cif/encoder/binary.js +9 -2
  222. package/lib/mol-math/geometry/primitives/sphere3d.d.ts +1 -1
  223. package/lib/mol-math/geometry/primitives/sphere3d.js +17 -4
  224. package/lib/mol-math/geometry/symmetry-operator.d.ts +1 -1
  225. package/lib/mol-math/geometry/symmetry-operator.js +10 -4
  226. package/lib/mol-model/structure/export/categories/secondary-structure.js +8 -8
  227. package/lib/mol-model/structure/export/mmcif.d.ts +1 -1
  228. package/lib/mol-model/structure/export/mmcif.js +8 -5
  229. package/lib/mol-model/structure/model/properties/coarse/hierarchy.d.ts +1 -1
  230. package/lib/mol-model/structure/model/properties/coarse/hierarchy.js +24 -2
  231. package/lib/mol-model/structure/model/properties/common.d.ts +1 -1
  232. package/lib/mol-model/structure/structure/element/loci.d.ts +1 -1
  233. package/lib/mol-model/structure/structure/element/loci.js +4 -2
  234. package/lib/mol-model/structure/structure/properties.d.ts +1 -0
  235. package/lib/mol-model/structure/structure/properties.js +2 -1
  236. package/lib/mol-model/structure/structure/symmetry.js +1 -3
  237. package/lib/mol-model/structure/structure/util/superposition-db-mapping.js +10 -5
  238. package/lib/mol-model/volume/volume.d.ts +7 -0
  239. package/lib/mol-model/volume/volume.js +18 -0
  240. package/lib/mol-model-formats/structure/basic/atomic.d.ts +2 -2
  241. package/lib/mol-model-formats/structure/basic/atomic.js +6 -6
  242. package/lib/mol-model-formats/structure/basic/coarse.d.ts +1 -1
  243. package/lib/mol-model-formats/structure/basic/coarse.js +3 -3
  244. package/lib/mol-model-formats/structure/basic/entities.d.ts +2 -1
  245. package/lib/mol-model-formats/structure/basic/entities.js +25 -22
  246. package/lib/mol-model-formats/structure/basic/parser.js +19 -10
  247. package/lib/mol-model-formats/structure/basic/properties.d.ts +6 -1
  248. package/lib/mol-model-formats/structure/basic/properties.js +12 -25
  249. package/lib/mol-model-formats/structure/mol.d.ts +2 -1
  250. package/lib/mol-model-formats/structure/mol.js +17 -3
  251. package/lib/mol-model-props/common/custom-property.d.ts +1 -1
  252. package/lib/mol-model-props/computed/interactions/common.d.ts +1 -1
  253. package/lib/mol-model-props/computed/interactions/common.js +16 -24
  254. package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +1 -1
  255. package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.js +44 -18
  256. package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +1 -1
  257. package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.js +38 -13
  258. package/lib/mol-model-props/sequence/best-database-mapping.js +15 -15
  259. package/lib/mol-plugin/animation-loop.d.ts +2 -0
  260. package/lib/mol-plugin/animation-loop.js +1 -1
  261. package/lib/mol-plugin/behavior/dynamic/representation.d.ts +1 -1
  262. package/lib/mol-plugin/behavior/dynamic/representation.js +11 -6
  263. package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +2 -1
  264. package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +16 -7
  265. package/lib/mol-plugin/behavior/static/representation.js +1 -1
  266. package/lib/mol-plugin/commands.d.ts +6 -2
  267. package/lib/mol-plugin/spec.d.ts +1 -1
  268. package/lib/mol-plugin/spec.js +3 -1
  269. package/lib/mol-plugin/version.js +2 -2
  270. package/lib/mol-plugin-state/actions/file.d.ts +3 -2
  271. package/lib/mol-plugin-state/actions/file.js +67 -31
  272. package/lib/mol-plugin-state/actions/volume.d.ts +1 -1
  273. package/lib/mol-plugin-state/actions/volume.js +3 -3
  274. package/lib/mol-plugin-state/animation/built-in/camera-rock.d.ts +16 -0
  275. package/lib/mol-plugin-state/animation/built-in/camera-rock.js +59 -0
  276. package/lib/mol-plugin-state/animation/built-in/camera-spin.d.ts +1 -1
  277. package/lib/mol-plugin-state/animation/built-in/camera-spin.js +9 -8
  278. package/lib/mol-plugin-state/animation/model.d.ts +4 -0
  279. package/lib/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +8 -6
  280. package/lib/mol-plugin-state/builder/structure/hierarchy.d.ts +2 -1
  281. package/lib/mol-plugin-state/builder/structure/representation-preset.d.ts +180 -6
  282. package/lib/mol-plugin-state/builder/structure/representation-preset.js +48 -2
  283. package/lib/mol-plugin-state/builder/structure/representation.d.ts +2 -1
  284. package/lib/mol-plugin-state/formats/volume.js +1 -11
  285. package/lib/mol-plugin-state/manager/animation.d.ts +5 -1
  286. package/lib/mol-plugin-state/manager/animation.js +5 -5
  287. package/lib/mol-plugin-state/manager/structure/component.d.ts +2 -1
  288. package/lib/mol-plugin-state/manager/structure/component.js +11 -8
  289. package/lib/mol-plugin-ui/controls/icons.d.ts +2 -1
  290. package/lib/mol-plugin-ui/controls/icons.js +5 -3
  291. package/lib/mol-plugin-ui/controls.d.ts +1 -1
  292. package/lib/mol-plugin-ui/controls.js +2 -1
  293. package/lib/mol-plugin-ui/structure/quick-styles.d.ts +25 -0
  294. package/lib/mol-plugin-ui/structure/quick-styles.js +128 -0
  295. package/lib/mol-plugin-ui/structure/superposition.js +2 -2
  296. package/lib/mol-plugin-ui/structure/volume.js +4 -4
  297. package/lib/mol-plugin-ui/viewport/simple-settings.d.ts +1 -1
  298. package/lib/mol-plugin-ui/viewport/simple-settings.js +4 -8
  299. package/lib/mol-repr/shape/loci/common.d.ts +1 -1
  300. package/lib/mol-repr/shape/loci/common.js +3 -3
  301. package/lib/mol-repr/structure/registry.d.ts +1 -1
  302. package/lib/mol-repr/structure/representation/cartoon.d.ts +4 -4
  303. package/lib/mol-repr/structure/representation/cartoon.js +3 -3
  304. package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +1 -1
  305. package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.js +8 -4
  306. package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +1 -1
  307. package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.js +10 -6
  308. package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +1 -1
  309. package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.js +8 -4
  310. package/lib/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -1
  311. package/lib/mol-repr/structure/visual/molecular-surface-mesh.js +2 -2
  312. package/lib/mol-repr/structure/visual/util/bond.d.ts +1 -1
  313. package/lib/mol-repr/structure/visual/util/bond.js +5 -4
  314. package/lib/mol-repr/visual.d.ts +1 -1
  315. package/lib/mol-repr/visual.js +2 -1
  316. package/lib/mol-state/transform.js +12 -2
  317. package/lib/mol-state/tree/immutable.d.ts +18 -0
  318. package/lib/mol-state/tree/transient.d.ts +3 -4
  319. package/lib/mol-theme/color/element-symbol.d.ts +289 -3
  320. package/lib/mol-theme/color/element-symbol.js +25 -15
  321. package/lib/mol-theme/color/entity-id.d.ts +1 -1
  322. package/lib/mol-theme/color/entity-id.js +29 -5
  323. package/lib/mol-theme/color/illustrative.d.ts +100 -29
  324. package/lib/mol-theme/color/illustrative.js +26 -7
  325. package/lib/mol-theme/color/molecule-type.d.ts +19 -1
  326. package/lib/mol-theme/color/molecule-type.js +10 -5
  327. package/lib/mol-theme/color/residue-name.d.ts +77 -1
  328. package/lib/mol-theme/color/residue-name.js +10 -5
  329. package/lib/mol-theme/color/secondary-structure.d.ts +27 -1
  330. package/lib/mol-theme/color/secondary-structure.js +10 -5
  331. package/lib/mol-theme/color.d.ts +253 -15
  332. package/lib/mol-util/color/color.d.ts +1 -1
  333. package/lib/mol-util/color/color.js +1 -1
  334. package/lib/mol-util/color/params.d.ts +10 -0
  335. package/lib/mol-util/color/params.js +15 -0
  336. package/lib/servers/volume/config.js +3 -3
  337. package/lib/servers/volume/query.js +1 -1
  338. package/package.json +38 -40
@@ -6,11 +6,11 @@
6
6
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.getProperties = void 0;
9
+ exports.getStructAsymMap = exports.getSaccharideComponentMap = exports.getChemicalComponentMap = exports.getMissingResidues = void 0;
10
+ var db_1 = require("../../../mol-data/db");
10
11
  var types_1 = require("../../../mol-model/structure/model/types");
11
12
  var constants_1 = require("../../../mol-model/structure/structure/carbohydrates/constants");
12
13
  var memoize_1 = require("../../../mol-util/memoize");
13
- var db_1 = require("../../../mol-data/db");
14
14
  function getMissingResidues(data) {
15
15
  var map = new Map();
16
16
  var getKey = function (model_num, asym_id, seq_id) {
@@ -31,6 +31,7 @@ function getMissingResidues(data) {
31
31
  size: map.size
32
32
  };
33
33
  }
34
+ exports.getMissingResidues = getMissingResidues;
34
35
  function getChemicalComponentMap(data) {
35
36
  var map = new Map();
36
37
  if (data.chem_comp._rowCount > 0) {
@@ -47,6 +48,7 @@ function getChemicalComponentMap(data) {
47
48
  }
48
49
  return map;
49
50
  }
51
+ exports.getChemicalComponentMap = getChemicalComponentMap;
50
52
  function getSaccharideComponentMap(data) {
51
53
  var map = new Map();
52
54
  if (data.pdbx_chem_comp_identifier._rowCount > 0) {
@@ -93,6 +95,7 @@ function getSaccharideComponentMap(data) {
93
95
  }
94
96
  return map;
95
97
  }
98
+ exports.getSaccharideComponentMap = getSaccharideComponentMap;
96
99
  var getUniqueComponentNames = (0, memoize_1.memoize1)(function (data) {
97
100
  var uniqueNames = new Set();
98
101
  var _a = data.atom_site, label_comp_id = _a.label_comp_id, auth_comp_id = _a.auth_comp_id;
@@ -102,20 +105,15 @@ var getUniqueComponentNames = (0, memoize_1.memoize1)(function (data) {
102
105
  }
103
106
  return uniqueNames;
104
107
  });
105
- function getStructAsymMap(data) {
108
+ function getStructAsymMap(atomic, data) {
106
109
  var map = new Map();
107
- var _a = data.atom_site, label_asym_id = _a.label_asym_id, auth_asym_id = _a.auth_asym_id, label_entity_id = _a.label_entity_id;
108
- for (var i = 0, il = label_asym_id.rowCount; i < il; ++i) {
110
+ var _a = atomic.chains, auth_asym_id = _a.auth_asym_id, label_asym_id = _a.label_asym_id, label_entity_id = _a.label_entity_id;
111
+ for (var i = 0, _i = atomic.chains._rowCount; i < _i; i++) {
109
112
  var id = label_asym_id.value(i);
110
- if (!map.has(id)) {
111
- map.set(id, {
112
- id: id,
113
- auth_id: auth_asym_id.value(i),
114
- entity_id: label_entity_id.value(i)
115
- });
116
- }
113
+ map.set(id, { id: id, auth_id: auth_asym_id.value(i), entity_id: label_entity_id.value(i) });
117
114
  }
118
- if (data.struct_asym._rowCount > 0) {
115
+ // to get asym mapping for coarse/ihm data
116
+ if (data === null || data === void 0 ? void 0 : data.struct_asym._rowCount) {
119
117
  var _b = data.struct_asym, id = _b.id, entity_id = _b.entity_id;
120
118
  for (var i = 0, il = id.rowCount; i < il; ++i) {
121
119
  var _id = id.value(i);
@@ -130,13 +128,5 @@ function getStructAsymMap(data) {
130
128
  }
131
129
  return map;
132
130
  }
133
- function getProperties(data) {
134
- return {
135
- missingResidues: getMissingResidues(data),
136
- chemicalComponentMap: getChemicalComponentMap(data),
137
- saccharideComponentMap: getSaccharideComponentMap(data),
138
- structAsymMap: getStructAsymMap(data)
139
- };
140
- }
141
- exports.getProperties = getProperties;
131
+ exports.getStructAsymMap = getStructAsymMap;
142
132
  //# sourceMappingURL=properties.js.map
@@ -1,8 +1,9 @@
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 David Sehnal <david.sehnal@gmail.com>
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
6
+ * @author Panagiotis Tourlas <panagiot_tourlov@hotmail.com>
6
7
  */
7
8
  import { MolFile } from '../../mol-io/reader/mol/parser';
8
9
  import { RuntimeContext, Task } from '../../mol-task';
@@ -1,31 +1,44 @@
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 David Sehnal <david.sehnal@gmail.com>
6
6
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
7
+ * @author Panagiotis Tourlas <panagiot_tourlov@hotmail.com>
7
8
  */
8
9
  Object.defineProperty(exports, "__esModule", { value: true });
9
10
  exports.trajectoryFromMol = exports.MolFormat = exports.getMolModels = void 0;
10
11
  var tslib_1 = require("tslib");
11
12
  var db_1 = require("../../mol-data/db");
13
+ var parser_1 = require("../../mol-io/reader/mol/parser");
12
14
  var mol_task_1 = require("../../mol-task");
13
- var parser_1 = require("./basic/parser");
15
+ var parser_2 = require("./basic/parser");
14
16
  var schema_1 = require("./basic/schema");
15
17
  var component_1 = require("./common/component");
16
18
  var entity_1 = require("./common/entity");
17
19
  var index_pair_1 = require("./property/bonds/index-pair");
18
20
  function getMolModels(mol, format, ctx) {
19
21
  return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
20
- var atoms, bonds, MOL, A, type_symbol, seq_id, atom_site, entityBuilder, componentBuilder, basics, models, indexA, indexB, order, pairBonds;
22
+ var atoms, bonds, formalCharges, MOL, A, type_symbol, seq_id, computedFormalCharges, i, i, atom_site, entityBuilder, componentBuilder, basics, models, indexA, indexB, order, pairBonds;
21
23
  return (0, tslib_1.__generator)(this, function (_a) {
22
24
  switch (_a.label) {
23
25
  case 0:
24
- atoms = mol.atoms, bonds = mol.bonds;
26
+ atoms = mol.atoms, bonds = mol.bonds, formalCharges = mol.formalCharges;
25
27
  MOL = db_1.Column.ofConst('MOL', mol.atoms.count, db_1.Column.Schema.str);
26
28
  A = db_1.Column.ofConst('A', mol.atoms.count, db_1.Column.Schema.str);
27
29
  type_symbol = db_1.Column.asArrayColumn(atoms.type_symbol);
28
30
  seq_id = db_1.Column.ofConst(1, atoms.count, db_1.Column.Schema.int);
31
+ computedFormalCharges = new Int32Array(mol.atoms.count);
32
+ if (formalCharges.atomIdx.rowCount > 0) {
33
+ for (i = 0; i < formalCharges.atomIdx.rowCount; i++) {
34
+ computedFormalCharges[formalCharges.atomIdx.value(i) - 1] = formalCharges.charge.value(i);
35
+ }
36
+ }
37
+ else {
38
+ for (i = 0; i < mol.atoms.count; i++) {
39
+ computedFormalCharges[i] = (0, parser_1.formalChargeMapper)(atoms.formal_charge.value(i));
40
+ }
41
+ }
29
42
  atom_site = db_1.Table.ofPartialColumns(schema_1.BasicSchema.atom_site, {
30
43
  auth_asym_id: A,
31
44
  auth_atom_id: type_symbol,
@@ -43,6 +56,7 @@ function getMolModels(mol, format, ctx) {
43
56
  occupancy: db_1.Column.ofConst(1, atoms.count, db_1.Column.Schema.float),
44
57
  type_symbol: type_symbol,
45
58
  pdbx_PDB_model_num: db_1.Column.ofConst(1, atoms.count, db_1.Column.Schema.int),
59
+ pdbx_formal_charge: db_1.Column.ofIntArray(computedFormalCharges)
46
60
  }, atoms.count);
47
61
  entityBuilder = new entity_1.EntityBuilder();
48
62
  entityBuilder.setNames([['MOL', 'Unknown Entity']]);
@@ -55,7 +69,7 @@ function getMolModels(mol, format, ctx) {
55
69
  chem_comp: componentBuilder.getChemCompTable(),
56
70
  atom_site: atom_site
57
71
  });
58
- return [4 /*yield*/, (0, parser_1.createModels)(basics, format !== null && format !== void 0 ? format : MolFormat.create(mol), ctx)];
72
+ return [4 /*yield*/, (0, parser_2.createModels)(basics, format !== null && format !== void 0 ? format : MolFormat.create(mol), ctx)];
59
73
  case 1:
60
74
  models = _a.sent();
61
75
  if (models.frameCount > 0) {
@@ -47,7 +47,7 @@ declare namespace CustomProperty {
47
47
  }>>;
48
48
  };
49
49
  setDefaultAutoAttach(name: string, value: boolean): void;
50
- get(name: string): Provider<Data, any, any>;
50
+ get(name: string): Provider<Data, any, any> | undefined;
51
51
  register(provider: Provider<Data, any, any>, defaultAutoAttach: boolean): void;
52
52
  unregister(name: string): void;
53
53
  }
@@ -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
  */
@@ -64,29 +64,21 @@ var InteractionsInterContacts = /** @class */ (function (_super) {
64
64
  (0, tslib_1.__extends)(InteractionsInterContacts, _super);
65
65
  function InteractionsInterContacts(map, unitsFeatures) {
66
66
  var _this = _super.call(this, map) || this;
67
- var count = 0;
68
- var elementKeyIndex = new Map();
69
- var add = function (index, unitId) {
70
- var vertexKey = _this.getElementKey(index, unitId);
71
- var e = elementKeyIndex.get(vertexKey);
72
- if (e === undefined)
73
- elementKeyIndex.set(vertexKey, [count]);
74
- else
75
- e.push(count);
76
- };
77
- _this.map.forEach(function (pairEdgesArray) {
78
- pairEdgesArray.forEach(function (_a) {
79
- var unitA = _a.unitA, connectedIndices = _a.connectedIndices;
80
- connectedIndices.forEach(function (indexA) {
81
- var _a = unitsFeatures.get(unitA), offsetsA = _a.offsets, membersA = _a.members;
82
- for (var j = offsetsA[indexA], jl = offsetsA[indexA + 1]; j < jl; ++j) {
83
- add(membersA[j], unitA);
84
- }
85
- count += 1;
86
- });
87
- });
88
- });
89
- _this.elementKeyIndex = elementKeyIndex;
67
+ _this.elementKeyIndex = new Map();
68
+ for (var i = 0, il = _this.edges.length; i < il; ++i) {
69
+ var _a = _this.edges[i], unitA = _a.unitA, indexA = _a.indexA;
70
+ var _b = unitsFeatures.get(unitA), offsets = _b.offsets, members = _b.members;
71
+ for (var j = offsets[indexA], jl = offsets[indexA + 1]; j < jl; ++j) {
72
+ var vertexKey = _this.getElementKey(members[j], unitA);
73
+ var e = _this.elementKeyIndex.get(vertexKey);
74
+ if (e === undefined) {
75
+ _this.elementKeyIndex.set(vertexKey, [i]);
76
+ }
77
+ else {
78
+ e.push(i);
79
+ }
80
+ }
81
+ }
90
82
  return _this;
91
83
  }
92
84
  InteractionsInterContacts.prototype.getContactIndicesForElement = function (index, unit) {
@@ -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
  */
@@ -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
  */
@@ -66,11 +66,12 @@ function createInterUnitInteractionCylinderMesh(ctx, structure, theme, props, me
66
66
  if (!childUnitA)
67
67
  return true;
68
68
  var unitA = structure.unitMap.get(b.unitA);
69
- var fA = unitsFeatures.get(b.unitA);
70
- // TODO: check all members
71
- var eA = unitA.elements[fA.members[fA.offsets[b.indexA]]];
72
- if (!int_1.SortedArray.has(childUnitA.elements, eA))
73
- return true;
69
+ var _a = unitsFeatures.get(b.unitA), offsets = _a.offsets, members = _a.members;
70
+ for (var i = offsets[b.indexA], il = offsets[b.indexA + 1]; i < il; ++i) {
71
+ var eA = unitA.elements[members[i]];
72
+ if (!int_1.SortedArray.has(childUnitA.elements, eA))
73
+ return true;
74
+ }
74
75
  }
75
76
  return false;
76
77
  }
@@ -119,8 +120,9 @@ function getInteractionLoci(pickingId, structure, id) {
119
120
  }
120
121
  return loci_1.EmptyLoci;
121
122
  }
123
+ var __unitMap = new Map();
124
+ var __contactIndicesSet = new Set();
122
125
  function eachInteraction(loci, structure, apply, isMarking) {
123
- var _a;
124
126
  var changed = false;
125
127
  if (interactions_1.Interactions.isLoci(loci)) {
126
128
  if (!structure_1.Structure.areEquivalent(loci.data.structure, structure))
@@ -129,8 +131,8 @@ function eachInteraction(loci, structure, apply, isMarking) {
129
131
  if (loci.data.interactions !== interactions)
130
132
  return false;
131
133
  var contacts = interactions.contacts;
132
- for (var _i = 0, _b = loci.elements; _i < _b.length; _i++) {
133
- var c = _b[_i];
134
+ for (var _i = 0, _a = loci.elements; _i < _a.length; _i++) {
135
+ var c = _a[_i];
134
136
  var idx = contacts.getEdgeIndex(c.indexA, c.unitA.id, c.indexB, c.unitB.id);
135
137
  if (idx !== -1) {
136
138
  if (apply(int_1.Interval.ofSingleton(idx)))
@@ -143,28 +145,52 @@ function eachInteraction(loci, structure, apply, isMarking) {
143
145
  return false;
144
146
  if (isMarking && loci.elements.length === 1)
145
147
  return false; // only a single unit
146
- var contacts_1 = (_a = interactions_2.InteractionsProvider.get(structure).value) === null || _a === void 0 ? void 0 : _a.contacts;
147
- if (!contacts_1)
148
+ var interactions = interactions_2.InteractionsProvider.get(structure).value;
149
+ if (!interactions)
148
150
  return false;
151
+ var contacts_1 = interactions.contacts, unitsFeatures_1 = interactions.unitsFeatures;
152
+ for (var _b = 0, _c = loci.elements; _b < _c.length; _b++) {
153
+ var e = _c[_b];
154
+ __unitMap.set(e.unit.id, e.indices);
155
+ }
149
156
  var _loop_1 = function (e) {
150
157
  var unit = e.unit;
151
158
  if (!structure_2.Unit.isAtomic(unit))
152
159
  return "continue";
153
- if (isMarking && int_1.OrderedSet.size(e.indices) === 1)
154
- return "continue";
155
160
  int_1.OrderedSet.forEach(e.indices, function (v) {
156
161
  for (var _i = 0, _a = contacts_1.getContactIndicesForElement(v, unit); _i < _a.length; _i++) {
157
162
  var idx = _a[_i];
158
- if (apply(int_1.Interval.ofSingleton(idx)))
159
- changed = true;
163
+ __contactIndicesSet.add(idx);
160
164
  }
161
165
  });
162
166
  };
163
- // TODO when isMarking, all elements of contact features need to be in the loci
164
- for (var _c = 0, _d = loci.elements; _c < _d.length; _c++) {
165
- var e = _d[_c];
167
+ for (var _d = 0, _e = loci.elements; _d < _e.length; _d++) {
168
+ var e = _e[_d];
166
169
  _loop_1(e);
167
170
  }
171
+ __contactIndicesSet.forEach(function (i) {
172
+ if (isMarking) {
173
+ var _a = contacts_1.edges[i], indexA = _a.indexA, unitA = _a.unitA, indexB = _a.indexB, unitB = _a.unitB;
174
+ var indicesA = __unitMap.get(unitA);
175
+ var indicesB = __unitMap.get(unitB);
176
+ if (!indicesA || !indicesB)
177
+ return;
178
+ var _b = unitsFeatures_1.get(unitA), offsetsA = _b.offsets, membersA = _b.members;
179
+ for (var j = offsetsA[indexA], jl = offsetsA[indexA + 1]; j < jl; ++j) {
180
+ if (!int_1.OrderedSet.has(indicesA, membersA[j]))
181
+ return;
182
+ }
183
+ var _c = unitsFeatures_1.get(unitB), offsetsB = _c.offsets, membersB = _c.members;
184
+ for (var j = offsetsB[indexB], jl = offsetsB[indexB + 1]; j < jl; ++j) {
185
+ if (!int_1.OrderedSet.has(indicesB, membersB[j]))
186
+ return;
187
+ }
188
+ }
189
+ if (apply(int_1.Interval.ofSingleton(i)))
190
+ changed = true;
191
+ });
192
+ __unitMap.clear();
193
+ __contactIndicesSet.clear();
168
194
  }
169
195
  return changed;
170
196
  }
@@ -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
  */
@@ -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
  */
@@ -52,9 +52,19 @@ function createIntraUnitInteractionsCylinderMesh(ctx, unit, structure, theme, pr
52
52
  var sizeB = theme.size.size(location);
53
53
  return Math.min(sizeA, sizeB) * sizeFactor;
54
54
  },
55
- ignore: function (edgeIndex) { return (flag[edgeIndex] === 1 /* Filtered */ ||
56
- // TODO: check all members
57
- (!!childUnit && !int_1.SortedArray.has(childUnit.elements, unit.elements[members[offsets[a[edgeIndex]]]]))); }
55
+ ignore: function (edgeIndex) {
56
+ if (flag[edgeIndex] === 1 /* Filtered */)
57
+ return true;
58
+ if (childUnit) {
59
+ var f = a[edgeIndex];
60
+ for (var i = offsets[f], jl = offsets[f + 1]; i < jl; ++i) {
61
+ var e = unit.elements[members[offsets[i]]];
62
+ if (!int_1.SortedArray.has(childUnit.elements, e))
63
+ return true;
64
+ }
65
+ }
66
+ return false;
67
+ }
58
68
  };
59
69
  m = (0, link_1.createLinkCylinderMesh)(ctx, builderProps, props, mesh);
60
70
  sphere = geometry_1.Sphere3D.expand((0, geometry_1.Sphere3D)(), (childUnit !== null && childUnit !== void 0 ? childUnit : unit).boundary.sphere, 1 * sizeFactor);
@@ -102,6 +112,7 @@ function getInteractionLoci(pickingId, structureGroup, id) {
102
112
  }
103
113
  return loci_1.EmptyLoci;
104
114
  }
115
+ var __contactIndicesSet = new Set();
105
116
  function eachInteraction(loci, structureGroup, apply, isMarking) {
106
117
  var changed = false;
107
118
  if (interactions_2.Interactions.isLoci(loci)) {
@@ -136,28 +147,42 @@ function eachInteraction(loci, structureGroup, apply, isMarking) {
136
147
  if (!interactions)
137
148
  return false;
138
149
  var unit = group.units[0];
139
- var contacts = interactions.unitsContacts.get(unit.id);
150
+ var contacts_1 = interactions.unitsContacts.get(unit.id);
140
151
  var features = interactions.unitsFeatures.get(unit.id);
141
- var groupCount_1 = contacts.edgeCount * 2;
142
- var offset_1 = contacts.offset;
152
+ var groupCount_1 = contacts_1.edgeCount * 2;
153
+ var offset_1 = contacts_1.offset;
143
154
  var _b = features.elementsIndex, fOffsets_1 = _b.offsets, fIndices_1 = _b.indices;
155
+ var members_1 = features.members, offsets_1 = features.offsets;
144
156
  var _loop_1 = function (e) {
145
157
  var unitIdx = group.unitIndexMap.get(e.unit.id);
146
- if (unitIdx !== undefined)
147
- return "continue";
148
- if (isMarking && int_1.OrderedSet.size(e.indices) === 1)
158
+ if (unitIdx === undefined)
149
159
  return "continue";
150
160
  int_1.OrderedSet.forEach(e.indices, function (v) {
151
161
  for (var i = fOffsets_1[v], il = fOffsets_1[v + 1]; i < il; ++i) {
152
162
  var fI = fIndices_1[i];
153
163
  for (var j = offset_1[fI], jl = offset_1[fI + 1]; j < jl; ++j) {
154
- if (apply(int_1.Interval.ofSingleton(unitIdx * groupCount_1 + j)))
155
- changed = true;
164
+ __contactIndicesSet.add(j);
165
+ }
166
+ }
167
+ });
168
+ __contactIndicesSet.forEach(function (i) {
169
+ if (isMarking) {
170
+ var fA = contacts_1.a[i];
171
+ for (var j = offsets_1[fA], jl = offsets_1[fA + 1]; j < jl; ++j) {
172
+ if (!int_1.OrderedSet.has(e.indices, members_1[j]))
173
+ return;
174
+ }
175
+ var fB = contacts_1.b[i];
176
+ for (var j = offsets_1[fB], jl = offsets_1[fB + 1]; j < jl; ++j) {
177
+ if (!int_1.OrderedSet.has(e.indices, members_1[j]))
178
+ return;
156
179
  }
157
180
  }
181
+ if (apply(int_1.Interval.ofSingleton(unitIdx * groupCount_1 + i)))
182
+ changed = true;
158
183
  });
184
+ __contactIndicesSet.clear();
159
185
  };
160
- // TODO: when isMarking, all elements of contact features need to be in the loci
161
186
  for (var _c = 0, _d = loci.elements; _c < _d.length; _c++) {
162
187
  var e = _d[_c];
163
188
  _loop_1(e);
@@ -21,7 +21,7 @@ var BestDatabaseSequenceMapping;
21
21
  type: 'static',
22
22
  defaultParams: {},
23
23
  getParams: function () { return ({}); },
24
- isApplicable: function (data) { var _a, _b; return mmcif_1.MmcifFormat.is(data.sourceData) && ((_b = (_a = data.sourceData.data.frame.categories) === null || _a === void 0 ? void 0 : _a.atom_site) === null || _b === void 0 ? void 0 : _b.fieldNames.indexOf('db_name')) >= 0; },
24
+ isApplicable: function (data) { var _a, _b; return mmcif_1.MmcifFormat.is(data.sourceData) && ((_b = (_a = data.sourceData.data.frame.categories) === null || _a === void 0 ? void 0 : _a.atom_site) === null || _b === void 0 ? void 0 : _b.fieldNames.indexOf('pdbx_sifts_xref_db_name')) >= 0; },
25
25
  obtain: function (ctx, data) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
26
26
  return (0, tslib_1.__generator)(this, function (_a) {
27
27
  return [2 /*return*/, { value: fromCif(data) }];
@@ -34,7 +34,7 @@ var BestDatabaseSequenceMapping;
34
34
  if (!data)
35
35
  return '';
36
36
  var eI = loc.unit.elements[loc.element];
37
- var rI = model.atomicHierarchy.residueAtomSegments.offsets[eI];
37
+ var rI = model.atomicHierarchy.residueAtomSegments.index[eI];
38
38
  return data.accession[rI];
39
39
  }
40
40
  BestDatabaseSequenceMapping.getKey = getKey;
@@ -44,7 +44,7 @@ var BestDatabaseSequenceMapping;
44
44
  if (!data)
45
45
  return;
46
46
  var eI = loc.unit.elements[loc.element];
47
- var rI = model.atomicHierarchy.residueAtomSegments.offsets[eI];
47
+ var rI = model.atomicHierarchy.residueAtomSegments.index[eI];
48
48
  var dbName = data.dbName[rI];
49
49
  if (!dbName)
50
50
  return;
@@ -55,10 +55,10 @@ var BestDatabaseSequenceMapping;
55
55
  if (!mmcif_1.MmcifFormat.is(model.sourceData))
56
56
  return;
57
57
  var atom_site = model.sourceData.data.frame.categories.atom_site;
58
- var db_name = atom_site.getField('db_name');
59
- var db_acc = atom_site.getField('db_acc');
60
- var db_num = atom_site.getField('db_num');
61
- var db_res = atom_site.getField('db_res');
58
+ var db_name = atom_site.getField('pdbx_sifts_xref_db_name');
59
+ var db_acc = atom_site.getField('pdbx_sifts_xref_db_acc');
60
+ var db_num = atom_site.getField('pdbx_sifts_xref_db_num');
61
+ var db_res = atom_site.getField('pdbx_sifts_xref_db_res');
62
62
  if (!db_name || !db_acc || !db_num || !db_res)
63
63
  return;
64
64
  var atomSourceIndex = model.atomicHierarchy.atomSourceIndex;
@@ -70,16 +70,16 @@ var BestDatabaseSequenceMapping;
70
70
  for (var i = 0; i < count; i++) {
71
71
  var row = atomSourceIndex.value(residueOffsets[i]);
72
72
  if (db_name.valueKind(row) !== 0 /* Present */) {
73
- dbName[row] = '';
74
- accession[row] = '';
75
- num[row] = 0;
76
- residue[row] = '';
73
+ dbName[i] = '';
74
+ accession[i] = '';
75
+ num[i] = 0;
76
+ residue[i] = '';
77
77
  continue;
78
78
  }
79
- dbName[row] = db_name.str(row);
80
- accession[row] = db_acc.str(row);
81
- num[row] = db_num.int(row);
82
- residue[row] = db_res.str(row);
79
+ dbName[i] = db_name.str(row);
80
+ accession[i] = db_acc.str(row);
81
+ num[i] = db_num.int(row);
82
+ residue[i] = db_res.str(row);
83
83
  }
84
84
  return { dbName: dbName, accession: accession, num: num, residue: residue };
85
85
  }
@@ -4,6 +4,7 @@
4
4
  * @author David Sehnal <david.sehnal@gmail.com>
5
5
  */
6
6
  import { PluginContext } from './context';
7
+ import { PluginAnimationManager } from '../mol-plugin-state/manager/animation';
7
8
  export declare class PluginAnimationLoop {
8
9
  private plugin;
9
10
  private currentFrame;
@@ -12,6 +13,7 @@ export declare class PluginAnimationLoop {
12
13
  tick(t: number, options?: {
13
14
  isSynchronous?: boolean;
14
15
  manualDraw?: boolean;
16
+ animation?: PluginAnimationManager.AnimationInfo;
15
17
  }): Promise<void>;
16
18
  private frame;
17
19
  resetTime(t?: number): void;
@@ -33,7 +33,7 @@ var PluginAnimationLoop = /** @class */ (function () {
33
33
  return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
34
34
  return (0, tslib_1.__generator)(this, function (_b) {
35
35
  switch (_b.label) {
36
- case 0: return [4 /*yield*/, this.plugin.managers.animation.tick(t, options === null || options === void 0 ? void 0 : options.isSynchronous)];
36
+ case 0: return [4 /*yield*/, this.plugin.managers.animation.tick(t, options === null || options === void 0 ? void 0 : options.isSynchronous, options === null || options === void 0 ? void 0 : options.animation)];
37
37
  case 1:
38
38
  _b.sent();
39
39
  (_a = this.plugin.canvas3d) === null || _a === void 0 ? void 0 : _a.tick(t, options);
@@ -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 David Sehnal <david.sehnal@gmail.com>
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
@@ -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 David Sehnal <david.sehnal@gmail.com>
6
6
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
@@ -216,11 +216,16 @@ exports.DefaultLociLabelProvider = behavior_1.PluginBehavior.create({
216
216
  this.f = {
217
217
  label: function (loci) {
218
218
  var label = [];
219
- if (structure_1.StructureElement.Loci.is(loci) && loci.elements.length === 1) {
220
- var u = loci.elements[0].unit;
221
- var l = structure_1.StructureElement.Location.create(loci.structure, u, u.elements[0]);
222
- var name_1 = structure_1.StructureProperties.entity.pdbx_description(l).join(', ');
223
- label.push(name_1);
219
+ if (structure_1.StructureElement.Loci.is(loci)) {
220
+ var entityNames = new Set();
221
+ for (var _i = 0, _a = loci.elements; _i < _a.length; _i++) {
222
+ var u = _a[_i].unit;
223
+ var l = structure_1.StructureElement.Location.create(loci.structure, u, u.elements[0]);
224
+ var name_1 = structure_1.StructureProperties.entity.pdbx_description(l).join(', ');
225
+ entityNames.add(name_1);
226
+ }
227
+ if (entityNames.size === 1)
228
+ entityNames.forEach(function (name) { return label.push(name); });
224
229
  }
225
230
  label.push((0, label_1.lociLabel)(loci));
226
231
  return label.filter(function (l) { return !!l; }).join('</br>');
@@ -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 David Sehnal <david.sehnal@gmail.com>
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
@@ -22,6 +22,7 @@ declare const StructureFocusRepresentationParams: (plugin: PluginContext) => {
22
22
  components: PD.MultiSelect<"target" | "surroundings" | "interactions">;
23
23
  excludeTargetFromSurroundings: PD.BooleanParam;
24
24
  ignoreHydrogens: PD.BooleanParam;
25
+ ignoreLight: PD.BooleanParam;
25
26
  material: PD.Group<PD.Normalize<{
26
27
  metalness: number;
27
28
  roughness: number;