drugflow-molstar 0.3.77 → 0.4.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 (250) hide show
  1. package/build/drugflow-molstar-0.4.1.css +1 -0
  2. package/build/drugflow-molstar-component-0.4.1.js +25 -0
  3. package/build/drugflow-molstar-plugin-0.4.1.js +2 -0
  4. package/build/drugflow-molstar-plugin-0.4.1.js.LICENSE.txt +64 -0
  5. package/lib/alphafold-transparency.js +58 -125
  6. package/lib/contact.d.ts +15 -6
  7. package/lib/contact.js +71 -66
  8. package/lib/custom-events.js +16 -16
  9. package/lib/domain-annotations/behavior.js +20 -24
  10. package/lib/domain-annotations/color.d.ts +1 -1
  11. package/lib/domain-annotations/color.js +23 -22
  12. package/lib/domain-annotations/prop.d.ts +3 -3
  13. package/lib/domain-annotations/prop.js +54 -76
  14. package/lib/drugflow-molstar-component-build-0.3.78.js +2 -0
  15. package/lib/drugflow-molstar-component-build-0.4.1.js +2 -0
  16. package/lib/helpers.d.ts +4 -4
  17. package/lib/helpers.js +94 -99
  18. package/lib/index.js +1785 -2608
  19. package/lib/labels.d.ts +1 -1
  20. package/lib/labels.js +20 -23
  21. package/lib/loci-details.d.ts +2 -2
  22. package/lib/loci-details.js +26 -29
  23. package/lib/sifts-mapping.js +30 -34
  24. package/lib/sifts-mappings-behaviour.js +26 -30
  25. package/lib/spec.d.ts +1 -1
  26. package/lib/spec.js +50 -38
  27. package/lib/structure_contact3d.d.ts +13 -4
  28. package/lib/structure_contact3d.js +25 -46
  29. package/lib/subscribe-events.js +17 -17
  30. package/lib/superposition-export.js +100 -144
  31. package/lib/superposition-focus-representation.d.ts +1 -1
  32. package/lib/superposition-focus-representation.js +74 -112
  33. package/lib/superposition-sifts-mapping.d.ts +1 -1
  34. package/lib/superposition-sifts-mapping.js +56 -62
  35. package/lib/superposition.d.ts +2 -2
  36. package/lib/superposition.js +490 -726
  37. package/lib/ui/alphafold-superposition.d.ts +8 -9
  38. package/lib/ui/alphafold-superposition.js +96 -120
  39. package/lib/ui/alphafold-tranparency.d.ts +1 -2
  40. package/lib/ui/alphafold-tranparency.js +27 -43
  41. package/lib/ui/annotation-controls.d.ts +2 -3
  42. package/lib/ui/annotation-controls.js +81 -87
  43. package/lib/ui/export-superposition.js +33 -51
  44. package/lib/ui/pdbe-left-panel.d.ts +3 -3
  45. package/lib/ui/pdbe-left-panel.js +82 -106
  46. package/lib/ui/pdbe-screenshot-controls.d.ts +1 -1
  47. package/lib/ui/pdbe-screenshot-controls.js +54 -83
  48. package/lib/ui/pdbe-structure-controls.d.ts +4 -5
  49. package/lib/ui/pdbe-structure-controls.js +34 -57
  50. package/lib/ui/pdbe-viewport-controls.d.ts +1 -2
  51. package/lib/ui/pdbe-viewport-controls.js +23 -29
  52. package/lib/ui/segment-tree.d.ts +1 -2
  53. package/lib/ui/segment-tree.js +438 -590
  54. package/lib/ui/superposition-components.d.ts +1 -2
  55. package/lib/ui/superposition-components.js +196 -266
  56. package/lib/ui/superposition-viewport.d.ts +1 -2
  57. package/lib/ui/superposition-viewport.js +11 -18
  58. package/package.json +7 -4
  59. package/build/drugflow-molstar-0.3.62.css +0 -1
  60. package/build/drugflow-molstar-0.3.77.css +0 -1
  61. package/build/drugflow-molstar-component-0.3.62.js +0 -25
  62. package/build/drugflow-molstar-component-0.3.77.js +0 -25
  63. package/build/drugflow-molstar-light.css +0 -1
  64. package/build/drugflow-molstar-plugin-0.3.62.js +0 -2
  65. package/build/drugflow-molstar-plugin-0.3.62.js.LICENSE.txt +0 -39
  66. package/build/drugflow-molstar-plugin-0.3.77.js +0 -2
  67. package/build/drugflow-molstar-plugin-0.3.77.js.LICENSE.txt +0 -39
  68. package/lib/drugflow-molstar-component-build-0.1.2.js +0 -4268
  69. package/lib/drugflow-molstar-component-build-0.1.2.js.map +0 -1
  70. package/lib/drugflow-molstar-component-build-0.1.3.js +0 -2
  71. package/lib/drugflow-molstar-component-build-0.1.4.js +0 -2
  72. package/lib/drugflow-molstar-component-build-0.1.4.js.LICENSE.txt +0 -24
  73. package/lib/drugflow-molstar-component-build-0.1.5.js +0 -2
  74. package/lib/drugflow-molstar-component-build-0.1.5.js.LICENSE.txt +0 -24
  75. package/lib/drugflow-molstar-component-build-0.1.6.js +0 -2
  76. package/lib/drugflow-molstar-component-build-0.1.6.js.LICENSE.txt +0 -24
  77. package/lib/drugflow-molstar-component-build-0.2.10.js +0 -2
  78. package/lib/drugflow-molstar-component-build-0.2.10.js.LICENSE.txt +0 -24
  79. package/lib/drugflow-molstar-component-build-0.2.2.js +0 -2
  80. package/lib/drugflow-molstar-component-build-0.2.2.js.LICENSE.txt +0 -24
  81. package/lib/drugflow-molstar-component-build-0.2.3.js +0 -2
  82. package/lib/drugflow-molstar-component-build-0.2.3.js.LICENSE.txt +0 -24
  83. package/lib/drugflow-molstar-component-build-0.2.4.js +0 -2
  84. package/lib/drugflow-molstar-component-build-0.2.4.js.LICENSE.txt +0 -24
  85. package/lib/drugflow-molstar-component-build-0.2.5.js +0 -2
  86. package/lib/drugflow-molstar-component-build-0.2.5.js.LICENSE.txt +0 -24
  87. package/lib/drugflow-molstar-component-build-0.2.6.js +0 -2
  88. package/lib/drugflow-molstar-component-build-0.2.6.js.LICENSE.txt +0 -24
  89. package/lib/drugflow-molstar-component-build-0.2.7.js +0 -2
  90. package/lib/drugflow-molstar-component-build-0.2.7.js.LICENSE.txt +0 -24
  91. package/lib/drugflow-molstar-component-build-0.2.9.js +0 -2
  92. package/lib/drugflow-molstar-component-build-0.2.9.js.LICENSE.txt +0 -24
  93. package/lib/drugflow-molstar-component-build-0.3.1.js +0 -2
  94. package/lib/drugflow-molstar-component-build-0.3.1.js.LICENSE.txt +0 -24
  95. package/lib/drugflow-molstar-component-build-0.3.10.js +0 -2
  96. package/lib/drugflow-molstar-component-build-0.3.10.js.LICENSE.txt +0 -24
  97. package/lib/drugflow-molstar-component-build-0.3.11.js +0 -2
  98. package/lib/drugflow-molstar-component-build-0.3.11.js.LICENSE.txt +0 -24
  99. package/lib/drugflow-molstar-component-build-0.3.12.js +0 -2
  100. package/lib/drugflow-molstar-component-build-0.3.12.js.LICENSE.txt +0 -24
  101. package/lib/drugflow-molstar-component-build-0.3.13.js +0 -2
  102. package/lib/drugflow-molstar-component-build-0.3.13.js.LICENSE.txt +0 -24
  103. package/lib/drugflow-molstar-component-build-0.3.14.js +0 -2
  104. package/lib/drugflow-molstar-component-build-0.3.14.js.LICENSE.txt +0 -24
  105. package/lib/drugflow-molstar-component-build-0.3.15.js +0 -2
  106. package/lib/drugflow-molstar-component-build-0.3.15.js.LICENSE.txt +0 -24
  107. package/lib/drugflow-molstar-component-build-0.3.16.js +0 -2
  108. package/lib/drugflow-molstar-component-build-0.3.16.js.LICENSE.txt +0 -24
  109. package/lib/drugflow-molstar-component-build-0.3.17.js +0 -2
  110. package/lib/drugflow-molstar-component-build-0.3.17.js.LICENSE.txt +0 -24
  111. package/lib/drugflow-molstar-component-build-0.3.18.js +0 -2
  112. package/lib/drugflow-molstar-component-build-0.3.18.js.LICENSE.txt +0 -24
  113. package/lib/drugflow-molstar-component-build-0.3.19.js +0 -2
  114. package/lib/drugflow-molstar-component-build-0.3.19.js.LICENSE.txt +0 -24
  115. package/lib/drugflow-molstar-component-build-0.3.2.js +0 -2
  116. package/lib/drugflow-molstar-component-build-0.3.2.js.LICENSE.txt +0 -24
  117. package/lib/drugflow-molstar-component-build-0.3.20.js +0 -2
  118. package/lib/drugflow-molstar-component-build-0.3.20.js.LICENSE.txt +0 -24
  119. package/lib/drugflow-molstar-component-build-0.3.21.js +0 -2
  120. package/lib/drugflow-molstar-component-build-0.3.21.js.LICENSE.txt +0 -24
  121. package/lib/drugflow-molstar-component-build-0.3.22.js +0 -2
  122. package/lib/drugflow-molstar-component-build-0.3.22.js.LICENSE.txt +0 -24
  123. package/lib/drugflow-molstar-component-build-0.3.23.js +0 -2
  124. package/lib/drugflow-molstar-component-build-0.3.23.js.LICENSE.txt +0 -24
  125. package/lib/drugflow-molstar-component-build-0.3.24.js +0 -2
  126. package/lib/drugflow-molstar-component-build-0.3.24.js.LICENSE.txt +0 -24
  127. package/lib/drugflow-molstar-component-build-0.3.25.js +0 -2
  128. package/lib/drugflow-molstar-component-build-0.3.25.js.LICENSE.txt +0 -24
  129. package/lib/drugflow-molstar-component-build-0.3.26.js +0 -2
  130. package/lib/drugflow-molstar-component-build-0.3.26.js.LICENSE.txt +0 -24
  131. package/lib/drugflow-molstar-component-build-0.3.27.js +0 -2
  132. package/lib/drugflow-molstar-component-build-0.3.27.js.LICENSE.txt +0 -24
  133. package/lib/drugflow-molstar-component-build-0.3.28.js +0 -2
  134. package/lib/drugflow-molstar-component-build-0.3.28.js.LICENSE.txt +0 -24
  135. package/lib/drugflow-molstar-component-build-0.3.29.js +0 -2
  136. package/lib/drugflow-molstar-component-build-0.3.29.js.LICENSE.txt +0 -24
  137. package/lib/drugflow-molstar-component-build-0.3.3.js +0 -2
  138. package/lib/drugflow-molstar-component-build-0.3.3.js.LICENSE.txt +0 -24
  139. package/lib/drugflow-molstar-component-build-0.3.30.js +0 -2
  140. package/lib/drugflow-molstar-component-build-0.3.30.js.LICENSE.txt +0 -24
  141. package/lib/drugflow-molstar-component-build-0.3.31.js +0 -2
  142. package/lib/drugflow-molstar-component-build-0.3.31.js.LICENSE.txt +0 -24
  143. package/lib/drugflow-molstar-component-build-0.3.32.js +0 -2
  144. package/lib/drugflow-molstar-component-build-0.3.32.js.LICENSE.txt +0 -24
  145. package/lib/drugflow-molstar-component-build-0.3.33.js +0 -2
  146. package/lib/drugflow-molstar-component-build-0.3.33.js.LICENSE.txt +0 -24
  147. package/lib/drugflow-molstar-component-build-0.3.34.js +0 -2
  148. package/lib/drugflow-molstar-component-build-0.3.34.js.LICENSE.txt +0 -24
  149. package/lib/drugflow-molstar-component-build-0.3.35.js +0 -2
  150. package/lib/drugflow-molstar-component-build-0.3.35.js.LICENSE.txt +0 -24
  151. package/lib/drugflow-molstar-component-build-0.3.36.js +0 -2
  152. package/lib/drugflow-molstar-component-build-0.3.36.js.LICENSE.txt +0 -24
  153. package/lib/drugflow-molstar-component-build-0.3.37.js +0 -2
  154. package/lib/drugflow-molstar-component-build-0.3.37.js.LICENSE.txt +0 -24
  155. package/lib/drugflow-molstar-component-build-0.3.38.js +0 -2
  156. package/lib/drugflow-molstar-component-build-0.3.38.js.LICENSE.txt +0 -24
  157. package/lib/drugflow-molstar-component-build-0.3.39.js +0 -2
  158. package/lib/drugflow-molstar-component-build-0.3.39.js.LICENSE.txt +0 -24
  159. package/lib/drugflow-molstar-component-build-0.3.4.js +0 -2
  160. package/lib/drugflow-molstar-component-build-0.3.4.js.LICENSE.txt +0 -24
  161. package/lib/drugflow-molstar-component-build-0.3.40.js +0 -2
  162. package/lib/drugflow-molstar-component-build-0.3.40.js.LICENSE.txt +0 -24
  163. package/lib/drugflow-molstar-component-build-0.3.41.js +0 -2
  164. package/lib/drugflow-molstar-component-build-0.3.41.js.LICENSE.txt +0 -24
  165. package/lib/drugflow-molstar-component-build-0.3.42.js +0 -2
  166. package/lib/drugflow-molstar-component-build-0.3.42.js.LICENSE.txt +0 -24
  167. package/lib/drugflow-molstar-component-build-0.3.43.js +0 -2
  168. package/lib/drugflow-molstar-component-build-0.3.43.js.LICENSE.txt +0 -24
  169. package/lib/drugflow-molstar-component-build-0.3.44.js +0 -2
  170. package/lib/drugflow-molstar-component-build-0.3.44.js.LICENSE.txt +0 -24
  171. package/lib/drugflow-molstar-component-build-0.3.46.js +0 -2
  172. package/lib/drugflow-molstar-component-build-0.3.46.js.LICENSE.txt +0 -24
  173. package/lib/drugflow-molstar-component-build-0.3.47.js +0 -2
  174. package/lib/drugflow-molstar-component-build-0.3.47.js.LICENSE.txt +0 -24
  175. package/lib/drugflow-molstar-component-build-0.3.48.js +0 -2
  176. package/lib/drugflow-molstar-component-build-0.3.48.js.LICENSE.txt +0 -24
  177. package/lib/drugflow-molstar-component-build-0.3.49.js +0 -2
  178. package/lib/drugflow-molstar-component-build-0.3.49.js.LICENSE.txt +0 -24
  179. package/lib/drugflow-molstar-component-build-0.3.5.js +0 -2
  180. package/lib/drugflow-molstar-component-build-0.3.5.js.LICENSE.txt +0 -24
  181. package/lib/drugflow-molstar-component-build-0.3.50.js +0 -2
  182. package/lib/drugflow-molstar-component-build-0.3.50.js.LICENSE.txt +0 -24
  183. package/lib/drugflow-molstar-component-build-0.3.51.js +0 -2
  184. package/lib/drugflow-molstar-component-build-0.3.51.js.LICENSE.txt +0 -24
  185. package/lib/drugflow-molstar-component-build-0.3.52.js +0 -2
  186. package/lib/drugflow-molstar-component-build-0.3.52.js.LICENSE.txt +0 -24
  187. package/lib/drugflow-molstar-component-build-0.3.53.js +0 -2
  188. package/lib/drugflow-molstar-component-build-0.3.53.js.LICENSE.txt +0 -24
  189. package/lib/drugflow-molstar-component-build-0.3.54.js +0 -2
  190. package/lib/drugflow-molstar-component-build-0.3.54.js.LICENSE.txt +0 -24
  191. package/lib/drugflow-molstar-component-build-0.3.55.js +0 -2
  192. package/lib/drugflow-molstar-component-build-0.3.55.js.LICENSE.txt +0 -24
  193. package/lib/drugflow-molstar-component-build-0.3.56.js +0 -2
  194. package/lib/drugflow-molstar-component-build-0.3.56.js.LICENSE.txt +0 -24
  195. package/lib/drugflow-molstar-component-build-0.3.57.js +0 -2
  196. package/lib/drugflow-molstar-component-build-0.3.57.js.LICENSE.txt +0 -24
  197. package/lib/drugflow-molstar-component-build-0.3.58.js +0 -2
  198. package/lib/drugflow-molstar-component-build-0.3.58.js.LICENSE.txt +0 -24
  199. package/lib/drugflow-molstar-component-build-0.3.59.js +0 -2
  200. package/lib/drugflow-molstar-component-build-0.3.59.js.LICENSE.txt +0 -24
  201. package/lib/drugflow-molstar-component-build-0.3.6.js +0 -2
  202. package/lib/drugflow-molstar-component-build-0.3.6.js.LICENSE.txt +0 -24
  203. package/lib/drugflow-molstar-component-build-0.3.60.js +0 -2
  204. package/lib/drugflow-molstar-component-build-0.3.60.js.LICENSE.txt +0 -24
  205. package/lib/drugflow-molstar-component-build-0.3.61.js +0 -2
  206. package/lib/drugflow-molstar-component-build-0.3.61.js.LICENSE.txt +0 -24
  207. package/lib/drugflow-molstar-component-build-0.3.62.js +0 -2
  208. package/lib/drugflow-molstar-component-build-0.3.62.js.LICENSE.txt +0 -24
  209. package/lib/drugflow-molstar-component-build-0.3.63.js +0 -2
  210. package/lib/drugflow-molstar-component-build-0.3.63.js.LICENSE.txt +0 -24
  211. package/lib/drugflow-molstar-component-build-0.3.64.js +0 -2
  212. package/lib/drugflow-molstar-component-build-0.3.64.js.LICENSE.txt +0 -24
  213. package/lib/drugflow-molstar-component-build-0.3.65.js +0 -2
  214. package/lib/drugflow-molstar-component-build-0.3.65.js.LICENSE.txt +0 -24
  215. package/lib/drugflow-molstar-component-build-0.3.66.js +0 -2
  216. package/lib/drugflow-molstar-component-build-0.3.66.js.LICENSE.txt +0 -24
  217. package/lib/drugflow-molstar-component-build-0.3.67.js +0 -2
  218. package/lib/drugflow-molstar-component-build-0.3.67.js.LICENSE.txt +0 -24
  219. package/lib/drugflow-molstar-component-build-0.3.68.js +0 -2
  220. package/lib/drugflow-molstar-component-build-0.3.68.js.LICENSE.txt +0 -24
  221. package/lib/drugflow-molstar-component-build-0.3.69.js +0 -2
  222. package/lib/drugflow-molstar-component-build-0.3.69.js.LICENSE.txt +0 -24
  223. package/lib/drugflow-molstar-component-build-0.3.7.js +0 -2
  224. package/lib/drugflow-molstar-component-build-0.3.7.js.LICENSE.txt +0 -24
  225. package/lib/drugflow-molstar-component-build-0.3.70.js +0 -2
  226. package/lib/drugflow-molstar-component-build-0.3.70.js.LICENSE.txt +0 -24
  227. package/lib/drugflow-molstar-component-build-0.3.71.js +0 -2
  228. package/lib/drugflow-molstar-component-build-0.3.71.js.LICENSE.txt +0 -24
  229. package/lib/drugflow-molstar-component-build-0.3.72.js +0 -2
  230. package/lib/drugflow-molstar-component-build-0.3.72.js.LICENSE.txt +0 -24
  231. package/lib/drugflow-molstar-component-build-0.3.73.js +0 -2
  232. package/lib/drugflow-molstar-component-build-0.3.73.js.LICENSE.txt +0 -24
  233. package/lib/drugflow-molstar-component-build-0.3.74.js +0 -2
  234. package/lib/drugflow-molstar-component-build-0.3.74.js.LICENSE.txt +0 -24
  235. package/lib/drugflow-molstar-component-build-0.3.75.js +0 -2
  236. package/lib/drugflow-molstar-component-build-0.3.75.js.LICENSE.txt +0 -24
  237. package/lib/drugflow-molstar-component-build-0.3.76.js +0 -2
  238. package/lib/drugflow-molstar-component-build-0.3.76.js.LICENSE.txt +0 -24
  239. package/lib/drugflow-molstar-component-build-0.3.77.js +0 -2
  240. package/lib/drugflow-molstar-component-build-0.3.77.js.LICENSE.txt +0 -24
  241. package/lib/drugflow-molstar-component-build-0.3.8.js +0 -2
  242. package/lib/drugflow-molstar-component-build-0.3.8.js.LICENSE.txt +0 -24
  243. package/lib/drugflow-molstar-component-build-0.3.9.js +0 -2
  244. package/lib/drugflow-molstar-component-build-0.3.9.js.LICENSE.txt +0 -24
  245. package/lib/index2.d.ts +0 -1
  246. package/lib/index2.js +0 -1369
  247. package/lib/pdbe-molstar-component-build-3.1.2.js +0 -2
  248. package/lib/pdbe-molstar-component-build-3.1.2.js.LICENSE.txt +0 -24
  249. /package/lib/{drugflow-molstar-component-build-0.1.2.js.LICENSE.txt → drugflow-molstar-component-build-0.3.78.js.LICENSE.txt} +0 -0
  250. /package/lib/{drugflow-molstar-component-build-0.1.3.js.LICENSE.txt → drugflow-molstar-component-build-0.4.1.js.LICENSE.txt} +0 -0
