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
|
@@ -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>
|
|
@@ -16,15 +16,19 @@ import { StateTransforms } from '../transforms';
|
|
|
16
16
|
import { CustomModelProperties, CustomStructureProperties, TrajectoryFromModelAndCoordinates } from '../transforms/model';
|
|
17
17
|
import { Asset } from '../../mol-util/assets';
|
|
18
18
|
import { PluginConfig } from '../../mol-plugin/config';
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}, {
|
|
19
|
+
import { getFileInfo } from '../../mol-util/file-info';
|
|
20
|
+
var DownloadModelRepresentationOptions = function (plugin) {
|
|
21
|
+
var representationDefault = plugin.config.get(PluginConfig.Structure.DefaultRepresentationPreset) || PresetStructureRepresentations.auto.id;
|
|
22
|
+
return PD.Group({
|
|
23
|
+
type: RootStructureDefinition.getParams(void 0, 'auto').type,
|
|
24
|
+
representation: PD.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.' }),
|
|
25
|
+
representationParams: PD.Group(StructureRepresentationPresetProvider.CommonParams, { isHidden: true }),
|
|
26
|
+
asTrajectory: PD.Optional(PD.Boolean(false, { description: 'Load all entries into a single trajectory.' }))
|
|
27
|
+
}, { isExpanded: false });
|
|
28
|
+
};
|
|
25
29
|
export var PdbDownloadProvider = {
|
|
26
30
|
'rcsb': PD.Group({
|
|
27
|
-
encoding: PD.Select('bcif', [
|
|
31
|
+
encoding: PD.Select('bcif', PD.arrayToOptions(['cif', 'bcif'])),
|
|
28
32
|
}, { label: 'RCSB PDB', isFlat: true }),
|
|
29
33
|
'pdbe': PD.Group({
|
|
30
34
|
variant: PD.Select('updated-bcif', [['updated-bcif', 'Updated (bcif)'], ['updated', 'Updated'], ['archival', 'Archival']]),
|
|
@@ -49,7 +53,7 @@ var DownloadStructure = StateAction.build({
|
|
|
49
53
|
'pdb-dev': PD.Group({
|
|
50
54
|
provider: PD.Group({
|
|
51
55
|
id: PD.Text('PDBDEV_00000001', { label: 'PDBDev Id(s)', description: 'One or more comma/space separated ids.' }),
|
|
52
|
-
encoding: PD.Select('bcif', [
|
|
56
|
+
encoding: PD.Select('bcif', PD.arrayToOptions(['cif', 'bcif'])),
|
|
53
57
|
}, { pivot: 'id' }),
|
|
54
58
|
options: options
|
|
55
59
|
}, { isFlat: true, label: 'PDBDEV' }),
|
|
@@ -57,6 +61,14 @@ var DownloadStructure = StateAction.build({
|
|
|
57
61
|
id: PD.Text('Q9Y2I8', { label: 'UniProtKB AC(s)', description: 'One or more comma/space separated ACs.' }),
|
|
58
62
|
options: options
|
|
59
63
|
}, { isFlat: true, label: 'SWISS-MODEL', description: 'Loads the best homology model or experimental structure' }),
|
|
64
|
+
'alphafolddb': PD.Group({
|
|
65
|
+
id: PD.Text('Q8W3K0', { label: 'UniProtKB AC(s)', description: 'One or more comma/space separated ACs.' }),
|
|
66
|
+
options: options
|
|
67
|
+
}, { isFlat: true, label: 'AlphaFold DB', description: 'Loads the predicted model if available' }),
|
|
68
|
+
'modelarchive': PD.Group({
|
|
69
|
+
id: PD.Text('ma-bak-cepc-0003', { label: 'Accession Code(s)', description: 'One or more comma/space separated ACs.' }),
|
|
70
|
+
options: options
|
|
71
|
+
}, { isFlat: true, label: 'Model Archive' }),
|
|
60
72
|
'pubchem': PD.Group({
|
|
61
73
|
id: PD.Text('2244,2245', { label: 'PubChem ID', description: 'One or more comma/space separated IDs.' }),
|
|
62
74
|
options: options
|
|
@@ -73,58 +85,99 @@ var DownloadStructure = StateAction.build({
|
|
|
73
85
|
})(function (_a, plugin) {
|
|
74
86
|
var params = _a.params, state = _a.state;
|
|
75
87
|
return Task.create('Download Structure', function (ctx) { return __awaiter(void 0, void 0, void 0, function () {
|
|
76
|
-
var src, downloadParams, asTrajectory, format, representationPreset, showUnitcell, structure;
|
|
77
|
-
return __generator(this, function (
|
|
78
|
-
switch (
|
|
88
|
+
var src, downloadParams, asTrajectory, format, _a, representationPreset, showUnitcell, structure;
|
|
89
|
+
return __generator(this, function (_b) {
|
|
90
|
+
switch (_b.label) {
|
|
79
91
|
case 0:
|
|
80
92
|
plugin.behaviors.layout.leftPanelTabName.next('data');
|
|
81
93
|
src = params.source;
|
|
82
94
|
asTrajectory = false, format = 'mmcif';
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
case '
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
: src.params.provider.server.params.variant === 'updated-bcif'
|
|
93
|
-
? 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)
|
|
94
|
-
: 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)
|
|
95
|
-
: src.params.provider.server.params.encoding === 'cif'
|
|
96
|
-
? 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)
|
|
97
|
-
: getDownloadParams(src.params.provider.id, function (id) { return "https://models.rcsb.org/".concat(id.toUpperCase(), ".bcif"); }, function (id) { return "RCSB: ".concat(id, " (bcif)"); }, true);
|
|
98
|
-
asTrajectory = !!src.params.options.asTrajectory;
|
|
99
|
-
break;
|
|
100
|
-
case 'pdb-dev':
|
|
101
|
-
downloadParams = getDownloadParams(src.params.provider.id, function (id) {
|
|
102
|
-
var nId = id.toUpperCase().startsWith('PDBDEV_') ? id : "PDBDEV_".concat(id.padStart(8, '0'));
|
|
103
|
-
return src.params.provider.encoding === 'bcif'
|
|
104
|
-
? "https://pdb-dev.wwpdb.org/bcif/".concat(nId.toUpperCase(), ".bcif")
|
|
105
|
-
: "https://pdb-dev.wwpdb.org/cif/".concat(nId.toUpperCase(), ".cif");
|
|
106
|
-
}, function (id) { return id.toUpperCase().startsWith('PDBDEV_') ? id : "PDBDEV_".concat(id.padStart(8, '0')); }, src.params.provider.encoding === 'bcif');
|
|
107
|
-
asTrajectory = !!src.params.options.asTrajectory;
|
|
108
|
-
break;
|
|
109
|
-
case 'swissmodel':
|
|
110
|
-
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);
|
|
111
|
-
asTrajectory = !!src.params.options.asTrajectory;
|
|
112
|
-
format = 'pdb';
|
|
113
|
-
break;
|
|
114
|
-
case 'pubchem':
|
|
115
|
-
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);
|
|
116
|
-
asTrajectory = !!src.params.options.asTrajectory;
|
|
117
|
-
format = 'mol';
|
|
118
|
-
break;
|
|
119
|
-
default: throw new Error("".concat(src.name, " not supported."));
|
|
95
|
+
_a = src.name;
|
|
96
|
+
switch (_a) {
|
|
97
|
+
case 'url': return [3 /*break*/, 1];
|
|
98
|
+
case 'pdb': return [3 /*break*/, 2];
|
|
99
|
+
case 'pdb-dev': return [3 /*break*/, 4];
|
|
100
|
+
case 'swissmodel': return [3 /*break*/, 6];
|
|
101
|
+
case 'alphafolddb': return [3 /*break*/, 8];
|
|
102
|
+
case 'modelarchive': return [3 /*break*/, 10];
|
|
103
|
+
case 'pubchem': return [3 /*break*/, 12];
|
|
120
104
|
}
|
|
121
|
-
|
|
105
|
+
return [3 /*break*/, 14];
|
|
106
|
+
case 1:
|
|
107
|
+
downloadParams = [{ url: src.params.url, isBinary: src.params.isBinary }];
|
|
108
|
+
format = src.params.format;
|
|
109
|
+
return [3 /*break*/, 15];
|
|
110
|
+
case 2: return [4 /*yield*/, (src.params.provider.server.name === 'pdbe'
|
|
111
|
+
? src.params.provider.server.params.variant === 'updated'
|
|
112
|
+
? 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)
|
|
113
|
+
: src.params.provider.server.params.variant === 'updated-bcif'
|
|
114
|
+
? 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)
|
|
115
|
+
: 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)
|
|
116
|
+
: src.params.provider.server.params.encoding === 'cif'
|
|
117
|
+
? 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)
|
|
118
|
+
: getDownloadParams(src.params.provider.id, function (id) { return "https://models.rcsb.org/".concat(id.toUpperCase(), ".bcif"); }, function (id) { return "RCSB: ".concat(id, " (bcif)"); }, true))];
|
|
119
|
+
case 3:
|
|
120
|
+
downloadParams = _b.sent();
|
|
121
|
+
asTrajectory = !!src.params.options.asTrajectory;
|
|
122
|
+
return [3 /*break*/, 15];
|
|
123
|
+
case 4: return [4 /*yield*/, getDownloadParams(src.params.provider.id, function (id) {
|
|
124
|
+
var nId = id.toUpperCase().startsWith('PDBDEV_') ? id : "PDBDEV_".concat(id.padStart(8, '0'));
|
|
125
|
+
return src.params.provider.encoding === 'bcif'
|
|
126
|
+
? "https://pdb-dev.wwpdb.org/bcif/".concat(nId.toUpperCase(), ".bcif")
|
|
127
|
+
: "https://pdb-dev.wwpdb.org/cif/".concat(nId.toUpperCase(), ".cif");
|
|
128
|
+
}, function (id) { return id.toUpperCase().startsWith('PDBDEV_') ? id : "PDBDEV_".concat(id.padStart(8, '0')); }, src.params.provider.encoding === 'bcif')];
|
|
129
|
+
case 5:
|
|
130
|
+
downloadParams = _b.sent();
|
|
131
|
+
asTrajectory = !!src.params.options.asTrajectory;
|
|
132
|
+
return [3 /*break*/, 15];
|
|
133
|
+
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)];
|
|
134
|
+
case 7:
|
|
135
|
+
downloadParams = _b.sent();
|
|
136
|
+
asTrajectory = !!src.params.options.asTrajectory;
|
|
137
|
+
format = 'pdb';
|
|
138
|
+
return [3 /*break*/, 15];
|
|
139
|
+
case 8: return [4 /*yield*/, getDownloadParams(src.params.id, function (id) { return __awaiter(void 0, void 0, void 0, function () {
|
|
140
|
+
var url, info;
|
|
141
|
+
return __generator(this, function (_a) {
|
|
142
|
+
switch (_a.label) {
|
|
143
|
+
case 0:
|
|
144
|
+
url = "https://www.alphafold.ebi.ac.uk/api/prediction/".concat(id.toUpperCase());
|
|
145
|
+
return [4 /*yield*/, plugin.runTask(plugin.fetch({ url: url, type: 'json' }))];
|
|
146
|
+
case 1:
|
|
147
|
+
info = _a.sent();
|
|
148
|
+
if (Array.isArray(info) && info.length > 0)
|
|
149
|
+
return [2 /*return*/, info[0].cifUrl];
|
|
150
|
+
throw new Error("No AlphaFold DB entry for '".concat(id, "'"));
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
}); }, function (id) { return "AlphaFold DB: ".concat(id); }, false)];
|
|
154
|
+
case 9:
|
|
155
|
+
downloadParams = _b.sent();
|
|
156
|
+
asTrajectory = !!src.params.options.asTrajectory;
|
|
157
|
+
format = 'mmcif';
|
|
158
|
+
return [3 /*break*/, 15];
|
|
159
|
+
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)];
|
|
160
|
+
case 11:
|
|
161
|
+
downloadParams = _b.sent();
|
|
162
|
+
asTrajectory = !!src.params.options.asTrajectory;
|
|
163
|
+
format = 'mmcif';
|
|
164
|
+
return [3 /*break*/, 15];
|
|
165
|
+
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)];
|
|
166
|
+
case 13:
|
|
167
|
+
downloadParams = _b.sent();
|
|
168
|
+
asTrajectory = !!src.params.options.asTrajectory;
|
|
169
|
+
format = 'mol';
|
|
170
|
+
return [3 /*break*/, 15];
|
|
171
|
+
case 14: throw new Error("".concat(src.name, " not supported."));
|
|
172
|
+
case 15:
|
|
173
|
+
representationPreset = params.source.params.options.representation || plugin.config.get(PluginConfig.Structure.DefaultRepresentationPreset) || PresetStructureRepresentations.auto.id;
|
|
122
174
|
showUnitcell = representationPreset !== PresetStructureRepresentations.empty.id;
|
|
123
175
|
structure = src.params.options.type.name === 'auto' ? void 0 : src.params.options.type;
|
|
124
176
|
return [4 /*yield*/, state.transaction(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
125
|
-
var blob, trajectory, _i, downloadParams_1, download, data, trajectory;
|
|
126
|
-
|
|
127
|
-
|
|
177
|
+
var blob, trajectory, _i, downloadParams_1, download, data, provider, trajectory;
|
|
178
|
+
var _a;
|
|
179
|
+
return __generator(this, function (_b) {
|
|
180
|
+
switch (_b.label) {
|
|
128
181
|
case 0:
|
|
129
182
|
if (!(downloadParams.length > 0 && asTrajectory)) return [3 /*break*/, 4];
|
|
130
183
|
return [4 /*yield*/, plugin.builders.data.downloadBlob({
|
|
@@ -132,10 +185,10 @@ var DownloadStructure = StateAction.build({
|
|
|
132
185
|
maxConcurrency: 6
|
|
133
186
|
}, { state: { isGhost: true } })];
|
|
134
187
|
case 1:
|
|
135
|
-
blob =
|
|
188
|
+
blob = _b.sent();
|
|
136
189
|
return [4 /*yield*/, plugin.builders.structure.parseTrajectory(blob, { formats: downloadParams.map(function (_, i) { return ({ id: '' + i, format: 'cif' }); }) })];
|
|
137
190
|
case 2:
|
|
138
|
-
trajectory =
|
|
191
|
+
trajectory = _b.sent();
|
|
139
192
|
return [4 /*yield*/, plugin.builders.structure.hierarchy.applyPreset(trajectory, 'default', {
|
|
140
193
|
structure: structure,
|
|
141
194
|
showUnitcell: showUnitcell,
|
|
@@ -143,20 +196,25 @@ var DownloadStructure = StateAction.build({
|
|
|
143
196
|
representationPresetParams: params.source.params.options.representationParams
|
|
144
197
|
})];
|
|
145
198
|
case 3:
|
|
146
|
-
|
|
199
|
+
_b.sent();
|
|
147
200
|
return [3 /*break*/, 10];
|
|
148
201
|
case 4:
|
|
149
202
|
_i = 0, downloadParams_1 = downloadParams;
|
|
150
|
-
|
|
203
|
+
_b.label = 5;
|
|
151
204
|
case 5:
|
|
152
205
|
if (!(_i < downloadParams_1.length)) return [3 /*break*/, 10];
|
|
153
206
|
download = downloadParams_1[_i];
|
|
154
207
|
return [4 /*yield*/, plugin.builders.data.download(download, { state: { isGhost: true } })];
|
|
155
208
|
case 6:
|
|
156
|
-
data =
|
|
157
|
-
|
|
209
|
+
data = _b.sent();
|
|
210
|
+
provider = format === 'auto'
|
|
211
|
+
? plugin.dataFormats.auto(getFileInfo(Asset.getUrl(download.url)), (_a = data.cell) === null || _a === void 0 ? void 0 : _a.obj)
|
|
212
|
+
: plugin.dataFormats.get(format);
|
|
213
|
+
if (!provider)
|
|
214
|
+
throw new Error('unknown file format');
|
|
215
|
+
return [4 /*yield*/, plugin.builders.structure.parseTrajectory(data, provider)];
|
|
158
216
|
case 7:
|
|
159
|
-
trajectory =
|
|
217
|
+
trajectory = _b.sent();
|
|
160
218
|
return [4 /*yield*/, plugin.builders.structure.hierarchy.applyPreset(trajectory, 'default', {
|
|
161
219
|
structure: structure,
|
|
162
220
|
showUnitcell: showUnitcell,
|
|
@@ -164,8 +222,8 @@ var DownloadStructure = StateAction.build({
|
|
|
164
222
|
representationPresetParams: params.source.params.options.representationParams
|
|
165
223
|
})];
|
|
166
224
|
case 8:
|
|
167
|
-
|
|
168
|
-
|
|
225
|
+
_b.sent();
|
|
226
|
+
_b.label = 9;
|
|
169
227
|
case 9:
|
|
170
228
|
_i++;
|
|
171
229
|
return [3 /*break*/, 5];
|
|
@@ -173,26 +231,46 @@ var DownloadStructure = StateAction.build({
|
|
|
173
231
|
}
|
|
174
232
|
});
|
|
175
233
|
}); }).runInContext(ctx)];
|
|
176
|
-
case
|
|
177
|
-
|
|
234
|
+
case 16:
|
|
235
|
+
_b.sent();
|
|
178
236
|
return [2 /*return*/];
|
|
179
237
|
}
|
|
180
238
|
});
|
|
181
239
|
}); });
|
|
182
240
|
});
|
|
183
241
|
function getDownloadParams(src, url, label, isBinary) {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
242
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
243
|
+
var ids, ret, _i, ids_1, id, _a, _b, _c, _d;
|
|
244
|
+
var _e;
|
|
245
|
+
return __generator(this, function (_f) {
|
|
246
|
+
switch (_f.label) {
|
|
247
|
+
case 0:
|
|
248
|
+
ids = src.split(/[,\s]/).map(function (id) { return id.trim(); }).filter(function (id) { return !!id && (id.length >= 4 || /^[1-9][0-9]*$/.test(id)); });
|
|
249
|
+
ret = [];
|
|
250
|
+
_i = 0, ids_1 = ids;
|
|
251
|
+
_f.label = 1;
|
|
252
|
+
case 1:
|
|
253
|
+
if (!(_i < ids_1.length)) return [3 /*break*/, 4];
|
|
254
|
+
id = ids_1[_i];
|
|
255
|
+
_b = (_a = ret).push;
|
|
256
|
+
_e = {};
|
|
257
|
+
_d = (_c = Asset).Url;
|
|
258
|
+
return [4 /*yield*/, url(id)];
|
|
259
|
+
case 2:
|
|
260
|
+
_b.apply(_a, [(_e.url = _d.apply(_c, [_f.sent()]), _e.isBinary = isBinary, _e.label = label(id), _e)]);
|
|
261
|
+
_f.label = 3;
|
|
262
|
+
case 3:
|
|
263
|
+
_i++;
|
|
264
|
+
return [3 /*break*/, 1];
|
|
265
|
+
case 4: return [2 /*return*/, ret];
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
});
|
|
191
269
|
}
|
|
192
270
|
export var UpdateTrajectory = StateAction.build({
|
|
193
271
|
display: { name: 'Update Trajectory' },
|
|
194
272
|
params: {
|
|
195
|
-
action: PD.Select('advance', [
|
|
273
|
+
action: PD.Select('advance', PD.arrayToOptions(['advance', 'reset'])),
|
|
196
274
|
by: PD.Optional(PD.Numeric(1, { min: -1, max: 1, step: 1 }))
|
|
197
275
|
}
|
|
198
276
|
})(function (_a) {
|