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
|
@@ -148,9 +148,38 @@ var Volume;
|
|
|
148
148
|
Isosurface.areLociEqual = areLociEqual;
|
|
149
149
|
function isLociEmpty(loci) { return loci.volume.grid.cells.data.length === 0; }
|
|
150
150
|
Isosurface.isLociEmpty = isLociEmpty;
|
|
151
|
+
var bbox = (0, geometry_1.Box3D)();
|
|
151
152
|
function getBoundingSphere(volume, isoValue, boundingSphere) {
|
|
152
|
-
|
|
153
|
-
|
|
153
|
+
var value = Volume.IsoValue.toAbsolute(isoValue, volume.grid.stats).absoluteValue;
|
|
154
|
+
var neg = value < 0;
|
|
155
|
+
var c = [0, 0, 0];
|
|
156
|
+
var getCoords = volume.grid.cells.space.getCoords;
|
|
157
|
+
var d = volume.grid.cells.data;
|
|
158
|
+
var _a = volume.grid.cells.space.dimensions, xn = _a[0], yn = _a[1], zn = _a[2];
|
|
159
|
+
var minx = xn - 1, miny = yn - 1, minz = zn - 1;
|
|
160
|
+
var maxx = 0, maxy = 0, maxz = 0;
|
|
161
|
+
for (var i = 0, il = d.length; i < il; ++i) {
|
|
162
|
+
if ((neg && d[i] <= value) || (!neg && d[i] >= value)) {
|
|
163
|
+
getCoords(i, c);
|
|
164
|
+
if (c[0] < minx)
|
|
165
|
+
minx = c[0];
|
|
166
|
+
if (c[1] < miny)
|
|
167
|
+
miny = c[1];
|
|
168
|
+
if (c[2] < minz)
|
|
169
|
+
minz = c[2];
|
|
170
|
+
if (c[0] > maxx)
|
|
171
|
+
maxx = c[0];
|
|
172
|
+
if (c[1] > maxy)
|
|
173
|
+
maxy = c[1];
|
|
174
|
+
if (c[2] > maxz)
|
|
175
|
+
maxz = c[2];
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
linear_algebra_1.Vec3.set(bbox.min, minx - 1, miny - 1, minz - 1);
|
|
179
|
+
linear_algebra_1.Vec3.set(bbox.max, maxx + 1, maxy + 1, maxz + 1);
|
|
180
|
+
var transform = grid_1.Grid.getGridToCartesianTransform(volume.grid);
|
|
181
|
+
geometry_1.Box3D.transform(bbox, bbox, transform);
|
|
182
|
+
return geometry_1.Sphere3D.fromBox3D(boundingSphere || (0, geometry_1.Sphere3D)(), bbox);
|
|
154
183
|
}
|
|
155
184
|
Isosurface.getBoundingSphere = getBoundingSphere;
|
|
156
185
|
})(Isosurface = Volume.Isosurface || (Volume.Isosurface = {}));
|
|
@@ -188,6 +217,44 @@ var Volume;
|
|
|
188
217
|
}
|
|
189
218
|
Cell.getBoundingSphere = getBoundingSphere;
|
|
190
219
|
})(Cell = Volume.Cell || (Volume.Cell = {}));
|
|
220
|
+
var Segment;
|
|
221
|
+
(function (Segment) {
|
|
222
|
+
function Loci(volume, segments) { return { kind: 'segment-loci', volume: volume, segments: int_1.SortedArray.ofUnsortedArray(segments) }; }
|
|
223
|
+
Segment.Loci = Loci;
|
|
224
|
+
function isLoci(x) { return !!x && x.kind === 'segment-loci'; }
|
|
225
|
+
Segment.isLoci = isLoci;
|
|
226
|
+
function areLociEqual(a, b) { return a.volume === b.volume && int_1.SortedArray.areEqual(a.segments, b.segments); }
|
|
227
|
+
Segment.areLociEqual = areLociEqual;
|
|
228
|
+
function isLociEmpty(loci) { return loci.volume.grid.cells.data.length === 0 || loci.segments.length === 0; }
|
|
229
|
+
Segment.isLociEmpty = isLociEmpty;
|
|
230
|
+
var bbox = (0, geometry_1.Box3D)();
|
|
231
|
+
function getBoundingSphere(volume, segments, boundingSphere) {
|
|
232
|
+
var segmentation = Volume.Segmentation.get(volume);
|
|
233
|
+
if (segmentation) {
|
|
234
|
+
geometry_1.Box3D.setEmpty(bbox);
|
|
235
|
+
for (var i = 0, il = segments.length; i < il; ++i) {
|
|
236
|
+
var b = segmentation.bounds[segments[i]];
|
|
237
|
+
geometry_1.Box3D.add(bbox, b.min);
|
|
238
|
+
geometry_1.Box3D.add(bbox, b.max);
|
|
239
|
+
}
|
|
240
|
+
var transform = grid_1.Grid.getGridToCartesianTransform(volume.grid);
|
|
241
|
+
geometry_1.Box3D.transform(bbox, bbox, transform);
|
|
242
|
+
return geometry_1.Sphere3D.fromBox3D(boundingSphere || (0, geometry_1.Sphere3D)(), bbox);
|
|
243
|
+
}
|
|
244
|
+
else {
|
|
245
|
+
return Volume.getBoundingSphere(volume, boundingSphere);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
Segment.getBoundingSphere = getBoundingSphere;
|
|
249
|
+
function Location(volume, segment) {
|
|
250
|
+
return { kind: 'segment-location', volume: volume, segment: segment };
|
|
251
|
+
}
|
|
252
|
+
Segment.Location = Location;
|
|
253
|
+
function isLocation(x) {
|
|
254
|
+
return !!x && x.kind === 'segment-location';
|
|
255
|
+
}
|
|
256
|
+
Segment.isLocation = isLocation;
|
|
257
|
+
})(Segment = Volume.Segment || (Volume.Segment = {}));
|
|
191
258
|
Volume.PickingGranularity = {
|
|
192
259
|
set: function (volume, granularity) {
|
|
193
260
|
volume._propertyData['__picking_granularity__'] = granularity;
|
|
@@ -197,4 +264,12 @@ var Volume;
|
|
|
197
264
|
return (_a = volume._propertyData['__picking_granularity__']) !== null && _a !== void 0 ? _a : 'voxel';
|
|
198
265
|
}
|
|
199
266
|
};
|
|
267
|
+
Volume.Segmentation = {
|
|
268
|
+
set: function (volume, segmentation) {
|
|
269
|
+
volume._propertyData['__segmentation__'] = segmentation;
|
|
270
|
+
},
|
|
271
|
+
get: function (volume) {
|
|
272
|
+
return volume._propertyData['__segmentation__'];
|
|
273
|
+
}
|
|
274
|
+
};
|
|
200
275
|
})(Volume = exports.Volume || (exports.Volume = {}));
|
|
@@ -0,0 +1,23 @@
|
|
|
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 { Volume } from '../../mol-model/volume';
|
|
8
|
+
import { Task } from '../../mol-task';
|
|
9
|
+
import { ModelFormat } from '../format';
|
|
10
|
+
import { Segmentation_Data_Database } from '../../mol-io/reader/cif/schema/segmentation';
|
|
11
|
+
export declare function volumeFromSegmentationData(source: Segmentation_Data_Database, params?: Partial<{
|
|
12
|
+
label: string;
|
|
13
|
+
segmentLabels: {
|
|
14
|
+
[id: number]: string;
|
|
15
|
+
};
|
|
16
|
+
ownerId: string;
|
|
17
|
+
}>): Task<Volume>;
|
|
18
|
+
export { SegcifFormat };
|
|
19
|
+
type SegcifFormat = ModelFormat<Segmentation_Data_Database>;
|
|
20
|
+
declare namespace SegcifFormat {
|
|
21
|
+
function is(x?: ModelFormat): x is SegcifFormat;
|
|
22
|
+
function create(segcif: Segmentation_Data_Database): SegcifFormat;
|
|
23
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
|
+
*
|
|
5
|
+
* @author David Sehnal <david.sehnal@gmail.com>
|
|
6
|
+
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.SegcifFormat = exports.volumeFromSegmentationData = void 0;
|
|
10
|
+
var tslib_1 = require("tslib");
|
|
11
|
+
var volume_1 = require("../../mol-model/volume");
|
|
12
|
+
var mol_task_1 = require("../../mol-task");
|
|
13
|
+
var geometry_1 = require("../../mol-math/geometry");
|
|
14
|
+
var linear_algebra_1 = require("../../mol-math/linear-algebra");
|
|
15
|
+
var custom_property_1 = require("../../mol-model/custom-property");
|
|
16
|
+
var object_1 = require("../../mol-util/object");
|
|
17
|
+
function volumeFromSegmentationData(source, params) {
|
|
18
|
+
var _this = this;
|
|
19
|
+
return mol_task_1.Task.create('Create Segmentation Volume', function (ctx) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
20
|
+
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;
|
|
21
|
+
var _c;
|
|
22
|
+
return tslib_1.__generator(this, function (_d) {
|
|
23
|
+
info = source.volume_data_3d_info, values = source.segmentation_data_3d;
|
|
24
|
+
cell = geometry_1.SpacegroupCell.create(info.spacegroup_number.value(0), linear_algebra_1.Vec3.ofArray(info.spacegroup_cell_size.value(0)), linear_algebra_1.Vec3.scale((0, linear_algebra_1.Vec3)(), linear_algebra_1.Vec3.ofArray(info.spacegroup_cell_angles.value(0)), Math.PI / 180));
|
|
25
|
+
axis_order_fast_to_slow = info.axis_order.value(0);
|
|
26
|
+
normalizeOrder = linear_algebra_1.Tensor.convertToCanonicalAxisIndicesFastToSlow(axis_order_fast_to_slow);
|
|
27
|
+
sample_count = normalizeOrder(info.sample_count.value(0));
|
|
28
|
+
tensorSpace = linear_algebra_1.Tensor.Space(sample_count, linear_algebra_1.Tensor.invertAxisOrder(axis_order_fast_to_slow), Float32Array);
|
|
29
|
+
t = linear_algebra_1.Tensor.create(tensorSpace, linear_algebra_1.Tensor.Data1(values.values.toArray({ array: Float32Array })));
|
|
30
|
+
origin = linear_algebra_1.Vec3.ofArray(normalizeOrder(info.origin.value(0)));
|
|
31
|
+
dimensions = linear_algebra_1.Vec3.ofArray(normalizeOrder(info.dimensions.value(0)));
|
|
32
|
+
v = {
|
|
33
|
+
label: params === null || params === void 0 ? void 0 : params.label,
|
|
34
|
+
entryId: undefined,
|
|
35
|
+
grid: {
|
|
36
|
+
transform: {
|
|
37
|
+
kind: 'spacegroup',
|
|
38
|
+
cell: cell,
|
|
39
|
+
fractionalBox: geometry_1.Box3D.create(origin, linear_algebra_1.Vec3.add((0, linear_algebra_1.Vec3)(), origin, dimensions))
|
|
40
|
+
},
|
|
41
|
+
cells: t,
|
|
42
|
+
stats: {
|
|
43
|
+
min: 0, max: 1, mean: 0, sigma: 1
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
sourceData: SegcifFormat.create(source),
|
|
47
|
+
customProperties: new custom_property_1.CustomProperties(),
|
|
48
|
+
_propertyData: { ownerId: params === null || params === void 0 ? void 0 : params.ownerId },
|
|
49
|
+
};
|
|
50
|
+
volume_1.Volume.PickingGranularity.set(v, 'object');
|
|
51
|
+
segments = new Map();
|
|
52
|
+
sets = new Map();
|
|
53
|
+
_a = source.segmentation_data_table, segment_id = _a.segment_id, set_id = _a.set_id;
|
|
54
|
+
for (i = 0, il = segment_id.rowCount; i < il; ++i) {
|
|
55
|
+
segment = segment_id.value(i);
|
|
56
|
+
set = set_id.value(i);
|
|
57
|
+
if (set === 0 || segment === 0)
|
|
58
|
+
continue;
|
|
59
|
+
if (!sets.has(set))
|
|
60
|
+
sets.set(set, new Set());
|
|
61
|
+
sets.get(set).add(segment);
|
|
62
|
+
}
|
|
63
|
+
sets.forEach(function (segs, set) {
|
|
64
|
+
segs.forEach(function (seg) {
|
|
65
|
+
if (!segments.has(seg))
|
|
66
|
+
segments.set(seg, new Set());
|
|
67
|
+
segments.get(seg).add(set);
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
c = [0, 0, 0];
|
|
71
|
+
getCoords = t.space.getCoords;
|
|
72
|
+
d = t.data;
|
|
73
|
+
_b = v.grid.cells.space.dimensions, xn = _b[0], yn = _b[1], zn = _b[2];
|
|
74
|
+
xn1 = xn - 1;
|
|
75
|
+
yn1 = yn - 1;
|
|
76
|
+
zn1 = zn - 1;
|
|
77
|
+
setBounds = {};
|
|
78
|
+
sets.forEach(function (v, k) {
|
|
79
|
+
setBounds[k] = [xn1, yn1, zn1, -1, -1, -1];
|
|
80
|
+
});
|
|
81
|
+
for (i = 0, il = d.length; i < il; ++i) {
|
|
82
|
+
v_1 = d[i];
|
|
83
|
+
if (v_1 === 0)
|
|
84
|
+
continue;
|
|
85
|
+
getCoords(i, c);
|
|
86
|
+
b = setBounds[v_1];
|
|
87
|
+
if (c[0] < b[0])
|
|
88
|
+
b[0] = c[0];
|
|
89
|
+
if (c[1] < b[1])
|
|
90
|
+
b[1] = c[1];
|
|
91
|
+
if (c[2] < b[2])
|
|
92
|
+
b[2] = c[2];
|
|
93
|
+
if (c[0] > b[3])
|
|
94
|
+
b[3] = c[0];
|
|
95
|
+
if (c[1] > b[4])
|
|
96
|
+
b[4] = c[1];
|
|
97
|
+
if (c[2] > b[5])
|
|
98
|
+
b[5] = c[2];
|
|
99
|
+
}
|
|
100
|
+
bounds = {};
|
|
101
|
+
segments.forEach(function (v, k) {
|
|
102
|
+
bounds[k] = geometry_1.Box3D.create(linear_algebra_1.Vec3.create(xn1, yn1, zn1), linear_algebra_1.Vec3.create(-1, -1, -1));
|
|
103
|
+
});
|
|
104
|
+
(0, object_1.objectForEach)(setBounds, function (b, s) {
|
|
105
|
+
sets.get(parseInt(s)).forEach(function (seg) {
|
|
106
|
+
var sb = bounds[seg];
|
|
107
|
+
if (b[0] < sb.min[0])
|
|
108
|
+
sb.min[0] = b[0];
|
|
109
|
+
if (b[1] < sb.min[1])
|
|
110
|
+
sb.min[1] = b[1];
|
|
111
|
+
if (b[2] < sb.min[2])
|
|
112
|
+
sb.min[2] = b[2];
|
|
113
|
+
if (b[3] > sb.max[0])
|
|
114
|
+
sb.max[0] = b[3];
|
|
115
|
+
if (b[4] > sb.max[1])
|
|
116
|
+
sb.max[1] = b[4];
|
|
117
|
+
if (b[5] > sb.max[2])
|
|
118
|
+
sb.max[2] = b[5];
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
volume_1.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 : {} });
|
|
122
|
+
return [2 /*return*/, v];
|
|
123
|
+
});
|
|
124
|
+
}); });
|
|
125
|
+
}
|
|
126
|
+
exports.volumeFromSegmentationData = volumeFromSegmentationData;
|
|
127
|
+
var SegcifFormat;
|
|
128
|
+
(function (SegcifFormat) {
|
|
129
|
+
function is(x) {
|
|
130
|
+
return (x === null || x === void 0 ? void 0 : x.kind) === 'segcif';
|
|
131
|
+
}
|
|
132
|
+
SegcifFormat.is = is;
|
|
133
|
+
function create(segcif) {
|
|
134
|
+
return { kind: 'segcif', name: segcif._name, data: segcif };
|
|
135
|
+
}
|
|
136
|
+
SegcifFormat.create = create;
|
|
137
|
+
})(SegcifFormat || (SegcifFormat = {}));
|
|
138
|
+
exports.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
|
}>>;
|
package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts
CHANGED
|
@@ -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;
|
package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js
CHANGED
|
@@ -52,6 +52,7 @@ var StructureFocusRepresentationParams = function (plugin) {
|
|
|
52
52
|
components: param_definition_1.ParamDefinition.MultiSelect(FocusComponents, param_definition_1.ParamDefinition.arrayToOptions(FocusComponents)),
|
|
53
53
|
excludeTargetFromSurroundings: param_definition_1.ParamDefinition.Boolean(false, { label: 'Exclude Target', description: 'Exclude the focus "target" from the surroudings component.' }),
|
|
54
54
|
ignoreHydrogens: param_definition_1.ParamDefinition.Boolean(false),
|
|
55
|
+
ignoreHydrogensVariant: param_definition_1.ParamDefinition.Select('all', param_definition_1.ParamDefinition.arrayToOptions(['all', 'non-polar'])),
|
|
55
56
|
ignoreLight: param_definition_1.ParamDefinition.Boolean(false),
|
|
56
57
|
material: material_1.Material.getParam(),
|
|
57
58
|
clip: param_definition_1.ParamDefinition.Group(clip_1.Clip.Params),
|
|
@@ -82,7 +83,7 @@ var StructureFocusRepresentationBehavior = /** @class */ (function (_super) {
|
|
|
82
83
|
StructureFocusRepresentationBehavior.prototype.getReprParams = function (reprParams) {
|
|
83
84
|
return tslib_1.__assign(tslib_1.__assign({}, reprParams), { type: {
|
|
84
85
|
name: reprParams.type.name,
|
|
85
|
-
params: tslib_1.__assign(tslib_1.__assign({}, reprParams.type.params), { ignoreHydrogens: this.params.ignoreHydrogens, ignoreLight: this.params.ignoreLight, material: this.params.material, clip: this.params.clip })
|
|
86
|
+
params: tslib_1.__assign(tslib_1.__assign({}, reprParams.type.params), { ignoreHydrogens: this.params.ignoreHydrogens, ignoreHydrogensVariant: this.params.ignoreHydrogensVariant, ignoreLight: this.params.ignoreLight, material: this.params.material, clip: this.params.clip })
|
|
86
87
|
} });
|
|
87
88
|
};
|
|
88
89
|
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;
|
|
@@ -132,6 +132,10 @@ exports.AnimateModelIndex = model_1.PluginStateAnimation.create({
|
|
|
132
132
|
var durationInMs = params.duration.name === 'fixed'
|
|
133
133
|
? params.duration.params.durationInS * 1000
|
|
134
134
|
: Math.ceil(1000 * traj.data.frameCount / params.duration.params.targetFps);
|
|
135
|
+
if (params.mode.name === 'once' && t.current >= durationInMs) {
|
|
136
|
+
isEnd = true;
|
|
137
|
+
return { modelIndex: traj.data.frameCount - 1 };
|
|
138
|
+
}
|
|
135
139
|
var phase = (t.current % durationInMs) / durationInMs;
|
|
136
140
|
if (params.mode.name === 'loop') {
|
|
137
141
|
if (params.mode.params.direction === 'backward') {
|
|
@@ -144,7 +148,6 @@ exports.AnimateModelIndex = model_1.PluginStateAnimation.create({
|
|
|
144
148
|
phase = 2 - phase;
|
|
145
149
|
}
|
|
146
150
|
var modelIndex = Math.min(Math.floor(traj.data.frameCount * phase), traj.data.frameCount - 1);
|
|
147
|
-
isEnd = isEnd || modelIndex === traj.data.frameCount - 1;
|
|
148
151
|
return { modelIndex: modelIndex };
|
|
149
152
|
}
|
|
150
153
|
});
|
|
@@ -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<{
|
|
@@ -26,6 +26,7 @@ exports.StructureRepresentationPresetProvider = StructureRepresentationPresetPro
|
|
|
26
26
|
(function (StructureRepresentationPresetProvider) {
|
|
27
27
|
StructureRepresentationPresetProvider.CommonParams = {
|
|
28
28
|
ignoreHydrogens: param_definition_1.ParamDefinition.Optional(param_definition_1.ParamDefinition.Boolean(false)),
|
|
29
|
+
ignoreHydrogensVariant: param_definition_1.ParamDefinition.Optional(param_definition_1.ParamDefinition.Select('all', param_definition_1.ParamDefinition.arrayToOptions(['all', 'non-polar']))),
|
|
29
30
|
ignoreLight: param_definition_1.ParamDefinition.Optional(param_definition_1.ParamDefinition.Boolean(false)),
|
|
30
31
|
quality: param_definition_1.ParamDefinition.Optional(param_definition_1.ParamDefinition.Select('auto', base_1.VisualQualityOptions)),
|
|
31
32
|
theme: param_definition_1.ParamDefinition.Optional(param_definition_1.ParamDefinition.Group({
|
|
@@ -54,15 +55,19 @@ exports.StructureRepresentationPresetProvider = StructureRepresentationPresetPro
|
|
|
54
55
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
55
56
|
var update = plugin.state.data.build();
|
|
56
57
|
var builder = plugin.builders.structure.representation;
|
|
58
|
+
var h = plugin.managers.structure.component.state.options.hydrogens;
|
|
57
59
|
var typeParams = {
|
|
58
60
|
quality: plugin.managers.structure.component.state.options.visualQuality,
|
|
59
|
-
ignoreHydrogens:
|
|
61
|
+
ignoreHydrogens: h !== 'all',
|
|
62
|
+
ignoreHydrogensVariant: (h === 'only-polar' ? 'non-polar' : 'all'),
|
|
60
63
|
ignoreLight: plugin.managers.structure.component.state.options.ignoreLight,
|
|
61
64
|
};
|
|
62
65
|
if (params.quality && params.quality !== 'auto')
|
|
63
66
|
typeParams.quality = params.quality;
|
|
64
67
|
if (params.ignoreHydrogens !== void 0)
|
|
65
68
|
typeParams.ignoreHydrogens = !!params.ignoreHydrogens;
|
|
69
|
+
if (params.ignoreHydrogensVariant !== void 0)
|
|
70
|
+
typeParams.ignoreHydrogensVariant = params.ignoreHydrogensVariant;
|
|
66
71
|
if (params.ignoreLight !== void 0)
|
|
67
72
|
typeParams.ignoreLight = !!params.ignoreLight;
|
|
68
73
|
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,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2019-
|
|
3
|
+
* Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
6
6
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
@@ -15,15 +15,23 @@ function guessCifVariant(info, data) {
|
|
|
15
15
|
try {
|
|
16
16
|
// TODO: find a way to run msgpackDecode only once
|
|
17
17
|
// now it is run twice, here and during file parsing
|
|
18
|
-
|
|
18
|
+
var encoder = (0, decode_1.decodeMsgPack)(data).encoder;
|
|
19
|
+
if (encoder.startsWith('VolumeServer'))
|
|
19
20
|
return 'dscif';
|
|
21
|
+
// TODO: assumes volseg-volume-server only serves segments
|
|
22
|
+
if (encoder.startsWith('volseg-volume-server'))
|
|
23
|
+
return 'segcif';
|
|
24
|
+
}
|
|
25
|
+
catch (e) {
|
|
26
|
+
console.error(e);
|
|
20
27
|
}
|
|
21
|
-
catch (_a) { }
|
|
22
28
|
}
|
|
23
29
|
else if (info.ext === 'cif') {
|
|
24
30
|
var str = data;
|
|
25
31
|
if (str.startsWith('data_SERVER\n#\n_density_server_result'))
|
|
26
32
|
return 'dscif';
|
|
33
|
+
if (str.startsWith('data_SERVER\n#\ndata_SEGMENTATION_DATA'))
|
|
34
|
+
return 'segcif';
|
|
27
35
|
if (str.includes('atom_site_fract_x') || str.includes('atom_site.fract_x'))
|
|
28
36
|
return 'coreCif';
|
|
29
37
|
}
|
|
@@ -112,15 +112,16 @@ var DataFormatRegistry = /** @class */ (function () {
|
|
|
112
112
|
this._map.delete(name);
|
|
113
113
|
};
|
|
114
114
|
DataFormatRegistry.prototype.auto = function (info, dataStateObject) {
|
|
115
|
+
var _a, _b;
|
|
115
116
|
for (var i = 0, il = this.list.length; i < il; ++i) {
|
|
116
|
-
var
|
|
117
|
+
var p = this._list[i].provider;
|
|
117
118
|
var hasExt = false;
|
|
118
|
-
if (
|
|
119
|
+
if ((_a = p.binaryExtensions) === null || _a === void 0 ? void 0 : _a.includes(info.ext))
|
|
119
120
|
hasExt = true;
|
|
120
|
-
else if (
|
|
121
|
+
else if ((_b = p.stringExtensions) === null || _b === void 0 ? void 0 : _b.includes(info.ext))
|
|
121
122
|
hasExt = true;
|
|
122
|
-
if (hasExt && (!
|
|
123
|
-
return
|
|
123
|
+
if (hasExt && (!p.isApplicable || p.isApplicable(info, dataStateObject.data)))
|
|
124
|
+
return p;
|
|
124
125
|
}
|
|
125
126
|
return;
|
|
126
127
|
};
|