pdbe-molstar 3.2.1-beta.1 → 3.2.1-beta.3
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/README.md +1 -1
- 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 +1 -1
- package/build/pdbe-molstar.css +2 -2
- package/lib/alphafold-transparency.d.ts +3 -3
- package/lib/alphafold-transparency.js +10 -11
- package/lib/custom-events.d.ts +1 -1
- package/lib/custom-events.js +1 -1
- package/lib/domain-annotations/behavior.d.ts +1 -1
- package/lib/domain-annotations/behavior.js +3 -3
- package/lib/domain-annotations/color.d.ts +3 -3
- package/lib/domain-annotations/color.js +4 -4
- package/lib/domain-annotations/prop.d.ts +6 -6
- package/lib/domain-annotations/prop.js +7 -7
- package/lib/extensions/foldseek.d.ts +1 -1
- package/lib/extensions/foldseek.js +2 -2
- package/lib/helpers.d.ts +20 -13
- package/lib/helpers.js +49 -11
- package/lib/index(light).d.ts +4 -179
- package/lib/index(light).js +6 -1234
- package/lib/index.d.ts +4 -179
- package/lib/index.js +6 -1234
- package/lib/labels.d.ts +1 -1
- package/lib/labels.js +3 -3
- package/lib/loci-details.d.ts +2 -2
- package/lib/loci-details.js +3 -3
- package/lib/plugin-custom-state.d.ts +6 -9
- package/lib/sifts-mapping.d.ts +3 -3
- package/lib/sifts-mapping.js +4 -4
- package/lib/sifts-mappings-behaviour.d.ts +1 -1
- package/lib/sifts-mappings-behaviour.js +10 -10
- package/lib/spec.d.ts +36 -11
- package/lib/spec.js +38 -7
- package/lib/{overlay.scss → styles/index.scss} +11 -0
- package/lib/superposition-export.d.ts +1 -1
- package/lib/superposition-export.js +7 -7
- package/lib/superposition-focus-representation.d.ts +3 -3
- package/lib/superposition-focus-representation.js +8 -8
- package/lib/superposition-sifts-mapping.d.ts +5 -5
- package/lib/superposition-sifts-mapping.js +3 -3
- package/lib/superposition.d.ts +7 -4
- package/lib/superposition.js +147 -184
- package/lib/ui/alphafold-superposition.d.ts +4 -4
- package/lib/ui/alphafold-superposition.js +8 -8
- package/lib/ui/alphafold-tranparency.d.ts +2 -2
- package/lib/ui/alphafold-tranparency.js +4 -4
- package/lib/ui/annotation-controls.d.ts +1 -1
- package/lib/ui/annotation-controls.js +7 -7
- package/lib/ui/annotation-row-controls.d.ts +2 -2
- package/lib/ui/annotation-row-controls.js +3 -3
- package/lib/ui/export-superposition.d.ts +1 -1
- package/lib/ui/export-superposition.js +9 -9
- package/lib/ui/pdbe-left-panel.d.ts +8 -8
- package/lib/ui/pdbe-left-panel.js +26 -47
- package/lib/ui/pdbe-screenshot-controls.d.ts +2 -2
- package/lib/ui/pdbe-screenshot-controls.js +7 -7
- package/lib/ui/pdbe-structure-controls.d.ts +1 -1
- package/lib/ui/pdbe-structure-controls.js +8 -8
- package/lib/ui/pdbe-viewport-controls.d.ts +1 -1
- package/lib/ui/pdbe-viewport-controls.js +4 -2
- package/lib/ui/segment-tree.d.ts +4 -4
- package/lib/ui/segment-tree.js +12 -32
- package/lib/ui/superposition-components.d.ts +1 -1
- package/lib/ui/superposition-components.js +8 -8
- package/lib/ui/superposition-viewport.d.ts +1 -1
- package/lib/ui/superposition-viewport.js +5 -5
- package/lib/ui/symmetry-annotation-controls.d.ts +6 -6
- package/lib/ui/symmetry-annotation-controls.js +6 -6
- package/lib/viewer.d.ts +178 -0
- package/lib/viewer.js +1286 -0
- package/package.json +4 -4
package/lib/labels.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PluginBehavior } from '
|
|
1
|
+
import { PluginBehavior } from 'molstar/lib/mol-plugin/behavior';
|
|
2
2
|
export declare const PDBeLociLabelProvider: import("molstar/lib/mol-state/transformer").StateTransformer<PluginBehavior.Category, PluginBehavior.Behavior, {}>;
|
package/lib/labels.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PDBeLociLabelProvider = void 0;
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var label_1 = require("
|
|
4
|
+
var structure_1 = require("molstar/lib/mol-model/structure");
|
|
5
|
+
var behavior_1 = require("molstar/lib/mol-plugin/behavior");
|
|
6
|
+
var label_1 = require("molstar/lib/mol-theme/label");
|
|
7
7
|
var plugin_custom_state_1 = require("./plugin-custom-state");
|
|
8
8
|
exports.PDBeLociLabelProvider = behavior_1.PluginBehavior.create({
|
|
9
9
|
name: 'pdbe-loci-label-provider',
|
package/lib/loci-details.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Loci } from 'molstar/lib/mol-model/loci';
|
|
2
|
+
import { Bond } from 'molstar/lib/mol-model/structure';
|
|
3
3
|
export type EventDetail = {
|
|
4
4
|
models?: string[];
|
|
5
5
|
entity_id?: string;
|
package/lib/loci-details.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports._bundleLabel = exports.bondLabel = exports.lociDetails = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
5
|
+
var int_1 = require("molstar/lib/mol-data/int");
|
|
6
|
+
var sifts_mapping_1 = require("molstar/lib/mol-model-props/sequence/sifts-mapping");
|
|
7
|
+
var structure_1 = require("molstar/lib/mol-model/structure");
|
|
8
8
|
function lociDetails(loci) {
|
|
9
9
|
switch (loci.kind) {
|
|
10
10
|
case 'structure-loci':
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SymmetryOperator } from '
|
|
2
|
-
import { Mat4 } from '
|
|
3
|
-
import { PluginContext } from '
|
|
4
|
-
import { StateSelection, StateTransform } from '
|
|
1
|
+
import { SymmetryOperator } from 'molstar/lib/mol-math/geometry';
|
|
2
|
+
import { Mat4 } from 'molstar/lib/mol-math/linear-algebra';
|
|
3
|
+
import { PluginContext } from 'molstar/lib/mol-plugin/context';
|
|
4
|
+
import { StateSelection, StateTransform } from 'molstar/lib/mol-state';
|
|
5
5
|
import { Subject } from 'rxjs';
|
|
6
6
|
import { InitParams } from './spec';
|
|
7
7
|
export interface PluginCustomState {
|
|
@@ -35,11 +35,8 @@ export interface PluginCustomState {
|
|
|
35
35
|
hets: {
|
|
36
36
|
[key: string]: unknown[];
|
|
37
37
|
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
palleteIndex: number;
|
|
41
|
-
colorIndex: number;
|
|
42
|
-
}[];
|
|
38
|
+
/** Counts how many colors have been assigned, per segment */
|
|
39
|
+
colorCounters: number[];
|
|
43
40
|
alphafold: {
|
|
44
41
|
apiData: {
|
|
45
42
|
cif: string;
|
package/lib/sifts-mapping.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { CustomModelProperty } from 'molstar/lib/mol-model-props/common/custom-model-property';
|
|
2
|
+
import { Model } from 'molstar/lib/mol-model/structure';
|
|
3
|
+
import { StructureElement } from 'molstar/lib/mol-model/structure/structure';
|
|
4
4
|
export { SIFTSMapping as SIFTSMapping };
|
|
5
5
|
export interface SIFTSMappingMapping {
|
|
6
6
|
readonly dbName: string[];
|
package/lib/sifts-mapping.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SIFTSMapping = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
|
-
var db_1 = require("
|
|
6
|
-
var mmcif_1 = require("
|
|
7
|
-
var
|
|
8
|
-
var
|
|
5
|
+
var db_1 = require("molstar/lib/mol-data/db");
|
|
6
|
+
var mmcif_1 = require("molstar/lib/mol-model-formats/structure/mmcif");
|
|
7
|
+
var custom_model_property_1 = require("molstar/lib/mol-model-props/common/custom-model-property");
|
|
8
|
+
var custom_property_1 = require("molstar/lib/mol-model/custom-property");
|
|
9
9
|
var SIFTSMapping;
|
|
10
10
|
(function (SIFTSMapping) {
|
|
11
11
|
var _this = this;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PluginBehavior } from '
|
|
1
|
+
import { PluginBehavior } from 'molstar/lib/mol-plugin/behavior';
|
|
2
2
|
export declare const PDBeSIFTSMapping: import("molstar/lib/mol-state/transformer").StateTransformer<PluginBehavior.Category, PluginBehavior.Behavior, {
|
|
3
3
|
autoAttach: boolean;
|
|
4
4
|
showTooltip: boolean;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PDBeSIFTSMapping = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
|
-
var int_1 = require("
|
|
6
|
-
var sifts_mapping_1 = require("
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var param_definition_1 = require("
|
|
10
|
-
var
|
|
5
|
+
var int_1 = require("molstar/lib/mol-data/int");
|
|
6
|
+
var sifts_mapping_1 = require("molstar/lib/mol-model-props/sequence/themes/sifts-mapping");
|
|
7
|
+
var structure_1 = require("molstar/lib/mol-model/structure");
|
|
8
|
+
var behavior_1 = require("molstar/lib/mol-plugin/behavior");
|
|
9
|
+
var param_definition_1 = require("molstar/lib/mol-util/param-definition");
|
|
10
|
+
var sifts_mapping_2 = require("./sifts-mapping");
|
|
11
11
|
exports.PDBeSIFTSMapping = behavior_1.PluginBehavior.create({
|
|
12
12
|
name: 'pdbe-sifts-mapping-prop',
|
|
13
13
|
category: 'custom-props',
|
|
@@ -16,7 +16,7 @@ exports.PDBeSIFTSMapping = behavior_1.PluginBehavior.create({
|
|
|
16
16
|
tslib_1.__extends(class_1, _super);
|
|
17
17
|
function class_1() {
|
|
18
18
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
19
|
-
_this.provider =
|
|
19
|
+
_this.provider = sifts_mapping_2.SIFTSMapping.Provider;
|
|
20
20
|
_this.labelProvider = {
|
|
21
21
|
label: function (loci) {
|
|
22
22
|
if (!_this.params.showTooltip)
|
|
@@ -36,12 +36,12 @@ exports.PDBeSIFTSMapping = behavior_1.PluginBehavior.create({
|
|
|
36
36
|
};
|
|
37
37
|
class_1.prototype.register = function () {
|
|
38
38
|
this.ctx.customModelProperties.register(this.provider, this.params.autoAttach);
|
|
39
|
-
this.ctx.representation.structure.themes.colorThemeRegistry.add(
|
|
39
|
+
this.ctx.representation.structure.themes.colorThemeRegistry.add(sifts_mapping_1.SIFTSMappingColorThemeProvider);
|
|
40
40
|
this.ctx.managers.lociLabels.addProvider(this.labelProvider);
|
|
41
41
|
};
|
|
42
42
|
class_1.prototype.unregister = function () {
|
|
43
43
|
this.ctx.customModelProperties.unregister(this.provider.descriptor.name);
|
|
44
|
-
this.ctx.representation.structure.themes.colorThemeRegistry.remove(
|
|
44
|
+
this.ctx.representation.structure.themes.colorThemeRegistry.remove(sifts_mapping_1.SIFTSMappingColorThemeProvider);
|
|
45
45
|
this.ctx.managers.lociLabels.removeProvider(this.labelProvider);
|
|
46
46
|
};
|
|
47
47
|
return class_1;
|
|
@@ -59,6 +59,6 @@ function PDBeBestDatabaseSequenceMappingLabel(loci) {
|
|
|
59
59
|
var e = loci.elements[0];
|
|
60
60
|
var u = e.unit;
|
|
61
61
|
var se = structure_1.StructureElement.Location.create(loci.structure, u, u.elements[int_1.OrderedSet.getAt(e.indices, 0)]);
|
|
62
|
-
return
|
|
62
|
+
return sifts_mapping_2.SIFTSMapping.getLabel(se);
|
|
63
63
|
}
|
|
64
64
|
}
|
package/lib/spec.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { Loci } from '
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { Loci } from 'molstar/lib/mol-model/loci';
|
|
2
|
+
import { StructureRepresentationBuiltInProps } from 'molstar/lib/mol-plugin-state/helpers/structure-representation-params';
|
|
3
|
+
import { PluginUISpec } from 'molstar/lib/mol-plugin-ui/spec';
|
|
4
|
+
import { DefaultFocusLociBindings } from 'molstar/lib/mol-plugin/behavior/dynamic/camera';
|
|
5
|
+
import { DefaultSelectLociBindings } from 'molstar/lib/mol-plugin/behavior/dynamic/representation';
|
|
6
|
+
import { PluginSpec } from 'molstar/lib/mol-plugin/spec';
|
|
6
7
|
import { LigandQueryParam, MapParams, QueryParam } from './helpers';
|
|
7
8
|
export declare const DefaultPluginSpec: () => PluginSpec;
|
|
8
9
|
export declare const DefaultPluginUISpec: () => PluginUISpec;
|
|
@@ -12,12 +13,29 @@ export interface ColorParams {
|
|
|
12
13
|
g: number;
|
|
13
14
|
b: number;
|
|
14
15
|
}
|
|
16
|
+
/** Color name (e.g. 'yellow') or hexcode (e.g. '#ffff00') or Molstar color encoding (e.g. 16776960) or RGB color object (e.g. { r: 255, g: 255, b: 0 }) */
|
|
17
|
+
export type AnyColor = ColorParams | string | number;
|
|
15
18
|
export declare const Preset: readonly ["default", "unitcell", "all-models", "supercell"];
|
|
16
19
|
export type Preset = (typeof Preset)[number];
|
|
17
20
|
export declare const Lighting: readonly ["flat", "matte", "glossy", "metallic", "plastic"];
|
|
18
21
|
export type Lighting = (typeof Lighting)[number];
|
|
22
|
+
/** Structure component type ('het' includes Molstar types 'ligand' and 'ion') */
|
|
23
|
+
export declare const ComponentType: readonly ["polymer", "het", "water", "carbs", "nonStandard", "coarse"];
|
|
24
|
+
export type ComponentType = (typeof ComponentType)[number];
|
|
25
|
+
/** Structure representation type */
|
|
19
26
|
export declare const VisualStyle: readonly ["cartoon", "ball-and-stick", "carbohydrate", "ellipsoid", "gaussian-surface", "molecular-surface", "point", "putty", "spacefill"];
|
|
20
27
|
export type VisualStyle = (typeof VisualStyle)[number];
|
|
28
|
+
/** Specification of visual style for a single component visual, e.g. `'cartoon'` or `{type: 'putty', size: 'uniform'}` */
|
|
29
|
+
type ComponentVisualStyleSpec = VisualStyle | StructureRepresentationBuiltInProps;
|
|
30
|
+
/** Specification of visual styles for individual component types, e.g. `'cartoon'` (all components as cartoon) or `{polymer: {type: 'putty', size: 'uniform'}, ligand: 'ball-and-stick'}` */
|
|
31
|
+
export type VisualStylesSpec = ComponentVisualStyleSpec | {
|
|
32
|
+
[component in ComponentType]?: ComponentVisualStyleSpec;
|
|
33
|
+
};
|
|
34
|
+
/** Normalize a `VisualStylesSpec` to a form {polymer?:{...},het?:{...},...} */
|
|
35
|
+
export declare function resolveVisualStyleSpec(spec: VisualStylesSpec): {
|
|
36
|
+
[component in ComponentType]?: StructureRepresentationBuiltInProps;
|
|
37
|
+
};
|
|
38
|
+
/** Structure file format */
|
|
21
39
|
export declare const Encoding: readonly ["cif", "bcif"];
|
|
22
40
|
export type Encoding = (typeof Encoding)[number];
|
|
23
41
|
/** Options for initializing `PDBeMolstarPlugin` */
|
|
@@ -50,15 +68,15 @@ export interface InitParams {
|
|
|
50
68
|
superposeCompleteCluster?: boolean;
|
|
51
69
|
ligandView?: boolean;
|
|
52
70
|
superposeAll?: boolean;
|
|
53
|
-
ligandColor?:
|
|
71
|
+
ligandColor?: AnyColor;
|
|
54
72
|
};
|
|
55
73
|
/** Specify parts of the structure to highlight with different colors */
|
|
56
74
|
selection?: {
|
|
57
75
|
data: QueryParam[];
|
|
58
|
-
nonSelectedColor?:
|
|
76
|
+
nonSelectedColor?: AnyColor;
|
|
59
77
|
};
|
|
60
78
|
/** Leave `undefined` to keep both cartoon and ball-and-sticks based on component type */
|
|
61
|
-
visualStyle?:
|
|
79
|
+
visualStyle?: VisualStylesSpec;
|
|
62
80
|
/** Molstar renders multiple visuals (polymer, ligand, water...) visuals by default. This option is to exclude any of these default visuals */
|
|
63
81
|
hideStructure: ('polymer' | 'het' | 'water' | 'carbs' | 'nonStandard' | 'coarse')[];
|
|
64
82
|
/** Load electron density (or EM) maps from Volume Server if value is set to true */
|
|
@@ -66,11 +84,11 @@ export interface InitParams {
|
|
|
66
84
|
/** Customize map style (opacity and solid/wireframe) */
|
|
67
85
|
mapSettings?: MapParams;
|
|
68
86
|
/** Canvas background color */
|
|
69
|
-
bgColor:
|
|
87
|
+
bgColor: AnyColor;
|
|
70
88
|
/** Color appearing on mouse-over */
|
|
71
|
-
highlightColor?:
|
|
89
|
+
highlightColor?: AnyColor;
|
|
72
90
|
/** Color for marking the selected part of structure (when Selection Mode is active) */
|
|
73
|
-
selectColor?:
|
|
91
|
+
selectColor?: AnyColor;
|
|
74
92
|
/** Default lighting (I don't think it really works) */
|
|
75
93
|
lighting?: Lighting;
|
|
76
94
|
/** Load Validation Report Annotations. Adds 'Annotations' control in the menu */
|
|
@@ -104,6 +122,12 @@ export interface InitParams {
|
|
|
104
122
|
hideCanvasControls: ('expand' | 'selection' | 'animation' | 'controlToggle' | 'controlInfo')[];
|
|
105
123
|
/** Display Sequence panel */
|
|
106
124
|
sequencePanel: boolean;
|
|
125
|
+
/** Display Left control panel */
|
|
126
|
+
leftPanel: boolean;
|
|
127
|
+
/** Display Right control panel */
|
|
128
|
+
rightPanel: boolean;
|
|
129
|
+
/** Display Log panel */
|
|
130
|
+
logPanel: boolean;
|
|
107
131
|
/** Display PDBe entry link in top right corner of the canvas */
|
|
108
132
|
pdbeLink: boolean;
|
|
109
133
|
/** Show overlay with PDBe logo while the initial structure is being loaded */
|
|
@@ -119,3 +143,4 @@ export interface InitParams {
|
|
|
119
143
|
export declare const DefaultParams: InitParams;
|
|
120
144
|
/** Return `undefined` if `params` are valid, an error message otherwise. */
|
|
121
145
|
export declare function validateInitParams(params: Partial<InitParams>): string | undefined;
|
|
146
|
+
export {};
|
package/lib/spec.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateInitParams = exports.DefaultParams = exports.Encoding = exports.VisualStyle = exports.Lighting = exports.Preset = exports.DefaultPluginUISpec = exports.DefaultPluginSpec = void 0;
|
|
3
|
+
exports.validateInitParams = exports.DefaultParams = exports.Encoding = exports.resolveVisualStyleSpec = exports.VisualStyle = exports.ComponentType = exports.Lighting = exports.Preset = exports.DefaultPluginUISpec = exports.DefaultPluginSpec = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
|
-
var actions_1 = require("
|
|
6
|
-
var volume_1 = require("
|
|
7
|
-
var behavior_1 = require("
|
|
8
|
-
var transformers_1 = require("
|
|
9
|
-
var config_1 = require("
|
|
10
|
-
var spec_1 = require("
|
|
5
|
+
var actions_1 = require("molstar/lib/mol-plugin-state/actions");
|
|
6
|
+
var volume_1 = require("molstar/lib/mol-plugin-ui/custom/volume");
|
|
7
|
+
var behavior_1 = require("molstar/lib/mol-plugin/behavior");
|
|
8
|
+
var transformers_1 = require("molstar/lib/mol-plugin/behavior/dynamic/volume-streaming/transformers");
|
|
9
|
+
var config_1 = require("molstar/lib/mol-plugin/config");
|
|
10
|
+
var spec_1 = require("molstar/lib/mol-plugin/spec");
|
|
11
11
|
var labels_1 = require("./labels");
|
|
12
12
|
var sifts_mappings_behaviour_1 = require("./sifts-mappings-behaviour");
|
|
13
13
|
var DefaultPluginSpec = function () { return ({
|
|
@@ -42,7 +42,35 @@ var DefaultPluginUISpec = function () { return (tslib_1.__assign(tslib_1.__assig
|
|
|
42
42
|
exports.DefaultPluginUISpec = DefaultPluginUISpec;
|
|
43
43
|
exports.Preset = ['default', 'unitcell', 'all-models', 'supercell'];
|
|
44
44
|
exports.Lighting = ['flat', 'matte', 'glossy', 'metallic', 'plastic'];
|
|
45
|
+
/** Structure component type ('het' includes Molstar types 'ligand' and 'ion') */
|
|
46
|
+
exports.ComponentType = ['polymer', 'het', 'water', 'carbs', 'nonStandard', 'coarse'];
|
|
47
|
+
/** Structure representation type */
|
|
45
48
|
exports.VisualStyle = ['cartoon', 'ball-and-stick', 'carbohydrate', 'ellipsoid', 'gaussian-surface', 'molecular-surface', 'point', 'putty', 'spacefill'];
|
|
49
|
+
/** Normalize a `VisualStylesSpec` to a form {polymer?:{...},het?:{...},...} */
|
|
50
|
+
function resolveVisualStyleSpec(spec) {
|
|
51
|
+
if (spec === undefined) {
|
|
52
|
+
return {};
|
|
53
|
+
}
|
|
54
|
+
if (typeof spec === 'string' || 'type' in spec) {
|
|
55
|
+
var commonStyle_1 = resolveComponentVisualStyleSpec(spec);
|
|
56
|
+
return Object.fromEntries(exports.ComponentType.map(function (type) { return [type, commonStyle_1]; }));
|
|
57
|
+
}
|
|
58
|
+
return Object.fromEntries(Object.entries(spec).map(function (_a) {
|
|
59
|
+
var type = _a[0], compSpec = _a[1];
|
|
60
|
+
return [type, resolveComponentVisualStyleSpec(compSpec)];
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
exports.resolveVisualStyleSpec = resolveVisualStyleSpec;
|
|
64
|
+
function resolveComponentVisualStyleSpec(spec) {
|
|
65
|
+
if (spec === undefined)
|
|
66
|
+
return undefined;
|
|
67
|
+
if (typeof spec === 'string')
|
|
68
|
+
return { type: spec };
|
|
69
|
+
if ('type' in spec)
|
|
70
|
+
return spec;
|
|
71
|
+
throw new Error('TypeError');
|
|
72
|
+
}
|
|
73
|
+
/** Structure file format */
|
|
46
74
|
exports.Encoding = ['cif', 'bcif'];
|
|
47
75
|
/** Default values for `InitParams` */
|
|
48
76
|
exports.DefaultParams = {
|
|
@@ -77,6 +105,9 @@ exports.DefaultParams = {
|
|
|
77
105
|
hideControls: false,
|
|
78
106
|
hideCanvasControls: [],
|
|
79
107
|
sequencePanel: false,
|
|
108
|
+
leftPanel: true,
|
|
109
|
+
rightPanel: true,
|
|
110
|
+
logPanel: false,
|
|
80
111
|
pdbeLink: true,
|
|
81
112
|
loadingOverlay: false,
|
|
82
113
|
expanded: false,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** Styles for PDBe Molstar (in addition to styles imported from core Molstar) */
|
|
2
|
+
|
|
1
3
|
.pdbemolstar-overlay {
|
|
2
4
|
z-index: 1000;
|
|
3
5
|
position: fixed;
|
|
@@ -48,3 +50,12 @@ svg.pdbe-animated-logo {
|
|
|
48
50
|
border: solid 1px transparent;
|
|
49
51
|
background-clip: content-box;
|
|
50
52
|
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
.msp-plugin .msp-layout-static {
|
|
56
|
+
container-type: size; // define container to reference in .msp-viewport-controls-panel-controls
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.msp-plugin .msp-viewport-controls-panel .msp-viewport-controls-panel-controls {
|
|
60
|
+
max-height: calc(100cqh - 41px - 24px - 10px); // 100cqh = viewport container, 41px = control buttons offset, 24px = header, 10px = space below
|
|
61
|
+
}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.superpositionExportHierarchy = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
|
-
var utf8_1 = require("
|
|
6
|
-
var structure_1 = require("
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
5
|
+
var utf8_1 = require("molstar/lib/mol-io/common/utf8");
|
|
6
|
+
var structure_1 = require("molstar/lib/mol-model/structure");
|
|
7
|
+
var commands_1 = require("molstar/lib/mol-plugin/commands");
|
|
8
|
+
var mol_task_1 = require("molstar/lib/mol-task");
|
|
9
|
+
var date_1 = require("molstar/lib/mol-util/date");
|
|
10
|
+
var download_1 = require("molstar/lib/mol-util/download");
|
|
11
|
+
var zip_1 = require("molstar/lib/mol-util/zip/zip");
|
|
12
12
|
var plugin_custom_state_1 = require("./plugin-custom-state");
|
|
13
13
|
function superpositionExportHierarchy(plugin, options) {
|
|
14
14
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PluginBehavior } from '
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { PluginBehavior } from 'molstar/lib/mol-plugin/behavior';
|
|
2
|
+
import { PluginContext } from 'molstar/lib/mol-plugin/context';
|
|
3
|
+
import { ParamDefinition as PD } from 'molstar/lib/mol-util/param-definition';
|
|
4
4
|
declare const SuperpositionFocusRepresentationParams: (plugin: PluginContext) => {
|
|
5
5
|
expandRadius: PD.Numeric;
|
|
6
6
|
surroundingsParams: PD.Group<PD.Normalize<{
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SuperpositionFocusRepresentation = exports.SuperpositionFocusRepresentationTags = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
|
-
var structure_1 = require("
|
|
6
|
-
var structure_representation_params_1 = require("
|
|
7
|
-
var transforms_1 = require("
|
|
8
|
-
var behavior_1 = require("
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
5
|
+
var structure_1 = require("molstar/lib/mol-model/structure");
|
|
6
|
+
var structure_representation_params_1 = require("molstar/lib/mol-plugin-state/helpers/structure-representation-params");
|
|
7
|
+
var transforms_1 = require("molstar/lib/mol-plugin-state/transforms");
|
|
8
|
+
var behavior_1 = require("molstar/lib/mol-plugin/behavior");
|
|
9
|
+
var commands_1 = require("molstar/lib/mol-plugin/commands");
|
|
10
|
+
var builder_1 = require("molstar/lib/mol-script/language/builder");
|
|
11
|
+
var mol_state_1 = require("molstar/lib/mol-state");
|
|
12
|
+
var param_definition_1 = require("molstar/lib/mol-util/param-definition");
|
|
13
13
|
var loci_details_1 = require("./loci-details");
|
|
14
14
|
var SuperpositionFocusRepresentationParams = function (plugin) {
|
|
15
15
|
var reprParams = transforms_1.StateTransforms.Representation.StructureRepresentation3D.definition.params(void 0, plugin);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { MinimizeRmsd } from '
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Unit } from '
|
|
1
|
+
import { MinimizeRmsd } from 'molstar/lib/mol-math/linear-algebra/3d/minimize-rmsd';
|
|
2
|
+
import { Structure } from 'molstar/lib/mol-model/structure';
|
|
3
|
+
import { ElementIndex, ResidueIndex } from 'molstar/lib/mol-model/structure/model/indexing';
|
|
4
|
+
import { StructureElement } from 'molstar/lib/mol-model/structure/structure/element';
|
|
5
|
+
import { Unit } from 'molstar/lib/mol-model/structure/structure/unit';
|
|
6
6
|
export interface AlignmentResultEntry {
|
|
7
7
|
transform: MinimizeRmsd.Result;
|
|
8
8
|
pivot: number;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.alignAndSuperposeWithSIFTSMapping = void 0;
|
|
4
|
-
var int_1 = require("
|
|
5
|
-
var minimize_rmsd_1 = require("
|
|
4
|
+
var int_1 = require("molstar/lib/mol-data/int");
|
|
5
|
+
var minimize_rmsd_1 = require("molstar/lib/mol-math/linear-algebra/3d/minimize-rmsd");
|
|
6
|
+
var element_1 = require("molstar/lib/mol-model/structure/structure/element");
|
|
6
7
|
var sifts_mapping_1 = require("./sifts-mapping");
|
|
7
|
-
var element_1 = require("Molstar/mol-model/structure/structure/element");
|
|
8
8
|
function alignAndSuperposeWithSIFTSMapping(structures, options) {
|
|
9
9
|
var _a, _b;
|
|
10
10
|
var indexMap = new Map();
|
package/lib/superposition.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { Mat4 } from '
|
|
2
|
-
import { PluginStateObject as PSO } from '
|
|
3
|
-
import { PluginContext } from '
|
|
4
|
-
import { StateObjectRef, StateObjectSelector } from '
|
|
1
|
+
import { Mat4 } from 'molstar/lib/mol-math/linear-algebra';
|
|
2
|
+
import { PluginStateObject as PSO } from 'molstar/lib/mol-plugin-state/objects';
|
|
3
|
+
import { PluginContext } from 'molstar/lib/mol-plugin/context';
|
|
4
|
+
import { StateObjectRef, StateObjectSelector } from 'molstar/lib/mol-state';
|
|
5
|
+
import { ColorListEntry } from 'molstar/lib/mol-util/color/color';
|
|
5
6
|
import { Subject } from 'rxjs';
|
|
6
7
|
import { ClusterMember } from './plugin-custom-state';
|
|
8
|
+
export declare const SuperpositionColorPalette: ColorListEntry[];
|
|
9
|
+
export declare function getNextColor(plugin: PluginContext, segmentIndex: number): ColorListEntry;
|
|
7
10
|
export declare function initSuperposition(plugin: PluginContext, completeSubject?: Subject<boolean>): Promise<void>;
|
|
8
11
|
export declare function loadAfStructure(plugin: PluginContext): Promise<string | false>;
|
|
9
12
|
export declare function superposeAf(plugin: PluginContext, traceOnly: boolean, segmentIndex?: number): Promise<true | undefined>;
|