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 David Sehnal <david.sehnal@gmail.com>
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
@@ -60,6 +60,7 @@ declare namespace StructureComponentManager {
|
|
|
60
60
|
const OptionsParams: {
|
|
61
61
|
showHydrogens: PD.BooleanParam;
|
|
62
62
|
visualQuality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
|
|
63
|
+
ignoreLight: PD.BooleanParam;
|
|
63
64
|
materialStyle: PD.Group<PD.Normalize<{
|
|
64
65
|
metalness: number;
|
|
65
66
|
roughness: number;
|
|
@@ -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 David Sehnal <david.sehnal@gmail.com>
|
|
6
6
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
@@ -78,6 +78,7 @@ var StructureComponentManager = /** @class */ (function (_super) {
|
|
|
78
78
|
_a.sent();
|
|
79
79
|
return [4 /*yield*/, this.plugin.state.updateBehavior(structure_focus_representation_1.StructureFocusRepresentation, function (p) {
|
|
80
80
|
p.ignoreHydrogens = !options.showHydrogens;
|
|
81
|
+
p.ignoreLight = options.ignoreLight;
|
|
81
82
|
p.material = options.materialStyle;
|
|
82
83
|
p.clip = options.clipObjects;
|
|
83
84
|
})];
|
|
@@ -96,17 +97,18 @@ var StructureComponentManager = /** @class */ (function (_super) {
|
|
|
96
97
|
});
|
|
97
98
|
};
|
|
98
99
|
StructureComponentManager.prototype.updateReprParams = function (update, component) {
|
|
99
|
-
var _a = this.state.options, showHydrogens = _a.showHydrogens, quality = _a.visualQuality, material = _a.materialStyle, clip = _a.clipObjects;
|
|
100
|
+
var _a = this.state.options, showHydrogens = _a.showHydrogens, quality = _a.visualQuality, ignoreLight = _a.ignoreLight, material = _a.materialStyle, clip = _a.clipObjects;
|
|
100
101
|
var ignoreHydrogens = !showHydrogens;
|
|
101
102
|
for (var _i = 0, _b = component.representations; _i < _b.length; _i++) {
|
|
102
103
|
var r = _b[_i];
|
|
103
104
|
if (r.cell.transform.transformer !== representation_1.StructureRepresentation3D)
|
|
104
105
|
continue;
|
|
105
106
|
var params = r.cell.transform.params;
|
|
106
|
-
if (!!params.type.params.ignoreHydrogens !== ignoreHydrogens || params.type.params.quality !== quality || !(0, mol_util_1.shallowEqual)(params.type.params.material, material) || !param_definition_1.ParamDefinition.areEqual(clip_1.Clip.Params, params.type.params.clip, clip)) {
|
|
107
|
+
if (!!params.type.params.ignoreHydrogens !== ignoreHydrogens || params.type.params.quality !== quality || params.type.params.ignoreLight !== ignoreLight || !(0, mol_util_1.shallowEqual)(params.type.params.material, material) || !param_definition_1.ParamDefinition.areEqual(clip_1.Clip.Params, params.type.params.clip, clip)) {
|
|
107
108
|
update.to(r.cell).update(function (old) {
|
|
108
109
|
old.type.params.ignoreHydrogens = ignoreHydrogens;
|
|
109
110
|
old.type.params.quality = quality;
|
|
111
|
+
old.type.params.ignoreLight = ignoreLight;
|
|
110
112
|
old.type.params.material = material;
|
|
111
113
|
old.type.params.clip = clip;
|
|
112
114
|
});
|
|
@@ -380,9 +382,9 @@ var StructureComponentManager = /** @class */ (function (_super) {
|
|
|
380
382
|
var _this = this;
|
|
381
383
|
if (components.length === 0)
|
|
382
384
|
return;
|
|
383
|
-
var _a = this.state.options, showHydrogens = _a.showHydrogens, quality = _a.visualQuality, material = _a.materialStyle, clip = _a.clipObjects;
|
|
385
|
+
var _a = this.state.options, showHydrogens = _a.showHydrogens, quality = _a.visualQuality, ignoreLight = _a.ignoreLight, material = _a.materialStyle, clip = _a.clipObjects;
|
|
384
386
|
var ignoreHydrogens = !showHydrogens;
|
|
385
|
-
var typeParams = { ignoreHydrogens: ignoreHydrogens, quality: quality, material: material, clip: clip };
|
|
387
|
+
var typeParams = { ignoreHydrogens: ignoreHydrogens, quality: quality, ignoreLight: ignoreLight, material: material, clip: clip };
|
|
386
388
|
return this.plugin.dataTransaction(function () { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
|
|
387
389
|
var _i, components_9, component;
|
|
388
390
|
return (0, tslib_1.__generator)(this, function (_a) {
|
|
@@ -443,16 +445,16 @@ var StructureComponentManager = /** @class */ (function (_super) {
|
|
|
443
445
|
var _this = this;
|
|
444
446
|
return (0, tslib_1.__generator)(this, function (_a) {
|
|
445
447
|
return [2 /*return*/, this.plugin.dataTransaction(function () { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
|
|
446
|
-
var xs, _a, showHydrogens, quality, material, clip, ignoreHydrogens, typeParams, componentKey, _i, xs_1, s, component;
|
|
448
|
+
var xs, _a, showHydrogens, quality, ignoreLight, material, clip, ignoreHydrogens, typeParams, componentKey, _i, xs_1, s, component;
|
|
447
449
|
return (0, tslib_1.__generator)(this, function (_b) {
|
|
448
450
|
switch (_b.label) {
|
|
449
451
|
case 0:
|
|
450
452
|
xs = structures || this.currentStructures;
|
|
451
453
|
if (xs.length === 0)
|
|
452
454
|
return [2 /*return*/];
|
|
453
|
-
_a = this.state.options, showHydrogens = _a.showHydrogens, quality = _a.visualQuality, material = _a.materialStyle, clip = _a.clipObjects;
|
|
455
|
+
_a = this.state.options, showHydrogens = _a.showHydrogens, quality = _a.visualQuality, ignoreLight = _a.ignoreLight, material = _a.materialStyle, clip = _a.clipObjects;
|
|
454
456
|
ignoreHydrogens = !showHydrogens;
|
|
455
|
-
typeParams = { ignoreHydrogens: ignoreHydrogens, quality: quality, material: material, clip: clip };
|
|
457
|
+
typeParams = { ignoreHydrogens: ignoreHydrogens, quality: quality, ignoreLight: ignoreLight, material: material, clip: clip };
|
|
456
458
|
componentKey = mol_util_1.UUID.create22();
|
|
457
459
|
_i = 0, xs_1 = xs;
|
|
458
460
|
_b.label = 1;
|
|
@@ -628,6 +630,7 @@ exports.StructureComponentManager = StructureComponentManager;
|
|
|
628
630
|
StructureComponentManager.OptionsParams = {
|
|
629
631
|
showHydrogens: param_definition_1.ParamDefinition.Boolean(true, { description: 'Toggle display of hydrogen atoms in representations' }),
|
|
630
632
|
visualQuality: param_definition_1.ParamDefinition.Select('auto', base_1.VisualQualityOptions, { description: 'Control the visual/rendering quality of representations' }),
|
|
633
|
+
ignoreLight: param_definition_1.ParamDefinition.Boolean(false, { description: 'Ignore light for stylized rendering of representtions' }),
|
|
631
634
|
materialStyle: material_1.Material.getParam(),
|
|
632
635
|
clipObjects: param_definition_1.ParamDefinition.Group(clip_1.Clip.Params),
|
|
633
636
|
interactions: param_definition_1.ParamDefinition.Group(interactions_1.InteractionsProvider.defaultParams, { label: 'Non-covalent Interactions' }),
|
|
@@ -1,5 +1,5 @@
|
|
|
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 David Sehnal <david.sehnal@gmail.com>
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
@@ -23,6 +23,7 @@ export declare function CubeSendSvg(): JSX.Element;
|
|
|
23
23
|
export declare function CursorDefaultOutlineSvg(): JSX.Element;
|
|
24
24
|
export declare function FileOutlineSvg(): JSX.Element;
|
|
25
25
|
export declare function PencilRulerSvg(): JSX.Element;
|
|
26
|
+
export declare function MagicWandSvg(): JSX.Element;
|
|
26
27
|
export declare function AccountTreeOutlinedSvg(): JSX.Element;
|
|
27
28
|
export declare function AddSvg(): JSX.Element;
|
|
28
29
|
export declare function ArrowDownwardSvg(): JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.SuperpositionSvg = exports.SuperposeChainsSvg = exports.SuperposeAtomsSvg = exports.SelectionModeSvg = exports.WarningSvg = exports.VisibilityOutlinedSvg = exports.VisibilityOffOutlinedSvg = exports.TuneSvg = exports.SwapHorizSvg = exports.SubscriptionsOutlinedSvg = exports.StopSvg = exports.SkipPreviousSvg = exports.ScatterPlotSvg = exports.SaveOutlinedSvg = exports.RestoreSvg = exports.RemoveSvg = exports.RefreshSvg = exports.PlayArrowSvg = exports.OpenInBrowserSvg = exports.NavigateNextSvg = exports.NavigateBeforeSvg = void 0;
|
|
3
|
+
exports.LinearScaleSvg = exports.LaunchSvg = exports.HomeOutlinedSvg = exports.HelpOutlineSvg = exports.GetAppSvg = exports.FullscreenSvg = exports.FlipToFrontSvg = exports.ExtensionSvg = exports.ErrorSvg = exports.DeleteSvg = exports.DeleteOutlinedSvg = exports.CropOrginalSvg = exports.CropFreeSvg = exports.CropSvg = exports.CopySvg = exports.CodeSvg = exports.CloudUploadSvg = exports.CloseSvg = exports.ClearSvg = exports.CheckSvg = exports.CenterFocusStrongSvg = exports.CancelSvg = exports.CancelOutlinedSvg = exports.CameraSvg = exports.CameraOutlinedSvg = exports.BuildSvg = exports.BuildOutlinedSvg = exports.BrushSvg = exports.BookmarksOutlinedSvg = exports.BlurOnSvg = exports.AutorenewSvg = exports.ArrowUpwardSvg = exports.ArrowRightSvg = exports.ArrowDropDownSvg = exports.ArrowDownwardSvg = exports.AddSvg = exports.AccountTreeOutlinedSvg = exports.MagicWandSvg = exports.PencilRulerSvg = exports.FileOutlineSvg = exports.CursorDefaultOutlineSvg = exports.CubeSendSvg = exports.CubeScanSvg = exports.CubeOutlineSvg = exports.MoleculeSvg = exports.SetSvg = exports.IntersectSvg = exports.SubtractSvg = exports.UnionSvg = exports.Icon = void 0;
|
|
4
|
+
exports.SuperpositionSvg = exports.SuperposeChainsSvg = exports.SuperposeAtomsSvg = exports.SelectionModeSvg = exports.WarningSvg = exports.VisibilityOutlinedSvg = exports.VisibilityOffOutlinedSvg = exports.TuneSvg = exports.SwapHorizSvg = exports.SubscriptionsOutlinedSvg = exports.StopSvg = exports.SkipPreviousSvg = exports.ScatterPlotSvg = exports.SaveOutlinedSvg = exports.RestoreSvg = exports.RemoveSvg = exports.RefreshSvg = exports.PlayArrowSvg = exports.OpenInBrowserSvg = exports.NavigateNextSvg = exports.NavigateBeforeSvg = exports.MoreHorizSvg = void 0;
|
|
5
5
|
var tslib_1 = require("tslib");
|
|
6
6
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
7
|
function Icon(props) {
|
|
@@ -30,10 +30,10 @@ function MoleculeSvg() { return _Molecule; }
|
|
|
30
30
|
exports.MoleculeSvg = MoleculeSvg;
|
|
31
31
|
// The following icons are adapted from https://materialdesignicons.com/ and
|
|
32
32
|
// licensed with https://github.com/Templarian/MaterialDesign/blob/master/LICENSE
|
|
33
|
-
var _CubeOutline = (0, jsx_runtime_1.jsx)("svg", (0, tslib_1.__assign)({ width: '24px', height: '24px', viewBox: '0 0 24 24', strokeWidth: '0.1px' }, { children: (0, jsx_runtime_1.jsx)("path", { d:
|
|
33
|
+
var _CubeOutline = (0, jsx_runtime_1.jsx)("svg", (0, tslib_1.__assign)({ width: '24px', height: '24px', viewBox: '0 0 24 24', strokeWidth: '0.1px' }, { children: (0, jsx_runtime_1.jsx)("path", { d: 'M21,16.5C21,16.88 20.79,17.21 20.47,17.38L12.57,21.82C12.41,21.94 12.21,22 12,22C11.79,22 11.59,21.94 11.43,21.82L3.53,17.38C3.21,17.21 3,16.88 3,16.5V7.5C3,7.12 3.21,6.79 3.53,6.62L11.43,2.18C11.59,2.06 11.79,2 12,2C12.21,2 12.41,2.06 12.57,2.18L20.47,6.62C20.79,6.79 21,7.12 21,7.5V16.5M12,4.15L6.04,7.5L12,10.85L17.96,7.5L12,4.15M5,15.91L11,19.29V12.58L5,9.21V15.91M19,15.91V9.21L13,12.58V19.29L19,15.91Z' }, void 0) }), void 0);
|
|
34
34
|
function CubeOutlineSvg() { return _CubeOutline; }
|
|
35
35
|
exports.CubeOutlineSvg = CubeOutlineSvg;
|
|
36
|
-
var _CubeScan = (0, jsx_runtime_1.jsx)("svg", (0, tslib_1.__assign)({ width: '24px', height: '24px', viewBox: '0 0 24 24', strokeWidth: '0.1px' }, { children: (0, jsx_runtime_1.jsx)("path", { d:
|
|
36
|
+
var _CubeScan = (0, jsx_runtime_1.jsx)("svg", (0, tslib_1.__assign)({ width: '24px', height: '24px', viewBox: '0 0 24 24', strokeWidth: '0.1px' }, { children: (0, jsx_runtime_1.jsx)("path", { d: 'M17,22V20H20V17H22V20.5C22,20.89 21.84,21.24 21.54,21.54C21.24,21.84 20.89,22 20.5,22H17M7,22H3.5C3.11,22 2.76,21.84 2.46,21.54C2.16,21.24 2,20.89 2,20.5V17H4V20H7V22M17,2H20.5C20.89,2 21.24,2.16 21.54,2.46C21.84,2.76 22,3.11 22,3.5V7H20V4H17V2M7,2V4H4V7H2V3.5C2,3.11 2.16,2.76 2.46,2.46C2.76,2.16 3.11,2 3.5,2H7M13,17.25L17,14.95V10.36L13,12.66V17.25M12,10.92L16,8.63L12,6.28L8,8.63L12,10.92M7,14.95L11,17.25V12.66L7,10.36V14.95M18.23,7.59C18.73,7.91 19,8.34 19,8.91V15.23C19,15.8 18.73,16.23 18.23,16.55L12.75,19.73C12.25,20.05 11.75,20.05 11.25,19.73L5.77,16.55C5.27,16.23 5,15.8 5,15.23V8.91C5,8.34 5.27,7.91 5.77,7.59L11.25,4.41C11.5,4.28 11.75,4.22 12,4.22C12.25,4.22 12.5,4.28 12.75,4.41L18.23,7.59Z' }, void 0) }), void 0);
|
|
37
37
|
function CubeScanSvg() { return _CubeScan; }
|
|
38
38
|
exports.CubeScanSvg = CubeScanSvg;
|
|
39
39
|
var _CubeSend = (0, jsx_runtime_1.jsx)("svg", (0, tslib_1.__assign)({ width: '24px', height: '24px', viewBox: '0 0 24 24', strokeWidth: '0.1px' }, { children: (0, jsx_runtime_1.jsx)("path", { d: "M16,4L9,8.04V15.96L16,20L23,15.96V8.04M16,6.31L19.8,8.5L16,10.69L12.21,8.5M0,7V9H7V7M11,10.11L15,12.42V17.11L11,14.81M21,10.11V14.81L17,17.11V12.42M2,11V13H7V11M4,15V17H7V15" }, void 0) }), void 0);
|
|
@@ -45,9 +45,12 @@ exports.CursorDefaultOutlineSvg = CursorDefaultOutlineSvg;
|
|
|
45
45
|
var _FileOutline = (0, jsx_runtime_1.jsx)("svg", (0, tslib_1.__assign)({ width: '24px', height: '24px', viewBox: '0 0 24 24', strokeWidth: '0.1px' }, { children: (0, jsx_runtime_1.jsx)("path", { fill: 'currentColor', d: 'M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z' }, void 0) }), void 0);
|
|
46
46
|
function FileOutlineSvg() { return _FileOutline; }
|
|
47
47
|
exports.FileOutlineSvg = FileOutlineSvg;
|
|
48
|
-
var _PencilRuler = (0, jsx_runtime_1.jsx)("svg", (0, tslib_1.__assign)({ width: '24px', height: '24px', viewBox: '0 0 24 24', strokeWidth: '0.1px' }, { children: (0, jsx_runtime_1.jsx)("path", { d:
|
|
48
|
+
var _PencilRuler = (0, jsx_runtime_1.jsx)("svg", (0, tslib_1.__assign)({ width: '24px', height: '24px', viewBox: '0 0 24 24', strokeWidth: '0.1px' }, { children: (0, jsx_runtime_1.jsx)("path", { d: 'M3 17.25V21H6.75L17.81 9.93L14.06 6.18L3 17.25M22.61 18.36L18.36 22.61L13.16 17.41L14.93 15.64L15.93 16.64L18.4 14.16L19.82 15.58L18.36 17L19.42 18L20.84 16.6L22.61 18.36M6.61 10.83L1.39 5.64L5.64 1.39L7.4 3.16L4.93 5.64L6 6.7L8.46 4.22L9.88 5.64L8.46 7.05L9.46 8.05L6.61 10.83M20.71 7C21.1 6.61 21.1 6 20.71 5.59L18.37 3.29C18 2.9 17.35 2.9 16.96 3.29L15.12 5.12L18.87 8.87L20.71 7Z' }, void 0) }), void 0);
|
|
49
49
|
function PencilRulerSvg() { return _PencilRuler; }
|
|
50
50
|
exports.PencilRulerSvg = PencilRulerSvg;
|
|
51
|
+
var _MagicWand = (0, jsx_runtime_1.jsx)("svg", (0, tslib_1.__assign)({ width: '24px', height: '24px', viewBox: '0 0 24 24' }, { children: (0, jsx_runtime_1.jsx)("path", { fill: 'currentColor', d: 'M7.5,5.6L5,7L6.4,4.5L5,2L7.5,3.4L10,2L8.6,4.5L10,7L7.5,5.6M19.5,15.4L22,14L20.6,16.5L22,19L19.5,17.6L17,19L18.4,16.5L17,14L19.5,15.4M22,2L20.6,4.5L22,7L19.5,5.6L17,7L18.4,4.5L17,2L19.5,3.4L22,2M13.34,12.78L15.78,10.34L13.66,8.22L11.22,10.66L13.34,12.78M14.37,7.29L16.71,9.63C17.1,10 17.1,10.65 16.71,11.04L5.04,22.71C4.65,23.1 4,23.1 3.63,22.71L1.29,20.37C0.9,20 0.9,19.35 1.29,18.96L12.96,7.29C13.35,6.9 14,6.9 14.37,7.29Z' }, void 0) }), void 0);
|
|
52
|
+
function MagicWandSvg() { return _MagicWand; }
|
|
53
|
+
exports.MagicWandSvg = MagicWandSvg;
|
|
51
54
|
// The following icons are adapted from https://material-ui.com/components/material-icons/ and
|
|
52
55
|
// licensed with https://github.com/mui-org/material-ui/blob/master/LICENSE
|
|
53
56
|
var _AccountTreeOutlined = (0, jsx_runtime_1.jsx)("svg", (0, tslib_1.__assign)({ width: '24px', height: '24px', viewBox: '0 0 24 24' }, { children: (0, jsx_runtime_1.jsx)("path", { d: 'M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3h7zM7 9H4V5h3v4zm10 6h3v4h-3v-4zm0-10h3v4h-3V5z' }, void 0) }), void 0);
|
|
@@ -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>
|
|
@@ -17,6 +17,7 @@ var source_1 = require("./structure/source");
|
|
|
17
17
|
var volume_1 = require("./structure/volume");
|
|
18
18
|
var config_1 = require("../mol-plugin/config");
|
|
19
19
|
var superposition_1 = require("./structure/superposition");
|
|
20
|
+
var quick_styles_1 = require("./structure/quick-styles");
|
|
20
21
|
var TrajectoryViewportControls = /** @class */ (function (_super) {
|
|
21
22
|
(0, tslib_1.__extends)(TrajectoryViewportControls, _super);
|
|
22
23
|
function TrajectoryViewportControls() {
|
|
@@ -293,7 +294,7 @@ var DefaultStructureTools = /** @class */ (function (_super) {
|
|
|
293
294
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
294
295
|
}
|
|
295
296
|
DefaultStructureTools.prototype.render = function () {
|
|
296
|
-
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", (0, tslib_1.__assign)({ className: 'msp-section-header' }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: icons_1.BuildSvg }, void 0), "Structure Tools"] }), void 0), (0, jsx_runtime_1.jsx)(source_1.StructureSourceControls, {}, void 0), (0, jsx_runtime_1.jsx)(measurements_1.StructureMeasurementsControls, {}, void 0), (0, jsx_runtime_1.jsx)(superposition_1.StructureSuperpositionControls, {}, void 0), (0, jsx_runtime_1.jsx)(components_1.StructureComponentControls, {}, void 0), this.plugin.config.get(config_1.PluginConfig.VolumeStreaming.Enabled) && (0, jsx_runtime_1.jsx)(volume_1.VolumeStreamingControls, {}, void 0), (0, jsx_runtime_1.jsx)(volume_1.VolumeSourceControls, {}, void 0), (0, jsx_runtime_1.jsx)(CustomStructureControls, {}, void 0)] }, void 0);
|
|
297
|
+
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", (0, tslib_1.__assign)({ className: 'msp-section-header' }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: icons_1.BuildSvg }, void 0), "Structure Tools"] }), void 0), (0, jsx_runtime_1.jsx)(source_1.StructureSourceControls, {}, void 0), (0, jsx_runtime_1.jsx)(measurements_1.StructureMeasurementsControls, {}, void 0), (0, jsx_runtime_1.jsx)(superposition_1.StructureSuperpositionControls, {}, void 0), (0, jsx_runtime_1.jsx)(quick_styles_1.StructureQuickStylesControls, {}, void 0), (0, jsx_runtime_1.jsx)(components_1.StructureComponentControls, {}, void 0), this.plugin.config.get(config_1.PluginConfig.VolumeStreaming.Enabled) && (0, jsx_runtime_1.jsx)(volume_1.VolumeStreamingControls, {}, void 0), (0, jsx_runtime_1.jsx)(volume_1.VolumeSourceControls, {}, void 0), (0, jsx_runtime_1.jsx)(CustomStructureControls, {}, void 0)] }, void 0);
|
|
297
298
|
};
|
|
298
299
|
return DefaultStructureTools;
|
|
299
300
|
}(base_1.PluginUIComponent));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
|
+
*
|
|
4
|
+
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
5
|
+
*/
|
|
6
|
+
/// <reference types="react" />
|
|
7
|
+
import { CollapsableControls, PurePluginUIComponent } from '../base';
|
|
8
|
+
import { MagicWandSvg } from '../controls/icons';
|
|
9
|
+
export declare class StructureQuickStylesControls extends CollapsableControls {
|
|
10
|
+
defaultState(): {
|
|
11
|
+
isCollapsed: boolean;
|
|
12
|
+
header: string;
|
|
13
|
+
brand: {
|
|
14
|
+
accent: "gray";
|
|
15
|
+
svg: typeof MagicWandSvg;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
renderControls(): JSX.Element;
|
|
19
|
+
}
|
|
20
|
+
export declare class QuickStyles extends PurePluginUIComponent {
|
|
21
|
+
default(): Promise<void>;
|
|
22
|
+
illustrative(): Promise<void>;
|
|
23
|
+
stylized(): Promise<void>;
|
|
24
|
+
render(): JSX.Element;
|
|
25
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QuickStyles = exports.StructureQuickStylesControls = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
/**
|
|
7
|
+
* Copyright (c) 2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
8
|
+
*
|
|
9
|
+
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
10
|
+
*/
|
|
11
|
+
var representation_preset_1 = require("../../mol-plugin-state/builder/structure/representation-preset");
|
|
12
|
+
var color_1 = require("../../mol-util/color");
|
|
13
|
+
var base_1 = require("../base");
|
|
14
|
+
var common_1 = require("../controls/common");
|
|
15
|
+
var icons_1 = require("../controls/icons");
|
|
16
|
+
var param_definition_1 = require("../../mol-util/param-definition");
|
|
17
|
+
var postprocessing_1 = require("../../mol-canvas3d/passes/postprocessing");
|
|
18
|
+
var config_1 = require("../../mol-plugin/config");
|
|
19
|
+
var component_1 = require("../../mol-plugin-state/manager/structure/component");
|
|
20
|
+
var StructureQuickStylesControls = /** @class */ (function (_super) {
|
|
21
|
+
(0, tslib_1.__extends)(StructureQuickStylesControls, _super);
|
|
22
|
+
function StructureQuickStylesControls() {
|
|
23
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
+
}
|
|
25
|
+
StructureQuickStylesControls.prototype.defaultState = function () {
|
|
26
|
+
return {
|
|
27
|
+
isCollapsed: false,
|
|
28
|
+
header: 'Quick Styles',
|
|
29
|
+
brand: { accent: 'gray', svg: icons_1.MagicWandSvg }
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
StructureQuickStylesControls.prototype.renderControls = function () {
|
|
33
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(QuickStyles, {}, void 0) }, void 0);
|
|
34
|
+
};
|
|
35
|
+
return StructureQuickStylesControls;
|
|
36
|
+
}(base_1.CollapsableControls));
|
|
37
|
+
exports.StructureQuickStylesControls = StructureQuickStylesControls;
|
|
38
|
+
var QuickStyles = /** @class */ (function (_super) {
|
|
39
|
+
(0, tslib_1.__extends)(QuickStyles, _super);
|
|
40
|
+
function QuickStyles() {
|
|
41
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
42
|
+
}
|
|
43
|
+
QuickStyles.prototype.default = function () {
|
|
44
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
|
|
45
|
+
var structures, preset, provider, p;
|
|
46
|
+
return (0, tslib_1.__generator)(this, function (_a) {
|
|
47
|
+
switch (_a.label) {
|
|
48
|
+
case 0:
|
|
49
|
+
structures = this.plugin.managers.structure.hierarchy.selection.structures;
|
|
50
|
+
preset = this.plugin.config.get(config_1.PluginConfig.Structure.DefaultRepresentationPreset) || representation_preset_1.PresetStructureRepresentations.auto.id;
|
|
51
|
+
provider = this.plugin.builders.structure.representation.resolveProvider(preset);
|
|
52
|
+
return [4 /*yield*/, this.plugin.managers.structure.component.applyPreset(structures, provider)];
|
|
53
|
+
case 1:
|
|
54
|
+
_a.sent();
|
|
55
|
+
this.plugin.managers.structure.component.setOptions(param_definition_1.ParamDefinition.getDefaultValues(component_1.StructureComponentManager.OptionsParams));
|
|
56
|
+
if (this.plugin.canvas3d) {
|
|
57
|
+
p = param_definition_1.ParamDefinition.getDefaultValues(postprocessing_1.PostprocessingParams);
|
|
58
|
+
this.plugin.canvas3d.setProps({
|
|
59
|
+
postprocessing: { outline: p.outline, occlusion: p.occlusion }
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
return [2 /*return*/];
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
QuickStyles.prototype.illustrative = function () {
|
|
68
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
|
|
69
|
+
var structures;
|
|
70
|
+
return (0, tslib_1.__generator)(this, function (_a) {
|
|
71
|
+
switch (_a.label) {
|
|
72
|
+
case 0:
|
|
73
|
+
structures = this.plugin.managers.structure.hierarchy.selection.structures;
|
|
74
|
+
return [4 /*yield*/, this.plugin.managers.structure.component.applyPreset(structures, representation_preset_1.PresetStructureRepresentations.illustrative)];
|
|
75
|
+
case 1:
|
|
76
|
+
_a.sent();
|
|
77
|
+
if (this.plugin.canvas3d) {
|
|
78
|
+
this.plugin.canvas3d.setProps({
|
|
79
|
+
postprocessing: {
|
|
80
|
+
outline: {
|
|
81
|
+
name: 'on',
|
|
82
|
+
params: { scale: 1, color: (0, color_1.Color)(0x000000), threshold: 0.25 }
|
|
83
|
+
},
|
|
84
|
+
occlusion: {
|
|
85
|
+
name: 'on',
|
|
86
|
+
params: { bias: 0.9, blurKernelSize: 15, radius: 5, samples: 32 }
|
|
87
|
+
},
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
return [2 /*return*/];
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
QuickStyles.prototype.stylized = function () {
|
|
97
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
|
|
98
|
+
var pp;
|
|
99
|
+
return (0, tslib_1.__generator)(this, function (_a) {
|
|
100
|
+
this.plugin.managers.structure.component.setOptions((0, tslib_1.__assign)((0, tslib_1.__assign)({}, this.plugin.managers.structure.component.state.options), { ignoreLight: true }));
|
|
101
|
+
if (this.plugin.canvas3d) {
|
|
102
|
+
pp = this.plugin.canvas3d.props.postprocessing;
|
|
103
|
+
this.plugin.canvas3d.setProps({
|
|
104
|
+
postprocessing: {
|
|
105
|
+
outline: {
|
|
106
|
+
name: 'on',
|
|
107
|
+
params: pp.outline.name === 'on'
|
|
108
|
+
? pp.outline.params
|
|
109
|
+
: { scale: 1, color: (0, color_1.Color)(0x000000), threshold: 0.33 }
|
|
110
|
+
},
|
|
111
|
+
occlusion: {
|
|
112
|
+
name: 'on',
|
|
113
|
+
params: pp.occlusion.name === 'on'
|
|
114
|
+
? pp.occlusion.params
|
|
115
|
+
: { bias: 0.9, blurKernelSize: 15, radius: 5, samples: 32 }
|
|
116
|
+
},
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
return [2 /*return*/];
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
QuickStyles.prototype.render = function () {
|
|
125
|
+
var _this = this;
|
|
126
|
+
return (0, jsx_runtime_1.jsxs)("div", (0, tslib_1.__assign)({ className: 'msp-flex-row' }, { children: [(0, jsx_runtime_1.jsx)(common_1.Button, (0, tslib_1.__assign)({ noOverflow: true, title: 'Applies default representation preset. Set outline and occlusion effects to defaults.', onClick: function () { return _this.default(); }, style: { width: 'auto' } }, { children: "Default" }), void 0), (0, jsx_runtime_1.jsx)(common_1.Button, (0, tslib_1.__assign)({ noOverflow: true, title: 'Applies no representation preset. Enables outline and occlusion effects. Enables ignore-light representation parameter.', onClick: function () { return _this.stylized(); }, style: { width: 'auto' } }, { children: "Stylized" }), void 0), (0, jsx_runtime_1.jsx)(common_1.Button, (0, tslib_1.__assign)({ noOverflow: true, title: 'Applies illustrative representation preset. Enables outline and occlusion effects. Enables ignore-light parameter.', onClick: function () { return _this.illustrative(); }, style: { width: 'auto' } }, { children: "Illustrative" }), void 0)] }), void 0);
|
|
127
|
+
};
|
|
128
|
+
return QuickStyles;
|
|
129
|
+
}(base_1.PurePluginUIComponent));
|
|
130
|
+
exports.QuickStyles = QuickStyles;
|
|
131
|
+
//# sourceMappingURL=quick-styles.js.map
|
|
@@ -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 Sebastian Bittrich <sebastian.bittrich@rcsb.org>
|
|
5
6
|
*/
|
|
6
7
|
/// <reference types="react" />
|
|
7
8
|
import { CollapsableControls, PurePluginUIComponent } from '../base';
|
|
@@ -26,6 +27,7 @@ export declare class StructureSuperpositionControls extends CollapsableControls
|
|
|
26
27
|
}
|
|
27
28
|
export declare const StructureSuperpositionParams: {
|
|
28
29
|
alignSequences: PD.BooleanParam;
|
|
30
|
+
traceOnly: PD.BooleanParam;
|
|
29
31
|
};
|
|
30
32
|
export declare type StructureSuperpositionOptions = PD.ValuesFor<typeof StructureSuperpositionParams>;
|
|
31
33
|
declare type SuperpositionControlsState = {
|
|
@@ -50,6 +52,7 @@ export declare class SuperpositionControls extends PurePluginUIComponent<{}, Sup
|
|
|
50
52
|
superposeChains: () => Promise<void>;
|
|
51
53
|
superposeAtoms: () => Promise<void>;
|
|
52
54
|
superposeDb: () => Promise<void>;
|
|
55
|
+
cameraReset(): Promise<void>;
|
|
53
56
|
toggleByChains: () => void;
|
|
54
57
|
toggleByAtoms: () => void;
|
|
55
58
|
toggleOptions: () => void;
|
|
@@ -4,9 +4,10 @@ exports.SuperpositionControls = exports.StructureSuperpositionParams = exports.S
|
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
/**
|
|
7
|
-
* Copyright (c) 2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
7
|
+
* Copyright (c) 2020-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
8
8
|
*
|
|
9
9
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
10
|
+
* @author Sebastian Bittrich <sebastian.bittrich@rcsb.org>
|
|
10
11
|
*/
|
|
11
12
|
var base_1 = require("../base");
|
|
12
13
|
var icons_1 = require("../controls/icons");
|
|
@@ -21,9 +22,9 @@ var label_1 = require("../../mol-theme/label");
|
|
|
21
22
|
var parameters_1 = require("../controls/parameters");
|
|
22
23
|
var string_1 = require("../../mol-util/string");
|
|
23
24
|
var selection_1 = require("./selection");
|
|
24
|
-
var
|
|
25
|
+
var superposition_sifts_mapping_1 = require("../../mol-model/structure/structure/util/superposition-sifts-mapping");
|
|
25
26
|
var commands_1 = require("../../mol-plugin/commands");
|
|
26
|
-
var
|
|
27
|
+
var sifts_mapping_1 = require("../../mol-model-props/sequence/sifts-mapping");
|
|
27
28
|
var StructureSuperpositionControls = /** @class */ (function (_super) {
|
|
28
29
|
(0, tslib_1.__extends)(StructureSuperpositionControls, _super);
|
|
29
30
|
function StructureSuperpositionControls() {
|
|
@@ -50,7 +51,8 @@ var StructureSuperpositionControls = /** @class */ (function (_super) {
|
|
|
50
51
|
}(base_1.CollapsableControls));
|
|
51
52
|
exports.StructureSuperpositionControls = StructureSuperpositionControls;
|
|
52
53
|
exports.StructureSuperpositionParams = {
|
|
53
|
-
alignSequences: param_definition_1.ParamDefinition.Boolean(true, { isEssential: true, description: '
|
|
54
|
+
alignSequences: param_definition_1.ParamDefinition.Boolean(true, { isEssential: true, description: 'For Chain-based 3D superposition, perform a sequence alignment and use the aligned residue pairs to guide the 3D superposition.' }),
|
|
55
|
+
traceOnly: param_definition_1.ParamDefinition.Boolean(true, { description: 'For Chain- and Uniprot-based 3D superposition, base superposition only on CA (and equivalent) atoms.' })
|
|
54
56
|
};
|
|
55
57
|
var DefaultStructureSuperpositionOptions = param_definition_1.ParamDefinition.getDefaultValues(exports.StructureSuperpositionParams);
|
|
56
58
|
var SuperpositionTag = 'SuperpositionTransform';
|
|
@@ -67,14 +69,14 @@ var SuperpositionControls = /** @class */ (function (_super) {
|
|
|
67
69
|
options: DefaultStructureSuperpositionOptions
|
|
68
70
|
};
|
|
69
71
|
_this.superposeChains = function () { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
|
|
70
|
-
var query, entries,
|
|
72
|
+
var query, entries, locis, transforms, eA, i, il, eB, _a, bTransform, rmsd, labelA, labelB;
|
|
71
73
|
var _this = this;
|
|
72
74
|
return (0, tslib_1.__generator)(this, function (_b) {
|
|
73
75
|
switch (_b.label) {
|
|
74
76
|
case 0:
|
|
75
|
-
query = structure_selection_query_1.StructureSelectionQueries.trace.query;
|
|
77
|
+
query = (this.state.options.traceOnly ? structure_selection_query_1.StructureSelectionQueries.trace : structure_selection_query_1.StructureSelectionQueries.polymer).query;
|
|
76
78
|
entries = this.chainEntries;
|
|
77
|
-
|
|
79
|
+
locis = entries.map(function (e, i) {
|
|
78
80
|
var s = structure_1.StructureElement.Loci.toStructure(e.loci);
|
|
79
81
|
var loci = structure_1.StructureSelection.toLociWithSourceUnits(query(new structure_1.QueryContext(s)));
|
|
80
82
|
return structure_1.StructureElement.Loci.remap(loci, i === 0
|
|
@@ -82,10 +84,10 @@ var SuperpositionControls = /** @class */ (function (_super) {
|
|
|
82
84
|
: loci.structure.root);
|
|
83
85
|
});
|
|
84
86
|
transforms = this.state.options.alignSequences
|
|
85
|
-
? (0, superposition_1.alignAndSuperpose)(
|
|
86
|
-
: (0, superposition_1.superpose)(
|
|
87
|
+
? (0, superposition_1.alignAndSuperpose)(locis)
|
|
88
|
+
: (0, superposition_1.superpose)(locis);
|
|
87
89
|
eA = entries[0];
|
|
88
|
-
i = 1, il =
|
|
90
|
+
i = 1, il = locis.length;
|
|
89
91
|
_b.label = 1;
|
|
90
92
|
case 1:
|
|
91
93
|
if (!(i < il)) return [3 /*break*/, 4];
|
|
@@ -101,7 +103,10 @@ var SuperpositionControls = /** @class */ (function (_super) {
|
|
|
101
103
|
case 3:
|
|
102
104
|
++i;
|
|
103
105
|
return [3 /*break*/, 1];
|
|
104
|
-
case 4: return [
|
|
106
|
+
case 4: return [4 /*yield*/, this.cameraReset()];
|
|
107
|
+
case 5:
|
|
108
|
+
_b.sent();
|
|
109
|
+
return [2 /*return*/];
|
|
105
110
|
}
|
|
106
111
|
});
|
|
107
112
|
}); };
|
|
@@ -136,39 +141,57 @@ var SuperpositionControls = /** @class */ (function (_super) {
|
|
|
136
141
|
case 3:
|
|
137
142
|
++i;
|
|
138
143
|
return [3 /*break*/, 1];
|
|
139
|
-
case 4: return [
|
|
144
|
+
case 4: return [4 /*yield*/, this.cameraReset()];
|
|
145
|
+
case 5:
|
|
146
|
+
_b.sent();
|
|
147
|
+
return [2 /*return*/];
|
|
140
148
|
}
|
|
141
149
|
});
|
|
142
150
|
}); };
|
|
143
151
|
_this.superposeDb = function () { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
|
|
144
|
-
var input,
|
|
145
|
-
return (0, tslib_1.__generator)(this, function (
|
|
146
|
-
switch (
|
|
152
|
+
var input, traceOnly, structures, _a, entries, failedPairs, zeroOverlapPairs, rmsd, _i, entries_1, xform, formatPairs;
|
|
153
|
+
return (0, tslib_1.__generator)(this, function (_b) {
|
|
154
|
+
switch (_b.label) {
|
|
147
155
|
case 0:
|
|
148
156
|
input = this.plugin.managers.structure.hierarchy.behaviors.selection.value.structures;
|
|
149
|
-
|
|
157
|
+
traceOnly = this.state.options.traceOnly;
|
|
158
|
+
structures = input.map(function (s) { var _a; return (_a = s.cell.obj) === null || _a === void 0 ? void 0 : _a.data; });
|
|
159
|
+
_a = (0, superposition_sifts_mapping_1.alignAndSuperposeWithSIFTSMapping)(structures, { traceOnly: traceOnly }), entries = _a.entries, failedPairs = _a.failedPairs, zeroOverlapPairs = _a.zeroOverlapPairs;
|
|
150
160
|
rmsd = 0;
|
|
151
|
-
_i = 0,
|
|
152
|
-
|
|
161
|
+
_i = 0, entries_1 = entries;
|
|
162
|
+
_b.label = 1;
|
|
153
163
|
case 1:
|
|
154
|
-
if (!(_i <
|
|
155
|
-
xform =
|
|
164
|
+
if (!(_i < entries_1.length)) return [3 /*break*/, 4];
|
|
165
|
+
xform = entries_1[_i];
|
|
156
166
|
return [4 /*yield*/, this.transform(input[xform.other].cell, xform.transform.bTransform)];
|
|
157
167
|
case 2:
|
|
158
|
-
|
|
168
|
+
_b.sent();
|
|
159
169
|
rmsd += xform.transform.rmsd;
|
|
160
|
-
|
|
170
|
+
_b.label = 3;
|
|
161
171
|
case 3:
|
|
162
172
|
_i++;
|
|
163
173
|
return [3 /*break*/, 1];
|
|
164
174
|
case 4:
|
|
165
|
-
rmsd /= Math.max(
|
|
166
|
-
|
|
167
|
-
|
|
175
|
+
rmsd /= Math.max(entries.length - 1, 1);
|
|
176
|
+
formatPairs = function (pairs) {
|
|
177
|
+
return "[".concat(pairs.map(function (_a) {
|
|
178
|
+
var i = _a[0], j = _a[1];
|
|
179
|
+
return "(".concat(structures[i].models[0].entryId, ", ").concat(structures[j].models[0].entryId, ")");
|
|
180
|
+
}).join(', '), "]");
|
|
181
|
+
};
|
|
182
|
+
if (zeroOverlapPairs.length) {
|
|
183
|
+
this.plugin.log.warn("Superposition: No UNIPROT mapping overlap between structures ".concat(formatPairs(zeroOverlapPairs), "."));
|
|
184
|
+
}
|
|
185
|
+
if (failedPairs.length) {
|
|
186
|
+
this.plugin.log.error("Superposition: Failed to superpose structures ".concat(formatPairs(failedPairs), "."));
|
|
187
|
+
}
|
|
188
|
+
if (!entries.length) return [3 /*break*/, 6];
|
|
189
|
+
this.plugin.log.info("Superposed ".concat(entries.length + 1, " structures with avg. RMSD ").concat(rmsd.toFixed(2), " \u00C5."));
|
|
190
|
+
return [4 /*yield*/, this.cameraReset()];
|
|
168
191
|
case 5:
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
192
|
+
_b.sent();
|
|
193
|
+
_b.label = 6;
|
|
194
|
+
case 6: return [2 /*return*/];
|
|
172
195
|
}
|
|
173
196
|
});
|
|
174
197
|
}); };
|
|
@@ -192,7 +215,7 @@ var SuperpositionControls = /** @class */ (function (_super) {
|
|
|
192
215
|
_this.setState({ isBusy: v });
|
|
193
216
|
});
|
|
194
217
|
this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection, function (sel) {
|
|
195
|
-
_this.setState({ canUseDb: sel.structures.every(function (s) { var _a; return !!((_a = s.cell.obj) === null || _a === void 0 ? void 0 : _a.data) && s.cell.obj.data.models.some(function (m) { return
|
|
218
|
+
_this.setState({ canUseDb: sel.structures.every(function (s) { var _a; return !!((_a = s.cell.obj) === null || _a === void 0 ? void 0 : _a.data) && s.cell.obj.data.models.some(function (m) { return sifts_mapping_1.SIFTSMapping.Provider.isApplicable(m); }); }) });
|
|
196
219
|
});
|
|
197
220
|
};
|
|
198
221
|
Object.defineProperty(SuperpositionControls.prototype, "selection", {
|
|
@@ -230,6 +253,19 @@ var SuperpositionControls = /** @class */ (function (_super) {
|
|
|
230
253
|
});
|
|
231
254
|
});
|
|
232
255
|
};
|
|
256
|
+
SuperpositionControls.prototype.cameraReset = function () {
|
|
257
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
|
|
258
|
+
return (0, tslib_1.__generator)(this, function (_a) {
|
|
259
|
+
switch (_a.label) {
|
|
260
|
+
case 0: return [4 /*yield*/, new Promise(function (res) { return requestAnimationFrame(res); })];
|
|
261
|
+
case 1:
|
|
262
|
+
_a.sent();
|
|
263
|
+
commands_1.PluginCommands.Camera.Reset(this.plugin);
|
|
264
|
+
return [2 /*return*/];
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
});
|
|
268
|
+
};
|
|
233
269
|
SuperpositionControls.prototype.highlight = function (loci) {
|
|
234
270
|
this.plugin.managers.interactivity.lociHighlights.highlightOnly({ loci: loci }, false);
|
|
235
271
|
};
|
|
@@ -321,7 +357,7 @@ var SuperpositionControls = /** @class */ (function (_super) {
|
|
|
321
357
|
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [entries.length > 0 && (0, jsx_runtime_1.jsx)("div", (0, tslib_1.__assign)({ className: 'msp-control-offset' }, { children: entries.map(function (e, i) { return _this.atomsLociEntry(e, i); }) }), void 0), entries.length < 2 && (0, jsx_runtime_1.jsx)("div", (0, tslib_1.__assign)({ className: 'msp-control-offset msp-help-text' }, { children: (0, jsx_runtime_1.jsxs)("div", (0, tslib_1.__assign)({ className: 'msp-help-description' }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: icons_1.HelpOutlineSvg, inline: true }, void 0), "Add 1 or more selections (toggle ", (0, jsx_runtime_1.jsx)(selection_1.ToggleSelectionModeButton, { inline: true }, void 0), " mode) from separate structures. Selections must be limited to single atoms."] }), void 0) }), void 0), entries.length > 1 && (0, jsx_runtime_1.jsx)(common_1.Button, (0, tslib_1.__assign)({ title: 'Superpose structures by selected atoms.', className: 'msp-btn-commit msp-btn-commit-on', onClick: this.superposeAtoms, style: { marginTop: '1px' } }, { children: "Superpose" }), void 0)] }, void 0);
|
|
322
358
|
};
|
|
323
359
|
SuperpositionControls.prototype.superposeByDbMapping = function () {
|
|
324
|
-
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(common_1.Button, (0, tslib_1.__assign)({ icon: icons_1.SuperposeChainsSvg, title: 'Superpose structures using
|
|
360
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(common_1.Button, (0, tslib_1.__assign)({ icon: icons_1.SuperposeChainsSvg, title: 'Superpose structures using intersection of residues from SIFTS UNIPROT mapping.', className: 'msp-btn msp-btn-block', onClick: this.superposeDb, style: { marginTop: '1px' }, disabled: this.state.isBusy }, { children: "Uniprot" }), void 0) }, void 0);
|
|
325
361
|
};
|
|
326
362
|
SuperpositionControls.prototype.render = function () {
|
|
327
363
|
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", (0, tslib_1.__assign)({ className: 'msp-flex-row' }, { children: [(0, jsx_runtime_1.jsx)(common_1.ToggleButton, { icon: icons_1.SuperposeChainsSvg, label: 'Chains', toggle: this.toggleByChains, isSelected: this.state.action === 'byChains', disabled: this.state.isBusy }, void 0), (0, jsx_runtime_1.jsx)(common_1.ToggleButton, { icon: icons_1.SuperposeAtomsSvg, label: 'Atoms', toggle: this.toggleByAtoms, isSelected: this.state.action === 'byAtoms', disabled: this.state.isBusy }, void 0), this.state.canUseDb && this.superposeByDbMapping(), (0, jsx_runtime_1.jsx)(common_1.ToggleButton, { icon: icons_1.TuneSvg, label: '', title: 'Options', toggle: this.toggleOptions, isSelected: this.state.action === 'options', disabled: this.state.isBusy, style: { flex: '0 0 40px', padding: 0 } }, void 0)] }), void 0), this.state.action === 'byChains' && this.addByChains(), this.state.action === 'byAtoms' && this.addByAtoms(), this.state.action === 'options' && (0, jsx_runtime_1.jsx)("div", (0, tslib_1.__assign)({ className: 'msp-control-offset' }, { children: (0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: exports.StructureSuperpositionParams, values: this.state.options, onChangeValues: this.setOptions, isDisabled: this.state.isBusy }, void 0) }), void 0)] }, void 0);
|
|
@@ -68,16 +68,16 @@ var VolumeStreamingControls = /** @class */ (function (_super) {
|
|
|
68
68
|
return !!((_b = (_a = transformers_1.InitVolumeStreaming.definition).isApplicable) === null || _b === void 0 ? void 0 : _b.call(_a, pivot.obj, pivot.transform, this.plugin));
|
|
69
69
|
};
|
|
70
70
|
VolumeStreamingControls.prototype.renderEnable = function () {
|
|
71
|
-
var _a;
|
|
71
|
+
var _a, _b;
|
|
72
72
|
var pivot = this.pivot;
|
|
73
73
|
if (!pivot.cell.parent)
|
|
74
74
|
return null;
|
|
75
75
|
var root = mol_state_1.StateSelection.findTagInSubtree(pivot.cell.parent.tree, this.pivot.cell.transform.ref, behavior_1.VolumeStreaming.RootTag);
|
|
76
76
|
var rootCell = root && pivot.cell.parent.cells.get(root);
|
|
77
77
|
var simpleApply = rootCell && rootCell.status === 'error'
|
|
78
|
-
? { header: 'Error
|
|
79
|
-
: rootCell && ((
|
|
80
|
-
? { header: 'Error
|
|
78
|
+
? { header: !!rootCell.errorText && ((_a = rootCell.errorText) === null || _a === void 0 ? void 0 : _a.includes('404')) ? 'No Density Data Available' : 'Error Enabling', icon: icons_1.ErrorSvg, title: rootCell.errorText }
|
|
79
|
+
: rootCell && ((_b = rootCell.obj) === null || _b === void 0 ? void 0 : _b.data.entries.length) === 0
|
|
80
|
+
? { header: 'Error Enabling', icon: icons_1.ErrorSvg, title: 'No Entry for Streaming Found' }
|
|
81
81
|
: { header: 'Enable', icon: icons_1.CheckSvg, title: 'Enable' };
|
|
82
82
|
return (0, jsx_runtime_1.jsx)(apply_action_1.ApplyActionControl, { state: pivot.cell.parent, action: transformers_1.InitVolumeStreaming, initiallyCollapsed: true, nodeRef: pivot.cell.transform.ref, simpleApply: simpleApply }, void 0);
|
|
83
83
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
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
5
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
@@ -1,6 +1,6 @@
|
|
|
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
6
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
@@ -12,9 +12,9 @@ var param_definition_1 = require("../../../mol-util/param-definition");
|
|
|
12
12
|
var names_1 = require("../../../mol-util/color/names");
|
|
13
13
|
var text_1 = require("../../../mol-geo/geometry/text/text");
|
|
14
14
|
exports.MeasurementRepresentationCommonTextParams = {
|
|
15
|
-
customText: param_definition_1.ParamDefinition.Text('', { label: 'Text', description: 'Override the label with custom value.' }),
|
|
15
|
+
customText: param_definition_1.ParamDefinition.Text('', { label: 'Text', description: 'Override the label with custom value.', isEssential: true }),
|
|
16
16
|
textColor: param_definition_1.ParamDefinition.Color(names_1.ColorNames.black, { isEssential: true }),
|
|
17
|
-
textSize: param_definition_1.ParamDefinition.Numeric(0.5, { min: 0.1, max:
|
|
17
|
+
textSize: param_definition_1.ParamDefinition.Numeric(0.5, { min: 0.1, max: 10, step: 0.1 }, { isEssential: true }),
|
|
18
18
|
};
|
|
19
19
|
exports.LociLabelTextParams = (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, text_1.Text.Params), exports.MeasurementRepresentationCommonTextParams), { borderWidth: param_definition_1.ParamDefinition.Numeric(0.2, { min: 0, max: 0.5, step: 0.01 }) });
|
|
20
20
|
//# sourceMappingURL=common.js.map
|