molstar 3.0.0-dev.3 → 3.0.0-dev.7
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/build/viewer/embedded.html +5 -5
- package/build/viewer/index.html +25 -17
- 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 +8 -8
- package/lib/apps/docking-viewer/index.js +87 -74
- package/lib/apps/docking-viewer/viewport.js +2 -1
- package/lib/apps/viewer/embedded.html +5 -5
- package/lib/apps/viewer/index.d.ts +36 -215
- package/lib/apps/viewer/index.html +25 -17
- 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 +7 -0
- package/lib/commonjs/extensions/anvil/representation.d.ts +63 -0
- package/lib/commonjs/extensions/cellpack/representation.d.ts +13 -0
- package/lib/commonjs/extensions/dnatco/confal-pyramids/representation.d.ts +39 -0
- 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 +7 -0
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/prop.js +1 -1
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/representation.d.ts +13 -0
- package/lib/commonjs/extensions/rcsb/validation-report/prop.js +1 -1
- package/lib/commonjs/extensions/rcsb/validation-report/representation.d.ts +65 -0
- package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +8 -8
- package/lib/commonjs/mol-canvas3d/canvas3d.js +12 -4
- package/lib/commonjs/mol-canvas3d/helper/bounding-sphere-helper.js +3 -2
- package/lib/commonjs/mol-canvas3d/helper/camera-helper.d.ts +7 -0
- package/lib/commonjs/mol-canvas3d/helper/camera-helper.js +2 -2
- package/lib/commonjs/mol-canvas3d/helper/handle-helper.d.ts +7 -0
- package/lib/commonjs/mol-canvas3d/helper/handle-helper.js +2 -2
- package/lib/commonjs/mol-canvas3d/helper/helper.d.ts +6 -0
- package/lib/commonjs/mol-canvas3d/passes/image.d.ts +4 -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/pick.js +9 -9
- package/lib/commonjs/mol-canvas3d/passes/postprocessing.d.ts +1 -0
- package/lib/commonjs/mol-canvas3d/passes/postprocessing.js +6 -4
- package/lib/commonjs/mol-canvas3d/passes/smaa.js +1 -1
- package/lib/commonjs/mol-geo/geometry/base.d.ts +20 -0
- package/lib/commonjs/mol-geo/geometry/base.js +20 -1
- package/lib/commonjs/mol-geo/geometry/clipping-data.d.ts +1 -3
- package/lib/commonjs/mol-geo/geometry/clipping-data.js +3 -8
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +14 -1
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.js +5 -3
- package/lib/commonjs/mol-geo/geometry/direct-volume/direct-volume.d.ts +11 -0
- package/lib/commonjs/mol-geo/geometry/direct-volume/direct-volume.js +2 -2
- package/lib/commonjs/mol-geo/geometry/image/image.d.ts +11 -0
- package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +12 -0
- package/lib/commonjs/mol-geo/geometry/lines/lines.js +1 -1
- package/lib/commonjs/mol-geo/geometry/marker-data.d.ts +0 -1
- package/lib/commonjs/mol-geo/geometry/marker-data.js +0 -4
- package/lib/commonjs/mol-geo/geometry/mesh/color-smoothing.js +1 -1
- package/lib/commonjs/mol-geo/geometry/mesh/mesh.d.ts +13 -0
- package/lib/commonjs/mol-geo/geometry/mesh/mesh.js +5 -3
- package/lib/commonjs/mol-geo/geometry/points/points.d.ts +11 -0
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.d.ts +13 -0
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.js +5 -3
- package/lib/commonjs/mol-geo/geometry/substance-data.js +3 -3
- package/lib/commonjs/mol-geo/geometry/text/text.d.ts +11 -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 +13 -0
- package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.js +5 -3
- package/lib/commonjs/mol-gl/render-object.d.ts +2 -1
- package/lib/commonjs/mol-gl/render-object.js +10 -10
- package/lib/commonjs/mol-gl/renderable/cylinders.d.ts +41 -33
- package/lib/commonjs/mol-gl/renderable/cylinders.js +4 -4
- package/lib/commonjs/mol-gl/renderable/direct-volume.d.ts +11 -5
- package/lib/commonjs/mol-gl/renderable/direct-volume.js +3 -3
- package/lib/commonjs/mol-gl/renderable/image.d.ts +10 -4
- package/lib/commonjs/mol-gl/renderable/image.js +2 -2
- package/lib/commonjs/mol-gl/renderable/lines.d.ts +38 -32
- package/lib/commonjs/mol-gl/renderable/lines.js +3 -3
- package/lib/commonjs/mol-gl/renderable/mesh.d.ts +38 -30
- package/lib/commonjs/mol-gl/renderable/mesh.js +4 -4
- package/lib/commonjs/mol-gl/renderable/points.d.ts +10 -4
- package/lib/commonjs/mol-gl/renderable/points.js +2 -2
- package/lib/commonjs/mol-gl/renderable/schema.d.ts +10 -11
- package/lib/commonjs/mol-gl/renderable/schema.js +6 -12
- package/lib/commonjs/mol-gl/renderable/spheres.d.ts +41 -33
- package/lib/commonjs/mol-gl/renderable/spheres.js +4 -4
- package/lib/commonjs/mol-gl/renderable/text.d.ts +10 -4
- package/lib/commonjs/mol-gl/renderable/text.js +2 -2
- package/lib/commonjs/mol-gl/renderable/texture-mesh.d.ts +13 -5
- package/lib/commonjs/mol-gl/renderable/texture-mesh.js +3 -3
- package/lib/commonjs/mol-gl/renderable.d.ts +0 -1
- package/lib/commonjs/mol-gl/renderer.d.ts +12 -12
- package/lib/commonjs/mol-gl/renderer.js +12 -74
- package/lib/commonjs/mol-gl/scene.d.ts +2 -2
- package/lib/commonjs/mol-gl/scene.js +7 -5
- 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-marker-varying.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-marker-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-vert-params.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common-vert-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/image.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/image.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/mesh.vert.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/mesh.vert.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-code.d.ts +3 -1
- package/lib/commonjs/mol-gl/shader-code.js +42 -13
- package/lib/commonjs/mol-gl/webgl/render-item.d.ts +7 -6
- package/lib/commonjs/mol-gl/webgl/render-item.js +10 -8
- package/lib/commonjs/mol-gl/webgl/resources.js +8 -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-math/linear-algebra/3d/quat.d.ts +9 -1
- package/lib/commonjs/mol-math/linear-algebra/3d/quat.js +20 -1
- 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 +26 -0
- package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +13 -0
- package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +13 -0
- package/lib/commonjs/mol-model-props/computed/representations/interactions.d.ts +39 -0
- package/lib/commonjs/mol-model-props/integrative/cross-link-restraint/representation.d.ts +52 -0
- package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +12 -0
- package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +3 -1
- package/lib/commonjs/mol-plugin/commands.d.ts +4 -4
- package/lib/commonjs/mol-plugin/config.d.ts +2 -0
- package/lib/commonjs/mol-plugin/config.js +10 -3
- package/lib/commonjs/mol-plugin/spec.js +1 -0
- package/lib/commonjs/mol-plugin/util/viewport-screenshot.d.ts +21 -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-clipping.d.ts +1 -1
- package/lib/commonjs/mol-plugin-state/helpers/structure-clipping.js +1 -1
- package/lib/commonjs/mol-plugin-state/helpers/structure-selection-query.js +33 -19
- package/lib/commonjs/mol-plugin-state/manager/structure/component.d.ts +15 -1
- package/lib/commonjs/mol-plugin-state/manager/structure/component.js +13 -8
- package/lib/commonjs/mol-plugin-state/transforms/representation.d.ts +54 -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-plugin-ui/viewport/simple-settings.js +2 -6
- package/lib/commonjs/mol-repr/shape/loci/angle.d.ts +13 -0
- package/lib/commonjs/mol-repr/shape/loci/common.d.ts +11 -0
- package/lib/commonjs/mol-repr/shape/loci/dihedral.d.ts +13 -0
- package/lib/commonjs/mol-repr/shape/loci/distance.d.ts +11 -0
- package/lib/commonjs/mol-repr/shape/loci/label.d.ts +11 -0
- package/lib/commonjs/mol-repr/shape/loci/orientation.d.ts +13 -0
- package/lib/commonjs/mol-repr/shape/loci/plane.d.ts +13 -0
- package/lib/commonjs/mol-repr/shape/model/unitcell.d.ts +13 -0
- package/lib/commonjs/mol-repr/structure/complex-visual.d.ts +72 -0
- package/lib/commonjs/mol-repr/structure/params.d.ts +96 -0
- package/lib/commonjs/mol-repr/structure/registry.d.ts +175 -1
- package/lib/commonjs/mol-repr/structure/representation/backbone.d.ts +39 -0
- package/lib/commonjs/mol-repr/structure/representation/backbone.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.d.ts +39 -0
- package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/carbohydrate.d.ts +39 -0
- package/lib/commonjs/mol-repr/structure/representation/carbohydrate.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/cartoon.d.ts +39 -0
- package/lib/commonjs/mol-repr/structure/representation/cartoon.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/ellipsoid.d.ts +39 -0
- package/lib/commonjs/mol-repr/structure/representation/ellipsoid.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.d.ts +39 -0
- package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/gaussian-volume.d.ts +33 -0
- package/lib/commonjs/mol-repr/structure/representation/label.d.ts +36 -3
- package/lib/commonjs/mol-repr/structure/representation/line.d.ts +33 -0
- package/lib/commonjs/mol-repr/structure/representation/molecular-surface.d.ts +39 -0
- package/lib/commonjs/mol-repr/structure/representation/molecular-surface.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/orientation.d.ts +39 -0
- package/lib/commonjs/mol-repr/structure/representation/orientation.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/point.d.ts +33 -0
- package/lib/commonjs/mol-repr/structure/representation/putty.d.ts +39 -0
- package/lib/commonjs/mol-repr/structure/representation/putty.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/spacefill.d.ts +39 -0
- package/lib/commonjs/mol-repr/structure/representation/spacefill.js +2 -1
- package/lib/commonjs/mol-repr/structure/units-visual.d.ts +96 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +26 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-line.d.ts +11 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +26 -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 +11 -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 +13 -0
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +13 -0
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +13 -0
- package/lib/commonjs/mol-repr/structure/visual/element-cross.d.ts +11 -0
- package/lib/commonjs/mol-repr/structure/visual/element-point.d.ts +11 -0
- package/lib/commonjs/mol-repr/structure/visual/element-sphere.d.ts +26 -0
- package/lib/commonjs/mol-repr/structure/visual/ellipsoid-mesh.d.ts +13 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-density-volume.d.ts +22 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +52 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +11 -0
- package/lib/commonjs/mol-repr/structure/visual/label-text.d.ts +13 -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 +13 -0
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +11 -0
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +13 -0
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +13 -0
- package/lib/commonjs/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +13 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +26 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +26 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-direction-wedge.d.ts +13 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +13 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-trace-mesh.d.ts +13 -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 +13 -0
- package/lib/commonjs/mol-repr/structure/visual/util/bond.js +1 -1
- package/lib/commonjs/mol-repr/visual.js +11 -7
- package/lib/commonjs/mol-repr/volume/direct-volume.d.ts +33 -0
- package/lib/commonjs/mol-repr/volume/isosurface.d.ts +76 -0
- package/lib/commonjs/mol-repr/volume/isosurface.js +2 -1
- package/lib/commonjs/mol-repr/volume/registry.d.ts +35 -0
- package/lib/commonjs/mol-repr/volume/representation.d.ts +11 -0
- package/lib/commonjs/mol-repr/volume/slice.d.ts +33 -0
- package/lib/commonjs/mol-theme/clipping.d.ts +7 -15
- package/lib/commonjs/mol-theme/clipping.js +5 -12
- 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/clip.d.ts +49 -0
- package/lib/commonjs/mol-util/clip.js +97 -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 +1 -0
- package/lib/examples/alpha-orbitals/index.js +3 -4
- package/lib/examples/basic-wrapper/index.html +3 -2
- package/lib/examples/basic-wrapper/index.js +24 -12
- package/lib/examples/lighting/index.d.ts +1 -1
- package/lib/examples/lighting/index.html +4 -2
- package/lib/examples/lighting/index.js +59 -42
- package/lib/examples/proteopedia-wrapper/index.html +4 -3
- 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 +7 -0
- package/lib/extensions/anvil/representation.d.ts +63 -0
- package/lib/extensions/cellpack/representation.d.ts +13 -0
- package/lib/extensions/dnatco/confal-pyramids/representation.d.ts +39 -0
- 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 +7 -0
- package/lib/extensions/rcsb/assembly-symmetry/prop.js +1 -1
- package/lib/extensions/rcsb/assembly-symmetry/representation.d.ts +13 -0
- package/lib/extensions/rcsb/validation-report/prop.js +1 -1
- package/lib/extensions/rcsb/validation-report/representation.d.ts +65 -0
- package/lib/mol-canvas3d/canvas3d.d.ts +8 -8
- package/lib/mol-canvas3d/canvas3d.js +12 -4
- package/lib/mol-canvas3d/helper/bounding-sphere-helper.js +3 -2
- package/lib/mol-canvas3d/helper/camera-helper.d.ts +7 -0
- package/lib/mol-canvas3d/helper/camera-helper.js +2 -2
- package/lib/mol-canvas3d/helper/handle-helper.d.ts +7 -0
- package/lib/mol-canvas3d/helper/handle-helper.js +2 -2
- package/lib/mol-canvas3d/helper/helper.d.ts +6 -0
- package/lib/mol-canvas3d/passes/image.d.ts +4 -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/pick.js +9 -9
- package/lib/mol-canvas3d/passes/postprocessing.d.ts +1 -0
- package/lib/mol-canvas3d/passes/postprocessing.js +6 -4
- package/lib/mol-canvas3d/passes/smaa.js +1 -1
- package/lib/mol-geo/geometry/base.d.ts +20 -0
- package/lib/mol-geo/geometry/base.js +20 -1
- package/lib/mol-geo/geometry/clipping-data.d.ts +1 -3
- package/lib/mol-geo/geometry/clipping-data.js +3 -8
- package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +14 -1
- package/lib/mol-geo/geometry/cylinders/cylinders.js +5 -3
- package/lib/mol-geo/geometry/direct-volume/direct-volume.d.ts +11 -0
- package/lib/mol-geo/geometry/direct-volume/direct-volume.js +2 -2
- package/lib/mol-geo/geometry/image/image.d.ts +11 -0
- package/lib/mol-geo/geometry/lines/lines.d.ts +12 -0
- package/lib/mol-geo/geometry/lines/lines.js +1 -1
- package/lib/mol-geo/geometry/marker-data.d.ts +0 -1
- package/lib/mol-geo/geometry/marker-data.js +0 -4
- package/lib/mol-geo/geometry/mesh/color-smoothing.js +1 -1
- package/lib/mol-geo/geometry/mesh/mesh.d.ts +13 -0
- package/lib/mol-geo/geometry/mesh/mesh.js +5 -3
- package/lib/mol-geo/geometry/points/points.d.ts +11 -0
- package/lib/mol-geo/geometry/spheres/spheres.d.ts +13 -0
- package/lib/mol-geo/geometry/spheres/spheres.js +5 -3
- package/lib/mol-geo/geometry/substance-data.js +3 -3
- package/lib/mol-geo/geometry/text/text.d.ts +11 -0
- package/lib/mol-geo/geometry/texture-mesh/color-smoothing.js +3 -3
- package/lib/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +13 -0
- package/lib/mol-geo/geometry/texture-mesh/texture-mesh.js +5 -3
- package/lib/mol-gl/render-object.d.ts +2 -1
- package/lib/mol-gl/render-object.js +10 -10
- package/lib/mol-gl/renderable/cylinders.d.ts +41 -33
- package/lib/mol-gl/renderable/cylinders.js +5 -5
- package/lib/mol-gl/renderable/direct-volume.d.ts +11 -5
- package/lib/mol-gl/renderable/direct-volume.js +3 -3
- package/lib/mol-gl/renderable/image.d.ts +10 -4
- package/lib/mol-gl/renderable/image.js +2 -2
- package/lib/mol-gl/renderable/lines.d.ts +38 -32
- package/lib/mol-gl/renderable/lines.js +4 -4
- package/lib/mol-gl/renderable/mesh.d.ts +38 -30
- package/lib/mol-gl/renderable/mesh.js +5 -5
- package/lib/mol-gl/renderable/points.d.ts +10 -4
- package/lib/mol-gl/renderable/points.js +2 -2
- package/lib/mol-gl/renderable/schema.d.ts +10 -11
- package/lib/mol-gl/renderable/schema.js +6 -12
- package/lib/mol-gl/renderable/spheres.d.ts +41 -33
- package/lib/mol-gl/renderable/spheres.js +5 -5
- package/lib/mol-gl/renderable/text.d.ts +10 -4
- package/lib/mol-gl/renderable/text.js +2 -2
- package/lib/mol-gl/renderable/texture-mesh.d.ts +13 -5
- package/lib/mol-gl/renderable/texture-mesh.js +3 -3
- package/lib/mol-gl/renderable.d.ts +0 -1
- package/lib/mol-gl/renderer.d.ts +12 -12
- package/lib/mol-gl/renderer.js +13 -75
- package/lib/mol-gl/scene.d.ts +2 -2
- package/lib/mol-gl/scene.js +7 -5
- 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-marker-varying.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/assign-marker-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-vert-params.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/common-vert-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/image.frag.d.ts +1 -1
- package/lib/mol-gl/shader/image.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/mesh.vert.d.ts +1 -1
- package/lib/mol-gl/shader/mesh.vert.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-code.d.ts +3 -1
- package/lib/mol-gl/shader-code.js +42 -13
- package/lib/mol-gl/webgl/render-item.d.ts +7 -6
- package/lib/mol-gl/webgl/render-item.js +8 -6
- package/lib/mol-gl/webgl/resources.js +8 -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-math/linear-algebra/3d/quat.d.ts +9 -1
- package/lib/mol-math/linear-algebra/3d/quat.js +20 -1
- 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 +26 -0
- package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +13 -0
- package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +13 -0
- package/lib/mol-model-props/computed/representations/interactions.d.ts +39 -0
- package/lib/mol-model-props/integrative/cross-link-restraint/representation.d.ts +52 -0
- package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +12 -0
- package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +3 -1
- package/lib/mol-plugin/commands.d.ts +4 -4
- package/lib/mol-plugin/config.d.ts +2 -0
- package/lib/mol-plugin/config.js +9 -3
- package/lib/mol-plugin/spec.js +1 -0
- package/lib/mol-plugin/util/viewport-screenshot.d.ts +21 -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-clipping.d.ts +1 -1
- package/lib/mol-plugin-state/helpers/structure-clipping.js +1 -1
- package/lib/mol-plugin-state/helpers/structure-selection-query.js +34 -20
- package/lib/mol-plugin-state/manager/structure/component.d.ts +15 -1
- package/lib/mol-plugin-state/manager/structure/component.js +14 -9
- package/lib/mol-plugin-state/transforms/representation.d.ts +54 -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/components/misc.scss +27 -0
- package/lib/mol-plugin-ui/viewport/simple-settings.js +2 -6
- package/lib/mol-repr/shape/loci/angle.d.ts +13 -0
- package/lib/mol-repr/shape/loci/common.d.ts +11 -0
- package/lib/mol-repr/shape/loci/dihedral.d.ts +13 -0
- package/lib/mol-repr/shape/loci/distance.d.ts +11 -0
- package/lib/mol-repr/shape/loci/label.d.ts +11 -0
- package/lib/mol-repr/shape/loci/orientation.d.ts +13 -0
- package/lib/mol-repr/shape/loci/plane.d.ts +13 -0
- package/lib/mol-repr/shape/model/unitcell.d.ts +13 -0
- package/lib/mol-repr/structure/complex-visual.d.ts +72 -0
- package/lib/mol-repr/structure/params.d.ts +96 -0
- package/lib/mol-repr/structure/registry.d.ts +175 -1
- package/lib/mol-repr/structure/representation/backbone.d.ts +39 -0
- package/lib/mol-repr/structure/representation/backbone.js +2 -1
- package/lib/mol-repr/structure/representation/ball-and-stick.d.ts +39 -0
- package/lib/mol-repr/structure/representation/ball-and-stick.js +2 -1
- package/lib/mol-repr/structure/representation/carbohydrate.d.ts +39 -0
- package/lib/mol-repr/structure/representation/carbohydrate.js +2 -1
- package/lib/mol-repr/structure/representation/cartoon.d.ts +39 -0
- package/lib/mol-repr/structure/representation/cartoon.js +2 -1
- package/lib/mol-repr/structure/representation/ellipsoid.d.ts +39 -0
- package/lib/mol-repr/structure/representation/ellipsoid.js +2 -1
- package/lib/mol-repr/structure/representation/gaussian-surface.d.ts +39 -0
- package/lib/mol-repr/structure/representation/gaussian-surface.js +2 -1
- package/lib/mol-repr/structure/representation/gaussian-volume.d.ts +33 -0
- package/lib/mol-repr/structure/representation/label.d.ts +36 -3
- package/lib/mol-repr/structure/representation/line.d.ts +33 -0
- package/lib/mol-repr/structure/representation/molecular-surface.d.ts +39 -0
- package/lib/mol-repr/structure/representation/molecular-surface.js +2 -1
- package/lib/mol-repr/structure/representation/orientation.d.ts +39 -0
- package/lib/mol-repr/structure/representation/orientation.js +2 -1
- package/lib/mol-repr/structure/representation/point.d.ts +33 -0
- package/lib/mol-repr/structure/representation/putty.d.ts +39 -0
- package/lib/mol-repr/structure/representation/putty.js +2 -1
- package/lib/mol-repr/structure/representation/spacefill.d.ts +39 -0
- package/lib/mol-repr/structure/representation/spacefill.js +2 -1
- package/lib/mol-repr/structure/units-visual.d.ts +96 -0
- package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +26 -0
- package/lib/mol-repr/structure/visual/bond-inter-unit-line.d.ts +11 -0
- package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +26 -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 +11 -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 +13 -0
- package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +13 -0
- package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +13 -0
- package/lib/mol-repr/structure/visual/element-cross.d.ts +11 -0
- package/lib/mol-repr/structure/visual/element-point.d.ts +11 -0
- package/lib/mol-repr/structure/visual/element-sphere.d.ts +26 -0
- package/lib/mol-repr/structure/visual/ellipsoid-mesh.d.ts +13 -0
- package/lib/mol-repr/structure/visual/gaussian-density-volume.d.ts +22 -0
- package/lib/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +52 -0
- package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +11 -0
- package/lib/mol-repr/structure/visual/label-text.d.ts +13 -2
- package/lib/mol-repr/structure/visual/label-text.js +2 -2
- package/lib/mol-repr/structure/visual/molecular-surface-mesh.d.ts +13 -0
- package/lib/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +11 -0
- package/lib/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +13 -0
- package/lib/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +13 -0
- package/lib/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +13 -0
- package/lib/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +26 -0
- package/lib/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +26 -0
- package/lib/mol-repr/structure/visual/polymer-direction-wedge.d.ts +13 -0
- package/lib/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +13 -0
- package/lib/mol-repr/structure/visual/polymer-trace-mesh.d.ts +13 -0
- package/lib/mol-repr/structure/visual/polymer-trace-mesh.js +1 -1
- package/lib/mol-repr/structure/visual/polymer-tube-mesh.d.ts +13 -0
- package/lib/mol-repr/structure/visual/util/bond.js +1 -1
- package/lib/mol-repr/visual.js +11 -7
- package/lib/mol-repr/volume/direct-volume.d.ts +33 -0
- package/lib/mol-repr/volume/isosurface.d.ts +76 -0
- package/lib/mol-repr/volume/isosurface.js +2 -1
- package/lib/mol-repr/volume/registry.d.ts +35 -0
- package/lib/mol-repr/volume/representation.d.ts +11 -0
- package/lib/mol-repr/volume/slice.d.ts +33 -0
- package/lib/mol-theme/clipping.d.ts +7 -15
- package/lib/mol-theme/clipping.js +5 -12
- 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/clip.d.ts +49 -0
- package/lib/mol-util/clip.js +93 -0
- package/lib/mol-util/material.d.ts +5 -1
- package/lib/mol-util/material.js +9 -7
- package/package.json +5 -3
package/lib/apps/viewer/index.js
CHANGED
|
@@ -10,19 +10,24 @@ import { CellPack } from '../../extensions/cellpack';
|
|
|
10
10
|
import { DnatcoConfalPyramids } from '../../extensions/dnatco';
|
|
11
11
|
import { G3DFormat, G3dProvider } from '../../extensions/g3d/format';
|
|
12
12
|
import { GeometryExport } from '../../extensions/geo-export';
|
|
13
|
+
import { MAQualityAssessment } from '../../extensions/model-archive/quality-assessment/behavior';
|
|
14
|
+
import { QualityAssessmentPLDDTPreset, QualityAssessmentQmeanPreset } from '../../extensions/model-archive/quality-assessment/behavior';
|
|
15
|
+
import { QualityAssessment } from '../../extensions/model-archive/quality-assessment/prop';
|
|
13
16
|
import { Mp4Export } from '../../extensions/mp4-export';
|
|
14
17
|
import { PDBeStructureQualityReport } from '../../extensions/pdbe';
|
|
15
18
|
import { RCSBAssemblySymmetry, RCSBValidationReport } from '../../extensions/rcsb';
|
|
16
19
|
import { DownloadStructure, PdbDownloadProvider } from '../../mol-plugin-state/actions/structure';
|
|
17
20
|
import { DownloadDensity } from '../../mol-plugin-state/actions/volume';
|
|
21
|
+
import { PresetStructureRepresentations, StructureRepresentationPresetProvider } from '../../mol-plugin-state/builder/structure/representation-preset';
|
|
18
22
|
import { createVolumeRepresentationParams } from '../../mol-plugin-state/helpers/volume-representation-params';
|
|
19
23
|
import { StateTransforms } from '../../mol-plugin-state/transforms';
|
|
20
24
|
import { TrajectoryFromModelAndCoordinates } from '../../mol-plugin-state/transforms/model';
|
|
21
|
-
import {
|
|
25
|
+
import { createPluginUI } from '../../mol-plugin-ui';
|
|
22
26
|
import { DefaultPluginUISpec } from '../../mol-plugin-ui/spec';
|
|
23
27
|
import { PluginCommands } from '../../mol-plugin/commands';
|
|
24
28
|
import { PluginConfig } from '../../mol-plugin/config';
|
|
25
29
|
import { PluginSpec } from '../../mol-plugin/spec';
|
|
30
|
+
import { StateObjectRef } from '../../mol-state';
|
|
26
31
|
import { Asset } from '../../mol-util/assets';
|
|
27
32
|
import '../../mol-util/polyfill';
|
|
28
33
|
import { ObjectKeys } from '../../mol-util/type-helpers';
|
|
@@ -44,7 +49,8 @@ var Extensions = {
|
|
|
44
49
|
'anvil-membrane-orientation': PluginSpec.Behavior(ANVILMembraneOrientation),
|
|
45
50
|
'g3d': PluginSpec.Behavior(G3DFormat),
|
|
46
51
|
'mp4-export': PluginSpec.Behavior(Mp4Export),
|
|
47
|
-
'geo-export': PluginSpec.Behavior(GeometryExport)
|
|
52
|
+
'geo-export': PluginSpec.Behavior(GeometryExport),
|
|
53
|
+
'ma-quality-assessment': PluginSpec.Behavior(MAQualityAssessment),
|
|
48
54
|
};
|
|
49
55
|
var DefaultViewerOptions = {
|
|
50
56
|
customFormats: CustomFormats,
|
|
@@ -75,57 +81,78 @@ var DefaultViewerOptions = {
|
|
|
75
81
|
emdbProvider: PluginConfig.Download.DefaultEmdbProvider.defaultValue,
|
|
76
82
|
};
|
|
77
83
|
var Viewer = /** @class */ (function () {
|
|
78
|
-
function Viewer(
|
|
79
|
-
|
|
80
|
-
var _a;
|
|
81
|
-
var o = __assign(__assign({}, DefaultViewerOptions), options);
|
|
82
|
-
var defaultSpec = DefaultPluginUISpec();
|
|
83
|
-
var spec = {
|
|
84
|
-
actions: defaultSpec.actions,
|
|
85
|
-
behaviors: __spreadArray(__spreadArray([], defaultSpec.behaviors, true), o.extensions.map(function (e) { return Extensions[e]; }), true),
|
|
86
|
-
animations: __spreadArray([], defaultSpec.animations || [], true),
|
|
87
|
-
customParamEditors: defaultSpec.customParamEditors,
|
|
88
|
-
customFormats: o === null || o === void 0 ? void 0 : o.customFormats,
|
|
89
|
-
layout: {
|
|
90
|
-
initial: {
|
|
91
|
-
isExpanded: o.layoutIsExpanded,
|
|
92
|
-
showControls: o.layoutShowControls,
|
|
93
|
-
controlsDisplay: o.layoutControlsDisplay,
|
|
94
|
-
regionState: {
|
|
95
|
-
bottom: 'full',
|
|
96
|
-
left: o.collapseLeftPanel ? 'collapsed' : 'full',
|
|
97
|
-
right: o.collapseRightPanel ? 'hidden' : 'full',
|
|
98
|
-
top: 'full',
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
components: __assign(__assign({}, defaultSpec.components), { controls: __assign(__assign({}, (_a = defaultSpec.components) === null || _a === void 0 ? void 0 : _a.controls), { top: o.layoutShowSequence ? undefined : 'none', bottom: o.layoutShowLog ? undefined : 'none', left: o.layoutShowLeftPanel ? undefined : 'none' }), remoteState: o.layoutShowRemoteState ? 'default' : 'none' }),
|
|
103
|
-
config: [
|
|
104
|
-
[PluginConfig.General.DisableAntialiasing, o.disableAntialiasing],
|
|
105
|
-
[PluginConfig.General.PixelScale, o.pixelScale],
|
|
106
|
-
[PluginConfig.General.PickScale, o.pickScale],
|
|
107
|
-
[PluginConfig.General.PickPadding, o.pickPadding],
|
|
108
|
-
[PluginConfig.General.EnableWboit, o.enableWboit],
|
|
109
|
-
[PluginConfig.Viewport.ShowExpand, o.viewportShowExpand],
|
|
110
|
-
[PluginConfig.Viewport.ShowControls, o.viewportShowControls],
|
|
111
|
-
[PluginConfig.Viewport.ShowSettings, o.viewportShowSettings],
|
|
112
|
-
[PluginConfig.Viewport.ShowSelectionMode, o.viewportShowSelectionMode],
|
|
113
|
-
[PluginConfig.Viewport.ShowAnimation, o.viewportShowAnimation],
|
|
114
|
-
[PluginConfig.State.DefaultServer, o.pluginStateServer],
|
|
115
|
-
[PluginConfig.State.CurrentServer, o.pluginStateServer],
|
|
116
|
-
[PluginConfig.VolumeStreaming.DefaultServer, o.volumeStreamingServer],
|
|
117
|
-
[PluginConfig.VolumeStreaming.Enabled, !o.volumeStreamingDisabled],
|
|
118
|
-
[PluginConfig.Download.DefaultPdbProvider, o.pdbProvider],
|
|
119
|
-
[PluginConfig.Download.DefaultEmdbProvider, o.emdbProvider]
|
|
120
|
-
]
|
|
121
|
-
};
|
|
122
|
-
var element = typeof elementOrId === 'string'
|
|
123
|
-
? document.getElementById(elementOrId)
|
|
124
|
-
: elementOrId;
|
|
125
|
-
if (!element)
|
|
126
|
-
throw new Error("Could not get element with id '".concat(elementOrId, "'"));
|
|
127
|
-
this.plugin = createPlugin(element, spec);
|
|
84
|
+
function Viewer(plugin) {
|
|
85
|
+
this.plugin = plugin;
|
|
128
86
|
}
|
|
87
|
+
Viewer.create = function (elementOrId, options) {
|
|
88
|
+
var _a;
|
|
89
|
+
if (options === void 0) { options = {}; }
|
|
90
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
91
|
+
var o, defaultSpec, spec, element, plugin;
|
|
92
|
+
return __generator(this, function (_b) {
|
|
93
|
+
switch (_b.label) {
|
|
94
|
+
case 0:
|
|
95
|
+
o = __assign(__assign({}, DefaultViewerOptions), options);
|
|
96
|
+
defaultSpec = DefaultPluginUISpec();
|
|
97
|
+
spec = {
|
|
98
|
+
actions: defaultSpec.actions,
|
|
99
|
+
behaviors: __spreadArray(__spreadArray([], defaultSpec.behaviors, true), o.extensions.map(function (e) { return Extensions[e]; }), true),
|
|
100
|
+
animations: __spreadArray([], defaultSpec.animations || [], true),
|
|
101
|
+
customParamEditors: defaultSpec.customParamEditors,
|
|
102
|
+
customFormats: o === null || o === void 0 ? void 0 : o.customFormats,
|
|
103
|
+
layout: {
|
|
104
|
+
initial: {
|
|
105
|
+
isExpanded: o.layoutIsExpanded,
|
|
106
|
+
showControls: o.layoutShowControls,
|
|
107
|
+
controlsDisplay: o.layoutControlsDisplay,
|
|
108
|
+
regionState: {
|
|
109
|
+
bottom: 'full',
|
|
110
|
+
left: o.collapseLeftPanel ? 'collapsed' : 'full',
|
|
111
|
+
right: o.collapseRightPanel ? 'hidden' : 'full',
|
|
112
|
+
top: 'full',
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
components: __assign(__assign({}, defaultSpec.components), { controls: __assign(__assign({}, (_a = defaultSpec.components) === null || _a === void 0 ? void 0 : _a.controls), { top: o.layoutShowSequence ? undefined : 'none', bottom: o.layoutShowLog ? undefined : 'none', left: o.layoutShowLeftPanel ? undefined : 'none' }), remoteState: o.layoutShowRemoteState ? 'default' : 'none' }),
|
|
117
|
+
config: [
|
|
118
|
+
[PluginConfig.General.DisableAntialiasing, o.disableAntialiasing],
|
|
119
|
+
[PluginConfig.General.PixelScale, o.pixelScale],
|
|
120
|
+
[PluginConfig.General.PickScale, o.pickScale],
|
|
121
|
+
[PluginConfig.General.PickPadding, o.pickPadding],
|
|
122
|
+
[PluginConfig.General.EnableWboit, o.enableWboit],
|
|
123
|
+
[PluginConfig.Viewport.ShowExpand, o.viewportShowExpand],
|
|
124
|
+
[PluginConfig.Viewport.ShowControls, o.viewportShowControls],
|
|
125
|
+
[PluginConfig.Viewport.ShowSettings, o.viewportShowSettings],
|
|
126
|
+
[PluginConfig.Viewport.ShowSelectionMode, o.viewportShowSelectionMode],
|
|
127
|
+
[PluginConfig.Viewport.ShowAnimation, o.viewportShowAnimation],
|
|
128
|
+
[PluginConfig.State.DefaultServer, o.pluginStateServer],
|
|
129
|
+
[PluginConfig.State.CurrentServer, o.pluginStateServer],
|
|
130
|
+
[PluginConfig.VolumeStreaming.DefaultServer, o.volumeStreamingServer],
|
|
131
|
+
[PluginConfig.VolumeStreaming.Enabled, !o.volumeStreamingDisabled],
|
|
132
|
+
[PluginConfig.Download.DefaultPdbProvider, o.pdbProvider],
|
|
133
|
+
[PluginConfig.Download.DefaultEmdbProvider, o.emdbProvider],
|
|
134
|
+
[PluginConfig.Structure.DefaultRepresentationPreset, ViewerAutoPreset.id],
|
|
135
|
+
]
|
|
136
|
+
};
|
|
137
|
+
element = typeof elementOrId === 'string'
|
|
138
|
+
? document.getElementById(elementOrId)
|
|
139
|
+
: elementOrId;
|
|
140
|
+
if (!element)
|
|
141
|
+
throw new Error("Could not get element with id '".concat(elementOrId, "'"));
|
|
142
|
+
return [4 /*yield*/, createPluginUI(element, spec, {
|
|
143
|
+
onBeforeUIRender: function (plugin) {
|
|
144
|
+
// the preset needs to be added before the UI renders otherwise
|
|
145
|
+
// "Download Structure" wont be able to pick it up
|
|
146
|
+
plugin.builders.structure.representation.registerPreset(ViewerAutoPreset);
|
|
147
|
+
}
|
|
148
|
+
})];
|
|
149
|
+
case 1:
|
|
150
|
+
plugin = _b.sent();
|
|
151
|
+
return [2 /*return*/, new Viewer(plugin)];
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
};
|
|
129
156
|
Viewer.prototype.setRemoteSnapshot = function (id) {
|
|
130
157
|
var url = "".concat(this.plugin.config.get(PluginConfig.State.CurrentServer), "/get/").concat(id);
|
|
131
158
|
return PluginCommands.State.Snapshots.Fetch(this.plugin, { url: url });
|
|
@@ -241,6 +268,30 @@ var Viewer = /** @class */ (function () {
|
|
|
241
268
|
}
|
|
242
269
|
}));
|
|
243
270
|
};
|
|
271
|
+
Viewer.prototype.loadAlphaFoldDb = function (afdb) {
|
|
272
|
+
var params = DownloadStructure.createDefaultParams(this.plugin.state.data.root.obj, this.plugin);
|
|
273
|
+
return this.plugin.runTask(this.plugin.state.data.applyAction(DownloadStructure, {
|
|
274
|
+
source: {
|
|
275
|
+
name: 'alphafolddb',
|
|
276
|
+
params: {
|
|
277
|
+
id: afdb,
|
|
278
|
+
options: __assign(__assign({}, params.source.params.options), { representation: 'preset-structure-representation-ma-quality-assessment-plddt' }),
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}));
|
|
282
|
+
};
|
|
283
|
+
Viewer.prototype.loadModelArchive = function (id) {
|
|
284
|
+
var params = DownloadStructure.createDefaultParams(this.plugin.state.data.root.obj, this.plugin);
|
|
285
|
+
return this.plugin.runTask(this.plugin.state.data.applyAction(DownloadStructure, {
|
|
286
|
+
source: {
|
|
287
|
+
name: 'modelarchive',
|
|
288
|
+
params: {
|
|
289
|
+
id: id,
|
|
290
|
+
options: params.source.params.options,
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}));
|
|
294
|
+
};
|
|
244
295
|
/**
|
|
245
296
|
* @example Load X-ray density from volume server
|
|
246
297
|
viewer.loadVolumeFromUrl({
|
|
@@ -427,4 +478,40 @@ var Viewer = /** @class */ (function () {
|
|
|
427
478
|
return Viewer;
|
|
428
479
|
}());
|
|
429
480
|
export { Viewer };
|
|
481
|
+
export var ViewerAutoPreset = StructureRepresentationPresetProvider({
|
|
482
|
+
id: 'preset-structure-representation-viewer-auto',
|
|
483
|
+
display: {
|
|
484
|
+
name: 'Automatic (w/ Annotation)', group: 'Annotation',
|
|
485
|
+
description: 'Show standard automatic representation but colored by quality assessment (if available in the model).'
|
|
486
|
+
},
|
|
487
|
+
isApplicable: function (a) {
|
|
488
|
+
return (!!a.data.models.some(function (m) { return QualityAssessment.isApplicable(m, 'pLDDT'); }) ||
|
|
489
|
+
!!a.data.models.some(function (m) { return QualityAssessment.isApplicable(m, 'qmean'); }));
|
|
490
|
+
},
|
|
491
|
+
params: function () { return StructureRepresentationPresetProvider.CommonParams; },
|
|
492
|
+
apply: function (ref, params, plugin) {
|
|
493
|
+
var _a;
|
|
494
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
495
|
+
var structureCell, structure;
|
|
496
|
+
return __generator(this, function (_b) {
|
|
497
|
+
switch (_b.label) {
|
|
498
|
+
case 0:
|
|
499
|
+
structureCell = StateObjectRef.resolveAndCheck(plugin.state.data, ref);
|
|
500
|
+
structure = (_a = structureCell === null || structureCell === void 0 ? void 0 : structureCell.obj) === null || _a === void 0 ? void 0 : _a.data;
|
|
501
|
+
if (!structureCell || !structure)
|
|
502
|
+
return [2 /*return*/, {}];
|
|
503
|
+
if (!!!structure.models.some(function (m) { return QualityAssessment.isApplicable(m, 'pLDDT'); })) return [3 /*break*/, 2];
|
|
504
|
+
return [4 /*yield*/, QualityAssessmentPLDDTPreset.apply(ref, params, plugin)];
|
|
505
|
+
case 1: return [2 /*return*/, _b.sent()];
|
|
506
|
+
case 2:
|
|
507
|
+
if (!!!structure.models.some(function (m) { return QualityAssessment.isApplicable(m, 'qmean'); })) return [3 /*break*/, 4];
|
|
508
|
+
return [4 /*yield*/, QualityAssessmentQmeanPreset.apply(ref, params, plugin)];
|
|
509
|
+
case 3: return [2 /*return*/, _b.sent()];
|
|
510
|
+
case 4: return [4 /*yield*/, PresetStructureRepresentations.auto.apply(ref, params, plugin)];
|
|
511
|
+
case 5: return [2 /*return*/, _b.sent()];
|
|
512
|
+
}
|
|
513
|
+
});
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
});
|
|
430
517
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2017-
|
|
3
|
+
* Copyright (c) 2017-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2017-
|
|
3
|
+
* Copyright (c) 2017-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
6
6
|
*/
|
|
@@ -23,7 +23,7 @@ function getDicNamespace(block) {
|
|
|
23
23
|
function runGenerateSchemaMmcif(name, fieldNamesPath, typescript, out, moldbImportPath, addAliases) {
|
|
24
24
|
if (typescript === void 0) { typescript = false; }
|
|
25
25
|
return __awaiter(this, void 0, void 0, function () {
|
|
26
|
-
var mmcifDic, ihmDic,
|
|
26
|
+
var mmcifDic, ihmDic, maDic, mmcifDicVersion, ihmDicVersion, maDicVersion, version, frames, schema;
|
|
27
27
|
return __generator(this, function (_a) {
|
|
28
28
|
switch (_a.label) {
|
|
29
29
|
case 0: return [4 /*yield*/, ensureMmcifDicAvailable()];
|
|
@@ -42,30 +42,22 @@ function runGenerateSchemaMmcif(name, fieldNamesPath, typescript, out, moldbImpo
|
|
|
42
42
|
ihmDic = _a.sent();
|
|
43
43
|
if (ihmDic.isError)
|
|
44
44
|
throw ihmDic;
|
|
45
|
-
return [4 /*yield*/,
|
|
45
|
+
return [4 /*yield*/, ensureMaDicAvailable()];
|
|
46
46
|
case 5:
|
|
47
47
|
_a.sent();
|
|
48
|
-
return [4 /*yield*/, parseCifText(fs.readFileSync(
|
|
48
|
+
return [4 /*yield*/, parseCifText(fs.readFileSync(MA_DIC_PATH, 'utf8')).run()];
|
|
49
49
|
case 6:
|
|
50
|
-
|
|
51
|
-
if (
|
|
52
|
-
throw
|
|
53
|
-
return [4 /*yield*/, ensureCarbCompDicAvailable()];
|
|
54
|
-
case 7:
|
|
55
|
-
_a.sent();
|
|
56
|
-
return [4 /*yield*/, parseCifText(fs.readFileSync(CARB_COMP_DIC_PATH, 'utf8')).run()];
|
|
57
|
-
case 8:
|
|
58
|
-
carbCompDic = _a.sent();
|
|
59
|
-
if (carbCompDic.isError)
|
|
60
|
-
throw carbCompDic;
|
|
50
|
+
maDic = _a.sent();
|
|
51
|
+
if (maDic.isError)
|
|
52
|
+
throw maDic;
|
|
61
53
|
mmcifDicVersion = getDicVersion(mmcifDic.result.blocks[0]);
|
|
62
54
|
ihmDicVersion = getDicVersion(ihmDic.result.blocks[0]);
|
|
63
|
-
|
|
64
|
-
version = "Dictionary versions: mmCIF ".concat(mmcifDicVersion, ", IHM ").concat(ihmDicVersion, ",
|
|
65
|
-
frames = __spreadArray(__spreadArray(__spreadArray(
|
|
55
|
+
maDicVersion = getDicVersion(maDic.result.blocks[0]);
|
|
56
|
+
version = "Dictionary versions: mmCIF ".concat(mmcifDicVersion, ", IHM ").concat(ihmDicVersion, ", MA ").concat(maDicVersion, ".");
|
|
57
|
+
frames = __spreadArray(__spreadArray(__spreadArray([], mmcifDic.result.blocks[0].saveFrames, true), ihmDic.result.blocks[0].saveFrames, true), maDic.result.blocks[0].saveFrames, true);
|
|
66
58
|
schema = generateSchema(frames);
|
|
67
59
|
return [4 /*yield*/, runGenerateSchema(name, version, schema, fieldNamesPath, typescript, out, moldbImportPath, addAliases)];
|
|
68
|
-
case
|
|
60
|
+
case 7:
|
|
69
61
|
_a.sent();
|
|
70
62
|
return [2 /*return*/];
|
|
71
63
|
}
|
|
@@ -249,20 +241,10 @@ function ensureIhmDicAvailable() {
|
|
|
249
241
|
}
|
|
250
242
|
}); });
|
|
251
243
|
}
|
|
252
|
-
function
|
|
253
|
-
return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
254
|
-
switch (_a.label) {
|
|
255
|
-
case 0: return [4 /*yield*/, ensureDicAvailable(CARB_BRANCH_DIC_PATH, CARB_BRANCH_DIC_URL)];
|
|
256
|
-
case 1:
|
|
257
|
-
_a.sent();
|
|
258
|
-
return [2 /*return*/];
|
|
259
|
-
}
|
|
260
|
-
}); });
|
|
261
|
-
}
|
|
262
|
-
function ensureCarbCompDicAvailable() {
|
|
244
|
+
function ensureMaDicAvailable() {
|
|
263
245
|
return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
264
246
|
switch (_a.label) {
|
|
265
|
-
case 0: return [4 /*yield*/, ensureDicAvailable(
|
|
247
|
+
case 0: return [4 /*yield*/, ensureDicAvailable(MA_DIC_PATH, MA_DIC_URL)];
|
|
266
248
|
case 1:
|
|
267
249
|
_a.sent();
|
|
268
250
|
return [2 /*return*/];
|
|
@@ -319,10 +301,8 @@ var MMCIF_DIC_PATH = "".concat(DIC_DIR, "/mmcif_pdbx_v50.dic");
|
|
|
319
301
|
var MMCIF_DIC_URL = 'http://mmcif.wwpdb.org/dictionaries/ascii/mmcif_pdbx_v50.dic';
|
|
320
302
|
var IHM_DIC_PATH = "".concat(DIC_DIR, "/ihm-extension.dic");
|
|
321
303
|
var IHM_DIC_URL = 'https://raw.githubusercontent.com/ihmwg/IHM-dictionary/master/ihm-extension.dic';
|
|
322
|
-
var
|
|
323
|
-
var
|
|
324
|
-
var CARB_COMP_DIC_PATH = "".concat(DIC_DIR, "/chem_comp-extension.dic");
|
|
325
|
-
var CARB_COMP_DIC_URL = 'https://raw.githubusercontent.com/pdbxmmcifwg/carbohydrate-extension/master/dict/chem_comp-extension.dic';
|
|
304
|
+
var MA_DIC_PATH = "".concat(DIC_DIR, "/ma-extension.dic");
|
|
305
|
+
var MA_DIC_URL = 'https://raw.githubusercontent.com/ihmwg/MA-dictionary/master/mmcif_ma.dic';
|
|
326
306
|
var CIF_CORE_DIC_PATH = "".concat(DIC_DIR, "/cif_core.dic");
|
|
327
307
|
var CIF_CORE_DIC_URL = 'https://raw.githubusercontent.com/COMCIFS/cif_core/master/cif_core.dic';
|
|
328
308
|
var CIF_CORE_ENUM_PATH = "".concat(DIC_DIR, "/templ_enum.cif");
|
|
@@ -14,7 +14,8 @@ export { setDebugMode, setProductionMode } from '../../mol-util/debug';
|
|
|
14
14
|
export { Viewer as DockingViewer };
|
|
15
15
|
declare class Viewer {
|
|
16
16
|
plugin: PluginUIContext;
|
|
17
|
-
constructor(
|
|
17
|
+
constructor(plugin: PluginUIContext);
|
|
18
|
+
static create(elementOrId: string | HTMLElement, colors?: Color[], showButtons?: boolean): Promise<Viewer>;
|
|
18
19
|
loadStructuresFromUrlsAndMerge(sources: {
|
|
19
20
|
url: string;
|
|
20
21
|
format: BuiltInTrajectoryFormat;
|
|
@@ -51,82 +51,95 @@ var DefaultViewerOptions = {
|
|
|
51
51
|
emdbProvider: config_1.PluginConfig.Download.DefaultEmdbProvider.defaultValue,
|
|
52
52
|
};
|
|
53
53
|
var Viewer = /** @class */ (function () {
|
|
54
|
-
function Viewer(
|
|
55
|
-
|
|
54
|
+
function Viewer(plugin) {
|
|
55
|
+
this.plugin = plugin;
|
|
56
|
+
}
|
|
57
|
+
Viewer.create = function (elementOrId, colors, showButtons) {
|
|
58
|
+
var _a;
|
|
56
59
|
if (colors === void 0) { colors = [(0, color_1.Color)(0x992211), (0, color_1.Color)(0xDDDDDD)]; }
|
|
57
60
|
if (showButtons === void 0) { showButtons = true; }
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
61
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
|
|
62
|
+
var o, defaultSpec, spec, element, plugin;
|
|
63
|
+
return (0, tslib_1.__generator)(this, function (_b) {
|
|
64
|
+
switch (_b.label) {
|
|
65
|
+
case 0:
|
|
66
|
+
o = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, DefaultViewerOptions), {
|
|
67
|
+
layoutIsExpanded: false,
|
|
68
|
+
layoutShowControls: false,
|
|
69
|
+
layoutShowRemoteState: false,
|
|
70
|
+
layoutShowSequence: true,
|
|
71
|
+
layoutShowLog: false,
|
|
72
|
+
layoutShowLeftPanel: true,
|
|
73
|
+
viewportShowExpand: true,
|
|
74
|
+
viewportShowControls: false,
|
|
75
|
+
viewportShowSettings: false,
|
|
76
|
+
viewportShowSelectionMode: false,
|
|
77
|
+
viewportShowAnimation: false,
|
|
78
|
+
});
|
|
79
|
+
defaultSpec = (0, spec_1.DefaultPluginUISpec)();
|
|
80
|
+
spec = {
|
|
81
|
+
actions: defaultSpec.actions,
|
|
82
|
+
behaviors: [
|
|
83
|
+
spec_2.PluginSpec.Behavior(behavior_1.PluginBehaviors.Representation.HighlightLoci, { mark: false }),
|
|
84
|
+
spec_2.PluginSpec.Behavior(behavior_1.PluginBehaviors.Representation.DefaultLociLabelProvider),
|
|
85
|
+
spec_2.PluginSpec.Behavior(behavior_1.PluginBehaviors.Camera.FocusLoci),
|
|
86
|
+
spec_2.PluginSpec.Behavior(behavior_1.PluginBehaviors.CustomProps.StructureInfo),
|
|
87
|
+
spec_2.PluginSpec.Behavior(behavior_1.PluginBehaviors.CustomProps.Interactions),
|
|
88
|
+
spec_2.PluginSpec.Behavior(behavior_1.PluginBehaviors.CustomProps.SecondaryStructure),
|
|
89
|
+
],
|
|
90
|
+
animations: defaultSpec.animations,
|
|
91
|
+
customParamEditors: defaultSpec.customParamEditors,
|
|
92
|
+
layout: {
|
|
93
|
+
initial: {
|
|
94
|
+
isExpanded: o.layoutIsExpanded,
|
|
95
|
+
showControls: o.layoutShowControls,
|
|
96
|
+
controlsDisplay: o.layoutControlsDisplay,
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
components: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, defaultSpec.components), { controls: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, (_a = defaultSpec.components) === null || _a === void 0 ? void 0 : _a.controls), { top: o.layoutShowSequence ? undefined : 'none', bottom: o.layoutShowLog ? undefined : 'none', left: o.layoutShowLeftPanel ? undefined : 'none' }), remoteState: o.layoutShowRemoteState ? 'default' : 'none', viewport: {
|
|
100
|
+
view: viewport_1.ViewportComponent
|
|
101
|
+
} }),
|
|
102
|
+
config: [
|
|
103
|
+
[config_1.PluginConfig.Viewport.ShowExpand, o.viewportShowExpand],
|
|
104
|
+
[config_1.PluginConfig.Viewport.ShowControls, o.viewportShowControls],
|
|
105
|
+
[config_1.PluginConfig.Viewport.ShowSettings, o.viewportShowSettings],
|
|
106
|
+
[config_1.PluginConfig.Viewport.ShowSelectionMode, o.viewportShowSelectionMode],
|
|
107
|
+
[config_1.PluginConfig.Viewport.ShowAnimation, o.viewportShowAnimation],
|
|
108
|
+
[config_1.PluginConfig.State.DefaultServer, o.pluginStateServer],
|
|
109
|
+
[config_1.PluginConfig.State.CurrentServer, o.pluginStateServer],
|
|
110
|
+
[config_1.PluginConfig.VolumeStreaming.DefaultServer, o.volumeStreamingServer],
|
|
111
|
+
[config_1.PluginConfig.Download.DefaultPdbProvider, o.pdbProvider],
|
|
112
|
+
[config_1.PluginConfig.Download.DefaultEmdbProvider, o.emdbProvider],
|
|
113
|
+
[viewport_1.ShowButtons, showButtons]
|
|
114
|
+
]
|
|
115
|
+
};
|
|
116
|
+
element = typeof elementOrId === 'string'
|
|
117
|
+
? document.getElementById(elementOrId)
|
|
118
|
+
: elementOrId;
|
|
119
|
+
if (!element)
|
|
120
|
+
throw new Error("Could not get element with id '".concat(elementOrId, "'"));
|
|
121
|
+
return [4 /*yield*/, (0, mol_plugin_ui_1.createPluginUI)(element, spec)];
|
|
122
|
+
case 1:
|
|
123
|
+
plugin = _b.sent();
|
|
124
|
+
plugin.customState = {
|
|
125
|
+
colorPalette: {
|
|
126
|
+
name: 'colors',
|
|
127
|
+
params: { list: { colors: colors } }
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
plugin.behaviors.canvas3d.initialized.subscribe(function (v) {
|
|
131
|
+
if (v) {
|
|
132
|
+
commands_1.PluginCommands.Canvas3D.SetSettings(plugin, { settings: {
|
|
133
|
+
renderer: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, plugin.canvas3d.props.renderer), { backgroundColor: names_1.ColorNames.white }),
|
|
134
|
+
camera: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, plugin.canvas3d.props.camera), { helper: { axes: { name: 'off', params: {} } } })
|
|
135
|
+
} });
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
return [2 /*return*/, new Viewer(plugin)];
|
|
139
|
+
}
|
|
140
|
+
});
|
|
128
141
|
});
|
|
129
|
-
}
|
|
142
|
+
};
|
|
130
143
|
Viewer.prototype.loadStructuresFromUrlsAndMerge = function (sources) {
|
|
131
144
|
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
|
|
132
145
|
var structures, _i, sources_1, _a, url, format, isBinary, data_1, trajectory, model, modelProperties, structure_2, structureProperties_1, dependsOn, data, structure, structureProperties;
|