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.
- package/build/drugflow-molstar-0.4.1.css +1 -0
- package/build/drugflow-molstar-component-0.4.1.js +25 -0
- package/build/drugflow-molstar-plugin-0.4.1.js +2 -0
- package/build/drugflow-molstar-plugin-0.4.1.js.LICENSE.txt +64 -0
- package/lib/alphafold-transparency.js +58 -125
- package/lib/contact.d.ts +15 -6
- package/lib/contact.js +71 -66
- package/lib/custom-events.js +16 -16
- package/lib/domain-annotations/behavior.js +20 -24
- package/lib/domain-annotations/color.d.ts +1 -1
- package/lib/domain-annotations/color.js +23 -22
- package/lib/domain-annotations/prop.d.ts +3 -3
- package/lib/domain-annotations/prop.js +54 -76
- package/lib/drugflow-molstar-component-build-0.3.78.js +2 -0
- package/lib/drugflow-molstar-component-build-0.4.1.js +2 -0
- package/lib/helpers.d.ts +4 -4
- package/lib/helpers.js +94 -99
- package/lib/index.js +1785 -2608
- package/lib/labels.d.ts +1 -1
- package/lib/labels.js +20 -23
- package/lib/loci-details.d.ts +2 -2
- package/lib/loci-details.js +26 -29
- package/lib/sifts-mapping.js +30 -34
- package/lib/sifts-mappings-behaviour.js +26 -30
- package/lib/spec.d.ts +1 -1
- package/lib/spec.js +50 -38
- package/lib/structure_contact3d.d.ts +13 -4
- package/lib/structure_contact3d.js +25 -46
- package/lib/subscribe-events.js +17 -17
- package/lib/superposition-export.js +100 -144
- package/lib/superposition-focus-representation.d.ts +1 -1
- package/lib/superposition-focus-representation.js +74 -112
- package/lib/superposition-sifts-mapping.d.ts +1 -1
- package/lib/superposition-sifts-mapping.js +56 -62
- package/lib/superposition.d.ts +2 -2
- package/lib/superposition.js +490 -726
- package/lib/ui/alphafold-superposition.d.ts +8 -9
- package/lib/ui/alphafold-superposition.js +96 -120
- package/lib/ui/alphafold-tranparency.d.ts +1 -2
- package/lib/ui/alphafold-tranparency.js +27 -43
- package/lib/ui/annotation-controls.d.ts +2 -3
- package/lib/ui/annotation-controls.js +81 -87
- package/lib/ui/export-superposition.js +33 -51
- package/lib/ui/pdbe-left-panel.d.ts +3 -3
- package/lib/ui/pdbe-left-panel.js +82 -106
- package/lib/ui/pdbe-screenshot-controls.d.ts +1 -1
- package/lib/ui/pdbe-screenshot-controls.js +54 -83
- package/lib/ui/pdbe-structure-controls.d.ts +4 -5
- package/lib/ui/pdbe-structure-controls.js +34 -57
- package/lib/ui/pdbe-viewport-controls.d.ts +1 -2
- package/lib/ui/pdbe-viewport-controls.js +23 -29
- package/lib/ui/segment-tree.d.ts +1 -2
- package/lib/ui/segment-tree.js +438 -590
- package/lib/ui/superposition-components.d.ts +1 -2
- package/lib/ui/superposition-components.js +196 -266
- package/lib/ui/superposition-viewport.d.ts +1 -2
- package/lib/ui/superposition-viewport.js +11 -18
- package/package.json +7 -4
- package/build/drugflow-molstar-0.3.62.css +0 -1
- package/build/drugflow-molstar-0.3.77.css +0 -1
- package/build/drugflow-molstar-component-0.3.62.js +0 -25
- package/build/drugflow-molstar-component-0.3.77.js +0 -25
- package/build/drugflow-molstar-light.css +0 -1
- package/build/drugflow-molstar-plugin-0.3.62.js +0 -2
- package/build/drugflow-molstar-plugin-0.3.62.js.LICENSE.txt +0 -39
- package/build/drugflow-molstar-plugin-0.3.77.js +0 -2
- package/build/drugflow-molstar-plugin-0.3.77.js.LICENSE.txt +0 -39
- package/lib/drugflow-molstar-component-build-0.1.2.js +0 -4268
- package/lib/drugflow-molstar-component-build-0.1.2.js.map +0 -1
- package/lib/drugflow-molstar-component-build-0.1.3.js +0 -2
- package/lib/drugflow-molstar-component-build-0.1.4.js +0 -2
- package/lib/drugflow-molstar-component-build-0.1.4.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.1.5.js +0 -2
- package/lib/drugflow-molstar-component-build-0.1.5.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.1.6.js +0 -2
- package/lib/drugflow-molstar-component-build-0.1.6.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.2.10.js +0 -2
- package/lib/drugflow-molstar-component-build-0.2.10.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.2.2.js +0 -2
- package/lib/drugflow-molstar-component-build-0.2.2.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.2.3.js +0 -2
- package/lib/drugflow-molstar-component-build-0.2.3.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.2.4.js +0 -2
- package/lib/drugflow-molstar-component-build-0.2.4.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.2.5.js +0 -2
- package/lib/drugflow-molstar-component-build-0.2.5.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.2.6.js +0 -2
- package/lib/drugflow-molstar-component-build-0.2.6.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.2.7.js +0 -2
- package/lib/drugflow-molstar-component-build-0.2.7.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.2.9.js +0 -2
- package/lib/drugflow-molstar-component-build-0.2.9.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.1.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.1.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.10.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.10.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.11.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.11.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.12.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.12.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.13.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.13.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.14.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.14.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.15.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.15.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.16.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.16.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.17.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.17.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.18.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.18.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.19.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.19.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.2.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.2.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.20.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.20.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.21.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.21.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.22.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.22.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.23.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.23.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.24.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.24.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.25.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.25.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.26.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.26.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.27.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.27.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.28.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.28.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.29.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.29.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.3.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.3.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.30.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.30.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.31.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.31.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.32.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.32.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.33.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.33.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.34.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.34.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.35.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.35.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.36.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.36.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.37.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.37.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.38.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.38.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.39.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.39.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.4.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.4.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.40.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.40.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.41.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.41.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.42.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.42.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.43.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.43.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.44.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.44.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.46.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.46.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.47.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.47.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.48.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.48.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.49.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.49.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.5.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.5.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.50.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.50.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.51.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.51.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.52.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.52.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.53.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.53.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.54.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.54.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.55.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.55.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.56.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.56.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.57.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.57.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.58.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.58.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.59.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.59.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.6.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.6.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.60.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.60.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.61.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.61.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.62.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.62.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.63.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.63.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.64.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.64.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.65.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.65.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.66.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.66.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.67.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.67.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.68.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.68.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.69.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.69.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.7.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.7.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.70.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.70.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.71.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.71.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.72.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.72.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.73.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.73.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.74.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.74.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.75.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.75.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.76.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.76.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.77.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.77.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.8.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.8.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.9.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.9.js.LICENSE.txt +0 -24
- package/lib/index2.d.ts +0 -1
- package/lib/index2.js +0 -1369
- package/lib/pdbe-molstar-component-build-3.1.2.js +0 -2
- package/lib/pdbe-molstar-component-build-3.1.2.js.LICENSE.txt +0 -24
- /package/lib/{drugflow-molstar-component-build-0.1.2.js.LICENSE.txt → drugflow-molstar-component-build-0.3.78.js.LICENSE.txt} +0 -0
- /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
|
|
39
|
-
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
20
|
-
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
this.
|
|
37
|
-
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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',
|
|
50
|
+
.attr('transform', `translate(-93,202)`)
|
|
52
51
|
.append('g')
|
|
53
|
-
.attr('transform',
|
|
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',
|
|
60
|
+
.attr('transform', `translate(-123,0)`)
|
|
62
61
|
.append('g')
|
|
63
|
-
.attr('transform',
|
|
62
|
+
.attr('transform', `translate(36,4)`)
|
|
64
63
|
.call(yAxis);
|
|
65
64
|
}
|
|
66
65
|
});
|
|
67
|
-
}
|
|
68
|
-
|
|
66
|
+
}
|
|
67
|
+
formatTicks(d) {
|
|
69
68
|
return d > 999 ? d / 1000 + 'k' : d;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
}
|
|
70
|
+
renderControls() {
|
|
71
|
+
const superpositionState = this.plugin.customState.superpositionState;
|
|
73
72
|
if (!superpositionState || !superpositionState.alphafold)
|
|
74
73
|
return null;
|
|
75
|
-
|
|
76
|
-
return (0, jsx_runtime_1.jsxs)("div",
|
|
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
|
-
|
|
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
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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
|
-
|
|
92
|
+
this.setState({ isHidden: false });
|
|
100
93
|
}
|
|
101
94
|
});
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
return (0, jsx_runtime_1.jsxs)("div",
|
|
108
|
-
|
|
109
|
-
return details[1] !== '-' ? (0, jsx_runtime_1.jsxs)("div",
|
|
110
|
-
})] })
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
|
|
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
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
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
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
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
|
-
|
|
151
|
-
|
|
152
|
-
|
|
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
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
},
|
|
167
|
-
|
|
168
|
-
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
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
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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
|
-
|
|
41
|
+
this.setState({ isHidden: false });
|
|
57
42
|
}
|
|
58
43
|
});
|
|
59
|
-
}
|
|
60
|
-
|
|
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
|
-
|
|
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
|
}
|