molstar 3.0.0-dev.8 → 3.0.0-dev.9

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.
Files changed (49) hide show
  1. package/build/viewer/molstar.js +1 -1
  2. package/lib/apps/viewer/app.d.ts +230 -0
  3. package/lib/apps/viewer/app.js +515 -0
  4. package/lib/apps/viewer/index.d.ts +2 -225
  5. package/lib/apps/viewer/index.js +2 -509
  6. package/lib/commonjs/apps/viewer/app.d.ts +230 -0
  7. package/lib/commonjs/apps/viewer/app.js +521 -0
  8. package/lib/commonjs/apps/viewer/index.d.ts +2 -225
  9. package/lib/commonjs/apps/viewer/index.js +2 -512
  10. package/lib/commonjs/mol-canvas3d/canvas3d.js +1 -1
  11. package/lib/commonjs/mol-io/reader/mol2/parser.d.ts +1 -1
  12. package/lib/commonjs/mol-io/reader/mol2/parser.js +33 -3
  13. package/lib/commonjs/mol-io/reader/mol2/schema.d.ts +12 -1
  14. package/lib/commonjs/mol-io/reader/mol2/schema.js +1 -1
  15. package/lib/commonjs/mol-model/structure/structure/element/stats.js +8 -0
  16. package/lib/commonjs/mol-model/structure/structure/unit/bonds/common.d.ts +2 -1
  17. package/lib/commonjs/mol-model/structure/structure/unit/bonds/common.js +11 -2
  18. package/lib/commonjs/mol-model/structure/structure/unit/bonds/inter-compute.d.ts +1 -1
  19. package/lib/commonjs/mol-model/structure/structure/unit/bonds/inter-compute.js +20 -10
  20. package/lib/commonjs/mol-model/structure/structure/unit/bonds/intra-compute.d.ts +1 -1
  21. package/lib/commonjs/mol-model/structure/structure/unit/bonds/intra-compute.js +21 -11
  22. package/lib/commonjs/mol-model-formats/structure/mol2.d.ts +1 -1
  23. package/lib/commonjs/mol-model-formats/structure/mol2.js +37 -7
  24. package/lib/commonjs/mol-model-formats/structure/property/bonds/index-pair.d.ts +18 -1
  25. package/lib/commonjs/mol-model-formats/structure/property/bonds/index-pair.js +18 -5
  26. package/lib/commonjs/mol-plugin/config.d.ts +1 -1
  27. package/lib/commonjs/mol-plugin-state/actions/structure.d.ts +1 -0
  28. package/lib/commonjs/mol-plugin-state/actions/structure.js +41 -8
  29. package/lib/mol-canvas3d/canvas3d.js +1 -1
  30. package/lib/mol-io/reader/mol2/parser.d.ts +1 -1
  31. package/lib/mol-io/reader/mol2/parser.js +33 -3
  32. package/lib/mol-io/reader/mol2/schema.d.ts +12 -1
  33. package/lib/mol-io/reader/mol2/schema.js +1 -1
  34. package/lib/mol-model/structure/structure/element/stats.js +8 -0
  35. package/lib/mol-model/structure/structure/unit/bonds/common.d.ts +2 -1
  36. package/lib/mol-model/structure/structure/unit/bonds/common.js +9 -1
  37. package/lib/mol-model/structure/structure/unit/bonds/inter-compute.d.ts +1 -1
  38. package/lib/mol-model/structure/structure/unit/bonds/inter-compute.js +21 -11
  39. package/lib/mol-model/structure/structure/unit/bonds/intra-compute.d.ts +1 -1
  40. package/lib/mol-model/structure/structure/unit/bonds/intra-compute.js +22 -12
  41. package/lib/mol-model-formats/structure/mol2.d.ts +1 -1
  42. package/lib/mol-model-formats/structure/mol2.js +37 -7
  43. package/lib/mol-model-formats/structure/property/bonds/index-pair.d.ts +18 -1
  44. package/lib/mol-model-formats/structure/property/bonds/index-pair.js +18 -5
  45. package/lib/mol-plugin/config.d.ts +1 -1
  46. package/lib/mol-plugin/version.js +2 -2
  47. package/lib/mol-plugin-state/actions/structure.d.ts +1 -0
  48. package/lib/mol-plugin-state/actions/structure.js +41 -8
  49. package/package.json +1 -1
