molstar 3.26.0 → 3.28.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 +202 -202
- package/build/viewer/embedded.html +52 -52
- package/build/viewer/index.html +115 -115
- package/build/viewer/molstar.css +1 -1
- 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/docking-viewer/viewport.js +1 -0
- package/lib/apps/viewer/app.d.ts +3 -1
- package/lib/apps/viewer/app.js +4 -0
- package/lib/apps/viewer/embedded.html +52 -52
- package/lib/apps/viewer/index.html +115 -115
- package/lib/cli/structure-info/volume.js +1 -1
- package/lib/commonjs/apps/docking-viewer/viewport.d.ts +2 -0
- package/lib/commonjs/apps/docking-viewer/viewport.js +1 -0
- package/lib/commonjs/apps/viewer/app.d.ts +3 -1
- package/lib/commonjs/apps/viewer/app.js +4 -0
- package/lib/commonjs/cli/structure-info/volume.js +1 -1
- package/lib/commonjs/examples/lighting/index.js +1 -1
- package/lib/commonjs/extensions/anvil/behavior.d.ts +1 -0
- package/lib/commonjs/extensions/cellpack/model.js +2 -1
- package/lib/commonjs/extensions/dnatco/confal-pyramids/behavior.d.ts +1 -0
- package/lib/commonjs/extensions/meshes/choice.d.ts +26 -0
- package/lib/commonjs/extensions/meshes/choice.js +31 -0
- package/lib/commonjs/extensions/meshes/examples.d.ts +26 -0
- package/lib/commonjs/extensions/meshes/examples.js +337 -0
- package/lib/commonjs/extensions/meshes/mesh-cif-schema.d.ts +29 -0
- package/lib/commonjs/extensions/meshes/mesh-cif-schema.js +34 -0
- package/lib/commonjs/extensions/meshes/mesh-extension.d.ts +66 -0
- package/lib/commonjs/extensions/meshes/mesh-extension.js +221 -0
- package/lib/commonjs/extensions/meshes/mesh-streaming/behavior.d.ts +105 -0
- package/lib/commonjs/extensions/meshes/mesh-streaming/behavior.js +379 -0
- package/lib/commonjs/extensions/meshes/mesh-streaming/server-info.d.ts +54 -0
- package/lib/commonjs/extensions/meshes/mesh-streaming/server-info.js +30 -0
- package/lib/commonjs/extensions/meshes/mesh-streaming/transformers.d.ts +42 -0
- package/lib/commonjs/extensions/meshes/mesh-streaming/transformers.js +273 -0
- package/lib/commonjs/extensions/meshes/mesh-utils.d.ts +41 -0
- package/lib/commonjs/extensions/meshes/mesh-utils.js +357 -0
- package/lib/commonjs/extensions/meshes/metadata.d.ts +108 -0
- package/lib/commonjs/extensions/meshes/metadata.js +72 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/behavior.d.ts +2 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/prop.d.ts +1 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/prop.js +16 -4
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/behavior.d.ts +4 -2
- package/lib/commonjs/extensions/rcsb/validation-report/behavior.d.ts +3 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-meshes.d.ts +17 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-meshes.js +156 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-models.d.ts +12 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-models.js +96 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-root.d.ts +122 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-root.js +576 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-segmentation.d.ts +20 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-segmentation.js +200 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-state.d.ts +88 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-state.js +32 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-volume.d.ts +35 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-volume.js +234 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/external-api.d.ts +11 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/external-api.js +85 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/global-state.d.ts +51 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/global-state.js +83 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/helpers.d.ts +56 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/helpers.js +171 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/index.d.ts +20 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/index.js +130 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/transformers.d.ts +33 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/transformers.js +85 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/ui.d.ts +29 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/ui.js +232 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/volseg-api/api.d.ts +22 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/volseg-api/api.js +83 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/volseg-api/data.d.ts +92 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/volseg-api/data.js +7 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/volseg-api/utils.d.ts +23 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/volseg-api/utils.js +78 -0
- package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +2 -0
- package/lib/commonjs/mol-canvas3d/passes/draw.js +3 -3
- package/lib/commonjs/mol-canvas3d/passes/image.d.ts +1 -0
- package/lib/commonjs/mol-canvas3d/passes/postprocessing.d.ts +2 -1
- package/lib/commonjs/mol-canvas3d/passes/postprocessing.js +27 -13
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +2 -1
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.js +3 -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-geo/geometry/spheres/spheres.d.ts +1 -0
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.js +3 -2
- package/lib/commonjs/mol-gl/compute/histogram-pyramid/reduction.js +1 -2
- package/lib/commonjs/mol-gl/compute/marching-cubes/isosurface.js +4 -6
- package/lib/commonjs/mol-gl/renderable/cylinders.d.ts +1 -0
- package/lib/commonjs/mol-gl/renderable/cylinders.js +1 -1
- package/lib/commonjs/mol-gl/renderable/spheres.d.ts +1 -0
- package/lib/commonjs/mol-gl/renderable/spheres.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/clip-instance.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/clip-instance.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/clip-pixel.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/clip-pixel.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common-clip.glsl.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/chunks/common-clip.glsl.js +2 -2
- package/lib/commonjs/mol-gl/shader/cylinders.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/cylinders.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/cylinders.vert.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/cylinders.vert.js +2 -2
- package/lib/commonjs/mol-gl/shader/direct-volume.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/direct-volume.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/outlines.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/outlines.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/postprocessing.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/postprocessing.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/spheres.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/spheres.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/spheres.vert.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/spheres.vert.js +2 -2
- package/lib/commonjs/mol-gl/webgl/renderbuffer.d.ts +1 -1
- package/lib/commonjs/mol-gl/webgl/renderbuffer.js +15 -0
- package/lib/commonjs/mol-gl/webgl/state.d.ts +12 -0
- package/lib/commonjs/mol-gl/webgl/state.js +136 -0
- package/lib/commonjs/mol-io/reader/cif/schema/segmentation.d.ts +38 -0
- package/lib/commonjs/mol-io/reader/cif/schema/segmentation.js +22 -0
- package/lib/commonjs/mol-io/reader/cif.d.ts +3 -1
- package/lib/commonjs/mol-io/reader/cif.js +3 -1
- package/lib/commonjs/mol-model/location.d.ts +2 -1
- package/lib/commonjs/mol-model/loci.d.ts +11 -11
- package/lib/commonjs/mol-model/loci.js +13 -1
- package/lib/commonjs/mol-model/sequence/alignment/sequence.d.ts +4 -1
- package/lib/commonjs/mol-model/sequence/alignment/sequence.js +4 -1
- package/lib/commonjs/mol-model/structure/model/properties/atomic/hierarchy.d.ts +6 -0
- package/lib/commonjs/mol-model/structure/model/properties/utils/atomic-index.js +8 -0
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/inter-compute.js +21 -5
- package/lib/commonjs/mol-model/structure/structure/util/superposition.d.ts +1 -0
- package/lib/commonjs/mol-model/structure/structure/util/superposition.js +2 -1
- package/lib/commonjs/mol-model/volume/volume.d.ts +35 -2
- package/lib/commonjs/mol-model/volume/volume.js +77 -2
- package/lib/commonjs/mol-model-formats/volume/segmentation.d.ts +23 -0
- package/lib/commonjs/mol-model-formats/volume/segmentation.js +138 -0
- package/lib/commonjs/mol-plugin/behavior/dynamic/representation.d.ts +2 -2
- package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +1 -0
- package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +2 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -3
- package/lib/commonjs/mol-plugin/commands.d.ts +1 -0
- package/lib/commonjs/mol-plugin-state/animation/built-in/model-index.js +4 -1
- 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 +13 -4
- package/lib/commonjs/mol-plugin-state/builder/structure/representation-preset.js +6 -1
- package/lib/commonjs/mol-plugin-state/builder/structure/representation.d.ts +1 -0
- package/lib/commonjs/mol-plugin-state/formats/provider.d.ts +2 -2
- package/lib/commonjs/mol-plugin-state/formats/provider.js +11 -3
- package/lib/commonjs/mol-plugin-state/formats/registry.js +6 -5
- package/lib/commonjs/mol-plugin-state/formats/volume.d.ts +27 -0
- package/lib/commonjs/mol-plugin-state/formats/volume.js +65 -1
- package/lib/commonjs/mol-plugin-state/manager/structure/component.d.ts +1 -1
- package/lib/commonjs/mol-plugin-state/manager/structure/component.js +18 -13
- package/lib/commonjs/mol-plugin-state/transforms/representation.d.ts +1 -2
- package/lib/commonjs/mol-plugin-state/transforms/representation.js +5 -6
- package/lib/commonjs/mol-plugin-state/transforms/volume.d.ts +11 -1
- package/lib/commonjs/mol-plugin-state/transforms/volume.js +55 -2
- package/lib/commonjs/mol-plugin-ui/controls/line-graph/line-graph-component.d.ts +1 -0
- package/lib/commonjs/mol-plugin-ui/controls/line-graph/line-graph-component.js +33 -13
- package/lib/commonjs/mol-plugin-ui/controls/parameters.d.ts +1 -0
- package/lib/commonjs/mol-plugin-ui/controls/parameters.js +22 -5
- package/lib/commonjs/mol-plugin-ui/sequence/sequence.d.ts +25 -17
- package/lib/commonjs/mol-plugin-ui/sequence.d.ts +19 -1
- package/lib/commonjs/mol-plugin-ui/sequence.js +8 -1
- package/lib/commonjs/mol-plugin-ui/state/apply-action.d.ts +2 -10
- package/lib/commonjs/mol-plugin-ui/state/apply-action.js +2 -2
- package/lib/commonjs/mol-plugin-ui/structure/quick-styles.js +2 -2
- package/lib/commonjs/mol-plugin-ui/structure/superposition.d.ts +1 -1
- package/lib/commonjs/mol-plugin-ui/structure/volume.d.ts +1 -1
- package/lib/commonjs/mol-plugin-ui/structure/volume.js +3 -2
- package/lib/commonjs/mol-repr/structure/complex-visual.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/params.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/registry.d.ts +12 -0
- package/lib/commonjs/mol-repr/structure/representation/backbone.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.d.ts +6 -0
- package/lib/commonjs/mol-repr/structure/representation/ellipsoid.d.ts +6 -0
- package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/gaussian-volume.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/line.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/molecular-surface.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/point.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/spacefill.d.ts +6 -0
- package/lib/commonjs/mol-repr/structure/units-visual.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +4 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.js +2 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-line.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-line.js +1 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +4 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.js +2 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-line.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-line.js +1 -0
- package/lib/commonjs/mol-repr/structure/visual/element-cross.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/element-cross.js +2 -1
- package/lib/commonjs/mol-repr/structure/visual/element-point.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/element-point.js +2 -1
- package/lib/commonjs/mol-repr/structure/visual/element-sphere.d.ts +4 -0
- package/lib/commonjs/mol-repr/structure/visual/element-sphere.js +3 -1
- package/lib/commonjs/mol-repr/structure/visual/gaussian-density-volume.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-density-volume.js +6 -2
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +4 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.js +9 -1
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.js +3 -1
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.js +4 -0
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.js +2 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/util/bond.d.ts +7 -0
- package/lib/commonjs/mol-repr/structure/visual/util/bond.js +18 -7
- package/lib/commonjs/mol-repr/structure/visual/util/common.d.ts +4 -1
- package/lib/commonjs/mol-repr/structure/visual/util/common.js +10 -6
- package/lib/commonjs/mol-repr/structure/visual/util/element.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/util/element.js +2 -3
- package/lib/commonjs/mol-repr/structure/visual/util/gaussian.d.ts +2 -0
- package/lib/commonjs/mol-repr/volume/direct-volume.d.ts +4 -4
- package/lib/commonjs/mol-repr/volume/direct-volume.js +8 -6
- package/lib/commonjs/mol-repr/volume/isosurface.d.ts +4 -4
- package/lib/commonjs/mol-repr/volume/isosurface.js +17 -16
- package/lib/commonjs/mol-repr/volume/registry.d.ts +54 -1
- package/lib/commonjs/mol-repr/volume/registry.js +3 -1
- package/lib/commonjs/mol-repr/volume/representation.d.ts +11 -7
- package/lib/commonjs/mol-repr/volume/representation.js +142 -47
- package/lib/commonjs/mol-repr/volume/segment.d.ts +291 -0
- package/lib/commonjs/mol-repr/volume/segment.js +289 -0
- package/lib/commonjs/mol-repr/volume/slice.d.ts +2 -2
- package/lib/commonjs/mol-repr/volume/slice.js +5 -5
- package/lib/commonjs/mol-repr/volume/util.d.ts +12 -3
- package/lib/commonjs/mol-repr/volume/util.js +72 -6
- package/lib/commonjs/mol-script/language/builder.d.ts +1 -0
- package/lib/commonjs/mol-theme/color/volume-segment.d.ts +41 -0
- package/lib/commonjs/mol-theme/color/volume-segment.js +58 -0
- package/lib/commonjs/mol-theme/color/volume-value.js +2 -1
- package/lib/commonjs/mol-theme/color.d.ts +15 -0
- package/lib/commonjs/mol-theme/color.js +2 -0
- package/lib/commonjs/mol-theme/label.d.ts +1 -1
- package/lib/commonjs/mol-theme/label.js +13 -1
- package/lib/commonjs/mol-util/param-definition.d.ts +4 -1
- package/lib/commonjs/mol-util/param-definition.js +5 -2
- package/lib/examples/alpha-orbitals/index.html +72 -72
- package/lib/examples/basic-wrapper/index.html +137 -137
- package/lib/examples/lighting/index.html +88 -88
- package/lib/examples/lighting/index.js +1 -1
- package/lib/examples/proteopedia-wrapper/index.html +236 -236
- package/lib/extensions/anvil/behavior.d.ts +1 -0
- package/lib/extensions/cellpack/model.js +2 -1
- package/lib/extensions/dnatco/confal-pyramids/behavior.d.ts +1 -0
- package/lib/extensions/meshes/choice.d.ts +26 -0
- package/lib/extensions/meshes/choice.js +28 -0
- package/lib/extensions/meshes/examples.d.ts +26 -0
- package/lib/extensions/meshes/examples.js +325 -0
- package/lib/extensions/meshes/mesh-cif-schema.d.ts +29 -0
- package/lib/extensions/meshes/mesh-cif-schema.js +30 -0
- package/lib/extensions/meshes/mesh-extension.d.ts +66 -0
- package/lib/extensions/meshes/mesh-extension.js +218 -0
- package/lib/extensions/meshes/mesh-streaming/behavior.d.ts +105 -0
- package/lib/extensions/meshes/mesh-streaming/behavior.js +375 -0
- package/lib/extensions/meshes/mesh-streaming/server-info.d.ts +54 -0
- package/lib/extensions/meshes/mesh-streaming/server-info.js +26 -0
- package/lib/extensions/meshes/mesh-streaming/transformers.d.ts +42 -0
- package/lib/extensions/meshes/mesh-streaming/transformers.js +270 -0
- package/lib/extensions/meshes/mesh-utils.d.ts +41 -0
- package/lib/extensions/meshes/mesh-utils.js +346 -0
- package/lib/extensions/meshes/metadata.d.ts +108 -0
- package/lib/extensions/meshes/metadata.js +69 -0
- package/lib/extensions/model-archive/quality-assessment/behavior.d.ts +2 -0
- package/lib/extensions/model-archive/quality-assessment/prop.d.ts +1 -0
- package/lib/extensions/model-archive/quality-assessment/prop.js +16 -4
- package/lib/extensions/rcsb/assembly-symmetry/behavior.d.ts +4 -2
- package/lib/extensions/rcsb/validation-report/behavior.d.ts +3 -0
- package/lib/extensions/volumes-and-segmentations/entry-meshes.d.ts +17 -0
- package/lib/extensions/volumes-and-segmentations/entry-meshes.js +153 -0
- package/lib/extensions/volumes-and-segmentations/entry-models.d.ts +12 -0
- package/lib/extensions/volumes-and-segmentations/entry-models.js +93 -0
- package/lib/extensions/volumes-and-segmentations/entry-root.d.ts +122 -0
- package/lib/extensions/volumes-and-segmentations/entry-root.js +571 -0
- package/lib/extensions/volumes-and-segmentations/entry-segmentation.d.ts +20 -0
- package/lib/extensions/volumes-and-segmentations/entry-segmentation.js +197 -0
- package/lib/extensions/volumes-and-segmentations/entry-state.d.ts +88 -0
- package/lib/extensions/volumes-and-segmentations/entry-state.js +29 -0
- package/lib/extensions/volumes-and-segmentations/entry-volume.d.ts +35 -0
- package/lib/extensions/volumes-and-segmentations/entry-volume.js +231 -0
- package/lib/extensions/volumes-and-segmentations/external-api.d.ts +11 -0
- package/lib/extensions/volumes-and-segmentations/external-api.js +80 -0
- package/lib/extensions/volumes-and-segmentations/global-state.d.ts +51 -0
- package/lib/extensions/volumes-and-segmentations/global-state.js +80 -0
- package/lib/extensions/volumes-and-segmentations/helpers.d.ts +56 -0
- package/lib/extensions/volumes-and-segmentations/helpers.js +163 -0
- package/lib/extensions/volumes-and-segmentations/index.d.ts +20 -0
- package/lib/extensions/volumes-and-segmentations/index.js +127 -0
- package/lib/extensions/volumes-and-segmentations/transformers.d.ts +33 -0
- package/lib/extensions/volumes-and-segmentations/transformers.js +82 -0
- package/lib/extensions/volumes-and-segmentations/ui.d.ts +29 -0
- package/lib/extensions/volumes-and-segmentations/ui.js +229 -0
- package/lib/extensions/volumes-and-segmentations/volseg-api/api.d.ts +22 -0
- package/lib/extensions/volumes-and-segmentations/volseg-api/api.js +80 -0
- package/lib/extensions/volumes-and-segmentations/volseg-api/data.d.ts +92 -0
- package/lib/extensions/volumes-and-segmentations/volseg-api/data.js +6 -0
- package/lib/extensions/volumes-and-segmentations/volseg-api/utils.d.ts +23 -0
- package/lib/extensions/volumes-and-segmentations/volseg-api/utils.js +75 -0
- package/lib/mol-canvas3d/canvas3d.d.ts +2 -0
- package/lib/mol-canvas3d/passes/draw.js +3 -3
- package/lib/mol-canvas3d/passes/image.d.ts +1 -0
- package/lib/mol-canvas3d/passes/postprocessing.d.ts +2 -1
- package/lib/mol-canvas3d/passes/postprocessing.js +27 -13
- package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +2 -1
- package/lib/mol-geo/geometry/cylinders/cylinders.js +3 -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-geo/geometry/spheres/spheres.d.ts +1 -0
- package/lib/mol-geo/geometry/spheres/spheres.js +3 -2
- package/lib/mol-gl/compute/histogram-pyramid/reduction.js +1 -2
- package/lib/mol-gl/compute/marching-cubes/isosurface.js +4 -6
- package/lib/mol-gl/renderable/cylinders.d.ts +1 -0
- package/lib/mol-gl/renderable/cylinders.js +1 -1
- package/lib/mol-gl/renderable/spheres.d.ts +1 -0
- package/lib/mol-gl/renderable/spheres.js +1 -1
- package/lib/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/apply-light-color.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/clip-instance.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/clip-instance.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/clip-pixel.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/clip-pixel.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/common-clip.glsl.d.ts +2 -2
- package/lib/mol-gl/shader/chunks/common-clip.glsl.js +2 -2
- package/lib/mol-gl/shader/cylinders.frag.d.ts +1 -1
- package/lib/mol-gl/shader/cylinders.frag.js +1 -1
- package/lib/mol-gl/shader/cylinders.vert.d.ts +2 -2
- package/lib/mol-gl/shader/cylinders.vert.js +2 -2
- package/lib/mol-gl/shader/direct-volume.frag.d.ts +1 -1
- package/lib/mol-gl/shader/direct-volume.frag.js +1 -1
- package/lib/mol-gl/shader/outlines.frag.d.ts +1 -1
- package/lib/mol-gl/shader/outlines.frag.js +1 -1
- package/lib/mol-gl/shader/postprocessing.frag.d.ts +1 -1
- package/lib/mol-gl/shader/postprocessing.frag.js +1 -1
- package/lib/mol-gl/shader/spheres.frag.d.ts +1 -1
- package/lib/mol-gl/shader/spheres.frag.js +1 -1
- package/lib/mol-gl/shader/spheres.vert.d.ts +2 -2
- package/lib/mol-gl/shader/spheres.vert.js +2 -2
- package/lib/mol-gl/webgl/renderbuffer.d.ts +1 -1
- package/lib/mol-gl/webgl/renderbuffer.js +15 -0
- package/lib/mol-gl/webgl/state.d.ts +12 -0
- package/lib/mol-gl/webgl/state.js +136 -0
- package/lib/mol-io/reader/cif/schema/segmentation.d.ts +38 -0
- package/lib/mol-io/reader/cif/schema/segmentation.js +19 -0
- package/lib/mol-io/reader/cif.d.ts +3 -1
- package/lib/mol-io/reader/cif.js +3 -1
- package/lib/mol-model/location.d.ts +2 -1
- package/lib/mol-model/loci.d.ts +11 -11
- package/lib/mol-model/loci.js +13 -1
- package/lib/mol-model/sequence/alignment/sequence.d.ts +4 -1
- package/lib/mol-model/sequence/alignment/sequence.js +3 -2
- package/lib/mol-model/structure/model/properties/atomic/hierarchy.d.ts +6 -0
- package/lib/mol-model/structure/model/properties/utils/atomic-index.js +8 -0
- package/lib/mol-model/structure/structure/unit/bonds/inter-compute.js +21 -5
- package/lib/mol-model/structure/structure/util/superposition.d.ts +1 -0
- package/lib/mol-model/structure/structure/util/superposition.js +1 -1
- package/lib/mol-model/volume/volume.d.ts +35 -2
- package/lib/mol-model/volume/volume.js +79 -4
- package/lib/mol-model-formats/volume/segmentation.d.ts +23 -0
- package/lib/mol-model-formats/volume/segmentation.js +135 -0
- package/lib/mol-plugin/behavior/dynamic/representation.d.ts +2 -2
- package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +1 -0
- package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +2 -1
- package/lib/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -3
- package/lib/mol-plugin/commands.d.ts +1 -0
- package/lib/mol-plugin/version.js +2 -2
- package/lib/mol-plugin-state/animation/built-in/model-index.js +4 -1
- 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 +13 -4
- package/lib/mol-plugin-state/builder/structure/representation-preset.js +6 -1
- package/lib/mol-plugin-state/builder/structure/representation.d.ts +1 -0
- package/lib/mol-plugin-state/formats/provider.d.ts +2 -2
- package/lib/mol-plugin-state/formats/provider.js +11 -3
- package/lib/mol-plugin-state/formats/registry.js +6 -5
- package/lib/mol-plugin-state/formats/volume.d.ts +27 -0
- package/lib/mol-plugin-state/formats/volume.js +64 -0
- package/lib/mol-plugin-state/manager/structure/component.d.ts +1 -1
- package/lib/mol-plugin-state/manager/structure/component.js +18 -13
- package/lib/mol-plugin-state/transforms/representation.d.ts +1 -2
- package/lib/mol-plugin-state/transforms/representation.js +5 -6
- package/lib/mol-plugin-state/transforms/volume.d.ts +11 -1
- package/lib/mol-plugin-state/transforms/volume.js +54 -1
- package/lib/mol-plugin-ui/controls/line-graph/line-graph-component.d.ts +1 -0
- package/lib/mol-plugin-ui/controls/line-graph/line-graph-component.js +33 -13
- package/lib/mol-plugin-ui/controls/parameters.d.ts +1 -0
- package/lib/mol-plugin-ui/controls/parameters.js +22 -5
- package/lib/mol-plugin-ui/sequence/sequence.d.ts +25 -17
- package/lib/mol-plugin-ui/sequence.d.ts +19 -1
- package/lib/mol-plugin-ui/sequence.js +7 -7
- 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 +137 -128
- 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/state/apply-action.d.ts +2 -10
- package/lib/mol-plugin-ui/state/apply-action.js +2 -2
- package/lib/mol-plugin-ui/structure/quick-styles.js +2 -2
- package/lib/mol-plugin-ui/structure/superposition.d.ts +1 -1
- package/lib/mol-plugin-ui/structure/volume.d.ts +1 -1
- package/lib/mol-plugin-ui/structure/volume.js +3 -2
- package/lib/mol-repr/structure/complex-visual.d.ts +1 -0
- package/lib/mol-repr/structure/params.d.ts +2 -0
- package/lib/mol-repr/structure/registry.d.ts +12 -0
- package/lib/mol-repr/structure/representation/backbone.d.ts +3 -0
- package/lib/mol-repr/structure/representation/ball-and-stick.d.ts +6 -0
- package/lib/mol-repr/structure/representation/ellipsoid.d.ts +6 -0
- package/lib/mol-repr/structure/representation/gaussian-surface.d.ts +3 -0
- package/lib/mol-repr/structure/representation/gaussian-volume.d.ts +3 -0
- package/lib/mol-repr/structure/representation/line.d.ts +3 -0
- package/lib/mol-repr/structure/representation/molecular-surface.d.ts +3 -0
- package/lib/mol-repr/structure/representation/point.d.ts +3 -0
- package/lib/mol-repr/structure/representation/spacefill.d.ts +6 -0
- package/lib/mol-repr/structure/units-visual.d.ts +2 -0
- package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +4 -0
- package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.js +2 -0
- package/lib/mol-repr/structure/visual/bond-inter-unit-line.d.ts +1 -0
- package/lib/mol-repr/structure/visual/bond-inter-unit-line.js +1 -0
- package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +4 -0
- package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.js +2 -0
- package/lib/mol-repr/structure/visual/bond-intra-unit-line.d.ts +1 -0
- package/lib/mol-repr/structure/visual/bond-intra-unit-line.js +1 -0
- package/lib/mol-repr/structure/visual/element-cross.d.ts +1 -0
- package/lib/mol-repr/structure/visual/element-cross.js +2 -1
- package/lib/mol-repr/structure/visual/element-point.d.ts +1 -0
- package/lib/mol-repr/structure/visual/element-point.js +2 -1
- package/lib/mol-repr/structure/visual/element-sphere.d.ts +4 -0
- package/lib/mol-repr/structure/visual/element-sphere.js +3 -1
- package/lib/mol-repr/structure/visual/gaussian-density-volume.d.ts +2 -0
- package/lib/mol-repr/structure/visual/gaussian-density-volume.js +6 -2
- package/lib/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +4 -0
- package/lib/mol-repr/structure/visual/gaussian-surface-mesh.js +9 -1
- package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +1 -0
- package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.js +3 -1
- package/lib/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -0
- package/lib/mol-repr/structure/visual/molecular-surface-mesh.js +4 -0
- package/lib/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +1 -0
- package/lib/mol-repr/structure/visual/molecular-surface-wireframe.js +2 -0
- package/lib/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +2 -0
- package/lib/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +2 -0
- package/lib/mol-repr/structure/visual/util/bond.d.ts +7 -0
- package/lib/mol-repr/structure/visual/util/bond.js +19 -8
- package/lib/mol-repr/structure/visual/util/common.d.ts +4 -1
- package/lib/mol-repr/structure/visual/util/common.js +10 -6
- package/lib/mol-repr/structure/visual/util/element.d.ts +1 -0
- package/lib/mol-repr/structure/visual/util/element.js +3 -4
- package/lib/mol-repr/structure/visual/util/gaussian.d.ts +2 -0
- package/lib/mol-repr/volume/direct-volume.d.ts +4 -4
- package/lib/mol-repr/volume/direct-volume.js +8 -6
- package/lib/mol-repr/volume/isosurface.d.ts +4 -4
- package/lib/mol-repr/volume/isosurface.js +17 -16
- package/lib/mol-repr/volume/registry.d.ts +54 -1
- package/lib/mol-repr/volume/registry.js +3 -1
- package/lib/mol-repr/volume/representation.d.ts +11 -7
- package/lib/mol-repr/volume/representation.js +144 -49
- package/lib/mol-repr/volume/segment.d.ts +291 -0
- package/lib/mol-repr/volume/segment.js +279 -0
- package/lib/mol-repr/volume/slice.d.ts +2 -2
- package/lib/mol-repr/volume/slice.js +5 -5
- package/lib/mol-repr/volume/util.d.ts +12 -3
- package/lib/mol-repr/volume/util.js +71 -6
- package/lib/mol-script/language/builder.d.ts +1 -0
- package/lib/mol-theme/color/volume-segment.d.ts +41 -0
- package/lib/mol-theme/color/volume-segment.js +53 -0
- package/lib/mol-theme/color/volume-value.js +2 -1
- package/lib/mol-theme/color.d.ts +15 -0
- package/lib/mol-theme/color.js +2 -0
- package/lib/mol-theme/label.d.ts +1 -1
- package/lib/mol-theme/label.js +13 -1
- package/lib/mol-util/param-definition.d.ts +4 -1
- package/lib/mol-util/param-definition.js +5 -2
- package/package.json +169 -168
|
@@ -75,7 +75,8 @@ var StructureComponentManager = /** @class */ (function (_super) {
|
|
|
75
75
|
case 1:
|
|
76
76
|
_a.sent();
|
|
77
77
|
return [4 /*yield*/, this.plugin.state.updateBehavior(StructureFocusRepresentation, function (p) {
|
|
78
|
-
p.ignoreHydrogens =
|
|
78
|
+
p.ignoreHydrogens = options.hydrogens !== 'all';
|
|
79
|
+
p.ignoreHydrogensVariant = options.hydrogens === 'only-polar' ? 'non-polar' : 'all';
|
|
79
80
|
p.ignoreLight = options.ignoreLight;
|
|
80
81
|
p.material = options.materialStyle;
|
|
81
82
|
p.clip = options.clipObjects;
|
|
@@ -95,16 +96,18 @@ var StructureComponentManager = /** @class */ (function (_super) {
|
|
|
95
96
|
});
|
|
96
97
|
};
|
|
97
98
|
StructureComponentManager.prototype.updateReprParams = function (update, component) {
|
|
98
|
-
var _a = this.state.options,
|
|
99
|
-
var ignoreHydrogens =
|
|
99
|
+
var _a = this.state.options, hydrogens = _a.hydrogens, quality = _a.visualQuality, ignoreLight = _a.ignoreLight, material = _a.materialStyle, clip = _a.clipObjects;
|
|
100
|
+
var ignoreHydrogens = hydrogens !== 'all';
|
|
101
|
+
var ignoreHydrogensVariant = hydrogens === 'only-polar' ? 'non-polar' : 'all';
|
|
100
102
|
for (var _i = 0, _b = component.representations; _i < _b.length; _i++) {
|
|
101
103
|
var r = _b[_i];
|
|
102
104
|
if (r.cell.transform.transformer !== StructureRepresentation3D)
|
|
103
105
|
continue;
|
|
104
106
|
var params = r.cell.transform.params;
|
|
105
|
-
if (!!params.type.params.ignoreHydrogens !== ignoreHydrogens || params.type.params.quality !== quality || params.type.params.ignoreLight !== ignoreLight || !shallowEqual(params.type.params.material, material) || !PD.areEqual(Clip.Params, params.type.params.clip, clip)) {
|
|
107
|
+
if (!!params.type.params.ignoreHydrogens !== ignoreHydrogens || params.type.params.ignoreHydrogensVariant !== ignoreHydrogensVariant || params.type.params.quality !== quality || params.type.params.ignoreLight !== ignoreLight || !shallowEqual(params.type.params.material, material) || !PD.areEqual(Clip.Params, params.type.params.clip, clip)) {
|
|
106
108
|
update.to(r.cell).update(function (old) {
|
|
107
109
|
old.type.params.ignoreHydrogens = ignoreHydrogens;
|
|
110
|
+
old.type.params.ignoreHydrogensVariant = ignoreHydrogensVariant;
|
|
108
111
|
old.type.params.quality = quality;
|
|
109
112
|
old.type.params.ignoreLight = ignoreLight;
|
|
110
113
|
old.type.params.material = material;
|
|
@@ -380,9 +383,10 @@ var StructureComponentManager = /** @class */ (function (_super) {
|
|
|
380
383
|
var _this = this;
|
|
381
384
|
if (components.length === 0)
|
|
382
385
|
return;
|
|
383
|
-
var _a = this.state.options,
|
|
384
|
-
var ignoreHydrogens =
|
|
385
|
-
var
|
|
386
|
+
var _a = this.state.options, hydrogens = _a.hydrogens, quality = _a.visualQuality, ignoreLight = _a.ignoreLight, material = _a.materialStyle, clip = _a.clipObjects;
|
|
387
|
+
var ignoreHydrogens = hydrogens !== 'all';
|
|
388
|
+
var ignoreHydrogensVariant = hydrogens === 'only-polar' ? 'non-polar' : 'all';
|
|
389
|
+
var typeParams = { ignoreHydrogens: ignoreHydrogens, ignoreHydrogensVariant: ignoreHydrogensVariant, quality: quality, ignoreLight: ignoreLight, material: material, clip: clip };
|
|
386
390
|
return this.plugin.dataTransaction(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
387
391
|
var _i, components_9, component;
|
|
388
392
|
return __generator(this, function (_a) {
|
|
@@ -443,16 +447,17 @@ var StructureComponentManager = /** @class */ (function (_super) {
|
|
|
443
447
|
var _this = this;
|
|
444
448
|
return __generator(this, function (_a) {
|
|
445
449
|
return [2 /*return*/, this.plugin.dataTransaction(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
446
|
-
var xs, _a,
|
|
450
|
+
var xs, _a, hydrogens, quality, ignoreLight, material, clip, ignoreHydrogens, ignoreHydrogensVariant, typeParams, componentKey, _i, xs_1, s, component;
|
|
447
451
|
return __generator(this, function (_b) {
|
|
448
452
|
switch (_b.label) {
|
|
449
453
|
case 0:
|
|
450
454
|
xs = structures || this.currentStructures;
|
|
451
455
|
if (xs.length === 0)
|
|
452
456
|
return [2 /*return*/];
|
|
453
|
-
_a = this.state.options,
|
|
454
|
-
ignoreHydrogens =
|
|
455
|
-
|
|
457
|
+
_a = this.state.options, hydrogens = _a.hydrogens, quality = _a.visualQuality, ignoreLight = _a.ignoreLight, material = _a.materialStyle, clip = _a.clipObjects;
|
|
458
|
+
ignoreHydrogens = hydrogens !== 'all';
|
|
459
|
+
ignoreHydrogensVariant = hydrogens === 'only-polar' ? 'non-polar' : 'all';
|
|
460
|
+
typeParams = { ignoreHydrogens: ignoreHydrogens, ignoreHydrogensVariant: ignoreHydrogensVariant, quality: quality, ignoreLight: ignoreLight, material: material, clip: clip };
|
|
456
461
|
componentKey = UUID.create22();
|
|
457
462
|
_i = 0, xs_1 = xs;
|
|
458
463
|
_b.label = 1;
|
|
@@ -625,9 +630,9 @@ var StructureComponentManager = /** @class */ (function (_super) {
|
|
|
625
630
|
}(StatefulPluginComponent));
|
|
626
631
|
(function (StructureComponentManager) {
|
|
627
632
|
StructureComponentManager.OptionsParams = {
|
|
628
|
-
|
|
633
|
+
hydrogens: PD.Select('all', [['all', 'Show All'], ['hide-all', 'Hide All'], ['only-polar', 'Only Polar']], { description: 'Determine display of hydrogen atoms in representations' }),
|
|
629
634
|
visualQuality: PD.Select('auto', VisualQualityOptions, { description: 'Control the visual/rendering quality of representations' }),
|
|
630
|
-
ignoreLight: PD.Boolean(false, { description: 'Ignore light for stylized rendering of
|
|
635
|
+
ignoreLight: PD.Boolean(false, { description: 'Ignore light for stylized rendering of representations' }),
|
|
631
636
|
materialStyle: Material.getParam(),
|
|
632
637
|
clipObjects: PD.Group(Clip.Params),
|
|
633
638
|
interactions: PD.Group(InteractionsProvider.defaultParams, { label: 'Non-covalent Interactions' }),
|
|
@@ -8,7 +8,6 @@ import { StructureElement } from '../../mol-model/structure';
|
|
|
8
8
|
import { Volume } from '../../mol-model/volume';
|
|
9
9
|
import { PluginContext } from '../../mol-plugin/context';
|
|
10
10
|
import { VolumeRepresentationRegistry } from '../../mol-repr/volume/registry';
|
|
11
|
-
import { VolumeParams } from '../../mol-repr/volume/representation';
|
|
12
11
|
import { StateTransformer } from '../../mol-state';
|
|
13
12
|
import { ColorTheme } from '../../mol-theme/color';
|
|
14
13
|
import { SizeTheme } from '../../mol-theme/size';
|
|
@@ -132,7 +131,7 @@ declare const ThemeStrengthRepresentation3D: StateTransformer<SO.Molecule.Struct
|
|
|
132
131
|
substanceStrength: number;
|
|
133
132
|
}>>;
|
|
134
133
|
export declare namespace VolumeRepresentation3DHelpers {
|
|
135
|
-
function getDefaultParams(ctx: PluginContext, name: VolumeRepresentationRegistry.BuiltIn, volume: Volume, volumeParams?: Partial<PD.Values<
|
|
134
|
+
function getDefaultParams(ctx: PluginContext, name: VolumeRepresentationRegistry.BuiltIn, volume: Volume, volumeParams?: Partial<PD.Values<PD.Params>>, colorName?: ColorTheme.BuiltIn, colorParams?: Partial<ColorTheme.Props>, sizeName?: SizeTheme.BuiltIn, sizeParams?: Partial<SizeTheme.Props>): StateTransformer.Params<VolumeRepresentation3D>;
|
|
136
135
|
function getDefaultParamsStatic(ctx: PluginContext, name: VolumeRepresentationRegistry.BuiltIn, volumeParams?: Partial<PD.Values<PD.Params>>, colorName?: ColorTheme.BuiltIn, colorParams?: Partial<ColorTheme.Props>, sizeName?: SizeTheme.BuiltIn, sizeParams?: Partial<SizeTheme.Props>): StateTransformer.Params<VolumeRepresentation3D>;
|
|
137
136
|
function getDescription(props: any): string | undefined;
|
|
138
137
|
}
|
|
@@ -803,16 +803,15 @@ var ThemeStrengthRepresentation3D = PluginStateTransform.BuiltIn({
|
|
|
803
803
|
//
|
|
804
804
|
export var VolumeRepresentation3DHelpers;
|
|
805
805
|
(function (VolumeRepresentation3DHelpers) {
|
|
806
|
-
function getDefaultParams(ctx, name, volume, volumeParams) {
|
|
806
|
+
function getDefaultParams(ctx, name, volume, volumeParams, colorName, colorParams, sizeName, sizeParams) {
|
|
807
807
|
var type = ctx.representation.volume.registry.get(name);
|
|
808
|
-
var
|
|
809
|
-
var
|
|
810
|
-
var sizeParams = ctx.representation.volume.themes.sizeThemeRegistry.get(type.defaultSizeTheme.name).getParams(themeDataCtx);
|
|
808
|
+
var colorType = ctx.representation.volume.themes.colorThemeRegistry.get(colorName || type.defaultColorTheme.name);
|
|
809
|
+
var sizeType = ctx.representation.volume.themes.sizeThemeRegistry.get(sizeName || type.defaultSizeTheme.name);
|
|
811
810
|
var volumeDefaultParams = PD.getDefaultValues(type.getParams(ctx.representation.volume.themes, volume));
|
|
812
811
|
return ({
|
|
813
812
|
type: { name: name, params: volumeParams ? __assign(__assign({}, volumeDefaultParams), volumeParams) : volumeDefaultParams },
|
|
814
|
-
colorTheme: { name:
|
|
815
|
-
sizeTheme: { name:
|
|
813
|
+
colorTheme: { name: colorType.name, params: colorParams ? __assign(__assign({}, colorType.defaultValues), colorParams) : colorType.defaultValues },
|
|
814
|
+
sizeTheme: { name: sizeType.name, params: sizeParams ? __assign(__assign({}, sizeType.defaultValues), sizeParams) : sizeType.defaultValues }
|
|
816
815
|
});
|
|
817
816
|
}
|
|
818
817
|
VolumeRepresentation3DHelpers.getDefaultParams = getDefaultParams;
|
|
@@ -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>
|
|
@@ -13,6 +13,7 @@ export { VolumeFromCube };
|
|
|
13
13
|
export { VolumeFromDx };
|
|
14
14
|
export { AssignColorVolume };
|
|
15
15
|
export { VolumeFromDensityServerCif };
|
|
16
|
+
export { VolumeFromSegmentationCif };
|
|
16
17
|
type VolumeFromCcp4 = typeof VolumeFromCcp4;
|
|
17
18
|
declare const VolumeFromCcp4: import("../../mol-state/transformer").StateTransformer<SO.Format.Ccp4, SO.Volume.Data, PD.Normalize<{
|
|
18
19
|
voxelSize: Vec3;
|
|
@@ -36,6 +37,15 @@ declare const VolumeFromDensityServerCif: import("../../mol-state/transformer").
|
|
|
36
37
|
blockHeader: string | undefined;
|
|
37
38
|
entryId: string;
|
|
38
39
|
}>>;
|
|
40
|
+
type VolumeFromSegmentationCif = typeof VolumeFromSegmentationCif;
|
|
41
|
+
declare const VolumeFromSegmentationCif: import("../../mol-state/transformer").StateTransformer<SO.Format.Cif, SO.Volume.Data, PD.Normalize<{
|
|
42
|
+
blockHeader: string | undefined;
|
|
43
|
+
segmentLabels: PD.Normalize<{
|
|
44
|
+
id: any;
|
|
45
|
+
label: any;
|
|
46
|
+
}>[];
|
|
47
|
+
ownerId: string;
|
|
48
|
+
}>>;
|
|
39
49
|
type AssignColorVolume = typeof AssignColorVolume;
|
|
40
50
|
declare const AssignColorVolume: import("../../mol-state/transformer").StateTransformer<SO.Volume.Data, SO.Volume.Data, PD.Normalize<{
|
|
41
51
|
ref: string;
|
|
@@ -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>
|
|
@@ -16,12 +16,14 @@ import { PluginStateObject as SO, PluginStateTransform } from '../objects';
|
|
|
16
16
|
import { volumeFromCube } from '../../mol-model-formats/volume/cube';
|
|
17
17
|
import { volumeFromDx } from '../../mol-model-formats/volume/dx';
|
|
18
18
|
import { StateSelection } from '../../mol-state';
|
|
19
|
+
import { volumeFromSegmentationData } from '../../mol-model-formats/volume/segmentation';
|
|
19
20
|
export { VolumeFromCcp4 };
|
|
20
21
|
export { VolumeFromDsn6 };
|
|
21
22
|
export { VolumeFromCube };
|
|
22
23
|
export { VolumeFromDx };
|
|
23
24
|
export { AssignColorVolume };
|
|
24
25
|
export { VolumeFromDensityServerCif };
|
|
26
|
+
export { VolumeFromSegmentationCif };
|
|
25
27
|
var VolumeFromCcp4 = PluginStateTransform.BuiltIn({
|
|
26
28
|
name: 'volume-from-ccp4',
|
|
27
29
|
display: { name: 'Volume from CCP4/MRC/MAP', description: 'Create Volume from CCP4/MRC/MAP data' },
|
|
@@ -199,6 +201,57 @@ var VolumeFromDensityServerCif = PluginStateTransform.BuiltIn({
|
|
|
199
201
|
b === null || b === void 0 ? void 0 : b.data.customProperties.dispose();
|
|
200
202
|
}
|
|
201
203
|
});
|
|
204
|
+
var VolumeFromSegmentationCif = PluginStateTransform.BuiltIn({
|
|
205
|
+
name: 'volume-from-segmentation-cif',
|
|
206
|
+
display: { name: 'Volume from Segmentation CIF' },
|
|
207
|
+
from: SO.Format.Cif,
|
|
208
|
+
to: SO.Volume.Data,
|
|
209
|
+
params: function (a) {
|
|
210
|
+
var blocks = a === null || a === void 0 ? void 0 : a.data.blocks.slice(1);
|
|
211
|
+
var blockHeaderParam = blocks ?
|
|
212
|
+
PD.Optional(PD.Select(blocks[0] && blocks[0].header, blocks.map(function (b) { return [b.header, b.header]; }), { description: 'Header of the block to parse' }))
|
|
213
|
+
: PD.Optional(PD.Text(void 0, { description: 'Header of the block to parse. If none is specifed, the 1st data block in the file is used.' }));
|
|
214
|
+
return {
|
|
215
|
+
blockHeader: blockHeaderParam,
|
|
216
|
+
segmentLabels: PD.ObjectList({ id: PD.Numeric(-1), label: PD.Text('') }, function (s) { return "".concat(s.id, " = ").concat(s.label); }, { description: 'Mapping of segment IDs to segment labels' }),
|
|
217
|
+
ownerId: PD.Text('', { isHidden: true, description: 'Reference to the object which manages this volume' }),
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
})({
|
|
221
|
+
isApplicable: function (a) { return a.data.blocks.length > 0; },
|
|
222
|
+
apply: function (_a) {
|
|
223
|
+
var _this = this;
|
|
224
|
+
var a = _a.a, params = _a.params;
|
|
225
|
+
return Task.create('Parse segmentation CIF', function (ctx) { return __awaiter(_this, void 0, void 0, function () {
|
|
226
|
+
var header, block, segmentationCif, segmentLabels, _i, _a, segment, volume, _b, x, y, z, props;
|
|
227
|
+
return __generator(this, function (_c) {
|
|
228
|
+
switch (_c.label) {
|
|
229
|
+
case 0:
|
|
230
|
+
header = params.blockHeader || a.data.blocks[1].header;
|
|
231
|
+
block = a.data.blocks.find(function (b) { return b.header === header; });
|
|
232
|
+
if (!block)
|
|
233
|
+
throw new Error("Data block '".concat([header], "' not found."));
|
|
234
|
+
segmentationCif = CIF.schema.segmentation(block);
|
|
235
|
+
segmentLabels = {};
|
|
236
|
+
for (_i = 0, _a = params.segmentLabels; _i < _a.length; _i++) {
|
|
237
|
+
segment = _a[_i];
|
|
238
|
+
segmentLabels[segment.id] = segment.label;
|
|
239
|
+
}
|
|
240
|
+
return [4 /*yield*/, volumeFromSegmentationData(segmentationCif, { segmentLabels: segmentLabels, ownerId: params.ownerId }).runInContext(ctx)];
|
|
241
|
+
case 1:
|
|
242
|
+
volume = _c.sent();
|
|
243
|
+
_b = volume.grid.cells.space.dimensions, x = _b[0], y = _b[1], z = _b[2];
|
|
244
|
+
props = { label: segmentationCif.volume_data_3d_info.name.value(0), description: "Segmentation ".concat(x, "\u00D7").concat(y, "\u00D7").concat(z) };
|
|
245
|
+
return [2 /*return*/, new SO.Volume.Data(volume, props)];
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
}); });
|
|
249
|
+
},
|
|
250
|
+
dispose: function (_a) {
|
|
251
|
+
var b = _a.b;
|
|
252
|
+
b === null || b === void 0 ? void 0 : b.data.customProperties.dispose();
|
|
253
|
+
}
|
|
254
|
+
});
|
|
202
255
|
var AssignColorVolume = PluginStateTransform.BuiltIn({
|
|
203
256
|
name: 'assign-color-volume',
|
|
204
257
|
display: { name: 'Assign Color Volume', description: 'Assigns another volume to be available for coloring.' },
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { __assign, __extends } from "tslib";
|
|
2
2
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
/**
|
|
4
|
-
* Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
|
+
* Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
5
5
|
*
|
|
6
6
|
* @author Paul Luna <paulluna0215@gmail.com>
|
|
7
|
+
* @author David Sehnal <david.sehnal@gmail.com>
|
|
7
8
|
*/
|
|
8
9
|
import { PointComponent } from './point-component';
|
|
9
10
|
import * as React from 'react';
|
|
10
11
|
import { Vec2 } from '../../../mol-math/linear-algebra';
|
|
12
|
+
import { Grid } from '../../../mol-model/volume';
|
|
13
|
+
import { arrayMax } from '../../../mol-util/array';
|
|
11
14
|
var LineGraphComponent = /** @class */ (function (_super) {
|
|
12
15
|
__extends(LineGraphComponent, _super);
|
|
13
16
|
function LineGraphComponent(props) {
|
|
@@ -106,8 +109,9 @@ var LineGraphComponent = /** @class */ (function (_super) {
|
|
|
106
109
|
LineGraphComponent.prototype.render = function () {
|
|
107
110
|
var points = this.renderPoints();
|
|
108
111
|
var lines = this.renderLines();
|
|
112
|
+
var histogram = this.renderHistogram();
|
|
109
113
|
return ([
|
|
110
|
-
_jsx("div", { children: _jsxs("svg", __assign({ className: "msp-canvas", ref: this.refCallBack, viewBox: "0 0 ".concat(this.width + this.padding, " ").concat(this.height + this.padding), onMouseMove: this.handleDrag, onMouseUp: this.handlePointUpdate, onMouseLeave: this.handleLeave, onMouseEnter: this.handleEnter, tabIndex: 0, onKeyDown: this.handleKeyDown, onKeyUp: this.handleKeyUp, onDoubleClick: this.handleDoubleClick }, { children: [_jsxs("g", __assign({ stroke: "black", fill: "black" }, { children: [lines, points] })), _jsx("g", { className: "ghost-points", stroke: "black", fill: "black" })] })) }, "LineGraph"),
|
|
114
|
+
_jsx("div", { children: _jsxs("svg", __assign({ className: "msp-canvas", ref: this.refCallBack, viewBox: "0 0 ".concat(this.width + this.padding, " ").concat(this.height + this.padding), onMouseMove: this.handleDrag, onMouseUp: this.handlePointUpdate, onMouseLeave: this.handleLeave, onMouseEnter: this.handleEnter, tabIndex: 0, onKeyDown: this.handleKeyDown, onKeyUp: this.handleKeyUp, onDoubleClick: this.handleDoubleClick }, { children: [_jsxs("g", __assign({ stroke: "black", fill: "black" }, { children: [histogram, lines, points] })), _jsx("g", { className: "ghost-points", stroke: "black", fill: "black" })] })) }, "LineGraph"),
|
|
111
115
|
_jsx("div", { id: "modal-root" }, "modal")
|
|
112
116
|
]);
|
|
113
117
|
};
|
|
@@ -238,11 +242,11 @@ var LineGraphComponent = /** @class */ (function (_super) {
|
|
|
238
242
|
document.removeEventListener('mouseup', this.handlePointUpdate, true);
|
|
239
243
|
};
|
|
240
244
|
LineGraphComponent.prototype.normalizePoint = function (point) {
|
|
241
|
-
var
|
|
242
|
-
var maxX = this.width +
|
|
243
|
-
var maxY = this.height +
|
|
244
|
-
var normalizedX = (point[0] * (maxX -
|
|
245
|
-
var normalizedY = (point[1] * (maxY -
|
|
245
|
+
var offset = this.padding / 2;
|
|
246
|
+
var maxX = this.width + offset;
|
|
247
|
+
var maxY = this.height + offset;
|
|
248
|
+
var normalizedX = (point[0] * (maxX - offset)) + offset;
|
|
249
|
+
var normalizedY = (point[1] * (maxY - offset)) + offset;
|
|
246
250
|
var reverseY = (this.height + this.padding) - normalizedY;
|
|
247
251
|
var newPoint = Vec2.create(normalizedX, reverseY);
|
|
248
252
|
return newPoint;
|
|
@@ -261,6 +265,23 @@ var LineGraphComponent = /** @class */ (function (_super) {
|
|
|
261
265
|
this.myRef = element;
|
|
262
266
|
}
|
|
263
267
|
};
|
|
268
|
+
LineGraphComponent.prototype.renderHistogram = function () {
|
|
269
|
+
if (!this.props.volume)
|
|
270
|
+
return null;
|
|
271
|
+
var histogram = Grid.getHistogram(this.props.volume.grid, 40);
|
|
272
|
+
var bars = [];
|
|
273
|
+
var N = histogram.counts.length;
|
|
274
|
+
var w = this.width / N;
|
|
275
|
+
var offset = this.padding / 2;
|
|
276
|
+
var max = arrayMax(histogram.counts) || 1;
|
|
277
|
+
for (var i = 0; i < N; i++) {
|
|
278
|
+
var x = this.width * i / (N - 1) + offset;
|
|
279
|
+
var y1 = this.height + offset;
|
|
280
|
+
var y2 = this.height * (1 - histogram.counts[i] / max) + offset;
|
|
281
|
+
bars.push(_jsx("line", { x1: x, x2: x, y1: y1, y2: y2, stroke: "#ded9ca", strokeWidth: w }, "histogram".concat(i)));
|
|
282
|
+
}
|
|
283
|
+
return bars;
|
|
284
|
+
};
|
|
264
285
|
LineGraphComponent.prototype.renderPoints = function () {
|
|
265
286
|
var points = [];
|
|
266
287
|
var point;
|
|
@@ -275,19 +296,18 @@ var LineGraphComponent = /** @class */ (function (_super) {
|
|
|
275
296
|
LineGraphComponent.prototype.renderLines = function () {
|
|
276
297
|
var points = [];
|
|
277
298
|
var lines = [];
|
|
278
|
-
var min;
|
|
279
299
|
var maxX;
|
|
280
300
|
var maxY;
|
|
281
301
|
var normalizedX;
|
|
282
302
|
var normalizedY;
|
|
283
303
|
var reverseY;
|
|
304
|
+
var o = this.padding / 2;
|
|
284
305
|
for (var _i = 0, _a = this.state.points; _i < _a.length; _i++) {
|
|
285
306
|
var point = _a[_i];
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
normalizedY = (point[1] * (maxY - min)) + min;
|
|
307
|
+
maxX = this.width + o;
|
|
308
|
+
maxY = this.height + this.padding;
|
|
309
|
+
normalizedX = (point[0] * (maxX - o)) + o;
|
|
310
|
+
normalizedY = (point[1] * (maxY - o)) + o;
|
|
291
311
|
reverseY = this.height + this.padding - normalizedY;
|
|
292
312
|
points.push(Vec2.create(normalizedX, reverseY));
|
|
293
313
|
}
|
|
@@ -94,6 +94,7 @@ export declare class LineGraphControl extends React.PureComponent<ParamProps<PD.
|
|
|
94
94
|
isOverPoint: boolean;
|
|
95
95
|
message: string;
|
|
96
96
|
};
|
|
97
|
+
private pointToLabel;
|
|
97
98
|
onHover: (point?: Vec2) => void;
|
|
98
99
|
onDrag: (point: Vec2) => void;
|
|
99
100
|
onChange: (value: PD.LineGraph['defaultValue']) => void;
|
|
@@ -277,13 +277,14 @@ var LineGraphControl = /** @class */ (function (_super) {
|
|
|
277
277
|
_this.onHover = function (point) {
|
|
278
278
|
_this.setState({ isOverPoint: !_this.state.isOverPoint });
|
|
279
279
|
if (point) {
|
|
280
|
-
_this.setState({ message:
|
|
281
|
-
|
|
280
|
+
_this.setState({ message: _this.pointToLabel(point) });
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
_this.setState({ message: "".concat(_this.props.value.length, " points") });
|
|
282
284
|
}
|
|
283
|
-
_this.setState({ message: "".concat(_this.props.value.length, " points") });
|
|
284
285
|
};
|
|
285
286
|
_this.onDrag = function (point) {
|
|
286
|
-
_this.setState({ message:
|
|
287
|
+
_this.setState({ message: _this.pointToLabel(point) });
|
|
287
288
|
};
|
|
288
289
|
_this.onChange = function (value) {
|
|
289
290
|
_this.props.onChange({ name: _this.props.name, param: _this.props.param, value: value });
|
|
@@ -294,9 +295,25 @@ var LineGraphControl = /** @class */ (function (_super) {
|
|
|
294
295
|
};
|
|
295
296
|
return _this;
|
|
296
297
|
}
|
|
298
|
+
LineGraphControl.prototype.pointToLabel = function (point) {
|
|
299
|
+
var _a, _b;
|
|
300
|
+
if (!point)
|
|
301
|
+
return '';
|
|
302
|
+
var volume = (_b = (_a = this.props.param).getVolume) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
303
|
+
if (volume) {
|
|
304
|
+
var _c = volume.grid.stats, min = _c.min, max = _c.max, mean = _c.mean, sigma = _c.sigma;
|
|
305
|
+
var v = min + (max - min) * point[0];
|
|
306
|
+
var s = (v - mean) / sigma;
|
|
307
|
+
return "(".concat(v.toFixed(2), " | ").concat(s.toFixed(2), "\u03C3, ").concat(point[1].toFixed(2), ")");
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
return "(".concat(point[0].toFixed(2), ", ").concat(point[1].toFixed(2), ")");
|
|
311
|
+
}
|
|
312
|
+
};
|
|
297
313
|
LineGraphControl.prototype.render = function () {
|
|
314
|
+
var _a, _b;
|
|
298
315
|
var label = this.props.param.label || camelCaseToWords(this.props.name);
|
|
299
|
-
return _jsxs(_Fragment, { children: [_jsx(ControlRow, { label: label, control: _jsx("button", __assign({ onClick: this.toggleExpanded, disabled: this.props.isDisabled }, { children: "".concat(this.state.message) })) }), _jsx("div", __assign({ className: 'msp-control-offset', style: { display: this.state.isExpanded ? 'block' : 'none' } }, { children: _jsx(LineGraphComponent, { data: this.props.param.
|
|
316
|
+
return _jsxs(_Fragment, { children: [_jsx(ControlRow, { label: label, control: _jsx("button", __assign({ onClick: this.toggleExpanded, disabled: this.props.isDisabled }, { children: "".concat(this.state.message) })) }), _jsx("div", __assign({ className: 'msp-control-offset', style: { display: this.state.isExpanded ? 'block' : 'none', marginTop: 1 } }, { children: _jsx(LineGraphComponent, { data: this.props.value, volume: (_b = (_a = this.props.param).getVolume) === null || _b === void 0 ? void 0 : _b.call(_a), onChange: this.onChange, onHover: this.onHover, onDrag: this.onDrag }) }))] });
|
|
300
317
|
};
|
|
301
318
|
return LineGraphControl;
|
|
302
319
|
}(React.PureComponent));
|
|
@@ -5,8 +5,11 @@
|
|
|
5
5
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
6
6
|
*/
|
|
7
7
|
import * as React from 'react';
|
|
8
|
-
import {
|
|
8
|
+
import { Subject } from 'rxjs';
|
|
9
|
+
import { StructureElement, Unit } from '../../mol-model/structure';
|
|
10
|
+
import { Representation } from '../../mol-repr/representation';
|
|
9
11
|
import { ButtonsType, ModifiersKeys } from '../../mol-util/input/input-observer';
|
|
12
|
+
import { MarkerAction } from '../../mol-util/marker-action';
|
|
10
13
|
import { PluginUIComponent } from '../base';
|
|
11
14
|
import { SequenceWrapper } from './wrapper';
|
|
12
15
|
type SequenceProps = {
|
|
@@ -15,12 +18,17 @@ type SequenceProps = {
|
|
|
15
18
|
hideSequenceNumbers?: boolean;
|
|
16
19
|
};
|
|
17
20
|
export declare class Sequence<P extends SequenceProps> extends PluginUIComponent<P> {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
protected parentDiv: React.RefObject<HTMLDivElement>;
|
|
22
|
+
protected lastMouseOverSeqIdx: number;
|
|
23
|
+
protected highlightQueue: Subject<{
|
|
24
|
+
seqIdx: number;
|
|
25
|
+
buttons: number;
|
|
26
|
+
button: number;
|
|
27
|
+
modifiers: ModifiersKeys;
|
|
28
|
+
}>;
|
|
29
|
+
protected lociHighlightProvider: (loci: Representation.Loci, action: MarkerAction) => void;
|
|
30
|
+
protected lociSelectionProvider: (loci: Representation.Loci, action: MarkerAction) => void;
|
|
31
|
+
protected get sequenceNumberPeriod(): number;
|
|
24
32
|
componentDidMount(): void;
|
|
25
33
|
componentWillUnmount(): void;
|
|
26
34
|
getLoci(seqIdx: number | undefined): StructureElement.Loci | undefined;
|
|
@@ -28,18 +36,18 @@ export declare class Sequence<P extends SequenceProps> extends PluginUIComponent
|
|
|
28
36
|
hover(loci: StructureElement.Loci | undefined, buttons: ButtonsType, button: ButtonsType.Flag, modifiers: ModifiersKeys): void;
|
|
29
37
|
click(loci: StructureElement.Loci | undefined, buttons: ButtonsType, button: ButtonsType.Flag, modifiers: ModifiersKeys): void;
|
|
30
38
|
contextMenu: (e: React.MouseEvent) => void;
|
|
31
|
-
|
|
39
|
+
protected mouseDownLoci: StructureElement.Loci | undefined;
|
|
32
40
|
mouseDown: (e: React.MouseEvent) => void;
|
|
33
41
|
mouseUp: (e: React.MouseEvent) => void;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
protected getBackgroundColor(marker: number): "" | "rgb(51, 255, 25)" | "rgb(255, 102, 153)";
|
|
43
|
+
protected getResidueClass(seqIdx: number, label: string): string;
|
|
44
|
+
protected residue(seqIdx: number, label: string, marker: number): JSX.Element;
|
|
45
|
+
protected getSequenceNumberClass(seqIdx: number, seqNum: string, label: string): string;
|
|
46
|
+
protected location: StructureElement.Location<Unit>;
|
|
47
|
+
protected getSequenceNumber(seqIdx: number): string;
|
|
48
|
+
protected padSeqNum(n: string): string;
|
|
49
|
+
protected getSequenceNumberSpan(seqIdx: number, label: string): JSX.Element;
|
|
50
|
+
protected updateMarker(): void;
|
|
43
51
|
mouseMove: (e: React.MouseEvent) => void;
|
|
44
52
|
mouseLeave: (e: React.MouseEvent) => void;
|
|
45
53
|
render(): JSX.Element;
|
|
@@ -6,7 +6,25 @@
|
|
|
6
6
|
*/
|
|
7
7
|
/// <reference types="react" />
|
|
8
8
|
import { PluginUIComponent } from './base';
|
|
9
|
-
import { Structure } from '../mol-model/structure';
|
|
9
|
+
import { Structure, StructureElement } from '../mol-model/structure';
|
|
10
|
+
import { SequenceWrapper } from './sequence/wrapper';
|
|
11
|
+
import { State } from '../mol-state';
|
|
12
|
+
import { StructureSelectionManager } from '../mol-plugin-state/manager/structure/selection';
|
|
13
|
+
export declare function opKey(l: StructureElement.Location): string;
|
|
14
|
+
export declare function splitModelEntityId(modelEntityId: string): (string | number)[];
|
|
15
|
+
export declare function getSequenceWrapper(state: {
|
|
16
|
+
structure: Structure;
|
|
17
|
+
modelEntityId: string;
|
|
18
|
+
chainGroupId: number;
|
|
19
|
+
operatorKey: string;
|
|
20
|
+
}, structureSelection: StructureSelectionManager): SequenceWrapper.Any | string;
|
|
21
|
+
export declare function getModelEntityOptions(structure: Structure, polymersOnly?: boolean): [string, string][];
|
|
22
|
+
export declare function getChainOptions(structure: Structure, modelEntityId: string): [number, string][];
|
|
23
|
+
export declare function getOperatorOptions(structure: Structure, modelEntityId: string, chainGroupId: number): [string, string][];
|
|
24
|
+
export declare function getStructureOptions(state: State): {
|
|
25
|
+
options: [string, string][];
|
|
26
|
+
all: Structure[];
|
|
27
|
+
};
|
|
10
28
|
export type SequenceViewMode = 'single' | 'polymers' | 'all';
|
|
11
29
|
type SequenceViewState = {
|
|
12
30
|
structureOptions: {
|
|
@@ -26,18 +26,18 @@ var MaxDisplaySequenceLength = 5000;
|
|
|
26
26
|
// TODO: add virtualized Select controls (at best with a search box)?
|
|
27
27
|
var MaxSelectOptionsCount = 1000;
|
|
28
28
|
var MaxSequenceWrappersCount = 30;
|
|
29
|
-
function opKey(l) {
|
|
29
|
+
export function opKey(l) {
|
|
30
30
|
var ids = SP.unit.pdbx_struct_oper_list_ids(l);
|
|
31
31
|
var ncs = SP.unit.struct_ncs_oper_id(l);
|
|
32
32
|
var hkl = SP.unit.hkl(l);
|
|
33
33
|
var spgrOp = SP.unit.spgrOp(l);
|
|
34
34
|
return "".concat(ids.sort().join(','), "|").concat(ncs, "|").concat(hkl, "|").concat(spgrOp);
|
|
35
35
|
}
|
|
36
|
-
function splitModelEntityId(modelEntityId) {
|
|
36
|
+
export function splitModelEntityId(modelEntityId) {
|
|
37
37
|
var _a = modelEntityId.split('|'), modelIdx = _a[0], entityId = _a[1];
|
|
38
38
|
return [parseInt(modelIdx), entityId];
|
|
39
39
|
}
|
|
40
|
-
function getSequenceWrapper(state, structureSelection) {
|
|
40
|
+
export function getSequenceWrapper(state, structureSelection) {
|
|
41
41
|
var structure = state.structure, modelEntityId = state.modelEntityId, chainGroupId = state.chainGroupId, operatorKey = state.operatorKey;
|
|
42
42
|
var l = StructureElement.Location.create(structure);
|
|
43
43
|
var _a = splitModelEntityId(modelEntityId), modelIdx = _a[0], entityId = _a[1];
|
|
@@ -96,7 +96,7 @@ function getSequenceWrapper(state, structureSelection) {
|
|
|
96
96
|
return 'No sequence available';
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
function getModelEntityOptions(structure, polymersOnly) {
|
|
99
|
+
export function getModelEntityOptions(structure, polymersOnly) {
|
|
100
100
|
if (polymersOnly === void 0) { polymersOnly = false; }
|
|
101
101
|
var options = [];
|
|
102
102
|
var l = StructureElement.Location.create(structure);
|
|
@@ -131,7 +131,7 @@ function getModelEntityOptions(structure, polymersOnly) {
|
|
|
131
131
|
options.push(['', 'No entities']);
|
|
132
132
|
return options;
|
|
133
133
|
}
|
|
134
|
-
function getChainOptions(structure, modelEntityId) {
|
|
134
|
+
export function getChainOptions(structure, modelEntityId) {
|
|
135
135
|
var options = [];
|
|
136
136
|
var l = StructureElement.Location.create(structure);
|
|
137
137
|
var seen = new Set();
|
|
@@ -159,7 +159,7 @@ function getChainOptions(structure, modelEntityId) {
|
|
|
159
159
|
options.push([-1, 'No chains']);
|
|
160
160
|
return options;
|
|
161
161
|
}
|
|
162
|
-
function getOperatorOptions(structure, modelEntityId, chainGroupId) {
|
|
162
|
+
export function getOperatorOptions(structure, modelEntityId, chainGroupId) {
|
|
163
163
|
var options = [];
|
|
164
164
|
var l = StructureElement.Location.create(structure);
|
|
165
165
|
var seen = new Set();
|
|
@@ -187,7 +187,7 @@ function getOperatorOptions(structure, modelEntityId, chainGroupId) {
|
|
|
187
187
|
options.push(['', 'No operators']);
|
|
188
188
|
return options;
|
|
189
189
|
}
|
|
190
|
-
function getStructureOptions(state) {
|
|
190
|
+
export function getStructureOptions(state) {
|
|
191
191
|
var _a;
|
|
192
192
|
var options = [];
|
|
193
193
|
var all = [];
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
@mixin user-select($select) {
|
|
3
|
-
-webkit-user-select: $select;
|
|
4
|
-
-moz-user-select: $select;
|
|
5
|
-
-ms-user-select: $select; // IE10+
|
|
6
|
-
user-select: $select;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.msp-plugin {
|
|
10
|
-
font-family: "Helvetica Neue", "Segoe UI", Helvetica, "Source Sans Pro", Arial, sans-serif;
|
|
11
|
-
font-size: 14px;
|
|
12
|
-
line-height: 1.42857143;
|
|
13
|
-
|
|
14
|
-
position: absolute;
|
|
15
|
-
left: 0;
|
|
16
|
-
top: 0;
|
|
17
|
-
right: 0;
|
|
18
|
-
bottom: 0;
|
|
19
|
-
|
|
20
|
-
@import 'variables';
|
|
21
|
-
|
|
22
|
-
@import "normalize";
|
|
23
|
-
|
|
24
|
-
@import 'layout';
|
|
25
|
-
@import 'ui';
|
|
26
|
-
@import 'logo';
|
|
27
|
-
|
|
28
|
-
.msp-plugin-content {
|
|
29
|
-
color: $font-color;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
background: $default-background;
|
|
1
|
+
|
|
2
|
+
@mixin user-select($select) {
|
|
3
|
+
-webkit-user-select: $select;
|
|
4
|
+
-moz-user-select: $select;
|
|
5
|
+
-ms-user-select: $select; // IE10+
|
|
6
|
+
user-select: $select;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.msp-plugin {
|
|
10
|
+
font-family: "Helvetica Neue", "Segoe UI", Helvetica, "Source Sans Pro", Arial, sans-serif;
|
|
11
|
+
font-size: 14px;
|
|
12
|
+
line-height: 1.42857143;
|
|
13
|
+
|
|
14
|
+
position: absolute;
|
|
15
|
+
left: 0;
|
|
16
|
+
top: 0;
|
|
17
|
+
right: 0;
|
|
18
|
+
bottom: 0;
|
|
19
|
+
|
|
20
|
+
@import 'variables';
|
|
21
|
+
|
|
22
|
+
@import "normalize";
|
|
23
|
+
|
|
24
|
+
@import 'layout';
|
|
25
|
+
@import 'ui';
|
|
26
|
+
@import 'logo';
|
|
27
|
+
|
|
28
|
+
.msp-plugin-content {
|
|
29
|
+
color: $font-color;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
background: $default-background;
|
|
33
33
|
}
|