molstar 3.0.0-dev.3 → 3.0.0-dev.4
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 +95 -94
- package/build/viewer/molstar.css +1 -1
- package/build/viewer/molstar.js +1 -1
- package/lib/apps/docking-viewer/index.html +36 -36
- package/lib/apps/docking-viewer/viewport.js +2 -1
- package/lib/apps/viewer/embedded.html +43 -43
- package/lib/apps/viewer/index.html +95 -94
- package/lib/commonjs/apps/docking-viewer/viewport.js +2 -1
- package/lib/commonjs/examples/lighting/index.js +2 -1
- 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/rcsb/assembly-symmetry/behavior.d.ts +3 -0
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/representation.d.ts +3 -0
- 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/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/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 +1 -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 +2 -1
- 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/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-model/structure/model/model.js +7 -3
- 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 +2 -3
- package/lib/commonjs/mol-plugin/commands.d.ts +3 -0
- package/lib/commonjs/mol-plugin/config.d.ts +1 -0
- package/lib/commonjs/mol-plugin/config.js +9 -3
- package/lib/commonjs/mol-plugin/util/viewport-screenshot.d.ts +9 -0
- package/lib/commonjs/mol-plugin-state/manager/structure/component.d.ts +2 -0
- 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/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-line.d.ts +1 -0
- 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-tube-mesh.d.ts +3 -0
- 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 +1 -0
- 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 +60 -60
- package/lib/examples/basic-wrapper/index.html +136 -136
- package/lib/examples/lighting/index.html +86 -86
- package/lib/examples/lighting/index.js +2 -1
- package/lib/examples/proteopedia-wrapper/index.html +235 -235
- 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/rcsb/assembly-symmetry/behavior.d.ts +3 -0
- package/lib/extensions/rcsb/assembly-symmetry/representation.d.ts +3 -0
- package/lib/extensions/rcsb/validation-report/representation.d.ts +15 -0
- package/lib/mol-canvas3d/canvas3d.d.ts +6 -0
- 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/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 +1 -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 +2 -1
- 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/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-model/structure/model/model.js +7 -3
- 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 +2 -3
- package/lib/mol-plugin/commands.d.ts +3 -0
- package/lib/mol-plugin/config.d.ts +1 -0
- package/lib/mol-plugin/config.js +8 -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/manager/structure/component.d.ts +2 -0
- 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/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-line.d.ts +1 -0
- 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-tube-mesh.d.ts +3 -0
- 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 +1 -0
- 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,236 +1,236 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
|
6
|
-
<title>Mol* Proteopedia Wrapper</title>
|
|
7
|
-
<style>
|
|
8
|
-
* {
|
|
9
|
-
margin: 0;
|
|
10
|
-
padding: 0;
|
|
11
|
-
box-sizing: border-box;
|
|
12
|
-
}
|
|
13
|
-
#app {
|
|
14
|
-
position: absolute;
|
|
15
|
-
left: 160px;
|
|
16
|
-
top: 100px;
|
|
17
|
-
width: 600px;
|
|
18
|
-
height: 600px;
|
|
19
|
-
border: 1px solid #ccc;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
#controls {
|
|
23
|
-
position: absolute;
|
|
24
|
-
width: 130px;
|
|
25
|
-
top: 10px;
|
|
26
|
-
left: 10px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
#controls > button {
|
|
30
|
-
display: block;
|
|
31
|
-
width: 100%;
|
|
32
|
-
text-align: left;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
#controls > hr {
|
|
36
|
-
margin: 5px 0;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
#controls > input, #controls > select {
|
|
40
|
-
width: 100%;
|
|
41
|
-
display: block;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
#volume-streaming-wrapper {
|
|
45
|
-
position: absolute;
|
|
46
|
-
top: 100px;
|
|
47
|
-
left: 780px;
|
|
48
|
-
width: 300px;
|
|
49
|
-
}
|
|
50
|
-
</style>
|
|
51
|
-
<link rel="stylesheet" type="text/css" href="molstar.css" />
|
|
52
|
-
<script type="text/javascript" src="./index.js"></script>
|
|
53
|
-
</head>
|
|
54
|
-
<body>
|
|
55
|
-
<div id='controls'>
|
|
56
|
-
<h3>Source</h3>
|
|
57
|
-
<input type='text' id='url' placeholder='url' style='width: 400px' />
|
|
58
|
-
<input type='text' id='assemblyId' placeholder='assembly id' />
|
|
59
|
-
<select id='format'>
|
|
60
|
-
<option value='cif' selected>CIF</option>
|
|
61
|
-
<option value='pdb'>PDB</option>
|
|
62
|
-
</select>
|
|
63
|
-
<input type='checkbox' id='isBinary' style="display: inline-block; width: auto" /> <label for="isBinary"> Binary</label><br />
|
|
64
|
-
</div>
|
|
65
|
-
<div id="app"></div>
|
|
66
|
-
<div id="volume-streaming-wrapper"></div>
|
|
67
|
-
<script>
|
|
68
|
-
// it might be a good idea to define these colors in a separate script file
|
|
69
|
-
var CustomColors = [0x00ff00, 0x0000ff];
|
|
70
|
-
|
|
71
|
-
// create an instance of the plugin
|
|
72
|
-
var PluginWrapper = new MolStarProteopediaWrapper();
|
|
73
|
-
|
|
74
|
-
console.log('Wrapper version', MolStarProteopediaWrapper.VERSION_MAJOR, MolStarProteopediaWrapper.VERSION_MINOR);
|
|
75
|
-
|
|
76
|
-
function $(id) { return document.getElementById(id); }
|
|
77
|
-
|
|
78
|
-
var pdbId = '1cbs', assemblyId= 'preferred', isBinary = true;
|
|
79
|
-
var url = 'https://www.ebi.ac.uk/pdbe/entry-files/download/' + pdbId + '.bcif'
|
|
80
|
-
var format = 'cif';
|
|
81
|
-
|
|
82
|
-
$('url').value = url;
|
|
83
|
-
$('url').onchange = function (e) { url = e.target.value; }
|
|
84
|
-
$('assemblyId').value = assemblyId;
|
|
85
|
-
$('assemblyId').onchange = function (e) { assemblyId = e.target.value; }
|
|
86
|
-
$('format').value = format;
|
|
87
|
-
$('format').onchange = function (e) { format = e.target.value; }
|
|
88
|
-
$('isBinary').checked = isBinary;
|
|
89
|
-
$('isBinary').onchange = function (e) { isBinary = !!e.target.checked; };
|
|
90
|
-
|
|
91
|
-
function loadAndSnapshot(params) {
|
|
92
|
-
PluginWrapper.load(params).then(() => {
|
|
93
|
-
setTimeout(() => snapshot = PluginWrapper.plugin.state.getSnapshot({ canvas3d: false /* do not save spinning state */ }), 500);
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
var representationStyle = {
|
|
98
|
-
// sequence: { coloring: 'proteopedia-custom' }, // or just { }
|
|
99
|
-
hetGroups: { kind: 'ball-and-stick' }, // or 'spacefill
|
|
100
|
-
water: { hide: true },
|
|
101
|
-
snfg3d: { hide: false }
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
PluginWrapper.init('app' /** or document.getElementById('app') */, {
|
|
105
|
-
customColorList: CustomColors
|
|
106
|
-
});
|
|
107
|
-
PluginWrapper.setBackground(0xffffff);
|
|
108
|
-
loadAndSnapshot({ url: url, format: format, isBinary: isBinary, assemblyId: assemblyId, representationStyle: representationStyle });
|
|
109
|
-
PluginWrapper.toggleSpin();
|
|
110
|
-
|
|
111
|
-
PluginWrapper.events.modelInfo.subscribe(function (info) {
|
|
112
|
-
console.log('Model Info', info);
|
|
113
|
-
listHetGroups(info);
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
addControl('Load Asym Unit', () => loadAndSnapshot({ url: url, format: format, isBinary }));
|
|
117
|
-
addControl('Load Assembly', () => loadAndSnapshot({ url: url, format: format, isBinary, assemblyId: assemblyId }));
|
|
118
|
-
|
|
119
|
-
addSeparator();
|
|
120
|
-
|
|
121
|
-
addHeader('Representation');
|
|
122
|
-
|
|
123
|
-
addControl('Custom Chain Colors', () => PluginWrapper.updateStyle({ sequence: { coloring: 'proteopedia-custom' } }, true));
|
|
124
|
-
addControl('Default Chain Colors', () => PluginWrapper.updateStyle({ sequence: { } }, true));
|
|
125
|
-
|
|
126
|
-
addControl('HET Spacefill', () => PluginWrapper.updateStyle({ hetGroups: { kind: 'spacefill' } }, true));
|
|
127
|
-
addControl('HET Ball-and-stick', () => PluginWrapper.updateStyle({ hetGroups: { kind: 'ball-and-stick' } }, true));
|
|
128
|
-
|
|
129
|
-
addControl('Hide 3DSNFG', () => PluginWrapper.updateStyle({ snfg3d: { hide: true } }, true));
|
|
130
|
-
addControl('Show 3DSNFG', () => PluginWrapper.updateStyle({ snfg3d: { hide: false } }, true));
|
|
131
|
-
|
|
132
|
-
addControl('Hide Water', () => PluginWrapper.updateStyle({ water: { hide: true } }, true));
|
|
133
|
-
addControl('Show Water', () => PluginWrapper.updateStyle({ water: { hide: false } }, true));
|
|
134
|
-
|
|
135
|
-
addSeparator();
|
|
136
|
-
|
|
137
|
-
addHeader('Camera');
|
|
138
|
-
addControl('Reset Position', () => PluginWrapper.camera.resetPosition());
|
|
139
|
-
addControl('Toggle Spin', () => PluginWrapper.camera.toggleSpin());
|
|
140
|
-
// Same as "wheel icon" and Viewport options
|
|
141
|
-
// addControl('Clip', () => PluginWrapper.viewport.setSettings({ clip: [33, 66] }));
|
|
142
|
-
// addControl('Reset Clip', () => PluginWrapper.viewport.setSettings({ clip: [1, 100] }));
|
|
143
|
-
|
|
144
|
-
addSeparator();
|
|
145
|
-
|
|
146
|
-
addHeader('Animation');
|
|
147
|
-
|
|
148
|
-
// adjust this number to make the animation faster or slower
|
|
149
|
-
// requires to "restart" the animation if changed
|
|
150
|
-
PluginWrapper.animate.modelIndex.targetFps = 30;
|
|
151
|
-
|
|
152
|
-
addControl('Play To End', () => PluginWrapper.animate.modelIndex.onceForward());
|
|
153
|
-
addControl('Play To Start', () => PluginWrapper.animate.modelIndex.onceBackward());
|
|
154
|
-
addControl('Play Palindrome', () => PluginWrapper.animate.modelIndex.palindrome());
|
|
155
|
-
addControl('Play Loop', () => PluginWrapper.animate.modelIndex.loop());
|
|
156
|
-
addControl('Stop', () => PluginWrapper.animate.modelIndex.stop());
|
|
157
|
-
|
|
158
|
-
addSeparator();
|
|
159
|
-
addHeader('Misc');
|
|
160
|
-
|
|
161
|
-
addControl('Apply Evo Cons Style', () => PluginWrapper.coloring.evolutionaryConservation());
|
|
162
|
-
addControl('Apply Evo Cons Colors', () => PluginWrapper.coloring.evolutionaryConservation({ sequence: true, het: false, keepStyle: true }));
|
|
163
|
-
addControl('Default Visuals', () => PluginWrapper.updateStyle());
|
|
164
|
-
|
|
165
|
-
addSeparator();
|
|
166
|
-
addHeader('HET Groups');
|
|
167
|
-
|
|
168
|
-
addControl('Reset', () => PluginWrapper.hetGroups.reset());
|
|
169
|
-
addHetGroupsContainer();
|
|
170
|
-
|
|
171
|
-
addSeparator();
|
|
172
|
-
addHeader('Exp. Data');
|
|
173
|
-
addControl('Init', () => PluginWrapper.experimentalData.init($('volume-streaming-wrapper')));
|
|
174
|
-
addControl('Remove', () => PluginWrapper.experimentalData.remove());
|
|
175
|
-
|
|
176
|
-
addSeparator();
|
|
177
|
-
addHeader('State');
|
|
178
|
-
|
|
179
|
-
var snapshot;
|
|
180
|
-
addControl('Set Snapshot', () => {
|
|
181
|
-
// const options = { data: true, behavior: false, animation: false, interactivity: false, canvas3d: false, camera: false, cameraTransition: false };
|
|
182
|
-
snapshot = PluginWrapper.plugin.state.getSnapshot(/** options */);
|
|
183
|
-
// console.log(JSON.stringify(snapshot, null, 2));
|
|
184
|
-
});
|
|
185
|
-
addControl('Restore Snapshot', () => {
|
|
186
|
-
if (!snapshot) return;
|
|
187
|
-
PluginWrapper.snapshot.set(snapshot);
|
|
188
|
-
});
|
|
189
|
-
addControl('Download State', () => {
|
|
190
|
-
PluginWrapper.snapshot.download('molj');
|
|
191
|
-
});
|
|
192
|
-
addControl('Download Session', () => {
|
|
193
|
-
PluginWrapper.snapshot.download('molx');
|
|
194
|
-
});
|
|
195
|
-
|
|
196
|
-
////////////////////////////////////////////////////////
|
|
197
|
-
|
|
198
|
-
function addHetGroupsContainer() {
|
|
199
|
-
var div = document.createElement('div');
|
|
200
|
-
div.id = 'het-groups';
|
|
201
|
-
$('controls').appendChild(div);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
function addControl(label, action) {
|
|
205
|
-
var btn = document.createElement('button');
|
|
206
|
-
btn.onclick = action;
|
|
207
|
-
btn.innerText = label;
|
|
208
|
-
$('controls').appendChild(btn);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
function addSeparator() {
|
|
212
|
-
var hr = document.createElement('hr');
|
|
213
|
-
$('controls').appendChild(hr);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
function addHeader(header) {
|
|
217
|
-
var h = document.createElement('h3');
|
|
218
|
-
h.innerText = header;
|
|
219
|
-
$('controls').appendChild(h);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
function listHetGroups(info) {
|
|
223
|
-
var div = $('het-groups');
|
|
224
|
-
div.innerHTML = '';
|
|
225
|
-
info.hetResidues.forEach(function (r) {
|
|
226
|
-
var l = document.createElement('button');
|
|
227
|
-
l.innerText = r.name;
|
|
228
|
-
l.onclick = function () {
|
|
229
|
-
PluginWrapper.hetGroups.focusFirst(r.name, { doNotLabelWaters: true });
|
|
230
|
-
};
|
|
231
|
-
div.appendChild(l);
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
</script>
|
|
235
|
-
</body>
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
|
6
|
+
<title>Mol* Proteopedia Wrapper</title>
|
|
7
|
+
<style>
|
|
8
|
+
* {
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: 0;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
}
|
|
13
|
+
#app {
|
|
14
|
+
position: absolute;
|
|
15
|
+
left: 160px;
|
|
16
|
+
top: 100px;
|
|
17
|
+
width: 600px;
|
|
18
|
+
height: 600px;
|
|
19
|
+
border: 1px solid #ccc;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
#controls {
|
|
23
|
+
position: absolute;
|
|
24
|
+
width: 130px;
|
|
25
|
+
top: 10px;
|
|
26
|
+
left: 10px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
#controls > button {
|
|
30
|
+
display: block;
|
|
31
|
+
width: 100%;
|
|
32
|
+
text-align: left;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
#controls > hr {
|
|
36
|
+
margin: 5px 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
#controls > input, #controls > select {
|
|
40
|
+
width: 100%;
|
|
41
|
+
display: block;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
#volume-streaming-wrapper {
|
|
45
|
+
position: absolute;
|
|
46
|
+
top: 100px;
|
|
47
|
+
left: 780px;
|
|
48
|
+
width: 300px;
|
|
49
|
+
}
|
|
50
|
+
</style>
|
|
51
|
+
<link rel="stylesheet" type="text/css" href="molstar.css" />
|
|
52
|
+
<script type="text/javascript" src="./index.js"></script>
|
|
53
|
+
</head>
|
|
54
|
+
<body>
|
|
55
|
+
<div id='controls'>
|
|
56
|
+
<h3>Source</h3>
|
|
57
|
+
<input type='text' id='url' placeholder='url' style='width: 400px' />
|
|
58
|
+
<input type='text' id='assemblyId' placeholder='assembly id' />
|
|
59
|
+
<select id='format'>
|
|
60
|
+
<option value='cif' selected>CIF</option>
|
|
61
|
+
<option value='pdb'>PDB</option>
|
|
62
|
+
</select>
|
|
63
|
+
<input type='checkbox' id='isBinary' style="display: inline-block; width: auto" /> <label for="isBinary"> Binary</label><br />
|
|
64
|
+
</div>
|
|
65
|
+
<div id="app"></div>
|
|
66
|
+
<div id="volume-streaming-wrapper"></div>
|
|
67
|
+
<script>
|
|
68
|
+
// it might be a good idea to define these colors in a separate script file
|
|
69
|
+
var CustomColors = [0x00ff00, 0x0000ff];
|
|
70
|
+
|
|
71
|
+
// create an instance of the plugin
|
|
72
|
+
var PluginWrapper = new MolStarProteopediaWrapper();
|
|
73
|
+
|
|
74
|
+
console.log('Wrapper version', MolStarProteopediaWrapper.VERSION_MAJOR, MolStarProteopediaWrapper.VERSION_MINOR);
|
|
75
|
+
|
|
76
|
+
function $(id) { return document.getElementById(id); }
|
|
77
|
+
|
|
78
|
+
var pdbId = '1cbs', assemblyId= 'preferred', isBinary = true;
|
|
79
|
+
var url = 'https://www.ebi.ac.uk/pdbe/entry-files/download/' + pdbId + '.bcif'
|
|
80
|
+
var format = 'cif';
|
|
81
|
+
|
|
82
|
+
$('url').value = url;
|
|
83
|
+
$('url').onchange = function (e) { url = e.target.value; }
|
|
84
|
+
$('assemblyId').value = assemblyId;
|
|
85
|
+
$('assemblyId').onchange = function (e) { assemblyId = e.target.value; }
|
|
86
|
+
$('format').value = format;
|
|
87
|
+
$('format').onchange = function (e) { format = e.target.value; }
|
|
88
|
+
$('isBinary').checked = isBinary;
|
|
89
|
+
$('isBinary').onchange = function (e) { isBinary = !!e.target.checked; };
|
|
90
|
+
|
|
91
|
+
function loadAndSnapshot(params) {
|
|
92
|
+
PluginWrapper.load(params).then(() => {
|
|
93
|
+
setTimeout(() => snapshot = PluginWrapper.plugin.state.getSnapshot({ canvas3d: false /* do not save spinning state */ }), 500);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
var representationStyle = {
|
|
98
|
+
// sequence: { coloring: 'proteopedia-custom' }, // or just { }
|
|
99
|
+
hetGroups: { kind: 'ball-and-stick' }, // or 'spacefill
|
|
100
|
+
water: { hide: true },
|
|
101
|
+
snfg3d: { hide: false }
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
PluginWrapper.init('app' /** or document.getElementById('app') */, {
|
|
105
|
+
customColorList: CustomColors
|
|
106
|
+
});
|
|
107
|
+
PluginWrapper.setBackground(0xffffff);
|
|
108
|
+
loadAndSnapshot({ url: url, format: format, isBinary: isBinary, assemblyId: assemblyId, representationStyle: representationStyle });
|
|
109
|
+
PluginWrapper.toggleSpin();
|
|
110
|
+
|
|
111
|
+
PluginWrapper.events.modelInfo.subscribe(function (info) {
|
|
112
|
+
console.log('Model Info', info);
|
|
113
|
+
listHetGroups(info);
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
addControl('Load Asym Unit', () => loadAndSnapshot({ url: url, format: format, isBinary }));
|
|
117
|
+
addControl('Load Assembly', () => loadAndSnapshot({ url: url, format: format, isBinary, assemblyId: assemblyId }));
|
|
118
|
+
|
|
119
|
+
addSeparator();
|
|
120
|
+
|
|
121
|
+
addHeader('Representation');
|
|
122
|
+
|
|
123
|
+
addControl('Custom Chain Colors', () => PluginWrapper.updateStyle({ sequence: { coloring: 'proteopedia-custom' } }, true));
|
|
124
|
+
addControl('Default Chain Colors', () => PluginWrapper.updateStyle({ sequence: { } }, true));
|
|
125
|
+
|
|
126
|
+
addControl('HET Spacefill', () => PluginWrapper.updateStyle({ hetGroups: { kind: 'spacefill' } }, true));
|
|
127
|
+
addControl('HET Ball-and-stick', () => PluginWrapper.updateStyle({ hetGroups: { kind: 'ball-and-stick' } }, true));
|
|
128
|
+
|
|
129
|
+
addControl('Hide 3DSNFG', () => PluginWrapper.updateStyle({ snfg3d: { hide: true } }, true));
|
|
130
|
+
addControl('Show 3DSNFG', () => PluginWrapper.updateStyle({ snfg3d: { hide: false } }, true));
|
|
131
|
+
|
|
132
|
+
addControl('Hide Water', () => PluginWrapper.updateStyle({ water: { hide: true } }, true));
|
|
133
|
+
addControl('Show Water', () => PluginWrapper.updateStyle({ water: { hide: false } }, true));
|
|
134
|
+
|
|
135
|
+
addSeparator();
|
|
136
|
+
|
|
137
|
+
addHeader('Camera');
|
|
138
|
+
addControl('Reset Position', () => PluginWrapper.camera.resetPosition());
|
|
139
|
+
addControl('Toggle Spin', () => PluginWrapper.camera.toggleSpin());
|
|
140
|
+
// Same as "wheel icon" and Viewport options
|
|
141
|
+
// addControl('Clip', () => PluginWrapper.viewport.setSettings({ clip: [33, 66] }));
|
|
142
|
+
// addControl('Reset Clip', () => PluginWrapper.viewport.setSettings({ clip: [1, 100] }));
|
|
143
|
+
|
|
144
|
+
addSeparator();
|
|
145
|
+
|
|
146
|
+
addHeader('Animation');
|
|
147
|
+
|
|
148
|
+
// adjust this number to make the animation faster or slower
|
|
149
|
+
// requires to "restart" the animation if changed
|
|
150
|
+
PluginWrapper.animate.modelIndex.targetFps = 30;
|
|
151
|
+
|
|
152
|
+
addControl('Play To End', () => PluginWrapper.animate.modelIndex.onceForward());
|
|
153
|
+
addControl('Play To Start', () => PluginWrapper.animate.modelIndex.onceBackward());
|
|
154
|
+
addControl('Play Palindrome', () => PluginWrapper.animate.modelIndex.palindrome());
|
|
155
|
+
addControl('Play Loop', () => PluginWrapper.animate.modelIndex.loop());
|
|
156
|
+
addControl('Stop', () => PluginWrapper.animate.modelIndex.stop());
|
|
157
|
+
|
|
158
|
+
addSeparator();
|
|
159
|
+
addHeader('Misc');
|
|
160
|
+
|
|
161
|
+
addControl('Apply Evo Cons Style', () => PluginWrapper.coloring.evolutionaryConservation());
|
|
162
|
+
addControl('Apply Evo Cons Colors', () => PluginWrapper.coloring.evolutionaryConservation({ sequence: true, het: false, keepStyle: true }));
|
|
163
|
+
addControl('Default Visuals', () => PluginWrapper.updateStyle());
|
|
164
|
+
|
|
165
|
+
addSeparator();
|
|
166
|
+
addHeader('HET Groups');
|
|
167
|
+
|
|
168
|
+
addControl('Reset', () => PluginWrapper.hetGroups.reset());
|
|
169
|
+
addHetGroupsContainer();
|
|
170
|
+
|
|
171
|
+
addSeparator();
|
|
172
|
+
addHeader('Exp. Data');
|
|
173
|
+
addControl('Init', () => PluginWrapper.experimentalData.init($('volume-streaming-wrapper')));
|
|
174
|
+
addControl('Remove', () => PluginWrapper.experimentalData.remove());
|
|
175
|
+
|
|
176
|
+
addSeparator();
|
|
177
|
+
addHeader('State');
|
|
178
|
+
|
|
179
|
+
var snapshot;
|
|
180
|
+
addControl('Set Snapshot', () => {
|
|
181
|
+
// const options = { data: true, behavior: false, animation: false, interactivity: false, canvas3d: false, camera: false, cameraTransition: false };
|
|
182
|
+
snapshot = PluginWrapper.plugin.state.getSnapshot(/** options */);
|
|
183
|
+
// console.log(JSON.stringify(snapshot, null, 2));
|
|
184
|
+
});
|
|
185
|
+
addControl('Restore Snapshot', () => {
|
|
186
|
+
if (!snapshot) return;
|
|
187
|
+
PluginWrapper.snapshot.set(snapshot);
|
|
188
|
+
});
|
|
189
|
+
addControl('Download State', () => {
|
|
190
|
+
PluginWrapper.snapshot.download('molj');
|
|
191
|
+
});
|
|
192
|
+
addControl('Download Session', () => {
|
|
193
|
+
PluginWrapper.snapshot.download('molx');
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
////////////////////////////////////////////////////////
|
|
197
|
+
|
|
198
|
+
function addHetGroupsContainer() {
|
|
199
|
+
var div = document.createElement('div');
|
|
200
|
+
div.id = 'het-groups';
|
|
201
|
+
$('controls').appendChild(div);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
function addControl(label, action) {
|
|
205
|
+
var btn = document.createElement('button');
|
|
206
|
+
btn.onclick = action;
|
|
207
|
+
btn.innerText = label;
|
|
208
|
+
$('controls').appendChild(btn);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
function addSeparator() {
|
|
212
|
+
var hr = document.createElement('hr');
|
|
213
|
+
$('controls').appendChild(hr);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
function addHeader(header) {
|
|
217
|
+
var h = document.createElement('h3');
|
|
218
|
+
h.innerText = header;
|
|
219
|
+
$('controls').appendChild(h);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function listHetGroups(info) {
|
|
223
|
+
var div = $('het-groups');
|
|
224
|
+
div.innerHTML = '';
|
|
225
|
+
info.hetResidues.forEach(function (r) {
|
|
226
|
+
var l = document.createElement('button');
|
|
227
|
+
l.innerText = r.name;
|
|
228
|
+
l.onclick = function () {
|
|
229
|
+
PluginWrapper.hetGroups.focusFirst(r.name, { doNotLabelWaters: true });
|
|
230
|
+
};
|
|
231
|
+
div.appendChild(l);
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
</script>
|
|
235
|
+
</body>
|
|
236
236
|
</html>
|
|
@@ -30,6 +30,7 @@ declare const MembraneOrientation3D: StateTransformer<PluginStateObject.Molecule
|
|
|
30
30
|
material: PD.Normalize<{
|
|
31
31
|
metalness: number;
|
|
32
32
|
roughness: number;
|
|
33
|
+
bumpiness: number;
|
|
33
34
|
}>;
|
|
34
35
|
sectorOpacity: number;
|
|
35
36
|
doubleSided: boolean;
|
|
@@ -37,6 +38,8 @@ declare const MembraneOrientation3D: StateTransformer<PluginStateObject.Molecule
|
|
|
37
38
|
flatShaded: boolean;
|
|
38
39
|
ignoreLight: boolean;
|
|
39
40
|
xrayShaded: boolean;
|
|
41
|
+
bumpFrequency: number;
|
|
42
|
+
bumpAmplitude: number;
|
|
40
43
|
}>>;
|
|
41
44
|
export declare const MembraneOrientationPreset: StructureRepresentationPresetProvider<{
|
|
42
45
|
ignoreHydrogens: boolean | undefined;
|
|
@@ -18,11 +18,14 @@ declare const BilayerPlanesParams: {
|
|
|
18
18
|
flatShaded: PD.BooleanParam;
|
|
19
19
|
ignoreLight: PD.BooleanParam;
|
|
20
20
|
xrayShaded: PD.BooleanParam;
|
|
21
|
+
bumpFrequency: PD.Numeric;
|
|
22
|
+
bumpAmplitude: PD.Numeric;
|
|
21
23
|
alpha: PD.Numeric;
|
|
22
24
|
quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
|
|
23
25
|
material: PD.Group<PD.Normalize<{
|
|
24
26
|
metalness: number;
|
|
25
27
|
roughness: number;
|
|
28
|
+
bumpiness: number;
|
|
26
29
|
}>>;
|
|
27
30
|
};
|
|
28
31
|
export declare type BilayerPlanesParams = typeof BilayerPlanesParams;
|
|
@@ -39,6 +42,7 @@ declare const BilayerRimsParams: {
|
|
|
39
42
|
material: PD.Group<PD.Normalize<{
|
|
40
43
|
metalness: number;
|
|
41
44
|
roughness: number;
|
|
45
|
+
bumpiness: number;
|
|
42
46
|
}>>;
|
|
43
47
|
};
|
|
44
48
|
export declare type BilayerRimsParams = typeof BilayerRimsParams;
|
|
@@ -56,6 +60,7 @@ export declare const MembraneOrientationParams: {
|
|
|
56
60
|
material: PD.Group<PD.Normalize<{
|
|
57
61
|
metalness: number;
|
|
58
62
|
roughness: number;
|
|
63
|
+
bumpiness: number;
|
|
59
64
|
}>>;
|
|
60
65
|
sectorOpacity: PD.Numeric;
|
|
61
66
|
doubleSided: PD.BooleanParam;
|
|
@@ -63,6 +68,8 @@ export declare const MembraneOrientationParams: {
|
|
|
63
68
|
flatShaded: PD.BooleanParam;
|
|
64
69
|
ignoreLight: PD.BooleanParam;
|
|
65
70
|
xrayShaded: PD.BooleanParam;
|
|
71
|
+
bumpFrequency: PD.Numeric;
|
|
72
|
+
bumpAmplitude: PD.Numeric;
|
|
66
73
|
};
|
|
67
74
|
export declare type MembraneOrientationParams = typeof MembraneOrientationParams;
|
|
68
75
|
export declare type MembraneOrientationProps = PD.Values<MembraneOrientationParams>;
|
|
@@ -79,6 +86,7 @@ export declare function getMembraneOrientationParams(ctx: ThemeRegistryContext,
|
|
|
79
86
|
material: PD.Group<PD.Normalize<{
|
|
80
87
|
metalness: number;
|
|
81
88
|
roughness: number;
|
|
89
|
+
bumpiness: number;
|
|
82
90
|
}>>;
|
|
83
91
|
sectorOpacity: PD.Numeric;
|
|
84
92
|
doubleSided: PD.BooleanParam;
|
|
@@ -86,6 +94,8 @@ export declare function getMembraneOrientationParams(ctx: ThemeRegistryContext,
|
|
|
86
94
|
flatShaded: PD.BooleanParam;
|
|
87
95
|
ignoreLight: PD.BooleanParam;
|
|
88
96
|
xrayShaded: PD.BooleanParam;
|
|
97
|
+
bumpFrequency: PD.Numeric;
|
|
98
|
+
bumpAmplitude: PD.Numeric;
|
|
89
99
|
};
|
|
90
100
|
export declare type MembraneOrientationRepresentation = StructureRepresentation<MembraneOrientationParams>;
|
|
91
101
|
export declare function MembraneOrientationRepresentation(ctx: RepresentationContext, getParams: RepresentationParamsGetter<Structure, MembraneOrientationParams>): MembraneOrientationRepresentation;
|
|
@@ -102,6 +112,7 @@ export declare const MembraneOrientationRepresentationProvider: StructureReprese
|
|
|
102
112
|
material: PD.Group<PD.Normalize<{
|
|
103
113
|
metalness: number;
|
|
104
114
|
roughness: number;
|
|
115
|
+
bumpiness: number;
|
|
105
116
|
}>>;
|
|
106
117
|
sectorOpacity: PD.Numeric;
|
|
107
118
|
doubleSided: PD.BooleanParam;
|
|
@@ -109,5 +120,7 @@ export declare const MembraneOrientationRepresentationProvider: StructureReprese
|
|
|
109
120
|
flatShaded: PD.BooleanParam;
|
|
110
121
|
ignoreLight: PD.BooleanParam;
|
|
111
122
|
xrayShaded: PD.BooleanParam;
|
|
123
|
+
bumpFrequency: PD.Numeric;
|
|
124
|
+
bumpAmplitude: PD.Numeric;
|
|
112
125
|
}, "membrane-orientation">;
|
|
113
126
|
export {};
|
|
@@ -44,10 +44,13 @@ export declare const MBParams: {
|
|
|
44
44
|
flatShaded: PD.BooleanParam;
|
|
45
45
|
ignoreLight: PD.BooleanParam;
|
|
46
46
|
xrayShaded: PD.BooleanParam;
|
|
47
|
+
bumpFrequency: PD.Numeric;
|
|
48
|
+
bumpAmplitude: PD.Numeric;
|
|
47
49
|
alpha: PD.Numeric;
|
|
48
50
|
material: PD.Group<PD.Normalize<{
|
|
49
51
|
metalness: number;
|
|
50
52
|
roughness: number;
|
|
53
|
+
bumpiness: number;
|
|
51
54
|
}>>;
|
|
52
55
|
};
|
|
53
56
|
export declare type MBParams = typeof MBParams;
|
|
@@ -17,11 +17,14 @@ export declare const ConfalPyramidsParams: {
|
|
|
17
17
|
flatShaded: PD.BooleanParam;
|
|
18
18
|
ignoreLight: PD.BooleanParam;
|
|
19
19
|
xrayShaded: PD.BooleanParam;
|
|
20
|
+
bumpFrequency: PD.Numeric;
|
|
21
|
+
bumpAmplitude: PD.Numeric;
|
|
20
22
|
alpha: PD.Numeric;
|
|
21
23
|
quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
|
|
22
24
|
material: PD.Group<PD.Normalize<{
|
|
23
25
|
metalness: number;
|
|
24
26
|
roughness: number;
|
|
27
|
+
bumpiness: number;
|
|
25
28
|
}>>;
|
|
26
29
|
};
|
|
27
30
|
export declare type ConfalPyramidsParams = typeof ConfalPyramidsParams;
|
|
@@ -33,11 +36,14 @@ export declare function getConfalPyramidsParams(ctx: ThemeRegistryContext, struc
|
|
|
33
36
|
flatShaded: PD.BooleanParam;
|
|
34
37
|
ignoreLight: PD.BooleanParam;
|
|
35
38
|
xrayShaded: PD.BooleanParam;
|
|
39
|
+
bumpFrequency: PD.Numeric;
|
|
40
|
+
bumpAmplitude: PD.Numeric;
|
|
36
41
|
alpha: PD.Numeric;
|
|
37
42
|
quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
|
|
38
43
|
material: PD.Group<PD.Normalize<{
|
|
39
44
|
metalness: number;
|
|
40
45
|
roughness: number;
|
|
46
|
+
bumpiness: number;
|
|
41
47
|
}>>;
|
|
42
48
|
};
|
|
43
49
|
export declare type ConfalPyramidsRepresentation = StructureRepresentation<ConfalPyramidsParams>;
|
|
@@ -50,10 +56,13 @@ export declare const ConfalPyramidsRepresentationProvider: StructureRepresentati
|
|
|
50
56
|
flatShaded: PD.BooleanParam;
|
|
51
57
|
ignoreLight: PD.BooleanParam;
|
|
52
58
|
xrayShaded: PD.BooleanParam;
|
|
59
|
+
bumpFrequency: PD.Numeric;
|
|
60
|
+
bumpAmplitude: PD.Numeric;
|
|
53
61
|
alpha: PD.Numeric;
|
|
54
62
|
quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
|
|
55
63
|
material: PD.Group<PD.Normalize<{
|
|
56
64
|
metalness: number;
|
|
57
65
|
roughness: number;
|
|
66
|
+
bumpiness: number;
|
|
58
67
|
}>>;
|
|
59
68
|
}, "confal-pyramids">;
|
|
@@ -24,11 +24,14 @@ declare const AssemblySymmetry3D: StateTransformer<PluginStateObject.Molecule.St
|
|
|
24
24
|
flatShaded: boolean;
|
|
25
25
|
ignoreLight: boolean;
|
|
26
26
|
xrayShaded: boolean;
|
|
27
|
+
bumpFrequency: number;
|
|
28
|
+
bumpAmplitude: number;
|
|
27
29
|
alpha: number;
|
|
28
30
|
quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
|
|
29
31
|
material: PD.Normalize<{
|
|
30
32
|
metalness: number;
|
|
31
33
|
roughness: number;
|
|
34
|
+
bumpiness: number;
|
|
32
35
|
}>;
|
|
33
36
|
axesColor: PD.NamedParams<PD.Normalize<{
|
|
34
37
|
colorValue: any;
|
|
@@ -16,11 +16,14 @@ export declare const AssemblySymmetryParams: {
|
|
|
16
16
|
flatShaded: PD.BooleanParam;
|
|
17
17
|
ignoreLight: PD.BooleanParam;
|
|
18
18
|
xrayShaded: PD.BooleanParam;
|
|
19
|
+
bumpFrequency: PD.Numeric;
|
|
20
|
+
bumpAmplitude: PD.Numeric;
|
|
19
21
|
alpha: PD.Numeric;
|
|
20
22
|
quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
|
|
21
23
|
material: PD.Group<PD.Normalize<{
|
|
22
24
|
metalness: number;
|
|
23
25
|
roughness: number;
|
|
26
|
+
bumpiness: number;
|
|
24
27
|
}>>;
|
|
25
28
|
axesColor: PD.Mapped<PD.NamedParams<PD.Normalize<{
|
|
26
29
|
colorValue: Color;
|