pdbe-molstar 3.4.0 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/pdbe-molstar-component.js +2 -2
- package/build/pdbe-molstar-light.css +2 -2
- package/build/pdbe-molstar-plugin.js +2 -2
- package/build/pdbe-molstar-plugin.js.LICENSE.txt +26 -1
- package/build/pdbe-molstar.css +2 -2
- package/lib/alphafold-transparency.js +5 -6
- package/lib/custom-events.js +1 -1
- package/lib/domain-annotations/behavior.d.ts +1 -1
- package/lib/domain-annotations/color.js +2 -2
- package/lib/domain-annotations/prop.js +1 -2
- package/lib/extensions/foldseek/index.d.ts +1 -1
- package/lib/extensions/foldseek/index.js +7 -7
- package/lib/extensions/interactions/index.d.ts +36 -0
- package/lib/extensions/interactions/index.js +112 -0
- package/lib/extensions/state-gallery/behavior.d.ts +1 -1
- package/lib/extensions/state-gallery/config.js +2 -2
- package/lib/extensions/state-gallery/manager.js +5 -4
- package/lib/extensions/state-gallery/ui.js +12 -12
- package/lib/helpers.d.ts +4 -0
- package/lib/helpers.js +68 -19
- package/lib/labels.d.ts +1 -1
- package/lib/loci-details.js +4 -5
- package/lib/plugin-custom-state.js +2 -2
- package/lib/sifts-mapping.js +1 -2
- package/lib/sifts-mappings-behaviour.d.ts +1 -1
- package/lib/spec-from-html.js +1 -2
- package/lib/spec.js +3 -3
- package/lib/subscribe-events.js +1 -2
- package/lib/superposition-export.js +1 -2
- package/lib/superposition-focus-representation.d.ts +2 -2
- package/lib/superposition-focus-representation.js +1 -1
- package/lib/superposition-sifts-mapping.js +1 -2
- package/lib/superposition.d.ts +1 -1
- package/lib/superposition.js +34 -39
- package/lib/ui/alphafold-superposition.js +6 -6
- package/lib/ui/annotation-controls.d.ts +1 -1
- package/lib/ui/annotation-controls.js +2 -2
- package/lib/ui/annotation-row-controls.js +3 -3
- package/lib/ui/custom-controls.js +1 -1
- package/lib/ui/export-superposition.d.ts +0 -1
- package/lib/ui/export-superposition.js +1 -1
- package/lib/ui/icons.js +1 -1
- package/lib/ui/left-panel/core.d.ts +0 -1
- package/lib/ui/left-panel/core.js +5 -6
- package/lib/ui/left-panel/pdbe-left-panel.d.ts +0 -1
- package/lib/ui/left-panel/tabs.d.ts +1 -1
- package/lib/ui/left-panel/tabs.js +2 -2
- package/lib/ui/overlay.js +3 -4
- package/lib/ui/pdbe-screenshot-controls.js +4 -4
- package/lib/ui/pdbe-structure-controls.js +3 -3
- package/lib/ui/pdbe-viewport-controls.js +1 -1
- package/lib/ui/pdbe-viewport.d.ts +0 -1
- package/lib/ui/pdbe-viewport.js +1 -1
- package/lib/ui/segment-tree.js +40 -45
- package/lib/ui/split-ui/components.d.ts +0 -1
- package/lib/ui/split-ui/split-ui.js +6 -7
- package/lib/ui/superposition-components.js +16 -21
- package/lib/ui/symmetry-annotation-controls.d.ts +4 -4
- package/lib/ui/symmetry-annotation-controls.js +18 -25
- package/lib/viewer.d.ts +24 -2
- package/lib/viewer.js +28 -27
- package/package.json +3 -3
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/** Helper functions to allow showing custom atom interactions */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.loadInteractions_example = loadInteractions_example;
|
|
5
|
+
exports.loadInteractions = loadInteractions;
|
|
6
|
+
exports.clearInteractions = clearInteractions;
|
|
7
|
+
const tslib_1 = require("tslib");
|
|
8
|
+
const primitives_1 = require("molstar/lib/extensions/mvs/components/primitives");
|
|
9
|
+
const mvs_data_1 = require("molstar/lib/extensions/mvs/mvs-data");
|
|
10
|
+
const representation_1 = require("molstar/lib/mol-plugin-state/transforms/representation");
|
|
11
|
+
const state_1 = require("molstar/lib/mol-plugin/behavior/static/state");
|
|
12
|
+
const __1 = require("../..");
|
|
13
|
+
const helpers_1 = require("../../helpers");
|
|
14
|
+
const plugin_custom_state_1 = require("../../plugin-custom-state");
|
|
15
|
+
/** Name used when registering extension, custom state, etc. */
|
|
16
|
+
const InteractionsExtensionName = 'pdbe-custom-interactions';
|
|
17
|
+
const getExtensionCustomState = plugin_custom_state_1.ExtensionCustomState.getter(InteractionsExtensionName);
|
|
18
|
+
const DEFAULT_COLOR = 'white';
|
|
19
|
+
const DEFAULT_RADIUS = 0.075;
|
|
20
|
+
const DEFAULT_DASH_LENGTH = 0.1;
|
|
21
|
+
const DEFAULT_OPACITY = 1;
|
|
22
|
+
function loadInteractions_example(viewer, params) {
|
|
23
|
+
return loadInteractions(viewer, Object.assign(Object.assign({}, params), { interactions: exampleData }));
|
|
24
|
+
}
|
|
25
|
+
/** Show custom atom interactions */
|
|
26
|
+
function loadInteractions(viewer, params) {
|
|
27
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
var _a, _b;
|
|
29
|
+
var _c;
|
|
30
|
+
const structureId = (_a = params.structureId) !== null && _a !== void 0 ? _a : __1.PDBeMolstarPlugin.MAIN_STRUCTURE_ID;
|
|
31
|
+
const struct = viewer.getStructure(structureId);
|
|
32
|
+
if (!struct)
|
|
33
|
+
throw new Error(`Did not find structure with ID "${structureId}"`);
|
|
34
|
+
const primitivesMvsNode = interactionsToMvsPrimitiveData(params);
|
|
35
|
+
const update = viewer.plugin.build();
|
|
36
|
+
const data = update.to(struct.cell).apply(primitives_1.MVSInlinePrimitiveData, { node: primitivesMvsNode }, { tags: ['custom-interactions-data'] });
|
|
37
|
+
data.apply(primitives_1.MVSBuildPrimitiveShape, { kind: 'mesh' }).apply(representation_1.ShapeRepresentation3D, {}, { tags: ['custom-interactions-mesh'] });
|
|
38
|
+
data.apply(primitives_1.MVSBuildPrimitiveShape, { kind: 'lines' }).apply(representation_1.ShapeRepresentation3D, {}, { tags: ['custom-interactions-lines'] });
|
|
39
|
+
data.apply(primitives_1.MVSBuildPrimitiveShape, { kind: 'labels' }).apply(representation_1.ShapeRepresentation3D, {}, { tags: ['custom-interactions-labels'] });
|
|
40
|
+
yield update.commit();
|
|
41
|
+
const visual = {
|
|
42
|
+
ref: data.ref,
|
|
43
|
+
setVisibility: (visible) => (0, state_1.setSubtreeVisibility)(viewer.plugin.state.data, data.ref, !visible /* true means hidden */),
|
|
44
|
+
delete: () => viewer.plugin.build().delete(data.ref).commit(),
|
|
45
|
+
};
|
|
46
|
+
const visualsList = (_b = (_c = getExtensionCustomState(viewer.plugin)).visuals) !== null && _b !== void 0 ? _b : (_c.visuals = []);
|
|
47
|
+
visualsList.push(visual);
|
|
48
|
+
return visual;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/** Remove any previously added interactions */
|
|
52
|
+
function clearInteractions(viewer) {
|
|
53
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
const visuals = getExtensionCustomState(viewer.plugin).visuals;
|
|
55
|
+
if (!visuals)
|
|
56
|
+
return;
|
|
57
|
+
for (const visual of visuals) {
|
|
58
|
+
yield visual.delete();
|
|
59
|
+
}
|
|
60
|
+
visuals.length = 0;
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function interactionsToMvsPrimitiveData(params) {
|
|
64
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
65
|
+
const builder = mvs_data_1.MVSData.createBuilder();
|
|
66
|
+
const primitives = builder.primitives({
|
|
67
|
+
opacity: (_a = params.opacity) !== null && _a !== void 0 ? _a : DEFAULT_OPACITY,
|
|
68
|
+
color: (_b = params.color) !== null && _b !== void 0 ? _b : DEFAULT_COLOR,
|
|
69
|
+
});
|
|
70
|
+
for (const interaction of params.interactions) {
|
|
71
|
+
primitives.tube({
|
|
72
|
+
start: { expressions: (0, helpers_1.queryParamsToMvsComponentExpressions)([interaction.start]) },
|
|
73
|
+
end: { expressions: (0, helpers_1.queryParamsToMvsComponentExpressions)([interaction.end]) },
|
|
74
|
+
radius: (_d = (_c = interaction.radius) !== null && _c !== void 0 ? _c : params.radius) !== null && _d !== void 0 ? _d : DEFAULT_RADIUS,
|
|
75
|
+
dash_length: (_f = (_e = interaction.dash_length) !== null && _e !== void 0 ? _e : params.dash_length) !== null && _f !== void 0 ? _f : DEFAULT_DASH_LENGTH,
|
|
76
|
+
color: interaction.color,
|
|
77
|
+
tooltip: interaction.tooltip,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
const state = builder.getState();
|
|
81
|
+
const primitivesNode = (_g = state.root.children) === null || _g === void 0 ? void 0 : _g.find(child => child.kind === 'primitives');
|
|
82
|
+
if (!primitivesNode)
|
|
83
|
+
throw new Error('AssertionError: Failed to create MVS "primitives" subtree.');
|
|
84
|
+
return primitivesNode;
|
|
85
|
+
}
|
|
86
|
+
/** Selected interactions from https://www.ebi.ac.uk/pdbe/graph-api/pdb/bound_ligand_interactions/1hda/C/143 */
|
|
87
|
+
const exampleData = [
|
|
88
|
+
{
|
|
89
|
+
'start': { 'auth_asym_id': 'C', 'auth_seq_id': 143, 'atoms': ['CBC'] },
|
|
90
|
+
'end': { 'auth_asym_id': 'C', 'auth_seq_id': 32, 'atoms': ['CE'] },
|
|
91
|
+
'color': 'yellow',
|
|
92
|
+
'tooltip': '<strong>Hydrophobic interaction</strong><br>HEM 143 | CBC — MET 32 | CE',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
'start': { 'auth_asym_id': 'C', 'auth_seq_id': 143, 'atoms': ['CBC'] },
|
|
96
|
+
'end': { 'auth_asym_id': 'C', 'auth_seq_id': 32, 'atoms': ['SD'] },
|
|
97
|
+
'color': 'yellow',
|
|
98
|
+
'tooltip': '<strong>Hydrophobic interaction</strong><br>HEM 143 | CBC — MET 32 | SD',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
'start': { 'auth_asym_id': 'C', 'auth_seq_id': 143, 'atoms': ['CMD'] },
|
|
102
|
+
'end': { 'auth_asym_id': 'C', 'auth_seq_id': 42, 'atoms': ['O'] },
|
|
103
|
+
'color': 'gray',
|
|
104
|
+
'tooltip': '<strong>Mixed interaction</strong><br>Vdw, Weak polar<br>HEM 143 | CMD — TYR 42 | O',
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
'start': { 'auth_asym_id': 'C', 'auth_seq_id': 143, 'atoms': ['C1B', 'C2B', 'C3B', 'C4B', 'NB'] },
|
|
108
|
+
'end': { 'auth_asym_id': 'C', 'auth_seq_id': 136, 'atoms': ['CD1'] },
|
|
109
|
+
'color': 'magenta',
|
|
110
|
+
'tooltip': '<strong>CARBONPI interaction</strong><br>HEM 143 | C1B, C2B, C3B, C4B, NB — LEU 136 | CD1',
|
|
111
|
+
},
|
|
112
|
+
];
|
|
@@ -19,7 +19,7 @@ export interface StateGalleryParams {
|
|
|
19
19
|
showTitleBox: boolean;
|
|
20
20
|
}
|
|
21
21
|
/** `StateGallery` extension allows browsing pre-computed 3D states for a PDB entry */
|
|
22
|
-
export declare const StateGallery: import("molstar/lib/mol-state
|
|
22
|
+
export declare const StateGallery: import("molstar/lib/mol-state").StateTransformer<PluginBehavior.Category, PluginBehavior.Behavior, StateGalleryParams>;
|
|
23
23
|
/** Public functions provided by the `StateGallery` extension */
|
|
24
24
|
export declare const StateGalleryExtensionFunctions: {
|
|
25
25
|
StateGalleryManager: typeof StateGalleryManager;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.StateGalleryConfig = exports.StateGalleryConfigDefaults = void 0;
|
|
4
|
+
exports.getStateGalleryConfig = getStateGalleryConfig;
|
|
4
5
|
const config_1 = require("molstar/lib/mol-plugin/config");
|
|
5
6
|
const helpers_1 = require("../../helpers");
|
|
6
7
|
/** Default values of plugin config items for the `StateGallery` extension */
|
|
@@ -28,4 +29,3 @@ exports.StateGalleryConfig = {
|
|
|
28
29
|
function getStateGalleryConfig(plugin) {
|
|
29
30
|
return helpers_1.PluginConfigUtils.getConfigValues(plugin, exports.StateGalleryConfig, exports.StateGalleryConfigDefaults);
|
|
30
31
|
}
|
|
31
|
-
exports.getStateGalleryConfig = getStateGalleryConfig;
|
|
@@ -12,6 +12,7 @@ const helpers_1 = require("../../helpers");
|
|
|
12
12
|
const behavior_1 = require("./behavior");
|
|
13
13
|
const config_1 = require("./config");
|
|
14
14
|
const titles_1 = require("./titles");
|
|
15
|
+
const string_like_1 = require("molstar/lib/mol-io/common/string-like");
|
|
15
16
|
/** Categories of images/states */
|
|
16
17
|
exports.ImageCategory = ['Entry', 'Assemblies', 'Entities', 'Ligands', 'Modified residues', 'Domains', 'Miscellaneous'];
|
|
17
18
|
/** Provides functionality to get list of images (3D states) for an entry, load individual images, keeps track of the currently loaded image.
|
|
@@ -99,8 +100,8 @@ class StateGalleryManager {
|
|
|
99
100
|
}
|
|
100
101
|
/** Request to load an image (3D state). When there are multiple concurrent requests, some requests may be skipped (will resolve to `{ status: 'cancelled' }` or `{ status: 'skipped' }`) as only the last request is really important. */
|
|
101
102
|
load(img) {
|
|
102
|
-
var _a;
|
|
103
103
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
var _a;
|
|
104
105
|
if (typeof img === 'string') {
|
|
105
106
|
img = (_a = this.getImageByFilename(img)) !== null && _a !== void 0 ? _a : { filename: img };
|
|
106
107
|
}
|
|
@@ -151,14 +152,14 @@ class StateGalleryManager {
|
|
|
151
152
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
152
153
|
const url = (0, helpers_1.combineUrl)(this.options.ServerUrl, `${filename}.molj`);
|
|
153
154
|
const data = yield this.plugin.runTask(this.plugin.fetch({ url, type: 'string' }));
|
|
154
|
-
return data;
|
|
155
|
+
return string_like_1.StringLike.toString(data);
|
|
155
156
|
});
|
|
156
157
|
}
|
|
157
158
|
/** Get MOLJ state for the image (get from cache or fetch from API) */
|
|
158
159
|
getSnapshot(filename) {
|
|
159
|
-
var _a;
|
|
160
|
-
var _b;
|
|
161
160
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
161
|
+
var _a;
|
|
162
|
+
var _b;
|
|
162
163
|
return (_a = (_b = this.cache)[filename]) !== null && _a !== void 0 ? _a : (_b[filename] = yield this.fetchSnapshot(filename));
|
|
163
164
|
});
|
|
164
165
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.StateGalleryControls = void 0;
|
|
4
|
+
exports.StateGalleryManagerControls = StateGalleryManagerControls;
|
|
5
|
+
exports.StateGalleryTitleBox = StateGalleryTitleBox;
|
|
4
6
|
const tslib_1 = require("tslib");
|
|
5
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
8
|
const base_1 = require("molstar/lib/mol-plugin-ui/base");
|
|
@@ -69,7 +71,7 @@ class StateGalleryControls extends base_1.CollapsableControls {
|
|
|
69
71
|
}
|
|
70
72
|
renderControls() {
|
|
71
73
|
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: Params, values: this.values, onChangeValues: this.onChangeValues, onEnter: this.load }), (!this.state.manager || this.state.manager.entryId !== this.state.entryId) &&
|
|
72
|
-
(0, jsx_runtime_1.jsx)(common_1.Button,
|
|
74
|
+
(0, jsx_runtime_1.jsx)(common_1.Button, { icon: this.state.isLoading ? undefined : icons_1.CheckSvg, title: 'Load', disabled: this.loadDisabled(), onClick: this.load, className: 'msp-btn-block', children: this.state.isLoading ? 'Loading...' : 'Load' }), this.state.manager &&
|
|
73
75
|
(0, jsx_runtime_1.jsx)(StateGalleryManagerControls, { manager: this.state.manager })] });
|
|
74
76
|
}
|
|
75
77
|
}
|
|
@@ -102,21 +104,20 @@ function StateGalleryManagerControls(props) {
|
|
|
102
104
|
return () => subs.forEach(sub => sub.unsubscribe());
|
|
103
105
|
}, [props.manager]);
|
|
104
106
|
if (nImages === 0) {
|
|
105
|
-
return (0, jsx_runtime_1.jsxs)("div",
|
|
107
|
+
return (0, jsx_runtime_1.jsxs)("div", { style: { margin: 8 }, children: ["No data available for ", props.manager.entryId, "."] });
|
|
106
108
|
}
|
|
107
|
-
return (0, jsx_runtime_1.jsxs)("div",
|
|
109
|
+
return (0, jsx_runtime_1.jsxs)("div", { className: 'pdbemolstar-state-gallery-controls', onKeyDown: handleKeyDown, tabIndex: -1, ref: keyDownTargetRef, children: [(0, jsx_runtime_1.jsx)(common_1.ExpandGroup, { header: 'States', initiallyExpanded: true, children: (0, jsx_runtime_1.jsx)("div", { style: { marginBottom: 8 }, children: categories.groups.map(cat => {
|
|
108
110
|
var _a;
|
|
109
|
-
return (0, jsx_runtime_1.jsx)(common_1.ExpandGroup,
|
|
110
|
-
}) })
|
|
111
|
+
return (0, jsx_runtime_1.jsx)(common_1.ExpandGroup, { header: cat, initiallyExpanded: true, children: (_a = categories.members.get(cat)) === null || _a === void 0 ? void 0 : _a.map(img => (0, jsx_runtime_1.jsx)(ImageButton, { img: img, isSelected: img === selected, status: status, onClick: () => props.manager.load(img) }, img.filename)) }, cat);
|
|
112
|
+
}) }) }, 'states'), (0, jsx_runtime_1.jsx)(common_1.ExpandGroup, { header: 'Description', initiallyExpanded: true, children: (0, jsx_runtime_1.jsx)("div", { className: 'pdbemolstar-state-gallery-legend', children: (0, jsx_runtime_1.jsx)("div", { dangerouslySetInnerHTML: { __html: (_a = selected === null || selected === void 0 ? void 0 : selected.description) !== null && _a !== void 0 ? _a : '' } }) }) }, 'description')] });
|
|
111
113
|
}
|
|
112
|
-
exports.StateGalleryManagerControls = StateGalleryManagerControls;
|
|
113
114
|
/** Button with image title */
|
|
114
115
|
function ImageButton(props) {
|
|
115
116
|
var _a;
|
|
116
117
|
const { img, isSelected, status, onClick } = props;
|
|
117
118
|
const icon = !isSelected ? icons_2.EmptyIconSvg : (status === 'loading') ? icons_2.HourglassBottomSvg : (status === 'error') ? icons_1.ErrorSvg : icons_1.CheckSvg;
|
|
118
119
|
const tooltip = imageTooltip(img, isSelected ? status : 'ready');
|
|
119
|
-
return (0, jsx_runtime_1.jsxs)(common_1.Button,
|
|
120
|
+
return (0, jsx_runtime_1.jsxs)(common_1.Button, { className: 'msp-action-menu-button pdbemolstar-state-gallery-state-button', icon: icon, onClick: onClick, title: tooltip, style: { fontWeight: isSelected ? 'bold' : undefined }, children: [(_a = img.title) !== null && _a !== void 0 ? _a : img.filename, img.subtitle && (0, jsx_runtime_1.jsxs)("small", { children: ["\u2002 ", img.subtitle] })] });
|
|
120
121
|
}
|
|
121
122
|
/** Box in viewport with image title and arrows to move between images (3D states) */
|
|
122
123
|
function StateGalleryTitleBox() {
|
|
@@ -147,11 +148,10 @@ function StateGalleryTitleBox() {
|
|
|
147
148
|
}, [plugin]);
|
|
148
149
|
if (image === undefined)
|
|
149
150
|
return null;
|
|
150
|
-
return (0, jsx_runtime_1.jsxs)("div",
|
|
151
|
-
(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(common_1.Button, { className: 'msp-btn-icon', title: 'Previous state', icon: icons_2.ChevronLeftSvg, onClick: () => manager.loadPrevious() }) }), (0, jsx_runtime_1.jsxs)("div",
|
|
152
|
-
(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(common_1.Button, { className: 'msp-btn-icon', title: 'Next state', icon: icons_2.ChevronRightSvg, onClick: () => manager === null || manager === void 0 ? void 0 : manager.loadNext() }) })] })
|
|
151
|
+
return (0, jsx_runtime_1.jsxs)("div", { className: 'pdbemolstar-state-gallery-title-box', children: [manager &&
|
|
152
|
+
(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(common_1.Button, { className: 'msp-btn-icon', title: 'Previous state', icon: icons_2.ChevronLeftSvg, onClick: () => manager.loadPrevious() }) }), (0, jsx_runtime_1.jsxs)("div", { className: 'pdbemolstar-state-gallery-title', title: imageTooltip(image, status), children: [(0, jsx_runtime_1.jsx)("div", { className: 'pdbemolstar-state-gallery-title-icon', children: (0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: status === 'error' ? icons_1.ErrorSvg : status === 'loading' ? icons_2.HourglassBottomSvg : icons_2.EmptyIconSvg }) }), (0, jsx_runtime_1.jsxs)("div", { className: 'pdbemolstar-state-gallery-title-text', children: [(_a = image.title) !== null && _a !== void 0 ? _a : image.filename, (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("small", { children: image.subtitle })] })] }), manager &&
|
|
153
|
+
(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(common_1.Button, { className: 'msp-btn-icon', title: 'Next state', icon: icons_2.ChevronRightSvg, onClick: () => manager === null || manager === void 0 ? void 0 : manager.loadNext() }) })] });
|
|
153
154
|
}
|
|
154
|
-
exports.StateGalleryTitleBox = StateGalleryTitleBox;
|
|
155
155
|
/** Return tooltip text for an image */
|
|
156
156
|
function imageTooltip(img, status) {
|
|
157
157
|
var _a;
|
package/lib/helpers.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ComponentExpressionT } from 'molstar/lib/extensions/mvs/tree/mvs/param-types';
|
|
1
2
|
import { Model, Structure } from 'molstar/lib/mol-model/structure';
|
|
2
3
|
import { BuiltInTrajectoryFormat } from 'molstar/lib/mol-plugin-state/formats/trajectory';
|
|
3
4
|
import { StructureRef } from 'molstar/lib/mol-plugin-state/manager/structure/hierarchy-state';
|
|
@@ -76,7 +77,9 @@ export interface QueryParam {
|
|
|
76
77
|
representationColor?: any;
|
|
77
78
|
focus?: boolean;
|
|
78
79
|
tooltip?: string;
|
|
80
|
+
/** @deprecated I don't know what this is */
|
|
79
81
|
start?: any;
|
|
82
|
+
/** @deprecated I don't know what this is */
|
|
80
83
|
end?: any;
|
|
81
84
|
atom_id?: number[];
|
|
82
85
|
uniprot_accession?: string;
|
|
@@ -84,6 +87,7 @@ export interface QueryParam {
|
|
|
84
87
|
start_uniprot_residue_number?: number;
|
|
85
88
|
end_uniprot_residue_number?: number;
|
|
86
89
|
}
|
|
90
|
+
export declare function queryParamsToMvsComponentExpressions(params: QueryParam[]): ComponentExpressionT[];
|
|
87
91
|
export declare namespace QueryHelper {
|
|
88
92
|
function getQueryObject(params: QueryParam[], contextData: Structure): Expression;
|
|
89
93
|
function getInteractivityLoci(params: QueryParam[], contextData: Structure): import("molstar/lib/mol-model/structure/structure/element/loci").Loci;
|
package/lib/helpers.js
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PluginConfigUtils = exports.PreemptiveQueue = exports.
|
|
3
|
+
exports.PluginConfigUtils = exports.PreemptiveQueue = exports.StructureComponentTags = exports.Tags = exports.ModelInfo = exports.QueryHelper = exports.LigandView = exports.AlphafoldView = exports.PDBeVolumes = void 0;
|
|
4
|
+
exports.queryParamsToMvsComponentExpressions = queryParamsToMvsComponentExpressions;
|
|
5
|
+
exports.runWithProgressMessage = runWithProgressMessage;
|
|
6
|
+
exports.getStructureUrl = getStructureUrl;
|
|
7
|
+
exports.combineUrl = combineUrl;
|
|
8
|
+
exports.addDefaults = addDefaults;
|
|
9
|
+
exports.normalizeColor = normalizeColor;
|
|
10
|
+
exports.applyOverpaint = applyOverpaint;
|
|
11
|
+
exports.getComponentTypeFromTags = getComponentTypeFromTags;
|
|
12
|
+
exports.distinct = distinct;
|
|
13
|
+
exports.groupElements = groupElements;
|
|
14
|
+
exports.createIndex = createIndex;
|
|
15
|
+
exports.nonnegativeModulo = nonnegativeModulo;
|
|
4
16
|
const tslib_1 = require("tslib");
|
|
5
17
|
const prop_1 = require("molstar/lib/extensions/model-archive/quality-assessment/prop");
|
|
6
18
|
const structure_1 = require("molstar/lib/mol-model/structure");
|
|
@@ -50,7 +62,7 @@ var PDBeVolumes;
|
|
|
50
62
|
}
|
|
51
63
|
}
|
|
52
64
|
PDBeVolumes.toggle = toggle;
|
|
53
|
-
})(PDBeVolumes
|
|
65
|
+
})(PDBeVolumes || (exports.PDBeVolumes = PDBeVolumes = {}));
|
|
54
66
|
var AlphafoldView;
|
|
55
67
|
(function (AlphafoldView) {
|
|
56
68
|
function getLociByPLDDT(score, contextData) {
|
|
@@ -69,7 +81,7 @@ var AlphafoldView;
|
|
|
69
81
|
return structure_1.StructureSelection.toLociWithSourceUnits(sel);
|
|
70
82
|
}
|
|
71
83
|
AlphafoldView.getLociByPLDDT = getLociByPLDDT;
|
|
72
|
-
})(AlphafoldView
|
|
84
|
+
})(AlphafoldView || (exports.AlphafoldView = AlphafoldView = {}));
|
|
73
85
|
var LigandView;
|
|
74
86
|
(function (LigandView) {
|
|
75
87
|
function query(ligandViewParams) {
|
|
@@ -134,7 +146,53 @@ var LigandView;
|
|
|
134
146
|
};
|
|
135
147
|
}
|
|
136
148
|
LigandView.branchedQuery = branchedQuery;
|
|
137
|
-
})(LigandView
|
|
149
|
+
})(LigandView || (exports.LigandView = LigandView = {}));
|
|
150
|
+
function queryParamsToMvsComponentExpressions(params) {
|
|
151
|
+
const broadcasted = broadcast(params, ['atoms', 'atom_id']);
|
|
152
|
+
return broadcasted.map(item => {
|
|
153
|
+
var _a;
|
|
154
|
+
return ({
|
|
155
|
+
label_entity_id: item.entity_id,
|
|
156
|
+
label_asym_id: item.struct_asym_id,
|
|
157
|
+
auth_asym_id: item.auth_asym_id,
|
|
158
|
+
label_seq_id: item.residue_number,
|
|
159
|
+
auth_seq_id: (_a = item.auth_seq_id) !== null && _a !== void 0 ? _a : item.auth_residue_number,
|
|
160
|
+
pdbx_PDB_ins_code: item.auth_ins_code_id,
|
|
161
|
+
beg_label_seq_id: item.start_residue_number,
|
|
162
|
+
end_label_seq_id: item.end_residue_number,
|
|
163
|
+
beg_auth_seq_id: item.start_auth_residue_number,
|
|
164
|
+
end_auth_seq_id: item.end_auth_residue_number,
|
|
165
|
+
label_atom_id: item.atoms,
|
|
166
|
+
auth_atom_id: undefined,
|
|
167
|
+
type_symbol: undefined,
|
|
168
|
+
atom_id: item.atom_id,
|
|
169
|
+
atom_index: undefined,
|
|
170
|
+
label_comp_id: item.label_comp_id,
|
|
171
|
+
auth_comp_id: undefined,
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
/** `broadcastSingleKey([{chain: 'A', residue: 5, atom: ['C', 'O']}], 'atom')`
|
|
176
|
+
* -> `[{chain: 'A', residue: 5, atom: 'C'}], {chain: 'A', residue: 5, atom: 'O'}` */
|
|
177
|
+
function broadcastSingleKey(objs, key) {
|
|
178
|
+
const out = [];
|
|
179
|
+
for (const obj of objs) {
|
|
180
|
+
if (obj[key] === undefined) {
|
|
181
|
+
out.push(obj);
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
for (const value of obj[key]) {
|
|
185
|
+
out.push(Object.assign(Object.assign({}, obj), { [key]: value }));
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return out;
|
|
190
|
+
}
|
|
191
|
+
/** `broadcast([{chain: 'A', residue: [5, 6], atom: ['C', 'O']}], ['residue', 'atom'])`
|
|
192
|
+
* -> `[{chain: 'A', residue: 5, atom: 'C'}], {chain: 'A', residue: 5, atom: 'O', {chain: 'A', residue: 6, atom: 'C'}], {chain: 'A', residue: 6, atom: 'O'}` */
|
|
193
|
+
function broadcast(objs, keys) {
|
|
194
|
+
return keys.reduce((list, key) => broadcastSingleKey(list, key), objs);
|
|
195
|
+
}
|
|
138
196
|
var QueryHelper;
|
|
139
197
|
(function (QueryHelper) {
|
|
140
198
|
function getQueryObject(params, contextData) {
|
|
@@ -154,6 +212,7 @@ var QueryHelper;
|
|
|
154
212
|
selection['chainTest'] = l => structure_1.StructureProperties.chain.auth_asym_id(l.element) === param.auth_asym_id;
|
|
155
213
|
}
|
|
156
214
|
// residues
|
|
215
|
+
// TODO implement AND-logic here (now { residue_number: 50, label_comp_id: 'PHE' } selects all PHE)
|
|
157
216
|
if (param.label_comp_id) {
|
|
158
217
|
selection['residueTest'] = l => structure_1.StructureProperties.atom.label_comp_id(l.element) === param.label_comp_id;
|
|
159
218
|
}
|
|
@@ -197,6 +256,7 @@ var QueryHelper;
|
|
|
197
256
|
}
|
|
198
257
|
else if (param.auth_residue_number !== undefined && param.auth_ins_code_id) {
|
|
199
258
|
selection['residueTest'] = l => structure_1.StructureProperties.residue.auth_seq_id(l.element) === param.auth_residue_number;
|
|
259
|
+
// TODO really check ins code, same for auth_seq_id, start_auth_ins_code_id, end_auth_ins_code_id
|
|
200
260
|
}
|
|
201
261
|
else if (param.start_auth_residue_number !== undefined && param.end_auth_residue_number !== undefined && param.end_auth_residue_number > param.start_auth_residue_number) {
|
|
202
262
|
selection['residueTest'] = l => {
|
|
@@ -234,7 +294,7 @@ var QueryHelper;
|
|
|
234
294
|
return structure_1.StructureSelection.toLociWithSourceUnits(sel);
|
|
235
295
|
}
|
|
236
296
|
QueryHelper.getHetLoci = getHetLoci;
|
|
237
|
-
})(QueryHelper
|
|
297
|
+
})(QueryHelper || (exports.QueryHelper = QueryHelper = {}));
|
|
238
298
|
var ModelInfo;
|
|
239
299
|
(function (ModelInfo) {
|
|
240
300
|
function get(model, structures) {
|
|
@@ -267,7 +327,7 @@ var ModelInfo;
|
|
|
267
327
|
});
|
|
268
328
|
}
|
|
269
329
|
ModelInfo.get = get;
|
|
270
|
-
})(ModelInfo
|
|
330
|
+
})(ModelInfo || (exports.ModelInfo = ModelInfo = {}));
|
|
271
331
|
/** Run `action` with showing a message in the bottom-left corner of the plugin UI */
|
|
272
332
|
function runWithProgressMessage(plugin, progressMessage, action) {
|
|
273
333
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
@@ -287,7 +347,6 @@ function runWithProgressMessage(plugin, progressMessage, action) {
|
|
|
287
347
|
yield plugin.runTask(task);
|
|
288
348
|
});
|
|
289
349
|
}
|
|
290
|
-
exports.runWithProgressMessage = runWithProgressMessage;
|
|
291
350
|
/** Return URL for a ModelServer request.
|
|
292
351
|
* If `queryType` is 'full' and `lowPrecisionCoords` is false, return URL of the static file instead (updated mmCIF or bCIF). */
|
|
293
352
|
function getStructureUrl(initParams, request) {
|
|
@@ -304,7 +363,6 @@ function getStructureUrl(initParams, request) {
|
|
|
304
363
|
return (queryString !== '') ? `${url}?${queryString}` : url;
|
|
305
364
|
}
|
|
306
365
|
}
|
|
307
|
-
exports.getStructureUrl = getStructureUrl;
|
|
308
366
|
/** Combine URL parts into one URL while avoiding double slashes. Examples:
|
|
309
367
|
* combineUrl('https://example.org', '1tqn') -> 'https://example.org/1tqn';
|
|
310
368
|
* combineUrl('https://example.org/', '1tqn') -> 'https://example.org/1tqn'; */
|
|
@@ -315,7 +373,6 @@ function combineUrl(firstPart, ...moreParts) {
|
|
|
315
373
|
}
|
|
316
374
|
return result;
|
|
317
375
|
}
|
|
318
|
-
exports.combineUrl = combineUrl;
|
|
319
376
|
/** Create a copy of object `object`, fill in missing/undefined keys using `defaults`.
|
|
320
377
|
* This is similar to {...defaults,...object} but `undefined` in `object` will not override a value from `defaults`. */
|
|
321
378
|
function addDefaults(object, defaults) {
|
|
@@ -326,7 +383,6 @@ function addDefaults(object, defaults) {
|
|
|
326
383
|
}
|
|
327
384
|
return result;
|
|
328
385
|
}
|
|
329
|
-
exports.addDefaults = addDefaults;
|
|
330
386
|
/** Convert `colorVal` from any of supported color formats (e.g. 'yellow', '#ffff00', {r:255,g:255,b:0}) to `Color`.
|
|
331
387
|
* Return default color (gray) if `colorVal` is undefined or null.
|
|
332
388
|
*/
|
|
@@ -349,12 +405,11 @@ function normalizeColor(colorVal, defaultColor = color_1.Color.fromRgb(170, 170,
|
|
|
349
405
|
}
|
|
350
406
|
return defaultColor;
|
|
351
407
|
}
|
|
352
|
-
exports.normalizeColor = normalizeColor;
|
|
353
408
|
/** Apply overpaint to every representation of every component in a structure.
|
|
354
409
|
* Excludes representations created as "added representations" by `PDBeMolstarPlugin.visual.select`. */
|
|
355
410
|
function applyOverpaint(plugin, structRef, overpaintLayers) {
|
|
356
|
-
var _a;
|
|
357
411
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
412
|
+
var _a;
|
|
358
413
|
if (overpaintLayers.length === 0)
|
|
359
414
|
return;
|
|
360
415
|
const update = plugin.build();
|
|
@@ -378,7 +433,6 @@ function applyOverpaint(plugin, structRef, overpaintLayers) {
|
|
|
378
433
|
yield update.commit();
|
|
379
434
|
});
|
|
380
435
|
}
|
|
381
|
-
exports.applyOverpaint = applyOverpaint;
|
|
382
436
|
exports.Tags = {
|
|
383
437
|
/** Tag needed for `clearStructureOverpaint`; defined in src/mol-plugin-state/helpers/structure-overpaint.ts but private */
|
|
384
438
|
Overpaint: 'overpaint-controls',
|
|
@@ -405,7 +459,6 @@ function getComponentTypeFromTags(tags) {
|
|
|
405
459
|
}
|
|
406
460
|
return undefined;
|
|
407
461
|
}
|
|
408
|
-
exports.getComponentTypeFromTags = getComponentTypeFromTags;
|
|
409
462
|
/** Return a new array containing `values` without duplicates (only first occurrence will be kept).
|
|
410
463
|
* Values v1, v2 are considered duplicates when `key(v1)===key(v2)`. */
|
|
411
464
|
function distinct(values, key = (value => value)) {
|
|
@@ -420,7 +473,6 @@ function distinct(values, key = (value => value)) {
|
|
|
420
473
|
}
|
|
421
474
|
return out;
|
|
422
475
|
}
|
|
423
|
-
exports.distinct = distinct;
|
|
424
476
|
/** Group elements by result of `groupFunction` applied to them */
|
|
425
477
|
function groupElements(elements, groupFunction) {
|
|
426
478
|
const groups = [];
|
|
@@ -442,20 +494,17 @@ function groupElements(elements, groupFunction) {
|
|
|
442
494
|
members,
|
|
443
495
|
};
|
|
444
496
|
}
|
|
445
|
-
exports.groupElements = groupElements;
|
|
446
497
|
/** Return a mapping of elements to their index in the `elements` array */
|
|
447
498
|
function createIndex(elements) {
|
|
448
499
|
const index = new Map();
|
|
449
500
|
elements.forEach((elem, i) => index.set(elem, i));
|
|
450
501
|
return index;
|
|
451
502
|
}
|
|
452
|
-
exports.createIndex = createIndex;
|
|
453
503
|
/** Return modulo of two numbers (a % b) within range [0, b) */
|
|
454
504
|
function nonnegativeModulo(a, b) {
|
|
455
505
|
const modulo = a % b;
|
|
456
506
|
return (modulo < 0) ? modulo + b : modulo;
|
|
457
507
|
}
|
|
458
|
-
exports.nonnegativeModulo = nonnegativeModulo;
|
|
459
508
|
/** Queue for running jobs where enqueued jobs get discarded when a new job is enqueued.
|
|
460
509
|
* (Discarded jobs may or may not actually be executed, but their result is not accessible anyway.) */
|
|
461
510
|
class PreemptiveQueue {
|
|
@@ -520,4 +569,4 @@ var PluginConfigUtils;
|
|
|
520
569
|
return values;
|
|
521
570
|
}
|
|
522
571
|
PluginConfigUtils.getConfigValues = getConfigValues;
|
|
523
|
-
})(PluginConfigUtils
|
|
572
|
+
})(PluginConfigUtils || (exports.PluginConfigUtils = PluginConfigUtils = {}));
|
package/lib/labels.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { PluginBehavior } from 'molstar/lib/mol-plugin/behavior';
|
|
2
|
-
export declare const PDBeLociLabelProvider: import("molstar/lib/mol-state
|
|
2
|
+
export declare const PDBeLociLabelProvider: import("molstar/lib/mol-state").StateTransformer<PluginBehavior.Category, PluginBehavior.Behavior, {}>;
|
package/lib/loci-details.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.lociDetails = lociDetails;
|
|
4
|
+
exports.bondLabel = bondLabel;
|
|
5
|
+
exports._bundleLabel = _bundleLabel;
|
|
4
6
|
const int_1 = require("molstar/lib/mol-data/int");
|
|
5
7
|
const sifts_mapping_1 = require("molstar/lib/mol-model-props/sequence/sifts-mapping");
|
|
6
8
|
const structure_1 = require("molstar/lib/mol-model/structure");
|
|
@@ -12,13 +14,12 @@ function lociDetails(loci) {
|
|
|
12
14
|
return structureElementStatsDetail(structure_1.StructureElement.Stats.ofLoci(loci));
|
|
13
15
|
case 'bond-loci': {
|
|
14
16
|
const bond = loci.bonds[0];
|
|
15
|
-
return bond ? bondLabel(bond, 'element') :
|
|
17
|
+
return bond ? bondLabel(bond, 'element') : {};
|
|
16
18
|
}
|
|
17
19
|
default:
|
|
18
20
|
return undefined;
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
|
-
exports.lociDetails = lociDetails;
|
|
22
23
|
function structureElementStatsDetail(stats) {
|
|
23
24
|
const { chainCount, residueCount, elementCount } = stats;
|
|
24
25
|
if (elementCount === 1 && residueCount === 0 && chainCount === 0) {
|
|
@@ -100,7 +101,6 @@ function bondLabel(bond, granularity) {
|
|
|
100
101
|
],
|
|
101
102
|
}, granularity);
|
|
102
103
|
}
|
|
103
|
-
exports.bondLabel = bondLabel;
|
|
104
104
|
function _bundleLabel(bundle, granularity) {
|
|
105
105
|
let isSingleElements = true;
|
|
106
106
|
for (const l of bundle.loci) {
|
|
@@ -125,4 +125,3 @@ function _bundleLabel(bundle, granularity) {
|
|
|
125
125
|
return elementDetails;
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
exports._bundleLabel = _bundleLabel;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PluginCustomControls = exports.ExtensionCustomState =
|
|
3
|
+
exports.PluginCustomControls = exports.ExtensionCustomState = void 0;
|
|
4
|
+
exports.PluginCustomState = PluginCustomState;
|
|
4
5
|
;
|
|
5
6
|
;
|
|
6
7
|
/** Access `plugin.customState` only through this function to get proper typing.
|
|
@@ -9,7 +10,6 @@ function PluginCustomState(plugin) {
|
|
|
9
10
|
var _a;
|
|
10
11
|
return (_a = plugin.customState) !== null && _a !== void 0 ? _a : (plugin.customState = {});
|
|
11
12
|
}
|
|
12
|
-
exports.PluginCustomState = PluginCustomState;
|
|
13
13
|
/** Functions for accessing plugin-bound custom state for extensions. */
|
|
14
14
|
exports.ExtensionCustomState = {
|
|
15
15
|
/** Get plugin-bound custom state for a specific extension. If not present, initialize with empty object. */
|
package/lib/sifts-mapping.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PluginBehavior } from 'molstar/lib/mol-plugin/behavior';
|
|
2
|
-
export declare const PDBeSIFTSMapping: import("molstar/lib/mol-state
|
|
2
|
+
export declare const PDBeSIFTSMapping: import("molstar/lib/mol-state").StateTransformer<PluginBehavior.Category, PluginBehavior.Behavior, {
|
|
3
3
|
autoAttach: boolean;
|
|
4
4
|
showTooltip: boolean;
|
|
5
5
|
}>;
|
package/lib/spec-from-html.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.initParamsFromHtmlAttributes =
|
|
3
|
+
exports.initParamsFromHtmlAttributes = initParamsFromHtmlAttributes;
|
|
4
4
|
const spec_1 = require("./spec");
|
|
5
5
|
/** Extract InitParams from attributes of an HTML element */
|
|
6
6
|
function initParamsFromHtmlAttributes(element) {
|
|
@@ -10,7 +10,6 @@ function initParamsFromHtmlAttributes(element) {
|
|
|
10
10
|
console.error('Invalid PDBeMolstarPlugin options:', params);
|
|
11
11
|
return params;
|
|
12
12
|
}
|
|
13
|
-
exports.initParamsFromHtmlAttributes = initParamsFromHtmlAttributes;
|
|
14
13
|
/** Actions for loading individual HTML attributes into InitParams object */
|
|
15
14
|
const InitParamsLoadingActions = {
|
|
16
15
|
// DATA
|
package/lib/spec.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.DefaultParams = exports.Encoding = exports.VisualStyle = exports.ComponentType = exports.Lighting = exports.Preset = exports.DefaultPluginUISpec = exports.DefaultPluginSpec = void 0;
|
|
4
|
+
exports.resolveVisualStyleSpec = resolveVisualStyleSpec;
|
|
5
|
+
exports.validateInitParams = validateInitParams;
|
|
4
6
|
const actions_1 = require("molstar/lib/mol-plugin-state/actions");
|
|
5
7
|
const volume_1 = require("molstar/lib/mol-plugin-ui/custom/volume");
|
|
6
8
|
const behavior_1 = require("molstar/lib/mol-plugin/behavior");
|
|
@@ -56,7 +58,6 @@ function resolveVisualStyleSpec(spec) {
|
|
|
56
58
|
}
|
|
57
59
|
return Object.fromEntries(Object.entries(spec).map(([type, compSpec]) => [type, resolveComponentVisualStyleSpec(compSpec)]));
|
|
58
60
|
}
|
|
59
|
-
exports.resolveVisualStyleSpec = resolveVisualStyleSpec;
|
|
60
61
|
function resolveComponentVisualStyleSpec(spec) {
|
|
61
62
|
if (spec === undefined)
|
|
62
63
|
return undefined;
|
|
@@ -125,4 +126,3 @@ function validateInitParams(params) {
|
|
|
125
126
|
}
|
|
126
127
|
return undefined;
|
|
127
128
|
}
|
|
128
|
-
exports.validateInitParams = validateInitParams;
|
package/lib/subscribe-events.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.subscribeToComponentEvents =
|
|
3
|
+
exports.subscribeToComponentEvents = subscribeToComponentEvents;
|
|
4
4
|
function subscribeToComponentEvents(wrapperCtx) {
|
|
5
5
|
document.addEventListener('PDB.interactions.click', function (e) {
|
|
6
6
|
if (typeof e.detail !== 'undefined') {
|
|
@@ -191,4 +191,3 @@ function subscribeToComponentEvents(wrapperCtx) {
|
|
|
191
191
|
wrapperCtx.visual.clearHighlight();
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
|
-
exports.subscribeToComponentEvents = subscribeToComponentEvents;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.superpositionExportHierarchy =
|
|
3
|
+
exports.superpositionExportHierarchy = superpositionExportHierarchy;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const utf8_1 = require("molstar/lib/mol-io/common/utf8");
|
|
6
6
|
const structure_1 = require("molstar/lib/mol-model/structure");
|
|
@@ -21,7 +21,6 @@ function superpositionExportHierarchy(plugin, options) {
|
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
exports.superpositionExportHierarchy = superpositionExportHierarchy;
|
|
25
24
|
function _superpositionExportHierarchy(plugin, options) {
|
|
26
25
|
return mol_task_1.Task.create('Export', (ctx) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
27
26
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|