@@ -1,233 +1,10 @@
1
1
  /**
2
- * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author David Sehnal <david.sehnal@gmail.com>
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
6
6
  */
7
- import { PresetTrajectoryHierarchy } from '../../mol-plugin-state/builder/structure/hierarchy-preset';
8
- import { StructureRepresentationPresetProvider } from '../../mol-plugin-state/builder/structure/representation-preset';
9
- import { DataFormatProvider } from '../../mol-plugin-state/formats/provider';
10
- import { BuildInStructureFormat } from '../../mol-plugin-state/formats/structure';
11
- import { BuiltInTrajectoryFormat } from '../../mol-plugin-state/formats/trajectory';
12
- import { BuildInVolumeFormat } from '../../mol-plugin-state/formats/volume';
13
- import { PluginStateObject } from '../../mol-plugin-state/objects';
14
- import { PluginUIContext } from '../../mol-plugin-ui/context';
15
- import { PluginLayoutControlsDisplay } from '../../mol-plugin/layout';
16
- import { PluginState } from '../../mol-plugin/state';
17
- import { StateObjectSelector } from '../../mol-state';
18
- import { Color } from '../../mol-util/color';
19
- import '../../mol-util/polyfill';
20
7
  import './embedded.html';
21
8
  import './favicon.ico';
22
9
  import './index.html';
