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
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
|
+
*
|
|
4
|
+
* @author David Sehnal <david.sehnal@gmail.com>
|
|
5
|
+
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
6
|
+
*/
|
|
7
|
+
import { __awaiter, __generator } from "tslib";
|
|
8
|
+
import { Volume } from '../../mol-model/volume';
|
|
9
|
+
import { Task } from '../../mol-task';
|
|
10
|
+
import { SpacegroupCell, Box3D } from '../../mol-math/geometry';
|
|
11
|
+
import { Tensor, Vec3 } from '../../mol-math/linear-algebra';
|
|
12
|
+
import { CustomProperties } from '../../mol-model/custom-property';
|
|
13
|
+
import { objectForEach } from '../../mol-util/object';
|
|
14
|
+
export function volumeFromSegmentationData(source, params) {
|
|
15
|
+
var _this = this;
|
|
16
|
+
return Task.create('Create Segmentation Volume', function (ctx) { return __awaiter(_this, void 0, void 0, function () {
|
|
17
|
+
var info, values, cell, axis_order_fast_to_slow, normalizeOrder, sample_count, tensorSpace, t, origin, dimensions, v, segments, sets, _a, segment_id, set_id, i, il, segment, set, c, getCoords, d, _b, xn, yn, zn, xn1, yn1, zn1, setBounds, i, il, v_1, b, bounds;
|
|
18
|
+
var _c;
|
|
19
|
+
return __generator(this, function (_d) {
|
|
20
|
+
info = source.volume_data_3d_info, values = source.segmentation_data_3d;
|
|
21
|
+
cell = SpacegroupCell.create(info.spacegroup_number.value(0), Vec3.ofArray(info.spacegroup_cell_size.value(0)), Vec3.scale(Vec3(), Vec3.ofArray(info.spacegroup_cell_angles.value(0)), Math.PI / 180));
|
|
22
|
+
axis_order_fast_to_slow = info.axis_order.value(0);
|
|
23
|
+
normalizeOrder = Tensor.convertToCanonicalAxisIndicesFastToSlow(axis_order_fast_to_slow);
|
|
24
|
+
sample_count = normalizeOrder(info.sample_count.value(0));
|
|
25
|
+
tensorSpace = Tensor.Space(sample_count, Tensor.invertAxisOrder(axis_order_fast_to_slow), Float32Array);
|
|
26
|
+
t = Tensor.create(tensorSpace, Tensor.Data1(values.values.toArray({ array: Float32Array })));
|
|
27
|
+
origin = Vec3.ofArray(normalizeOrder(info.origin.value(0)));
|
|
28
|
+
dimensions = Vec3.ofArray(normalizeOrder(info.dimensions.value(0)));
|
|
29
|
+
v = {
|
|
30
|
+
label: params === null || params === void 0 ? void 0 : params.label,
|
|
31
|
+
entryId: undefined,
|
|
32
|
+
grid: {
|
|
33
|
+
transform: {
|
|
34
|
+
kind: 'spacegroup',
|
|
35
|
+
cell: cell,
|
|
36
|
+
fractionalBox: Box3D.create(origin, Vec3.add(Vec3(), origin, dimensions))
|
|
37
|
+
},
|
|
38
|
+
cells: t,
|
|
39
|
+
stats: {
|
|
40
|
+
min: 0, max: 1, mean: 0, sigma: 1
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
sourceData: SegcifFormat.create(source),
|
|
44
|
+
customProperties: new CustomProperties(),
|
|
45
|
+
_propertyData: { ownerId: params === null || params === void 0 ? void 0 : params.ownerId },
|
|
46
|
+
};
|
|
47
|
+
Volume.PickingGranularity.set(v, 'object');
|
|
48
|
+
segments = new Map();
|
|
49
|
+
sets = new Map();
|
|
50
|
+
_a = source.segmentation_data_table, segment_id = _a.segment_id, set_id = _a.set_id;
|
|
51
|
+
for (i = 0, il = segment_id.rowCount; i < il; ++i) {
|
|
52
|
+
segment = segment_id.value(i);
|
|
53
|
+
set = set_id.value(i);
|
|
54
|
+
if (set === 0 || segment === 0)
|
|
55
|
+
continue;
|
|
56
|
+
if (!sets.has(set))
|
|
57
|
+
sets.set(set, new Set());
|
|
58
|
+
sets.get(set).add(segment);
|
|
59
|
+
}
|
|
60
|
+
sets.forEach(function (segs, set) {
|
|
61
|
+
segs.forEach(function (seg) {
|
|
62
|
+
if (!segments.has(seg))
|
|
63
|
+
segments.set(seg, new Set());
|
|
64
|
+
segments.get(seg).add(set);
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
c = [0, 0, 0];
|
|
68
|
+
getCoords = t.space.getCoords;
|
|
69
|
+
d = t.data;
|
|
70
|
+
_b = v.grid.cells.space.dimensions, xn = _b[0], yn = _b[1], zn = _b[2];
|
|
71
|
+
xn1 = xn - 1;
|
|
72
|
+
yn1 = yn - 1;
|
|
73
|
+
zn1 = zn - 1;
|
|
74
|
+
setBounds = {};
|
|
75
|
+
sets.forEach(function (v, k) {
|
|
76
|
+
setBounds[k] = [xn1, yn1, zn1, -1, -1, -1];
|
|
77
|
+
});
|
|
78
|
+
for (i = 0, il = d.length; i < il; ++i) {
|
|
79
|
+
v_1 = d[i];
|
|
80
|
+
if (v_1 === 0)
|
|
81
|
+
continue;
|
|
82
|
+
getCoords(i, c);
|
|
83
|
+
b = setBounds[v_1];
|
|
84
|
+
if (c[0] < b[0])
|
|
85
|
+
b[0] = c[0];
|
|
86
|
+
if (c[1] < b[1])
|
|
87
|
+
b[1] = c[1];
|
|
88
|
+
if (c[2] < b[2])
|
|
89
|
+
b[2] = c[2];
|
|
90
|
+
if (c[0] > b[3])
|
|
91
|
+
b[3] = c[0];
|
|
92
|
+
if (c[1] > b[4])
|
|
93
|
+
b[4] = c[1];
|
|
94
|
+
if (c[2] > b[5])
|
|
95
|
+
b[5] = c[2];
|
|
96
|
+
}
|
|
97
|
+
bounds = {};
|
|
98
|
+
segments.forEach(function (v, k) {
|
|
99
|
+
bounds[k] = Box3D.create(Vec3.create(xn1, yn1, zn1), Vec3.create(-1, -1, -1));
|
|
100
|
+
});
|
|
101
|
+
objectForEach(setBounds, function (b, s) {
|
|
102
|
+
sets.get(parseInt(s)).forEach(function (seg) {
|
|
103
|
+
var sb = bounds[seg];
|
|
104
|
+
if (b[0] < sb.min[0])
|
|
105
|
+
sb.min[0] = b[0];
|
|
106
|
+
if (b[1] < sb.min[1])
|
|
107
|
+
sb.min[1] = b[1];
|
|
108
|
+
if (b[2] < sb.min[2])
|
|
109
|
+
sb.min[2] = b[2];
|
|
110
|
+
if (b[3] > sb.max[0])
|
|
111
|
+
sb.max[0] = b[3];
|
|
112
|
+
if (b[4] > sb.max[1])
|
|
113
|
+
sb.max[1] = b[4];
|
|
114
|
+
if (b[5] > sb.max[2])
|
|
115
|
+
sb.max[2] = b[5];
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
Volume.Segmentation.set(v, { segments: segments, sets: sets, bounds: bounds, labels: (_c = params === null || params === void 0 ? void 0 : params.segmentLabels) !== null && _c !== void 0 ? _c : {} });
|
|
119
|
+
return [2 /*return*/, v];
|
|
120
|
+
});
|
|
121
|
+
}); });
|
|
122
|
+
}
|
|
123
|
+
//
|
|
124
|
+
export { SegcifFormat };
|
|
125
|
+
var SegcifFormat;
|
|
126
|
+
(function (SegcifFormat) {
|
|
127
|
+
function is(x) {
|
|
128
|
+
return (x === null || x === void 0 ? void 0 : x.kind) === 'segcif';
|
|
129
|
+
}
|
|
130
|
+
SegcifFormat.is = is;
|
|
131
|
+
function create(segcif) {
|
|
132
|
+
return { kind: 'segcif', name: segcif._name, data: segcif };
|
|
133
|
+
}
|
|
134
|
+
SegcifFormat.create = create;
|
|
135
|
+
})(SegcifFormat || (SegcifFormat = {}));
|
|
@@ -12,7 +12,7 @@ export declare const HighlightLoci: import("../../../mol-state/transformer").Sta
|
|
|
12
12
|
hoverHighlightOnly: Binding;
|
|
13
13
|
hoverHighlightOnlyExtend: Binding;
|
|
14
14
|
}>;
|
|
15
|
-
ignore: PD.Value<("element-loci" | "structure-loci" | "bond-loci" | "volume-loci" | "isosurface-loci" | "cell-loci" | "every-loci" | "empty-loci" | "data-loci" | "shape-loci" | "group-loci")[]>;
|
|
15
|
+
ignore: PD.Value<("element-loci" | "structure-loci" | "bond-loci" | "volume-loci" | "isosurface-loci" | "cell-loci" | "segment-loci" | "every-loci" | "empty-loci" | "data-loci" | "shape-loci" | "group-loci")[]>;
|
|
16
16
|
preferAtoms: PD.BooleanParam;
|
|
17
17
|
mark: PD.BooleanParam;
|
|
18
18
|
}>>;
|
|
@@ -25,7 +25,7 @@ export declare const SelectLoci: import("../../../mol-state/transformer").StateT
|
|
|
25
25
|
clickDeselect: Binding;
|
|
26
26
|
clickDeselectAllOnEmpty: Binding;
|
|
27
27
|
}>;
|
|
28
|
-
ignore: PD.Value<("element-loci" | "structure-loci" | "bond-loci" | "volume-loci" | "isosurface-loci" | "cell-loci" | "every-loci" | "empty-loci" | "data-loci" | "shape-loci" | "group-loci")[]>;
|
|
28
|
+
ignore: PD.Value<("element-loci" | "structure-loci" | "bond-loci" | "volume-loci" | "isosurface-loci" | "cell-loci" | "segment-loci" | "every-loci" | "empty-loci" | "data-loci" | "shape-loci" | "group-loci")[]>;
|
|
29
29
|
preferAtoms: PD.BooleanParam;
|
|
30
30
|
mark: PD.BooleanParam;
|
|
31
31
|
}>>;
|
|
@@ -22,6 +22,7 @@ declare const StructureFocusRepresentationParams: (plugin: PluginContext) => {
|
|
|
22
22
|
components: PD.MultiSelect<"target" | "surroundings" | "interactions">;
|
|
23
23
|
excludeTargetFromSurroundings: PD.BooleanParam;
|
|
24
24
|
ignoreHydrogens: PD.BooleanParam;
|
|
25
|
+
ignoreHydrogensVariant: PD.Select<"all" | "non-polar">;
|
|
25
26
|
ignoreLight: PD.BooleanParam;
|
|
26
27
|
material: PD.Group<PD.Normalize<{
|
|
27
28
|
metalness: number;
|
|
@@ -49,6 +49,7 @@ var StructureFocusRepresentationParams = function (plugin) {
|
|
|
49
49
|
components: PD.MultiSelect(FocusComponents, PD.arrayToOptions(FocusComponents)),
|
|
50
50
|
excludeTargetFromSurroundings: PD.Boolean(false, { label: 'Exclude Target', description: 'Exclude the focus "target" from the surroudings component.' }),
|
|
51
51
|
ignoreHydrogens: PD.Boolean(false),
|
|
52
|
+
ignoreHydrogensVariant: PD.Select('all', PD.arrayToOptions(['all', 'non-polar'])),
|
|
52
53
|
ignoreLight: PD.Boolean(false),
|
|
53
54
|
material: Material.getParam(),
|
|
54
55
|
clip: PD.Group(Clip.Params),
|
|
@@ -79,7 +80,7 @@ var StructureFocusRepresentationBehavior = /** @class */ (function (_super) {
|
|
|
79
80
|
StructureFocusRepresentationBehavior.prototype.getReprParams = function (reprParams) {
|
|
80
81
|
return __assign(__assign({}, reprParams), { type: {
|
|
81
82
|
name: reprParams.type.name,
|
|
82
|
-
params: __assign(__assign({}, reprParams.type.params), { ignoreHydrogens: this.params.ignoreHydrogens, ignoreLight: this.params.ignoreLight, material: this.params.material, clip: this.params.clip })
|
|
83
|
+
params: __assign(__assign({}, reprParams.type.params), { ignoreHydrogens: this.params.ignoreHydrogens, ignoreHydrogensVariant: this.params.ignoreHydrogensVariant, ignoreLight: this.params.ignoreLight, material: this.params.material, clip: this.params.clip })
|
|
83
84
|
} });
|
|
84
85
|
};
|
|
85
86
|
StructureFocusRepresentationBehavior.prototype.ensureShape = function (cell) {
|
|
@@ -9,12 +9,12 @@ import { Volume } from '../../../../mol-model/volume';
|
|
|
9
9
|
import { Structure } from '../../../../mol-model/structure';
|
|
10
10
|
declare const VolumeServerInfo_base: {
|
|
11
11
|
new (data: VolumeServerInfo.Data, props?: {
|
|
12
|
-
|
|
12
|
+
/** Precision data the server can show. */
|
|
13
|
+
label: string;
|
|
13
14
|
description?: string | undefined;
|
|
14
15
|
} | undefined): {
|
|
15
16
|
id: import("../../../../mol-util/uuid").UUID;
|
|
16
17
|
type: PluginStateObject.TypeInfo;
|
|
17
|
-
/** The value are stored in blockSize^3 cubes */
|
|
18
18
|
label: string;
|
|
19
19
|
description?: string | undefined;
|
|
20
20
|
data: VolumeServerInfo.Data;
|
|
@@ -23,7 +23,6 @@ declare const VolumeServerInfo_base: {
|
|
|
23
23
|
is(obj?: import("../../../../mol-state/object").StateObject<any, import("../../../../mol-state/object").StateObject.Type<any>> | undefined): obj is {
|
|
24
24
|
id: import("../../../../mol-util/uuid").UUID;
|
|
25
25
|
type: PluginStateObject.TypeInfo;
|
|
26
|
-
/** The value are stored in blockSize^3 cubes */
|
|
27
26
|
label: string;
|
|
28
27
|
description?: string | undefined;
|
|
29
28
|
data: VolumeServerInfo.Data;
|
|
@@ -244,6 +244,7 @@ export declare const PluginCommands: {
|
|
|
244
244
|
scale: any;
|
|
245
245
|
threshold: any;
|
|
246
246
|
color: any;
|
|
247
|
+
includeTransparent: any;
|
|
247
248
|
}>, "on">;
|
|
248
249
|
antialiasing: import("../mol-util/param-definition").ParamDefinition.NamedParams<import("../mol-util/param-definition").ParamDefinition.Normalize<unknown>, "off"> | import("../mol-util/param-definition").ParamDefinition.NamedParams<import("../mol-util/param-definition").ParamDefinition.Normalize<{
|
|
249
250
|
edgeThreshold: any;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export var PLUGIN_VERSION = '3.
|
|
2
|
-
export var PLUGIN_VERSION_DATE = new Date(typeof __MOLSTAR_DEBUG_TIMESTAMP__ !== 'undefined' ? __MOLSTAR_DEBUG_TIMESTAMP__ :
|
|
1
|
+
export var PLUGIN_VERSION = '3.28.0';
|
|
2
|
+
export var PLUGIN_VERSION_DATE = new Date(typeof __MOLSTAR_DEBUG_TIMESTAMP__ !== 'undefined' ? __MOLSTAR_DEBUG_TIMESTAMP__ : 1671492998173);
|
|
@@ -129,6 +129,10 @@ export var AnimateModelIndex = PluginStateAnimation.create({
|
|
|
129
129
|
var durationInMs = params.duration.name === 'fixed'
|
|
130
130
|
? params.duration.params.durationInS * 1000
|
|
131
131
|
: Math.ceil(1000 * traj.data.frameCount / params.duration.params.targetFps);
|
|
132
|
+
if (params.mode.name === 'once' && t.current >= durationInMs) {
|
|
133
|
+
isEnd = true;
|
|
134
|
+
return { modelIndex: traj.data.frameCount - 1 };
|
|
135
|
+
}
|
|
132
136
|
var phase = (t.current % durationInMs) / durationInMs;
|
|
133
137
|
if (params.mode.name === 'loop') {
|
|
134
138
|
if (params.mode.params.direction === 'backward') {
|
|
@@ -141,7 +145,6 @@ export var AnimateModelIndex = PluginStateAnimation.create({
|
|
|
141
145
|
phase = 2 - phase;
|
|
142
146
|
}
|
|
143
147
|
var modelIndex = Math.min(Math.floor(traj.data.frameCount * phase), traj.data.frameCount - 1);
|
|
144
|
-
isEnd = isEnd || modelIndex === traj.data.frameCount - 1;
|
|
145
148
|
return { modelIndex: modelIndex };
|
|
146
149
|
}
|
|
147
150
|
});
|
|
@@ -66,6 +66,7 @@ export declare const PresetTrajectoryHierarchy: {
|
|
|
66
66
|
}>, "symmetry-assembly"> | undefined;
|
|
67
67
|
representationPresetParams: PD.Normalize<{
|
|
68
68
|
ignoreHydrogens: any;
|
|
69
|
+
ignoreHydrogensVariant: any;
|
|
69
70
|
ignoreLight: any;
|
|
70
71
|
quality: any;
|
|
71
72
|
theme: any;
|
|
@@ -91,6 +92,7 @@ export declare const PresetTrajectoryHierarchy: {
|
|
|
91
92
|
useDefaultIfSingleModel: boolean | undefined;
|
|
92
93
|
representationPresetParams: PD.Normalize<{
|
|
93
94
|
ignoreHydrogens: any;
|
|
95
|
+
ignoreHydrogensVariant: any;
|
|
94
96
|
ignoreLight: any;
|
|
95
97
|
quality: any;
|
|
96
98
|
theme: any;
|
|
@@ -29,13 +29,14 @@ export declare namespace StructureRepresentationPresetProvider {
|
|
|
29
29
|
};
|
|
30
30
|
const CommonParams: {
|
|
31
31
|
ignoreHydrogens: PD.Base<boolean | undefined>;
|
|
32
|
+
ignoreHydrogensVariant: PD.Base<"all" | "non-polar" | undefined>;
|
|
32
33
|
ignoreLight: PD.Base<boolean | undefined>;
|
|
33
34
|
quality: PD.Base<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest" | undefined>;
|
|
34
35
|
theme: PD.Base<PD.Normalize<{
|
|
35
|
-
globalName: "uniform" | "occupancy" | "element-index" | "element-symbol" | "hydrophobicity" | "shape-group" | "uncertainty" | "carbohydrate-symbol" | "chain-id" | "operator-name" | "entity-id" | "entity-source" | "model-index" | "structure-index" | "molecule-type" | "polymer-id" | "polymer-index" | "residue-name" | "secondary-structure" | "sequence-id" | "unit-index" | "illustrative" | "trajectory-index" | "operator-hkl" | "partial-charge" | "atom-id" | "volume-value" | "external-volume" | undefined;
|
|
36
|
+
globalName: "uniform" | "occupancy" | "element-index" | "element-symbol" | "hydrophobicity" | "shape-group" | "uncertainty" | "carbohydrate-symbol" | "chain-id" | "operator-name" | "entity-id" | "entity-source" | "model-index" | "structure-index" | "molecule-type" | "polymer-id" | "polymer-index" | "residue-name" | "secondary-structure" | "sequence-id" | "unit-index" | "illustrative" | "trajectory-index" | "operator-hkl" | "partial-charge" | "atom-id" | "volume-value" | "volume-segment" | "external-volume" | undefined;
|
|
36
37
|
globalColorParams: any;
|
|
37
38
|
carbonColor: "element-symbol" | "chain-id" | "operator-name" | undefined;
|
|
38
|
-
symmetryColor: "uniform" | "occupancy" | "element-index" | "element-symbol" | "hydrophobicity" | "shape-group" | "uncertainty" | "carbohydrate-symbol" | "chain-id" | "operator-name" | "entity-id" | "entity-source" | "model-index" | "structure-index" | "molecule-type" | "polymer-id" | "polymer-index" | "residue-name" | "secondary-structure" | "sequence-id" | "unit-index" | "illustrative" | "trajectory-index" | "operator-hkl" | "partial-charge" | "atom-id" | "volume-value" | "external-volume" | undefined;
|
|
39
|
+
symmetryColor: "uniform" | "occupancy" | "element-index" | "element-symbol" | "hydrophobicity" | "shape-group" | "uncertainty" | "carbohydrate-symbol" | "chain-id" | "operator-name" | "entity-id" | "entity-source" | "model-index" | "structure-index" | "molecule-type" | "polymer-id" | "polymer-index" | "residue-name" | "secondary-structure" | "sequence-id" | "unit-index" | "illustrative" | "trajectory-index" | "operator-hkl" | "partial-charge" | "atom-id" | "volume-value" | "volume-segment" | "external-volume" | undefined;
|
|
39
40
|
symmetryColorParams: any;
|
|
40
41
|
focus: PD.Normalize<{
|
|
41
42
|
name: any;
|
|
@@ -47,13 +48,14 @@ export declare namespace StructureRepresentationPresetProvider {
|
|
|
47
48
|
function reprBuilder(plugin: PluginContext, params: CommonParams, structure?: Structure): {
|
|
48
49
|
update: import("../../../mol-state/state/builder").StateBuilder.Root;
|
|
49
50
|
builder: import("./representation").StructureRepresentationBuilder;
|
|
50
|
-
color: "uniform" | "occupancy" | "element-index" | "element-symbol" | "hydrophobicity" | "shape-group" | "uncertainty" | "carbohydrate-symbol" | "chain-id" | "operator-name" | "entity-id" | "entity-source" | "model-index" | "structure-index" | "molecule-type" | "polymer-id" | "polymer-index" | "residue-name" | "secondary-structure" | "sequence-id" | "unit-index" | "illustrative" | "trajectory-index" | "operator-hkl" | "partial-charge" | "atom-id" | "volume-value" | "external-volume" | undefined;
|
|
51
|
-
symmetryColor: "uniform" | "occupancy" | "element-index" | "element-symbol" | "hydrophobicity" | "shape-group" | "uncertainty" | "carbohydrate-symbol" | "chain-id" | "operator-name" | "entity-id" | "entity-source" | "model-index" | "structure-index" | "molecule-type" | "polymer-id" | "polymer-index" | "residue-name" | "secondary-structure" | "sequence-id" | "unit-index" | "illustrative" | "trajectory-index" | "operator-hkl" | "partial-charge" | "atom-id" | "volume-value" | "external-volume" | undefined;
|
|
51
|
+
color: "uniform" | "occupancy" | "element-index" | "element-symbol" | "hydrophobicity" | "shape-group" | "uncertainty" | "carbohydrate-symbol" | "chain-id" | "operator-name" | "entity-id" | "entity-source" | "model-index" | "structure-index" | "molecule-type" | "polymer-id" | "polymer-index" | "residue-name" | "secondary-structure" | "sequence-id" | "unit-index" | "illustrative" | "trajectory-index" | "operator-hkl" | "partial-charge" | "atom-id" | "volume-value" | "volume-segment" | "external-volume" | undefined;
|
|
52
|
+
symmetryColor: "uniform" | "occupancy" | "element-index" | "element-symbol" | "hydrophobicity" | "shape-group" | "uncertainty" | "carbohydrate-symbol" | "chain-id" | "operator-name" | "entity-id" | "entity-source" | "model-index" | "structure-index" | "molecule-type" | "polymer-id" | "polymer-index" | "residue-name" | "secondary-structure" | "sequence-id" | "unit-index" | "illustrative" | "trajectory-index" | "operator-hkl" | "partial-charge" | "atom-id" | "volume-value" | "volume-segment" | "external-volume" | undefined;
|
|
52
53
|
symmetryColorParams: any;
|
|
53
54
|
globalColorParams: any;
|
|
54
55
|
typeParams: {
|
|
55
56
|
quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
|
|
56
57
|
ignoreHydrogens: boolean;
|
|
58
|
+
ignoreHydrogensVariant: "all" | "non-polar";
|
|
57
59
|
ignoreLight: boolean;
|
|
58
60
|
};
|
|
59
61
|
ballAndStickColor: Partial<PD.Values<{
|
|
@@ -265,6 +267,7 @@ export declare const PresetStructureRepresentations: {
|
|
|
265
267
|
empty: StructureRepresentationPresetProvider<unknown, {}>;
|
|
266
268
|
auto: StructureRepresentationPresetProvider<{
|
|
267
269
|
ignoreHydrogens: boolean | undefined;
|
|
270
|
+
ignoreHydrogensVariant: "all" | "non-polar" | undefined;
|
|
268
271
|
ignoreLight: boolean | undefined;
|
|
269
272
|
quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest" | undefined;
|
|
270
273
|
theme: PD.Normalize<{
|
|
@@ -297,6 +300,7 @@ export declare const PresetStructureRepresentations: {
|
|
|
297
300
|
'atomic-detail': StructureRepresentationPresetProvider<{
|
|
298
301
|
showCarbohydrateSymbol: boolean;
|
|
299
302
|
ignoreHydrogens: boolean | undefined;
|
|
303
|
+
ignoreHydrogensVariant: "all" | "non-polar" | undefined;
|
|
300
304
|
ignoreLight: boolean | undefined;
|
|
301
305
|
quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest" | undefined;
|
|
302
306
|
theme: PD.Normalize<{
|
|
@@ -321,6 +325,7 @@ export declare const PresetStructureRepresentations: {
|
|
|
321
325
|
}>;
|
|
322
326
|
'polymer-cartoon': StructureRepresentationPresetProvider<{
|
|
323
327
|
ignoreHydrogens: boolean | undefined;
|
|
328
|
+
ignoreHydrogensVariant: "all" | "non-polar" | undefined;
|
|
324
329
|
ignoreLight: boolean | undefined;
|
|
325
330
|
quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest" | undefined;
|
|
326
331
|
theme: PD.Normalize<{
|
|
@@ -344,6 +349,7 @@ export declare const PresetStructureRepresentations: {
|
|
|
344
349
|
}>;
|
|
345
350
|
'polymer-and-ligand': StructureRepresentationPresetProvider<{
|
|
346
351
|
ignoreHydrogens: boolean | undefined;
|
|
352
|
+
ignoreHydrogensVariant: "all" | "non-polar" | undefined;
|
|
347
353
|
ignoreLight: boolean | undefined;
|
|
348
354
|
quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest" | undefined;
|
|
349
355
|
theme: PD.Normalize<{
|
|
@@ -382,6 +388,7 @@ export declare const PresetStructureRepresentations: {
|
|
|
382
388
|
}>;
|
|
383
389
|
'protein-and-nucleic': StructureRepresentationPresetProvider<{
|
|
384
390
|
ignoreHydrogens: boolean | undefined;
|
|
391
|
+
ignoreHydrogensVariant: "all" | "non-polar" | undefined;
|
|
385
392
|
ignoreLight: boolean | undefined;
|
|
386
393
|
quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest" | undefined;
|
|
387
394
|
theme: PD.Normalize<{
|
|
@@ -407,6 +414,7 @@ export declare const PresetStructureRepresentations: {
|
|
|
407
414
|
}>;
|
|
408
415
|
'coarse-surface': StructureRepresentationPresetProvider<{
|
|
409
416
|
ignoreHydrogens: boolean | undefined;
|
|
417
|
+
ignoreHydrogensVariant: "all" | "non-polar" | undefined;
|
|
410
418
|
ignoreLight: boolean | undefined;
|
|
411
419
|
quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest" | undefined;
|
|
412
420
|
theme: PD.Normalize<{
|
|
@@ -433,6 +441,7 @@ export declare const PresetStructureRepresentations: {
|
|
|
433
441
|
illustrative: StructureRepresentationPresetProvider<{
|
|
434
442
|
showCarbohydrateSymbol: boolean;
|
|
435
443
|
ignoreHydrogens: boolean | undefined;
|
|
444
|
+
ignoreHydrogensVariant: "all" | "non-polar" | undefined;
|
|
436
445
|
ignoreLight: boolean | undefined;
|
|
437
446
|
quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest" | undefined;
|
|
438
447
|
theme: PD.Normalize<{
|
|
@@ -22,6 +22,7 @@ export function StructureRepresentationPresetProvider(repr) { return repr; }
|
|
|
22
22
|
(function (StructureRepresentationPresetProvider) {
|
|
23
23
|
StructureRepresentationPresetProvider.CommonParams = {
|
|
24
24
|
ignoreHydrogens: PD.Optional(PD.Boolean(false)),
|
|
25
|
+
ignoreHydrogensVariant: PD.Optional(PD.Select('all', PD.arrayToOptions(['all', 'non-polar']))),
|
|
25
26
|
ignoreLight: PD.Optional(PD.Boolean(false)),
|
|
26
27
|
quality: PD.Optional(PD.Select('auto', VisualQualityOptions)),
|
|
27
28
|
theme: PD.Optional(PD.Group({
|
|
@@ -50,15 +51,19 @@ export function StructureRepresentationPresetProvider(repr) { return repr; }
|
|
|
50
51
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
51
52
|
var update = plugin.state.data.build();
|
|
52
53
|
var builder = plugin.builders.structure.representation;
|
|
54
|
+
var h = plugin.managers.structure.component.state.options.hydrogens;
|
|
53
55
|
var typeParams = {
|
|
54
56
|
quality: plugin.managers.structure.component.state.options.visualQuality,
|
|
55
|
-
ignoreHydrogens:
|
|
57
|
+
ignoreHydrogens: h !== 'all',
|
|
58
|
+
ignoreHydrogensVariant: (h === 'only-polar' ? 'non-polar' : 'all'),
|
|
56
59
|
ignoreLight: plugin.managers.structure.component.state.options.ignoreLight,
|
|
57
60
|
};
|
|
58
61
|
if (params.quality && params.quality !== 'auto')
|
|
59
62
|
typeParams.quality = params.quality;
|
|
60
63
|
if (params.ignoreHydrogens !== void 0)
|
|
61
64
|
typeParams.ignoreHydrogens = !!params.ignoreHydrogens;
|
|
65
|
+
if (params.ignoreHydrogensVariant !== void 0)
|
|
66
|
+
typeParams.ignoreHydrogensVariant = params.ignoreHydrogensVariant;
|
|
62
67
|
if (params.ignoreLight !== void 0)
|
|
63
68
|
typeParams.ignoreLight = !!params.ignoreLight;
|
|
64
69
|
var color = ((_a = params.theme) === null || _a === void 0 ? void 0 : _a.globalName) ? (_b = params.theme) === null || _b === void 0 ? void 0 : _b.globalName : void 0;
|
|
@@ -17,6 +17,7 @@ export declare class StructureRepresentationBuilder {
|
|
|
17
17
|
private get dataState();
|
|
18
18
|
readonly defaultProvider: StructureRepresentationPresetProvider<{
|
|
19
19
|
ignoreHydrogens: boolean | undefined;
|
|
20
|
+
ignoreHydrogensVariant: "all" | "non-polar" | undefined;
|
|
20
21
|
ignoreLight: boolean | undefined;
|
|
21
22
|
quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest" | undefined;
|
|
22
23
|
theme: PD.Normalize<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
5
5
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
@@ -19,6 +19,6 @@ export interface DataFormatProvider<P = any, R = any, V = any> {
|
|
|
19
19
|
visuals?(plugin: PluginContext, data: R): Promise<V> | undefined;
|
|
20
20
|
}
|
|
21
21
|
export declare function DataFormatProvider<P extends DataFormatProvider>(provider: P): P;
|
|
22
|
-
type cifVariants = 'dscif' | 'coreCif' | -1;
|
|
22
|
+
type cifVariants = 'dscif' | 'segcif' | 'coreCif' | -1;
|
|
23
23
|
export declare function guessCifVariant(info: FileInfo, data: Uint8Array | string): cifVariants;
|
|
24
24
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
5
5
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
@@ -11,15 +11,23 @@ export function guessCifVariant(info, data) {
|
|
|
11
11
|
try {
|
|
12
12
|
// TODO: find a way to run msgpackDecode only once
|
|
13
13
|
// now it is run twice, here and during file parsing
|
|
14
|
-
|
|
14
|
+
var encoder = decodeMsgPack(data).encoder;
|
|
15
|
+
if (encoder.startsWith('VolumeServer'))
|
|
15
16
|
return 'dscif';
|
|
17
|
+
// TODO: assumes volseg-volume-server only serves segments
|
|
18
|
+
if (encoder.startsWith('volseg-volume-server'))
|
|
19
|
+
return 'segcif';
|
|
20
|
+
}
|
|
21
|
+
catch (e) {
|
|
22
|
+
console.error(e);
|
|
16
23
|
}
|
|
17
|
-
catch (_a) { }
|
|
18
24
|
}
|
|
19
25
|
else if (info.ext === 'cif') {
|
|
20
26
|
var str = data;
|
|
21
27
|
if (str.startsWith('data_SERVER\n#\n_density_server_result'))
|
|
22
28
|
return 'dscif';
|
|
29
|
+
if (str.startsWith('data_SERVER\n#\ndata_SEGMENTATION_DATA'))
|
|
30
|
+
return 'segcif';
|
|
23
31
|
if (str.includes('atom_site_fract_x') || str.includes('atom_site.fract_x'))
|
|
24
32
|
return 'coreCif';
|
|
25
33
|
}
|
|
@@ -109,15 +109,16 @@ var DataFormatRegistry = /** @class */ (function () {
|
|
|
109
109
|
this._map.delete(name);
|
|
110
110
|
};
|
|
111
111
|
DataFormatRegistry.prototype.auto = function (info, dataStateObject) {
|
|
112
|
+
var _a, _b;
|
|
112
113
|
for (var i = 0, il = this.list.length; i < il; ++i) {
|
|
113
|
-
var
|
|
114
|
+
var p = this._list[i].provider;
|
|
114
115
|
var hasExt = false;
|
|
115
|
-
if (
|
|
116
|
+
if ((_a = p.binaryExtensions) === null || _a === void 0 ? void 0 : _a.includes(info.ext))
|
|
116
117
|
hasExt = true;
|
|
117
|
-
else if (
|
|
118
|
+
else if ((_b = p.stringExtensions) === null || _b === void 0 ? void 0 : _b.includes(info.ext))
|
|
118
119
|
hasExt = true;
|
|
119
|
-
if (hasExt && (!
|
|
120
|
-
return
|
|
120
|
+
if (hasExt && (!p.isApplicable || p.isApplicable(info, dataStateObject.data)))
|
|
121
|
+
return p;
|
|
121
122
|
}
|
|
122
123
|
return;
|
|
123
124
|
};
|
|
@@ -110,6 +110,20 @@ export declare const DscifProvider: {
|
|
|
110
110
|
volumes: StateObjectSelector<PluginStateObject.Volume.Data>[];
|
|
111
111
|
}) => Promise<StateObjectSelector<PluginStateObject.Volume.Representation3D, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>[]>;
|
|
112
112
|
};
|
|
113
|
+
export declare const SegcifProvider: {
|
|
114
|
+
label: string;
|
|
115
|
+
description: string;
|
|
116
|
+
category: string;
|
|
117
|
+
stringExtensions: string[];
|
|
118
|
+
binaryExtensions: string[];
|
|
119
|
+
isApplicable: (info: import("../../mol-util/file-info").FileInfo, data: string | Uint8Array) => boolean;
|
|
120
|
+
parse: (plugin: PluginContext, data: import("../../mol-state").StateObjectRef<PluginStateObject.Data.String | PluginStateObject.Data.Binary>) => Promise<{
|
|
121
|
+
volumes: StateObjectSelector<PluginStateObject.Volume.Data, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>[];
|
|
122
|
+
}>;
|
|
123
|
+
visuals: (plugin: PluginContext, data: {
|
|
124
|
+
volumes: StateObjectSelector<PluginStateObject.Volume.Data>[];
|
|
125
|
+
}) => Promise<StateObjectSelector<PluginStateObject.Volume.Representation3D, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>[]>;
|
|
126
|
+
};
|
|
113
127
|
export declare const BuiltInVolumeFormats: readonly [readonly ["ccp4", {
|
|
114
128
|
label: string;
|
|
115
129
|
description: string;
|
|
@@ -196,6 +210,19 @@ export declare const BuiltInVolumeFormats: readonly [readonly ["ccp4", {
|
|
|
196
210
|
visuals: (plugin: PluginContext, data: {
|
|
197
211
|
volumes: StateObjectSelector<PluginStateObject.Volume.Data>[];
|
|
198
212
|
}) => Promise<StateObjectSelector<PluginStateObject.Volume.Representation3D, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>[]>;
|
|
213
|
+
}], readonly ["segcif", {
|
|
214
|
+
label: string;
|
|
215
|
+
description: string;
|
|
216
|
+
category: string;
|
|
217
|
+
stringExtensions: string[];
|
|
218
|
+
binaryExtensions: string[];
|
|
219
|
+
isApplicable: (info: import("../../mol-util/file-info").FileInfo, data: string | Uint8Array) => boolean;
|
|
220
|
+
parse: (plugin: PluginContext, data: import("../../mol-state").StateObjectRef<PluginStateObject.Data.String | PluginStateObject.Data.Binary>) => Promise<{
|
|
221
|
+
volumes: StateObjectSelector<PluginStateObject.Volume.Data, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>[];
|
|
222
|
+
}>;
|
|
223
|
+
visuals: (plugin: PluginContext, data: {
|
|
224
|
+
volumes: StateObjectSelector<PluginStateObject.Volume.Data>[];
|
|
225
|
+
}) => Promise<StateObjectSelector<PluginStateObject.Volume.Representation3D, import("../../mol-state/transformer").StateTransformer<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, any>>[]>;
|
|
199
226
|
}]];
|
|
200
227
|
export type BuildInVolumeFormat = (typeof BuiltInVolumeFormats)[number][0];
|
|
201
228
|
export {};
|
|
@@ -315,10 +315,74 @@ export var DscifProvider = DataFormatProvider({
|
|
|
315
315
|
});
|
|
316
316
|
}); }
|
|
317
317
|
});
|
|
318
|
+
export var SegcifProvider = DataFormatProvider({
|
|
319
|
+
label: 'Segmentation CIF',
|
|
320
|
+
description: 'Segmentation CIF',
|
|
321
|
+
category: VolumeFormatCategory,
|
|
322
|
+
stringExtensions: ['cif'],
|
|
323
|
+
binaryExtensions: ['bcif'],
|
|
324
|
+
isApplicable: function (info, data) {
|
|
325
|
+
return guessCifVariant(info, data) === 'segcif' ? true : false;
|
|
326
|
+
},
|
|
327
|
+
parse: function (plugin, data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
328
|
+
var cifCell, b, blocks, volumes, _i, blocks_2, block;
|
|
329
|
+
var _a;
|
|
330
|
+
return __generator(this, function (_b) {
|
|
331
|
+
switch (_b.label) {
|
|
332
|
+
case 0: return [4 /*yield*/, plugin.build().to(data).apply(StateTransforms.Data.ParseCif).commit()];
|
|
333
|
+
case 1:
|
|
334
|
+
cifCell = _b.sent();
|
|
335
|
+
b = plugin.build().to(cifCell);
|
|
336
|
+
blocks = cifCell.obj.data.blocks;
|
|
337
|
+
if (blocks.length === 0)
|
|
338
|
+
throw new Error('no data blocks');
|
|
339
|
+
volumes = [];
|
|
340
|
+
for (_i = 0, blocks_2 = blocks; _i < blocks_2.length; _i++) {
|
|
341
|
+
block = blocks_2[_i];
|
|
342
|
+
// Skip "server" data block.
|
|
343
|
+
if (block.header.toUpperCase() === 'SERVER')
|
|
344
|
+
continue;
|
|
345
|
+
if (((_a = block.categories['volume_data_3d_info']) === null || _a === void 0 ? void 0 : _a.rowCount) > 0) {
|
|
346
|
+
volumes.push(b.apply(StateTransforms.Volume.VolumeFromSegmentationCif, { blockHeader: block.header }).selector);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
return [4 /*yield*/, b.commit()];
|
|
350
|
+
case 2:
|
|
351
|
+
_b.sent();
|
|
352
|
+
return [2 /*return*/, { volumes: volumes }];
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
}); },
|
|
356
|
+
visuals: function (plugin, data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
357
|
+
var volumes, tree, visuals, segmentation;
|
|
358
|
+
return __generator(this, function (_a) {
|
|
359
|
+
switch (_a.label) {
|
|
360
|
+
case 0:
|
|
361
|
+
volumes = data.volumes;
|
|
362
|
+
tree = plugin.build();
|
|
363
|
+
visuals = [];
|
|
364
|
+
if (volumes.length > 0) {
|
|
365
|
+
segmentation = Volume.Segmentation.get(volumes[0].data);
|
|
366
|
+
if (segmentation) {
|
|
367
|
+
visuals[visuals.length] = tree
|
|
368
|
+
.to(volumes[0])
|
|
369
|
+
.apply(StateTransforms.Representation.VolumeRepresentation3D, VolumeRepresentation3DHelpers.getDefaultParams(plugin, 'segment', volumes[0].data, { alpha: 1, instanceGranularity: true }, 'volume-segment', {}))
|
|
370
|
+
.selector;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
return [4 /*yield*/, tree.commit()];
|
|
374
|
+
case 1:
|
|
375
|
+
_a.sent();
|
|
376
|
+
return [2 /*return*/, visuals];
|
|
377
|
+
}
|
|
378
|
+
});
|
|
379
|
+
}); }
|
|
380
|
+
});
|
|
318
381
|
export var BuiltInVolumeFormats = [
|
|
319
382
|
['ccp4', Ccp4Provider],
|
|
320
383
|
['dsn6', Dsn6Provider],
|
|
321
384
|
['cube', CubeProvider],
|
|
322
385
|
['dx', DxProvider],
|
|
323
386
|
['dscif', DscifProvider],
|
|
387
|
+
['segcif', SegcifProvider],
|
|
324
388
|
];
|
|
@@ -58,7 +58,7 @@ declare class StructureComponentManager extends StatefulPluginComponent<Structur
|
|
|
58
58
|
}
|
|
59
59
|
declare namespace StructureComponentManager {
|
|
60
60
|
const OptionsParams: {
|
|
61
|
-
|
|
61
|
+
hydrogens: PD.Select<"all" | "hide-all" | "only-polar">;
|
|
62
62
|
visualQuality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
|
|
63
63
|
ignoreLight: PD.BooleanParam;
|
|
64
64
|
materialStyle: PD.Group<PD.Normalize<{
|