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,24 +1,24 @@
|
|
|
1
|
-
$default-background: #2D3E50;
|
|
2
|
-
$font-color: #EDF1F2;
|
|
3
|
-
$hover-font-color: #3B9AD9;
|
|
4
|
-
$entity-current-font-color: #FFFFFF;
|
|
5
|
-
$msp-btn-remove-background: #BF3A31;
|
|
6
|
-
$msp-btn-remove-hover-font-color:#ffffff;
|
|
7
|
-
$msp-btn-commit-on-font-color: #ffffff;
|
|
8
|
-
$entity-badge-font-color: #ccd4e0;
|
|
9
|
-
|
|
10
|
-
// used in LOG
|
|
11
|
-
$log-message: #0CCA5D;
|
|
12
|
-
$log-info: #5E3673;
|
|
13
|
-
$log-warning: #FCC937;
|
|
14
|
-
$log-error: #FD354B;
|
|
15
|
-
|
|
16
|
-
$logo-background: rgba(0,0,0,0.75);
|
|
17
|
-
|
|
18
|
-
@function color-lower-contrast($color, $amount) {
|
|
19
|
-
@return darken($color, $amount);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
@function color-increase-contrast($color, $amount) {
|
|
23
|
-
@return lighten($color, $amount);
|
|
1
|
+
$default-background: #2D3E50;
|
|
2
|
+
$font-color: #EDF1F2;
|
|
3
|
+
$hover-font-color: #3B9AD9;
|
|
4
|
+
$entity-current-font-color: #FFFFFF;
|
|
5
|
+
$msp-btn-remove-background: #BF3A31;
|
|
6
|
+
$msp-btn-remove-hover-font-color:#ffffff;
|
|
7
|
+
$msp-btn-commit-on-font-color: #ffffff;
|
|
8
|
+
$entity-badge-font-color: #ccd4e0;
|
|
9
|
+
|
|
10
|
+
// used in LOG
|
|
11
|
+
$log-message: #0CCA5D;
|
|
12
|
+
$log-info: #5E3673;
|
|
13
|
+
$log-warning: #FCC937;
|
|
14
|
+
$log-error: #FD354B;
|
|
15
|
+
|
|
16
|
+
$logo-background: rgba(0,0,0,0.75);
|
|
17
|
+
|
|
18
|
+
@function color-lower-contrast($color, $amount) {
|
|
19
|
+
@return darken($color, $amount);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@function color-increase-contrast($color, $amount) {
|
|
23
|
+
@return lighten($color, $amount);
|
|
24
24
|
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
$default-background: #111318;
|
|
2
|
-
$font-color: #ccd4e0;
|
|
3
|
-
$hover-font-color: #51A2FB;
|
|
4
|
-
$entity-current-font-color: #68BEFD;
|
|
5
|
-
$msp-btn-remove-background: #DE0A28;
|
|
6
|
-
$msp-btn-remove-hover-font-color:#F2F4F7;
|
|
7
|
-
$msp-btn-commit-on-font-color: #68BEFD;
|
|
8
|
-
$entity-badge-font-color: #ccd4e0;
|
|
9
|
-
|
|
10
|
-
// used in LOG
|
|
11
|
-
$log-message: #0CCA5D;
|
|
12
|
-
$log-info: #5E3673;
|
|
13
|
-
$log-warning: #FCC937;
|
|
14
|
-
$log-error: #FD354B;
|
|
15
|
-
|
|
16
|
-
$logo-background: rgba(0,0,0,0.75);
|
|
17
|
-
|
|
18
|
-
@function color-lower-contrast($color, $amount) {
|
|
19
|
-
@return darken($color, $amount);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
@function color-increase-contrast($color, $amount) {
|
|
23
|
-
@return lighten($color, $amount);
|
|
1
|
+
$default-background: #111318;
|
|
2
|
+
$font-color: #ccd4e0;
|
|
3
|
+
$hover-font-color: #51A2FB;
|
|
4
|
+
$entity-current-font-color: #68BEFD;
|
|
5
|
+
$msp-btn-remove-background: #DE0A28;
|
|
6
|
+
$msp-btn-remove-hover-font-color:#F2F4F7;
|
|
7
|
+
$msp-btn-commit-on-font-color: #68BEFD;
|
|
8
|
+
$entity-badge-font-color: #ccd4e0;
|
|
9
|
+
|
|
10
|
+
// used in LOG
|
|
11
|
+
$log-message: #0CCA5D;
|
|
12
|
+
$log-info: #5E3673;
|
|
13
|
+
$log-warning: #FCC937;
|
|
14
|
+
$log-error: #FD354B;
|
|
15
|
+
|
|
16
|
+
$logo-background: rgba(0,0,0,0.75);
|
|
17
|
+
|
|
18
|
+
@function color-lower-contrast($color, $amount) {
|
|
19
|
+
@return darken($color, $amount);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@function color-increase-contrast($color, $amount) {
|
|
23
|
+
@return lighten($color, $amount);
|
|
24
24
|
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
// this is complement of the dark theme
|
|
2
|
-
|
|
3
|
-
@function compl($color) {
|
|
4
|
-
@return rgb(255 - red($color), 255 - green($color), 255 - blue($color));
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
$default-background: compl(#111318);
|
|
8
|
-
$font-color: compl(#ccd4e0);
|
|
9
|
-
$hover-font-color: compl(#51A2FB);
|
|
10
|
-
$entity-current-font-color: compl(#68BEFD);
|
|
11
|
-
$msp-btn-commit-on-font-color: compl(#68BEFD);
|
|
12
|
-
$entity-badge-font-color: lighten(#ccd4e0,10%);
|
|
13
|
-
$msp-btn-remove-background: #DE0A28;
|
|
14
|
-
$msp-btn-remove-hover-font-color:#F2F4F7;
|
|
15
|
-
|
|
16
|
-
// used in LOG
|
|
17
|
-
$log-message: #0CCA5D;
|
|
18
|
-
$log-info: #5E3673;
|
|
19
|
-
$log-warning: #FCC937;
|
|
20
|
-
$log-error: #FD354B;
|
|
21
|
-
|
|
22
|
-
$logo-background: compl(#111318);
|
|
23
|
-
|
|
24
|
-
@function color-lower-contrast($color, $amount) {
|
|
25
|
-
@return lighten($color, $amount);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
@function color-increase-contrast($color, $amount) {
|
|
29
|
-
@return darken($color, $amount);
|
|
1
|
+
// this is complement of the dark theme
|
|
2
|
+
|
|
3
|
+
@function compl($color) {
|
|
4
|
+
@return rgb(255 - red($color), 255 - green($color), 255 - blue($color));
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
$default-background: compl(#111318);
|
|
8
|
+
$font-color: compl(#ccd4e0);
|
|
9
|
+
$hover-font-color: compl(#51A2FB);
|
|
10
|
+
$entity-current-font-color: compl(#68BEFD);
|
|
11
|
+
$msp-btn-commit-on-font-color: compl(#68BEFD);
|
|
12
|
+
$entity-badge-font-color: lighten(#ccd4e0,10%);
|
|
13
|
+
$msp-btn-remove-background: #DE0A28;
|
|
14
|
+
$msp-btn-remove-hover-font-color:#F2F4F7;
|
|
15
|
+
|
|
16
|
+
// used in LOG
|
|
17
|
+
$log-message: #0CCA5D;
|
|
18
|
+
$log-info: #5E3673;
|
|
19
|
+
$log-warning: #FCC937;
|
|
20
|
+
$log-error: #FD354B;
|
|
21
|
+
|
|
22
|
+
$logo-background: compl(#111318);
|
|
23
|
+
|
|
24
|
+
@function color-lower-contrast($color, $amount) {
|
|
25
|
+
@return lighten($color, $amount);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@function color-increase-contrast($color, $amount) {
|
|
29
|
+
@return darken($color, $amount);
|
|
30
30
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@import 'colors/dark';
|
|
1
|
+
@import 'colors/dark';
|
|
2
2
|
@import 'base/base';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@import 'colors/light';
|
|
1
|
+
@import 'colors/light';
|
|
2
2
|
@import 'base/base';
|
|
@@ -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,128 @@
|
|
|
1
|
+
import { __assign, __awaiter, __extends, __generator } from "tslib";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* Copyright (c) 2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
5
|
+
*
|
|
6
|
+
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
7
|
+
*/
|
|
8
|
+
import { PresetStructureRepresentations } from '../../mol-plugin-state/builder/structure/representation-preset';
|
|
9
|
+
import { Color } from '../../mol-util/color';
|
|
10
|
+
import { CollapsableControls, PurePluginUIComponent } from '../base';
|
|
11
|
+
import { Button } from '../controls/common';
|
|
12
|
+
import { MagicWandSvg } from '../controls/icons';
|
|
13
|
+
import { ParamDefinition as PD } from '../../mol-util/param-definition';
|
|
14
|
+
import { PostprocessingParams } from '../../mol-canvas3d/passes/postprocessing';
|
|
15
|
+
import { PluginConfig } from '../../mol-plugin/config';
|
|
16
|
+
import { StructureComponentManager } from '../../mol-plugin-state/manager/structure/component';
|
|
17
|
+
var StructureQuickStylesControls = /** @class */ (function (_super) {
|
|
18
|
+
__extends(StructureQuickStylesControls, _super);
|
|
19
|
+
function StructureQuickStylesControls() {
|
|
20
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
21
|
+
}
|
|
22
|
+
StructureQuickStylesControls.prototype.defaultState = function () {
|
|
23
|
+
return {
|
|
24
|
+
isCollapsed: false,
|
|
25
|
+
header: 'Quick Styles',
|
|
26
|
+
brand: { accent: 'gray', svg: MagicWandSvg }
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
StructureQuickStylesControls.prototype.renderControls = function () {
|
|
30
|
+
return _jsx(_Fragment, { children: _jsx(QuickStyles, {}, void 0) }, void 0);
|
|
31
|
+
};
|
|
32
|
+
return StructureQuickStylesControls;
|
|
33
|
+
}(CollapsableControls));
|
|
34
|
+
export { StructureQuickStylesControls };
|
|
35
|
+
var QuickStyles = /** @class */ (function (_super) {
|
|
36
|
+
__extends(QuickStyles, _super);
|
|
37
|
+
function QuickStyles() {
|
|
38
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
39
|
+
}
|
|
40
|
+
QuickStyles.prototype.default = function () {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
42
|
+
var structures, preset, provider, p;
|
|
43
|
+
return __generator(this, function (_a) {
|
|
44
|
+
switch (_a.label) {
|
|
45
|
+
case 0:
|
|
46
|
+
structures = this.plugin.managers.structure.hierarchy.selection.structures;
|
|
47
|
+
preset = this.plugin.config.get(PluginConfig.Structure.DefaultRepresentationPreset) || PresetStructureRepresentations.auto.id;
|
|
48
|
+
provider = this.plugin.builders.structure.representation.resolveProvider(preset);
|
|
49
|
+
return [4 /*yield*/, this.plugin.managers.structure.component.applyPreset(structures, provider)];
|
|
50
|
+
case 1:
|
|
51
|
+
_a.sent();
|
|
52
|
+
this.plugin.managers.structure.component.setOptions(PD.getDefaultValues(StructureComponentManager.OptionsParams));
|
|
53
|
+
if (this.plugin.canvas3d) {
|
|
54
|
+
p = PD.getDefaultValues(PostprocessingParams);
|
|
55
|
+
this.plugin.canvas3d.setProps({
|
|
56
|
+
postprocessing: { outline: p.outline, occlusion: p.occlusion }
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
return [2 /*return*/];
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
QuickStyles.prototype.illustrative = function () {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
66
|
+
var structures;
|
|
67
|
+
return __generator(this, function (_a) {
|
|
68
|
+
switch (_a.label) {
|
|
69
|
+
case 0:
|
|
70
|
+
structures = this.plugin.managers.structure.hierarchy.selection.structures;
|
|
71
|
+
return [4 /*yield*/, this.plugin.managers.structure.component.applyPreset(structures, PresetStructureRepresentations.illustrative)];
|
|
72
|
+
case 1:
|
|
73
|
+
_a.sent();
|
|
74
|
+
if (this.plugin.canvas3d) {
|
|
75
|
+
this.plugin.canvas3d.setProps({
|
|
76
|
+
postprocessing: {
|
|
77
|
+
outline: {
|
|
78
|
+
name: 'on',
|
|
79
|
+
params: { scale: 1, color: Color(0x000000), threshold: 0.25 }
|
|
80
|
+
},
|
|
81
|
+
occlusion: {
|
|
82
|
+
name: 'on',
|
|
83
|
+
params: { bias: 0.9, blurKernelSize: 15, radius: 5, samples: 32 }
|
|
84
|
+
},
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
return [2 /*return*/];
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
QuickStyles.prototype.stylized = function () {
|
|
94
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
95
|
+
var pp;
|
|
96
|
+
return __generator(this, function (_a) {
|
|
97
|
+
this.plugin.managers.structure.component.setOptions(__assign(__assign({}, this.plugin.managers.structure.component.state.options), { ignoreLight: true }));
|
|
98
|
+
if (this.plugin.canvas3d) {
|
|
99
|
+
pp = this.plugin.canvas3d.props.postprocessing;
|
|
100
|
+
this.plugin.canvas3d.setProps({
|
|
101
|
+
postprocessing: {
|
|
102
|
+
outline: {
|
|
103
|
+
name: 'on',
|
|
104
|
+
params: pp.outline.name === 'on'
|
|
105
|
+
? pp.outline.params
|
|
106
|
+
: { scale: 1, color: Color(0x000000), threshold: 0.33 }
|
|
107
|
+
},
|
|
108
|
+
occlusion: {
|
|
109
|
+
name: 'on',
|
|
110
|
+
params: pp.occlusion.name === 'on'
|
|
111
|
+
? pp.occlusion.params
|
|
112
|
+
: { bias: 0.9, blurKernelSize: 15, radius: 5, samples: 32 }
|
|
113
|
+
},
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
return [2 /*return*/];
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
QuickStyles.prototype.render = function () {
|
|
122
|
+
var _this = this;
|
|
123
|
+
return _jsxs("div", __assign({ className: 'msp-flex-row' }, { children: [_jsx(Button, __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), _jsx(Button, __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), _jsx(Button, __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);
|
|
124
|
+
};
|
|
125
|
+
return QuickStyles;
|
|
126
|
+
}(PurePluginUIComponent));
|
|
127
|
+
export { QuickStyles };
|
|
128
|
+
//# 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;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { __assign, __awaiter, __extends, __generator } from "tslib";
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
/**
|
|
4
|
-
* Copyright (c) 2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
|
+
* Copyright (c) 2020-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
5
5
|
*
|
|
6
6
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
7
|
+
* @author Sebastian Bittrich <sebastian.bittrich@rcsb.org>
|
|
7
8
|
*/
|
|
8
9
|
import { CollapsableControls, PurePluginUIComponent } from '../base';
|
|
9
10
|
import { Icon, ArrowUpwardSvg, ArrowDownwardSvg, DeleteOutlinedSvg, HelpOutlineSvg, TuneSvg, SuperposeAtomsSvg, SuperposeChainsSvg, SuperpositionSvg } from '../controls/icons';
|
|
@@ -18,9 +19,9 @@ import { structureElementStatsLabel, elementLabel } from '../../mol-theme/label'
|
|
|
18
19
|
import { ParameterControls } from '../controls/parameters';
|
|
19
20
|
import { stripTags } from '../../mol-util/string';
|
|
20
21
|
import { ToggleSelectionModeButton } from './selection';
|
|
21
|
-
import {
|
|
22
|
+
import { alignAndSuperposeWithSIFTSMapping } from '../../mol-model/structure/structure/util/superposition-sifts-mapping';
|
|
22
23
|
import { PluginCommands } from '../../mol-plugin/commands';
|
|
23
|
-
import {
|
|
24
|
+
import { SIFTSMapping } from '../../mol-model-props/sequence/sifts-mapping';
|
|
24
25
|
var StructureSuperpositionControls = /** @class */ (function (_super) {
|
|
25
26
|
__extends(StructureSuperpositionControls, _super);
|
|
26
27
|
function StructureSuperpositionControls() {
|
|
@@ -47,7 +48,8 @@ var StructureSuperpositionControls = /** @class */ (function (_super) {
|
|
|
47
48
|
}(CollapsableControls));
|
|
48
49
|
export { StructureSuperpositionControls };
|
|
49
50
|
export var StructureSuperpositionParams = {
|
|
50
|
-
alignSequences: PD.Boolean(true, { isEssential: true, description: '
|
|
51
|
+
alignSequences: PD.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.' }),
|
|
52
|
+
traceOnly: PD.Boolean(true, { description: 'For Chain- and Uniprot-based 3D superposition, base superposition only on CA (and equivalent) atoms.' })
|
|
51
53
|
};
|
|
52
54
|
var DefaultStructureSuperpositionOptions = PD.getDefaultValues(StructureSuperpositionParams);
|
|
53
55
|
var SuperpositionTag = 'SuperpositionTransform';
|
|
@@ -64,14 +66,14 @@ var SuperpositionControls = /** @class */ (function (_super) {
|
|
|
64
66
|
options: DefaultStructureSuperpositionOptions
|
|
65
67
|
};
|
|
66
68
|
_this.superposeChains = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
67
|
-
var query, entries,
|
|
69
|
+
var query, entries, locis, transforms, eA, i, il, eB, _a, bTransform, rmsd, labelA, labelB;
|
|
68
70
|
var _this = this;
|
|
69
71
|
return __generator(this, function (_b) {
|
|
70
72
|
switch (_b.label) {
|
|
71
73
|
case 0:
|
|
72
|
-
query = StructureSelectionQueries.trace.query;
|
|
74
|
+
query = (this.state.options.traceOnly ? StructureSelectionQueries.trace : StructureSelectionQueries.polymer).query;
|
|
73
75
|
entries = this.chainEntries;
|
|
74
|
-
|
|
76
|
+
locis = entries.map(function (e, i) {
|
|
75
77
|
var s = StructureElement.Loci.toStructure(e.loci);
|
|
76
78
|
var loci = StructureSelection.toLociWithSourceUnits(query(new QueryContext(s)));
|
|
77
79
|
return StructureElement.Loci.remap(loci, i === 0
|
|
@@ -79,10 +81,10 @@ var SuperpositionControls = /** @class */ (function (_super) {
|
|
|
79
81
|
: loci.structure.root);
|
|
80
82
|
});
|
|
81
83
|
transforms = this.state.options.alignSequences
|
|
82
|
-
? alignAndSuperpose(
|
|
83
|
-
: superpose(
|
|
84
|
+
? alignAndSuperpose(locis)
|
|
85
|
+
: superpose(locis);
|
|
84
86
|
eA = entries[0];
|
|
85
|
-
i = 1, il =
|
|
87
|
+
i = 1, il = locis.length;
|
|
86
88
|
_b.label = 1;
|
|
87
89
|
case 1:
|
|
88
90
|
if (!(i < il)) return [3 /*break*/, 4];
|
|
@@ -98,7 +100,10 @@ var SuperpositionControls = /** @class */ (function (_super) {
|
|
|
98
100
|
case 3:
|
|
99
101
|
++i;
|
|
100
102
|
return [3 /*break*/, 1];
|
|
101
|
-
case 4: return [
|
|
103
|
+
case 4: return [4 /*yield*/, this.cameraReset()];
|
|
104
|
+
case 5:
|
|
105
|
+
_b.sent();
|
|
106
|
+
return [2 /*return*/];
|
|
102
107
|
}
|
|
103
108
|
});
|
|
104
109
|
}); };
|
|
@@ -133,39 +138,57 @@ var SuperpositionControls = /** @class */ (function (_super) {
|
|
|
133
138
|
case 3:
|
|
134
139
|
++i;
|
|
135
140
|
return [3 /*break*/, 1];
|
|
136
|
-
case 4: return [
|
|
141
|
+
case 4: return [4 /*yield*/, this.cameraReset()];
|
|
142
|
+
case 5:
|
|
143
|
+
_b.sent();
|
|
144
|
+
return [2 /*return*/];
|
|
137
145
|
}
|
|
138
146
|
});
|
|
139
147
|
}); };
|
|
140
148
|
_this.superposeDb = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
141
|
-
var input,
|
|
142
|
-
return __generator(this, function (
|
|
143
|
-
switch (
|
|
149
|
+
var input, traceOnly, structures, _a, entries, failedPairs, zeroOverlapPairs, rmsd, _i, entries_1, xform, formatPairs;
|
|
150
|
+
return __generator(this, function (_b) {
|
|
151
|
+
switch (_b.label) {
|
|
144
152
|
case 0:
|
|
145
153
|
input = this.plugin.managers.structure.hierarchy.behaviors.selection.value.structures;
|
|
146
|
-
|
|
154
|
+
traceOnly = this.state.options.traceOnly;
|
|
155
|
+
structures = input.map(function (s) { var _a; return (_a = s.cell.obj) === null || _a === void 0 ? void 0 : _a.data; });
|
|
156
|
+
_a = alignAndSuperposeWithSIFTSMapping(structures, { traceOnly: traceOnly }), entries = _a.entries, failedPairs = _a.failedPairs, zeroOverlapPairs = _a.zeroOverlapPairs;
|
|
147
157
|
rmsd = 0;
|
|
148
|
-
_i = 0,
|
|
149
|
-
|
|
158
|
+
_i = 0, entries_1 = entries;
|
|
159
|
+
_b.label = 1;
|
|
150
160
|
case 1:
|
|
151
|
-
if (!(_i <
|
|
152
|
-
xform =
|
|
161
|
+
if (!(_i < entries_1.length)) return [3 /*break*/, 4];
|
|
162
|
+
xform = entries_1[_i];
|
|
153
163
|
return [4 /*yield*/, this.transform(input[xform.other].cell, xform.transform.bTransform)];
|
|
154
164
|
case 2:
|
|
155
|
-
|
|
165
|
+
_b.sent();
|
|
156
166
|
rmsd += xform.transform.rmsd;
|
|
157
|
-
|
|
167
|
+
_b.label = 3;
|
|
158
168
|
case 3:
|
|
159
169
|
_i++;
|
|
160
170
|
return [3 /*break*/, 1];
|
|
161
171
|
case 4:
|
|
162
|
-
rmsd /= Math.max(
|
|
163
|
-
|
|
164
|
-
|
|
172
|
+
rmsd /= Math.max(entries.length - 1, 1);
|
|
173
|
+
formatPairs = function (pairs) {
|
|
174
|
+
return "[".concat(pairs.map(function (_a) {
|
|
175
|
+
var i = _a[0], j = _a[1];
|
|
176
|
+
return "(".concat(structures[i].models[0].entryId, ", ").concat(structures[j].models[0].entryId, ")");
|
|
177
|
+
}).join(', '), "]");
|
|
178
|
+
};
|
|
179
|
+
if (zeroOverlapPairs.length) {
|
|
180
|
+
this.plugin.log.warn("Superposition: No UNIPROT mapping overlap between structures ".concat(formatPairs(zeroOverlapPairs), "."));
|
|
181
|
+
}
|
|
182
|
+
if (failedPairs.length) {
|
|
183
|
+
this.plugin.log.error("Superposition: Failed to superpose structures ".concat(formatPairs(failedPairs), "."));
|
|
184
|
+
}
|
|
185
|
+
if (!entries.length) return [3 /*break*/, 6];
|
|
186
|
+
this.plugin.log.info("Superposed ".concat(entries.length + 1, " structures with avg. RMSD ").concat(rmsd.toFixed(2), " \u00C5."));
|
|
187
|
+
return [4 /*yield*/, this.cameraReset()];
|
|
165
188
|
case 5:
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
189
|
+
_b.sent();
|
|
190
|
+
_b.label = 6;
|
|
191
|
+
case 6: return [2 /*return*/];
|
|
169
192
|
}
|
|
170
193
|
});
|
|
171
194
|
}); };
|
|
@@ -189,7 +212,7 @@ var SuperpositionControls = /** @class */ (function (_super) {
|
|
|
189
212
|
_this.setState({ isBusy: v });
|
|
190
213
|
});
|
|
191
214
|
this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection, function (sel) {
|
|
192
|
-
_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
|
|
215
|
+
_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 SIFTSMapping.Provider.isApplicable(m); }); }) });
|
|
193
216
|
});
|
|
194
217
|
};
|
|
195
218
|
Object.defineProperty(SuperpositionControls.prototype, "selection", {
|
|
@@ -227,6 +250,19 @@ var SuperpositionControls = /** @class */ (function (_super) {
|
|
|
227
250
|
});
|
|
228
251
|
});
|
|
229
252
|
};
|
|
253
|
+
SuperpositionControls.prototype.cameraReset = function () {
|
|
254
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
255
|
+
return __generator(this, function (_a) {
|
|
256
|
+
switch (_a.label) {
|
|
257
|
+
case 0: return [4 /*yield*/, new Promise(function (res) { return requestAnimationFrame(res); })];
|
|
258
|
+
case 1:
|
|
259
|
+
_a.sent();
|
|
260
|
+
PluginCommands.Camera.Reset(this.plugin);
|
|
261
|
+
return [2 /*return*/];
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
});
|
|
265
|
+
};
|
|
230
266
|
SuperpositionControls.prototype.highlight = function (loci) {
|
|
231
267
|
this.plugin.managers.interactivity.lociHighlights.highlightOnly({ loci: loci }, false);
|
|
232
268
|
};
|
|
@@ -318,7 +354,7 @@ var SuperpositionControls = /** @class */ (function (_super) {
|
|
|
318
354
|
return _jsxs(_Fragment, { children: [entries.length > 0 && _jsx("div", __assign({ className: 'msp-control-offset' }, { children: entries.map(function (e, i) { return _this.atomsLociEntry(e, i); }) }), void 0), entries.length < 2 && _jsx("div", __assign({ className: 'msp-control-offset msp-help-text' }, { children: _jsxs("div", __assign({ className: 'msp-help-description' }, { children: [_jsx(Icon, { svg: HelpOutlineSvg, inline: true }, void 0), "Add 1 or more selections (toggle ", _jsx(ToggleSelectionModeButton, { inline: true }, void 0), " mode) from separate structures. Selections must be limited to single atoms."] }), void 0) }), void 0), entries.length > 1 && _jsx(Button, __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);
|
|
319
355
|
};
|
|
320
356
|
SuperpositionControls.prototype.superposeByDbMapping = function () {
|
|
321
|
-
return _jsx(_Fragment, { children: _jsx(Button, __assign({ icon: SuperposeChainsSvg, title: 'Superpose structures using
|
|
357
|
+
return _jsx(_Fragment, { children: _jsx(Button, __assign({ icon: 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);
|
|
322
358
|
};
|
|
323
359
|
SuperpositionControls.prototype.render = function () {
|
|
324
360
|
return _jsxs(_Fragment, { children: [_jsxs("div", __assign({ className: 'msp-flex-row' }, { children: [_jsx(ToggleButton, { icon: SuperposeChainsSvg, label: 'Chains', toggle: this.toggleByChains, isSelected: this.state.action === 'byChains', disabled: this.state.isBusy }, void 0), _jsx(ToggleButton, { icon: SuperposeAtomsSvg, label: 'Atoms', toggle: this.toggleByAtoms, isSelected: this.state.action === 'byAtoms', disabled: this.state.isBusy }, void 0), this.state.canUseDb && this.superposeByDbMapping(), _jsx(ToggleButton, { icon: 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' && _jsx("div", __assign({ className: 'msp-control-offset' }, { children: _jsx(ParameterControls, { params: StructureSuperpositionParams, values: this.state.options, onChangeValues: this.setOptions, isDisabled: this.state.isBusy }, void 0) }), void 0)] }, void 0);
|
|
@@ -65,16 +65,16 @@ var VolumeStreamingControls = /** @class */ (function (_super) {
|
|
|
65
65
|
return !!((_b = (_a = InitVolumeStreaming.definition).isApplicable) === null || _b === void 0 ? void 0 : _b.call(_a, pivot.obj, pivot.transform, this.plugin));
|
|
66
66
|
};
|
|
67
67
|
VolumeStreamingControls.prototype.renderEnable = function () {
|
|
68
|
-
var _a;
|
|
68
|
+
var _a, _b;
|
|
69
69
|
var pivot = this.pivot;
|
|
70
70
|
if (!pivot.cell.parent)
|
|
71
71
|
return null;
|
|
72
72
|
var root = StateSelection.findTagInSubtree(pivot.cell.parent.tree, this.pivot.cell.transform.ref, VolumeStreaming.RootTag);
|
|
73
73
|
var rootCell = root && pivot.cell.parent.cells.get(root);
|
|
74
74
|
var simpleApply = rootCell && rootCell.status === 'error'
|
|
75
|
-
? { header: 'Error
|
|
76
|
-
: rootCell && ((
|
|
77
|
-
? { header: 'Error
|
|
75
|
+
? { header: !!rootCell.errorText && ((_a = rootCell.errorText) === null || _a === void 0 ? void 0 : _a.includes('404')) ? 'No Density Data Available' : 'Error Enabling', icon: ErrorSvg, title: rootCell.errorText }
|
|
76
|
+
: rootCell && ((_b = rootCell.obj) === null || _b === void 0 ? void 0 : _b.data.entries.length) === 0
|
|
77
|
+
? { header: 'Error Enabling', icon: ErrorSvg, title: 'No Entry for Streaming Found' }
|
|
78
78
|
: { header: 'Enable', icon: CheckSvg, title: 'Enable' };
|
|
79
79
|
return _jsx(ApplyActionControl, { state: pivot.cell.parent, action: InitVolumeStreaming, initiallyCollapsed: true, nodeRef: pivot.cell.transform.ref, simpleApply: simpleApply }, void 0);
|
|
80
80
|
};
|
|
@@ -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,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>
|
|
@@ -9,9 +9,9 @@ import { ParamDefinition as PD } from '../../../mol-util/param-definition';
|
|
|
9
9
|
import { ColorNames } from '../../../mol-util/color/names';
|
|
10
10
|
import { Text } from '../../../mol-geo/geometry/text/text';
|
|
11
11
|
export var MeasurementRepresentationCommonTextParams = {
|
|
12
|
-
customText: PD.Text('', { label: 'Text', description: 'Override the label with custom value.' }),
|
|
12
|
+
customText: PD.Text('', { label: 'Text', description: 'Override the label with custom value.', isEssential: true }),
|
|
13
13
|
textColor: PD.Color(ColorNames.black, { isEssential: true }),
|
|
14
|
-
textSize: PD.Numeric(0.5, { min: 0.1, max:
|
|
14
|
+
textSize: PD.Numeric(0.5, { min: 0.1, max: 10, step: 0.1 }, { isEssential: true }),
|
|
15
15
|
};
|
|
16
16
|
export var LociLabelTextParams = __assign(__assign(__assign({}, Text.Params), MeasurementRepresentationCommonTextParams), { borderWidth: PD.Numeric(0.2, { min: 0, max: 0.5, step: 0.01 }) });
|
|
17
17
|
//# sourceMappingURL=common.js.map
|
|
@@ -13,7 +13,7 @@ export declare namespace StructureRepresentationRegistry {
|
|
|
13
13
|
export const BuiltIn: {
|
|
14
14
|
cartoon: import("./representation").StructureRepresentationProvider<{
|
|
15
15
|
sizeFactor: import("../../mol-util/param-definition").ParamDefinition.Numeric;
|
|
16
|
-
visuals: import("../../mol-util/param-definition").ParamDefinition.MultiSelect<"polymer-trace" | "polymer-gap" | "nucleotide-
|
|
16
|
+
visuals: import("../../mol-util/param-definition").ParamDefinition.MultiSelect<"polymer-trace" | "polymer-gap" | "nucleotide-ring" | "nucleotide-block" | "direction-wedge">;
|
|
17
17
|
bumpFrequency: import("../../mol-util/param-definition").ParamDefinition.Numeric;
|
|
18
18
|
unitKinds: import("../../mol-util/param-definition").ParamDefinition.MultiSelect<"spheres" | "gaussians" | "atomic">;
|
|
19
19
|
includeParent: import("../../mol-util/param-definition").ParamDefinition.BooleanParam;
|
|
@@ -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 Alexander Rose <alexander.rose@weirdbyte.de>
|
|
5
5
|
*/
|
|
@@ -10,7 +10,7 @@ import { ParamDefinition as PD } from '../../../mol-util/param-definition';
|
|
|
10
10
|
import { StructureRepresentation, StructureRepresentationProvider } from '../representation';
|
|
11
11
|
export declare const CartoonParams: {
|
|
12
12
|
sizeFactor: PD.Numeric;
|
|
13
|
-
visuals: PD.MultiSelect<"polymer-trace" | "polymer-gap" | "nucleotide-
|
|
13
|
+
visuals: PD.MultiSelect<"polymer-trace" | "polymer-gap" | "nucleotide-ring" | "nucleotide-block" | "direction-wedge">;
|
|
14
14
|
bumpFrequency: PD.Numeric;
|
|
15
15
|
unitKinds: PD.MultiSelect<"spheres" | "gaussians" | "atomic">;
|
|
16
16
|
includeParent: PD.BooleanParam;
|
|
@@ -48,7 +48,7 @@ export declare const CartoonParams: {
|
|
|
48
48
|
export declare type CartoonParams = typeof CartoonParams;
|
|
49
49
|
export declare function getCartoonParams(ctx: ThemeRegistryContext, structure: Structure): {
|
|
50
50
|
sizeFactor: PD.Numeric;
|
|
51
|
-
visuals: PD.MultiSelect<"polymer-trace" | "polymer-gap" | "nucleotide-
|
|
51
|
+
visuals: PD.MultiSelect<"polymer-trace" | "polymer-gap" | "nucleotide-ring" | "nucleotide-block" | "direction-wedge">;
|
|
52
52
|
bumpFrequency: PD.Numeric;
|
|
53
53
|
unitKinds: PD.MultiSelect<"spheres" | "gaussians" | "atomic">;
|
|
54
54
|
includeParent: PD.BooleanParam;
|
|
@@ -87,7 +87,7 @@ export declare type CartoonRepresentation = StructureRepresentation<CartoonParam
|
|
|
87
87
|
export declare function CartoonRepresentation(ctx: RepresentationContext, getParams: RepresentationParamsGetter<Structure, CartoonParams>): CartoonRepresentation;
|
|
88
88
|
export declare const CartoonRepresentationProvider: StructureRepresentationProvider<{
|
|
89
89
|
sizeFactor: PD.Numeric;
|
|
90
|
-
visuals: PD.MultiSelect<"polymer-trace" | "polymer-gap" | "nucleotide-
|
|
90
|
+
visuals: PD.MultiSelect<"polymer-trace" | "polymer-gap" | "nucleotide-ring" | "nucleotide-block" | "direction-wedge">;
|
|
91
91
|
bumpFrequency: PD.Numeric;
|
|
92
92
|
unitKinds: PD.MultiSelect<"spheres" | "gaussians" | "atomic">;
|
|
93
93
|
includeParent: PD.BooleanParam;
|