molstar 3.0.0-dev.2 → 3.0.0-dev.6
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 +187 -187
- package/build/viewer/embedded.html +43 -43
- package/build/viewer/index.html +102 -94
- package/build/viewer/molstar.css +1 -1
- package/build/viewer/molstar.js +1 -1
- package/lib/apps/docking-viewer/index.d.ts +2 -1
- package/lib/apps/docking-viewer/index.html +36 -36
- package/lib/apps/docking-viewer/index.js +87 -74
- package/lib/apps/docking-viewer/viewport.js +2 -1
- package/lib/apps/viewer/embedded.html +43 -43
- package/lib/apps/viewer/index.d.ts +36 -215
- package/lib/apps/viewer/index.html +102 -94
- package/lib/apps/viewer/index.js +139 -52
- package/lib/cli/cifschema/index.d.ts +1 -1
- package/lib/cli/cifschema/index.js +15 -35
- package/lib/commonjs/apps/docking-viewer/index.d.ts +2 -1
- package/lib/commonjs/apps/docking-viewer/index.js +86 -73
- package/lib/commonjs/apps/docking-viewer/viewport.js +2 -1
- package/lib/commonjs/apps/viewer/index.d.ts +36 -215
- package/lib/commonjs/apps/viewer/index.js +139 -52
- package/lib/commonjs/cli/cifschema/index.d.ts +1 -1
- package/lib/commonjs/cli/cifschema/index.js +15 -35
- package/lib/commonjs/examples/alpha-orbitals/index.js +2 -3
- package/lib/commonjs/examples/basic-wrapper/index.js +23 -11
- package/lib/commonjs/examples/lighting/index.d.ts +1 -1
- package/lib/commonjs/examples/lighting/index.js +58 -41
- package/lib/commonjs/examples/proteopedia-wrapper/index.js +26 -14
- package/lib/commonjs/extensions/alpha-orbitals/transforms.d.ts +0 -1
- package/lib/commonjs/extensions/alpha-orbitals/transforms.js +1 -14
- package/lib/commonjs/extensions/anvil/behavior.d.ts +3 -0
- package/lib/commonjs/extensions/anvil/representation.d.ts +13 -0
- package/lib/commonjs/extensions/cellpack/representation.d.ts +3 -0
- package/lib/commonjs/extensions/dnatco/confal-pyramids/representation.d.ts +9 -0
- package/lib/commonjs/extensions/geo-export/obj-exporter.js +1 -1
- package/lib/commonjs/extensions/geo-export/usdz-exporter.js +1 -1
- package/lib/commonjs/extensions/model-archive/quality-assessment/behavior.d.ts +68 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/behavior.js +236 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/color/plddt.d.ts +14 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/color/plddt.js +125 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/color/qmean.d.ts +12 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/color/qmean.js +111 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/prop.d.ts +28 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/prop.js +130 -0
- package/lib/commonjs/extensions/mp4-export/controls.d.ts +1 -0
- package/lib/commonjs/extensions/mp4-export/controls.js +9 -7
- package/lib/commonjs/extensions/pdbe/structure-quality-report/prop.js +1 -1
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/behavior.d.ts +3 -0
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/prop.js +1 -1
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/representation.d.ts +3 -0
- package/lib/commonjs/extensions/rcsb/validation-report/prop.js +1 -1
- package/lib/commonjs/extensions/rcsb/validation-report/representation.d.ts +15 -0
- package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +6 -0
- package/lib/commonjs/mol-canvas3d/canvas3d.js +10 -3
- package/lib/commonjs/mol-canvas3d/helper/camera-helper.d.ts +3 -0
- package/lib/commonjs/mol-canvas3d/helper/handle-helper.d.ts +3 -0
- package/lib/commonjs/mol-canvas3d/helper/helper.d.ts +4 -0
- package/lib/commonjs/mol-canvas3d/passes/image.d.ts +3 -0
- package/lib/commonjs/mol-canvas3d/passes/multi-sample.d.ts +2 -1
- package/lib/commonjs/mol-canvas3d/passes/multi-sample.js +4 -2
- package/lib/commonjs/mol-canvas3d/passes/postprocessing.d.ts +1 -0
- package/lib/commonjs/mol-canvas3d/passes/postprocessing.js +4 -2
- package/lib/commonjs/mol-geo/geometry/base.d.ts +2 -0
- package/lib/commonjs/mol-geo/geometry/base.js +2 -0
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +4 -1
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.js +4 -2
- package/lib/commonjs/mol-geo/geometry/direct-volume/direct-volume.d.ts +1 -0
- package/lib/commonjs/mol-geo/geometry/image/image.d.ts +1 -0
- package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +2 -0
- package/lib/commonjs/mol-geo/geometry/mesh/color-smoothing.js +1 -1
- package/lib/commonjs/mol-geo/geometry/mesh/mesh.d.ts +3 -0
- package/lib/commonjs/mol-geo/geometry/mesh/mesh.js +4 -2
- package/lib/commonjs/mol-geo/geometry/points/points.d.ts +1 -0
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.d.ts +3 -0
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.js +4 -2
- package/lib/commonjs/mol-geo/geometry/substance-data.js +3 -3
- package/lib/commonjs/mol-geo/geometry/text/text.d.ts +1 -0
- package/lib/commonjs/mol-geo/geometry/texture-mesh/color-smoothing.js +3 -3
- package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +3 -0
- package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.js +4 -2
- package/lib/commonjs/mol-gl/renderable/cylinders.d.ts +31 -28
- package/lib/commonjs/mol-gl/renderable/cylinders.js +2 -2
- package/lib/commonjs/mol-gl/renderable/direct-volume.d.ts +1 -0
- package/lib/commonjs/mol-gl/renderable/image.d.ts +1 -0
- package/lib/commonjs/mol-gl/renderable/lines.d.ts +1 -0
- package/lib/commonjs/mol-gl/renderable/mesh.d.ts +28 -25
- package/lib/commonjs/mol-gl/renderable/mesh.js +2 -2
- package/lib/commonjs/mol-gl/renderable/points.d.ts +1 -0
- package/lib/commonjs/mol-gl/renderable/schema.d.ts +1 -0
- package/lib/commonjs/mol-gl/renderable/schema.js +3 -3
- package/lib/commonjs/mol-gl/renderable/spheres.d.ts +31 -28
- package/lib/commonjs/mol-gl/renderable/spheres.js +2 -2
- package/lib/commonjs/mol-gl/renderable/text.d.ts +1 -0
- package/lib/commonjs/mol-gl/renderable/texture-mesh.d.ts +3 -0
- package/lib/commonjs/mol-gl/renderable/texture-mesh.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/assign-color-varying.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-color-varying.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-material-color.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-material-color.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/color-frag-params.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/color-frag-params.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/color-vert-params.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/color-vert-params.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common-frag-params.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common-frag-params.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/light-frag-params.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/light-frag-params.glsl.js +1 -1
- 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/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/mesh.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/mesh.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-io/reader/cif/schema/mmcif.d.ts +326 -1
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif.js +326 -1
- package/lib/commonjs/mol-math/geometry/symmetry-operator.js +3 -2
- package/lib/commonjs/mol-model/structure/model/model.d.ts +1 -0
- package/lib/commonjs/mol-model/structure/model/model.js +15 -5
- package/lib/commonjs/mol-model/structure/model/properties/atomic/hierarchy.d.ts +6 -1
- package/lib/commonjs/mol-model/structure/model/properties/atomic/hierarchy.js +1 -1
- package/lib/commonjs/mol-model/structure/model/properties/utils/atomic-derived.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/model/properties/utils/atomic-derived.js +4 -1
- package/lib/commonjs/mol-model/structure/model/properties/utils/atomic-index.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/model/properties/utils/atomic-index.js +12 -1
- package/lib/commonjs/mol-model/structure/model/types.js +9 -0
- package/lib/commonjs/mol-model/structure/structure/unit/rings.js +2 -0
- package/lib/commonjs/mol-model-formats/shape/ply.d.ts +6 -0
- package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +3 -0
- package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +3 -0
- package/lib/commonjs/mol-model-props/computed/representations/interactions.d.ts +9 -0
- package/lib/commonjs/mol-model-props/integrative/cross-link-restraint/representation.d.ts +12 -0
- package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +1 -0
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +3 -2
- package/lib/commonjs/mol-plugin/commands.d.ts +3 -0
- package/lib/commonjs/mol-plugin/config.d.ts +2 -0
- package/lib/commonjs/mol-plugin/config.js +10 -3
- package/lib/commonjs/mol-plugin/util/viewport-screenshot.d.ts +9 -0
- package/lib/commonjs/mol-plugin-state/actions/structure.d.ts +7 -1
- package/lib/commonjs/mol-plugin-state/actions/structure.js +150 -72
- package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +5 -355
- package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy-preset.js +13 -8
- package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy.d.ts +1 -71
- package/lib/commonjs/mol-plugin-state/helpers/structure-selection-query.js +33 -19
- package/lib/commonjs/mol-plugin-state/manager/structure/component.d.ts +2 -0
- package/lib/commonjs/mol-plugin-state/manager/structure/component.js +1 -1
- package/lib/commonjs/mol-plugin-state/transforms/representation.d.ts +22 -0
- package/lib/commonjs/mol-plugin-ui/controls/parameters.d.ts +3 -2
- package/lib/commonjs/mol-plugin-ui/controls/parameters.js +11 -6
- package/lib/commonjs/mol-plugin-ui/hooks/use-behavior.d.ts +1 -1
- package/lib/commonjs/mol-plugin-ui/hooks/use-behavior.js +8 -17
- package/lib/commonjs/mol-plugin-ui/index.d.ts +4 -4
- package/lib/commonjs/mol-plugin-ui/index.js +13 -16
- package/lib/commonjs/mol-plugin-ui/plugin.d.ts +1 -1
- package/lib/commonjs/mol-plugin-ui/plugin.js +76 -10
- package/lib/commonjs/mol-repr/shape/loci/angle.d.ts +3 -0
- package/lib/commonjs/mol-repr/shape/loci/common.d.ts +1 -0
- package/lib/commonjs/mol-repr/shape/loci/dihedral.d.ts +3 -0
- package/lib/commonjs/mol-repr/shape/loci/distance.d.ts +1 -0
- package/lib/commonjs/mol-repr/shape/loci/label.d.ts +1 -0
- package/lib/commonjs/mol-repr/shape/loci/orientation.d.ts +3 -0
- package/lib/commonjs/mol-repr/shape/loci/plane.d.ts +3 -0
- package/lib/commonjs/mol-repr/shape/model/unitcell.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/complex-visual.d.ts +12 -0
- package/lib/commonjs/mol-repr/structure/params.d.ts +16 -0
- package/lib/commonjs/mol-repr/structure/registry.d.ts +35 -1
- package/lib/commonjs/mol-repr/structure/representation/backbone.d.ts +9 -0
- package/lib/commonjs/mol-repr/structure/representation/backbone.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.d.ts +9 -0
- package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/carbohydrate.d.ts +9 -0
- package/lib/commonjs/mol-repr/structure/representation/carbohydrate.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/cartoon.d.ts +9 -0
- package/lib/commonjs/mol-repr/structure/representation/cartoon.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/ellipsoid.d.ts +9 -0
- package/lib/commonjs/mol-repr/structure/representation/ellipsoid.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.d.ts +9 -0
- package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/gaussian-volume.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/label.d.ts +6 -3
- package/lib/commonjs/mol-repr/structure/representation/line.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/molecular-surface.d.ts +9 -0
- package/lib/commonjs/mol-repr/structure/representation/molecular-surface.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/orientation.d.ts +9 -0
- package/lib/commonjs/mol-repr/structure/representation/orientation.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/point.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/putty.d.ts +9 -0
- package/lib/commonjs/mol-repr/structure/representation/putty.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/spacefill.d.ts +9 -0
- package/lib/commonjs/mol-repr/structure/representation/spacefill.js +2 -1
- package/lib/commonjs/mol-repr/structure/units-visual.d.ts +16 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +6 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-line.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +6 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.js +2 -2
- 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 +2 -2
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/visual/element-cross.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/element-point.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/element-sphere.d.ts +6 -0
- package/lib/commonjs/mol-repr/structure/visual/ellipsoid-mesh.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-density-volume.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +12 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/label-text.d.ts +3 -2
- package/lib/commonjs/mol-repr/structure/visual/label-text.js +2 -2
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +6 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +6 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-direction-wedge.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-trace-mesh.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-trace-mesh.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-tube-mesh.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/visual/util/bond.js +1 -1
- package/lib/commonjs/mol-repr/volume/direct-volume.d.ts +3 -0
- package/lib/commonjs/mol-repr/volume/isosurface.d.ts +16 -0
- package/lib/commonjs/mol-repr/volume/isosurface.js +2 -1
- package/lib/commonjs/mol-repr/volume/registry.d.ts +5 -0
- package/lib/commonjs/mol-repr/volume/representation.d.ts +1 -0
- package/lib/commonjs/mol-repr/volume/slice.d.ts +3 -0
- package/lib/commonjs/mol-script/language/builder.d.ts +0 -1
- package/lib/commonjs/mol-theme/color/illustrative.d.ts +2 -0
- package/lib/commonjs/mol-theme/color/illustrative.js +2 -2
- package/lib/commonjs/mol-theme/color.d.ts +1 -0
- package/lib/commonjs/mol-util/material.d.ts +5 -1
- package/lib/commonjs/mol-util/material.js +9 -7
- package/lib/examples/alpha-orbitals/index.html +61 -60
- package/lib/examples/alpha-orbitals/index.js +3 -4
- package/lib/examples/basic-wrapper/index.html +137 -136
- package/lib/examples/basic-wrapper/index.js +24 -12
- package/lib/examples/lighting/index.d.ts +1 -1
- package/lib/examples/lighting/index.html +88 -86
- package/lib/examples/lighting/index.js +59 -42
- package/lib/examples/proteopedia-wrapper/index.html +236 -235
- package/lib/examples/proteopedia-wrapper/index.js +27 -15
- package/lib/extensions/alpha-orbitals/transforms.d.ts +0 -1
- package/lib/extensions/alpha-orbitals/transforms.js +1 -14
- package/lib/extensions/anvil/behavior.d.ts +3 -0
- package/lib/extensions/anvil/representation.d.ts +13 -0
- package/lib/extensions/cellpack/representation.d.ts +3 -0
- package/lib/extensions/dnatco/confal-pyramids/representation.d.ts +9 -0
- package/lib/extensions/geo-export/obj-exporter.js +1 -1
- package/lib/extensions/geo-export/usdz-exporter.js +1 -1
- package/lib/extensions/model-archive/quality-assessment/behavior.d.ts +68 -0
- package/lib/extensions/model-archive/quality-assessment/behavior.js +233 -0
- package/lib/extensions/model-archive/quality-assessment/color/plddt.d.ts +14 -0
- package/lib/extensions/model-archive/quality-assessment/color/plddt.js +120 -0
- package/lib/extensions/model-archive/quality-assessment/color/qmean.d.ts +12 -0
- package/lib/extensions/model-archive/quality-assessment/color/qmean.js +106 -0
- package/lib/extensions/model-archive/quality-assessment/prop.d.ts +28 -0
- package/lib/extensions/model-archive/quality-assessment/prop.js +127 -0
- package/lib/extensions/mp4-export/controls.d.ts +1 -0
- package/lib/extensions/mp4-export/controls.js +9 -7
- package/lib/extensions/pdbe/structure-quality-report/prop.js +1 -1
- package/lib/extensions/rcsb/assembly-symmetry/behavior.d.ts +3 -0
- package/lib/extensions/rcsb/assembly-symmetry/prop.js +1 -1
- package/lib/extensions/rcsb/assembly-symmetry/representation.d.ts +3 -0
- package/lib/extensions/rcsb/validation-report/prop.js +1 -1
- package/lib/extensions/rcsb/validation-report/representation.d.ts +15 -0
- package/lib/mol-canvas3d/canvas3d.d.ts +6 -0
- package/lib/mol-canvas3d/canvas3d.js +10 -3
- package/lib/mol-canvas3d/helper/camera-helper.d.ts +3 -0
- package/lib/mol-canvas3d/helper/handle-helper.d.ts +3 -0
- package/lib/mol-canvas3d/helper/helper.d.ts +4 -0
- package/lib/mol-canvas3d/passes/image.d.ts +3 -0
- package/lib/mol-canvas3d/passes/multi-sample.d.ts +2 -1
- package/lib/mol-canvas3d/passes/multi-sample.js +4 -2
- package/lib/mol-canvas3d/passes/postprocessing.d.ts +1 -0
- package/lib/mol-canvas3d/passes/postprocessing.js +4 -2
- package/lib/mol-geo/geometry/base.d.ts +2 -0
- package/lib/mol-geo/geometry/base.js +2 -0
- package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +4 -1
- package/lib/mol-geo/geometry/cylinders/cylinders.js +4 -2
- package/lib/mol-geo/geometry/direct-volume/direct-volume.d.ts +1 -0
- package/lib/mol-geo/geometry/image/image.d.ts +1 -0
- package/lib/mol-geo/geometry/lines/lines.d.ts +2 -0
- package/lib/mol-geo/geometry/mesh/color-smoothing.js +1 -1
- package/lib/mol-geo/geometry/mesh/mesh.d.ts +3 -0
- package/lib/mol-geo/geometry/mesh/mesh.js +4 -2
- package/lib/mol-geo/geometry/points/points.d.ts +1 -0
- package/lib/mol-geo/geometry/spheres/spheres.d.ts +3 -0
- package/lib/mol-geo/geometry/spheres/spheres.js +4 -2
- package/lib/mol-geo/geometry/substance-data.js +3 -3
- package/lib/mol-geo/geometry/text/text.d.ts +1 -0
- package/lib/mol-geo/geometry/texture-mesh/color-smoothing.js +3 -3
- package/lib/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +3 -0
- package/lib/mol-geo/geometry/texture-mesh/texture-mesh.js +4 -2
- package/lib/mol-gl/renderable/cylinders.d.ts +31 -28
- package/lib/mol-gl/renderable/cylinders.js +3 -3
- package/lib/mol-gl/renderable/direct-volume.d.ts +1 -0
- package/lib/mol-gl/renderable/image.d.ts +1 -0
- package/lib/mol-gl/renderable/lines.d.ts +1 -0
- package/lib/mol-gl/renderable/mesh.d.ts +28 -25
- package/lib/mol-gl/renderable/mesh.js +3 -3
- package/lib/mol-gl/renderable/points.d.ts +1 -0
- package/lib/mol-gl/renderable/schema.d.ts +1 -0
- package/lib/mol-gl/renderable/schema.js +3 -3
- package/lib/mol-gl/renderable/spheres.d.ts +31 -28
- package/lib/mol-gl/renderable/spheres.js +3 -3
- package/lib/mol-gl/renderable/text.d.ts +1 -0
- package/lib/mol-gl/renderable/texture-mesh.d.ts +3 -0
- package/lib/mol-gl/renderable/texture-mesh.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/assign-color-varying.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/assign-color-varying.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/assign-material-color.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/assign-material-color.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/color-frag-params.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/color-frag-params.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/color-vert-params.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/color-vert-params.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/common-frag-params.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/common-frag-params.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/common.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/common.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/light-frag-params.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/light-frag-params.glsl.js +1 -1
- 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/direct-volume.frag.d.ts +1 -1
- package/lib/mol-gl/shader/direct-volume.frag.js +1 -1
- package/lib/mol-gl/shader/mesh.frag.d.ts +1 -1
- package/lib/mol-gl/shader/mesh.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-io/reader/cif/schema/mmcif.d.ts +326 -1
- package/lib/mol-io/reader/cif/schema/mmcif.js +326 -1
- package/lib/mol-math/geometry/symmetry-operator.js +3 -2
- package/lib/mol-model/structure/model/model.d.ts +1 -0
- package/lib/mol-model/structure/model/model.js +15 -5
- package/lib/mol-model/structure/model/properties/atomic/hierarchy.d.ts +6 -1
- package/lib/mol-model/structure/model/properties/atomic/hierarchy.js +1 -1
- package/lib/mol-model/structure/model/properties/utils/atomic-derived.d.ts +1 -1
- package/lib/mol-model/structure/model/properties/utils/atomic-derived.js +5 -2
- package/lib/mol-model/structure/model/properties/utils/atomic-index.d.ts +1 -1
- package/lib/mol-model/structure/model/properties/utils/atomic-index.js +12 -1
- package/lib/mol-model/structure/model/types.js +9 -0
- package/lib/mol-model/structure/structure/unit/rings.js +2 -0
- package/lib/mol-model-formats/shape/ply.d.ts +6 -0
- package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +3 -0
- package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +3 -0
- package/lib/mol-model-props/computed/representations/interactions.d.ts +9 -0
- package/lib/mol-model-props/integrative/cross-link-restraint/representation.d.ts +12 -0
- package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +1 -0
- package/lib/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +3 -2
- package/lib/mol-plugin/commands.d.ts +3 -0
- package/lib/mol-plugin/config.d.ts +2 -0
- package/lib/mol-plugin/config.js +9 -3
- package/lib/mol-plugin/util/viewport-screenshot.d.ts +9 -0
- package/lib/mol-plugin/version.js +2 -2
- package/lib/mol-plugin-state/actions/structure.d.ts +7 -1
- package/lib/mol-plugin-state/actions/structure.js +150 -72
- package/lib/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +5 -355
- package/lib/mol-plugin-state/builder/structure/hierarchy-preset.js +14 -9
- package/lib/mol-plugin-state/builder/structure/hierarchy.d.ts +1 -71
- package/lib/mol-plugin-state/helpers/structure-selection-query.js +34 -20
- package/lib/mol-plugin-state/manager/structure/component.d.ts +2 -0
- package/lib/mol-plugin-state/manager/structure/component.js +2 -2
- package/lib/mol-plugin-state/transforms/representation.d.ts +22 -0
- package/lib/mol-plugin-ui/controls/parameters.d.ts +3 -2
- package/lib/mol-plugin-ui/controls/parameters.js +12 -7
- package/lib/mol-plugin-ui/hooks/use-behavior.d.ts +1 -1
- package/lib/mol-plugin-ui/hooks/use-behavior.js +9 -18
- package/lib/mol-plugin-ui/index.d.ts +4 -4
- package/lib/mol-plugin-ui/index.js +11 -13
- package/lib/mol-plugin-ui/plugin.d.ts +1 -1
- package/lib/mol-plugin-ui/plugin.js +76 -10
- 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 -616
- package/lib/mol-plugin-ui/skin/base/components/sequence.scss +125 -125
- package/lib/mol-plugin-ui/skin/base/components/slider.scss +165 -165
- package/lib/mol-plugin-ui/skin/base/components/tasks.scss +99 -99
- package/lib/mol-plugin-ui/skin/base/components/toast.scss +83 -83
- package/lib/mol-plugin-ui/skin/base/components/transformer.scss +163 -163
- package/lib/mol-plugin-ui/skin/base/components/viewport.scss +127 -127
- package/lib/mol-plugin-ui/skin/base/layout/common.scss +71 -71
- package/lib/mol-plugin-ui/skin/base/layout/controls-landscape.scss +89 -89
- package/lib/mol-plugin-ui/skin/base/layout/controls-outside.scss +98 -98
- package/lib/mol-plugin-ui/skin/base/layout/controls-portrait.scss +108 -108
- package/lib/mol-plugin-ui/skin/base/layout.scss +40 -40
- package/lib/mol-plugin-ui/skin/base/logo.scss +12 -12
- package/lib/mol-plugin-ui/skin/base/normalize.scss +209 -209
- package/lib/mol-plugin-ui/skin/base/ui.scss +40 -40
- package/lib/mol-plugin-ui/skin/base/variables.scss +85 -85
- package/lib/mol-plugin-ui/skin/blue.scss +1 -1
- package/lib/mol-plugin-ui/skin/colors/blue.scss +23 -23
- package/lib/mol-plugin-ui/skin/colors/dark.scss +23 -23
- package/lib/mol-plugin-ui/skin/colors/light.scss +29 -29
- package/lib/mol-plugin-ui/skin/dark.scss +1 -1
- package/lib/mol-plugin-ui/skin/light.scss +1 -1
- package/lib/mol-repr/shape/loci/angle.d.ts +3 -0
- package/lib/mol-repr/shape/loci/common.d.ts +1 -0
- package/lib/mol-repr/shape/loci/dihedral.d.ts +3 -0
- package/lib/mol-repr/shape/loci/distance.d.ts +1 -0
- package/lib/mol-repr/shape/loci/label.d.ts +1 -0
- package/lib/mol-repr/shape/loci/orientation.d.ts +3 -0
- package/lib/mol-repr/shape/loci/plane.d.ts +3 -0
- package/lib/mol-repr/shape/model/unitcell.d.ts +3 -0
- package/lib/mol-repr/structure/complex-visual.d.ts +12 -0
- package/lib/mol-repr/structure/params.d.ts +16 -0
- package/lib/mol-repr/structure/registry.d.ts +35 -1
- package/lib/mol-repr/structure/representation/backbone.d.ts +9 -0
- package/lib/mol-repr/structure/representation/backbone.js +2 -1
- package/lib/mol-repr/structure/representation/ball-and-stick.d.ts +9 -0
- package/lib/mol-repr/structure/representation/ball-and-stick.js +2 -1
- package/lib/mol-repr/structure/representation/carbohydrate.d.ts +9 -0
- package/lib/mol-repr/structure/representation/carbohydrate.js +2 -1
- package/lib/mol-repr/structure/representation/cartoon.d.ts +9 -0
- package/lib/mol-repr/structure/representation/cartoon.js +2 -1
- package/lib/mol-repr/structure/representation/ellipsoid.d.ts +9 -0
- package/lib/mol-repr/structure/representation/ellipsoid.js +2 -1
- package/lib/mol-repr/structure/representation/gaussian-surface.d.ts +9 -0
- package/lib/mol-repr/structure/representation/gaussian-surface.js +2 -1
- package/lib/mol-repr/structure/representation/gaussian-volume.d.ts +3 -0
- package/lib/mol-repr/structure/representation/label.d.ts +6 -3
- package/lib/mol-repr/structure/representation/line.d.ts +3 -0
- package/lib/mol-repr/structure/representation/molecular-surface.d.ts +9 -0
- package/lib/mol-repr/structure/representation/molecular-surface.js +2 -1
- package/lib/mol-repr/structure/representation/orientation.d.ts +9 -0
- package/lib/mol-repr/structure/representation/orientation.js +2 -1
- package/lib/mol-repr/structure/representation/point.d.ts +3 -0
- package/lib/mol-repr/structure/representation/putty.d.ts +9 -0
- package/lib/mol-repr/structure/representation/putty.js +2 -1
- package/lib/mol-repr/structure/representation/spacefill.d.ts +9 -0
- package/lib/mol-repr/structure/representation/spacefill.js +2 -1
- package/lib/mol-repr/structure/units-visual.d.ts +16 -0
- package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +6 -0
- package/lib/mol-repr/structure/visual/bond-inter-unit-line.d.ts +1 -0
- package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +6 -0
- package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.js +2 -2
- 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 +2 -2
- package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +3 -0
- package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +3 -0
- package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +3 -0
- package/lib/mol-repr/structure/visual/element-cross.d.ts +1 -0
- package/lib/mol-repr/structure/visual/element-point.d.ts +1 -0
- package/lib/mol-repr/structure/visual/element-sphere.d.ts +6 -0
- package/lib/mol-repr/structure/visual/ellipsoid-mesh.d.ts +3 -0
- package/lib/mol-repr/structure/visual/gaussian-density-volume.d.ts +2 -0
- package/lib/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +12 -0
- package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +1 -0
- package/lib/mol-repr/structure/visual/label-text.d.ts +3 -2
- package/lib/mol-repr/structure/visual/label-text.js +2 -2
- package/lib/mol-repr/structure/visual/molecular-surface-mesh.d.ts +3 -0
- package/lib/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +1 -0
- package/lib/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +3 -0
- package/lib/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +3 -0
- package/lib/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +3 -0
- package/lib/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +6 -0
- package/lib/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +6 -0
- package/lib/mol-repr/structure/visual/polymer-direction-wedge.d.ts +3 -0
- package/lib/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +3 -0
- package/lib/mol-repr/structure/visual/polymer-trace-mesh.d.ts +3 -0
- package/lib/mol-repr/structure/visual/polymer-trace-mesh.js +1 -1
- package/lib/mol-repr/structure/visual/polymer-tube-mesh.d.ts +3 -0
- package/lib/mol-repr/structure/visual/util/bond.js +1 -1
- package/lib/mol-repr/volume/direct-volume.d.ts +3 -0
- package/lib/mol-repr/volume/isosurface.d.ts +16 -0
- package/lib/mol-repr/volume/isosurface.js +2 -1
- package/lib/mol-repr/volume/registry.d.ts +5 -0
- package/lib/mol-repr/volume/representation.d.ts +1 -0
- package/lib/mol-repr/volume/slice.d.ts +3 -0
- package/lib/mol-script/language/builder.d.ts +0 -1
- package/lib/mol-theme/color/illustrative.d.ts +2 -0
- package/lib/mol-theme/color/illustrative.js +2 -2
- package/lib/mol-theme/color.d.ts +1 -0
- package/lib/mol-util/material.d.ts +5 -1
- package/lib/mol-util/material.js +9 -7
- package/package.json +162 -160
|
@@ -30,11 +30,14 @@ export declare const CrossLinkRestraintCylinderParams: {
|
|
|
30
30
|
flatShaded: PD.BooleanParam;
|
|
31
31
|
ignoreLight: PD.BooleanParam;
|
|
32
32
|
xrayShaded: PD.BooleanParam;
|
|
33
|
+
bumpFrequency: PD.Numeric;
|
|
34
|
+
bumpAmplitude: PD.Numeric;
|
|
33
35
|
alpha: PD.Numeric;
|
|
34
36
|
quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
|
|
35
37
|
material: PD.Group<PD.Normalize<{
|
|
36
38
|
metalness: number;
|
|
37
39
|
roughness: number;
|
|
40
|
+
bumpiness: number;
|
|
38
41
|
}>>;
|
|
39
42
|
};
|
|
40
43
|
export declare type CrossLinkRestraintCylinderParams = typeof CrossLinkRestraintCylinderParams;
|
|
@@ -59,11 +62,14 @@ export declare const CrossLinkRestraintParams: {
|
|
|
59
62
|
flatShaded: PD.BooleanParam;
|
|
60
63
|
ignoreLight: PD.BooleanParam;
|
|
61
64
|
xrayShaded: PD.BooleanParam;
|
|
65
|
+
bumpFrequency: PD.Numeric;
|
|
66
|
+
bumpAmplitude: PD.Numeric;
|
|
62
67
|
alpha: PD.Numeric;
|
|
63
68
|
quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
|
|
64
69
|
material: PD.Group<PD.Normalize<{
|
|
65
70
|
metalness: number;
|
|
66
71
|
roughness: number;
|
|
72
|
+
bumpiness: number;
|
|
67
73
|
}>>;
|
|
68
74
|
};
|
|
69
75
|
export declare type CrossLinkRestraintParams = typeof CrossLinkRestraintParams;
|
|
@@ -87,11 +93,14 @@ export declare function getCrossLinkRestraintParams(ctx: ThemeRegistryContext, s
|
|
|
87
93
|
flatShaded: PD.BooleanParam;
|
|
88
94
|
ignoreLight: PD.BooleanParam;
|
|
89
95
|
xrayShaded: PD.BooleanParam;
|
|
96
|
+
bumpFrequency: PD.Numeric;
|
|
97
|
+
bumpAmplitude: PD.Numeric;
|
|
90
98
|
alpha: PD.Numeric;
|
|
91
99
|
quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
|
|
92
100
|
material: PD.Group<PD.Normalize<{
|
|
93
101
|
metalness: number;
|
|
94
102
|
roughness: number;
|
|
103
|
+
bumpiness: number;
|
|
95
104
|
}>>;
|
|
96
105
|
};
|
|
97
106
|
export declare type CrossLinkRestraintRepresentation = StructureRepresentation<CrossLinkRestraintParams>;
|
|
@@ -116,10 +125,13 @@ export declare const CrossLinkRestraintRepresentationProvider: StructureRepresen
|
|
|
116
125
|
flatShaded: PD.BooleanParam;
|
|
117
126
|
ignoreLight: PD.BooleanParam;
|
|
118
127
|
xrayShaded: PD.BooleanParam;
|
|
128
|
+
bumpFrequency: PD.Numeric;
|
|
129
|
+
bumpAmplitude: PD.Numeric;
|
|
119
130
|
alpha: PD.Numeric;
|
|
120
131
|
quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
|
|
121
132
|
material: PD.Group<PD.Normalize<{
|
|
122
133
|
metalness: number;
|
|
123
134
|
roughness: number;
|
|
135
|
+
bumpiness: number;
|
|
124
136
|
}>>;
|
|
125
137
|
}, CrossLinkRestraint.Tag>;
|
package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ declare const StructureFocusRepresentationParams: (plugin: PluginContext) => {
|
|
|
24
24
|
material: PD.Group<PD.Normalize<{
|
|
25
25
|
metalness: number;
|
|
26
26
|
roughness: number;
|
|
27
|
+
bumpiness: number;
|
|
27
28
|
}>>;
|
|
28
29
|
};
|
|
29
30
|
declare type StructureFocusRepresentationProps = PD.ValuesFor<ReturnType<typeof StructureFocusRepresentationParams>>;
|
|
@@ -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
|
-
/** Precision data the server can show. */
|
|
13
|
-
label: string;
|
|
12
|
+
label: string; /** Precision data the server can show. */
|
|
14
13
|
description?: string | undefined;
|
|
15
14
|
} | undefined): {
|
|
16
15
|
id: import("../../../../mol-util/uuid").UUID;
|
|
17
16
|
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,6 +23,7 @@ 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 */
|
|
26
27
|
label: string;
|
|
27
28
|
description?: string | undefined;
|
|
28
29
|
data: VolumeServerInfo.Data;
|
|
@@ -232,6 +232,7 @@ export declare const PluginCommands: {
|
|
|
232
232
|
outline: 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<{
|
|
233
233
|
scale: any;
|
|
234
234
|
threshold: any;
|
|
235
|
+
color: any;
|
|
235
236
|
}>, "on">;
|
|
236
237
|
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<{
|
|
237
238
|
edgeThreshold: any;
|
|
@@ -329,6 +330,8 @@ export declare const PluginCommands: {
|
|
|
329
330
|
flipSided: any;
|
|
330
331
|
flatShaded: any;
|
|
331
332
|
xrayShaded: any;
|
|
333
|
+
bumpFrequency: any;
|
|
334
|
+
bumpAmplitude: any;
|
|
332
335
|
quality: any;
|
|
333
336
|
material: any;
|
|
334
337
|
}>, "on">;
|
|
@@ -16,6 +16,7 @@ export declare class PluginConfigItem<T = any> {
|
|
|
16
16
|
constructor(key: string, defaultValue?: T | undefined);
|
|
17
17
|
}
|
|
18
18
|
declare function item<T>(key: string, defaultValue?: T): PluginConfigItem<T>;
|
|
19
|
+
export declare function preferWebGl1(): boolean;
|
|
19
20
|
export declare const PluginConfig: {
|
|
20
21
|
item: typeof item;
|
|
21
22
|
General: {
|
|
@@ -58,6 +59,7 @@ export declare const PluginConfig: {
|
|
|
58
59
|
highSymmetryUnitCount: number;
|
|
59
60
|
fiberResidueCount: number;
|
|
60
61
|
}>;
|
|
62
|
+
DefaultRepresentationPreset: PluginConfigItem<string>;
|
|
61
63
|
DefaultRepresentationPresetParams: PluginConfigItem<StructureRepresentationPresetProvider.CommonParams>;
|
|
62
64
|
};
|
|
63
65
|
};
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.PluginConfigManager = exports.PluginConfig = exports.PluginConfigItem = void 0;
|
|
9
|
+
exports.PluginConfigManager = exports.PluginConfig = exports.preferWebGl1 = exports.PluginConfigItem = void 0;
|
|
10
10
|
var structure_1 = require("../mol-model/structure");
|
|
11
11
|
var PluginConfigItem = /** @class */ (function () {
|
|
12
12
|
function PluginConfigItem(key, defaultValue) {
|
|
@@ -22,9 +22,14 @@ function item(key, defaultValue) { return new PluginConfigItem(key, defaultValue
|
|
|
22
22
|
function preferWebGl1() {
|
|
23
23
|
if (typeof navigator === 'undefined' || typeof window === 'undefined')
|
|
24
24
|
return false;
|
|
25
|
-
// WebGL2 isn't working in MacOS 12.0.1 Safari 15.1
|
|
25
|
+
// WebGL2 isn't working in MacOS 12.0.1 Safari 15.1, 15.2. It is working in Safari 15.4 tech preview, so disabling all versions before that.
|
|
26
26
|
// prefer webgl 1 based on the userAgent substring
|
|
27
|
-
|
|
27
|
+
var unpportedSafariVersions = [
|
|
28
|
+
'Version/15.1 Safari',
|
|
29
|
+
'Version/15.2 Safari',
|
|
30
|
+
'Version/15.3 Safari'
|
|
31
|
+
];
|
|
32
|
+
if (unpportedSafariVersions.some(function (v) { return navigator.userAgent.indexOf(v) > 0; })) {
|
|
28
33
|
return true;
|
|
29
34
|
}
|
|
30
35
|
// Check for iOS device which enabled WebGL2 recently but it doesn't seem
|
|
@@ -35,6 +40,7 @@ function preferWebGl1() {
|
|
|
35
40
|
var isTouchScreen = navigator.maxTouchPoints >= 4; // true for iOS 13 (and hopefully beyond)
|
|
36
41
|
return !window.MSStream && (isIOS || (isAppleDevice && isTouchScreen));
|
|
37
42
|
}
|
|
43
|
+
exports.preferWebGl1 = preferWebGl1;
|
|
38
44
|
exports.PluginConfig = {
|
|
39
45
|
item: item,
|
|
40
46
|
General: {
|
|
@@ -75,6 +81,7 @@ exports.PluginConfig = {
|
|
|
75
81
|
},
|
|
76
82
|
Structure: {
|
|
77
83
|
SizeThresholds: item('structure.size-thresholds', structure_1.Structure.DefaultSizeThresholds),
|
|
84
|
+
DefaultRepresentationPreset: item('structure.default-representation-preset', 'auto'),
|
|
78
85
|
DefaultRepresentationPresetParams: item('structure.default-representation-preset-params', {})
|
|
79
86
|
}
|
|
80
87
|
};
|
|
@@ -37,10 +37,13 @@ declare class ViewportScreenshotHelper extends PluginComponent {
|
|
|
37
37
|
flipSided: boolean;
|
|
38
38
|
flatShaded: boolean;
|
|
39
39
|
xrayShaded: boolean;
|
|
40
|
+
bumpFrequency: number;
|
|
41
|
+
bumpAmplitude: number;
|
|
40
42
|
quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
|
|
41
43
|
material: PD.Normalize<{
|
|
42
44
|
metalness: number;
|
|
43
45
|
roughness: number;
|
|
46
|
+
bumpiness: number;
|
|
44
47
|
}>;
|
|
45
48
|
}>, "on">>;
|
|
46
49
|
};
|
|
@@ -62,10 +65,13 @@ declare class ViewportScreenshotHelper extends PluginComponent {
|
|
|
62
65
|
flipSided: boolean;
|
|
63
66
|
flatShaded: boolean;
|
|
64
67
|
xrayShaded: boolean;
|
|
68
|
+
bumpFrequency: number;
|
|
69
|
+
bumpAmplitude: number;
|
|
65
70
|
quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
|
|
66
71
|
material: PD.Normalize<{
|
|
67
72
|
metalness: number;
|
|
68
73
|
roughness: number;
|
|
74
|
+
bumpiness: number;
|
|
69
75
|
}>;
|
|
70
76
|
}>, "on">>;
|
|
71
77
|
}>>;
|
|
@@ -95,10 +101,13 @@ declare class ViewportScreenshotHelper extends PluginComponent {
|
|
|
95
101
|
flipSided: boolean;
|
|
96
102
|
flatShaded: boolean;
|
|
97
103
|
xrayShaded: boolean;
|
|
104
|
+
bumpFrequency: number;
|
|
105
|
+
bumpAmplitude: number;
|
|
98
106
|
quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
|
|
99
107
|
material: PD.Normalize<{
|
|
100
108
|
metalness: number;
|
|
101
109
|
roughness: number;
|
|
110
|
+
bumpiness: number;
|
|
102
111
|
}>;
|
|
103
112
|
}>, "on">>;
|
|
104
113
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2018-
|
|
2
|
+
* Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
@@ -36,6 +36,12 @@ declare const DownloadStructure: StateAction<PluginStateObject.Root, void, PD.No
|
|
|
36
36
|
}>, "swissmodel"> | PD.NamedParams<PD.Normalize<{
|
|
37
37
|
id: any;
|
|
38
38
|
options: any;
|
|
39
|
+
}>, "alphafolddb"> | PD.NamedParams<PD.Normalize<{
|
|
40
|
+
id: any;
|
|
41
|
+
options: any;
|
|
42
|
+
}>, "modelarchive"> | PD.NamedParams<PD.Normalize<{
|
|
43
|
+
id: any;
|
|
44
|
+
options: any;
|
|
39
45
|
}>, "pubchem">;
|
|
40
46
|
}>>;
|
|
41
47
|
export declare const UpdateTrajectory: StateAction<import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>>, void, PD.Normalize<{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2018-
|
|
3
|
+
* Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
6
6
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
@@ -19,15 +19,19 @@ var transforms_1 = require("../transforms");
|
|
|
19
19
|
var model_1 = require("../transforms/model");
|
|
20
20
|
var assets_1 = require("../../mol-util/assets");
|
|
21
21
|
var config_1 = require("../../mol-plugin/config");
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}, {
|
|
22
|
+
var file_info_1 = require("../../mol-util/file-info");
|
|
23
|
+
var DownloadModelRepresentationOptions = function (plugin) {
|
|
24
|
+
var representationDefault = plugin.config.get(config_1.PluginConfig.Structure.DefaultRepresentationPreset) || representation_preset_1.PresetStructureRepresentations.auto.id;
|
|
25
|
+
return param_definition_1.ParamDefinition.Group({
|
|
26
|
+
type: root_structure_1.RootStructureDefinition.getParams(void 0, 'auto').type,
|
|
27
|
+
representation: param_definition_1.ParamDefinition.Select(representationDefault, plugin.builders.structure.representation.getPresets().map(function (p) { return [p.id, p.display.name, p.display.group]; }), { description: 'Which representation preset to use.' }),
|
|
28
|
+
representationParams: param_definition_1.ParamDefinition.Group(representation_preset_1.StructureRepresentationPresetProvider.CommonParams, { isHidden: true }),
|
|
29
|
+
asTrajectory: param_definition_1.ParamDefinition.Optional(param_definition_1.ParamDefinition.Boolean(false, { description: 'Load all entries into a single trajectory.' }))
|
|
30
|
+
}, { isExpanded: false });
|
|
31
|
+
};
|
|
28
32
|
exports.PdbDownloadProvider = {
|
|
29
33
|
'rcsb': param_definition_1.ParamDefinition.Group({
|
|
30
|
-
encoding: param_definition_1.ParamDefinition.Select('bcif', [
|
|
34
|
+
encoding: param_definition_1.ParamDefinition.Select('bcif', param_definition_1.ParamDefinition.arrayToOptions(['cif', 'bcif'])),
|
|
31
35
|
}, { label: 'RCSB PDB', isFlat: true }),
|
|
32
36
|
'pdbe': param_definition_1.ParamDefinition.Group({
|
|
33
37
|
variant: param_definition_1.ParamDefinition.Select('updated-bcif', [['updated-bcif', 'Updated (bcif)'], ['updated', 'Updated'], ['archival', 'Archival']]),
|
|
@@ -51,7 +55,7 @@ var DownloadStructure = mol_state_1.StateAction.build({
|
|
|
51
55
|
'pdb-dev': param_definition_1.ParamDefinition.Group({
|
|
52
56
|
provider: param_definition_1.ParamDefinition.Group({
|
|
53
57
|
id: param_definition_1.ParamDefinition.Text('PDBDEV_00000001', { label: 'PDBDev Id(s)', description: 'One or more comma/space separated ids.' }),
|
|
54
|
-
encoding: param_definition_1.ParamDefinition.Select('bcif', [
|
|
58
|
+
encoding: param_definition_1.ParamDefinition.Select('bcif', param_definition_1.ParamDefinition.arrayToOptions(['cif', 'bcif'])),
|
|
55
59
|
}, { pivot: 'id' }),
|
|
56
60
|
options: options
|
|
57
61
|
}, { isFlat: true, label: 'PDBDEV' }),
|
|
@@ -59,6 +63,14 @@ var DownloadStructure = mol_state_1.StateAction.build({
|
|
|
59
63
|
id: param_definition_1.ParamDefinition.Text('Q9Y2I8', { label: 'UniProtKB AC(s)', description: 'One or more comma/space separated ACs.' }),
|
|
60
64
|
options: options
|
|
61
65
|
}, { isFlat: true, label: 'SWISS-MODEL', description: 'Loads the best homology model or experimental structure' }),
|
|
66
|
+
'alphafolddb': param_definition_1.ParamDefinition.Group({
|
|
67
|
+
id: param_definition_1.ParamDefinition.Text('Q8W3K0', { label: 'UniProtKB AC(s)', description: 'One or more comma/space separated ACs.' }),
|
|
68
|
+
options: options
|
|
69
|
+
}, { isFlat: true, label: 'AlphaFold DB', description: 'Loads the predicted model if available' }),
|
|
70
|
+
'modelarchive': param_definition_1.ParamDefinition.Group({
|
|
71
|
+
id: param_definition_1.ParamDefinition.Text('ma-bak-cepc-0003', { label: 'Accession Code(s)', description: 'One or more comma/space separated ACs.' }),
|
|
72
|
+
options: options
|
|
73
|
+
}, { isFlat: true, label: 'Model Archive' }),
|
|
62
74
|
'pubchem': param_definition_1.ParamDefinition.Group({
|
|
63
75
|
id: param_definition_1.ParamDefinition.Text('2244,2245', { label: 'PubChem ID', description: 'One or more comma/space separated IDs.' }),
|
|
64
76
|
options: options
|
|
@@ -75,58 +87,99 @@ var DownloadStructure = mol_state_1.StateAction.build({
|
|
|
75
87
|
})(function (_a, plugin) {
|
|
76
88
|
var params = _a.params, state = _a.state;
|
|
77
89
|
return mol_task_1.Task.create('Download Structure', function (ctx) { return (0, tslib_1.__awaiter)(void 0, void 0, void 0, function () {
|
|
78
|
-
var src, downloadParams, asTrajectory, format, representationPreset, showUnitcell, structure;
|
|
79
|
-
return (0, tslib_1.__generator)(this, function (
|
|
80
|
-
switch (
|
|
90
|
+
var src, downloadParams, asTrajectory, format, _a, representationPreset, showUnitcell, structure;
|
|
91
|
+
return (0, tslib_1.__generator)(this, function (_b) {
|
|
92
|
+
switch (_b.label) {
|
|
81
93
|
case 0:
|
|
82
94
|
plugin.behaviors.layout.leftPanelTabName.next('data');
|
|
83
95
|
src = params.source;
|
|
84
96
|
asTrajectory = false, format = 'mmcif';
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
case '
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
: src.params.provider.server.params.variant === 'updated-bcif'
|
|
95
|
-
? getDownloadParams(src.params.provider.id, function (id) { return "https://www.ebi.ac.uk/pdbe/entry-files/download/".concat(id.toLowerCase(), ".bcif"); }, function (id) { return "PDBe: ".concat(id, " (updated cif)"); }, true)
|
|
96
|
-
: getDownloadParams(src.params.provider.id, function (id) { return "https://www.ebi.ac.uk/pdbe/static/entry/".concat(id.toLowerCase(), ".cif"); }, function (id) { return "PDBe: ".concat(id, " (cif)"); }, false)
|
|
97
|
-
: src.params.provider.server.params.encoding === 'cif'
|
|
98
|
-
? getDownloadParams(src.params.provider.id, function (id) { return "https://files.rcsb.org/download/".concat(id.toUpperCase(), ".cif"); }, function (id) { return "RCSB: ".concat(id, " (cif)"); }, false)
|
|
99
|
-
: getDownloadParams(src.params.provider.id, function (id) { return "https://models.rcsb.org/".concat(id.toUpperCase(), ".bcif"); }, function (id) { return "RCSB: ".concat(id, " (bcif)"); }, true);
|
|
100
|
-
asTrajectory = !!src.params.options.asTrajectory;
|
|
101
|
-
break;
|
|
102
|
-
case 'pdb-dev':
|
|
103
|
-
downloadParams = getDownloadParams(src.params.provider.id, function (id) {
|
|
104
|
-
var nId = id.toUpperCase().startsWith('PDBDEV_') ? id : "PDBDEV_".concat(id.padStart(8, '0'));
|
|
105
|
-
return src.params.provider.encoding === 'bcif'
|
|
106
|
-
? "https://pdb-dev.wwpdb.org/bcif/".concat(nId.toUpperCase(), ".bcif")
|
|
107
|
-
: "https://pdb-dev.wwpdb.org/cif/".concat(nId.toUpperCase(), ".cif");
|
|
108
|
-
}, function (id) { return id.toUpperCase().startsWith('PDBDEV_') ? id : "PDBDEV_".concat(id.padStart(8, '0')); }, src.params.provider.encoding === 'bcif');
|
|
109
|
-
asTrajectory = !!src.params.options.asTrajectory;
|
|
110
|
-
break;
|
|
111
|
-
case 'swissmodel':
|
|
112
|
-
downloadParams = getDownloadParams(src.params.id, function (id) { return "https://swissmodel.expasy.org/repository/uniprot/".concat(id.toUpperCase(), ".pdb"); }, function (id) { return "SWISS-MODEL: ".concat(id); }, false);
|
|
113
|
-
asTrajectory = !!src.params.options.asTrajectory;
|
|
114
|
-
format = 'pdb';
|
|
115
|
-
break;
|
|
116
|
-
case 'pubchem':
|
|
117
|
-
downloadParams = getDownloadParams(src.params.id, function (id) { return "https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/CID/".concat(id.trim(), "/record/SDF/?record_type=3d"); }, function (id) { return "PubChem: ".concat(id); }, false);
|
|
118
|
-
asTrajectory = !!src.params.options.asTrajectory;
|
|
119
|
-
format = 'mol';
|
|
120
|
-
break;
|
|
121
|
-
default: throw new Error("".concat(src.name, " not supported."));
|
|
97
|
+
_a = src.name;
|
|
98
|
+
switch (_a) {
|
|
99
|
+
case 'url': return [3 /*break*/, 1];
|
|
100
|
+
case 'pdb': return [3 /*break*/, 2];
|
|
101
|
+
case 'pdb-dev': return [3 /*break*/, 4];
|
|
102
|
+
case 'swissmodel': return [3 /*break*/, 6];
|
|
103
|
+
case 'alphafolddb': return [3 /*break*/, 8];
|
|
104
|
+
case 'modelarchive': return [3 /*break*/, 10];
|
|
105
|
+
case 'pubchem': return [3 /*break*/, 12];
|
|
122
106
|
}
|
|
123
|
-
|
|
107
|
+
return [3 /*break*/, 14];
|
|
108
|
+
case 1:
|
|
109
|
+
downloadParams = [{ url: src.params.url, isBinary: src.params.isBinary }];
|
|
110
|
+
format = src.params.format;
|
|
111
|
+
return [3 /*break*/, 15];
|
|
112
|
+
case 2: return [4 /*yield*/, (src.params.provider.server.name === 'pdbe'
|
|
113
|
+
? src.params.provider.server.params.variant === 'updated'
|
|
114
|
+
? getDownloadParams(src.params.provider.id, function (id) { return "https://www.ebi.ac.uk/pdbe/static/entry/".concat(id.toLowerCase(), "_updated.cif"); }, function (id) { return "PDBe: ".concat(id, " (updated cif)"); }, false)
|
|
115
|
+
: src.params.provider.server.params.variant === 'updated-bcif'
|
|
116
|
+
? getDownloadParams(src.params.provider.id, function (id) { return "https://www.ebi.ac.uk/pdbe/entry-files/download/".concat(id.toLowerCase(), ".bcif"); }, function (id) { return "PDBe: ".concat(id, " (updated cif)"); }, true)
|
|
117
|
+
: getDownloadParams(src.params.provider.id, function (id) { return "https://www.ebi.ac.uk/pdbe/static/entry/".concat(id.toLowerCase(), ".cif"); }, function (id) { return "PDBe: ".concat(id, " (cif)"); }, false)
|
|
118
|
+
: src.params.provider.server.params.encoding === 'cif'
|
|
119
|
+
? getDownloadParams(src.params.provider.id, function (id) { return "https://files.rcsb.org/download/".concat(id.toUpperCase(), ".cif"); }, function (id) { return "RCSB: ".concat(id, " (cif)"); }, false)
|
|
120
|
+
: getDownloadParams(src.params.provider.id, function (id) { return "https://models.rcsb.org/".concat(id.toUpperCase(), ".bcif"); }, function (id) { return "RCSB: ".concat(id, " (bcif)"); }, true))];
|
|
121
|
+
case 3:
|
|
122
|
+
downloadParams = _b.sent();
|
|
123
|
+
asTrajectory = !!src.params.options.asTrajectory;
|
|
124
|
+
return [3 /*break*/, 15];
|
|
125
|
+
case 4: return [4 /*yield*/, getDownloadParams(src.params.provider.id, function (id) {
|
|
126
|
+
var nId = id.toUpperCase().startsWith('PDBDEV_') ? id : "PDBDEV_".concat(id.padStart(8, '0'));
|
|
127
|
+
return src.params.provider.encoding === 'bcif'
|
|
128
|
+
? "https://pdb-dev.wwpdb.org/bcif/".concat(nId.toUpperCase(), ".bcif")
|
|
129
|
+
: "https://pdb-dev.wwpdb.org/cif/".concat(nId.toUpperCase(), ".cif");
|
|
130
|
+
}, function (id) { return id.toUpperCase().startsWith('PDBDEV_') ? id : "PDBDEV_".concat(id.padStart(8, '0')); }, src.params.provider.encoding === 'bcif')];
|
|
131
|
+
case 5:
|
|
132
|
+
downloadParams = _b.sent();
|
|
133
|
+
asTrajectory = !!src.params.options.asTrajectory;
|
|
134
|
+
return [3 /*break*/, 15];
|
|
135
|
+
case 6: return [4 /*yield*/, getDownloadParams(src.params.id, function (id) { return "https://swissmodel.expasy.org/repository/uniprot/".concat(id.toUpperCase(), ".pdb"); }, function (id) { return "SWISS-MODEL: ".concat(id); }, false)];
|
|
136
|
+
case 7:
|
|
137
|
+
downloadParams = _b.sent();
|
|
138
|
+
asTrajectory = !!src.params.options.asTrajectory;
|
|
139
|
+
format = 'pdb';
|
|
140
|
+
return [3 /*break*/, 15];
|
|
141
|
+
case 8: return [4 /*yield*/, getDownloadParams(src.params.id, function (id) { return (0, tslib_1.__awaiter)(void 0, void 0, void 0, function () {
|
|
142
|
+
var url, info;
|
|
143
|
+
return (0, tslib_1.__generator)(this, function (_a) {
|
|
144
|
+
switch (_a.label) {
|
|
145
|
+
case 0:
|
|
146
|
+
url = "https://www.alphafold.ebi.ac.uk/api/prediction/".concat(id.toUpperCase());
|
|
147
|
+
return [4 /*yield*/, plugin.runTask(plugin.fetch({ url: url, type: 'json' }))];
|
|
148
|
+
case 1:
|
|
149
|
+
info = _a.sent();
|
|
150
|
+
if (Array.isArray(info) && info.length > 0)
|
|
151
|
+
return [2 /*return*/, info[0].cifUrl];
|
|
152
|
+
throw new Error("No AlphaFold DB entry for '".concat(id, "'"));
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
}); }, function (id) { return "AlphaFold DB: ".concat(id); }, false)];
|
|
156
|
+
case 9:
|
|
157
|
+
downloadParams = _b.sent();
|
|
158
|
+
asTrajectory = !!src.params.options.asTrajectory;
|
|
159
|
+
format = 'mmcif';
|
|
160
|
+
return [3 /*break*/, 15];
|
|
161
|
+
case 10: return [4 /*yield*/, getDownloadParams(src.params.id, function (id) { return "https://www.modelarchive.org/doi/10.5452/".concat(id.toLowerCase(), ".cif"); }, function (id) { return "Model Archive: ".concat(id); }, false)];
|
|
162
|
+
case 11:
|
|
163
|
+
downloadParams = _b.sent();
|
|
164
|
+
asTrajectory = !!src.params.options.asTrajectory;
|
|
165
|
+
format = 'mmcif';
|
|
166
|
+
return [3 /*break*/, 15];
|
|
167
|
+
case 12: return [4 /*yield*/, getDownloadParams(src.params.id, function (id) { return "https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/CID/".concat(id.trim(), "/record/SDF/?record_type=3d"); }, function (id) { return "PubChem: ".concat(id); }, false)];
|
|
168
|
+
case 13:
|
|
169
|
+
downloadParams = _b.sent();
|
|
170
|
+
asTrajectory = !!src.params.options.asTrajectory;
|
|
171
|
+
format = 'mol';
|
|
172
|
+
return [3 /*break*/, 15];
|
|
173
|
+
case 14: throw new Error("".concat(src.name, " not supported."));
|
|
174
|
+
case 15:
|
|
175
|
+
representationPreset = params.source.params.options.representation || plugin.config.get(config_1.PluginConfig.Structure.DefaultRepresentationPreset) || representation_preset_1.PresetStructureRepresentations.auto.id;
|
|
124
176
|
showUnitcell = representationPreset !== representation_preset_1.PresetStructureRepresentations.empty.id;
|
|
125
177
|
structure = src.params.options.type.name === 'auto' ? void 0 : src.params.options.type;
|
|
126
178
|
return [4 /*yield*/, state.transaction(function () { return (0, tslib_1.__awaiter)(void 0, void 0, void 0, function () {
|
|
127
|
-
var blob, trajectory, _i, downloadParams_1, download, data, trajectory;
|
|
128
|
-
|
|
129
|
-
|
|
179
|
+
var blob, trajectory, _i, downloadParams_1, download, data, provider, trajectory;
|
|
180
|
+
var _a;
|
|
181
|
+
return (0, tslib_1.__generator)(this, function (_b) {
|
|
182
|
+
switch (_b.label) {
|
|
130
183
|
case 0:
|
|
131
184
|
if (!(downloadParams.length > 0 && asTrajectory)) return [3 /*break*/, 4];
|
|
132
185
|
return [4 /*yield*/, plugin.builders.data.downloadBlob({
|
|
@@ -134,10 +187,10 @@ var DownloadStructure = mol_state_1.StateAction.build({
|
|
|
134
187
|
maxConcurrency: 6
|
|
135
188
|
}, { state: { isGhost: true } })];
|
|
136
189
|
case 1:
|
|
137
|
-
blob =
|
|
190
|
+
blob = _b.sent();
|
|
138
191
|
return [4 /*yield*/, plugin.builders.structure.parseTrajectory(blob, { formats: downloadParams.map(function (_, i) { return ({ id: '' + i, format: 'cif' }); }) })];
|
|
139
192
|
case 2:
|
|
140
|
-
trajectory =
|
|
193
|
+
trajectory = _b.sent();
|
|
141
194
|
return [4 /*yield*/, plugin.builders.structure.hierarchy.applyPreset(trajectory, 'default', {
|
|
142
195
|
structure: structure,
|
|
143
196
|
showUnitcell: showUnitcell,
|
|
@@ -145,20 +198,25 @@ var DownloadStructure = mol_state_1.StateAction.build({
|
|
|
145
198
|
representationPresetParams: params.source.params.options.representationParams
|
|
146
199
|
})];
|
|
147
200
|
case 3:
|
|
148
|
-
|
|
201
|
+
_b.sent();
|
|
149
202
|
return [3 /*break*/, 10];
|
|
150
203
|
case 4:
|
|
151
204
|
_i = 0, downloadParams_1 = downloadParams;
|
|
152
|
-
|
|
205
|
+
_b.label = 5;
|
|
153
206
|
case 5:
|
|
154
207
|
if (!(_i < downloadParams_1.length)) return [3 /*break*/, 10];
|
|
155
208
|
download = downloadParams_1[_i];
|
|
156
209
|
return [4 /*yield*/, plugin.builders.data.download(download, { state: { isGhost: true } })];
|
|
157
210
|
case 6:
|
|
158
|
-
data =
|
|
159
|
-
|
|
211
|
+
data = _b.sent();
|
|
212
|
+
provider = format === 'auto'
|
|
213
|
+
? plugin.dataFormats.auto((0, file_info_1.getFileInfo)(assets_1.Asset.getUrl(download.url)), (_a = data.cell) === null || _a === void 0 ? void 0 : _a.obj)
|
|
214
|
+
: plugin.dataFormats.get(format);
|
|
215
|
+
if (!provider)
|
|
216
|
+
throw new Error('unknown file format');
|
|
217
|
+
return [4 /*yield*/, plugin.builders.structure.parseTrajectory(data, provider)];
|
|
160
218
|
case 7:
|
|
161
|
-
trajectory =
|
|
219
|
+
trajectory = _b.sent();
|
|
162
220
|
return [4 /*yield*/, plugin.builders.structure.hierarchy.applyPreset(trajectory, 'default', {
|
|
163
221
|
structure: structure,
|
|
164
222
|
showUnitcell: showUnitcell,
|
|
@@ -166,8 +224,8 @@ var DownloadStructure = mol_state_1.StateAction.build({
|
|
|
166
224
|
representationPresetParams: params.source.params.options.representationParams
|
|
167
225
|
})];
|
|
168
226
|
case 8:
|
|
169
|
-
|
|
170
|
-
|
|
227
|
+
_b.sent();
|
|
228
|
+
_b.label = 9;
|
|
171
229
|
case 9:
|
|
172
230
|
_i++;
|
|
173
231
|
return [3 /*break*/, 5];
|
|
@@ -175,8 +233,8 @@ var DownloadStructure = mol_state_1.StateAction.build({
|
|
|
175
233
|
}
|
|
176
234
|
});
|
|
177
235
|
}); }).runInContext(ctx)];
|
|
178
|
-
case
|
|
179
|
-
|
|
236
|
+
case 16:
|
|
237
|
+
_b.sent();
|
|
180
238
|
return [2 /*return*/];
|
|
181
239
|
}
|
|
182
240
|
});
|
|
@@ -184,18 +242,38 @@ var DownloadStructure = mol_state_1.StateAction.build({
|
|
|
184
242
|
});
|
|
185
243
|
exports.DownloadStructure = DownloadStructure;
|
|
186
244
|
function getDownloadParams(src, url, label, isBinary) {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
245
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
|
|
246
|
+
var ids, ret, _i, ids_1, id, _a, _b, _c, _d;
|
|
247
|
+
var _e;
|
|
248
|
+
return (0, tslib_1.__generator)(this, function (_f) {
|
|
249
|
+
switch (_f.label) {
|
|
250
|
+
case 0:
|
|
251
|
+
ids = src.split(/[,\s]/).map(function (id) { return id.trim(); }).filter(function (id) { return !!id && (id.length >= 4 || /^[1-9][0-9]*$/.test(id)); });
|
|
252
|
+
ret = [];
|
|
253
|
+
_i = 0, ids_1 = ids;
|
|
254
|
+
_f.label = 1;
|
|
255
|
+
case 1:
|
|
256
|
+
if (!(_i < ids_1.length)) return [3 /*break*/, 4];
|
|
257
|
+
id = ids_1[_i];
|
|
258
|
+
_b = (_a = ret).push;
|
|
259
|
+
_e = {};
|
|
260
|
+
_d = (_c = assets_1.Asset).Url;
|
|
261
|
+
return [4 /*yield*/, url(id)];
|
|
262
|
+
case 2:
|
|
263
|
+
_b.apply(_a, [(_e.url = _d.apply(_c, [_f.sent()]), _e.isBinary = isBinary, _e.label = label(id), _e)]);
|
|
264
|
+
_f.label = 3;
|
|
265
|
+
case 3:
|
|
266
|
+
_i++;
|
|
267
|
+
return [3 /*break*/, 1];
|
|
268
|
+
case 4: return [2 /*return*/, ret];
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
});
|
|
194
272
|
}
|
|
195
273
|
exports.UpdateTrajectory = mol_state_1.StateAction.build({
|
|
196
274
|
display: { name: 'Update Trajectory' },
|
|
197
275
|
params: {
|
|
198
|
-
action: param_definition_1.ParamDefinition.Select('advance', [
|
|
276
|
+
action: param_definition_1.ParamDefinition.Select('advance', param_definition_1.ParamDefinition.arrayToOptions(['advance', 'reset'])),
|
|
199
277
|
by: param_definition_1.ParamDefinition.Optional(param_definition_1.ParamDefinition.Numeric(1, { min: -1, max: 1, step: 1 }))
|
|
200
278
|
}
|
|
201
279
|
})(function (_a) {
|