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
package/lib/labels.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { PluginBehavior } from 'Molstar/mol-plugin/behavior';
|
|
2
|
-
export declare const PDBeLociLabelProvider: import("molstar/lib/mol-state/transformer").StateTransformer<PluginBehavior.Category, PluginBehavior.Behavior,
|
|
2
|
+
export declare const PDBeLociLabelProvider: import("molstar/lib/mol-state/transformer").StateTransformer<PluginBehavior.Category, PluginBehavior.Behavior, {}>;
|
package/lib/labels.js
CHANGED
|
@@ -1,42 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PDBeLociLabelProvider = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const behavior_1 = require("Molstar/mol-plugin/behavior");
|
|
5
|
+
const structure_1 = require("Molstar/mol-model/structure");
|
|
6
|
+
const label_1 = require("Molstar/mol-theme/label");
|
|
7
7
|
exports.PDBeLociLabelProvider = behavior_1.PluginBehavior.create({
|
|
8
8
|
name: 'pdbe-loci-label-provider',
|
|
9
9
|
category: 'interaction',
|
|
10
|
-
ctor:
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
ctor: class {
|
|
11
|
+
register() { this.ctx.managers.lociLabels.addProvider(this.f); }
|
|
12
|
+
unregister() { this.ctx.managers.lociLabels.removeProvider(this.f); }
|
|
13
|
+
constructor(ctx) {
|
|
13
14
|
this.ctx = ctx;
|
|
14
15
|
this.f = {
|
|
15
|
-
label:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
label: (loci) => {
|
|
17
|
+
const customState = (this.ctx.customState);
|
|
18
|
+
const superpositionView = (customState && customState.initParams.superposition) ? true : false;
|
|
19
|
+
const label = [];
|
|
19
20
|
if (!superpositionView && structure_1.StructureElement.Loci.is(loci) && loci.elements.length === 1) {
|
|
20
|
-
|
|
21
|
-
for (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
entityNames.add(name_1);
|
|
21
|
+
const entityNames = new Set();
|
|
22
|
+
for (const { unit: u } of loci.elements) {
|
|
23
|
+
const l = structure_1.StructureElement.Location.create(loci.structure, u, u.elements[0]);
|
|
24
|
+
const name = structure_1.StructureProperties.entity.pdbx_description(l).join(', ');
|
|
25
|
+
entityNames.add(name);
|
|
26
26
|
}
|
|
27
27
|
if (entityNames.size === 1)
|
|
28
|
-
entityNames.forEach(
|
|
28
|
+
entityNames.forEach(name => label.push(name));
|
|
29
29
|
}
|
|
30
30
|
label.push((0, label_1.lociLabel)(loci));
|
|
31
|
-
return label.filter(
|
|
31
|
+
return label.filter(l => !!l).join('</br>');
|
|
32
32
|
},
|
|
33
|
-
group:
|
|
33
|
+
group: (label) => label.toString().replace(/Model [0-9]+/g, 'Models'),
|
|
34
34
|
priority: 100
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
|
|
38
|
-
class_1.prototype.unregister = function () { this.ctx.managers.lociLabels.removeProvider(this.f); };
|
|
39
|
-
return class_1;
|
|
40
|
-
}()),
|
|
37
|
+
},
|
|
41
38
|
display: { name: 'Provide PDBe Loci Label' }
|
|
42
39
|
});
|
package/lib/loci-details.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Bond } from 'Molstar/mol-model/structure';
|
|
2
2
|
import { Loci } from 'Molstar/mol-model/loci';
|
|
3
|
-
export
|
|
3
|
+
export type EventDetail = {
|
|
4
4
|
models?: string[];
|
|
5
5
|
entity_id?: string;
|
|
6
6
|
label_asym_id?: string;
|
|
@@ -20,7 +20,7 @@ export declare type EventDetail = {
|
|
|
20
20
|
button?: number;
|
|
21
21
|
modifiers?: any;
|
|
22
22
|
};
|
|
23
|
-
|
|
23
|
+
type LabelGranularity = 'element' | 'conformation' | 'residue' | 'chain' | 'structure';
|
|
24
24
|
export declare function lociDetails(loci: Loci): EventDetail | undefined;
|
|
25
25
|
export declare function bondLabel(bond: Bond.Location, granularity: LabelGranularity): any;
|
|
26
26
|
export declare function _bundleLabel(bundle: Loci.Bundle<any>, granularity: LabelGranularity): EventDetail | (EventDetail | undefined)[];
|
package/lib/loci-details.js
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports._bundleLabel = exports.bondLabel = exports.lociDetails = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var sifts_mapping_1 = require("Molstar/mol-model-props/sequence/sifts-mapping");
|
|
4
|
+
const structure_1 = require("Molstar/mol-model/structure");
|
|
5
|
+
const int_1 = require("Molstar/mol-data/int");
|
|
6
|
+
const sifts_mapping_1 = require("Molstar/mol-model-props/sequence/sifts-mapping");
|
|
8
7
|
function lociDetails(loci) {
|
|
9
8
|
switch (loci.kind) {
|
|
10
9
|
case 'structure-loci':
|
|
11
|
-
return { models: loci.structure.models.map(
|
|
10
|
+
return { models: loci.structure.models.map(m => m.entry).filter(l => !!l) };
|
|
12
11
|
case 'element-loci':
|
|
13
12
|
return structureElementStatsDetail(structure_1.StructureElement.Stats.ofLoci(loci));
|
|
14
13
|
case 'bond-loci':
|
|
15
|
-
|
|
14
|
+
const bond = loci.bonds[0];
|
|
16
15
|
return bond ? bondLabel(bond, 'element') : '';
|
|
17
16
|
default:
|
|
18
17
|
return void 0;
|
|
@@ -20,7 +19,7 @@ function lociDetails(loci) {
|
|
|
20
19
|
}
|
|
21
20
|
exports.lociDetails = lociDetails;
|
|
22
21
|
function structureElementStatsDetail(stats) {
|
|
23
|
-
|
|
22
|
+
const { chainCount, residueCount, elementCount } = stats;
|
|
24
23
|
if (elementCount === 1 && residueCount === 0 && chainCount === 0) {
|
|
25
24
|
return getElementDetails(stats.firstElementLoc, 'element');
|
|
26
25
|
}
|
|
@@ -31,10 +30,9 @@ function structureElementStatsDetail(stats) {
|
|
|
31
30
|
return void 0;
|
|
32
31
|
}
|
|
33
32
|
}
|
|
34
|
-
function getElementDetails(location, granularity) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
var entry = location.unit.model.entry;
|
|
33
|
+
function getElementDetails(location, granularity = 'element') {
|
|
34
|
+
const basicDetails = {};
|
|
35
|
+
let entry = location.unit.model.entry;
|
|
38
36
|
if (entry.length > 30)
|
|
39
37
|
entry = entry.substr(0, 27) + '\u2026'; // ellipsis
|
|
40
38
|
basicDetails['entry_id'] = entry; // entry
|
|
@@ -42,17 +40,17 @@ function getElementDetails(location, granularity) {
|
|
|
42
40
|
basicDetails['model'] = location.unit.model.modelNum; // model
|
|
43
41
|
basicDetails['instance'] = location.unit.conformation.operator.name; // instance
|
|
44
42
|
}
|
|
45
|
-
|
|
43
|
+
let elementDetails;
|
|
46
44
|
if (structure_1.Unit.isAtomic(location.unit)) {
|
|
47
45
|
elementDetails = atomicElementDetails(location, granularity);
|
|
48
46
|
}
|
|
49
47
|
else if (structure_1.Unit.isCoarse(location.unit)) {
|
|
50
48
|
elementDetails = coarseElementDetails(location, granularity);
|
|
51
49
|
}
|
|
52
|
-
return
|
|
50
|
+
return { ...basicDetails, ...elementDetails };
|
|
53
51
|
}
|
|
54
52
|
function atomicElementDetails(location, granularity) {
|
|
55
|
-
|
|
53
|
+
const elementDetails = {
|
|
56
54
|
entity_id: structure_1.StructureProperties.chain.label_entity_id(location),
|
|
57
55
|
label_asym_id: structure_1.StructureProperties.chain.label_asym_id(location),
|
|
58
56
|
auth_asym_id: structure_1.StructureProperties.chain.auth_asym_id(location),
|
|
@@ -65,29 +63,29 @@ function atomicElementDetails(location, granularity) {
|
|
|
65
63
|
atom_id: [structure_1.StructureProperties.atom.label_atom_id(location)],
|
|
66
64
|
alt_id: structure_1.StructureProperties.atom.label_alt_id(location)
|
|
67
65
|
};
|
|
68
|
-
|
|
66
|
+
const unpLabel = sifts_mapping_1.SIFTSMapping.getLabel(location);
|
|
69
67
|
if (unpLabel) {
|
|
70
|
-
|
|
68
|
+
const unpLabelDetails = unpLabel.split(' ');
|
|
71
69
|
if (unpLabelDetails[0] === 'UNP') {
|
|
72
70
|
elementDetails.unp_accession = unpLabelDetails[1];
|
|
73
71
|
elementDetails.unp_seq_id = +unpLabelDetails[2];
|
|
74
72
|
}
|
|
75
73
|
}
|
|
76
|
-
|
|
74
|
+
const microHetCompIds = structure_1.StructureProperties.residue.microheterogeneityCompIds(location);
|
|
77
75
|
elementDetails['micro_het_comp_ids'] = granularity === 'residue' && microHetCompIds.length > 1 ?
|
|
78
76
|
microHetCompIds : [elementDetails['comp_id']];
|
|
79
77
|
return elementDetails;
|
|
80
78
|
}
|
|
81
79
|
function coarseElementDetails(location, granularity) {
|
|
82
|
-
|
|
80
|
+
const elementDetails = {
|
|
83
81
|
asym_id: structure_1.StructureProperties.coarse.asym_id(location),
|
|
84
82
|
seq_id_begin: structure_1.StructureProperties.coarse.seq_id_begin(location),
|
|
85
83
|
seq_id_end: structure_1.StructureProperties.coarse.seq_id_end(location)
|
|
86
84
|
};
|
|
87
85
|
if (granularity === 'residue') {
|
|
88
86
|
if (elementDetails.seq_id_begin === elementDetails.seq_id_end) {
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
const entityIndex = structure_1.StructureProperties.coarse.entityKey(location);
|
|
88
|
+
const seq = location.unit.model.sequence.byEntityKey[entityIndex];
|
|
91
89
|
elementDetails['comp_id'] = seq.sequence.compId.value(elementDetails.seq_id_begin - 1); // 1-indexed
|
|
92
90
|
}
|
|
93
91
|
}
|
|
@@ -101,27 +99,26 @@ function bondLabel(bond, granularity) {
|
|
|
101
99
|
}
|
|
102
100
|
exports.bondLabel = bondLabel;
|
|
103
101
|
function _bundleLabel(bundle, granularity) {
|
|
104
|
-
|
|
105
|
-
for (
|
|
106
|
-
var l = _a[_i];
|
|
102
|
+
let isSingleElements = true;
|
|
103
|
+
for (const l of bundle.loci) {
|
|
107
104
|
if (!structure_1.StructureElement.Loci.is(l) || structure_1.StructureElement.Loci.size(l) !== 1) {
|
|
108
105
|
isSingleElements = false;
|
|
109
106
|
break;
|
|
110
107
|
}
|
|
111
108
|
}
|
|
112
109
|
if (isSingleElements) {
|
|
113
|
-
|
|
114
|
-
|
|
110
|
+
const locations = bundle.loci.map(l => {
|
|
111
|
+
const { unit, indices } = l.elements[0];
|
|
115
112
|
return structure_1.StructureElement.Location.create(l.structure, unit, unit.elements[int_1.OrderedSet.start(indices)]);
|
|
116
113
|
});
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
114
|
+
const elementDetailsArr = locations.map(l => getElementDetails(l, granularity));
|
|
115
|
+
const atomIds = [elementDetailsArr[0].atom_id[0], elementDetailsArr[1].atom_id[0]];
|
|
116
|
+
const elementDetails = elementDetailsArr[0];
|
|
120
117
|
elementDetails['atom_id'] = atomIds;
|
|
121
118
|
return elementDetails;
|
|
122
119
|
}
|
|
123
120
|
else {
|
|
124
|
-
|
|
121
|
+
const elementDetails = bundle.loci.map(l => lociDetails(l));
|
|
125
122
|
return elementDetails;
|
|
126
123
|
}
|
|
127
124
|
}
|
package/lib/sifts-mapping.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SIFTSMapping = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
const db_1 = require("Molstar/mol-data/db");
|
|
5
|
+
const mmcif_1 = require("Molstar/mol-model-formats/structure/mmcif");
|
|
6
|
+
const custom_property_1 = require("Molstar/mol-model/custom-property");
|
|
7
|
+
const custom_model_property_1 = require("Molstar/mol-model-props/common/custom-model-property");
|
|
8
8
|
var SIFTSMapping;
|
|
9
9
|
(function (SIFTSMapping) {
|
|
10
|
-
var _this = this;
|
|
11
10
|
SIFTSMapping.Provider = custom_model_property_1.CustomModelProperty.createProvider({
|
|
12
11
|
label: 'SIFTS Mapping',
|
|
13
12
|
descriptor: (0, custom_property_1.CustomPropertyDescriptor)({
|
|
@@ -15,57 +14,55 @@ var SIFTSMapping;
|
|
|
15
14
|
}),
|
|
16
15
|
type: 'static',
|
|
17
16
|
defaultParams: {},
|
|
18
|
-
getParams:
|
|
19
|
-
isApplicable:
|
|
20
|
-
obtain:
|
|
21
|
-
return
|
|
22
|
-
|
|
23
|
-
});
|
|
24
|
-
}); }
|
|
17
|
+
getParams: () => ({}),
|
|
18
|
+
isApplicable: (data) => isAvailable(data),
|
|
19
|
+
obtain: async (ctx, data) => {
|
|
20
|
+
return { value: fromCif(data) };
|
|
21
|
+
}
|
|
25
22
|
});
|
|
26
23
|
function isAvailable(model) {
|
|
27
24
|
if (!mmcif_1.MmcifFormat.is(model.sourceData))
|
|
28
25
|
return false;
|
|
29
|
-
|
|
26
|
+
const { pdbx_sifts_xref_db_name: db_name, pdbx_sifts_xref_db_acc: db_acc, pdbx_sifts_xref_db_num: db_num, pdbx_sifts_xref_db_res: db_res } = model.sourceData.data.db.atom_site;
|
|
30
27
|
return db_name.isDefined && db_acc.isDefined && db_num.isDefined && db_res.isDefined;
|
|
31
28
|
}
|
|
32
29
|
SIFTSMapping.isAvailable = isAvailable;
|
|
33
30
|
function getKey(loc) {
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
const model = loc.unit.model;
|
|
32
|
+
const data = SIFTSMapping.Provider.get(model).value;
|
|
36
33
|
if (!data)
|
|
37
34
|
return '';
|
|
38
|
-
|
|
35
|
+
const rI = model.atomicHierarchy.residueAtomSegments.index[loc.element];
|
|
39
36
|
return data.accession[rI];
|
|
40
37
|
}
|
|
41
38
|
SIFTSMapping.getKey = getKey;
|
|
42
39
|
function getLabel(loc) {
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
const model = loc.unit.model;
|
|
41
|
+
const data = SIFTSMapping.Provider.get(model).value;
|
|
45
42
|
if (!data)
|
|
46
43
|
return;
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
const rI = model.atomicHierarchy.residueAtomSegments.index[loc.element];
|
|
45
|
+
const dbName = data.dbName[rI];
|
|
49
46
|
if (!dbName)
|
|
50
47
|
return;
|
|
51
|
-
return
|
|
48
|
+
return `${dbName} ${data.accession[rI]} ${data.num[rI]} ${data.residue[rI]}`;
|
|
52
49
|
}
|
|
53
50
|
SIFTSMapping.getLabel = getLabel;
|
|
54
51
|
function fromCif(model) {
|
|
55
52
|
if (!mmcif_1.MmcifFormat.is(model.sourceData))
|
|
56
53
|
return;
|
|
57
|
-
|
|
54
|
+
const { pdbx_sifts_xref_db_name: db_name, pdbx_sifts_xref_db_acc: db_acc, pdbx_sifts_xref_db_num: db_num, pdbx_sifts_xref_db_res: db_res } = model.sourceData.data.db.atom_site;
|
|
58
55
|
if (!db_name.isDefined || !db_acc.isDefined || !db_num.isDefined || !db_res.isDefined)
|
|
59
56
|
return;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
for (
|
|
67
|
-
|
|
68
|
-
if (db_name.valueKind(row) !==
|
|
57
|
+
const { atomSourceIndex } = model.atomicHierarchy;
|
|
58
|
+
const { count, offsets: residueOffsets } = model.atomicHierarchy.residueAtomSegments;
|
|
59
|
+
const dbName = new Array(count);
|
|
60
|
+
const accession = new Array(count);
|
|
61
|
+
const num = new Array(count);
|
|
62
|
+
const residue = new Array(count);
|
|
63
|
+
for (let i = 0; i < count; i++) {
|
|
64
|
+
const row = atomSourceIndex.value(residueOffsets[i]);
|
|
65
|
+
if (db_name.valueKind(row) !== db_1.Column.ValueKind.Present) {
|
|
69
66
|
dbName[i] = '';
|
|
70
67
|
accession[i] = '';
|
|
71
68
|
num[i] = '';
|
|
@@ -77,7 +74,6 @@ var SIFTSMapping;
|
|
|
77
74
|
num[i] = db_num.value(row);
|
|
78
75
|
residue[i] = db_res.value(row);
|
|
79
76
|
}
|
|
80
|
-
return { dbName
|
|
77
|
+
return { dbName, accession, num, residue };
|
|
81
78
|
}
|
|
82
|
-
})(SIFTSMapping || (SIFTSMapping = {}));
|
|
83
|
-
exports.SIFTSMapping = SIFTSMapping;
|
|
79
|
+
})(SIFTSMapping || (exports.SIFTSMapping = SIFTSMapping = {}));
|
|
@@ -1,64 +1,60 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PDBeSIFTSMapping = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var behavior_1 = require("Molstar/mol-plugin/behavior");
|
|
4
|
+
const int_1 = require("Molstar/mol-data/int");
|
|
5
|
+
const sifts_mapping_1 = require("./sifts-mapping");
|
|
6
|
+
const sifts_mapping_2 = require("Molstar/mol-model-props/sequence/themes/sifts-mapping");
|
|
7
|
+
const structure_1 = require("Molstar/mol-model/structure");
|
|
8
|
+
const param_definition_1 = require("Molstar/mol-util/param-definition");
|
|
9
|
+
const behavior_1 = require("Molstar/mol-plugin/behavior");
|
|
11
10
|
exports.PDBeSIFTSMapping = behavior_1.PluginBehavior.create({
|
|
12
11
|
name: 'pdbe-sifts-mapping-prop',
|
|
13
12
|
category: 'custom-props',
|
|
14
13
|
display: { name: 'PDBe SIFTS Mapping' },
|
|
15
|
-
ctor:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
if (!_this.params.showTooltip)
|
|
14
|
+
ctor: class extends behavior_1.PluginBehavior.Handler {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
this.provider = sifts_mapping_1.SIFTSMapping.Provider;
|
|
18
|
+
this.labelProvider = {
|
|
19
|
+
label: (loci) => {
|
|
20
|
+
if (!this.params.showTooltip)
|
|
23
21
|
return;
|
|
24
22
|
return PDBeBestDatabaseSequenceMappingLabel(loci);
|
|
25
23
|
}
|
|
26
24
|
};
|
|
27
|
-
return _this;
|
|
28
25
|
}
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
update(p) {
|
|
27
|
+
const updated = (this.params.autoAttach !== p.autoAttach ||
|
|
31
28
|
this.params.showTooltip !== p.showTooltip);
|
|
32
29
|
this.params.autoAttach = p.autoAttach;
|
|
33
30
|
this.params.showTooltip = p.showTooltip;
|
|
34
31
|
this.ctx.customStructureProperties.setDefaultAutoAttach(this.provider.descriptor.name, this.params.autoAttach);
|
|
35
32
|
return updated;
|
|
36
|
-
}
|
|
37
|
-
|
|
33
|
+
}
|
|
34
|
+
register() {
|
|
38
35
|
this.ctx.customModelProperties.register(this.provider, this.params.autoAttach);
|
|
39
36
|
this.ctx.representation.structure.themes.colorThemeRegistry.add(sifts_mapping_2.SIFTSMappingColorThemeProvider);
|
|
40
37
|
this.ctx.managers.lociLabels.addProvider(this.labelProvider);
|
|
41
|
-
}
|
|
42
|
-
|
|
38
|
+
}
|
|
39
|
+
unregister() {
|
|
43
40
|
this.ctx.customModelProperties.unregister(this.provider.descriptor.name);
|
|
44
41
|
this.ctx.representation.structure.themes.colorThemeRegistry.remove(sifts_mapping_2.SIFTSMappingColorThemeProvider);
|
|
45
42
|
this.ctx.managers.lociLabels.removeProvider(this.labelProvider);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
params: function () { return ({
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
params: () => ({
|
|
50
46
|
autoAttach: param_definition_1.ParamDefinition.Boolean(true),
|
|
51
47
|
showTooltip: param_definition_1.ParamDefinition.Boolean(true)
|
|
52
|
-
})
|
|
48
|
+
})
|
|
53
49
|
});
|
|
54
50
|
//
|
|
55
51
|
function PDBeBestDatabaseSequenceMappingLabel(loci) {
|
|
56
52
|
if (loci.kind === 'element-loci') {
|
|
57
53
|
if (loci.elements.length === 0)
|
|
58
54
|
return;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
55
|
+
const e = loci.elements[0];
|
|
56
|
+
const u = e.unit;
|
|
57
|
+
const se = structure_1.StructureElement.Location.create(loci.structure, u, u.elements[int_1.OrderedSet.getAt(e.indices, 0)]);
|
|
62
58
|
return sifts_mapping_1.SIFTSMapping.getLabel(se);
|
|
63
59
|
}
|
|
64
60
|
}
|
package/lib/spec.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare const DefaultPluginUISpec: () => PluginUISpec;
|
|
|
8
8
|
export declare function createPluginUI(target: HTMLElement, spec?: PluginUISpec, options?: {
|
|
9
9
|
onBeforeUIRender?: (ctx: PluginUIContext) => (Promise<void> | void);
|
|
10
10
|
}): Promise<PluginUIContext>;
|
|
11
|
-
export
|
|
11
|
+
export type InitParams = {
|
|
12
12
|
moleculeId?: string;
|
|
13
13
|
superposition?: boolean;
|
|
14
14
|
pdbeUrl?: string;
|
package/lib/spec.js
CHANGED
|
@@ -1,20 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.DefaultParams = exports.createPluginUI = exports.DefaultPluginUISpec = exports.DefaultPluginSpec = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var DefaultPluginSpec = function () { return ({
|
|
27
|
+
const React = __importStar(require("react"));
|
|
28
|
+
const ReactDOM = __importStar(require("react-dom"));
|
|
29
|
+
const volume_1 = require("Molstar/mol-plugin-ui/custom/volume");
|
|
30
|
+
const plugin_1 = require("Molstar/mol-plugin-ui/plugin");
|
|
31
|
+
const behavior_1 = require("Molstar/mol-plugin/behavior");
|
|
32
|
+
const transformers_1 = require("Molstar/mol-plugin/behavior/dynamic/volume-streaming/transformers");
|
|
33
|
+
const context_1 = require("Molstar/mol-plugin-ui/context");
|
|
34
|
+
const spec_1 = require("Molstar/mol-plugin/spec");
|
|
35
|
+
const config_1 = require("Molstar/mol-plugin/config");
|
|
36
|
+
const actions_1 = require("Molstar/mol-plugin-state/actions");
|
|
37
|
+
const labels_1 = require("./labels");
|
|
38
|
+
const sifts_mappings_behaviour_1 = require("./sifts-mappings-behaviour");
|
|
39
|
+
const DefaultPluginSpec = () => ({
|
|
18
40
|
actions: [
|
|
19
41
|
spec_1.PluginSpec.Action(actions_1.StateActions.Structure.EnableStructureCustomProps)
|
|
20
42
|
],
|
|
@@ -37,33 +59,23 @@ var DefaultPluginSpec = function () { return ({
|
|
|
37
59
|
config: [
|
|
38
60
|
[config_1.PluginConfig.VolumeStreaming.DefaultServer, 'https://www.ebi.ac.uk/pdbe/volume-server']
|
|
39
61
|
]
|
|
40
|
-
});
|
|
62
|
+
});
|
|
41
63
|
exports.DefaultPluginSpec = DefaultPluginSpec;
|
|
42
|
-
|
|
64
|
+
const DefaultPluginUISpec = () => ({
|
|
65
|
+
...(0, exports.DefaultPluginSpec)(),
|
|
66
|
+
customParamEditors: [
|
|
43
67
|
[transformers_1.CreateVolumeStreamingBehavior, volume_1.VolumeStreamingCustomControls]
|
|
44
|
-
]
|
|
68
|
+
],
|
|
69
|
+
});
|
|
45
70
|
exports.DefaultPluginUISpec = DefaultPluginUISpec;
|
|
46
|
-
function createPluginUI(target, spec, options) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
case 1:
|
|
55
|
-
_a.sent();
|
|
56
|
-
if (!(options === null || options === void 0 ? void 0 : options.onBeforeUIRender)) return [3 /*break*/, 3];
|
|
57
|
-
return [4 /*yield*/, options.onBeforeUIRender(ctx)];
|
|
58
|
-
case 2:
|
|
59
|
-
_a.sent();
|
|
60
|
-
_a.label = 3;
|
|
61
|
-
case 3:
|
|
62
|
-
ReactDOM.render(React.createElement(plugin_1.Plugin, { plugin: ctx }), target);
|
|
63
|
-
return [2 /*return*/, ctx];
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
});
|
|
71
|
+
async function createPluginUI(target, spec, options) {
|
|
72
|
+
const ctx = new context_1.PluginUIContext(spec || (0, exports.DefaultPluginUISpec)());
|
|
73
|
+
await ctx.init();
|
|
74
|
+
if (options?.onBeforeUIRender) {
|
|
75
|
+
await options.onBeforeUIRender(ctx);
|
|
76
|
+
}
|
|
77
|
+
ReactDOM.render(React.createElement(plugin_1.Plugin, { plugin: ctx }), target);
|
|
78
|
+
return ctx;
|
|
67
79
|
}
|
|
68
80
|
exports.createPluginUI = createPluginUI;
|
|
69
81
|
exports.DefaultParams = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StateTransformer } from 'molstar/lib/mol-state';
|
|
2
2
|
import { PluginStateObject as SO } from 'molstar/lib/mol-plugin-state/objects';
|
|
3
3
|
export { StructureSelectionsContact3D };
|
|
4
|
-
|
|
4
|
+
type StructureSelectionsContact3D = typeof StructureSelectionsContact3D;
|
|
5
5
|
declare const StructureSelectionsContact3D: StateTransformer<SO.Molecule.Structure.Selections, SO.Shape.Representation3D, import("molstar/lib/mol-util/param-definition").ParamDefinition.Normalize<{
|
|
6
6
|
visuals: ("text" | "cylinder")[];
|
|
7
7
|
unitLabel: string;
|
|
@@ -21,7 +21,7 @@ declare const StructureSelectionsContact3D: StateTransformer<SO.Molecule.Structu
|
|
|
21
21
|
tether: boolean;
|
|
22
22
|
tetherLength: number;
|
|
23
23
|
tetherBaseWidth: number;
|
|
24
|
-
attachment: "
|
|
24
|
+
attachment: "middle-center" | "bottom-left" | "bottom-center" | "bottom-right" | "middle-left" | "middle-right" | "top-left" | "top-center" | "top-right";
|
|
25
25
|
fontFamily: import("molstar/lib/mol-geo/geometry/text/font-atlas").FontFamily;
|
|
26
26
|
fontQuality: number;
|
|
27
27
|
fontStyle: import("molstar/lib/mol-geo/geometry/text/font-atlas").FontStyle;
|
|
@@ -42,9 +42,15 @@ declare const StructureSelectionsContact3D: StateTransformer<SO.Molecule.Structu
|
|
|
42
42
|
position: any;
|
|
43
43
|
rotation: any;
|
|
44
44
|
scale: any;
|
|
45
|
+
transform: any;
|
|
45
46
|
}>[];
|
|
46
47
|
}>;
|
|
48
|
+
emissive: number;
|
|
49
|
+
density: number;
|
|
47
50
|
instanceGranularity: boolean;
|
|
51
|
+
lod: import("molstar/lib/mol-math/linear-algebra").Vec3;
|
|
52
|
+
cellSize: number;
|
|
53
|
+
batchSize: number;
|
|
48
54
|
lineSizeAttenuation: boolean;
|
|
49
55
|
linesSize: number;
|
|
50
56
|
dashLength: number;
|
|
@@ -53,8 +59,11 @@ declare const StructureSelectionsContact3D: StateTransformer<SO.Molecule.Structu
|
|
|
53
59
|
sizeAspectRatio: number;
|
|
54
60
|
doubleSided: boolean;
|
|
55
61
|
ignoreLight: boolean;
|
|
56
|
-
|
|
57
|
-
|
|
62
|
+
celShaded: boolean;
|
|
63
|
+
xrayShaded: boolean | "inverted";
|
|
64
|
+
transparentBackfaces: "off" | "on" | "opaque";
|
|
65
|
+
solidInterior: boolean;
|
|
58
66
|
bumpFrequency: number;
|
|
59
67
|
bumpAmplitude: number;
|
|
68
|
+
colorMode: "default" | "interpolate";
|
|
60
69
|
}>>;
|