molstar 4.2.0 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -20
- package/README.md +197 -197
- package/build/viewer/embedded.html +52 -52
- package/build/viewer/index.html +129 -129
- package/build/viewer/molstar.js +1 -1
- package/build/viewer/molstar.js.LICENSE.txt +9 -0
- package/lib/apps/docking-viewer/index.html +36 -36
- package/lib/apps/mesoscale-explorer/index.html +100 -100
- package/lib/apps/mesoscale-explorer/style.scss +33 -33
- package/lib/apps/viewer/app.d.ts +2 -1
- package/lib/apps/viewer/app.js +2 -1
- package/lib/apps/viewer/embedded.html +52 -52
- package/lib/apps/viewer/index.html +129 -129
- package/lib/cli/chem-comp-dict/create-ions.js +9 -9
- package/lib/cli/chem-comp-dict/create-saccharides.js +9 -9
- package/lib/cli/cifschema/util/generate.js +12 -12
- package/lib/cli/lipid-params/index.js +9 -9
- package/lib/commonjs/apps/viewer/app.d.ts +2 -1
- package/lib/commonjs/apps/viewer/app.js +1 -0
- package/lib/commonjs/cli/chem-comp-dict/create-ions.js +9 -9
- package/lib/commonjs/cli/chem-comp-dict/create-saccharides.js +9 -9
- package/lib/commonjs/cli/cifschema/util/generate.js +12 -12
- package/lib/commonjs/cli/lipid-params/index.js +9 -9
- package/lib/commonjs/examples/alpha-orbitals/example-data.js +160 -160
- package/lib/commonjs/extensions/alpha-orbitals/gpu/shader.frag.js +136 -136
- package/lib/commonjs/extensions/assembly-symmetry/prop.js +24 -24
- package/lib/commonjs/extensions/dnatco/confal-pyramids/behavior.js +5 -5
- package/lib/commonjs/extensions/dnatco/ntc-tube/behavior.js +5 -5
- package/lib/commonjs/extensions/geo-export/usdz-exporter.js +41 -41
- package/lib/commonjs/extensions/meshes/mesh-extension.d.ts +1 -0
- package/lib/commonjs/extensions/mp4-export/encoder.js +1 -1
- package/lib/commonjs/extensions/mvs/components/annotation-label/representation.d.ts +0 -2
- package/lib/commonjs/extensions/mvs/components/custom-label/representation.d.ts +2 -2
- package/lib/commonjs/extensions/mvs/tree/mvs/mvs-builder.d.ts +8 -2
- package/lib/commonjs/extensions/sb-ncbr/index.d.ts +8 -0
- package/lib/commonjs/extensions/sb-ncbr/index.js +14 -1
- package/lib/commonjs/extensions/sb-ncbr/tunnels/actions.d.ts +20 -0
- package/lib/commonjs/extensions/sb-ncbr/tunnels/actions.js +89 -0
- package/lib/commonjs/extensions/sb-ncbr/tunnels/algorithm.d.ts +26 -0
- package/lib/commonjs/extensions/sb-ncbr/tunnels/algorithm.js +474 -0
- package/lib/commonjs/extensions/sb-ncbr/tunnels/behavior.d.ts +40 -0
- package/lib/commonjs/extensions/sb-ncbr/tunnels/behavior.js +96 -0
- package/lib/commonjs/extensions/sb-ncbr/tunnels/data-model.d.ts +146 -0
- package/lib/commonjs/extensions/sb-ncbr/tunnels/data-model.js +28 -0
- package/lib/commonjs/extensions/sb-ncbr/tunnels/examples.d.ts +12 -0
- package/lib/commonjs/extensions/sb-ncbr/tunnels/examples.js +54 -0
- package/lib/commonjs/extensions/sb-ncbr/tunnels/props.d.ts +19 -0
- package/lib/commonjs/extensions/sb-ncbr/tunnels/props.js +26 -0
- package/lib/commonjs/extensions/sb-ncbr/tunnels/representation.d.ts +29 -0
- package/lib/commonjs/extensions/sb-ncbr/tunnels/representation.js +99 -0
- package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +17 -0
- package/lib/commonjs/mol-canvas3d/canvas3d.js +4 -0
- package/lib/commonjs/mol-canvas3d/passes/dof.d.ts +34 -0
- package/lib/commonjs/mol-canvas3d/passes/dof.js +167 -0
- package/lib/commonjs/mol-canvas3d/passes/draw.d.ts +2 -0
- package/lib/commonjs/mol-canvas3d/passes/draw.js +31 -8
- package/lib/commonjs/mol-canvas3d/passes/image.d.ts +8 -0
- package/lib/commonjs/mol-canvas3d/passes/postprocessing.d.ts +8 -0
- package/lib/commonjs/mol-canvas3d/passes/postprocessing.js +5 -0
- package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +0 -1
- package/lib/commonjs/mol-gl/shader/background.frag.js +95 -95
- package/lib/commonjs/mol-gl/shader/background.vert.js +11 -11
- package/lib/commonjs/mol-gl/shader/blend-back-dpoit.frag.js +13 -13
- package/lib/commonjs/mol-gl/shader/bloom/blur.frag.js +28 -28
- package/lib/commonjs/mol-gl/shader/bloom/composite.frag.js +33 -33
- package/lib/commonjs/mol-gl/shader/bloom/luminosity.frag.js +52 -52
- package/lib/commonjs/mol-gl/shader/cas.frag.js +144 -144
- package/lib/commonjs/mol-gl/shader/chunks/apply-fog.glsl.js +31 -31
- package/lib/commonjs/mol-gl/shader/chunks/apply-interior-color.glsl.js +12 -12
- package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.js +77 -77
- package/lib/commonjs/mol-gl/shader/chunks/apply-marker-color.glsl.js +16 -16
- package/lib/commonjs/mol-gl/shader/chunks/assign-clipping-varying.glsl.js +8 -8
- package/lib/commonjs/mol-gl/shader/chunks/assign-color-varying.glsl.js +140 -140
- package/lib/commonjs/mol-gl/shader/chunks/assign-group.glsl.js +6 -6
- package/lib/commonjs/mol-gl/shader/chunks/assign-marker-varying.glsl.js +8 -8
- package/lib/commonjs/mol-gl/shader/chunks/assign-material-color.glsl.js +112 -112
- package/lib/commonjs/mol-gl/shader/chunks/assign-position.glsl.js +14 -14
- package/lib/commonjs/mol-gl/shader/chunks/assign-size.glsl.js +18 -18
- package/lib/commonjs/mol-gl/shader/chunks/check-picking-alpha.glsl.js +12 -12
- package/lib/commonjs/mol-gl/shader/chunks/check-transparency.glsl.js +16 -16
- package/lib/commonjs/mol-gl/shader/chunks/clip-instance.glsl.js +7 -7
- package/lib/commonjs/mol-gl/shader/chunks/clip-pixel.glsl.js +5 -5
- package/lib/commonjs/mol-gl/shader/chunks/color-frag-params.glsl.js +60 -60
- package/lib/commonjs/mol-gl/shader/chunks/color-vert-params.glsl.js +122 -122
- package/lib/commonjs/mol-gl/shader/chunks/common-clip.glsl.js +104 -104
- package/lib/commonjs/mol-gl/shader/chunks/common-frag-params.glsl.js +150 -150
- package/lib/commonjs/mol-gl/shader/chunks/common-vert-params.glsl.js +61 -61
- package/lib/commonjs/mol-gl/shader/chunks/common.glsl.js +234 -234
- package/lib/commonjs/mol-gl/shader/chunks/dpoit-write.glsl.js +62 -62
- package/lib/commonjs/mol-gl/shader/chunks/fade-lod.glsl.js +42 -42
- package/lib/commonjs/mol-gl/shader/chunks/float-to-rgba.glsl.js +39 -39
- package/lib/commonjs/mol-gl/shader/chunks/light-frag-params.glsl.js +127 -127
- package/lib/commonjs/mol-gl/shader/chunks/matrix-scale.glsl.js +5 -5
- package/lib/commonjs/mol-gl/shader/chunks/normal-frag-params.glsl.js +2 -2
- package/lib/commonjs/mol-gl/shader/chunks/read-from-texture.glsl.js +14 -14
- package/lib/commonjs/mol-gl/shader/chunks/rgba-to-float.glsl.js +84 -84
- package/lib/commonjs/mol-gl/shader/chunks/size-vert-params.glsl.js +11 -11
- package/lib/commonjs/mol-gl/shader/chunks/texture3d-from-1d-trilinear.glsl.js +23 -23
- package/lib/commonjs/mol-gl/shader/chunks/texture3d-from-2d-linear.glsl.js +17 -17
- package/lib/commonjs/mol-gl/shader/chunks/texture3d-from-2d-nearest.glsl.js +8 -8
- package/lib/commonjs/mol-gl/shader/chunks/wboit-write.glsl.js +25 -25
- package/lib/commonjs/mol-gl/shader/compose.frag.js +12 -12
- package/lib/commonjs/mol-gl/shader/compute/color-smoothing/accumulate.frag.js +23 -23
- package/lib/commonjs/mol-gl/shader/compute/color-smoothing/accumulate.vert.js +43 -43
- package/lib/commonjs/mol-gl/shader/compute/color-smoothing/normalize.frag.js +15 -15
- package/lib/commonjs/mol-gl/shader/copy.frag.js +11 -11
- package/lib/commonjs/mol-gl/shader/cylinders.frag.js +266 -266
- package/lib/commonjs/mol-gl/shader/cylinders.vert.js +89 -89
- package/lib/commonjs/mol-gl/shader/depth-merge.frag.js +23 -23
- package/lib/commonjs/mol-gl/shader/direct-volume.frag.js +362 -362
- package/lib/commonjs/mol-gl/shader/direct-volume.vert.js +41 -41
- package/lib/commonjs/mol-gl/shader/dof.frag.d.ts +7 -0
- package/lib/commonjs/mol-gl/shader/dof.frag.js +122 -0
- package/lib/commonjs/mol-gl/shader/evaluate-dpoit.frag.js +10 -10
- package/lib/commonjs/mol-gl/shader/evaluate-wboit.frag.js +17 -17
- package/lib/commonjs/mol-gl/shader/fxaa.frag.js +228 -228
- package/lib/commonjs/mol-gl/shader/gaussian-density.frag.js +49 -49
- package/lib/commonjs/mol-gl/shader/gaussian-density.vert.js +27 -27
- package/lib/commonjs/mol-gl/shader/hi-z.frag.js +18 -18
- package/lib/commonjs/mol-gl/shader/histogram-pyramid/reduction.frag.js +58 -58
- package/lib/commonjs/mol-gl/shader/histogram-pyramid/sum.frag.js +19 -19
- package/lib/commonjs/mol-gl/shader/image.frag.js +169 -169
- package/lib/commonjs/mol-gl/shader/image.vert.js +21 -21
- package/lib/commonjs/mol-gl/shader/lines.frag.js +42 -42
- package/lib/commonjs/mol-gl/shader/lines.vert.js +117 -117
- package/lib/commonjs/mol-gl/shader/marching-cubes/active-voxels.frag.js +70 -70
- package/lib/commonjs/mol-gl/shader/marching-cubes/isosurface.frag.js +311 -311
- package/lib/commonjs/mol-gl/shader/marking/edge.frag.js +28 -28
- package/lib/commonjs/mol-gl/shader/marking/overlay.frag.js +26 -26
- package/lib/commonjs/mol-gl/shader/mesh.frag.js +65 -65
- package/lib/commonjs/mol-gl/shader/mesh.vert.js +49 -49
- package/lib/commonjs/mol-gl/shader/outlines.frag.js +95 -95
- package/lib/commonjs/mol-gl/shader/points.frag.js +59 -59
- package/lib/commonjs/mol-gl/shader/points.vert.js +38 -38
- package/lib/commonjs/mol-gl/shader/postprocessing.frag.js +150 -150
- package/lib/commonjs/mol-gl/shader/quad.vert.js +10 -10
- package/lib/commonjs/mol-gl/shader/shadows.frag.js +123 -123
- package/lib/commonjs/mol-gl/shader/smaa/blend.frag.js +56 -56
- package/lib/commonjs/mol-gl/shader/smaa/blend.vert.js +25 -25
- package/lib/commonjs/mol-gl/shader/smaa/edges.frag.js +66 -66
- package/lib/commonjs/mol-gl/shader/smaa/edges.vert.js +26 -26
- package/lib/commonjs/mol-gl/shader/smaa/weights.frag.js +206 -206
- package/lib/commonjs/mol-gl/shader/smaa/weights.vert.js +32 -32
- package/lib/commonjs/mol-gl/shader/spheres.frag.js +148 -148
- package/lib/commonjs/mol-gl/shader/spheres.vert.js +132 -132
- package/lib/commonjs/mol-gl/shader/ssao-blur.frag.js +97 -97
- package/lib/commonjs/mol-gl/shader/ssao.frag.js +211 -211
- package/lib/commonjs/mol-gl/shader/text.frag.js +85 -85
- package/lib/commonjs/mol-gl/shader/text.vert.js +85 -85
- package/lib/commonjs/mol-gl/shader/util/grid3d-template.frag.js +46 -46
- package/lib/commonjs/mol-gl/shader-code.js +15 -15
- package/lib/commonjs/mol-gl/webgl/compat.js +12 -12
- package/lib/commonjs/mol-gl/webgl/context.js +1 -0
- package/lib/commonjs/mol-gl/webgl/timer.d.ts +1 -1
- package/lib/commonjs/mol-gl/webgl/timer.js +8 -1
- package/lib/commonjs/mol-math/linear-algebra/3d/minimize-rmsd.js +2 -1
- package/lib/commonjs/mol-plugin/animation-loop.d.ts +1 -0
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/behavior.d.ts +6 -6
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/transformers.d.ts +3 -3
- package/lib/commonjs/mol-plugin-state/animation/built-in/state-snapshots.js +7 -3
- package/lib/commonjs/mol-plugin-ui/viewport/simple-settings.js +3 -0
- package/lib/commonjs/servers/common/swagger-ui/indexTemplate.js +66 -66
- package/lib/commonjs/servers/volume/config.js +5 -5
- package/lib/examples/alpha-orbitals/example-data.js +160 -160
- package/lib/examples/alpha-orbitals/index.html +72 -72
- package/lib/examples/basic-wrapper/index.html +137 -137
- package/lib/examples/lighting/index.html +88 -88
- package/lib/examples/proteopedia-wrapper/index.html +236 -236
- package/lib/extensions/alpha-orbitals/gpu/shader.frag.js +136 -136
- package/lib/extensions/assembly-symmetry/prop.js +24 -24
- package/lib/extensions/dnatco/confal-pyramids/behavior.js +5 -5
- package/lib/extensions/dnatco/ntc-tube/behavior.js +5 -5
- package/lib/extensions/geo-export/usdz-exporter.js +41 -41
- package/lib/extensions/meshes/mesh-extension.d.ts +1 -0
- package/lib/extensions/mp4-export/encoder.js +1 -1
- package/lib/extensions/mvs/components/annotation-label/representation.d.ts +0 -2
- package/lib/extensions/mvs/components/custom-label/representation.d.ts +2 -2
- package/lib/extensions/mvs/tree/mvs/mvs-builder.d.ts +8 -2
- package/lib/extensions/sb-ncbr/index.d.ts +8 -0
- package/lib/extensions/sb-ncbr/index.js +8 -0
- package/lib/extensions/sb-ncbr/tunnels/actions.d.ts +20 -0
- package/lib/extensions/sb-ncbr/tunnels/actions.js +86 -0
- package/lib/extensions/sb-ncbr/tunnels/algorithm.d.ts +26 -0
- package/lib/extensions/sb-ncbr/tunnels/algorithm.js +469 -0
- package/lib/extensions/sb-ncbr/tunnels/behavior.d.ts +40 -0
- package/lib/extensions/sb-ncbr/tunnels/behavior.js +92 -0
- package/lib/extensions/sb-ncbr/tunnels/data-model.d.ts +146 -0
- package/lib/extensions/sb-ncbr/tunnels/data-model.js +23 -0
- package/lib/extensions/sb-ncbr/tunnels/examples.d.ts +12 -0
- package/lib/extensions/sb-ncbr/tunnels/examples.js +49 -0
- package/lib/extensions/sb-ncbr/tunnels/props.d.ts +19 -0
- package/lib/extensions/sb-ncbr/tunnels/props.js +22 -0
- package/lib/extensions/sb-ncbr/tunnels/representation.d.ts +29 -0
- package/lib/extensions/sb-ncbr/tunnels/representation.js +96 -0
- package/lib/mol-canvas3d/canvas3d.d.ts +17 -0
- package/lib/mol-canvas3d/canvas3d.js +4 -0
- package/lib/mol-canvas3d/passes/dof.d.ts +34 -0
- package/lib/mol-canvas3d/passes/dof.js +163 -0
- package/lib/mol-canvas3d/passes/draw.d.ts +2 -0
- package/lib/mol-canvas3d/passes/draw.js +31 -8
- package/lib/mol-canvas3d/passes/image.d.ts +8 -0
- package/lib/mol-canvas3d/passes/postprocessing.d.ts +8 -0
- package/lib/mol-canvas3d/passes/postprocessing.js +5 -0
- package/lib/mol-geo/geometry/lines/lines.d.ts +0 -1
- package/lib/mol-gl/shader/background.frag.js +95 -95
- package/lib/mol-gl/shader/background.vert.js +11 -11
- package/lib/mol-gl/shader/blend-back-dpoit.frag.js +13 -13
- package/lib/mol-gl/shader/bloom/blur.frag.js +28 -28
- package/lib/mol-gl/shader/bloom/composite.frag.js +33 -33
- package/lib/mol-gl/shader/bloom/luminosity.frag.js +52 -52
- package/lib/mol-gl/shader/cas.frag.js +144 -144
- package/lib/mol-gl/shader/chunks/apply-fog.glsl.js +31 -31
- package/lib/mol-gl/shader/chunks/apply-interior-color.glsl.js +12 -12
- package/lib/mol-gl/shader/chunks/apply-light-color.glsl.js +77 -77
- package/lib/mol-gl/shader/chunks/apply-marker-color.glsl.js +16 -16
- package/lib/mol-gl/shader/chunks/assign-clipping-varying.glsl.js +8 -8
- package/lib/mol-gl/shader/chunks/assign-color-varying.glsl.js +140 -140
- package/lib/mol-gl/shader/chunks/assign-group.glsl.js +6 -6
- package/lib/mol-gl/shader/chunks/assign-marker-varying.glsl.js +8 -8
- package/lib/mol-gl/shader/chunks/assign-material-color.glsl.js +112 -112
- package/lib/mol-gl/shader/chunks/assign-position.glsl.js +14 -14
- package/lib/mol-gl/shader/chunks/assign-size.glsl.js +18 -18
- package/lib/mol-gl/shader/chunks/check-picking-alpha.glsl.js +12 -12
- package/lib/mol-gl/shader/chunks/check-transparency.glsl.js +16 -16
- package/lib/mol-gl/shader/chunks/clip-instance.glsl.js +7 -7
- package/lib/mol-gl/shader/chunks/clip-pixel.glsl.js +5 -5
- package/lib/mol-gl/shader/chunks/color-frag-params.glsl.js +60 -60
- package/lib/mol-gl/shader/chunks/color-vert-params.glsl.js +122 -122
- package/lib/mol-gl/shader/chunks/common-clip.glsl.js +104 -104
- package/lib/mol-gl/shader/chunks/common-frag-params.glsl.js +150 -150
- package/lib/mol-gl/shader/chunks/common-vert-params.glsl.js +61 -61
- package/lib/mol-gl/shader/chunks/common.glsl.js +234 -234
- package/lib/mol-gl/shader/chunks/dpoit-write.glsl.js +62 -62
- package/lib/mol-gl/shader/chunks/fade-lod.glsl.js +42 -42
- package/lib/mol-gl/shader/chunks/float-to-rgba.glsl.js +39 -39
- package/lib/mol-gl/shader/chunks/light-frag-params.glsl.js +127 -127
- package/lib/mol-gl/shader/chunks/matrix-scale.glsl.js +5 -5
- package/lib/mol-gl/shader/chunks/normal-frag-params.glsl.js +2 -2
- package/lib/mol-gl/shader/chunks/read-from-texture.glsl.js +14 -14
- package/lib/mol-gl/shader/chunks/rgba-to-float.glsl.js +84 -84
- package/lib/mol-gl/shader/chunks/size-vert-params.glsl.js +11 -11
- package/lib/mol-gl/shader/chunks/texture3d-from-1d-trilinear.glsl.js +23 -23
- package/lib/mol-gl/shader/chunks/texture3d-from-2d-linear.glsl.js +17 -17
- package/lib/mol-gl/shader/chunks/texture3d-from-2d-nearest.glsl.js +8 -8
- package/lib/mol-gl/shader/chunks/wboit-write.glsl.js +25 -25
- package/lib/mol-gl/shader/compose.frag.js +12 -12
- package/lib/mol-gl/shader/compute/color-smoothing/accumulate.frag.js +23 -23
- package/lib/mol-gl/shader/compute/color-smoothing/accumulate.vert.js +43 -43
- package/lib/mol-gl/shader/compute/color-smoothing/normalize.frag.js +15 -15
- package/lib/mol-gl/shader/copy.frag.js +11 -11
- package/lib/mol-gl/shader/cylinders.frag.js +266 -266
- package/lib/mol-gl/shader/cylinders.vert.js +89 -89
- package/lib/mol-gl/shader/depth-merge.frag.js +23 -23
- package/lib/mol-gl/shader/direct-volume.frag.js +362 -362
- package/lib/mol-gl/shader/direct-volume.vert.js +41 -41
- package/lib/mol-gl/shader/dof.frag.d.ts +7 -0
- package/lib/mol-gl/shader/dof.frag.js +119 -0
- package/lib/mol-gl/shader/evaluate-dpoit.frag.js +10 -10
- package/lib/mol-gl/shader/evaluate-wboit.frag.js +17 -17
- package/lib/mol-gl/shader/fxaa.frag.js +228 -228
- package/lib/mol-gl/shader/gaussian-density.frag.js +49 -49
- package/lib/mol-gl/shader/gaussian-density.vert.js +27 -27
- package/lib/mol-gl/shader/hi-z.frag.js +18 -18
- package/lib/mol-gl/shader/histogram-pyramid/reduction.frag.js +58 -58
- package/lib/mol-gl/shader/histogram-pyramid/sum.frag.js +19 -19
- package/lib/mol-gl/shader/image.frag.js +169 -169
- package/lib/mol-gl/shader/image.vert.js +21 -21
- package/lib/mol-gl/shader/lines.frag.js +42 -42
- package/lib/mol-gl/shader/lines.vert.js +117 -117
- package/lib/mol-gl/shader/marching-cubes/active-voxels.frag.js +70 -70
- package/lib/mol-gl/shader/marching-cubes/isosurface.frag.js +311 -311
- package/lib/mol-gl/shader/marking/edge.frag.js +28 -28
- package/lib/mol-gl/shader/marking/overlay.frag.js +26 -26
- package/lib/mol-gl/shader/mesh.frag.js +65 -65
- package/lib/mol-gl/shader/mesh.vert.js +49 -49
- package/lib/mol-gl/shader/outlines.frag.js +95 -95
- package/lib/mol-gl/shader/points.frag.js +59 -59
- package/lib/mol-gl/shader/points.vert.js +38 -38
- package/lib/mol-gl/shader/postprocessing.frag.js +150 -150
- package/lib/mol-gl/shader/quad.vert.js +10 -10
- package/lib/mol-gl/shader/shadows.frag.js +123 -123
- package/lib/mol-gl/shader/smaa/blend.frag.js +56 -56
- package/lib/mol-gl/shader/smaa/blend.vert.js +25 -25
- package/lib/mol-gl/shader/smaa/edges.frag.js +66 -66
- package/lib/mol-gl/shader/smaa/edges.vert.js +26 -26
- package/lib/mol-gl/shader/smaa/weights.frag.js +206 -206
- package/lib/mol-gl/shader/smaa/weights.vert.js +32 -32
- package/lib/mol-gl/shader/spheres.frag.js +148 -148
- package/lib/mol-gl/shader/spheres.vert.js +132 -132
- package/lib/mol-gl/shader/ssao-blur.frag.js +97 -97
- package/lib/mol-gl/shader/ssao.frag.js +211 -211
- package/lib/mol-gl/shader/text.frag.js +85 -85
- package/lib/mol-gl/shader/text.vert.js +85 -85
- package/lib/mol-gl/shader/util/grid3d-template.frag.js +46 -46
- package/lib/mol-gl/shader-code.js +15 -15
- package/lib/mol-gl/webgl/compat.js +12 -12
- package/lib/mol-gl/webgl/context.js +1 -0
- package/lib/mol-gl/webgl/timer.d.ts +1 -1
- package/lib/mol-gl/webgl/timer.js +8 -1
- package/lib/mol-math/linear-algebra/3d/minimize-rmsd.js +2 -1
- package/lib/mol-plugin/animation-loop.d.ts +1 -0
- package/lib/mol-plugin/behavior/dynamic/volume-streaming/behavior.d.ts +6 -6
- package/lib/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +1 -1
- package/lib/mol-plugin/behavior/dynamic/volume-streaming/transformers.d.ts +3 -3
- package/lib/mol-plugin/version.js +2 -2
- package/lib/mol-plugin-state/animation/built-in/state-snapshots.js +7 -3
- package/lib/mol-plugin-ui/skin/base/base.scss +37 -37
- package/lib/mol-plugin-ui/skin/base/components/controls-base.scss +333 -333
- package/lib/mol-plugin-ui/skin/base/components/controls.scss +445 -445
- 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 +663 -663
- 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 +194 -194
- 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 +88 -88
- package/lib/mol-plugin-ui/skin/blue.scss +1 -1
- package/lib/mol-plugin-ui/skin/colors/blue.scss +23 -23
- package/lib/mol-plugin-ui/skin/colors/dark.scss +23 -23
- package/lib/mol-plugin-ui/skin/colors/light.scss +29 -29
- package/lib/mol-plugin-ui/skin/dark.scss +1 -1
- package/lib/mol-plugin-ui/skin/light.scss +1 -1
- package/lib/mol-plugin-ui/viewport/simple-settings.js +3 -0
- package/lib/servers/common/swagger-ui/indexTemplate.js +66 -66
- package/lib/servers/volume/config.js +5 -5
- package/package.json +196 -195
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
|
+
*
|
|
4
|
+
* @author Dušan Veľký <dvelky@mail.muni.cz>
|
|
5
|
+
*/
|
|
6
|
+
import { PluginBehavior } from '../../../mol-plugin/behavior';
|
|
7
|
+
import { DownloadTunnels } from './actions';
|
|
8
|
+
import { ParamDefinition as PD } from '../../../mol-util/param-definition';
|
|
9
|
+
import { PresetStructureRepresentations, StructureRepresentationPresetProvider } from '../../../mol-plugin-state/builder/structure/representation-preset';
|
|
10
|
+
import { Model } from '../../../mol-model/structure';
|
|
11
|
+
import { StateObjectRef } from '../../../mol-state';
|
|
12
|
+
import { getTunnelsConfig, TunnelsDataParams } from './props';
|
|
13
|
+
import { StateTransforms } from '../../../mol-plugin-state/transforms';
|
|
14
|
+
import { TunnelShapeProvider, TunnelFromRawData } from './representation';
|
|
15
|
+
import { ColorGenerator } from '../../meshes/mesh-utils';
|
|
16
|
+
export const SbNcbrTunnels = PluginBehavior.create({
|
|
17
|
+
name: 'sb-ncbr-tunnels',
|
|
18
|
+
category: 'misc',
|
|
19
|
+
display: {
|
|
20
|
+
name: 'SB NCBR Tunnels',
|
|
21
|
+
},
|
|
22
|
+
ctor: class extends PluginBehavior.Handler {
|
|
23
|
+
register() {
|
|
24
|
+
this.ctx.state.data.actions.add(DownloadTunnels);
|
|
25
|
+
this.ctx.builders.structure.representation.registerPreset(TunnelsPreset);
|
|
26
|
+
}
|
|
27
|
+
unregister() {
|
|
28
|
+
this.ctx.state.data.actions.remove(DownloadTunnels);
|
|
29
|
+
this.ctx.builders.structure.representation.unregisterPreset(TunnelsPreset);
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
params: () => ({
|
|
33
|
+
autoAttach: PD.Boolean(true),
|
|
34
|
+
})
|
|
35
|
+
});
|
|
36
|
+
export function isApplicable(structure) {
|
|
37
|
+
return (!!structure && structure.models.length === 1 &&
|
|
38
|
+
Model.hasPdbId(structure.models[0]));
|
|
39
|
+
}
|
|
40
|
+
export const TunnelsPreset = StructureRepresentationPresetProvider({
|
|
41
|
+
id: 'sb-ncbr-preset-structure-tunnels',
|
|
42
|
+
display: {
|
|
43
|
+
name: 'Tunnels', group: 'Annotation',
|
|
44
|
+
description: 'Shows Tunnels from ChannelsDB contained in the structure.'
|
|
45
|
+
},
|
|
46
|
+
isApplicable(a) {
|
|
47
|
+
return isApplicable(a.data);
|
|
48
|
+
},
|
|
49
|
+
params: (a, plugin) => {
|
|
50
|
+
return {
|
|
51
|
+
...StructureRepresentationPresetProvider.CommonParams,
|
|
52
|
+
...getConfiguredDefaultParams(plugin)
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
async apply(ref, params, plugin) {
|
|
56
|
+
var _a, _b;
|
|
57
|
+
const structureCell = StateObjectRef.resolveAndCheck(plugin.state.data, ref);
|
|
58
|
+
const structure = (_a = structureCell === null || structureCell === void 0 ? void 0 : structureCell.obj) === null || _a === void 0 ? void 0 : _a.data;
|
|
59
|
+
if (!structureCell || !structure)
|
|
60
|
+
return {};
|
|
61
|
+
const update = plugin.build();
|
|
62
|
+
const webgl = (_b = plugin.canvas3dContext) === null || _b === void 0 ? void 0 : _b.webgl;
|
|
63
|
+
const response = await (await fetch(`${params.serverUrl}/channels/${params.serverType}/${structure.model.entryId.toLowerCase()}`)).json();
|
|
64
|
+
const tunnels = [];
|
|
65
|
+
Object.entries(response.Channels).forEach(([key, values]) => {
|
|
66
|
+
if (values.length > 0) {
|
|
67
|
+
values.forEach((item) => {
|
|
68
|
+
tunnels.push({ data: item.Profile, props: { id: item.Id, type: item.Type } });
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
await tunnels.forEach(async (tunnel) => {
|
|
73
|
+
await update
|
|
74
|
+
.toRoot()
|
|
75
|
+
.apply(TunnelFromRawData, { data: tunnel })
|
|
76
|
+
.apply(TunnelShapeProvider, {
|
|
77
|
+
webgl,
|
|
78
|
+
colorTheme: ColorGenerator.next().value,
|
|
79
|
+
})
|
|
80
|
+
.apply(StateTransforms.Representation.ShapeRepresentation3D);
|
|
81
|
+
await update.commit();
|
|
82
|
+
});
|
|
83
|
+
const preset = await PresetStructureRepresentations.auto.apply(ref, { ...params }, plugin);
|
|
84
|
+
return { components: preset.components, representations: { ...preset.representations, } };
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
function getConfiguredDefaultParams(plugin) {
|
|
88
|
+
const config = getTunnelsConfig(plugin);
|
|
89
|
+
const params = PD.clone(TunnelsDataParams);
|
|
90
|
+
PD.setDefaultValues(params, { serverType: config.DefaultServerType, serverUrl: config.DefaultServerUrl });
|
|
91
|
+
return params;
|
|
92
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
|
+
*
|
|
4
|
+
* @author Dušan Veľký <dvelky@mail.muni.cz>
|
|
5
|
+
*/
|
|
6
|
+
import { WebGLContext } from '../../../mol-gl/webgl/context';
|
|
7
|
+
import { PluginStateObject } from '../../../mol-plugin-state/objects';
|
|
8
|
+
import { ParamDefinition as PD } from '../../../mol-util/param-definition';
|
|
9
|
+
export interface Profile {
|
|
10
|
+
Charge: number;
|
|
11
|
+
Radius: number;
|
|
12
|
+
FreeRadius: number;
|
|
13
|
+
T: number;
|
|
14
|
+
Distance: number;
|
|
15
|
+
X: number;
|
|
16
|
+
Y: number;
|
|
17
|
+
Z: number;
|
|
18
|
+
}
|
|
19
|
+
export interface Layerweightedproperties {
|
|
20
|
+
Hydrophobicity: number;
|
|
21
|
+
Hydropathy: number;
|
|
22
|
+
Polarity: number;
|
|
23
|
+
Mutability: number;
|
|
24
|
+
}
|
|
25
|
+
export interface LayerGeometry {
|
|
26
|
+
MinRadius: number;
|
|
27
|
+
MinFreeRadius: number;
|
|
28
|
+
StartDistance: number;
|
|
29
|
+
EndDistance: number;
|
|
30
|
+
LocalMinimum: boolean;
|
|
31
|
+
Bottleneck: boolean;
|
|
32
|
+
bottleneck: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface Properties {
|
|
35
|
+
Charge: number;
|
|
36
|
+
NumPositives: number;
|
|
37
|
+
NumNegatives: number;
|
|
38
|
+
Hydrophobicity: number;
|
|
39
|
+
Hydropathy: number;
|
|
40
|
+
Polarity: number;
|
|
41
|
+
Mutability: number;
|
|
42
|
+
}
|
|
43
|
+
export interface LayersInfo {
|
|
44
|
+
LayerGeometry: LayerGeometry;
|
|
45
|
+
Residues: string[];
|
|
46
|
+
FlowIndices: string[];
|
|
47
|
+
Properties: Properties;
|
|
48
|
+
}
|
|
49
|
+
export interface Layers {
|
|
50
|
+
ResidueFlow: string[];
|
|
51
|
+
HetResidues: any[];
|
|
52
|
+
LayerWeightedProperties: Layerweightedproperties;
|
|
53
|
+
LayersInfo: LayersInfo[];
|
|
54
|
+
}
|
|
55
|
+
export interface TunnelDB {
|
|
56
|
+
Type: string;
|
|
57
|
+
Id: string;
|
|
58
|
+
Cavity: string;
|
|
59
|
+
Auto: boolean;
|
|
60
|
+
Properties: Properties;
|
|
61
|
+
Profile: Profile[];
|
|
62
|
+
Layers: Layers;
|
|
63
|
+
}
|
|
64
|
+
export interface ChannelsDBdata {
|
|
65
|
+
'CSATunnels_MOLE': TunnelDB[];
|
|
66
|
+
'CSATunnels_Caver': TunnelDB[];
|
|
67
|
+
'ReviewedChannels_MOLE': TunnelDB[];
|
|
68
|
+
'ReviewedChannels_Caver': TunnelDB[];
|
|
69
|
+
'CofactorTunnels_MOLE': TunnelDB[];
|
|
70
|
+
'CofactorTunnels_Caver': TunnelDB[];
|
|
71
|
+
'TransmembranePores_MOLE': TunnelDB[];
|
|
72
|
+
'TransmembranePores_Caver': TunnelDB[];
|
|
73
|
+
'ProcognateTunnels_MOLE': TunnelDB[];
|
|
74
|
+
'ProcognateTunnels_Caver': TunnelDB[];
|
|
75
|
+
'AlphaFillTunnels_MOLE': TunnelDB[];
|
|
76
|
+
'AlphaFillTunnels_Caver': TunnelDB[];
|
|
77
|
+
}
|
|
78
|
+
export interface ChannelsCache {
|
|
79
|
+
Channels: ChannelsDBdata;
|
|
80
|
+
}
|
|
81
|
+
export interface Tunnel {
|
|
82
|
+
data: Profile[];
|
|
83
|
+
props: {
|
|
84
|
+
highlight_label?: string;
|
|
85
|
+
type?: string;
|
|
86
|
+
id?: string;
|
|
87
|
+
label?: string;
|
|
88
|
+
description?: string;
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
export declare const TunnelShapeParams: {
|
|
92
|
+
webgl: PD.Value<WebGLContext | null>;
|
|
93
|
+
colorTheme: PD.Color;
|
|
94
|
+
visual: PD.Mapped<PD.NamedParams<PD.Normalize<{
|
|
95
|
+
resolution: number;
|
|
96
|
+
}>, "spheres"> | PD.NamedParams<PD.Normalize<{
|
|
97
|
+
resolution: number;
|
|
98
|
+
}>, "mesh">>;
|
|
99
|
+
samplingRate: PD.Numeric;
|
|
100
|
+
showRadii: PD.BooleanParam;
|
|
101
|
+
};
|
|
102
|
+
declare const TunnelStateObject_base: {
|
|
103
|
+
new (data: {
|
|
104
|
+
tunnel: Tunnel;
|
|
105
|
+
}, props?: {
|
|
106
|
+
label: string;
|
|
107
|
+
description?: string | undefined;
|
|
108
|
+
} | undefined): {
|
|
109
|
+
id: import("../../../mol-util").UUID;
|
|
110
|
+
type: PluginStateObject.TypeInfo;
|
|
111
|
+
label: string;
|
|
112
|
+
description?: string | undefined;
|
|
113
|
+
data: {
|
|
114
|
+
tunnel: Tunnel;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
type: PluginStateObject.TypeInfo;
|
|
118
|
+
is(obj?: import("../../../mol-state").StateObject<any, import("../../../mol-state").StateObject.Type<any>> | undefined): obj is import("../../../mol-state").StateObject<{
|
|
119
|
+
tunnel: Tunnel;
|
|
120
|
+
}, PluginStateObject.TypeInfo>;
|
|
121
|
+
};
|
|
122
|
+
export declare class TunnelStateObject extends TunnelStateObject_base {
|
|
123
|
+
}
|
|
124
|
+
declare const TunnelsStateObject_base: {
|
|
125
|
+
new (data: {
|
|
126
|
+
tunnels: Tunnel[];
|
|
127
|
+
}, props?: {
|
|
128
|
+
label: string;
|
|
129
|
+
description?: string | undefined;
|
|
130
|
+
} | undefined): {
|
|
131
|
+
id: import("../../../mol-util").UUID;
|
|
132
|
+
type: PluginStateObject.TypeInfo;
|
|
133
|
+
label: string;
|
|
134
|
+
description?: string | undefined;
|
|
135
|
+
data: {
|
|
136
|
+
tunnels: Tunnel[];
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
type: PluginStateObject.TypeInfo;
|
|
140
|
+
is(obj?: import("../../../mol-state").StateObject<any, import("../../../mol-state").StateObject.Type<any>> | undefined): obj is import("../../../mol-state").StateObject<{
|
|
141
|
+
tunnels: Tunnel[];
|
|
142
|
+
}, PluginStateObject.TypeInfo>;
|
|
143
|
+
};
|
|
144
|
+
export declare class TunnelsStateObject extends TunnelsStateObject_base {
|
|
145
|
+
}
|
|
146
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
|
+
*
|
|
4
|
+
* @author Dušan Veľký <dvelky@mail.muni.cz>
|
|
5
|
+
*/
|
|
6
|
+
import { PluginStateObject } from '../../../mol-plugin-state/objects';
|
|
7
|
+
import { Color } from '../../../mol-util/color';
|
|
8
|
+
import { ParamDefinition as PD } from '../../../mol-util/param-definition';
|
|
9
|
+
;
|
|
10
|
+
export const TunnelShapeParams = {
|
|
11
|
+
webgl: PD.Value(null),
|
|
12
|
+
colorTheme: PD.Color(Color(0xff0000)),
|
|
13
|
+
visual: PD.MappedStatic('mesh', {
|
|
14
|
+
mesh: PD.Group({ resolution: PD.Numeric(2) }),
|
|
15
|
+
spheres: PD.Group({ resolution: PD.Numeric(2) })
|
|
16
|
+
}),
|
|
17
|
+
samplingRate: PD.Numeric(1, { min: 0.05, max: 1, step: 0.05 }),
|
|
18
|
+
showRadii: PD.Boolean(false),
|
|
19
|
+
};
|
|
20
|
+
export class TunnelStateObject extends PluginStateObject.Create({ name: 'Tunnel Entry', typeClass: 'Data' }) {
|
|
21
|
+
}
|
|
22
|
+
export class TunnelsStateObject extends PluginStateObject.Create({ name: 'Tunnels', typeClass: 'Data' }) {
|
|
23
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
|
+
*
|
|
4
|
+
* @author Dušan Veľký <dvelky@mail.muni.cz>
|
|
5
|
+
*/
|
|
6
|
+
import { PluginContext } from '../../../mol-plugin/context';
|
|
7
|
+
export declare const DB_URL = "https://channelsdb2.biodata.ceitec.cz/api/channels/";
|
|
8
|
+
export declare const SUB_DB = "pdb";
|
|
9
|
+
export declare const CHANNEL = "1ymg";
|
|
10
|
+
export declare const URL = "https://channelsdb2.biodata.ceitec.cz/api/channels/pdb/1ymg";
|
|
11
|
+
export declare function runVisualizeTunnels(plugin: PluginContext, url?: string): Promise<void>;
|
|
12
|
+
export declare function runVisualizeTunnel(plugin: PluginContext): Promise<void>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
|
+
*
|
|
4
|
+
* @author Dušan Veľký <dvelky@mail.muni.cz>
|
|
5
|
+
*/
|
|
6
|
+
import { StateTransforms } from '../../../mol-plugin-state/transforms';
|
|
7
|
+
import { TunnelsFromRawData, SelectTunnel, TunnelShapeProvider, TunnelFromRawData } from './representation';
|
|
8
|
+
export const DB_URL = 'https://channelsdb2.biodata.ceitec.cz/api/channels/';
|
|
9
|
+
export const SUB_DB = 'pdb';
|
|
10
|
+
export const CHANNEL = '1ymg';
|
|
11
|
+
export const URL = `${DB_URL}${SUB_DB}/${CHANNEL}`;
|
|
12
|
+
export async function runVisualizeTunnels(plugin, url = URL) {
|
|
13
|
+
var _a;
|
|
14
|
+
const update = plugin.build();
|
|
15
|
+
const webgl = (_a = plugin.canvas3dContext) === null || _a === void 0 ? void 0 : _a.webgl;
|
|
16
|
+
const response = await (await fetch(url)).json();
|
|
17
|
+
const tunnels = [];
|
|
18
|
+
Object.entries(response.Channels).forEach(([key, values]) => {
|
|
19
|
+
if (values.length > 0) {
|
|
20
|
+
values.forEach((item) => {
|
|
21
|
+
tunnels.push({ data: item.Profile, props: { id: item.Id, type: item.Type } });
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
update
|
|
26
|
+
.toRoot()
|
|
27
|
+
.apply(TunnelsFromRawData, { data: tunnels })
|
|
28
|
+
.apply(SelectTunnel)
|
|
29
|
+
.apply(TunnelShapeProvider, {
|
|
30
|
+
webgl,
|
|
31
|
+
})
|
|
32
|
+
.apply(StateTransforms.Representation.ShapeRepresentation3D);
|
|
33
|
+
await update.commit();
|
|
34
|
+
}
|
|
35
|
+
export async function runVisualizeTunnel(plugin) {
|
|
36
|
+
var _a;
|
|
37
|
+
const update = plugin.build();
|
|
38
|
+
const webgl = (_a = plugin.canvas3dContext) === null || _a === void 0 ? void 0 : _a.webgl;
|
|
39
|
+
const response = await (await fetch(URL)).json();
|
|
40
|
+
const tunnel = response.Channels.TransmembranePores_MOLE[0];
|
|
41
|
+
update
|
|
42
|
+
.toRoot()
|
|
43
|
+
.apply(TunnelFromRawData, { data: { data: tunnel.Profile, props: { id: tunnel.Id, type: tunnel.Type } } })
|
|
44
|
+
.apply(TunnelShapeProvider, {
|
|
45
|
+
webgl,
|
|
46
|
+
})
|
|
47
|
+
.apply(StateTransforms.Representation.ShapeRepresentation3D);
|
|
48
|
+
await update.commit();
|
|
49
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PluginConfigItem } from '../../../mol-plugin/config';
|
|
2
|
+
import { PluginContext } from '../../../mol-plugin/context';
|
|
3
|
+
import { ParamDefinition as PD } from '../../../mol-util/param-definition';
|
|
4
|
+
export declare namespace TunnelsData {
|
|
5
|
+
const DefaultServerUrl = "https://channelsdb2.biodata.ceitec.cz/api";
|
|
6
|
+
const DefaultServerType = "pdb";
|
|
7
|
+
}
|
|
8
|
+
export declare const TunnelsDataParams: {
|
|
9
|
+
serverType: PD.Select<"pdb">;
|
|
10
|
+
serverUrl: PD.Text<string>;
|
|
11
|
+
};
|
|
12
|
+
export type TunnelsDataParams = typeof TunnelsDataParams;
|
|
13
|
+
export declare const TunnelsServerConfig: {
|
|
14
|
+
DefaultServerUrl: PluginConfigItem<string>;
|
|
15
|
+
DefaultServerType: PluginConfigItem<"pdb">;
|
|
16
|
+
};
|
|
17
|
+
export declare function getTunnelsConfig(plugin: PluginContext): {
|
|
18
|
+
[key in keyof typeof TunnelsServerConfig]: NonNullable<typeof TunnelsServerConfig[key]['defaultValue']>;
|
|
19
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PluginConfigItem } from '../../../mol-plugin/config';
|
|
2
|
+
import { ParamDefinition as PD } from '../../../mol-util/param-definition';
|
|
3
|
+
export var TunnelsData;
|
|
4
|
+
(function (TunnelsData) {
|
|
5
|
+
TunnelsData.DefaultServerUrl = 'https://channelsdb2.biodata.ceitec.cz/api';
|
|
6
|
+
TunnelsData.DefaultServerType = 'pdb';
|
|
7
|
+
})(TunnelsData || (TunnelsData = {}));
|
|
8
|
+
export const TunnelsDataParams = {
|
|
9
|
+
serverType: PD.Select('pdb', [['pdb', 'pdb']]),
|
|
10
|
+
serverUrl: PD.Text(TunnelsData.DefaultServerUrl)
|
|
11
|
+
};
|
|
12
|
+
export const TunnelsServerConfig = {
|
|
13
|
+
DefaultServerUrl: new PluginConfigItem('channelsdb-server', 'https://channelsdb2.biodata.ceitec.cz/api'),
|
|
14
|
+
DefaultServerType: new PluginConfigItem('serverType', 'pdb')
|
|
15
|
+
};
|
|
16
|
+
export function getTunnelsConfig(plugin) {
|
|
17
|
+
var _a, _b, _c, _d;
|
|
18
|
+
return {
|
|
19
|
+
DefaultServerUrl: (_b = (_a = plugin.config.get(TunnelsServerConfig.DefaultServerUrl)) !== null && _a !== void 0 ? _a : TunnelsServerConfig.DefaultServerUrl.defaultValue) !== null && _b !== void 0 ? _b : TunnelsData.DefaultServerUrl,
|
|
20
|
+
DefaultServerType: (_d = (_c = plugin.config.get(TunnelsServerConfig.DefaultServerType)) !== null && _c !== void 0 ? _c : TunnelsServerConfig.DefaultServerType.defaultValue) !== null && _d !== void 0 ? _d : TunnelsData.DefaultServerType,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
|
+
*
|
|
4
|
+
* @author Dušan Veľký <dvelky@mail.muni.cz>
|
|
5
|
+
*/
|
|
6
|
+
import { PluginStateObject } from '../../../mol-plugin-state/objects';
|
|
7
|
+
import { StateTransformer } from '../../../mol-state';
|
|
8
|
+
import { TunnelStateObject, Tunnel, TunnelsStateObject } from './data-model';
|
|
9
|
+
import { ParamDefinition as PD } from '../../../mol-util/param-definition';
|
|
10
|
+
export declare const TunnelsFromRawData: StateTransformer<PluginStateObject.Root, TunnelsStateObject, PD.Normalize<{
|
|
11
|
+
data: Tunnel[];
|
|
12
|
+
}>>;
|
|
13
|
+
export declare const SelectTunnel: StateTransformer<TunnelsStateObject, TunnelStateObject, PD.Normalize<{
|
|
14
|
+
index: number;
|
|
15
|
+
}>>;
|
|
16
|
+
export declare const TunnelFromRawData: StateTransformer<PluginStateObject.Root, TunnelStateObject, PD.Normalize<{
|
|
17
|
+
data: Tunnel;
|
|
18
|
+
}>>;
|
|
19
|
+
export declare const TunnelShapeProvider: StateTransformer<TunnelStateObject, PluginStateObject.Shape.Provider, PD.Normalize<{
|
|
20
|
+
webgl: import("../../../mol-gl/webgl/context").WebGLContext | null;
|
|
21
|
+
colorTheme: import("../../../mol-util/color").Color;
|
|
22
|
+
visual: PD.NamedParams<PD.Normalize<{
|
|
23
|
+
resolution: any;
|
|
24
|
+
}>, "spheres"> | PD.NamedParams<PD.Normalize<{
|
|
25
|
+
resolution: any;
|
|
26
|
+
}>, "mesh">;
|
|
27
|
+
samplingRate: number;
|
|
28
|
+
showRadii: boolean;
|
|
29
|
+
}>>;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
|
+
*
|
|
4
|
+
* @author Dušan Veľký <dvelky@mail.muni.cz>
|
|
5
|
+
*/
|
|
6
|
+
import { PluginStateObject } from '../../../mol-plugin-state/objects';
|
|
7
|
+
import { StateTransformer } from '../../../mol-state';
|
|
8
|
+
import { TunnelStateObject, TunnelShapeParams, TunnelsStateObject } from './data-model';
|
|
9
|
+
import { ParamDefinition as PD } from '../../../mol-util/param-definition';
|
|
10
|
+
import { Mesh } from '../../../mol-geo/geometry/mesh/mesh';
|
|
11
|
+
import { Task } from '../../../mol-task';
|
|
12
|
+
import { createTunnelShape, createSpheresShape } from './algorithm';
|
|
13
|
+
const Transform = StateTransformer.builderFactory('sb-ncbr-tunnels');
|
|
14
|
+
export const TunnelsFromRawData = Transform({
|
|
15
|
+
name: 'sb-ncbr-tunnels-from-data',
|
|
16
|
+
display: { name: 'Tunnels' },
|
|
17
|
+
from: PluginStateObject.Root,
|
|
18
|
+
to: TunnelsStateObject,
|
|
19
|
+
params: {
|
|
20
|
+
data: PD.Value([]),
|
|
21
|
+
},
|
|
22
|
+
})({
|
|
23
|
+
apply({ params }) {
|
|
24
|
+
return new TunnelsStateObject({ tunnels: params.data });
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
export const SelectTunnel = Transform({
|
|
28
|
+
name: 'sb-ncbr-tunnel-from-tunnels',
|
|
29
|
+
display: { name: 'Tunnel Selection' },
|
|
30
|
+
from: TunnelsStateObject,
|
|
31
|
+
to: TunnelStateObject,
|
|
32
|
+
params: a => {
|
|
33
|
+
return {
|
|
34
|
+
index: PD.Numeric(0, { min: 0, max: a.data.tunnels.length - 1, step: 1 })
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
})({
|
|
38
|
+
apply({ a, params }) {
|
|
39
|
+
return new TunnelStateObject({ tunnel: a.data.tunnels[params.index] });
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
export const TunnelFromRawData = Transform({
|
|
43
|
+
name: 'sb-ncbr-tunnel-from-data',
|
|
44
|
+
display: { name: 'Tunnel Entry' },
|
|
45
|
+
from: PluginStateObject.Root,
|
|
46
|
+
to: TunnelStateObject,
|
|
47
|
+
params: {
|
|
48
|
+
data: PD.Value(undefined, { isHidden: true })
|
|
49
|
+
},
|
|
50
|
+
})({
|
|
51
|
+
apply({ params }) {
|
|
52
|
+
return new TunnelStateObject({ tunnel: params.data });
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
export const TunnelShapeProvider = Transform({
|
|
56
|
+
name: 'sb-ncbr-tunnel-shape-provider',
|
|
57
|
+
display: { name: 'Tunnel' },
|
|
58
|
+
from: TunnelStateObject,
|
|
59
|
+
to: PluginStateObject.Shape.Provider,
|
|
60
|
+
params: a => { return TunnelShapeParams; },
|
|
61
|
+
})({
|
|
62
|
+
apply({ a, params }) {
|
|
63
|
+
return Task.create('Tunnel Shape Representation', async (ctx) => {
|
|
64
|
+
var _a, _b;
|
|
65
|
+
return new PluginStateObject.Shape.Provider({
|
|
66
|
+
label: 'Surface',
|
|
67
|
+
data: { params, data: a.data },
|
|
68
|
+
params: Mesh.Params,
|
|
69
|
+
geometryUtils: Mesh.Utils,
|
|
70
|
+
getShape: (_, data, __, mesh) => {
|
|
71
|
+
if (data.params.visual.name === 'mesh' && !data.params.showRadii) {
|
|
72
|
+
return createTunnelShape({
|
|
73
|
+
tunnel: data.data.tunnel,
|
|
74
|
+
color: data.params.colorTheme,
|
|
75
|
+
resolution: data.params.visual.params.resolution,
|
|
76
|
+
sampleRate: data.params.samplingRate,
|
|
77
|
+
webgl: data.params.webgl, prev: mesh
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
return createSpheresShape({
|
|
81
|
+
tunnel: data.data.tunnel,
|
|
82
|
+
color: data.params.colorTheme,
|
|
83
|
+
resolution: data.params.visual.params.resolution,
|
|
84
|
+
sampleRate: data.params.samplingRate,
|
|
85
|
+
showRadii: data.params.showRadii, prev: mesh
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}, {
|
|
89
|
+
label: (_a = a.data.tunnel.props.label) !== null && _a !== void 0 ? _a : 'Tunnel',
|
|
90
|
+
description: ((_b = a.data.tunnel.props.description) !== null && _b !== void 0 ? _b : (a.data.tunnel.props.type && a.data.tunnel.props.id))
|
|
91
|
+
? `${a.data.tunnel.props.type} ${a.data.tunnel.props.id}`
|
|
92
|
+
: '',
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
},
|
|
96
|
+
});
|
|
@@ -87,6 +87,14 @@ export declare const Canvas3DParams: {
|
|
|
87
87
|
color: any;
|
|
88
88
|
includeTransparent: any;
|
|
89
89
|
}>, "on">;
|
|
90
|
+
dof: PD.NamedParams<PD.Normalize<unknown>, "off"> | PD.NamedParams<PD.Normalize<{
|
|
91
|
+
blurSize: any;
|
|
92
|
+
blurSpread: any;
|
|
93
|
+
inFocus: any;
|
|
94
|
+
PPM: any;
|
|
95
|
+
center: any;
|
|
96
|
+
mode: any;
|
|
97
|
+
}>, "on">;
|
|
90
98
|
antialiasing: PD.NamedParams<PD.Normalize<unknown>, "off"> | PD.NamedParams<PD.Normalize<{
|
|
91
99
|
edgeThreshold: any;
|
|
92
100
|
maxSearchSteps: any;
|
|
@@ -302,6 +310,14 @@ export declare const DefaultCanvas3DParams: PD.Values<{
|
|
|
302
310
|
color: any;
|
|
303
311
|
includeTransparent: any;
|
|
304
312
|
}>, "on">;
|
|
313
|
+
dof: PD.NamedParams<PD.Normalize<unknown>, "off"> | PD.NamedParams<PD.Normalize<{
|
|
314
|
+
blurSize: any;
|
|
315
|
+
blurSpread: any;
|
|
316
|
+
inFocus: any;
|
|
317
|
+
PPM: any;
|
|
318
|
+
center: any;
|
|
319
|
+
mode: any;
|
|
320
|
+
}>, "on">;
|
|
305
321
|
antialiasing: PD.NamedParams<PD.Normalize<unknown>, "off"> | PD.NamedParams<PD.Normalize<{
|
|
306
322
|
edgeThreshold: any;
|
|
307
323
|
maxSearchSteps: any;
|
|
@@ -519,6 +535,7 @@ interface Canvas3D {
|
|
|
519
535
|
tick(t: now.Timestamp, options?: {
|
|
520
536
|
isSynchronous?: boolean;
|
|
521
537
|
manualDraw?: boolean;
|
|
538
|
+
updateControls?: boolean;
|
|
522
539
|
}): void;
|
|
523
540
|
update(repr?: Representation.Any, keepBoundingSphere?: boolean): void;
|
|
524
541
|
clear(): void;
|
|
@@ -391,6 +391,10 @@ var Canvas3D;
|
|
|
391
391
|
function tick(t, options) {
|
|
392
392
|
currentTime = t;
|
|
393
393
|
commit(options === null || options === void 0 ? void 0 : options.isSynchronous);
|
|
394
|
+
// update the controler before the camera transition
|
|
395
|
+
if (options === null || options === void 0 ? void 0 : options.updateControls) {
|
|
396
|
+
controls.update(currentTime);
|
|
397
|
+
}
|
|
394
398
|
camera.transition.tick(currentTime);
|
|
395
399
|
hiZ.tick();
|
|
396
400
|
if (options === null || options === void 0 ? void 0 : options.manualDraw) {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
|
+
*
|
|
4
|
+
* @author Ludovic Autin <autin@scripps.edu>
|
|
5
|
+
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
6
|
+
*/
|
|
7
|
+
import { WebGLContext } from '../../mol-gl/webgl/context';
|
|
8
|
+
import { Texture } from '../../mol-gl/webgl/texture';
|
|
9
|
+
import { ParamDefinition as PD } from '../../mol-util/param-definition';
|
|
10
|
+
import { Viewport } from '../camera/util';
|
|
11
|
+
import { RenderTarget } from '../../mol-gl/webgl/render-target';
|
|
12
|
+
import { ICamera } from '../../mol-canvas3d/camera';
|
|
13
|
+
import { Sphere3D } from '../../mol-math/geometry';
|
|
14
|
+
import { PostprocessingProps } from './postprocessing';
|
|
15
|
+
export declare const DofParams: {
|
|
16
|
+
blurSize: PD.Numeric;
|
|
17
|
+
blurSpread: PD.Numeric;
|
|
18
|
+
inFocus: PD.Numeric;
|
|
19
|
+
PPM: PD.Numeric;
|
|
20
|
+
center: PD.Select<string>;
|
|
21
|
+
mode: PD.Select<string>;
|
|
22
|
+
};
|
|
23
|
+
export type DofProps = PD.Values<typeof DofParams>;
|
|
24
|
+
export declare class DofPass {
|
|
25
|
+
private webgl;
|
|
26
|
+
static isEnabled(props: PostprocessingProps): boolean;
|
|
27
|
+
readonly target: RenderTarget;
|
|
28
|
+
private readonly renderable;
|
|
29
|
+
constructor(webgl: WebGLContext, width: number, height: number);
|
|
30
|
+
private updateState;
|
|
31
|
+
setSize(width: number, height: number): void;
|
|
32
|
+
update(camera: ICamera, input: Texture, depthOpaque: Texture, depthTransparent: Texture, props: DofProps, sphere: Sphere3D): void;
|
|
33
|
+
render(viewport: Viewport, target: undefined | RenderTarget): void;
|
|
34
|
+
}
|