@@ -1,7 +1,6 @@
1
- /// <reference types="react" />
2
1
  import { CollapsableControls, PurePluginUIComponent } from 'Molstar/mol-plugin-ui/base';
3
2
  import { ParamDefinition as PD } from 'Molstar/mol-util/param-definition';
4
- export declare function InfoIconSvg(): JSX.Element;
3
+ export declare function InfoIconSvg(): import("react/jsx-runtime").JSX.Element;
5
4
  export declare class AlphafoldPaeControls extends CollapsableControls {
6
5
  private axisBoxRef;
7
6
  defaultState(): {
@@ -16,7 +15,7 @@ export declare class AlphafoldPaeControls extends CollapsableControls {
16
15
  constructor(props: any, context: any);
17
16
  componentDidMount(): void;
18
17
  formatTicks(d: any): any;
19
- renderControls(): JSX.Element | null;
18
+ renderControls(): import("react/jsx-runtime").JSX.Element | null;
20
19
  }
21
20
  export declare class AlphafoldSuperpositionControls extends CollapsableControls {
22
21
  defaultState(): {
@@ -29,14 +28,14 @@ export declare class AlphafoldSuperpositionControls extends CollapsableControls
29
28
  isHidden: boolean;
30
29
  };
31
30
  componentDidMount(): void;
32
- rmsdTable(): JSX.Element;
33
- renderControls(): JSX.Element;
31
+ rmsdTable(): import("react/jsx-runtime").JSX.Element;
32
+ renderControls(): import("react/jsx-runtime").JSX.Element;
34
33
  }
35
34
  export declare const AlphafoldSuperpositionParams: {
36
35
  traceOnly: PD.BooleanParam;
37
36
  };
38
- export declare type AlphafoldSuperpositionOptions = PD.ValuesFor<typeof AlphafoldSuperpositionParams>;
39
- declare type AfSuperpositionControlsState = {
37
+ export type AlphafoldSuperpositionOptions = PD.ValuesFor<typeof AlphafoldSuperpositionParams>;
38
+ type AfSuperpositionControlsState = {
40
39
  isBusy: boolean;
41
40
  action?: 'byChains' | 'byAtoms' | 'options';
42
41
  canUseDb?: boolean;
@@ -49,8 +48,8 @@ export declare class AfSuperpositionControls extends PurePluginUIComponent<{}, A
49
48
  get customState(): any;
50
49
  superposeDb: () => Promise<void>;
51
50
  toggleOptions: () => void;
52
- superposeByDbMapping(): JSX.Element;
51
+ superposeByDbMapping(): import("react/jsx-runtime").JSX.Element;
53
52
  private setOptions;
54
- render(): JSX.Element;
53
+ render(): import("react/jsx-runtime").JSX.Element;
55
54
  }
56
55
  export {};
@@ -1,56 +1,55 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.AfSuperpositionControls = exports.AlphafoldSuperpositionParams = exports.AlphafoldSuperpositionControls = exports.AlphafoldPaeControls = exports.InfoIconSvg = void 0;
4
- var tslib_1 = require("tslib");
5
- var jsx_runtime_1 = require("react/jsx-runtime");
6
- var react_1 = tslib_1.__importDefault(require("react"));
7
- var base_1 = require("Molstar/mol-plugin-ui/base");
8
- var icons_1 = require("Molstar/mol-plugin-ui/controls/icons");
9
- var common_1 = require("Molstar/mol-plugin-ui/controls/common");
10
- var param_definition_1 = require("Molstar/mol-util/param-definition");
11
- var parameters_1 = require("Molstar/mol-plugin-ui/controls/parameters");
12
- var superposition_1 = require("../superposition");
13
- var d3_scale_1 = require("d3-scale");
14
- var d3_axis_1 = require("d3-axis");
15
- var d3_selection_1 = require("d3-selection");
16
- var _InfoIcon = (0, jsx_runtime_1.jsx)("svg", tslib_1.__assign({ width: '24px', height: '24px', viewBox: '0 0 24 24', strokeWidth: '0.1px' }, { children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z" }) }));
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_1 = __importDefault(require("react"));
9
+ const base_1 = require("Molstar/mol-plugin-ui/base");
10
+ const icons_1 = require("Molstar/mol-plugin-ui/controls/icons");
11
+ const common_1 = require("Molstar/mol-plugin-ui/controls/common");
12
+ const param_definition_1 = require("Molstar/mol-util/param-definition");
13
+ const parameters_1 = require("Molstar/mol-plugin-ui/controls/parameters");
14
+ const superposition_1 = require("../superposition");
15
+ const d3_scale_1 = require("d3-scale");
16
+ const d3_axis_1 = require("d3-axis");
17
+ const d3_selection_1 = require("d3-selection");
18
+ const _InfoIcon = (0, jsx_runtime_1.jsx)("svg", { width: '24px', height: '24px', viewBox: '0 0 24 24', strokeWidth: '0.1px', children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z" }) });
17
19
  function InfoIconSvg() { return _InfoIcon; }
18
20
  exports.InfoIconSvg = InfoIconSvg;
19
- var AlphafoldPaeControls = /** @class */ (function (_super) {
20
- tslib_1.__extends(AlphafoldPaeControls, _super);
21
- function AlphafoldPaeControls(props, context) {
22
- var _this = _super.call(this, props, context) || this;
23
- _this.axisBoxRef = react_1.default.createRef();
24
- return _this;
25
- }
26
- AlphafoldPaeControls.prototype.defaultState = function () {
21
+ class AlphafoldPaeControls extends base_1.CollapsableControls {
22
+ defaultState() {
27
23
  return {
28
24
  isCollapsed: false,
29
25
  header: 'AlphaFold PAE',
30
26
  brand: { accent: 'gray', svg: icons_1.SuperpositionSvg },
31
27
  isHidden: true
32
28
  };
33
- };
34
- AlphafoldPaeControls.prototype.componentDidMount = function () {
35
- var _this = this;
36
- this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection, function (sel) {
37
- var superpositionState = _this.plugin.customState.superpositionState;
29
+ }
30
+ constructor(props, context) {
31
+ super(props, context);
32
+ this.axisBoxRef = react_1.default.createRef();
33
+ }
34
+ componentDidMount() {
35
+ this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection, sel => {
36
+ const superpositionState = this.plugin.customState.superpositionState;
38
37
  if (superpositionState && superpositionState.alphafold.ref && superpositionState.alphafold.apiData.pae && superpositionState.alphafold.apiData.pae !== '' && superpositionState.alphafold.apiData.pae !== '') {
39
- _this.setState({ isHidden: false });
40
- var domainMax = superpositionState.alphafold.apiData.length;
41
- var x = (0, d3_scale_1.scaleLinear)().domain([0, domainMax]).range([0, 200]);
42
- var xAxis = (0, d3_axis_1.axisBottom)(x).ticks(6).tickFormat(_this.formatTicks).tickSizeOuter(0);
43
- var yAxis = (0, d3_axis_1.axisLeft)(x).ticks(6).tickFormat(_this.formatTicks).tickSizeOuter(0);
44
- var axisContainer = (0, d3_selection_1.select)(_this.axisBoxRef.current);
38
+ this.setState({ isHidden: false });
39
+ const domainMax = superpositionState.alphafold.apiData.length;
40
+ const x = (0, d3_scale_1.scaleLinear)().domain([0, domainMax]).range([0, 200]);
41
+ const xAxis = (0, d3_axis_1.axisBottom)(x).ticks(6).tickFormat(this.formatTicks).tickSizeOuter(0);
42
+ const yAxis = (0, d3_axis_1.axisLeft)(x).ticks(6).tickFormat(this.formatTicks).tickSizeOuter(0);
43
+ const axisContainer = (0, d3_selection_1.select)(this.axisBoxRef.current);
45
44
  axisContainer.append('svg:svg')
46
45
  .attr('width', 220)
47
46
  .attr('height', 30)
48
47
  .attr('class', 'pae-x-axis')
49
48
  .style('z-index', '1')
50
49
  .style('position', 'absolute')
51
- .attr('transform', "translate(-93,202)")
50
+ .attr('transform', `translate(-93,202)`)
52
51
  .append('g')
53
- .attr('transform', "translate(6,0)")
52
+ .attr('transform', `translate(6,0)`)
54
53
  .call(xAxis);
55
54
  axisContainer.append('svg:svg')
56
55
  .attr('width', 50)
@@ -58,121 +57,98 @@ var AlphafoldPaeControls = /** @class */ (function (_super) {
58
57
  .attr('class', 'pae-y-axis')
59
58
  .style('z-index', '1')
60
59
  .style('position', 'absolute')
61
- .attr('transform', "translate(-123,0)")
60
+ .attr('transform', `translate(-123,0)`)
62
61
  .append('g')
63
- .attr('transform', "translate(36,4)")
62
+ .attr('transform', `translate(36,4)`)
64
63
  .call(yAxis);
65
64
  }
66
65
  });
67
- };
68
- AlphafoldPaeControls.prototype.formatTicks = function (d) {
66
+ }
67
+ formatTicks(d) {
69
68
  return d > 999 ? d / 1000 + 'k' : d;
70
- };
71
- AlphafoldPaeControls.prototype.renderControls = function () {
72
- var superpositionState = this.plugin.customState.superpositionState;
69
+ }
70
+ renderControls() {
71
+ const superpositionState = this.plugin.customState.superpositionState;
73
72
  if (!superpositionState || !superpositionState.alphafold)
74
73
  return null;
75
- var errorScale = [0, 5, 10, 15, 20, 25, 30];
76
- return (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-flex-row', style: { height: 'auto', textAlign: 'center', justifyContent: 'center', padding: '15px 0', position: 'relative', fontSize: '12px' } }, { children: [(0, jsx_runtime_1.jsx)("div", { ref: this.axisBoxRef, className: 'pae-axis-box', style: { position: 'absolute', width: '100%', height: '100%' } }), (0, jsx_runtime_1.jsx)("span", tslib_1.__assign({ style: { transform: 'rotate(270deg)', position: 'absolute', transformOrigin: '0 0', left: '10px', top: '165px', fontWeight: 500 } }, { children: "Aligned residue" })), (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-flex-row', style: { height: 'auto', flexDirection: 'column' } }, { children: [(0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ style: { width: '200px', height: '200px', border: '1px solid #6a635a', margin: '2px 0 25px 25px', position: 'relative' } }, { children: (0, jsx_runtime_1.jsx)("img", { style: { width: '100%', height: '100%', position: 'absolute', left: 0, top: 0 }, src: "".concat(superpositionState.alphafold.apiData.pae), alt: "PAE" }) })), (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ style: { textAlign: 'center', paddingLeft: '30px', marginBottom: '20px', fontWeight: 500 } }, { children: "Scored residue" })), (0, jsx_runtime_1.jsx)("img", { style: { width: '200px', height: '10px', border: '1px solid #6a635a', margin: '2px 0 25px 25px', transform: 'rotate(180deg)' }, src: 'https://alphafold.ebi.ac.uk/assets/img/horizontal_colorbar.png', alt: "PAE Scale" }), (0, jsx_runtime_1.jsx)("ul", tslib_1.__assign({ style: { listStyleType: 'none', fontWeight: 500, margin: 0, display: 'inline-block', position: 'absolute', top: '292px', marginLeft: '24px' } }, { children: errorScale.map(function (errValue) { return (0, jsx_runtime_1.jsx)("li", tslib_1.__assign({ style: { float: 'left', marginRight: '18px' } }, { children: errValue }), errValue); }) })), (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ style: { textAlign: 'center', paddingLeft: '20px', fontWeight: 500 } }, { children: "Expected position error (\u00C5ngstr\u00F6ms)" }))] }))] }));
77
- };
78
- return AlphafoldPaeControls;
79
- }(base_1.CollapsableControls));
80
- exports.AlphafoldPaeControls = AlphafoldPaeControls;
81
- var AlphafoldSuperpositionControls = /** @class */ (function (_super) {
82
- tslib_1.__extends(AlphafoldSuperpositionControls, _super);
83
- function AlphafoldSuperpositionControls() {
84
- return _super !== null && _super.apply(this, arguments) || this;
74
+ const errorScale = [0, 5, 10, 15, 20, 25, 30];
75
+ return (0, jsx_runtime_1.jsxs)("div", { className: 'msp-flex-row', style: { height: 'auto', textAlign: 'center', justifyContent: 'center', padding: '15px 0', position: 'relative', fontSize: '12px' }, children: [(0, jsx_runtime_1.jsx)("div", { ref: this.axisBoxRef, className: 'pae-axis-box', style: { position: 'absolute', width: '100%', height: '100%' } }), (0, jsx_runtime_1.jsx)("span", { style: { transform: 'rotate(270deg)', position: 'absolute', transformOrigin: '0 0', left: '10px', top: '165px', fontWeight: 500 }, children: "Aligned residue" }), (0, jsx_runtime_1.jsxs)("div", { className: 'msp-flex-row', style: { height: 'auto', flexDirection: 'column' }, children: [(0, jsx_runtime_1.jsx)("div", { style: { width: '200px', height: '200px', border: '1px solid #6a635a', margin: '2px 0 25px 25px', position: 'relative' }, children: (0, jsx_runtime_1.jsx)("img", { style: { width: '100%', height: '100%', position: 'absolute', left: 0, top: 0 }, src: `${superpositionState.alphafold.apiData.pae}`, alt: "PAE" }) }), (0, jsx_runtime_1.jsx)("div", { style: { textAlign: 'center', paddingLeft: '30px', marginBottom: '20px', fontWeight: 500 }, children: "Scored residue" }), (0, jsx_runtime_1.jsx)("img", { style: { width: '200px', height: '10px', border: '1px solid #6a635a', margin: '2px 0 25px 25px', transform: 'rotate(180deg)' }, src: 'https://alphafold.ebi.ac.uk/assets/img/horizontal_colorbar.png', alt: "PAE Scale" }), (0, jsx_runtime_1.jsx)("ul", { style: { listStyleType: 'none', fontWeight: 500, margin: 0, display: 'inline-block', position: 'absolute', top: '292px', marginLeft: '24px' }, children: errorScale.map((errValue) => (0, jsx_runtime_1.jsx)("li", { style: { float: 'left', marginRight: '18px' }, children: errValue }, errValue)) }), (0, jsx_runtime_1.jsx)("div", { style: { textAlign: 'center', paddingLeft: '20px', fontWeight: 500 }, children: "Expected position error (\u00C5ngstr\u00F6ms)" })] })] });
85
76
  }
86
- AlphafoldSuperpositionControls.prototype.defaultState = function () {
77
+ }
78
+ exports.AlphafoldPaeControls = AlphafoldPaeControls;
79
+ class AlphafoldSuperpositionControls extends base_1.CollapsableControls {
80
+ defaultState() {
87
81
  return {
88
82
  isCollapsed: false,
89
83
  header: 'AlphaFold Superposition',
90
84
  brand: { accent: 'gray', svg: icons_1.SuperpositionSvg },
91
85
  isHidden: true
92
86
  };
93
- };
94
- AlphafoldSuperpositionControls.prototype.componentDidMount = function () {
95
- var _this = this;
96
- this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection, function (sel) {
97
- var superpositionState = _this.plugin.customState.superpositionState;
87
+ }
88
+ componentDidMount() {
89
+ this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection, sel => {
90
+ const superpositionState = this.plugin.customState.superpositionState;
98
91
  if (superpositionState && superpositionState.alphafold.apiData.cif && superpositionState.alphafold.apiData.cif !== '') {
99
- _this.setState({ isHidden: false });
92
+ this.setState({ isHidden: false });
100
93
  }
101
94
  });
102
- };
103
- AlphafoldSuperpositionControls.prototype.rmsdTable = function () {
104
- var spData = this.plugin.customState.superpositionState;
105
- var activeSegment = spData.activeSegment;
106
- var rmsds = spData.alphafold.rmsds;
107
- return (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-control-offset' }, { children: [(rmsds.length == 0 || !rmsds[activeSegment - 1]) && (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-flex-row', style: { padding: '5px 0 0 10px' } }, { children: (0, jsx_runtime_1.jsx)("strong", { children: "No overlap found!" }) })), rmsds[activeSegment - 1] && (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-flex-row' }, { children: [(0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ style: { width: '40%', borderRight: '1px solid rgb(213 206 196)', padding: '5px 0 0 5px' } }, { children: (0, jsx_runtime_1.jsx)("strong", { children: "Entry" }) })), (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ style: { padding: '5px 0 0 5px' } }, { children: (0, jsx_runtime_1.jsx)("strong", { children: "RMSD (\u212B)" }) }))] })), rmsds[activeSegment - 1] && rmsds[activeSegment - 1].map(function (d) {
108
- var details = d.split(':');
109
- return details[1] !== '-' ? (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-flex-row' }, { children: [(0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-control-row-label', style: { width: '40%', borderRight: '1px solid rgb(213 206 196)', padding: '5px 0 0 5px' } }, { children: details[0] })), (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ style: { padding: '5px 0 0 5px' } }, { children: details[1] }))] }), d) : null;
110
- })] }));
111
- };
112
- AlphafoldSuperpositionControls.prototype.renderControls = function () {
113
- var superpositionState = this.plugin.customState.superpositionState;
95
+ }
96
+ rmsdTable() {
97
+ const spData = this.plugin.customState.superpositionState;
98
+ const { activeSegment } = spData;
99
+ const { rmsds } = spData.alphafold;
100
+ return (0, jsx_runtime_1.jsxs)("div", { className: 'msp-control-offset', children: [(rmsds.length == 0 || !rmsds[activeSegment - 1]) && (0, jsx_runtime_1.jsx)("div", { className: 'msp-flex-row', style: { padding: '5px 0 0 10px' }, children: (0, jsx_runtime_1.jsx)("strong", { children: "No overlap found!" }) }), rmsds[activeSegment - 1] && (0, jsx_runtime_1.jsxs)("div", { className: 'msp-flex-row', children: [(0, jsx_runtime_1.jsx)("div", { style: { width: '40%', borderRight: '1px solid rgb(213 206 196)', padding: '5px 0 0 5px' }, children: (0, jsx_runtime_1.jsx)("strong", { children: "Entry" }) }), (0, jsx_runtime_1.jsx)("div", { style: { padding: '5px 0 0 5px' }, children: (0, jsx_runtime_1.jsx)("strong", { children: "RMSD (\u212B)" }) })] }), rmsds[activeSegment - 1] && rmsds[activeSegment - 1].map((d) => {
101
+ const details = d.split(':');
102
+ return details[1] !== '-' ? (0, jsx_runtime_1.jsxs)("div", { className: 'msp-flex-row', children: [(0, jsx_runtime_1.jsx)("div", { className: 'msp-control-row-label', style: { width: '40%', borderRight: '1px solid rgb(213 206 196)', padding: '5px 0 0 5px' }, children: details[0] }), (0, jsx_runtime_1.jsx)("div", { style: { padding: '5px 0 0 5px' }, children: details[1] })] }, d) : null;
103
+ })] });
104
+ }
105
+ renderControls() {
106
+ const superpositionState = this.plugin.customState.superpositionState;
114
107
  return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [superpositionState.alphafold.ref !== '' && this.rmsdTable(), superpositionState.alphafold.ref === '' && (0, jsx_runtime_1.jsx)(AfSuperpositionControls, {})] });
