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,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2019-
|
|
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
5
|
*/
|
|
@@ -63,11 +63,12 @@ function createInterUnitInteractionCylinderMesh(ctx, structure, theme, props, me
|
|
|
63
63
|
if (!childUnitA)
|
|
64
64
|
return true;
|
|
65
65
|
var unitA = structure.unitMap.get(b.unitA);
|
|
66
|
-
var
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
var _a = unitsFeatures.get(b.unitA), offsets = _a.offsets, members = _a.members;
|
|
67
|
+
for (var i = offsets[b.indexA], il = offsets[b.indexA + 1]; i < il; ++i) {
|
|
68
|
+
var eA = unitA.elements[members[i]];
|
|
69
|
+
if (!SortedArray.has(childUnitA.elements, eA))
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
71
72
|
}
|
|
72
73
|
return false;
|
|
73
74
|
}
|
|
@@ -115,8 +116,9 @@ function getInteractionLoci(pickingId, structure, id) {
|
|
|
115
116
|
}
|
|
116
117
|
return EmptyLoci;
|
|
117
118
|
}
|
|
119
|
+
var __unitMap = new Map();
|
|
120
|
+
var __contactIndicesSet = new Set();
|
|
118
121
|
function eachInteraction(loci, structure, apply, isMarking) {
|
|
119
|
-
var _a;
|
|
120
122
|
var changed = false;
|
|
121
123
|
if (Interactions.isLoci(loci)) {
|
|
122
124
|
if (!Structure.areEquivalent(loci.data.structure, structure))
|
|
@@ -125,8 +127,8 @@ function eachInteraction(loci, structure, apply, isMarking) {
|
|
|
125
127
|
if (loci.data.interactions !== interactions)
|
|
126
128
|
return false;
|
|
127
129
|
var contacts = interactions.contacts;
|
|
128
|
-
for (var _i = 0,
|
|
129
|
-
var c =
|
|
130
|
+
for (var _i = 0, _a = loci.elements; _i < _a.length; _i++) {
|
|
131
|
+
var c = _a[_i];
|
|
130
132
|
var idx = contacts.getEdgeIndex(c.indexA, c.unitA.id, c.indexB, c.unitB.id);
|
|
131
133
|
if (idx !== -1) {
|
|
132
134
|
if (apply(Interval.ofSingleton(idx)))
|
|
@@ -139,28 +141,52 @@ function eachInteraction(loci, structure, apply, isMarking) {
|
|
|
139
141
|
return false;
|
|
140
142
|
if (isMarking && loci.elements.length === 1)
|
|
141
143
|
return false; // only a single unit
|
|
142
|
-
var
|
|
143
|
-
if (!
|
|
144
|
+
var interactions = InteractionsProvider.get(structure).value;
|
|
145
|
+
if (!interactions)
|
|
144
146
|
return false;
|
|
147
|
+
var contacts_1 = interactions.contacts, unitsFeatures_1 = interactions.unitsFeatures;
|
|
148
|
+
for (var _b = 0, _c = loci.elements; _b < _c.length; _b++) {
|
|
149
|
+
var e = _c[_b];
|
|
150
|
+
__unitMap.set(e.unit.id, e.indices);
|
|
151
|
+
}
|
|
145
152
|
var _loop_1 = function (e) {
|
|
146
153
|
var unit = e.unit;
|
|
147
154
|
if (!Unit.isAtomic(unit))
|
|
148
155
|
return "continue";
|
|
149
|
-
if (isMarking && OrderedSet.size(e.indices) === 1)
|
|
150
|
-
return "continue";
|
|
151
156
|
OrderedSet.forEach(e.indices, function (v) {
|
|
152
157
|
for (var _i = 0, _a = contacts_1.getContactIndicesForElement(v, unit); _i < _a.length; _i++) {
|
|
153
158
|
var idx = _a[_i];
|
|
154
|
-
|
|
155
|
-
changed = true;
|
|
159
|
+
__contactIndicesSet.add(idx);
|
|
156
160
|
}
|
|
157
161
|
});
|
|
158
162
|
};
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
var e = _d[_c];
|
|
163
|
+
for (var _d = 0, _e = loci.elements; _d < _e.length; _d++) {
|
|
164
|
+
var e = _e[_d];
|
|
162
165
|
_loop_1(e);
|
|
163
166
|
}
|
|
167
|
+
__contactIndicesSet.forEach(function (i) {
|
|
168
|
+
if (isMarking) {
|
|
169
|
+
var _a = contacts_1.edges[i], indexA = _a.indexA, unitA = _a.unitA, indexB = _a.indexB, unitB = _a.unitB;
|
|
170
|
+
var indicesA = __unitMap.get(unitA);
|
|
171
|
+
var indicesB = __unitMap.get(unitB);
|
|
172
|
+
if (!indicesA || !indicesB)
|
|
173
|
+
return;
|
|
174
|
+
var _b = unitsFeatures_1.get(unitA), offsetsA = _b.offsets, membersA = _b.members;
|
|
175
|
+
for (var j = offsetsA[indexA], jl = offsetsA[indexA + 1]; j < jl; ++j) {
|
|
176
|
+
if (!OrderedSet.has(indicesA, membersA[j]))
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
var _c = unitsFeatures_1.get(unitB), offsetsB = _c.offsets, membersB = _c.members;
|
|
180
|
+
for (var j = offsetsB[indexB], jl = offsetsB[indexB + 1]; j < jl; ++j) {
|
|
181
|
+
if (!OrderedSet.has(indicesB, membersB[j]))
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
if (apply(Interval.ofSingleton(i)))
|
|
186
|
+
changed = true;
|
|
187
|
+
});
|
|
188
|
+
__unitMap.clear();
|
|
189
|
+
__contactIndicesSet.clear();
|
|
164
190
|
}
|
|
165
191
|
return changed;
|
|
166
192
|
}
|
|
@@ -49,9 +49,19 @@ function createIntraUnitInteractionsCylinderMesh(ctx, unit, structure, theme, pr
|
|
|
49
49
|
var sizeB = theme.size.size(location);
|
|
50
50
|
return Math.min(sizeA, sizeB) * sizeFactor;
|
|
51
51
|
},
|
|
52
|
-
ignore: function (edgeIndex) {
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
ignore: function (edgeIndex) {
|
|
53
|
+
if (flag[edgeIndex] === 1 /* Filtered */)
|
|
54
|
+
return true;
|
|
55
|
+
if (childUnit) {
|
|
56
|
+
var f = a[edgeIndex];
|
|
57
|
+
for (var i = offsets[f], jl = offsets[f + 1]; i < jl; ++i) {
|
|
58
|
+
var e = unit.elements[members[offsets[i]]];
|
|
59
|
+
if (!SortedArray.has(childUnit.elements, e))
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
55
65
|
};
|
|
56
66
|
m = createLinkCylinderMesh(ctx, builderProps, props, mesh);
|
|
57
67
|
sphere = Sphere3D.expand(Sphere3D(), (childUnit !== null && childUnit !== void 0 ? childUnit : unit).boundary.sphere, 1 * sizeFactor);
|
|
@@ -143,7 +153,6 @@ function eachInteraction(loci, structureGroup, apply, isMarking) {
|
|
|
143
153
|
var unitIdx = group.unitIndexMap.get(e.unit.id);
|
|
144
154
|
if (unitIdx === undefined)
|
|
145
155
|
return "continue";
|
|
146
|
-
__contactIndicesSet.clear();
|
|
147
156
|
OrderedSet.forEach(e.indices, function (v) {
|
|
148
157
|
for (var i = fOffsets_1[v], il = fOffsets_1[v + 1]; i < il; ++i) {
|
|
149
158
|
var fI = fIndices_1[i];
|
|
@@ -168,6 +177,7 @@ function eachInteraction(loci, structureGroup, apply, isMarking) {
|
|
|
168
177
|
if (apply(Interval.ofSingleton(unitIdx * groupCount_1 + i)))
|
|
169
178
|
changed = true;
|
|
170
179
|
});
|
|
180
|
+
__contactIndicesSet.clear();
|
|
171
181
|
};
|
|
172
182
|
for (var _c = 0, _d = loci.elements; _c < _d.length; _c++) {
|
|
173
183
|
var e = _d[_c];
|
|
@@ -3,17 +3,19 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
5
5
|
*/
|
|
6
|
+
import { Model } from '../../mol-model/structure';
|
|
6
7
|
import { StructureElement } from '../../mol-model/structure/structure';
|
|
7
8
|
import { CustomModelProperty } from '../common/custom-model-property';
|
|
8
|
-
export {
|
|
9
|
-
interface
|
|
9
|
+
export { SIFTSMapping as SIFTSMapping };
|
|
10
|
+
interface SIFTSMappingMapping {
|
|
10
11
|
readonly dbName: string[];
|
|
11
12
|
readonly accession: string[];
|
|
12
|
-
readonly num:
|
|
13
|
+
readonly num: string[];
|
|
13
14
|
readonly residue: string[];
|
|
14
15
|
}
|
|
15
|
-
declare namespace
|
|
16
|
-
const Provider: CustomModelProperty.Provider<{},
|
|
16
|
+
declare namespace SIFTSMapping {
|
|
17
|
+
const Provider: CustomModelProperty.Provider<{}, SIFTSMappingMapping>;
|
|
18
|
+
function isAvailable(model: Model): boolean;
|
|
17
19
|
function getKey(loc: StructureElement.Location): string;
|
|
18
20
|
function getLabel(loc: StructureElement.Location): string | undefined;
|
|
19
21
|
}
|
|
@@ -7,38 +7,45 @@ import { __awaiter, __generator } from "tslib";
|
|
|
7
7
|
import { MmcifFormat } from '../../mol-model-formats/structure/mmcif';
|
|
8
8
|
import { CustomPropertyDescriptor } from '../../mol-model/custom-property';
|
|
9
9
|
import { CustomModelProperty } from '../common/custom-model-property';
|
|
10
|
-
export {
|
|
11
|
-
var
|
|
12
|
-
(function (
|
|
10
|
+
export { SIFTSMapping as SIFTSMapping };
|
|
11
|
+
var SIFTSMapping;
|
|
12
|
+
(function (SIFTSMapping) {
|
|
13
13
|
var _this = this;
|
|
14
|
-
|
|
15
|
-
label: '
|
|
14
|
+
SIFTSMapping.Provider = CustomModelProperty.createProvider({
|
|
15
|
+
label: 'SIFTS Mapping',
|
|
16
16
|
descriptor: CustomPropertyDescriptor({
|
|
17
|
-
name: '
|
|
17
|
+
name: 'sifts_sequence_mapping'
|
|
18
18
|
}),
|
|
19
19
|
type: 'static',
|
|
20
20
|
defaultParams: {},
|
|
21
21
|
getParams: function () { return ({}); },
|
|
22
|
-
isApplicable: function (data) {
|
|
22
|
+
isApplicable: function (data) { return isAvailable(data); },
|
|
23
23
|
obtain: function (ctx, data) { return __awaiter(_this, void 0, void 0, function () {
|
|
24
24
|
return __generator(this, function (_a) {
|
|
25
25
|
return [2 /*return*/, { value: fromCif(data) }];
|
|
26
26
|
});
|
|
27
27
|
}); }
|
|
28
28
|
});
|
|
29
|
+
function isAvailable(model) {
|
|
30
|
+
if (!MmcifFormat.is(model.sourceData))
|
|
31
|
+
return false;
|
|
32
|
+
var _a = model.sourceData.data.db.atom_site, db_name = _a.pdbx_sifts_xref_db_name, db_acc = _a.pdbx_sifts_xref_db_acc, db_num = _a.pdbx_sifts_xref_db_num, db_res = _a.pdbx_sifts_xref_db_res;
|
|
33
|
+
return db_name.isDefined && db_acc.isDefined && db_num.isDefined && db_res.isDefined;
|
|
34
|
+
}
|
|
35
|
+
SIFTSMapping.isAvailable = isAvailable;
|
|
29
36
|
function getKey(loc) {
|
|
30
37
|
var model = loc.unit.model;
|
|
31
|
-
var data =
|
|
38
|
+
var data = SIFTSMapping.Provider.get(model).value;
|
|
32
39
|
if (!data)
|
|
33
40
|
return '';
|
|
34
41
|
var eI = loc.unit.elements[loc.element];
|
|
35
42
|
var rI = model.atomicHierarchy.residueAtomSegments.index[eI];
|
|
36
43
|
return data.accession[rI];
|
|
37
44
|
}
|
|
38
|
-
|
|
45
|
+
SIFTSMapping.getKey = getKey;
|
|
39
46
|
function getLabel(loc) {
|
|
40
47
|
var model = loc.unit.model;
|
|
41
|
-
var data =
|
|
48
|
+
var data = SIFTSMapping.Provider.get(model).value;
|
|
42
49
|
if (!data)
|
|
43
50
|
return;
|
|
44
51
|
var eI = loc.unit.elements[loc.element];
|
|
@@ -48,19 +55,15 @@ var BestDatabaseSequenceMapping;
|
|
|
48
55
|
return;
|
|
49
56
|
return "".concat(dbName, " ").concat(data.accession[rI], " ").concat(data.num[rI], " ").concat(data.residue[rI]);
|
|
50
57
|
}
|
|
51
|
-
|
|
58
|
+
SIFTSMapping.getLabel = getLabel;
|
|
52
59
|
function fromCif(model) {
|
|
53
60
|
if (!MmcifFormat.is(model.sourceData))
|
|
54
61
|
return;
|
|
55
|
-
var
|
|
56
|
-
|
|
57
|
-
var db_acc = atom_site.getField('pdbx_sifts_xref_db_acc');
|
|
58
|
-
var db_num = atom_site.getField('pdbx_sifts_xref_db_num');
|
|
59
|
-
var db_res = atom_site.getField('pdbx_sifts_xref_db_res');
|
|
60
|
-
if (!db_name || !db_acc || !db_num || !db_res)
|
|
62
|
+
var _a = model.sourceData.data.db.atom_site, db_name = _a.pdbx_sifts_xref_db_name, db_acc = _a.pdbx_sifts_xref_db_acc, db_num = _a.pdbx_sifts_xref_db_num, db_res = _a.pdbx_sifts_xref_db_res;
|
|
63
|
+
if (!db_name.isDefined || !db_acc.isDefined || !db_num.isDefined || !db_res.isDefined)
|
|
61
64
|
return;
|
|
62
65
|
var atomSourceIndex = model.atomicHierarchy.atomSourceIndex;
|
|
63
|
-
var
|
|
66
|
+
var _b = model.atomicHierarchy.residueAtomSegments, count = _b.count, residueOffsets = _b.offsets;
|
|
64
67
|
var dbName = new Array(count);
|
|
65
68
|
var accession = new Array(count);
|
|
66
69
|
var num = new Array(count);
|
|
@@ -70,16 +73,16 @@ var BestDatabaseSequenceMapping;
|
|
|
70
73
|
if (db_name.valueKind(row) !== 0 /* Present */) {
|
|
71
74
|
dbName[i] = '';
|
|
72
75
|
accession[i] = '';
|
|
73
|
-
num[i] =
|
|
76
|
+
num[i] = '';
|
|
74
77
|
residue[i] = '';
|
|
75
78
|
continue;
|
|
76
79
|
}
|
|
77
|
-
dbName[i] = db_name.
|
|
78
|
-
accession[i] = db_acc.
|
|
79
|
-
num[i] = db_num.
|
|
80
|
-
residue[i] = db_res.
|
|
80
|
+
dbName[i] = db_name.value(row);
|
|
81
|
+
accession[i] = db_acc.value(row);
|
|
82
|
+
num[i] = db_num.value(row);
|
|
83
|
+
residue[i] = db_res.value(row);
|
|
81
84
|
}
|
|
82
85
|
return { dbName: dbName, accession: accession, num: num, residue: residue };
|
|
83
86
|
}
|
|
84
|
-
})(
|
|
85
|
-
//# sourceMappingURL=
|
|
87
|
+
})(SIFTSMapping || (SIFTSMapping = {}));
|
|
88
|
+
//# sourceMappingURL=sifts-mapping.js.map
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { ColorTheme } from '../../../mol-theme/color';
|
|
7
7
|
import { ThemeDataContext } from '../../../mol-theme/theme';
|
|
8
8
|
import { ParamDefinition as PD } from '../../../mol-util/param-definition';
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const SIFTSMappingColorThemeParams: {
|
|
10
10
|
palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
|
|
11
11
|
maxCount: number;
|
|
12
12
|
hue: [number, number];
|
|
@@ -21,8 +21,8 @@ export declare const BestDatabaseSequenceMappingColorThemeParams: {
|
|
|
21
21
|
};
|
|
22
22
|
}>, "colors">>;
|
|
23
23
|
};
|
|
24
|
-
export declare type
|
|
25
|
-
export declare function
|
|
24
|
+
export declare type SIFTSMappingColorThemeParams = typeof SIFTSMappingColorThemeParams;
|
|
25
|
+
export declare function getSIFTSMappingColorThemeParams(ctx: ThemeDataContext): {
|
|
26
26
|
palette: PD.Mapped<PD.NamedParams<PD.Normalize<{
|
|
27
27
|
maxCount: number;
|
|
28
28
|
hue: [number, number];
|
|
@@ -37,5 +37,5 @@ export declare function getBestDatabaseSequenceMappingColorThemeParams(ctx: Them
|
|
|
37
37
|
};
|
|
38
38
|
}>, "colors">>;
|
|
39
39
|
};
|
|
40
|
-
export declare function
|
|
41
|
-
export declare const
|
|
40
|
+
export declare function SIFTSMappingColorTheme(ctx: ThemeDataContext, props: PD.Values<SIFTSMappingColorThemeParams>): ColorTheme<SIFTSMappingColorThemeParams>;
|
|
41
|
+
export declare const SIFTSMappingColorThemeProvider: ColorTheme.Provider<SIFTSMappingColorThemeParams, 'sifts-mapping'>;
|
|
@@ -8,21 +8,21 @@ import { Bond, StructureElement, Unit } from '../../../mol-model/structure';
|
|
|
8
8
|
import { Color } from '../../../mol-util/color';
|
|
9
9
|
import { getPalette, getPaletteParams } from '../../../mol-util/color/palette';
|
|
10
10
|
import { ParamDefinition as PD } from '../../../mol-util/param-definition';
|
|
11
|
-
import {
|
|
11
|
+
import { SIFTSMapping } from '../sifts-mapping';
|
|
12
12
|
var DefaultColor = Color(0xFAFAFA);
|
|
13
|
-
var Description = 'Assigns a color based on
|
|
13
|
+
var Description = 'Assigns a color based on SIFTS mapping.';
|
|
14
14
|
// same colors for same accessions
|
|
15
15
|
var globalAccessionMap = new Map();
|
|
16
|
-
export var
|
|
17
|
-
export function
|
|
18
|
-
return
|
|
16
|
+
export var SIFTSMappingColorThemeParams = __assign({}, getPaletteParams({ type: 'colors', colorList: 'set-1' }));
|
|
17
|
+
export function getSIFTSMappingColorThemeParams(ctx) {
|
|
18
|
+
return SIFTSMappingColorThemeParams; // TODO return copy
|
|
19
19
|
}
|
|
20
|
-
export function
|
|
20
|
+
export function SIFTSMappingColorTheme(ctx, props) {
|
|
21
21
|
var color;
|
|
22
22
|
if (ctx.structure) {
|
|
23
23
|
for (var _i = 0, _a = ctx.structure.models; _i < _a.length; _i++) {
|
|
24
24
|
var m = _a[_i];
|
|
25
|
-
var mapping =
|
|
25
|
+
var mapping = SIFTSMapping.Provider.get(m).value;
|
|
26
26
|
if (!mapping)
|
|
27
27
|
continue;
|
|
28
28
|
for (var _b = 0, _c = mapping.accession; _b < _c.length; _b++) {
|
|
@@ -36,7 +36,7 @@ export function BestDatabaseSequenceMappingColorTheme(ctx, props) {
|
|
|
36
36
|
var palette_1 = getPalette(globalAccessionMap.size + 1, props, { valueLabel: function (i) { return "".concat(i); } });
|
|
37
37
|
var colorMap_1 = new Map();
|
|
38
38
|
var getColor_1 = function (location) {
|
|
39
|
-
var key =
|
|
39
|
+
var key = SIFTSMapping.getKey(location);
|
|
40
40
|
if (!key)
|
|
41
41
|
return DefaultColor;
|
|
42
42
|
if (colorMap_1.has(key))
|
|
@@ -61,7 +61,7 @@ export function BestDatabaseSequenceMappingColorTheme(ctx, props) {
|
|
|
61
61
|
color = function () { return DefaultColor; };
|
|
62
62
|
}
|
|
63
63
|
return {
|
|
64
|
-
factory:
|
|
64
|
+
factory: SIFTSMappingColorTheme,
|
|
65
65
|
granularity: 'group',
|
|
66
66
|
preferSmoothing: true,
|
|
67
67
|
color: color,
|
|
@@ -69,14 +69,14 @@ export function BestDatabaseSequenceMappingColorTheme(ctx, props) {
|
|
|
69
69
|
description: Description,
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
export var
|
|
73
|
-
name: '
|
|
74
|
-
label: '
|
|
72
|
+
export var SIFTSMappingColorThemeProvider = {
|
|
73
|
+
name: 'sifts-mapping',
|
|
74
|
+
label: 'SIFTS Mapping',
|
|
75
75
|
category: "Residue Property" /* Residue */,
|
|
76
|
-
factory:
|
|
77
|
-
getParams:
|
|
78
|
-
defaultValues: PD.getDefaultValues(
|
|
79
|
-
isApplicable: function (ctx) { var _a; return !!((_a = ctx.structure) === null || _a === void 0 ? void 0 : _a.models.some(function (m) { return
|
|
76
|
+
factory: SIFTSMappingColorTheme,
|
|
77
|
+
getParams: getSIFTSMappingColorThemeParams,
|
|
78
|
+
defaultValues: PD.getDefaultValues(SIFTSMappingColorThemeParams),
|
|
79
|
+
isApplicable: function (ctx) { var _a; return !!((_a = ctx.structure) === null || _a === void 0 ? void 0 : _a.models.some(function (m) { return SIFTSMapping.Provider.isApplicable(m); })); },
|
|
80
80
|
ensureCustomProperties: {
|
|
81
81
|
attach: function (ctx, data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
82
82
|
var _i, _a, m;
|
|
@@ -90,7 +90,7 @@ export var BestDatabaseSequenceMappingColorThemeProvider = {
|
|
|
90
90
|
case 1:
|
|
91
91
|
if (!(_i < _a.length)) return [3 /*break*/, 4];
|
|
92
92
|
m = _a[_i];
|
|
93
|
-
return [4 /*yield*/,
|
|
93
|
+
return [4 /*yield*/, SIFTSMapping.Provider.attach(ctx, m, void 0, true)];
|
|
94
94
|
case 2:
|
|
95
95
|
_b.sent();
|
|
96
96
|
_b.label = 3;
|
|
@@ -106,9 +106,9 @@ export var BestDatabaseSequenceMappingColorThemeProvider = {
|
|
|
106
106
|
return;
|
|
107
107
|
for (var _i = 0, _a = data.structure.models; _i < _a.length; _i++) {
|
|
108
108
|
var m = _a[_i];
|
|
109
|
-
|
|
109
|
+
SIFTSMapping.Provider.ref(m, false);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
};
|
|
114
|
-
//# sourceMappingURL=
|
|
114
|
+
//# sourceMappingURL=sifts-mapping.js.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
5
5
|
*/
|
|
6
6
|
import { PluginBehavior } from '../../../behavior';
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const SIFTSMapping: import("../../../../../mol-state/transformer").StateTransformer<PluginBehavior.Category, PluginBehavior.Behavior, {
|
|
8
8
|
autoAttach: boolean;
|
|
9
9
|
showTooltip: boolean;
|
|
10
10
|
}>;
|
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { __extends } from "tslib";
|
|
7
7
|
import { OrderedSet } from '../../../../../mol-data/int';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { SIFTSMapping as BestDatabaseSequenceMappingProp } from '../../../../../mol-model-props/sequence/sifts-mapping';
|
|
9
|
+
import { SIFTSMappingColorThemeProvider } from '../../../../../mol-model-props/sequence/themes/sifts-mapping';
|
|
10
10
|
import { StructureElement } from '../../../../../mol-model/structure';
|
|
11
11
|
import { ParamDefinition as PD } from '../../../../../mol-util/param-definition';
|
|
12
12
|
import { PluginBehavior } from '../../../behavior';
|
|
13
|
-
export var
|
|
14
|
-
name: '
|
|
13
|
+
export var SIFTSMapping = PluginBehavior.create({
|
|
14
|
+
name: 'sifts-mapping-prop',
|
|
15
15
|
category: 'custom-props',
|
|
16
|
-
display: { name: '
|
|
16
|
+
display: { name: 'SIFTS Mapping' },
|
|
17
17
|
ctor: /** @class */ (function (_super) {
|
|
18
18
|
__extends(class_1, _super);
|
|
19
19
|
function class_1() {
|
|
@@ -38,12 +38,12 @@ export var BestDatabaseSequenceMapping = PluginBehavior.create({
|
|
|
38
38
|
};
|
|
39
39
|
class_1.prototype.register = function () {
|
|
40
40
|
this.ctx.customModelProperties.register(this.provider, this.params.autoAttach);
|
|
41
|
-
this.ctx.representation.structure.themes.colorThemeRegistry.add(
|
|
41
|
+
this.ctx.representation.structure.themes.colorThemeRegistry.add(SIFTSMappingColorThemeProvider);
|
|
42
42
|
this.ctx.managers.lociLabels.addProvider(this.labelProvider);
|
|
43
43
|
};
|
|
44
44
|
class_1.prototype.unregister = function () {
|
|
45
45
|
this.ctx.customModelProperties.unregister(this.provider.descriptor.name);
|
|
46
|
-
this.ctx.representation.structure.themes.colorThemeRegistry.remove(
|
|
46
|
+
this.ctx.representation.structure.themes.colorThemeRegistry.remove(SIFTSMappingColorThemeProvider);
|
|
47
47
|
this.ctx.managers.lociLabels.removeProvider(this.labelProvider);
|
|
48
48
|
};
|
|
49
49
|
return class_1;
|
|
@@ -64,4 +64,4 @@ function bestDatabaseSequenceMappingLabel(loci) {
|
|
|
64
64
|
return BestDatabaseSequenceMappingProp.getLabel(se);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
//# sourceMappingURL=
|
|
67
|
+
//# sourceMappingURL=sifts-mapping.js.map
|
|
@@ -9,5 +9,5 @@ export { AccessibleSurfaceArea } from './custom-props/computed/accessible-surfac
|
|
|
9
9
|
export { Interactions } from './custom-props/computed/interactions';
|
|
10
10
|
export { SecondaryStructure } from './custom-props/computed/secondary-structure';
|
|
11
11
|
export { ValenceModel } from './custom-props/computed/valence-model';
|
|
12
|
-
export { BestDatabaseSequenceMapping } from './custom-props/sequence/
|
|
12
|
+
export { SIFTSMapping as BestDatabaseSequenceMapping } from './custom-props/sequence/sifts-mapping';
|
|
13
13
|
export { CrossLinkRestraint } from './custom-props/integrative/cross-link-restraint';
|
|
@@ -9,6 +9,6 @@ export { AccessibleSurfaceArea } from './custom-props/computed/accessible-surfac
|
|
|
9
9
|
export { Interactions } from './custom-props/computed/interactions';
|
|
10
10
|
export { SecondaryStructure } from './custom-props/computed/secondary-structure';
|
|
11
11
|
export { ValenceModel } from './custom-props/computed/valence-model';
|
|
12
|
-
export { BestDatabaseSequenceMapping } from './custom-props/sequence/
|
|
12
|
+
export { SIFTSMapping as BestDatabaseSequenceMapping } from './custom-props/sequence/sifts-mapping';
|
|
13
13
|
export { CrossLinkRestraint } from './custom-props/integrative/cross-link-restraint';
|
|
14
14
|
//# sourceMappingURL=custom-props.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2018-
|
|
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,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2018-
|
|
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>
|
|
@@ -213,11 +213,16 @@ export var DefaultLociLabelProvider = PluginBehavior.create({
|
|
|
213
213
|
this.f = {
|
|
214
214
|
label: function (loci) {
|
|
215
215
|
var label = [];
|
|
216
|
-
if (StructureElement.Loci.is(loci)
|
|
217
|
-
var
|
|
218
|
-
var
|
|
219
|
-
|
|
220
|
-
|
|
216
|
+
if (StructureElement.Loci.is(loci)) {
|
|
217
|
+
var entityNames = new Set();
|
|
218
|
+
for (var _i = 0, _a = loci.elements; _i < _a.length; _i++) {
|
|
219
|
+
var u = _a[_i].unit;
|
|
220
|
+
var l = StructureElement.Location.create(loci.structure, u, u.elements[0]);
|
|
221
|
+
var name_1 = StructureProperties.entity.pdbx_description(l).join(', ');
|
|
222
|
+
entityNames.add(name_1);
|
|
223
|
+
}
|
|
224
|
+
if (entityNames.size === 1)
|
|
225
|
+
entityNames.forEach(function (name) { return label.push(name); });
|
|
221
226
|
}
|
|
222
227
|
label.push(lociLabel(loci));
|
|
223
228
|
return label.filter(function (l) { return !!l; }).join('</br>');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-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>
|
|
@@ -22,6 +22,7 @@ declare const StructureFocusRepresentationParams: (plugin: PluginContext) => {
|
|
|
22
22
|
components: PD.MultiSelect<"target" | "surroundings" | "interactions">;
|
|
23
23
|
excludeTargetFromSurroundings: PD.BooleanParam;
|
|
24
24
|
ignoreHydrogens: PD.BooleanParam;
|
|
25
|
+
ignoreLight: PD.BooleanParam;
|
|
25
26
|
material: PD.Group<PD.Normalize<{
|
|
26
27
|
metalness: number;
|
|
27
28
|
roughness: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-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>
|
|
@@ -24,11 +24,19 @@ var StructureFocusRepresentationParams = function (plugin) {
|
|
|
24
24
|
expandRadius: PD.Numeric(5, { min: 1, max: 10, step: 1 }),
|
|
25
25
|
targetParams: PD.Group(reprParams, {
|
|
26
26
|
label: 'Target',
|
|
27
|
-
customDefault: createStructureRepresentationParams(plugin, void 0, {
|
|
27
|
+
customDefault: createStructureRepresentationParams(plugin, void 0, {
|
|
28
|
+
type: 'ball-and-stick',
|
|
29
|
+
size: 'physical',
|
|
30
|
+
typeParams: { sizeFactor: 0.22, sizeAspectRatio: 0.73, adjustCylinderLength: true, xrayShaded: true, aromaticBonds: false, multipleBonds: 'off', excludeTypes: ['hydrogen-bond', 'metal-coordination'] },
|
|
31
|
+
})
|
|
28
32
|
}),
|
|
29
33
|
surroundingsParams: PD.Group(reprParams, {
|
|
30
34
|
label: 'Surroundings',
|
|
31
|
-
customDefault: createStructureRepresentationParams(plugin, void 0, {
|
|
35
|
+
customDefault: createStructureRepresentationParams(plugin, void 0, {
|
|
36
|
+
type: 'ball-and-stick',
|
|
37
|
+
size: 'physical',
|
|
38
|
+
typeParams: { sizeFactor: 0.16, excludeTypes: ['hydrogen-bond', 'metal-coordination'] }
|
|
39
|
+
})
|
|
32
40
|
}),
|
|
33
41
|
nciParams: PD.Group(reprParams, {
|
|
34
42
|
label: 'Non-covalent Int.',
|
|
@@ -41,6 +49,7 @@ var StructureFocusRepresentationParams = function (plugin) {
|
|
|
41
49
|
components: PD.MultiSelect(FocusComponents, PD.arrayToOptions(FocusComponents)),
|
|
42
50
|
excludeTargetFromSurroundings: PD.Boolean(false, { label: 'Exclude Target', description: 'Exclude the focus "target" from the surroudings component.' }),
|
|
43
51
|
ignoreHydrogens: PD.Boolean(false),
|
|
52
|
+
ignoreLight: PD.Boolean(false),
|
|
44
53
|
material: Material.getParam(),
|
|
45
54
|
clip: PD.Group(Clip.Params),
|
|
46
55
|
};
|
|
@@ -68,9 +77,9 @@ var StructureFocusRepresentationBehavior = /** @class */ (function (_super) {
|
|
|
68
77
|
configurable: true
|
|
69
78
|
});
|
|
70
79
|
StructureFocusRepresentationBehavior.prototype.getReprParams = function (reprParams) {
|
|
71
|
-
return __assign(__assign({},
|
|
80
|
+
return __assign(__assign({}, reprParams), { type: {
|
|
72
81
|
name: reprParams.type.name,
|
|
73
|
-
params: __assign(__assign({}, reprParams.type.params), { ignoreHydrogens: this.params.ignoreHydrogens, material: this.params.material, clip: this.params.clip })
|
|
82
|
+
params: __assign(__assign({}, reprParams.type.params), { ignoreHydrogens: this.params.ignoreHydrogens, ignoreLight: this.params.ignoreLight, material: this.params.material, clip: this.params.clip })
|
|
74
83
|
} });
|
|
75
84
|
};
|
|
76
85
|
StructureFocusRepresentationBehavior.prototype.ensureShape = function (cell) {
|
|
@@ -104,7 +113,7 @@ var StructureFocusRepresentationBehavior = /** @class */ (function (_super) {
|
|
|
104
113
|
if (components.indexOf('interactions') >= 0 && !refs[StructureFocusRepresentationTags.SurrNciRepr] && cell.obj && InteractionsRepresentationProvider.isApplicable((_a = cell.obj) === null || _a === void 0 ? void 0 : _a.data)) {
|
|
105
114
|
refs[StructureFocusRepresentationTags.SurrNciRepr] = builder
|
|
106
115
|
.to(refs[StructureFocusRepresentationTags.SurrSel])
|
|
107
|
-
.apply(StateTransforms.Representation.StructureRepresentation3D, this.params.nciParams, { tags: StructureFocusRepresentationTags.SurrNciRepr }).ref;
|
|
116
|
+
.apply(StateTransforms.Representation.StructureRepresentation3D, this.getReprParams(this.params.nciParams), { tags: StructureFocusRepresentationTags.SurrNciRepr }).ref;
|
|
108
117
|
}
|
|
109
118
|
return { state: state, builder: builder, refs: refs };
|
|
110
119
|
};
|
|
@@ -214,7 +223,7 @@ var StructureFocusRepresentationBehavior = /** @class */ (function (_super) {
|
|
|
214
223
|
if (!hasComponent)
|
|
215
224
|
builder.delete(repr.transform.ref);
|
|
216
225
|
else
|
|
217
|
-
builder.to(repr).update(this.params.nciParams);
|
|
226
|
+
builder.to(repr).update(this.getReprParams(this.params.nciParams));
|
|
218
227
|
}
|
|
219
228
|
return [4 /*yield*/, PluginCommands.State.Update(this.plugin, { state: state, tree: builder, options: { doNotLogTiming: true, doNotUpdateCurrent: true } })];
|
|
220
229
|
case 1:
|
|
@@ -9,12 +9,12 @@ import { Volume } from '../../../../mol-model/volume';
|
|
|
9
9
|
import { Structure } from '../../../../mol-model/structure';
|
|
10
10
|
declare const VolumeServerInfo_base: {
|
|
11
11
|
new (data: VolumeServerInfo.Data, props?: {
|
|
12
|
-
|
|
12
|
+
/** Precision data the server can show. */
|
|
13
|
+
label: string;
|
|
13
14
|
description?: string | undefined;
|
|
14
15
|
} | undefined): {
|
|
15
16
|
id: import("../../../../mol-util/uuid").UUID;
|
|
16
17
|
type: PluginStateObject.TypeInfo;
|
|
17
|
-
/** The value are stored in blockSize^3 cubes */
|
|
18
18
|
label: string;
|
|
19
19
|
description?: string | undefined;
|
|
20
20
|
data: VolumeServerInfo.Data;
|
|
@@ -23,7 +23,6 @@ declare const VolumeServerInfo_base: {
|
|
|
23
23
|
is(obj?: import("../../../../mol-state/object").StateObject<any, import("../../../../mol-state/object").StateObject.Type<any>> | undefined): obj is {
|
|
24
24
|
id: import("../../../../mol-util/uuid").UUID;
|
|
25
25
|
type: PluginStateObject.TypeInfo;
|
|
26
|
-
/** The value are stored in blockSize^3 cubes */
|
|
27
26
|
label: string;
|
|
28
27
|
description?: string | undefined;
|
|
29
28
|
data: VolumeServerInfo.Data;
|
|
@@ -82,7 +82,7 @@ export function UpdateRepresentationVisibility(ctx) {
|
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
function updateVisibility(cell, r) {
|
|
85
|
-
if (r.state.visible === cell.state.isHidden) {
|
|
85
|
+
if (r.state.visible === !!cell.state.isHidden) {
|
|
86
86
|
r.setState({ visible: !cell.state.isHidden });
|
|
87
87
|
return true;
|
|
88
88
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export var PLUGIN_VERSION = '3.
|
|
2
|
-
export var PLUGIN_VERSION_DATE = new Date(typeof __MOLSTAR_DEBUG_TIMESTAMP__ !== 'undefined' ? __MOLSTAR_DEBUG_TIMESTAMP__ :
|
|
1
|
+
export var PLUGIN_VERSION = '3.2.0';
|
|
2
|
+
export var PLUGIN_VERSION_DATE = new Date(typeof __MOLSTAR_DEBUG_TIMESTAMP__ !== 'undefined' ? __MOLSTAR_DEBUG_TIMESTAMP__ : 1645122245338);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2018-
|
|
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>
|