pdbe-molstar 3.2.0-beta.4 → 3.2.1-beta.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/README.md +11 -2
- package/build/pdbe-molstar-component.js +2 -2
- package/build/pdbe-molstar-light.css +2 -3
- 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/extensions/foldseek.d.ts +23 -0
- package/lib/extensions/foldseek.js +163 -0
- package/lib/helpers.d.ts +17 -0
- package/lib/helpers.js +19 -5
- package/lib/index(light).d.ts +101 -50
- package/lib/index(light).js +412 -259
- package/lib/index.d.ts +101 -50
- package/lib/index.js +412 -259
- package/lib/overlay.scss +7 -0
- package/lib/spec-from-html.js +4 -0
- package/lib/spec.d.ts +0 -1
- package/lib/superposition.d.ts +5 -0
- package/lib/superposition.js +3 -1
- package/package.json +1 -1
package/lib/overlay.scss
CHANGED
package/lib/spec-from-html.js
CHANGED
|
@@ -13,6 +13,7 @@ function initParamsFromHtmlAttributes(element) {
|
|
|
13
13
|
exports.initParamsFromHtmlAttributes = initParamsFromHtmlAttributes;
|
|
14
14
|
/** Actions for loading individual HTML attributes into InitParams object */
|
|
15
15
|
var InitParamsLoadingActions = {
|
|
16
|
+
// DATA
|
|
16
17
|
'molecule-id': setString('moleculeId'),
|
|
17
18
|
'custom-data-url': function (value, params) { var _a; ((_a = params.customData) !== null && _a !== void 0 ? _a : (params.customData = defaultCustomData())).url = value; },
|
|
18
19
|
'custom-data-format': function (value, params) { var _a; ((_a = params.customData) !== null && _a !== void 0 ? _a : (params.customData = defaultCustomData())).format = value; },
|
|
@@ -25,6 +26,7 @@ var InitParamsLoadingActions = {
|
|
|
25
26
|
'ligand-auth-seq-id': function (value, params) { var _a; ((_a = params.ligandView) !== null && _a !== void 0 ? _a : (params.ligandView = {})).auth_seq_id = Number(value); },
|
|
26
27
|
'ligand-show-all': function (value, params) { var _a; ((_a = params.ligandView) !== null && _a !== void 0 ? _a : (params.ligandView = {})).show_all = parseBool(value); },
|
|
27
28
|
'alphafold-view': setBool('alphafoldView'),
|
|
29
|
+
// APPEARANCE
|
|
28
30
|
'visual-style': setLiteral(spec_1.VisualStyle, 'visualStyle'),
|
|
29
31
|
'hide-polymer': pushItem('hideStructure', 'polymer'),
|
|
30
32
|
'hide-water': pushItem('hideStructure', 'water'),
|
|
@@ -43,6 +45,7 @@ var InitParamsLoadingActions = {
|
|
|
43
45
|
'select-color-g': setColorComponent('selectColor', 'g'),
|
|
44
46
|
'select-color-b': setColorComponent('selectColor', 'b'),
|
|
45
47
|
'lighting': setLiteral(spec_1.Lighting, 'lighting'),
|
|
48
|
+
// BEHAVIOR
|
|
46
49
|
'validation-annotation': setBool('validationAnnotation'),
|
|
47
50
|
'domain-annotation': setBool('domainAnnotation'),
|
|
48
51
|
'symmetry-annotation': setBool('symmetryAnnotation'),
|
|
@@ -51,6 +54,7 @@ var InitParamsLoadingActions = {
|
|
|
51
54
|
'low-precision': setBool('lowPrecisionCoords'),
|
|
52
55
|
'select-interaction': setBool('selectInteraction'),
|
|
53
56
|
'subscribe-events': setBool('subscribeEvents'),
|
|
57
|
+
// INTERFACE
|
|
54
58
|
'hide-controls': setBool('hideControls'),
|
|
55
59
|
'hide-expand-icon': pushItem('hideCanvasControls', 'expand'),
|
|
56
60
|
'hide-selection-icon': pushItem('hideCanvasControls', 'selection'),
|
package/lib/spec.d.ts
CHANGED
package/lib/superposition.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import { Mat4 } from 'Molstar/mol-math/linear-algebra';
|
|
2
|
+
import { PluginStateObject as PSO } from 'Molstar/mol-plugin-state/objects';
|
|
1
3
|
import { PluginContext } from 'Molstar/mol-plugin/context';
|
|
4
|
+
import { StateObjectRef, StateObjectSelector } from 'Molstar/mol-state';
|
|
2
5
|
import { Subject } from 'rxjs';
|
|
3
6
|
import { ClusterMember } from './plugin-custom-state';
|
|
4
7
|
export declare function initSuperposition(plugin: PluginContext, completeSubject?: Subject<boolean>): Promise<void>;
|
|
5
8
|
export declare function loadAfStructure(plugin: PluginContext): Promise<string | false>;
|
|
6
9
|
export declare function superposeAf(plugin: PluginContext, traceOnly: boolean, segmentIndex?: number): Promise<true | undefined>;
|
|
7
10
|
export declare function renderSuperposition(plugin: PluginContext, segmentIndex: number, entryList: ClusterMember[]): Promise<void>;
|
|
11
|
+
/** Apply tranformation to a structure. Only use once per structure, combining multiple transformations is not implemented. */
|
|
12
|
+
export declare function transform(plugin: PluginContext, s: StateObjectRef<PSO.Molecule.Structure>, matrix: Mat4): Promise<StateObjectSelector<PSO.Molecule.Structure, import("molstar/lib/mol-state/transformer").StateTransformer<import("molstar/lib/mol-state/object").StateObject<any, import("molstar/lib/mol-state/object").StateObject.Type<any>>, import("molstar/lib/mol-state/object").StateObject<any, import("molstar/lib/mol-state/object").StateObject.Type<any>>, any>>>;
|
package/lib/superposition.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.renderSuperposition = exports.superposeAf = exports.loadAfStructure = exports.initSuperposition = void 0;
|
|
3
|
+
exports.transform = exports.renderSuperposition = exports.superposeAf = exports.loadAfStructure = exports.initSuperposition = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var linear_algebra_1 = require("Molstar/mol-math/linear-algebra");
|
|
6
6
|
var structure_1 = require("Molstar/mol-model/structure");
|
|
@@ -674,11 +674,13 @@ function chainSelection(struct_asym_id) {
|
|
|
674
674
|
'chain-test': builder_1.MolScriptBuilder.core.rel.eq([builder_1.MolScriptBuilder.struct.atomProperty.macromolecular.label_asym_id(), struct_asym_id])
|
|
675
675
|
});
|
|
676
676
|
}
|
|
677
|
+
/** Apply tranformation to a structure. Only use once per structure, combining multiple transformations is not implemented. */
|
|
677
678
|
function transform(plugin, s, matrix) {
|
|
678
679
|
var b = plugin.state.data.build().to(s)
|
|
679
680
|
.insert(transforms_1.StateTransforms.Model.TransformStructureConformation, { transform: { name: 'matrix', params: { data: matrix, transpose: false } } });
|
|
680
681
|
return plugin.runTask(plugin.state.data.updateTree(b));
|
|
681
682
|
}
|
|
683
|
+
exports.transform = transform;
|
|
682
684
|
function afTransform(plugin, s, matrix, coordinateSystem) {
|
|
683
685
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
684
686
|
var r, o, transform, params, b;
|