molstar 3.0.0 → 3.2.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/LICENSE +20 -20
- package/README.md +194 -194
- package/build/viewer/embedded.html +43 -43
- package/build/viewer/index.html +106 -106
- package/build/viewer/molstar.js +1 -1
- package/lib/apps/docking-viewer/index.html +36 -36
- package/lib/apps/docking-viewer/viewport.d.ts +2 -0
- package/lib/apps/viewer/app.d.ts +1 -0
- package/lib/apps/viewer/app.js +6 -3
- package/lib/apps/viewer/embedded.html +43 -43
- package/lib/apps/viewer/index.html +106 -106
- package/lib/commonjs/apps/docking-viewer/viewport.d.ts +2 -0
- package/lib/commonjs/apps/viewer/app.d.ts +1 -0
- package/lib/commonjs/apps/viewer/app.js +8 -5
- package/lib/commonjs/extensions/anvil/behavior.d.ts +1 -0
- package/lib/commonjs/extensions/dnatco/confal-pyramids/behavior.d.ts +1 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/behavior.d.ts +2 -0
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/behavior.d.ts +4 -2
- package/lib/commonjs/extensions/rcsb/graphql/types.d.ts +11 -11
- package/lib/commonjs/extensions/rcsb/validation-report/behavior.d.ts +3 -0
- package/lib/commonjs/mol-canvas3d/helper/interaction-events.js +1 -1
- package/lib/commonjs/mol-canvas3d/passes/draw.d.ts +1 -1
- package/lib/commonjs/mol-canvas3d/passes/draw.js +3 -3
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +2 -2
- package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +0 -1
- package/lib/commonjs/mol-geo/geometry/points/points.d.ts +1 -1
- package/lib/commonjs/mol-gl/renderer.d.ts +2 -2
- package/lib/commonjs/mol-gl/renderer.js +3 -3
- package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.js +2 -2
- package/lib/commonjs/mol-gl/shader/cylinders.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/cylinders.frag.js +2 -2
- package/lib/commonjs/mol-gl/shader/direct-volume.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/direct-volume.frag.js +2 -2
- package/lib/commonjs/mol-gl/shader/mesh.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/mesh.frag.js +2 -2
- package/lib/commonjs/mol-gl/shader/spheres.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/spheres.frag.js +2 -2
- package/lib/commonjs/mol-io/reader/cif/schema/bird.d.ts +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/bird.js +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/ccd.d.ts +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/ccd.js +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif.d.ts +24 -2
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif.js +23 -1
- package/lib/commonjs/mol-math/geometry/primitives/sphere3d.d.ts +1 -1
- package/lib/commonjs/mol-math/geometry/primitives/sphere3d.js +17 -4
- package/lib/commonjs/mol-model/structure/export/categories/atom_site.js +68 -1
- package/lib/commonjs/mol-model/structure/export/categories/secondary-structure.js +8 -8
- package/lib/commonjs/mol-model/structure/model/properties/coarse/hierarchy.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/model/properties/coarse/hierarchy.js +24 -2
- package/lib/commonjs/mol-model/structure/structure/element/loci.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/structure/element/loci.js +4 -2
- package/lib/commonjs/mol-model/structure/structure/util/superposition-sifts-mapping.d.ts +21 -0
- package/lib/commonjs/mol-model/structure/structure/util/{superposition-db-mapping.js → superposition-sifts-mapping.js} +40 -20
- package/lib/commonjs/mol-model/volume/volume.d.ts +7 -0
- package/lib/commonjs/mol-model/volume/volume.js +18 -0
- package/lib/commonjs/mol-model-formats/structure/basic/schema.d.ts +5 -0
- package/lib/commonjs/mol-model-formats/structure/common/property.d.ts +5 -2
- package/lib/commonjs/mol-model-formats/structure/common/property.js +20 -8
- package/lib/commonjs/mol-model-formats/structure/property/bonds/index-pair.d.ts +1 -0
- package/lib/commonjs/mol-model-formats/structure/property/bonds/index-pair.js +2 -1
- package/lib/commonjs/mol-model-props/computed/interactions/common.d.ts +1 -1
- package/lib/commonjs/mol-model-props/computed/interactions/common.js +16 -24
- package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +1 -1
- package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.js +44 -18
- package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.js +14 -4
- package/lib/commonjs/mol-model-props/sequence/{best-database-mapping.d.ts → sifts-mapping.d.ts} +7 -5
- package/lib/commonjs/mol-model-props/sequence/{best-database-mapping.js → sifts-mapping.js} +29 -26
- package/lib/{mol-model-props/sequence/themes/best-database-mapping.d.ts → commonjs/mol-model-props/sequence/themes/sifts-mapping.d.ts} +5 -5
- package/lib/commonjs/mol-model-props/sequence/themes/{best-database-mapping.js → sifts-mapping.js} +22 -22
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props/sequence/{best-database-mapping.d.ts → sifts-mapping.d.ts} +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props/sequence/{best-database-mapping.js → sifts-mapping.js} +11 -11
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props.d.ts +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props.js +2 -2
- package/lib/commonjs/mol-plugin/behavior/dynamic/representation.d.ts +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/representation.js +11 -6
- package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +2 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +16 -7
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -3
- package/lib/commonjs/mol-plugin/behavior/static/representation.js +1 -1
- package/lib/commonjs/mol-plugin-state/actions/volume.d.ts +1 -1
- package/lib/commonjs/mol-plugin-state/actions/volume.js +3 -3
- package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +2 -0
- package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy.d.ts +1 -0
- package/lib/commonjs/mol-plugin-state/builder/structure/representation-preset.d.ts +155 -125
- package/lib/commonjs/mol-plugin-state/builder/structure/representation-preset.js +5 -31
- package/lib/commonjs/mol-plugin-state/builder/structure/representation.d.ts +2 -1
- package/lib/commonjs/mol-plugin-state/formats/volume.js +1 -11
- package/lib/commonjs/mol-plugin-state/manager/structure/component.d.ts +2 -1
- package/lib/commonjs/mol-plugin-state/manager/structure/component.js +11 -8
- package/lib/commonjs/mol-plugin-ui/controls/icons.d.ts +2 -1
- package/lib/commonjs/mol-plugin-ui/controls/icons.js +8 -5
- package/lib/commonjs/mol-plugin-ui/controls.d.ts +1 -1
- package/lib/commonjs/mol-plugin-ui/controls.js +2 -1
- package/lib/commonjs/mol-plugin-ui/structure/quick-styles.d.ts +25 -0
- package/lib/commonjs/mol-plugin-ui/structure/quick-styles.js +131 -0
- package/lib/commonjs/mol-plugin-ui/structure/superposition.d.ts +4 -1
- package/lib/commonjs/mol-plugin-ui/structure/superposition.js +66 -30
- package/lib/commonjs/mol-plugin-ui/structure/volume.js +4 -4
- package/lib/commonjs/mol-repr/shape/loci/common.d.ts +1 -1
- package/lib/commonjs/mol-repr/shape/loci/common.js +3 -3
- package/lib/commonjs/mol-repr/structure/registry.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/representation/cartoon.d.ts +4 -4
- package/lib/commonjs/mol-repr/structure/representation/cartoon.js +3 -3
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.js +2 -2
- package/lib/commonjs/mol-repr/structure/visual/util/bond.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/util/bond.js +5 -4
- package/lib/commonjs/mol-script/language/builder.d.ts +1 -0
- package/lib/commonjs/mol-state/transform.js +12 -2
- package/lib/commonjs/mol-theme/color/element-symbol.d.ts +46 -2
- package/lib/commonjs/mol-theme/color/element-symbol.js +15 -10
- package/lib/commonjs/mol-theme/color/entity-id.js +14 -11
- package/lib/commonjs/mol-theme/color/illustrative.d.ts +32 -32
- package/lib/commonjs/mol-theme/color.d.ts +39 -17
- package/lib/commonjs/servers/volume/config.js +3 -3
- package/lib/commonjs/servers/volume/query.js +1 -1
- package/lib/examples/alpha-orbitals/index.html +61 -61
- package/lib/examples/basic-wrapper/index.html +137 -137
- package/lib/examples/lighting/index.html +88 -88
- package/lib/examples/proteopedia-wrapper/index.html +236 -236
- package/lib/extensions/anvil/behavior.d.ts +1 -0
- package/lib/extensions/dnatco/confal-pyramids/behavior.d.ts +1 -0
- package/lib/extensions/model-archive/quality-assessment/behavior.d.ts +2 -0
- package/lib/extensions/rcsb/assembly-symmetry/behavior.d.ts +4 -2
- package/lib/extensions/rcsb/graphql/types.d.ts +11 -11
- package/lib/extensions/rcsb/validation-report/behavior.d.ts +3 -0
- package/lib/mol-canvas3d/helper/interaction-events.js +1 -1
- package/lib/mol-canvas3d/passes/draw.d.ts +1 -1
- package/lib/mol-canvas3d/passes/draw.js +3 -3
- package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +2 -2
- package/lib/mol-geo/geometry/lines/lines.d.ts +0 -1
- package/lib/mol-geo/geometry/points/points.d.ts +1 -1
- package/lib/mol-gl/renderer.d.ts +2 -2
- package/lib/mol-gl/renderer.js +3 -3
- package/lib/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +2 -2
- package/lib/mol-gl/shader/chunks/apply-light-color.glsl.js +2 -2
- package/lib/mol-gl/shader/cylinders.frag.d.ts +2 -2
- package/lib/mol-gl/shader/cylinders.frag.js +2 -2
- package/lib/mol-gl/shader/direct-volume.frag.d.ts +2 -2
- package/lib/mol-gl/shader/direct-volume.frag.js +2 -2
- package/lib/mol-gl/shader/mesh.frag.d.ts +2 -2
- package/lib/mol-gl/shader/mesh.frag.js +2 -2
- package/lib/mol-gl/shader/spheres.frag.d.ts +2 -2
- package/lib/mol-gl/shader/spheres.frag.js +2 -2
- package/lib/mol-io/reader/cif/schema/bird.d.ts +1 -1
- package/lib/mol-io/reader/cif/schema/bird.js +1 -1
- package/lib/mol-io/reader/cif/schema/ccd.d.ts +1 -1
- package/lib/mol-io/reader/cif/schema/ccd.js +1 -1
- package/lib/mol-io/reader/cif/schema/mmcif.d.ts +24 -2
- package/lib/mol-io/reader/cif/schema/mmcif.js +23 -1
- package/lib/mol-math/geometry/primitives/sphere3d.d.ts +1 -1
- package/lib/mol-math/geometry/primitives/sphere3d.js +17 -4
- package/lib/mol-model/structure/export/categories/atom_site.js +68 -1
- package/lib/mol-model/structure/export/categories/secondary-structure.js +8 -8
- package/lib/mol-model/structure/model/properties/coarse/hierarchy.d.ts +1 -1
- package/lib/mol-model/structure/model/properties/coarse/hierarchy.js +24 -2
- package/lib/mol-model/structure/structure/element/loci.d.ts +1 -1
- package/lib/mol-model/structure/structure/element/loci.js +4 -2
- package/lib/mol-model/structure/structure/util/superposition-sifts-mapping.d.ts +21 -0
- package/lib/mol-model/structure/structure/util/{superposition-db-mapping.js → superposition-sifts-mapping.js} +38 -18
- package/lib/mol-model/volume/volume.d.ts +7 -0
- package/lib/mol-model/volume/volume.js +18 -0
- package/lib/mol-model-formats/structure/basic/schema.d.ts +5 -0
- package/lib/mol-model-formats/structure/common/property.d.ts +5 -2
- package/lib/mol-model-formats/structure/common/property.js +20 -8
- package/lib/mol-model-formats/structure/property/bonds/index-pair.d.ts +1 -0
- package/lib/mol-model-formats/structure/property/bonds/index-pair.js +2 -1
- package/lib/mol-model-props/computed/interactions/common.d.ts +1 -1
- package/lib/mol-model-props/computed/interactions/common.js +16 -24
- package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +1 -1
- package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.js +44 -18
- package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.js +14 -4
- package/lib/mol-model-props/sequence/{best-database-mapping.d.ts → sifts-mapping.d.ts} +7 -5
- package/lib/mol-model-props/sequence/{best-database-mapping.js → sifts-mapping.js} +28 -25
- package/lib/{commonjs/mol-model-props/sequence/themes/best-database-mapping.d.ts → mol-model-props/sequence/themes/sifts-mapping.d.ts} +5 -5
- package/lib/mol-model-props/sequence/themes/{best-database-mapping.js → sifts-mapping.js} +19 -19
- package/lib/mol-plugin/behavior/dynamic/custom-props/sequence/{best-database-mapping.d.ts → sifts-mapping.d.ts} +1 -1
- package/lib/mol-plugin/behavior/dynamic/custom-props/sequence/{best-database-mapping.js → sifts-mapping.js} +8 -8
- package/lib/mol-plugin/behavior/dynamic/custom-props.d.ts +1 -1
- package/lib/mol-plugin/behavior/dynamic/custom-props.js +1 -1
- package/lib/mol-plugin/behavior/dynamic/representation.d.ts +1 -1
- package/lib/mol-plugin/behavior/dynamic/representation.js +11 -6
- package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +2 -1
- package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +16 -7
- package/lib/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -3
- package/lib/mol-plugin/behavior/static/representation.js +1 -1
- package/lib/mol-plugin/version.js +2 -2
- package/lib/mol-plugin-state/actions/volume.d.ts +1 -1
- package/lib/mol-plugin-state/actions/volume.js +3 -3
- package/lib/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +2 -0
- package/lib/mol-plugin-state/builder/structure/hierarchy.d.ts +1 -0
- package/lib/mol-plugin-state/builder/structure/representation-preset.d.ts +155 -125
- package/lib/mol-plugin-state/builder/structure/representation-preset.js +5 -31
- package/lib/mol-plugin-state/builder/structure/representation.d.ts +2 -1
- package/lib/mol-plugin-state/formats/volume.js +1 -11
- package/lib/mol-plugin-state/manager/structure/component.d.ts +2 -1
- package/lib/mol-plugin-state/manager/structure/component.js +11 -8
- package/lib/mol-plugin-ui/controls/icons.d.ts +2 -1
- package/lib/mol-plugin-ui/controls/icons.js +5 -3
- package/lib/mol-plugin-ui/controls.d.ts +1 -1
- package/lib/mol-plugin-ui/controls.js +2 -1
- package/lib/mol-plugin-ui/skin/base/base.scss +32 -32
- package/lib/mol-plugin-ui/skin/base/components/controls-base.scss +333 -333
- package/lib/mol-plugin-ui/skin/base/components/controls.scss +418 -418
- package/lib/mol-plugin-ui/skin/base/components/help.scss +27 -27
- package/lib/mol-plugin-ui/skin/base/components/line-graph.scss +67 -67
- package/lib/mol-plugin-ui/skin/base/components/log.scss +100 -100
- package/lib/mol-plugin-ui/skin/base/components/misc.scss +643 -643
- package/lib/mol-plugin-ui/skin/base/components/sequence.scss +125 -125
- package/lib/mol-plugin-ui/skin/base/components/slider.scss +165 -165
- package/lib/mol-plugin-ui/skin/base/components/tasks.scss +99 -99
- package/lib/mol-plugin-ui/skin/base/components/toast.scss +83 -83
- package/lib/mol-plugin-ui/skin/base/components/transformer.scss +163 -163
- package/lib/mol-plugin-ui/skin/base/components/viewport.scss +127 -127
- package/lib/mol-plugin-ui/skin/base/layout/common.scss +71 -71
- package/lib/mol-plugin-ui/skin/base/layout/controls-landscape.scss +89 -89
- package/lib/mol-plugin-ui/skin/base/layout/controls-outside.scss +98 -98
- package/lib/mol-plugin-ui/skin/base/layout/controls-portrait.scss +108 -108
- package/lib/mol-plugin-ui/skin/base/layout.scss +40 -40
- package/lib/mol-plugin-ui/skin/base/logo.scss +12 -12
- package/lib/mol-plugin-ui/skin/base/normalize.scss +209 -209
- package/lib/mol-plugin-ui/skin/base/ui.scss +40 -40
- package/lib/mol-plugin-ui/skin/base/variables.scss +85 -85
- package/lib/mol-plugin-ui/skin/blue.scss +1 -1
- package/lib/mol-plugin-ui/skin/colors/blue.scss +23 -23
- package/lib/mol-plugin-ui/skin/colors/dark.scss +23 -23
- package/lib/mol-plugin-ui/skin/colors/light.scss +29 -29
- package/lib/mol-plugin-ui/skin/dark.scss +1 -1
- package/lib/mol-plugin-ui/skin/light.scss +1 -1
- package/lib/mol-plugin-ui/structure/quick-styles.d.ts +25 -0
- package/lib/mol-plugin-ui/structure/quick-styles.js +128 -0
- package/lib/mol-plugin-ui/structure/superposition.d.ts +4 -1
- package/lib/mol-plugin-ui/structure/superposition.js +66 -30
- package/lib/mol-plugin-ui/structure/volume.js +4 -4
- package/lib/mol-repr/shape/loci/common.d.ts +1 -1
- package/lib/mol-repr/shape/loci/common.js +3 -3
- package/lib/mol-repr/structure/registry.d.ts +1 -1
- package/lib/mol-repr/structure/representation/cartoon.d.ts +4 -4
- package/lib/mol-repr/structure/representation/cartoon.js +3 -3
- package/lib/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -1
- package/lib/mol-repr/structure/visual/molecular-surface-mesh.js +2 -2
- package/lib/mol-repr/structure/visual/util/bond.d.ts +1 -1
- package/lib/mol-repr/structure/visual/util/bond.js +5 -4
- package/lib/mol-script/language/builder.d.ts +1 -0
- package/lib/mol-state/transform.js +12 -2
- package/lib/mol-theme/color/element-symbol.d.ts +46 -2
- package/lib/mol-theme/color/element-symbol.js +15 -10
- package/lib/mol-theme/color/entity-id.js +14 -11
- package/lib/mol-theme/color/illustrative.d.ts +32 -32
- package/lib/mol-theme/color.d.ts +39 -17
- package/lib/servers/volume/config.js +3 -3
- package/lib/servers/volume/query.js +1 -1
- package/package.json +160 -163
- package/lib/commonjs/mol-model/structure/structure/util/superposition-db-mapping.d.ts +0 -13
- package/lib/mol-model/structure/structure/util/superposition-db-mapping.d.ts +0 -13
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2018-
|
|
3
|
+
* Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
6
6
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
@@ -10,6 +10,8 @@ exports.Sphere3D = void 0;
|
|
|
10
10
|
var tslib_1 = require("tslib");
|
|
11
11
|
var linear_algebra_1 = require("../../linear-algebra");
|
|
12
12
|
var int_1 = require("../../../mol-data/int");
|
|
13
|
+
var axes3d_1 = require("./axes3d");
|
|
14
|
+
var principal_axes_1 = require("../../linear-algebra/matrix/principal-axes");
|
|
13
15
|
function Sphere3D() {
|
|
14
16
|
return Sphere3D.zero();
|
|
15
17
|
}
|
|
@@ -197,11 +199,22 @@ exports.Sphere3D = Sphere3D;
|
|
|
197
199
|
return out;
|
|
198
200
|
}
|
|
199
201
|
if (hasExtrema(sphere)) {
|
|
202
|
+
var positions = new Float32Array(sphere.extrema.length * 3);
|
|
203
|
+
for (var i = 0; i < sphere.extrema.length; i++) {
|
|
204
|
+
linear_algebra_1.Vec3.toArray(sphere.extrema[i], positions, i * 3);
|
|
205
|
+
}
|
|
206
|
+
var axes_1 = principal_axes_1.PrincipalAxes.calculateMomentsAxes(positions);
|
|
207
|
+
axes3d_1.Axes3D.scale(axes_1, axes3d_1.Axes3D.normalize(axes_1, axes_1), delta);
|
|
200
208
|
setExtrema(out, sphere.extrema.map(function (e) {
|
|
201
209
|
linear_algebra_1.Vec3.sub(tmpDir, e, sphere.center);
|
|
202
|
-
var
|
|
203
|
-
linear_algebra_1.Vec3.
|
|
204
|
-
|
|
210
|
+
var out = linear_algebra_1.Vec3.clone(e);
|
|
211
|
+
var sA = linear_algebra_1.Vec3.dot(tmpDir, axes_1.dirA) < 0 ? -1 : 1;
|
|
212
|
+
linear_algebra_1.Vec3.scaleAndAdd(out, out, axes_1.dirA, sA);
|
|
213
|
+
var sB = linear_algebra_1.Vec3.dot(tmpDir, axes_1.dirB) < 0 ? -1 : 1;
|
|
214
|
+
linear_algebra_1.Vec3.scaleAndAdd(out, out, axes_1.dirB, sB);
|
|
215
|
+
var sC = linear_algebra_1.Vec3.dot(tmpDir, axes_1.dirC) < 0 ? -1 : 1;
|
|
216
|
+
linear_algebra_1.Vec3.scaleAndAdd(out, out, axes_1.dirC, sC);
|
|
217
|
+
return out;
|
|
205
218
|
}));
|
|
206
219
|
}
|
|
207
220
|
return out;
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.atomIdFields = exports.entityIdFields = exports.chainIdFields = exports.residueIdFields = exports._atom_site = void 0;
|
|
10
10
|
var cif_1 = require("../../../../mol-io/writer/cif");
|
|
11
|
+
var mmcif_1 = require("../../../../mol-model-formats/structure/mmcif");
|
|
12
|
+
var sifts_mapping_1 = require("../../../../mol-model-props/sequence/sifts-mapping");
|
|
11
13
|
var structure_1 = require("../../structure");
|
|
12
14
|
var CifField = cif_1.CifWriter.Field;
|
|
13
15
|
var E = cif_1.CifWriter.Encodings;
|
|
@@ -25,6 +27,61 @@ function atom_site_auth_asym_id(e) {
|
|
|
25
27
|
return l;
|
|
26
28
|
return l + suffix;
|
|
27
29
|
}
|
|
30
|
+
var atom_site_pdbx_label_index = {
|
|
31
|
+
shouldInclude: function (s) {
|
|
32
|
+
var _a;
|
|
33
|
+
return !!((_a = s.atom_site) === null || _a === void 0 ? void 0 : _a.pdbx_label_index.isDefined);
|
|
34
|
+
},
|
|
35
|
+
value: function (e, d) {
|
|
36
|
+
var srcIndex = d.sourceIndex.value(e.element);
|
|
37
|
+
return d.atom_site.pdbx_label_index.value(srcIndex);
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
var SIFTS = {
|
|
41
|
+
shouldInclude: function (s) {
|
|
42
|
+
return sifts_mapping_1.SIFTSMapping.isAvailable(s.structure.models[0]);
|
|
43
|
+
},
|
|
44
|
+
pdbx_sifts_xref_db_name: {
|
|
45
|
+
value: function (e, d) {
|
|
46
|
+
var srcIndex = d.sourceIndex.value(e.element);
|
|
47
|
+
return d.atom_site.pdbx_sifts_xref_db_name.value(srcIndex);
|
|
48
|
+
},
|
|
49
|
+
valueKind: function (e, d) {
|
|
50
|
+
var srcIndex = d.sourceIndex.value(e.element);
|
|
51
|
+
return d.atom_site.pdbx_sifts_xref_db_name.valueKind(srcIndex);
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
pdbx_sifts_xref_db_acc: {
|
|
55
|
+
value: function (e, d) {
|
|
56
|
+
var srcIndex = d.sourceIndex.value(e.element);
|
|
57
|
+
return d.atom_site.pdbx_sifts_xref_db_acc.value(srcIndex);
|
|
58
|
+
},
|
|
59
|
+
valueKind: function (e, d) {
|
|
60
|
+
var srcIndex = d.sourceIndex.value(e.element);
|
|
61
|
+
return d.atom_site.pdbx_sifts_xref_db_acc.valueKind(srcIndex);
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
pdbx_sifts_xref_db_num: {
|
|
65
|
+
value: function (e, d) {
|
|
66
|
+
var srcIndex = d.sourceIndex.value(e.element);
|
|
67
|
+
return d.atom_site.pdbx_sifts_xref_db_num.value(srcIndex);
|
|
68
|
+
},
|
|
69
|
+
valueKind: function (e, d) {
|
|
70
|
+
var srcIndex = d.sourceIndex.value(e.element);
|
|
71
|
+
return d.atom_site.pdbx_sifts_xref_db_num.valueKind(srcIndex);
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
pdbx_sifts_xref_db_res: {
|
|
75
|
+
value: function (e, d) {
|
|
76
|
+
var srcIndex = d.sourceIndex.value(e.element);
|
|
77
|
+
return d.atom_site.pdbx_sifts_xref_db_res.value(srcIndex);
|
|
78
|
+
},
|
|
79
|
+
valueKind: function (e, d) {
|
|
80
|
+
var srcIndex = d.sourceIndex.value(e.element);
|
|
81
|
+
return d.atom_site.pdbx_sifts_xref_db_res.valueKind(srcIndex);
|
|
82
|
+
},
|
|
83
|
+
}
|
|
84
|
+
};
|
|
28
85
|
var atom_site_fields = function () { return cif_1.CifWriter.fields()
|
|
29
86
|
.str('group_PDB', structure_1.StructureProperties.residue.group_PDB)
|
|
30
87
|
.index('id')
|
|
@@ -56,6 +113,12 @@ var atom_site_fields = function () { return cif_1.CifWriter.fields()
|
|
|
56
113
|
.int('auth_seq_id', structure_1.StructureProperties.residue.auth_seq_id, { encoder: E.deltaRLE })
|
|
57
114
|
.str('auth_asym_id', atom_site_auth_asym_id)
|
|
58
115
|
.int('pdbx_PDB_model_num', structure_1.StructureProperties.unit.model_num, { encoder: E.deltaRLE })
|
|
116
|
+
.int('pdbx_label_index', atom_site_pdbx_label_index.value, { shouldInclude: atom_site_pdbx_label_index.shouldInclude })
|
|
117
|
+
// SIFTS
|
|
118
|
+
.str('pdbx_sifts_xref_db_name', SIFTS.pdbx_sifts_xref_db_name.value, { shouldInclude: SIFTS.shouldInclude, valueKind: SIFTS.pdbx_sifts_xref_db_name.valueKind })
|
|
119
|
+
.str('pdbx_sifts_xref_db_acc', SIFTS.pdbx_sifts_xref_db_acc.value, { shouldInclude: SIFTS.shouldInclude, valueKind: SIFTS.pdbx_sifts_xref_db_acc.valueKind })
|
|
120
|
+
.str('pdbx_sifts_xref_db_num', SIFTS.pdbx_sifts_xref_db_num.value, { shouldInclude: SIFTS.shouldInclude, valueKind: SIFTS.pdbx_sifts_xref_db_num.valueKind })
|
|
121
|
+
.str('pdbx_sifts_xref_db_res', SIFTS.pdbx_sifts_xref_db_res.value, { shouldInclude: SIFTS.shouldInclude, valueKind: SIFTS.pdbx_sifts_xref_db_res.valueKind })
|
|
59
122
|
// .str('operator_name', P.unit.operator_name, {
|
|
60
123
|
// shouldInclude: structure => structure.units.some(u => !u.conformation.operator.isIdentity)
|
|
61
124
|
// })
|
|
@@ -67,7 +130,11 @@ exports._atom_site = {
|
|
|
67
130
|
return {
|
|
68
131
|
fields: atom_site_fields(),
|
|
69
132
|
source: structures.map(function (s) { return ({
|
|
70
|
-
data:
|
|
133
|
+
data: {
|
|
134
|
+
structure: s,
|
|
135
|
+
sourceIndex: s.model.atomicHierarchy.atomSourceIndex,
|
|
136
|
+
atom_site: mmcif_1.MmcifFormat.is(s.model.sourceData) ? s.model.sourceData.data.db.atom_site : void 0
|
|
137
|
+
},
|
|
71
138
|
rowCount: s.elementCount,
|
|
72
139
|
keys: function () { return s.elementLocations(); }
|
|
73
140
|
}); })
|
|
@@ -62,13 +62,13 @@ function findElements(ctx, kind) {
|
|
|
62
62
|
var key = secondaryStructure.key, elements = secondaryStructure.elements;
|
|
63
63
|
var ssElements = [];
|
|
64
64
|
var structure = ctx.structures[0];
|
|
65
|
-
for (var _i = 0, _a = structure.
|
|
66
|
-
var
|
|
67
|
-
|
|
68
|
-
if (!structure_1.Unit.isAtomic(
|
|
65
|
+
for (var _i = 0, _a = structure.unitSymmetryGroups; _i < _a.length; _i++) {
|
|
66
|
+
var units = _a[_i].units;
|
|
67
|
+
var u = units[0];
|
|
68
|
+
if (!structure_1.Unit.isAtomic(u))
|
|
69
69
|
continue;
|
|
70
|
-
var segs =
|
|
71
|
-
var residues = int_1.Segmentation.transientSegments(segs,
|
|
70
|
+
var segs = u.model.atomicHierarchy.residueAtomSegments;
|
|
71
|
+
var residues = int_1.Segmentation.transientSegments(segs, u.elements);
|
|
72
72
|
var current = void 0, move = true;
|
|
73
73
|
while (residues.hasNext) {
|
|
74
74
|
if (move)
|
|
@@ -87,8 +87,8 @@ function findElements(ctx, kind) {
|
|
|
87
87
|
if (startIdx !== key[current.index]) {
|
|
88
88
|
move = false;
|
|
89
89
|
ssElements[ssElements.length] = {
|
|
90
|
-
start: structure_1.StructureElement.Location.create(structure,
|
|
91
|
-
end: structure_1.StructureElement.Location.create(structure,
|
|
90
|
+
start: structure_1.StructureElement.Location.create(structure, u, segs.offsets[start]),
|
|
91
|
+
end: structure_1.StructureElement.Location.create(structure, u, segs.offsets[prev]),
|
|
92
92
|
length: prev - start + 1,
|
|
93
93
|
element: element
|
|
94
94
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2018 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>
|
|
@@ -1,14 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
|
+
* Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
6
6
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.CoarseHierarchy = void 0;
|
|
10
|
+
var db_1 = require("../../../../../mol-data/db");
|
|
11
|
+
var int_1 = require("../../../../../mol-data/int");
|
|
12
|
+
var sorted_ranges_1 = require("../../../../../mol-data/int/sorted-ranges");
|
|
13
|
+
var EmptyCoarseElements = {
|
|
14
|
+
chainKey: [],
|
|
15
|
+
entityKey: [],
|
|
16
|
+
findSequenceKey: function () { return -1; },
|
|
17
|
+
findChainKey: function () { return -1; },
|
|
18
|
+
getEntityFromChain: function () { return -1; },
|
|
19
|
+
count: 0,
|
|
20
|
+
entity_id: db_1.Column.Undefined(0, db_1.Column.Schema.str),
|
|
21
|
+
asym_id: db_1.Column.Undefined(0, db_1.Column.Schema.str),
|
|
22
|
+
seq_id_begin: db_1.Column.Undefined(0, db_1.Column.Schema.int),
|
|
23
|
+
seq_id_end: db_1.Column.Undefined(0, db_1.Column.Schema.int),
|
|
24
|
+
chainElementSegments: int_1.Segmentation.create([]),
|
|
25
|
+
polymerRanges: sorted_ranges_1.SortedRanges.ofSortedRanges([]),
|
|
26
|
+
gapRanges: sorted_ranges_1.SortedRanges.ofSortedRanges([]),
|
|
27
|
+
};
|
|
10
28
|
var CoarseHierarchy;
|
|
11
29
|
(function (CoarseHierarchy) {
|
|
12
|
-
CoarseHierarchy.Empty = {
|
|
30
|
+
CoarseHierarchy.Empty = {
|
|
31
|
+
isDefined: false,
|
|
32
|
+
spheres: EmptyCoarseElements,
|
|
33
|
+
gaussians: EmptyCoarseElements
|
|
34
|
+
};
|
|
13
35
|
})(CoarseHierarchy = exports.CoarseHierarchy || (exports.CoarseHierarchy = {}));
|
|
14
36
|
//# sourceMappingURL=hierarchy.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2017-
|
|
2
|
+
* Copyright (c) 2017-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>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2017-
|
|
3
|
+
* Copyright (c) 2017-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
6
6
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
@@ -491,7 +491,9 @@ exports.Loci = Loci;
|
|
|
491
491
|
if (!elementIndices)
|
|
492
492
|
continue;
|
|
493
493
|
var indices = getUnitIndices(unit.elements, elementIndices);
|
|
494
|
-
|
|
494
|
+
if (int_1.OrderedSet.size(indices)) {
|
|
495
|
+
elements[elements.length] = { unit: unit, indices: indices };
|
|
496
|
+
}
|
|
495
497
|
}
|
|
496
498
|
return Loci(loci.structure, elements);
|
|
497
499
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
|
+
*
|
|
4
|
+
* @author David Sehnal <david.sehnal@gmail.com>
|
|
5
|
+
* @author Sebastian Bittrich <sebastian.bittrich@rcsb.org>
|
|
6
|
+
*/
|
|
7
|
+
import { MinimizeRmsd } from '../../../../mol-math/linear-algebra/3d/minimize-rmsd';
|
|
8
|
+
import { Structure } from '../structure';
|
|
9
|
+
export interface AlignmentResultEntry {
|
|
10
|
+
transform: MinimizeRmsd.Result;
|
|
11
|
+
pivot: number;
|
|
12
|
+
other: number;
|
|
13
|
+
}
|
|
14
|
+
export interface AlignmentResult {
|
|
15
|
+
entries: AlignmentResultEntry[];
|
|
16
|
+
zeroOverlapPairs: [number, number][];
|
|
17
|
+
failedPairs: [number, number][];
|
|
18
|
+
}
|
|
19
|
+
export declare function alignAndSuperposeWithSIFTSMapping(structures: Structure[], options?: {
|
|
20
|
+
traceOnly?: boolean;
|
|
21
|
+
}): AlignmentResult;
|
|
@@ -1,34 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
|
+
* Copyright (c) 2021-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
6
|
+
* @author Sebastian Bittrich <sebastian.bittrich@rcsb.org>
|
|
6
7
|
*/
|
|
7
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.
|
|
9
|
+
exports.alignAndSuperposeWithSIFTSMapping = void 0;
|
|
9
10
|
var int_1 = require("../../../../mol-data/int");
|
|
10
|
-
var linear_algebra_1 = require("../../../../mol-math/linear-algebra");
|
|
11
11
|
var minimize_rmsd_1 = require("../../../../mol-math/linear-algebra/3d/minimize-rmsd");
|
|
12
|
-
var
|
|
13
|
-
function
|
|
12
|
+
var sifts_mapping_1 = require("../../../../mol-model-props/sequence/sifts-mapping");
|
|
13
|
+
function alignAndSuperposeWithSIFTSMapping(structures, options) {
|
|
14
|
+
var _a;
|
|
14
15
|
var indexMap = new Map();
|
|
15
16
|
for (var i = 0; i < structures.length; i++) {
|
|
16
|
-
buildIndex(structures[i], indexMap, i);
|
|
17
|
+
buildIndex(structures[i], indexMap, i, (_a = options === null || options === void 0 ? void 0 : options.traceOnly) !== null && _a !== void 0 ? _a : true);
|
|
17
18
|
}
|
|
18
19
|
var index = Array.from(indexMap.values());
|
|
19
20
|
// TODO: support non-first structure pivots
|
|
20
21
|
var pairs = findPairs(structures.length, index);
|
|
21
|
-
var
|
|
22
|
+
var zeroOverlapPairs = [];
|
|
23
|
+
var failedPairs = [];
|
|
24
|
+
var entries = [];
|
|
22
25
|
for (var _i = 0, pairs_1 = pairs; _i < pairs_1.length; _i++) {
|
|
23
26
|
var p = pairs_1[_i];
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
if (p.count === 0) {
|
|
28
|
+
zeroOverlapPairs.push([p.i, p.j]);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
var _b = getPositionTables(index, p.i, p.j, p.count), a = _b[0], b = _b[1];
|
|
32
|
+
var transform = minimize_rmsd_1.MinimizeRmsd.compute({ a: a, b: b });
|
|
33
|
+
if (Number.isNaN(transform.rmsd)) {
|
|
34
|
+
failedPairs.push([p.i, p.j]);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
entries.push({ transform: transform, pivot: p.i, other: p.j });
|
|
38
|
+
}
|
|
39
|
+
}
|
|
28
40
|
}
|
|
29
|
-
return
|
|
41
|
+
return { entries: entries, zeroOverlapPairs: zeroOverlapPairs, failedPairs: failedPairs };
|
|
30
42
|
}
|
|
31
|
-
exports.
|
|
43
|
+
exports.alignAndSuperposeWithSIFTSMapping = alignAndSuperposeWithSIFTSMapping;
|
|
32
44
|
function getPositionTables(index, pivot, other, N) {
|
|
33
45
|
var xs = minimize_rmsd_1.MinimizeRmsd.Positions.empty(N);
|
|
34
46
|
var ys = minimize_rmsd_1.MinimizeRmsd.Positions.empty(N);
|
|
@@ -40,7 +52,6 @@ function getPositionTables(index, pivot, other, N) {
|
|
|
40
52
|
if (!a || !b)
|
|
41
53
|
continue;
|
|
42
54
|
var l = Math.min(a[2] - a[1], b[2] - b[1]);
|
|
43
|
-
// TODO: allow to use just backbone atoms?
|
|
44
55
|
// TODO: check if residue types match?
|
|
45
56
|
for (var i = 0; i < l; i++) {
|
|
46
57
|
var eI = (a[1] + i);
|
|
@@ -94,19 +105,20 @@ function findPairs(N, index) {
|
|
|
94
105
|
// }
|
|
95
106
|
return ret;
|
|
96
107
|
}
|
|
97
|
-
function buildIndex(structure, index, sI) {
|
|
108
|
+
function buildIndex(structure, index, sI, traceOnly) {
|
|
98
109
|
var _a;
|
|
99
110
|
for (var _i = 0, _b = structure.units; _i < _b.length; _i++) {
|
|
100
111
|
var unit = _b[_i];
|
|
101
112
|
if (unit.kind !== 0 /* Atomic */)
|
|
102
113
|
continue;
|
|
103
114
|
var elements = unit.elements, model = unit.model;
|
|
104
|
-
var map =
|
|
115
|
+
var map = sifts_mapping_1.SIFTSMapping.Provider.get(model).value;
|
|
105
116
|
if (!map)
|
|
106
117
|
return;
|
|
107
118
|
var dbName = map.dbName, accession = map.accession, num = map.num;
|
|
108
119
|
var chainsIt = int_1.Segmentation.transientSegments(unit.model.atomicHierarchy.chainAtomSegments, elements);
|
|
109
120
|
var residuesIt = int_1.Segmentation.transientSegments(unit.model.atomicHierarchy.residueAtomSegments, elements);
|
|
121
|
+
var traceElementIndex = unit.model.atomicHierarchy.derived.residue.traceElementIndex;
|
|
110
122
|
while (chainsIt.hasNext) {
|
|
111
123
|
var chainSegment = chainsIt.move();
|
|
112
124
|
residuesIt.setSegment(chainSegment);
|
|
@@ -115,8 +127,17 @@ function buildIndex(structure, index, sI) {
|
|
|
115
127
|
var rI = residueSegment.index;
|
|
116
128
|
if (!dbName[rI])
|
|
117
129
|
continue;
|
|
118
|
-
var start =
|
|
119
|
-
|
|
130
|
+
var start = void 0, end = void 0;
|
|
131
|
+
if (traceOnly) {
|
|
132
|
+
start = traceElementIndex[rI];
|
|
133
|
+
if (start === -1)
|
|
134
|
+
continue;
|
|
135
|
+
end = start + 1;
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
start = elements[residueSegment.start];
|
|
139
|
+
end = elements[residueSegment.end - 1] + 1;
|
|
140
|
+
}
|
|
120
141
|
var key = "".concat(dbName[rI], "-").concat(accession[rI], "-").concat(num[rI]);
|
|
121
142
|
if (!index.has(key)) {
|
|
122
143
|
index.set(key, { key: key, pivots: (_a = {}, _a[sI] = [unit, start, end], _a) });
|
|
@@ -130,6 +151,5 @@ function buildIndex(structure, index, sI) {
|
|
|
130
151
|
}
|
|
131
152
|
}
|
|
132
153
|
}
|
|
133
|
-
console.log(index);
|
|
134
154
|
}
|
|
135
|
-
//# sourceMappingURL=superposition-
|
|
155
|
+
//# sourceMappingURL=superposition-sifts-mapping.js.map
|
|
@@ -48,6 +48,13 @@ export declare namespace Volume {
|
|
|
48
48
|
function toRelative(value: IsoValue, stats: Grid['stats']): Relative;
|
|
49
49
|
function toString(value: IsoValue): string;
|
|
50
50
|
}
|
|
51
|
+
function adjustedIsoValue(volume: Volume, value: number, kind: 'absolute' | 'relative'): Readonly<{
|
|
52
|
+
kind: "absolute";
|
|
53
|
+
absoluteValue: number;
|
|
54
|
+
}> | Readonly<{
|
|
55
|
+
kind: "relative";
|
|
56
|
+
relativeValue: number;
|
|
57
|
+
}>;
|
|
51
58
|
function createIsoValueParam(defaultValue: Volume.IsoValue, stats?: Grid['stats']): PD.Conditioned<Readonly<{
|
|
52
59
|
kind: "absolute";
|
|
53
60
|
absoluteValue: number;
|
|
@@ -16,6 +16,7 @@ var common_1 = require("../../mol-math/linear-algebra/3d/common");
|
|
|
16
16
|
var custom_property_1 = require("../custom-property");
|
|
17
17
|
var param_definition_1 = require("../../mol-util/param-definition");
|
|
18
18
|
var number_1 = require("../../mol-util/number");
|
|
19
|
+
var density_server_1 = require("../../mol-model-formats/volume/density-server");
|
|
19
20
|
var Volume;
|
|
20
21
|
(function (Volume) {
|
|
21
22
|
function is(x) {
|
|
@@ -60,6 +61,23 @@ var Volume;
|
|
|
60
61
|
}
|
|
61
62
|
IsoValue.toString = toString;
|
|
62
63
|
})(IsoValue = Volume.IsoValue || (Volume.IsoValue = {}));
|
|
64
|
+
// Converts iso value to relative if using downsample VolumeServer data
|
|
65
|
+
function adjustedIsoValue(volume, value, kind) {
|
|
66
|
+
if (kind === 'relative')
|
|
67
|
+
return IsoValue.relative(value);
|
|
68
|
+
var absolute = IsoValue.absolute(value);
|
|
69
|
+
if (density_server_1.DscifFormat.is(volume.sourceData)) {
|
|
70
|
+
var stats = {
|
|
71
|
+
min: volume.sourceData.data.volume_data_3d_info.min_source.value(0),
|
|
72
|
+
max: volume.sourceData.data.volume_data_3d_info.max_source.value(0),
|
|
73
|
+
mean: volume.sourceData.data.volume_data_3d_info.mean_source.value(0),
|
|
74
|
+
sigma: volume.sourceData.data.volume_data_3d_info.sigma_source.value(0),
|
|
75
|
+
};
|
|
76
|
+
return Volume.IsoValue.toRelative(absolute, stats);
|
|
77
|
+
}
|
|
78
|
+
return absolute;
|
|
79
|
+
}
|
|
80
|
+
Volume.adjustedIsoValue = adjustedIsoValue;
|
|
63
81
|
var defaultStats = { min: -1, max: 1, mean: 0, sigma: 0.1 };
|
|
64
82
|
function createIsoValueParam(defaultValue, stats) {
|
|
65
83
|
var sts = stats || defaultStats;
|
|
@@ -125,6 +125,11 @@ export declare const BasicSchema: {
|
|
|
125
125
|
pdbx_PDB_ins_code: import("../../../mol-data/db/column").Column.Schema.Str;
|
|
126
126
|
pdbx_PDB_model_num: import("../../../mol-data/db/column").Column.Schema.Int;
|
|
127
127
|
pdbx_formal_charge: import("../../../mol-data/db/column").Column.Schema.Int;
|
|
128
|
+
pdbx_label_index: import("../../../mol-data/db/column").Column.Schema.Int;
|
|
129
|
+
pdbx_sifts_xref_db_name: import("../../../mol-data/db/column").Column.Schema.Str;
|
|
130
|
+
pdbx_sifts_xref_db_acc: import("../../../mol-data/db/column").Column.Schema.Str;
|
|
131
|
+
pdbx_sifts_xref_db_num: import("../../../mol-data/db/column").Column.Schema.Str;
|
|
132
|
+
pdbx_sifts_xref_db_res: import("../../../mol-data/db/column").Column.Schema.Str;
|
|
128
133
|
ihm_model_id: import("../../../mol-data/db/column").Column.Schema.Int;
|
|
129
134
|
};
|
|
130
135
|
ihm_sphere_obj_site: {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
2
|
+
* Copyright (c) 2020-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
5
|
+
* @author David Sehnal <david.sehnal@gmail.com>
|
|
5
6
|
*/
|
|
6
7
|
import { Model } from '../../../mol-model/structure';
|
|
7
8
|
import { ModelFormat } from '../../format';
|
|
@@ -24,5 +25,7 @@ interface FormatPropertyProvider<T> {
|
|
|
24
25
|
delete(model: Model): void;
|
|
25
26
|
}
|
|
26
27
|
declare namespace FormatPropertyProvider {
|
|
27
|
-
function create<T>(descriptor: CustomPropertyDescriptor
|
|
28
|
+
function create<T>(descriptor: CustomPropertyDescriptor, options?: {
|
|
29
|
+
asDynamic?: boolean;
|
|
30
|
+
}): FormatPropertyProvider<T>;
|
|
28
31
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
|
+
* Copyright (c) 2020-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
6
|
+
* @author David Sehnal <david.sehnal@gmail.com>
|
|
6
7
|
*/
|
|
7
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
9
|
exports.FormatPropertyProvider = void 0;
|
|
@@ -31,7 +32,7 @@ var FormatRegistry = /** @class */ (function () {
|
|
|
31
32
|
}());
|
|
32
33
|
var FormatPropertyProvider;
|
|
33
34
|
(function (FormatPropertyProvider) {
|
|
34
|
-
function create(descriptor) {
|
|
35
|
+
function create(descriptor, options) {
|
|
35
36
|
var name = descriptor.name;
|
|
36
37
|
var formatRegistry = new FormatRegistry();
|
|
37
38
|
return {
|
|
@@ -41,22 +42,33 @@ var FormatPropertyProvider;
|
|
|
41
42
|
return formatRegistry.isApplicable(model);
|
|
42
43
|
},
|
|
43
44
|
get: function (model) {
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
var store = (options === null || options === void 0 ? void 0 : options.asDynamic) ? model._dynamicPropertyData : model._staticPropertyData;
|
|
46
|
+
if (store[name])
|
|
47
|
+
return store[name];
|
|
46
48
|
if (model.customProperties.has(descriptor))
|
|
47
49
|
return;
|
|
48
50
|
var obtain = formatRegistry.get(model.sourceData.kind);
|
|
49
51
|
if (!obtain)
|
|
50
52
|
return;
|
|
51
|
-
|
|
53
|
+
store[name] = obtain(model);
|
|
52
54
|
model.customProperties.add(descriptor);
|
|
53
|
-
return
|
|
55
|
+
return store[name];
|
|
54
56
|
},
|
|
55
57
|
set: function (model, value) {
|
|
56
|
-
|
|
58
|
+
if (options === null || options === void 0 ? void 0 : options.asDynamic) {
|
|
59
|
+
model._dynamicPropertyData[name] = value;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
model._staticPropertyData[name] = value;
|
|
63
|
+
}
|
|
57
64
|
},
|
|
58
65
|
delete: function (model) {
|
|
59
|
-
|
|
66
|
+
if (options === null || options === void 0 ? void 0 : options.asDynamic) {
|
|
67
|
+
delete model._dynamicPropertyData[name];
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
delete model._staticPropertyData[name];
|
|
71
|
+
}
|
|
60
72
|
}
|
|
61
73
|
};
|
|
62
74
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Copyright (c) 2019-2022 Mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
5
|
+
* @author David Sehnal <david.sehnal@gmail.com>
|
|
5
6
|
*/
|
|
6
7
|
import { CustomPropertyDescriptor } from '../../../../mol-model/custom-property';
|
|
7
8
|
import { IntAdjacencyGraph } from '../../../../mol-math/graph';
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Copyright (c) 2019-2022 Mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
6
|
+
* @author David Sehnal <david.sehnal@gmail.com>
|
|
6
7
|
*/
|
|
7
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
9
|
exports.IndexPairBonds = void 0;
|
|
@@ -29,7 +30,7 @@ var IndexPairBonds;
|
|
|
29
30
|
IndexPairBonds.Descriptor = {
|
|
30
31
|
name: 'index_pair_bonds',
|
|
31
32
|
};
|
|
32
|
-
IndexPairBonds.Provider = property_1.FormatPropertyProvider.create(IndexPairBonds.Descriptor);
|
|
33
|
+
IndexPairBonds.Provider = property_1.FormatPropertyProvider.create(IndexPairBonds.Descriptor, { asDynamic: true });
|
|
33
34
|
IndexPairBonds.DefaultProps = {
|
|
34
35
|
/**
|
|
35
36
|
* If negative, test using element-based threshold, otherwise distance in Angstrom.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2019-
|
|
3
|
+
* Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
6
6
|
*/
|
|
@@ -64,29 +64,21 @@ var InteractionsInterContacts = /** @class */ (function (_super) {
|
|
|
64
64
|
(0, tslib_1.__extends)(InteractionsInterContacts, _super);
|
|
65
65
|
function InteractionsInterContacts(map, unitsFeatures) {
|
|
66
66
|
var _this = _super.call(this, map) || this;
|
|
67
|
-
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
var
|
|
71
|
-
var
|
|
72
|
-
|
|
73
|
-
elementKeyIndex.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
for (var j = offsetsA[indexA], jl = offsetsA[indexA + 1]; j < jl; ++j) {
|
|
83
|
-
add(membersA[j], unitA);
|
|
84
|
-
}
|
|
85
|
-
count += 1;
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
_this.elementKeyIndex = elementKeyIndex;
|
|
67
|
+
_this.elementKeyIndex = new Map();
|
|
68
|
+
for (var i = 0, il = _this.edges.length; i < il; ++i) {
|
|
69
|
+
var _a = _this.edges[i], unitA = _a.unitA, indexA = _a.indexA;
|
|
70
|
+
var _b = unitsFeatures.get(unitA), offsets = _b.offsets, members = _b.members;
|
|
71
|
+
for (var j = offsets[indexA], jl = offsets[indexA + 1]; j < jl; ++j) {
|
|
72
|
+
var vertexKey = _this.getElementKey(members[j], unitA);
|
|
73
|
+
var e = _this.elementKeyIndex.get(vertexKey);
|
|
74
|
+
if (e === undefined) {
|
|
75
|
+
_this.elementKeyIndex.set(vertexKey, [i]);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
e.push(i);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
90
82
|
return _this;
|
|
91
83
|
}
|
|
92
84
|
InteractionsInterContacts.prototype.getContactIndicesForElement = function (index, unit) {
|