23
- export { PLUGIN_VERSION as version } from '../../mol-plugin/version';
24
- export { setDebugMode, setProductionMode } from '../../mol-util/debug';
25
- declare const DefaultViewerOptions: {
26
- customFormats: [string, DataFormatProvider<any, any, any>][];
27
- extensions: ("cellpack" | "g3d" | "geo-export" | "mp4-export" | "pdbe-structure-quality-report" | "dnatco-confal-pyramids" | "rcsb-assembly-symmetry" | "rcsb-validation-report" | "anvil-membrane-orientation" | "ma-quality-assessment")[];
28
- layoutIsExpanded: boolean;
29
- layoutShowControls: boolean;
30
- layoutShowRemoteState: boolean;
31
- layoutControlsDisplay: PluginLayoutControlsDisplay;
32
- layoutShowSequence: boolean;
33
- layoutShowLog: boolean;
34
- layoutShowLeftPanel: boolean;
35
- collapseLeftPanel: boolean;
36
- collapseRightPanel: boolean;
37
- disableAntialiasing: boolean | undefined;
38
- pixelScale: number | undefined;
39
- pickScale: number | undefined;
40
- pickPadding: number | undefined;
41
- enableWboit: boolean | undefined;
42
- preferWebgl1: boolean | undefined;
43
- viewportShowExpand: boolean | undefined;
44
- viewportShowControls: boolean | undefined;
45
- viewportShowSettings: boolean | undefined;
46
- viewportShowSelectionMode: boolean | undefined;
47
- viewportShowAnimation: boolean | undefined;
48
- pluginStateServer: string | undefined;
49
- volumeStreamingServer: string | undefined;
50
- volumeStreamingDisabled: boolean;
51
- pdbProvider: "rcsb" | "pdbe" | undefined;
52
- emdbProvider: import("../../mol-plugin-state/actions/volume").EmdbDownloadProvider | undefined;
53
- };
54
- declare type ViewerOptions = typeof DefaultViewerOptions;
55
- export declare class Viewer {
56
- plugin: PluginUIContext;
57
- constructor(plugin: PluginUIContext);
58
- static create(elementOrId: string | HTMLElement, options?: Partial<ViewerOptions>): Promise<Viewer>;
59
- setRemoteSnapshot(id: string): Promise<void>;
60
- loadSnapshotFromUrl(url: string, type: PluginState.SnapshotType): Promise<void>;
61
- loadStructureFromUrl(url: string, format?: BuiltInTrajectoryFormat, isBinary?: boolean, options?: LoadStructureOptions): Promise<void>;
62
- loadAllModelsOrAssemblyFromUrl(url: string, format?: BuiltInTrajectoryFormat, isBinary?: boolean, options?: LoadStructureOptions): Promise<void>;
63
- loadStructureFromData(data: string | number[], format: BuiltInTrajectoryFormat, options?: {
64
- dataLabel?: string;
65
- }): Promise<void>;
66
- loadPdb(pdb: string, options?: LoadStructureOptions): Promise<void>;
67
- loadPdbDev(pdbDev: string): Promise<void>;
68
- loadEmdb(emdb: string, options?: {
69
- detail?: number;
70
- }): Promise<void>;
71
- loadAlphaFoldDb(afdb: string): Promise<void>;
72
- loadModelArchive(id: string): Promise<void>;
73
- /**
74
- * @example Load X-ray density from volume server
75
- viewer.loadVolumeFromUrl({
76
- url: 'https://www.ebi.ac.uk/pdbe/densities/x-ray/1tqn/cell?detail=3',
77
- format: 'dscif',
78
- isBinary: true
79
- }, [{
80
- type: 'relative',
81
- value: 1.5,
82
- color: 0x3362B2
83
- }, {
84
- type: 'relative',
85
- value: 3,
86
- color: 0x33BB33,
87
- volumeIndex: 1
88
- }, {
89
- type: 'relative',
90
- value: -3,
91
- color: 0xBB3333,
92
- volumeIndex: 1
93
- }], {
94
- entryId: ['2FO-FC', 'FO-FC'],
95
- isLazy: true
96
- });
97
- * *********************
98
- * @example Load EM density from volume server
99
- viewer.loadVolumeFromUrl({
100
- url: 'https://maps.rcsb.org/em/emd-30210/cell?detail=6',
101
- format: 'dscif',
102
- isBinary: true
103
- }, [{
104
- type: 'relative',
105
- value: 1,
106
- color: 0x3377aa
107
- }], {
108
- entryId: 'EMD-30210',
109
- isLazy: true
110
- });
111
- */
112
- loadVolumeFromUrl({ url, format, isBinary }: {
113
- url: string;
114
- format: BuildInVolumeFormat;
115
- isBinary: boolean;
116
- }, isovalues: VolumeIsovalueInfo[], options?: {
117
- entryId?: string | string[];
118
- isLazy?: boolean;
119
- }): Promise<void>;
120
- /**
121
- * @example
122
- * viewer.loadTrajectory({
123
- * model: { kind: 'model-url', url: 'villin.gro', format: 'gro' },
124
- * coordinates: { kind: 'coordinates-url', url: 'villin.xtc', format: 'xtc', isBinary: true },
125
- * preset: 'all-models' // or 'default'
126
- * });
127
- */
128
- loadTrajectory(params: LoadTrajectoryParams): Promise<{
129
- model: StateObjectSelector<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>;
130
- coords: StateObjectSelector<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>;
131
- preset: {
132
- model: StateObjectSelector<PluginStateObject.Molecule.Model, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>;
133
- modelProperties: StateObjectSelector<PluginStateObject.Molecule.Model, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>;
134
- unitcell: StateObjectSelector<PluginStateObject.Shape.Representation3D, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>> | undefined;
135
- structure: StateObjectSelector<PluginStateObject.Molecule.Structure, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>;
136
- structureProperties: StateObjectSelector<PluginStateObject.Molecule.Structure, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>;
137
- representation: any;
138
- } | {
139
- models?: undefined;
140
- structures?: undefined;
141
- } | {
142
- models: StateObjectSelector<PluginStateObject.Molecule.Model, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>[];
143
- structures: StateObjectSelector<PluginStateObject.Molecule.Structure, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>[];
144
- } | {
145
- model: StateObjectSelector<PluginStateObject.Molecule.Model, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>;
146
- modelProperties: StateObjectSelector<PluginStateObject.Molecule.Model, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>;
147
- unitcell: StateObjectSelector<PluginStateObject.Shape.Representation3D, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>> | undefined;
148
- structure: StateObjectSelector<PluginStateObject.Molecule.Structure, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>;
149
- structureProperties: StateObjectSelector<PluginStateObject.Molecule.Structure, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>;
150
- representation: any;
151
- } | {
152
- model: StateObjectSelector<PluginStateObject.Molecule.Model, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>;
153
- modelProperties: StateObjectSelector<PluginStateObject.Molecule.Model, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>;
154
- unitcell: StateObjectSelector<PluginStateObject.Shape.Representation3D, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>> | undefined;
155
- structure: StateObjectSelector<PluginStateObject.Molecule.Structure, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>;
156
- structureProperties: StateObjectSelector<PluginStateObject.Molecule.Structure, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>;
157
- representation: any;
158
- } | undefined;
159
- }>;
160
- handleResize(): void;
161
- }
162
- export interface LoadStructureOptions {
163
- representationParams?: StructureRepresentationPresetProvider.CommonParams;
164
- }
165
- export interface VolumeIsovalueInfo {
166
- type: 'absolute' | 'relative';
167
- value: number;
168
- color: Color;
169
- alpha?: number;
170
- volumeIndex?: number;
171
- }
172
- export interface LoadTrajectoryParams {
173
- model: {
174
- kind: 'model-url';
175
- url: string;
176
- format?: BuiltInTrajectoryFormat;
177
- isBinary?: boolean;
178
- } | {
179
- kind: 'model-data';
180
- data: string | number[] | ArrayBuffer | Uint8Array;
181
- format?: BuiltInTrajectoryFormat;
182
- } | {
183
- kind: 'topology-url';
184
- url: string;
185
- format: BuildInStructureFormat;
186
- isBinary?: boolean;
187
- } | {
188
- kind: 'topology-data';
189
- data: string | number[] | ArrayBuffer | Uint8Array;
190
- format: BuildInStructureFormat;
191
- };
192
- modelLabel?: string;
193
- coordinates: {
194
- kind: 'coordinates-url';
195
- url: string;
196
- format: BuildInStructureFormat;
197
- isBinary?: boolean;
198
- } | {
199
- kind: 'coordinates-data';
200
- data: string | number[] | ArrayBuffer | Uint8Array;
201
- format: BuildInStructureFormat;
202
- };
203
- coordinatesLabel?: string;
204
- preset?: keyof PresetTrajectoryHierarchy;
205
- }
206
- export declare const ViewerAutoPreset: StructureRepresentationPresetProvider<{
207
- ignoreHydrogens: boolean | undefined;
208
- quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest" | undefined;
209
- theme: import("../../mol-util/param-definition").ParamDefinition.Normalize<{
210
- globalName: any;
211
- carbonColor: any;
212
- symmetryColor: any;
213
- focus: any;
214
- }> | undefined;
215
- }, {
216
- components?: undefined;
217
- representations?: undefined;
218
- } | {
219
- components: {
220
- polymer: StateObjectSelector<PluginStateObject.Molecule.Structure, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>> | undefined;
221
- };
222
- representations: {
223
- polymer: StateObjectSelector<PluginStateObject.Molecule.Structure.Representation3D, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>;
224
- };
225
- } | {
226
- components: {
227
- all: StateObjectSelector<PluginStateObject.Molecule.Structure, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>> | undefined;
228
- branched: undefined;
229
- };
230
- representations: {
231
- all: StateObjectSelector<PluginStateObject.Molecule.Structure.Representation3D, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>;
232
- };
233
- }>;
10
+ export * from './app';