115
- };
116
- return AlphafoldSuperpositionControls;
117
- }(base_1.CollapsableControls));
108
+ }
109
+ }
118
110
  exports.AlphafoldSuperpositionControls = AlphafoldSuperpositionControls;
119
111
  exports.AlphafoldSuperpositionParams = {
120
112
  // alignSequences: PD.Boolean(true, { isEssential: true, description: 'For Chain-based 3D superposition, perform a sequence alignment and use the aligned residue pairs to guide the 3D superposition.' }),
121
113
  traceOnly: param_definition_1.ParamDefinition.Boolean(true, { description: 'For Chain- and Uniprot-based 3D superposition, base superposition only on CA (and equivalent) atoms.' })
122
114
  };
123
- var DefaultAlphafoldSuperpositionOptions = param_definition_1.ParamDefinition.getDefaultValues(exports.AlphafoldSuperpositionParams);
124
- var AfSuperpositionControls = /** @class */ (function (_super) {
125
- tslib_1.__extends(AfSuperpositionControls, _super);
126
- function AfSuperpositionControls() {
127
- var _this = _super !== null && _super.apply(this, arguments) || this;
128
- _this.state = {
115
+ const DefaultAlphafoldSuperpositionOptions = param_definition_1.ParamDefinition.getDefaultValues(exports.AlphafoldSuperpositionParams);
116
+ class AfSuperpositionControls extends base_1.PurePluginUIComponent {
117
+ constructor() {
118
+ super(...arguments);
119
+ this.state = {
129
120
  isBusy: false,
130
121
  canUseDb: true,
131
122
  action: undefined,
132
123
  options: DefaultAlphafoldSuperpositionOptions
133
124
  };
134
- _this.superposeDb = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
135
- var spData;
136
- return tslib_1.__generator(this, function (_a) {
137
- this.setState({ isBusy: true });
138
- spData = this.plugin.customState.superpositionState;
139
- spData.alphafold.traceOnly = this.state.options.traceOnly;
140
- (0, superposition_1.superposeAf)(this.plugin, this.state.options.traceOnly);
141
- return [2 /*return*/];
142
- });
143
- }); };
144
- _this.toggleOptions = function () { return _this.setState({ action: _this.state.action === 'options' ? void 0 : 'options' }); };
145
- _this.setOptions = function (values) {
146
- _this.setState({ options: values });
125
+ this.superposeDb = async () => {
126
+ this.setState({ isBusy: true });
127
+ const spData = this.plugin.customState.superpositionState;
128
+ spData.alphafold.traceOnly = this.state.options.traceOnly;
129
+ (0, superposition_1.superposeAf)(this.plugin, this.state.options.traceOnly);
130
+ };
131
+ this.toggleOptions = () => this.setState({ action: this.state.action === 'options' ? void 0 : 'options' });
132
+ this.setOptions = (values) => {
133
+ this.setState({ options: values });
147
134
  };
148
- return _this;
149
135
  }
150
- AfSuperpositionControls.prototype.componentDidMount = function () {
151
- var _this = this;
152
- this.subscribe(this.plugin.behaviors.state.isBusy, function (v) {
153
- _this.setState({ isBusy: v });
136
+ componentDidMount() {
137
+ this.subscribe(this.plugin.behaviors.state.isBusy, v => {
138
+ this.setState({ isBusy: v });
154
139
  });
155
- };
156
- Object.defineProperty(AfSuperpositionControls.prototype, "selection", {
157
- get: function () {
158
- return this.plugin.managers.structure.selection;
159
- },
160
- enumerable: false,
161
- configurable: true
162
- });
163
- Object.defineProperty(AfSuperpositionControls.prototype, "customState", {
164
- get: function () {
165
- return this.plugin.customState;
166
- },
167
- enumerable: false,
168
- configurable: true
169
- });
170
- AfSuperpositionControls.prototype.superposeByDbMapping = function () {
171
- return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(common_1.Button, tslib_1.__assign({ icon: icons_1.SuperposeChainsSvg, title: 'Superpose AlphaFold structure using intersection of residues from SIFTS UNIPROT mapping.', className: 'msp-btn msp-btn-block', onClick: this.superposeDb, style: { marginTop: '1px', textAlign: 'left' }, disabled: this.state.isBusy }, { children: "Load AlphaFold structure" })) });
172
- };
173
- AfSuperpositionControls.prototype.render = function () {
174
- return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ style: { backgroundColor: '#dce54e', fontWeight: 500, padding: '5px 12px' } }, { children: "New Feature!" })), (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-help-text', style: { margin: '2px 0' } }, { children: (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-help-description' }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: InfoIconSvg, inline: true }), "Load and superpose AlphaFold structure against representative chains."] })) })), (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-flex-row' }, { children: [this.state.canUseDb && this.superposeByDbMapping(), (0, jsx_runtime_1.jsx)(common_1.ToggleButton, { icon: icons_1.TuneSvg, label: '', title: 'Options', toggle: this.toggleOptions, isSelected: this.state.action === 'options', disabled: this.state.isBusy, style: { flex: '0 0 40px', padding: 0 } })] })), this.state.action === 'options' && (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-control-offset' }, { children: (0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: exports.AlphafoldSuperpositionParams, values: this.state.options, onChangeValues: this.setOptions, isDisabled: this.state.isBusy }) }))] });
175
- };
176
- return AfSuperpositionControls;
177
- }(base_1.PurePluginUIComponent));
140
+ }
141
+ get selection() {
142
+ return this.plugin.managers.structure.selection;
143
+ }
144
+ get customState() {
145
+ return this.plugin.customState;
146
+ }
147
+ superposeByDbMapping() {
148
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(common_1.Button, { icon: icons_1.SuperposeChainsSvg, title: 'Superpose AlphaFold structure using intersection of residues from SIFTS UNIPROT mapping.', className: 'msp-btn msp-btn-block', onClick: this.superposeDb, style: { marginTop: '1px', textAlign: 'left' }, disabled: this.state.isBusy, children: "Load AlphaFold structure" }) });
149
+ }
150
+ render() {
151
+ return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { style: { backgroundColor: '#dce54e', fontWeight: 500, padding: '5px 12px' }, children: "New Feature!" }), (0, jsx_runtime_1.jsx)("div", { className: 'msp-help-text', style: { margin: '2px 0' }, children: (0, jsx_runtime_1.jsxs)("div", { className: 'msp-help-description', children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: InfoIconSvg, inline: true }), "Load and superpose AlphaFold structure against representative chains."] }) }), (0, jsx_runtime_1.jsxs)("div", { className: 'msp-flex-row', children: [this.state.canUseDb && this.superposeByDbMapping(), (0, jsx_runtime_1.jsx)(common_1.ToggleButton, { icon: icons_1.TuneSvg, label: '', title: 'Options', toggle: this.toggleOptions, isSelected: this.state.action === 'options', disabled: this.state.isBusy, style: { flex: '0 0 40px', padding: 0 } })] }), this.state.action === 'options' && (0, jsx_runtime_1.jsx)("div", { className: 'msp-control-offset', children: (0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: exports.AlphafoldSuperpositionParams, values: this.state.options, onChangeValues: this.setOptions, isDisabled: this.state.isBusy }) })] });
152
+ }
153
+ }
178
154
  exports.AfSuperpositionControls = AfSuperpositionControls;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CollapsableControls } from 'Molstar/mol-plugin-ui/base';
