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/helpers.js
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ModelInfo = exports.QueryHelper = exports.LigandView = exports.AlphafoldView = exports.PDBeVolumes = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var prop_1 = require("Molstar/extensions/model-archive/quality-assessment/prop");
|
|
4
|
+
const commands_1 = require("Molstar/mol-plugin/commands");
|
|
5
|
+
const builder_1 = require("Molstar/mol-script/language/builder");
|
|
6
|
+
const mol_state_1 = require("Molstar/mol-state");
|
|
7
|
+
const structure_1 = require("Molstar/mol-model/structure");
|
|
8
|
+
const transformers_1 = require("Molstar/mol-plugin/behavior/dynamic/volume-streaming/transformers");
|
|
9
|
+
const compiler_1 = require("Molstar/mol-script/runtime/query/compiler");
|
|
10
|
+
const structure_2 = require("Molstar/mol-model/structure");
|
|
11
|
+
const sifts_mapping_1 = require("./sifts-mapping");
|
|
12
|
+
const query_1 = require("Molstar/mol-model/structure/query/query");
|
|
13
|
+
const prop_1 = require("Molstar/extensions/model-archive/quality-assessment/prop");
|
|
15
14
|
var PDBeVolumes;
|
|
16
15
|
(function (PDBeVolumes) {
|
|
17
16
|
function mapParams(defaultParams, mapParams, ref) {
|
|
18
|
-
|
|
17
|
+
const pdbeParams = { ...defaultParams };
|
|
19
18
|
pdbeParams.options.behaviorRef = 'volume-streaming' + '' + Math.floor(Math.random() * Math.floor(100));
|
|
20
19
|
pdbeParams.options.emContourProvider = 'pdbe';
|
|
21
20
|
pdbeParams.options.serverUrl = 'https://www.ebi.ac.uk/pdbe/volume-server';
|
|
@@ -48,19 +47,19 @@ var PDBeVolumes;
|
|
|
48
47
|
}
|
|
49
48
|
PDBeVolumes.displayUsibilityMessage = displayUsibilityMessage;
|
|
50
49
|
function toggle(plugin) {
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
const state = plugin.state.data;
|
|
51
|
+
const streamingState = state.select(mol_state_1.StateSelection.Generators.ofTransformer(transformers_1.CreateVolumeStreamingInfo))[0];
|
|
53
52
|
if (streamingState) {
|
|
54
53
|
commands_1.PluginCommands.State.ToggleVisibility(plugin, { state: state, ref: streamingState.transform.ref });
|
|
55
54
|
return;
|
|
56
55
|
}
|
|
57
56
|
}
|
|
58
57
|
PDBeVolumes.toggle = toggle;
|
|
59
|
-
})(PDBeVolumes
|
|
58
|
+
})(PDBeVolumes || (exports.PDBeVolumes = PDBeVolumes = {}));
|
|
60
59
|
var AlphafoldView;
|
|
61
60
|
(function (AlphafoldView) {
|
|
62
61
|
function getLociByPLDDT(score, contextData) {
|
|
63
|
-
|
|
62
|
+
const queryExp = builder_1.MolScriptBuilder.struct.modifier.union([
|
|
64
63
|
builder_1.MolScriptBuilder.struct.modifier.wholeResidues([
|
|
65
64
|
builder_1.MolScriptBuilder.struct.modifier.union([
|
|
66
65
|
builder_1.MolScriptBuilder.struct.generator.atomGroups({
|
|
@@ -70,20 +69,20 @@ var AlphafoldView;
|
|
|
70
69
|
])
|
|
71
70
|
])
|
|
72
71
|
]);
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
const query = (0, compiler_1.compile)(queryExp);
|
|
73
|
+
const sel = query(new structure_1.QueryContext(contextData));
|
|
75
74
|
return structure_1.StructureSelection.toLociWithSourceUnits(sel);
|
|
76
75
|
}
|
|
77
76
|
AlphafoldView.getLociByPLDDT = getLociByPLDDT;
|
|
78
|
-
})(AlphafoldView
|
|
77
|
+
})(AlphafoldView || (exports.AlphafoldView = AlphafoldView = {}));
|
|
79
78
|
var LigandView;
|
|
80
79
|
(function (LigandView) {
|
|
81
80
|
function query(ligandViewParams) {
|
|
82
|
-
|
|
81
|
+
let atomGroupsParams = {
|
|
83
82
|
'group-by': builder_1.MolScriptBuilder.core.str.concat([builder_1.MolScriptBuilder.struct.atomProperty.core.operatorName(), builder_1.MolScriptBuilder.struct.atomProperty.macromolecular.residueKey()])
|
|
84
83
|
};
|
|
85
84
|
// Residue Param
|
|
86
|
-
|
|
85
|
+
let residueParam;
|
|
87
86
|
if (ligandViewParams.auth_seq_id) {
|
|
88
87
|
residueParam = builder_1.MolScriptBuilder.core.rel.eq([builder_1.MolScriptBuilder.struct.atomProperty.macromolecular.auth_seq_id(), ligandViewParams.auth_seq_id]);
|
|
89
88
|
}
|
|
@@ -100,182 +99,178 @@ var LigandView;
|
|
|
100
99
|
atomGroupsParams['chain-test'] = builder_1.MolScriptBuilder.core.rel.eq([builder_1.MolScriptBuilder.struct.atomProperty.macromolecular.label_asym_id(), ligandViewParams.struct_asym_id]);
|
|
101
100
|
}
|
|
102
101
|
// Construct core query
|
|
103
|
-
|
|
102
|
+
const core = ligandViewParams.show_all ?
|
|
104
103
|
builder_1.MolScriptBuilder.struct.generator.atomGroups(atomGroupsParams) :
|
|
105
104
|
builder_1.MolScriptBuilder.struct.filter.first([
|
|
106
105
|
builder_1.MolScriptBuilder.struct.generator.atomGroups(atomGroupsParams)
|
|
107
106
|
]);
|
|
108
107
|
// Construct surroundings query
|
|
109
|
-
|
|
108
|
+
const surroundings = builder_1.MolScriptBuilder.struct.modifier.includeSurroundings({ 0: core, radius: 5, 'as-whole-residues': true });
|
|
110
109
|
return {
|
|
111
|
-
core
|
|
112
|
-
surroundings
|
|
110
|
+
core,
|
|
111
|
+
surroundings
|
|
113
112
|
};
|
|
114
113
|
}
|
|
115
114
|
LigandView.query = query;
|
|
116
115
|
function branchedQuery(params) {
|
|
117
|
-
|
|
118
|
-
params.atom_site.forEach(
|
|
119
|
-
|
|
116
|
+
let entityObjArray = [];
|
|
117
|
+
params.atom_site.forEach((param) => {
|
|
118
|
+
let qEntities = {
|
|
120
119
|
'group-by': builder_1.MolScriptBuilder.core.str.concat([builder_1.MolScriptBuilder.struct.atomProperty.core.operatorName(), builder_1.MolScriptBuilder.struct.atomProperty.macromolecular.residueKey()]),
|
|
121
120
|
'residue-test': builder_1.MolScriptBuilder.core.rel.eq([builder_1.MolScriptBuilder.struct.atomProperty.macromolecular.auth_seq_id(), param.auth_seq_id])
|
|
122
121
|
};
|
|
123
122
|
entityObjArray.push(qEntities);
|
|
124
123
|
});
|
|
125
|
-
|
|
126
|
-
entityObjArray.forEach(
|
|
124
|
+
const atmGroupsQueries = [];
|
|
125
|
+
entityObjArray.forEach((entityObj) => {
|
|
127
126
|
atmGroupsQueries.push(builder_1.MolScriptBuilder.struct.generator.atomGroups(entityObj));
|
|
128
127
|
});
|
|
129
|
-
|
|
128
|
+
const core = builder_1.MolScriptBuilder.struct.modifier.union([
|
|
130
129
|
atmGroupsQueries.length === 1
|
|
131
130
|
? atmGroupsQueries[0]
|
|
132
131
|
// Need to union before merge for fast performance
|
|
133
|
-
: builder_1.MolScriptBuilder.struct.combinator.merge(atmGroupsQueries.map(
|
|
132
|
+
: builder_1.MolScriptBuilder.struct.combinator.merge(atmGroupsQueries.map(q => builder_1.MolScriptBuilder.struct.modifier.union([q])))
|
|
134
133
|
]);
|
|
135
134
|
// Construct surroundings query
|
|
136
|
-
|
|
135
|
+
const surroundings = builder_1.MolScriptBuilder.struct.modifier.includeSurroundings({ 0: core, radius: 5, 'as-whole-residues': true });
|
|
137
136
|
return {
|
|
138
|
-
core
|
|
139
|
-
surroundings
|
|
137
|
+
core,
|
|
138
|
+
surroundings
|
|
140
139
|
};
|
|
141
140
|
}
|
|
142
141
|
LigandView.branchedQuery = branchedQuery;
|
|
143
|
-
})(LigandView
|
|
142
|
+
})(LigandView || (exports.LigandView = LigandView = {}));
|
|
144
143
|
var QueryHelper;
|
|
145
144
|
(function (QueryHelper) {
|
|
146
145
|
function getQueryObject(params, contextData) {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
params.forEach(
|
|
151
|
-
|
|
146
|
+
let selections = [];
|
|
147
|
+
let siftMappings;
|
|
148
|
+
let currentAccession;
|
|
149
|
+
params.forEach(param => {
|
|
150
|
+
let selection = {};
|
|
152
151
|
// entity
|
|
153
152
|
if (param.entity_id)
|
|
154
|
-
selection['entityTest'] =
|
|
153
|
+
selection['entityTest'] = (l) => structure_1.StructureProperties.entity.id(l.element) === param.entity_id;
|
|
155
154
|
// chain
|
|
156
155
|
if (param.struct_asym_id) {
|
|
157
|
-
selection['chainTest'] =
|
|
156
|
+
selection['chainTest'] = (l) => structure_1.StructureProperties.chain.label_asym_id(l.element) === param.struct_asym_id;
|
|
158
157
|
}
|
|
159
158
|
else if (param.auth_asym_id) {
|
|
160
|
-
selection['chainTest'] =
|
|
159
|
+
selection['chainTest'] = (l) => structure_1.StructureProperties.chain.auth_asym_id(l.element) === param.auth_asym_id;
|
|
161
160
|
}
|
|
162
161
|
if (param.group_PDB) {
|
|
163
|
-
selection['residueTest'] =
|
|
162
|
+
selection['residueTest'] = (l) => structure_1.StructureProperties.residue.group_PDB(l.element) === param.group_PDB;
|
|
164
163
|
}
|
|
165
164
|
// residues
|
|
166
165
|
if (param.label_comp_id) {
|
|
167
|
-
selection['residueTest'] =
|
|
166
|
+
selection['residueTest'] = (l) => structure_1.StructureProperties.atom.label_comp_id(l.element) === param.label_comp_id;
|
|
168
167
|
}
|
|
169
168
|
else if (param.uniprot_accession && param.uniprot_residue_number) {
|
|
170
|
-
selection['residueTest'] =
|
|
169
|
+
selection['residueTest'] = (l) => {
|
|
171
170
|
if (!siftMappings || currentAccession !== param.uniprot_accession) {
|
|
172
171
|
siftMappings = sifts_mapping_1.SIFTSMapping.Provider.get(contextData.models[0]).value;
|
|
173
172
|
currentAccession = param.uniprot_accession;
|
|
174
173
|
}
|
|
175
|
-
|
|
174
|
+
const rI = structure_1.StructureProperties.residue.key(l.element);
|
|
176
175
|
return param.uniprot_accession === siftMappings.accession[rI] && param.uniprot_residue_number === +siftMappings.num[rI];
|
|
177
176
|
};
|
|
178
177
|
}
|
|
179
178
|
else if (param.uniprot_accession && param.start_uniprot_residue_number && param.end_uniprot_residue_number) {
|
|
180
|
-
selection['residueTest'] =
|
|
179
|
+
selection['residueTest'] = (l) => {
|
|
181
180
|
if (!siftMappings || currentAccession !== param.uniprot_accession) {
|
|
182
181
|
siftMappings = sifts_mapping_1.SIFTSMapping.Provider.get(contextData.models[0]).value;
|
|
183
182
|
currentAccession = param.uniprot_accession;
|
|
184
183
|
}
|
|
185
|
-
|
|
184
|
+
const rI = structure_1.StructureProperties.residue.key(l.element);
|
|
186
185
|
return param.uniprot_accession === siftMappings.accession[rI] && (param.start_uniprot_residue_number <= +siftMappings.num[rI] && param.end_uniprot_residue_number >= +siftMappings.num[rI]);
|
|
187
186
|
};
|
|
188
187
|
}
|
|
189
188
|
else if (param.residue_number) {
|
|
190
|
-
selection['residueTest'] =
|
|
189
|
+
selection['residueTest'] = (l) => structure_1.StructureProperties.residue.label_seq_id(l.element) === param.residue_number;
|
|
191
190
|
}
|
|
192
191
|
else if ((param.start_residue_number && param.end_residue_number) && (param.end_residue_number > param.start_residue_number)) {
|
|
193
|
-
selection['residueTest'] =
|
|
194
|
-
|
|
192
|
+
selection['residueTest'] = (l) => {
|
|
193
|
+
const labelSeqId = structure_1.StructureProperties.residue.label_seq_id(l.element);
|
|
195
194
|
return labelSeqId >= param.start_residue_number && labelSeqId <= param.end_residue_number;
|
|
196
195
|
};
|
|
197
196
|
}
|
|
198
197
|
else if ((param.start_residue_number && param.end_residue_number) && (param.end_residue_number === param.start_residue_number)) {
|
|
199
|
-
selection['residueTest'] =
|
|
198
|
+
selection['residueTest'] = (l) => structure_1.StructureProperties.residue.label_seq_id(l.element) === param.start_residue_number;
|
|
200
199
|
}
|
|
201
200
|
else if (param.auth_seq_id) {
|
|
202
|
-
selection['residueTest'] =
|
|
201
|
+
selection['residueTest'] = (l) => structure_1.StructureProperties.residue.auth_seq_id(l.element) === param.auth_seq_id;
|
|
203
202
|
}
|
|
204
203
|
else if (param.auth_residue_number && !param.auth_ins_code_id) {
|
|
205
|
-
selection['residueTest'] =
|
|
204
|
+
selection['residueTest'] = (l) => structure_1.StructureProperties.residue.auth_seq_id(l.element) === param.auth_residue_number;
|
|
206
205
|
}
|
|
207
206
|
else if (param.auth_residue_number && param.auth_ins_code_id) {
|
|
208
|
-
selection['residueTest'] =
|
|
207
|
+
selection['residueTest'] = (l) => structure_1.StructureProperties.residue.auth_seq_id(l.element) === param.auth_residue_number;
|
|
209
208
|
}
|
|
210
209
|
else if ((param.start_auth_residue_number && param.end_auth_residue_number) && (param.end_auth_residue_number > param.start_auth_residue_number)) {
|
|
211
|
-
selection['residueTest'] =
|
|
212
|
-
|
|
210
|
+
selection['residueTest'] = (l) => {
|
|
211
|
+
const authSeqId = structure_1.StructureProperties.residue.auth_seq_id(l.element);
|
|
213
212
|
return authSeqId >= param.start_auth_residue_number && authSeqId <= param.end_auth_residue_number;
|
|
214
213
|
};
|
|
215
214
|
}
|
|
216
215
|
else if ((param.start_auth_residue_number && param.end_auth_residue_number) && (param.end_auth_residue_number === param.start_auth_residue_number)) {
|
|
217
|
-
selection['residueTest'] =
|
|
216
|
+
selection['residueTest'] = (l) => structure_1.StructureProperties.residue.auth_seq_id(l.element) === param.start_auth_residue_number;
|
|
218
217
|
}
|
|
219
218
|
// atoms
|
|
220
219
|
if (param.atoms) {
|
|
221
|
-
selection['atomTest'] =
|
|
220
|
+
selection['atomTest'] = (l) => param.atoms.includes(structure_1.StructureProperties.atom.label_atom_id(l.element));
|
|
222
221
|
}
|
|
223
222
|
if (param.atom_id) {
|
|
224
|
-
selection['atomTest'] =
|
|
223
|
+
selection['atomTest'] = (l) => param.atom_id.includes(structure_1.StructureProperties.atom.id(l.element));
|
|
225
224
|
}
|
|
226
225
|
selections.push(selection);
|
|
227
226
|
});
|
|
228
|
-
|
|
229
|
-
selections.forEach(
|
|
227
|
+
let atmGroupsQueries = [];
|
|
228
|
+
selections.forEach((selection) => {
|
|
230
229
|
atmGroupsQueries.push(structure_2.Queries.generators.atoms(selection));
|
|
231
230
|
});
|
|
232
231
|
return structure_2.Queries.combinators.merge(atmGroupsQueries);
|
|
233
232
|
}
|
|
234
233
|
QueryHelper.getQueryObject = getQueryObject;
|
|
235
234
|
function getInteractivityLoci(params, contextData) {
|
|
236
|
-
|
|
235
|
+
const sel = query_1.StructureQuery.run(QueryHelper.getQueryObject(params, contextData), contextData);
|
|
237
236
|
return structure_1.StructureSelection.toLociWithSourceUnits(sel);
|
|
238
237
|
}
|
|
239
238
|
QueryHelper.getInteractivityLoci = getInteractivityLoci;
|
|
240
239
|
function getHetLoci(queryExp, contextData) {
|
|
241
|
-
|
|
242
|
-
|
|
240
|
+
const query = (0, compiler_1.compile)(queryExp);
|
|
241
|
+
const sel = query(new structure_1.QueryContext(contextData));
|
|
243
242
|
return structure_1.StructureSelection.toLociWithSourceUnits(sel);
|
|
244
243
|
}
|
|
245
244
|
QueryHelper.getHetLoci = getHetLoci;
|
|
246
|
-
})(QueryHelper
|
|
245
|
+
})(QueryHelper || (exports.QueryHelper = QueryHelper = {}));
|
|
247
246
|
var ModelInfo;
|
|
248
247
|
(function (ModelInfo) {
|
|
249
|
-
function get(model, structures) {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
carbEntityCount: carbEntityCount
|
|
276
|
-
}];
|
|
277
|
-
});
|
|
278
|
-
});
|
|
248
|
+
async function get(model, structures) {
|
|
249
|
+
const { _rowCount: residueCount } = model.atomicHierarchy.residues;
|
|
250
|
+
const { offsets: residueOffsets } = model.atomicHierarchy.residueAtomSegments;
|
|
251
|
+
const chainIndex = model.atomicHierarchy.chainAtomSegments.index;
|
|
252
|
+
const hetNames = [];
|
|
253
|
+
let carbEntityCount = 0;
|
|
254
|
+
for (let rI = 0; rI < residueCount; rI++) {
|
|
255
|
+
const cI = chainIndex[residueOffsets[rI]];
|
|
256
|
+
const eI = model.atomicHierarchy.index.getEntityFromChain(cI);
|
|
257
|
+
const entityType = model.entities.data.type.value(eI);
|
|
258
|
+
if (entityType !== 'non-polymer' && entityType !== 'branched')
|
|
259
|
+
continue;
|
|
260
|
+
// const comp_id = model.atomicHierarchy.atoms.label_comp_id.value(rI);
|
|
261
|
+
const comp_id = model.atomicHierarchy.atoms.label_comp_id.value(residueOffsets[rI]);
|
|
262
|
+
if (entityType === 'branched') {
|
|
263
|
+
carbEntityCount++;
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
if (hetNames.indexOf(comp_id) === -1)
|
|
267
|
+
hetNames.push(comp_id);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
return {
|
|
271
|
+
hetNames,
|
|
272
|
+
carbEntityCount
|
|
273
|
+
};
|
|
279
274
|
}
|
|
280
275
|
ModelInfo.get = get;
|
|
281
|
-
})(ModelInfo
|
|
276
|
+
})(ModelInfo || (exports.ModelInfo = ModelInfo = {}));
|