3
2
  export declare class AlphafoldTransparencyControls extends CollapsableControls<{}, {
4
3
  transpareny: any;
@@ -18,5 +17,5 @@ export declare class AlphafoldTransparencyControls extends CollapsableControls<{
18
17
  };
19
18
  componentDidMount(): void;
20
19
  updateTransparency: (val: any) => Promise<void>;
21
- renderControls(): JSX.Element;
20
+ renderControls(): import("react/jsx-runtime").JSX.Element;
22
21
  }
@@ -1,42 +1,28 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AlphafoldTransparencyControls = void 0;
4
- var tslib_1 = require("tslib");
5
- var jsx_runtime_1 = require("react/jsx-runtime");
6
- var base_1 = require("Molstar/mol-plugin-ui/base");
7
- var icons_1 = require("Molstar/mol-plugin-ui/controls/icons");
8
- var param_definition_1 = require("Molstar/mol-util/param-definition");
9
- var parameters_1 = require("Molstar/mol-plugin-ui/controls/parameters");
10
- var alphafold_transparency_1 = require("../alphafold-transparency");
11
- var TransparencyParams = {
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const base_1 = require("Molstar/mol-plugin-ui/base");
6
+ const icons_1 = require("Molstar/mol-plugin-ui/controls/icons");
7
+ const param_definition_1 = require("Molstar/mol-util/param-definition");
8
+ const parameters_1 = require("Molstar/mol-plugin-ui/controls/parameters");
9
+ const alphafold_transparency_1 = require("../alphafold-transparency");
10
+ const TransparencyParams = {
12
11
  score: param_definition_1.ParamDefinition.Numeric(70, { min: 0, max: 100, step: 1 }, { label: 'pLDDT less than', description: 'pLDDT score value in the range of 0 to 100' }),
13
12
  opacity: param_definition_1.ParamDefinition.Numeric(0.2, { min: 0, max: 1, step: 0.01 }, { description: 'Opacity value in the range 0 to 1' })
14
13
  };
15
- var AlphafoldTransparencyControls = /** @class */ (function (_super) {
16
- tslib_1.__extends(AlphafoldTransparencyControls, _super);
17
- function AlphafoldTransparencyControls() {
18
- var _this = _super !== null && _super.apply(this, arguments) || this;
19
- _this.updateTransparency = function (val) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
20
- var superpositionState, afStr;
21
- return tslib_1.__generator(this, function (_a) {
22
- switch (_a.label) {
23
- case 0:
24
- this.setState({ transpareny: val });
25
- superpositionState = this.plugin.customState.superpositionState;
26
- afStr = this.plugin.managers.structure.hierarchy.current.refs.get(superpositionState.alphafold.ref);
27
- return [4 /*yield*/, (0, alphafold_transparency_1.clearStructureTransparency)(this.plugin, afStr.components)];
28
- case 1:
29
- _a.sent();
30
- return [4 /*yield*/, (0, alphafold_transparency_1.applyAFTransparency)(this.plugin, afStr, 1 - val.opacity, val.score)];
31
- case 2:
32
- _a.sent();
33
- return [2 /*return*/];
34
- }
35
- });
36
- }); };
37
- return _this;
14
+ class AlphafoldTransparencyControls extends base_1.CollapsableControls {
15
+ constructor() {
16
+ super(...arguments);
17
+ this.updateTransparency = async (val) => {
18
+ this.setState({ transpareny: val });
19
+ const superpositionState = this.plugin.customState.superpositionState;
20
+ const afStr = this.plugin.managers.structure.hierarchy.current.refs.get(superpositionState.alphafold.ref);
21
+ await (0, alphafold_transparency_1.clearStructureTransparency)(this.plugin, afStr.components);
22
+ await (0, alphafold_transparency_1.applyAFTransparency)(this.plugin, afStr, 1 - val.opacity, val.score);
23
+ };
38
24
  }
39
- AlphafoldTransparencyControls.prototype.defaultState = function () {
25
+ defaultState() {
40
26
  return {
41
27
  isCollapsed: false,
42
28
  header: 'AlphaFold Structure Opacity',
@@ -47,19 +33,17 @@ var AlphafoldTransparencyControls = /** @class */ (function (_super) {
47
33
  opacity: 0.2
48
34
  }
49
35
  };
50
- };
51
- AlphafoldTransparencyControls.prototype.componentDidMount = function () {
52
- var _this = this;
53
- this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection, function (sel) {
54
- var superpositionState = _this.plugin.customState.superpositionState;
36
+ }
37
+ componentDidMount() {
38
+ this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection, sel => {
39
+ const superpositionState = this.plugin.customState.superpositionState;
55
40
  if (superpositionState && superpositionState.alphafold.ref && superpositionState.alphafold.ref !== '') {
56
- _this.setState({ isHidden: false });
41
+ this.setState({ isHidden: false });
57
42
  }
58
43
  });
59
- };
60
- AlphafoldTransparencyControls.prototype.renderControls = function () {
44
+ }
45
+ renderControls() {
61
46
  return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: TransparencyParams, values: this.state.transpareny, onChangeValues: this.updateTransparency }) });
62
- };
63
- return AlphafoldTransparencyControls;
64
- }(base_1.CollapsableControls));
47
+ }
48
+ }
65
49
  exports.AlphafoldTransparencyControls = AlphafoldTransparencyControls;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { PurePluginUIComponent } from 'Molstar/mol-plugin-ui/base';
3
- export declare function TextsmsOutlinedSvg(): JSX.Element;
2
+ export declare function TextsmsOutlinedSvg(): import("react/jsx-runtime").JSX.Element;
4
3
  export declare class AnnotationsComponentControls extends PurePluginUIComponent<{}, {
5
4
  isCollapsed: boolean;
6
5
  validationApplied: boolean;
@@ -20,5 +19,5 @@ export declare class AnnotationsComponentControls extends PurePluginUIComponent<
20
19
  initApplyAnnotation: (type: number) => void;
21
20
  updateValidationParams: (val: any) => void;
22
21
  updateDomainAtnParams: (val: any) => void;
23
- render(): JSX.Element;
22
+ render(): import("react/jsx-runtime").JSX.Element;
24
23
  }