molstar 3.8.2 → 3.10.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 +202 -202
- package/build/viewer/embedded.html +43 -43
- package/build/viewer/index.html +109 -106
- package/build/viewer/molstar.js +1 -1
- package/lib/apps/docking-viewer/index.html +36 -36
- package/lib/apps/viewer/app.d.ts +5 -2
- package/lib/apps/viewer/app.js +11 -7
- package/lib/apps/viewer/embedded.html +43 -43
- package/lib/apps/viewer/index.html +109 -106
- package/lib/cli/cif2bcif/converter.js +1 -1
- package/lib/commonjs/apps/viewer/app.d.ts +5 -2
- package/lib/commonjs/apps/viewer/app.js +12 -7
- package/lib/commonjs/cli/cif2bcif/converter.js +1 -1
- package/lib/commonjs/examples/alpha-orbitals/index.d.ts +1 -1
- package/lib/commonjs/examples/alpha-orbitals/index.js +4 -1
- package/lib/commonjs/examples/basic-wrapper/custom-theme.js +1 -1
- package/lib/commonjs/examples/proteopedia-wrapper/coloring.js +3 -3
- package/lib/commonjs/extensions/alpha-orbitals/density.d.ts +1 -1
- package/lib/commonjs/extensions/alpha-orbitals/density.js +6 -2
- package/lib/commonjs/extensions/alpha-orbitals/orbitals.d.ts +1 -1
- package/lib/commonjs/extensions/alpha-orbitals/orbitals.js +6 -3
- package/lib/commonjs/extensions/anvil/algorithm.js +1 -1
- package/lib/commonjs/extensions/cellpack/color/generate.js +1 -1
- package/lib/commonjs/extensions/cellpack/color/provided.js +1 -1
- package/lib/commonjs/extensions/cellpack/state.js +1 -1
- package/lib/commonjs/extensions/dnatco/confal-pyramids/color.js +1 -1
- package/lib/commonjs/extensions/g3d/model.js +1 -1
- package/lib/commonjs/extensions/geo-export/ui.js +1 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/color/plddt.js +1 -1
- package/lib/commonjs/extensions/model-archive/quality-assessment/color/qmean.js +1 -1
- package/lib/commonjs/extensions/mp4-export/ui.js +1 -0
- package/lib/commonjs/extensions/pdbe/structure-quality-report/color.js +1 -1
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/color.js +4 -4
- package/lib/commonjs/extensions/rcsb/validation-report/color/density-fit.js +1 -1
- package/lib/commonjs/extensions/rcsb/validation-report/color/geometry-quality.js +2 -2
- package/lib/commonjs/extensions/rcsb/validation-report/color/random-coil-index.js +1 -1
- package/lib/commonjs/extensions/rcsb/validation-report/representation.js +2 -2
- package/lib/commonjs/mol-canvas3d/canvas3d.js +4 -0
- package/lib/commonjs/mol-canvas3d/controls/trackball.js +7 -7
- package/lib/commonjs/mol-canvas3d/helper/camera-helper.js +14 -14
- package/lib/commonjs/mol-canvas3d/helper/interaction-events.js +5 -5
- package/lib/commonjs/mol-canvas3d/passes/draw.js +34 -5
- package/lib/commonjs/mol-canvas3d/passes/fxaa.js +5 -0
- package/lib/commonjs/mol-canvas3d/passes/marking.js +5 -0
- package/lib/commonjs/mol-canvas3d/passes/multi-sample.js +9 -0
- package/lib/commonjs/mol-canvas3d/passes/pick.d.ts +18 -5
- package/lib/commonjs/mol-canvas3d/passes/pick.js +125 -24
- package/lib/commonjs/mol-canvas3d/passes/postprocessing.js +5 -0
- package/lib/commonjs/mol-canvas3d/passes/smaa.js +4 -0
- package/lib/commonjs/mol-canvas3d/passes/wboit.js +4 -0
- package/lib/commonjs/mol-data/db/column.js +5 -5
- package/lib/commonjs/mol-data/db/table.js +2 -2
- package/lib/commonjs/mol-data/util/array.d.ts +1 -1
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +1 -1
- package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +0 -1
- package/lib/commonjs/mol-geo/geometry/points/points.d.ts +1 -1
- package/lib/commonjs/mol-geo/geometry/texture-mesh/color-smoothing.js +13 -0
- package/lib/commonjs/mol-gl/compute/grid3d.d.ts +2 -2
- package/lib/commonjs/mol-gl/compute/grid3d.js +30 -8
- package/lib/commonjs/mol-gl/compute/histogram-pyramid/reduction.d.ts +1 -1
- package/lib/commonjs/mol-gl/compute/histogram-pyramid/reduction.js +6 -1
- package/lib/commonjs/mol-gl/compute/histogram-pyramid/sum.d.ts +1 -1
- package/lib/commonjs/mol-gl/compute/histogram-pyramid/sum.js +6 -1
- package/lib/commonjs/mol-gl/compute/marching-cubes/active-voxels.d.ts +1 -1
- package/lib/commonjs/mol-gl/compute/marching-cubes/active-voxels.js +6 -1
- package/lib/commonjs/mol-gl/compute/marching-cubes/isosurface.d.ts +1 -1
- package/lib/commonjs/mol-gl/compute/marching-cubes/isosurface.js +10 -10
- package/lib/commonjs/mol-gl/renderer.js +77 -32
- package/lib/commonjs/mol-gl/scene.js +2 -0
- 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/cylinders.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/cylinders.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/direct-volume.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/direct-volume.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/image.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/image.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/lines.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/lines.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/points.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/points.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/spheres.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/spheres.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/text.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/text.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader-code.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader-code.js +41 -9
- package/lib/commonjs/mol-gl/webgl/compat.d.ts +34 -1
- package/lib/commonjs/mol-gl/webgl/compat.js +50 -2
- package/lib/commonjs/mol-gl/webgl/context.d.ts +2 -0
- package/lib/commonjs/mol-gl/webgl/context.js +3 -0
- package/lib/commonjs/mol-gl/webgl/extensions.d.ts +3 -2
- package/lib/commonjs/mol-gl/webgl/extensions.js +6 -1
- package/lib/commonjs/mol-gl/webgl/timer.d.ts +22 -0
- package/lib/commonjs/mol-gl/webgl/timer.js +169 -0
- package/lib/commonjs/mol-io/common/binary-cif/array-encoder.js +18 -18
- package/lib/commonjs/mol-io/common/binary-cif/decoder.js +16 -16
- package/lib/commonjs/mol-io/common/binary-cif/encoding.js +9 -9
- package/lib/commonjs/mol-io/reader/cif/binary/field.js +3 -3
- package/lib/commonjs/mol-io/reader/cif/data-model.js +14 -14
- package/lib/commonjs/mol-io/reader/cif/schema.js +1 -1
- package/lib/commonjs/mol-io/reader/cif/text/parser.js +23 -23
- package/lib/commonjs/mol-io/reader/common/text/column/fixed.js +1 -1
- package/lib/commonjs/mol-io/reader/common/text/column/token.js +1 -1
- package/lib/commonjs/mol-io/reader/common/text/number-parser.js +6 -6
- package/lib/commonjs/mol-io/reader/csv/parser.js +8 -8
- package/lib/commonjs/mol-io/writer/cif/encoder/binary.js +10 -10
- package/lib/commonjs/mol-io/writer/cif/encoder/text.js +7 -7
- package/lib/commonjs/mol-io/writer/cif/encoder.js +8 -8
- package/lib/commonjs/mol-io/writer/mol2/encoder.js +4 -4
- package/lib/commonjs/mol-math/geometry/gaussian-density/gpu.js +13 -2
- package/lib/commonjs/mol-model/sequence/alignment/sequence.js +3 -3
- package/lib/commonjs/mol-model/sequence/sequence.js +9 -9
- package/lib/commonjs/mol-model/structure/export/categories/atom_site_operator_mapping.js +3 -3
- package/lib/commonjs/mol-model/structure/export/categories/secondary-structure.js +2 -2
- package/lib/commonjs/mol-model/structure/export/categories/utils.js +1 -1
- package/lib/commonjs/mol-model/structure/model/model.js +2 -2
- package/lib/commonjs/mol-model/structure/model/properties/custom/indexed.js +6 -6
- package/lib/commonjs/mol-model/structure/model/properties/utils/atomic-ranges.js +1 -1
- package/lib/commonjs/mol-model/structure/model/types.js +116 -116
- package/lib/commonjs/mol-model/structure/query/context.js +1 -1
- package/lib/commonjs/mol-model/structure/query/queries/generators.js +5 -5
- package/lib/commonjs/mol-model/structure/query/queries/internal.js +4 -4
- package/lib/commonjs/mol-model/structure/query/queries/modifiers.js +4 -4
- package/lib/commonjs/mol-model/structure/query/utils/structure-distance.d.ts +5 -54
- package/lib/commonjs/mol-model/structure/query/utils/structure-distance.js +9 -9
- package/lib/commonjs/mol-model/structure/structure/carbohydrates/constants.d.ts +3 -1
- package/lib/commonjs/mol-model/structure/structure/carbohydrates/constants.js +192 -108
- package/lib/commonjs/mol-model/structure/structure/element/loci.js +5 -5
- package/lib/commonjs/mol-model/structure/structure/element/stats.js +5 -5
- package/lib/commonjs/mol-model/structure/structure/properties.js +5 -5
- package/lib/commonjs/mol-model/structure/structure/structure.js +11 -11
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/inter-compute.js +5 -5
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/intra-compute.js +4 -4
- package/lib/commonjs/mol-model/structure/structure/unit/bonds.js +2 -2
- package/lib/commonjs/mol-model/structure/structure/unit/resonance.js +1 -1
- package/lib/commonjs/mol-model/structure/structure/unit/rings/compute.js +6 -6
- package/lib/commonjs/mol-model/structure/structure/unit/rings.js +6 -6
- package/lib/commonjs/mol-model/structure/structure/unit.js +16 -16
- package/lib/commonjs/mol-model/structure/structure/util/superposition-sifts-mapping.js +1 -1
- package/lib/commonjs/mol-model/structure/util.js +4 -4
- package/lib/commonjs/mol-model-formats/structure/basic/atomic.js +2 -2
- package/lib/commonjs/mol-model-formats/structure/basic/parser.js +4 -4
- package/lib/commonjs/mol-model-formats/structure/basic/properties.js +1 -1
- package/lib/commonjs/mol-model-formats/structure/basic/sort.js +1 -1
- package/lib/commonjs/mol-model-formats/structure/basic/util.js +1 -1
- package/lib/commonjs/mol-model-formats/structure/cif-core.js +6 -6
- package/lib/commonjs/mol-model-formats/structure/common/entity.js +1 -1
- package/lib/commonjs/mol-model-formats/structure/cube.js +1 -1
- package/lib/commonjs/mol-model-formats/structure/gro.js +1 -1
- package/lib/commonjs/mol-model-formats/structure/mol.js +1 -1
- package/lib/commonjs/mol-model-formats/structure/mol2.js +4 -4
- package/lib/commonjs/mol-model-formats/structure/prmtop.js +1 -1
- package/lib/commonjs/mol-model-formats/structure/property/bonds/chem_comp.js +3 -3
- package/lib/commonjs/mol-model-formats/structure/property/bonds/index-pair.js +1 -1
- package/lib/commonjs/mol-model-formats/structure/property/bonds/struct_conn.js +6 -6
- package/lib/commonjs/mol-model-formats/structure/property/secondary-structure.js +8 -8
- package/lib/commonjs/mol-model-formats/structure/psf.js +1 -1
- package/lib/commonjs/mol-model-formats/structure/top.js +1 -1
- package/lib/commonjs/mol-model-formats/structure/xyz.js +1 -1
- package/lib/commonjs/mol-model-props/computed/accessible-surface-area/shrake-rupley/radii.js +2 -2
- package/lib/commonjs/mol-model-props/computed/accessible-surface-area/shrake-rupley.js +3 -3
- package/lib/commonjs/mol-model-props/computed/accessible-surface-area.js +2 -2
- package/lib/commonjs/mol-model-props/computed/chemistry/functional-group.js +31 -31
- package/lib/commonjs/mol-model-props/computed/chemistry/geometry.js +22 -22
- package/lib/commonjs/mol-model-props/computed/chemistry/valence-model.js +32 -32
- package/lib/commonjs/mol-model-props/computed/interactions/charged.js +39 -39
- package/lib/commonjs/mol-model-props/computed/interactions/common.js +34 -34
- package/lib/commonjs/mol-model-props/computed/interactions/contacts-builder.js +1 -1
- package/lib/commonjs/mol-model-props/computed/interactions/contacts.js +1 -1
- package/lib/commonjs/mol-model-props/computed/interactions/halogen-bonds.js +12 -12
- package/lib/commonjs/mol-model-props/computed/interactions/hydrogen-bonds.js +32 -32
- package/lib/commonjs/mol-model-props/computed/interactions/hydrophobic.js +9 -9
- package/lib/commonjs/mol-model-props/computed/interactions/metal.js +26 -26
- package/lib/commonjs/mol-model-props/computed/interactions/refine.js +20 -20
- package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.js +2 -2
- package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.js +2 -2
- package/lib/commonjs/mol-model-props/computed/secondary-structure/dssp/bends.js +1 -1
- package/lib/commonjs/mol-model-props/computed/secondary-structure/dssp/bridges.js +12 -12
- package/lib/commonjs/mol-model-props/computed/secondary-structure/dssp/helices.js +6 -6
- package/lib/commonjs/mol-model-props/computed/secondary-structure/dssp/ladders.js +3 -3
- package/lib/commonjs/mol-model-props/computed/secondary-structure/dssp/sheets.js +11 -11
- package/lib/commonjs/mol-model-props/computed/secondary-structure/dssp/turns.js +3 -3
- package/lib/commonjs/mol-model-props/computed/secondary-structure/dssp.js +30 -30
- package/lib/commonjs/mol-model-props/computed/themes/accessible-surface-area.js +1 -1
- package/lib/commonjs/mol-model-props/computed/themes/interaction-type.js +10 -10
- package/lib/commonjs/mol-model-props/integrative/cross-link-restraint/color.js +1 -1
- package/lib/commonjs/mol-model-props/integrative/cross-link-restraint/format.js +3 -3
- package/lib/commonjs/mol-model-props/sequence/sifts-mapping.js +1 -1
- package/lib/commonjs/mol-model-props/sequence/themes/sifts-mapping.js +1 -1
- package/lib/commonjs/mol-plugin/animation-loop.d.ts +2 -1
- package/lib/commonjs/mol-plugin/animation-loop.js +18 -5
- package/lib/commonjs/mol-plugin/behavior/dynamic/camera.js +12 -12
- package/lib/commonjs/mol-plugin/behavior/dynamic/representation.js +7 -7
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -3
- package/lib/commonjs/mol-plugin/config.d.ts +3 -0
- package/lib/commonjs/mol-plugin/config.js +3 -1
- package/lib/commonjs/mol-plugin/context.d.ts +2 -2
- package/lib/commonjs/mol-plugin/context.js +3 -0
- package/lib/commonjs/mol-plugin/state.d.ts +1 -14
- package/lib/commonjs/mol-plugin-state/formats/volume.d.ts +12 -11
- package/lib/commonjs/mol-plugin-state/formats/volume.js +20 -13
- package/lib/commonjs/mol-plugin-state/helpers/structure-selection-query.js +5 -5
- package/lib/commonjs/mol-plugin-state/transforms/representation.js +2 -2
- package/lib/commonjs/mol-plugin-ui/controls/parameters.d.ts +1 -1
- package/lib/commonjs/mol-plugin-ui/controls.js +1 -1
- package/lib/commonjs/mol-plugin-ui/sequence/polymer.js +1 -1
- package/lib/commonjs/mol-plugin-ui/sequence/sequence.js +1 -1
- package/lib/commonjs/mol-plugin-ui/state/snapshots.js +1 -0
- package/lib/commonjs/mol-plugin-ui/structure/focus.js +1 -1
- package/lib/commonjs/mol-plugin-ui/viewport/screenshot.js +1 -0
- package/lib/commonjs/mol-plugin-ui/viewport.d.ts +2 -2
- package/lib/commonjs/mol-repr/shape/representation.d.ts +1 -1
- package/lib/commonjs/mol-repr/shape/representation.js +2 -1
- package/lib/commonjs/mol-repr/structure/complex-visual.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/complex-visual.js +2 -1
- package/lib/commonjs/mol-repr/structure/units-visual.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/units-visual.js +2 -1
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.js +10 -10
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-line.js +10 -10
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.js +12 -15
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-line.js +12 -15
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.js +16 -16
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.js +9 -0
- package/lib/commonjs/mol-repr/structure/visual/orientation-ellipsoid-mesh.js +4 -4
- package/lib/commonjs/mol-repr/structure/visual/polymer-direction-wedge.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-trace-mesh.js +2 -2
- package/lib/commonjs/mol-repr/structure/visual/util/bond.js +2 -2
- package/lib/commonjs/mol-repr/structure/visual/util/common.js +3 -3
- package/lib/commonjs/mol-repr/structure/visual/util/link.js +30 -30
- package/lib/commonjs/mol-repr/structure/visual/util/polymer/backbone.js +6 -6
- package/lib/commonjs/mol-repr/structure/visual/util/polymer/gap-iterator.js +3 -3
- package/lib/commonjs/mol-repr/structure/visual/util/polymer/trace-iterator.js +20 -20
- package/lib/commonjs/mol-repr/structure/visual/util/polymer.js +6 -6
- package/lib/commonjs/mol-repr/volume/representation.d.ts +1 -1
- package/lib/commonjs/mol-repr/volume/representation.js +2 -1
- package/lib/commonjs/mol-script/language/builder.d.ts +1 -0
- package/lib/commonjs/mol-script/language/symbol-table/core.d.ts +2 -2
- package/lib/commonjs/mol-script/runtime/query/table.js +13 -13
- package/lib/commonjs/mol-state/object.d.ts +3 -3
- package/lib/commonjs/mol-task/util/user-timing.js +1 -1
- package/lib/commonjs/mol-theme/clipping.js +19 -19
- package/lib/commonjs/mol-theme/color/atom-id.js +1 -1
- package/lib/commonjs/mol-theme/color/carbohydrate-symbol.js +1 -1
- package/lib/commonjs/mol-theme/color/chain-id.js +4 -4
- package/lib/commonjs/mol-theme/color/element-index.js +1 -1
- package/lib/commonjs/mol-theme/color/element-symbol.js +1 -1
- package/lib/commonjs/mol-theme/color/entity-id.js +4 -4
- package/lib/commonjs/mol-theme/color/entity-source.js +5 -4
- package/lib/commonjs/mol-theme/color/hydrophobicity.js +1 -1
- package/lib/commonjs/mol-theme/color/illustrative.js +1 -1
- package/lib/commonjs/mol-theme/color/model-index.js +1 -1
- package/lib/commonjs/mol-theme/color/molecule-type.js +8 -8
- package/lib/commonjs/mol-theme/color/occupancy.js +1 -1
- package/lib/commonjs/mol-theme/color/operator-hkl.js +1 -1
- package/lib/commonjs/mol-theme/color/operator-name.js +1 -1
- package/lib/commonjs/mol-theme/color/partial-charge.js +1 -1
- package/lib/commonjs/mol-theme/color/polymer-id.js +4 -4
- package/lib/commonjs/mol-theme/color/polymer-index.js +1 -1
- package/lib/commonjs/mol-theme/color/residue-name.js +1 -1
- package/lib/commonjs/mol-theme/color/secondary-structure.js +12 -12
- package/lib/commonjs/mol-theme/color/sequence-id.js +7 -7
- package/lib/commonjs/mol-theme/color/shape-group.js +1 -1
- package/lib/commonjs/mol-theme/color/uncertainty.js +1 -1
- package/lib/commonjs/mol-theme/color/uniform.js +1 -1
- package/lib/commonjs/mol-theme/color/unit-index.js +1 -1
- package/lib/commonjs/mol-theme/color/volume-value.js +1 -1
- package/lib/commonjs/mol-theme/label.js +3 -3
- package/lib/commonjs/mol-util/binding.js +4 -4
- package/lib/commonjs/mol-util/debug.d.ts +6 -1
- package/lib/commonjs/mol-util/debug.js +11 -1
- package/lib/commonjs/mol-util/input/input-observer.js +20 -20
- package/lib/commonjs/mol-util/string-builder.js +1 -1
- package/lib/commonjs/servers/model/preprocess/converter.js +1 -1
- package/lib/commonjs/servers/model/server/query.js +1 -1
- package/lib/commonjs/servers/model/utils/fetch-retry.js +3 -2
- package/lib/commonjs/servers/volume/server/algebra/coordinate.js +6 -6
- package/lib/commonjs/servers/volume/server/query/encode.js +1 -1
- package/lib/examples/alpha-orbitals/index.d.ts +1 -1
- package/lib/examples/alpha-orbitals/index.html +72 -61
- package/lib/examples/alpha-orbitals/index.js +4 -1
- package/lib/examples/basic-wrapper/custom-theme.js +1 -1
- package/lib/examples/basic-wrapper/index.html +137 -137
- package/lib/examples/lighting/index.html +88 -88
- package/lib/examples/proteopedia-wrapper/coloring.js +3 -3
- package/lib/examples/proteopedia-wrapper/index.html +236 -236
- package/lib/extensions/alpha-orbitals/density.d.ts +1 -1
- package/lib/extensions/alpha-orbitals/density.js +6 -2
- package/lib/extensions/alpha-orbitals/orbitals.d.ts +1 -1
- package/lib/extensions/alpha-orbitals/orbitals.js +6 -3
- package/lib/extensions/anvil/algorithm.js +1 -1
- package/lib/extensions/cellpack/color/generate.js +1 -1
- package/lib/extensions/cellpack/color/provided.js +1 -1
- package/lib/extensions/cellpack/state.js +1 -1
- package/lib/extensions/dnatco/confal-pyramids/color.js +1 -1
- package/lib/extensions/g3d/model.js +1 -1
- package/lib/extensions/geo-export/ui.js +1 -0
- package/lib/extensions/model-archive/quality-assessment/color/plddt.js +1 -1
- package/lib/extensions/model-archive/quality-assessment/color/qmean.js +1 -1
- package/lib/extensions/mp4-export/ui.js +1 -0
- package/lib/extensions/pdbe/structure-quality-report/color.js +1 -1
- package/lib/extensions/rcsb/assembly-symmetry/color.js +4 -4
- package/lib/extensions/rcsb/validation-report/color/density-fit.js +1 -1
- package/lib/extensions/rcsb/validation-report/color/geometry-quality.js +2 -2
- package/lib/extensions/rcsb/validation-report/color/random-coil-index.js +1 -1
- package/lib/extensions/rcsb/validation-report/representation.js +2 -2
- package/lib/mol-canvas3d/canvas3d.js +5 -1
- package/lib/mol-canvas3d/controls/trackball.js +7 -7
- package/lib/mol-canvas3d/helper/camera-helper.js +14 -14
- package/lib/mol-canvas3d/helper/interaction-events.js +5 -5
- package/lib/mol-canvas3d/passes/draw.js +34 -5
- package/lib/mol-canvas3d/passes/fxaa.js +5 -0
- package/lib/mol-canvas3d/passes/marking.js +5 -0
- package/lib/mol-canvas3d/passes/multi-sample.js +9 -0
- package/lib/mol-canvas3d/passes/pick.d.ts +18 -5
- package/lib/mol-canvas3d/passes/pick.js +125 -24
- package/lib/mol-canvas3d/passes/postprocessing.js +5 -0
- package/lib/mol-canvas3d/passes/smaa.js +5 -1
- package/lib/mol-canvas3d/passes/wboit.js +5 -1
- package/lib/mol-data/db/column.js +5 -5
- package/lib/mol-data/db/table.js +2 -2
- package/lib/mol-data/util/array.d.ts +1 -1
- package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +1 -1
- package/lib/mol-geo/geometry/lines/lines.d.ts +0 -1
- package/lib/mol-geo/geometry/points/points.d.ts +1 -1
- package/lib/mol-geo/geometry/texture-mesh/color-smoothing.js +13 -0
- package/lib/mol-gl/compute/grid3d.d.ts +2 -2
- package/lib/mol-gl/compute/grid3d.js +30 -8
- package/lib/mol-gl/compute/histogram-pyramid/reduction.d.ts +1 -1
- package/lib/mol-gl/compute/histogram-pyramid/reduction.js +6 -1
- package/lib/mol-gl/compute/histogram-pyramid/sum.d.ts +1 -1
- package/lib/mol-gl/compute/histogram-pyramid/sum.js +6 -1
- package/lib/mol-gl/compute/marching-cubes/active-voxels.d.ts +1 -1
- package/lib/mol-gl/compute/marching-cubes/active-voxels.js +6 -1
- package/lib/mol-gl/compute/marching-cubes/isosurface.d.ts +1 -1
- package/lib/mol-gl/compute/marching-cubes/isosurface.js +10 -10
- package/lib/mol-gl/renderer.js +77 -32
- package/lib/mol-gl/scene.js +2 -0
- 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/cylinders.frag.d.ts +1 -1
- package/lib/mol-gl/shader/cylinders.frag.js +1 -1
- package/lib/mol-gl/shader/direct-volume.frag.d.ts +1 -1
- package/lib/mol-gl/shader/direct-volume.frag.js +1 -1
- package/lib/mol-gl/shader/image.frag.d.ts +1 -1
- package/lib/mol-gl/shader/image.frag.js +1 -1
- package/lib/mol-gl/shader/lines.frag.d.ts +1 -1
- package/lib/mol-gl/shader/lines.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/points.frag.d.ts +1 -1
- package/lib/mol-gl/shader/points.frag.js +1 -1
- package/lib/mol-gl/shader/spheres.frag.d.ts +1 -1
- package/lib/mol-gl/shader/spheres.frag.js +1 -1
- package/lib/mol-gl/shader/text.frag.d.ts +1 -1
- package/lib/mol-gl/shader/text.frag.js +1 -1
- package/lib/mol-gl/shader-code.d.ts +1 -1
- package/lib/mol-gl/shader-code.js +41 -9
- package/lib/mol-gl/webgl/compat.d.ts +34 -1
- package/lib/mol-gl/webgl/compat.js +48 -1
- package/lib/mol-gl/webgl/context.d.ts +2 -0
- package/lib/mol-gl/webgl/context.js +3 -0
- package/lib/mol-gl/webgl/extensions.d.ts +3 -2
- package/lib/mol-gl/webgl/extensions.js +7 -2
- package/lib/mol-gl/webgl/timer.d.ts +22 -0
- package/lib/mol-gl/webgl/timer.js +164 -0
- package/lib/mol-io/common/binary-cif/array-encoder.js +18 -18
- package/lib/mol-io/common/binary-cif/decoder.js +16 -16
- package/lib/mol-io/common/binary-cif/encoding.js +9 -9
- package/lib/mol-io/reader/cif/binary/field.js +3 -3
- package/lib/mol-io/reader/cif/data-model.js +14 -14
- package/lib/mol-io/reader/cif/schema.js +1 -1
- package/lib/mol-io/reader/cif/text/parser.js +23 -23
- package/lib/mol-io/reader/common/text/column/fixed.js +1 -1
- package/lib/mol-io/reader/common/text/column/token.js +1 -1
- package/lib/mol-io/reader/common/text/number-parser.js +6 -6
- package/lib/mol-io/reader/csv/parser.js +8 -8
- package/lib/mol-io/writer/cif/encoder/binary.js +10 -10
- package/lib/mol-io/writer/cif/encoder/text.js +7 -7
- package/lib/mol-io/writer/cif/encoder.js +8 -8
- package/lib/mol-io/writer/mol2/encoder.js +4 -4
- package/lib/mol-math/geometry/gaussian-density/gpu.js +13 -2
- package/lib/mol-model/sequence/alignment/sequence.js +3 -3
- package/lib/mol-model/sequence/sequence.js +9 -9
- package/lib/mol-model/structure/export/categories/atom_site_operator_mapping.js +3 -3
- package/lib/mol-model/structure/export/categories/secondary-structure.js +2 -2
- package/lib/mol-model/structure/export/categories/utils.js +1 -1
- package/lib/mol-model/structure/model/model.js +2 -2
- package/lib/mol-model/structure/model/properties/custom/indexed.js +6 -6
- package/lib/mol-model/structure/model/properties/utils/atomic-ranges.js +1 -1
- package/lib/mol-model/structure/model/types.js +116 -116
- package/lib/mol-model/structure/query/context.js +1 -1
- package/lib/mol-model/structure/query/queries/generators.js +5 -5
- package/lib/mol-model/structure/query/queries/internal.js +4 -4
- package/lib/mol-model/structure/query/queries/modifiers.js +4 -4
- package/lib/mol-model/structure/query/utils/structure-distance.d.ts +5 -54
- package/lib/mol-model/structure/query/utils/structure-distance.js +9 -9
- package/lib/mol-model/structure/structure/carbohydrates/constants.d.ts +3 -1
- package/lib/mol-model/structure/structure/carbohydrates/constants.js +190 -107
- package/lib/mol-model/structure/structure/element/loci.js +5 -5
- package/lib/mol-model/structure/structure/element/stats.js +5 -5
- package/lib/mol-model/structure/structure/properties.js +5 -5
- package/lib/mol-model/structure/structure/structure.js +11 -11
- package/lib/mol-model/structure/structure/unit/bonds/inter-compute.js +5 -5
- package/lib/mol-model/structure/structure/unit/bonds/intra-compute.js +4 -4
- package/lib/mol-model/structure/structure/unit/bonds.js +2 -2
- package/lib/mol-model/structure/structure/unit/resonance.js +1 -1
- package/lib/mol-model/structure/structure/unit/rings/compute.js +6 -6
- package/lib/mol-model/structure/structure/unit/rings.js +6 -6
- package/lib/mol-model/structure/structure/unit.js +16 -16
- package/lib/mol-model/structure/structure/util/superposition-sifts-mapping.js +1 -1
- package/lib/mol-model/structure/util.js +4 -4
- package/lib/mol-model-formats/structure/basic/atomic.js +2 -2
- package/lib/mol-model-formats/structure/basic/parser.js +4 -4
- package/lib/mol-model-formats/structure/basic/properties.js +1 -1
- package/lib/mol-model-formats/structure/basic/sort.js +1 -1
- package/lib/mol-model-formats/structure/basic/util.js +1 -1
- package/lib/mol-model-formats/structure/cif-core.js +6 -6
- package/lib/mol-model-formats/structure/common/entity.js +1 -1
- package/lib/mol-model-formats/structure/cube.js +1 -1
- package/lib/mol-model-formats/structure/gro.js +1 -1
- package/lib/mol-model-formats/structure/mol.js +1 -1
- package/lib/mol-model-formats/structure/mol2.js +4 -4
- package/lib/mol-model-formats/structure/prmtop.js +1 -1
- package/lib/mol-model-formats/structure/property/bonds/chem_comp.js +3 -3
- package/lib/mol-model-formats/structure/property/bonds/index-pair.js +1 -1
- package/lib/mol-model-formats/structure/property/bonds/struct_conn.js +6 -6
- package/lib/mol-model-formats/structure/property/secondary-structure.js +8 -8
- package/lib/mol-model-formats/structure/psf.js +1 -1
- package/lib/mol-model-formats/structure/top.js +1 -1
- package/lib/mol-model-formats/structure/xyz.js +1 -1
- package/lib/mol-model-props/computed/accessible-surface-area/shrake-rupley/radii.js +2 -2
- package/lib/mol-model-props/computed/accessible-surface-area/shrake-rupley.js +3 -3
- package/lib/mol-model-props/computed/accessible-surface-area.js +2 -2
- package/lib/mol-model-props/computed/chemistry/functional-group.js +31 -31
- package/lib/mol-model-props/computed/chemistry/geometry.js +22 -22
- package/lib/mol-model-props/computed/chemistry/valence-model.js +32 -32
- package/lib/mol-model-props/computed/interactions/charged.js +39 -39
- package/lib/mol-model-props/computed/interactions/common.js +34 -34
- package/lib/mol-model-props/computed/interactions/contacts-builder.js +1 -1
- package/lib/mol-model-props/computed/interactions/contacts.js +1 -1
- package/lib/mol-model-props/computed/interactions/halogen-bonds.js +12 -12
- package/lib/mol-model-props/computed/interactions/hydrogen-bonds.js +32 -32
- package/lib/mol-model-props/computed/interactions/hydrophobic.js +9 -9
- package/lib/mol-model-props/computed/interactions/metal.js +26 -26
- package/lib/mol-model-props/computed/interactions/refine.js +20 -20
- package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.js +2 -2
- package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.js +2 -2
- package/lib/mol-model-props/computed/secondary-structure/dssp/bends.js +1 -1
- package/lib/mol-model-props/computed/secondary-structure/dssp/bridges.js +12 -12
- package/lib/mol-model-props/computed/secondary-structure/dssp/helices.js +6 -6
- package/lib/mol-model-props/computed/secondary-structure/dssp/ladders.js +3 -3
- package/lib/mol-model-props/computed/secondary-structure/dssp/sheets.js +11 -11
- package/lib/mol-model-props/computed/secondary-structure/dssp/turns.js +3 -3
- package/lib/mol-model-props/computed/secondary-structure/dssp.js +30 -30
- package/lib/mol-model-props/computed/themes/accessible-surface-area.js +1 -1
- package/lib/mol-model-props/computed/themes/interaction-type.js +10 -10
- package/lib/mol-model-props/integrative/cross-link-restraint/color.js +1 -1
- package/lib/mol-model-props/integrative/cross-link-restraint/format.js +3 -3
- package/lib/mol-model-props/sequence/sifts-mapping.js +1 -1
- package/lib/mol-model-props/sequence/themes/sifts-mapping.js +1 -1
- package/lib/mol-plugin/animation-loop.d.ts +2 -1
- package/lib/mol-plugin/animation-loop.js +18 -5
- package/lib/mol-plugin/behavior/dynamic/camera.js +12 -12
- package/lib/mol-plugin/behavior/dynamic/representation.js +7 -7
- package/lib/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -3
- package/lib/mol-plugin/config.d.ts +3 -0
- package/lib/mol-plugin/config.js +3 -1
- package/lib/mol-plugin/context.d.ts +2 -2
- package/lib/mol-plugin/context.js +3 -0
- package/lib/mol-plugin/state.d.ts +1 -14
- package/lib/mol-plugin/version.js +2 -2
- package/lib/mol-plugin-state/formats/volume.d.ts +12 -11
- package/lib/mol-plugin-state/formats/volume.js +20 -13
- package/lib/mol-plugin-state/helpers/structure-selection-query.js +5 -5
- package/lib/mol-plugin-state/transforms/representation.js +2 -2
- package/lib/mol-plugin-ui/controls/parameters.d.ts +1 -1
- package/lib/mol-plugin-ui/controls.js +1 -1
- package/lib/mol-plugin-ui/sequence/polymer.js +1 -1
- package/lib/mol-plugin-ui/sequence/sequence.js +1 -1
- 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 -643
- 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 +128 -128
- 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-plugin-ui/state/snapshots.js +1 -0
- package/lib/mol-plugin-ui/structure/focus.js +1 -1
- package/lib/mol-plugin-ui/viewport/screenshot.js +1 -0
- package/lib/mol-plugin-ui/viewport.d.ts +2 -2
- package/lib/mol-repr/shape/representation.d.ts +1 -1
- package/lib/mol-repr/shape/representation.js +2 -1
- package/lib/mol-repr/structure/complex-visual.d.ts +1 -1
- package/lib/mol-repr/structure/complex-visual.js +2 -1
- package/lib/mol-repr/structure/units-visual.d.ts +1 -1
- package/lib/mol-repr/structure/units-visual.js +2 -1
- package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.js +10 -10
- package/lib/mol-repr/structure/visual/bond-inter-unit-line.js +10 -10
- package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.js +12 -15
- package/lib/mol-repr/structure/visual/bond-intra-unit-line.js +12 -15
- package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.js +16 -16
- package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.js +1 -1
- package/lib/mol-repr/structure/visual/gaussian-surface-mesh.js +9 -0
- package/lib/mol-repr/structure/visual/orientation-ellipsoid-mesh.js +4 -4
- package/lib/mol-repr/structure/visual/polymer-direction-wedge.js +1 -1
- package/lib/mol-repr/structure/visual/polymer-trace-mesh.js +2 -2
- package/lib/mol-repr/structure/visual/util/bond.js +2 -2
- package/lib/mol-repr/structure/visual/util/common.js +3 -3
- package/lib/mol-repr/structure/visual/util/link.js +30 -30
- package/lib/mol-repr/structure/visual/util/polymer/backbone.js +6 -6
- package/lib/mol-repr/structure/visual/util/polymer/gap-iterator.js +3 -3
- package/lib/mol-repr/structure/visual/util/polymer/trace-iterator.js +20 -20
- package/lib/mol-repr/structure/visual/util/polymer.js +6 -6
- package/lib/mol-repr/volume/representation.d.ts +1 -1
- package/lib/mol-repr/volume/representation.js +2 -1
- package/lib/mol-script/language/builder.d.ts +1 -0
- package/lib/mol-script/language/symbol-table/core.d.ts +2 -2
- package/lib/mol-script/runtime/query/table.js +13 -13
- package/lib/mol-state/object.d.ts +3 -3
- package/lib/mol-task/util/user-timing.js +1 -1
- package/lib/mol-theme/clipping.js +19 -19
- package/lib/mol-theme/color/atom-id.js +1 -1
- package/lib/mol-theme/color/carbohydrate-symbol.js +1 -1
- package/lib/mol-theme/color/chain-id.js +4 -4
- package/lib/mol-theme/color/element-index.js +1 -1
- package/lib/mol-theme/color/element-symbol.js +1 -1
- package/lib/mol-theme/color/entity-id.js +4 -4
- package/lib/mol-theme/color/entity-source.js +5 -4
- package/lib/mol-theme/color/hydrophobicity.js +1 -1
- package/lib/mol-theme/color/illustrative.js +1 -1
- package/lib/mol-theme/color/model-index.js +1 -1
- package/lib/mol-theme/color/molecule-type.js +8 -8
- package/lib/mol-theme/color/occupancy.js +1 -1
- package/lib/mol-theme/color/operator-hkl.js +1 -1
- package/lib/mol-theme/color/operator-name.js +1 -1
- package/lib/mol-theme/color/partial-charge.js +1 -1
- package/lib/mol-theme/color/polymer-id.js +4 -4
- package/lib/mol-theme/color/polymer-index.js +1 -1
- package/lib/mol-theme/color/residue-name.js +1 -1
- package/lib/mol-theme/color/secondary-structure.js +12 -12
- package/lib/mol-theme/color/sequence-id.js +7 -7
- package/lib/mol-theme/color/shape-group.js +1 -1
- package/lib/mol-theme/color/uncertainty.js +1 -1
- package/lib/mol-theme/color/uniform.js +1 -1
- package/lib/mol-theme/color/unit-index.js +1 -1
- package/lib/mol-theme/color/volume-value.js +1 -1
- package/lib/mol-theme/label.js +3 -3
- package/lib/mol-util/binding.js +4 -4
- package/lib/mol-util/debug.d.ts +6 -1
- package/lib/mol-util/debug.js +9 -1
- package/lib/mol-util/input/input-observer.js +20 -20
- package/lib/mol-util/string-builder.js +1 -1
- package/lib/servers/model/preprocess/converter.js +1 -1
- package/lib/servers/model/server/query.js +1 -1
- package/lib/servers/model/utils/fetch-retry.js +3 -2
- package/lib/servers/volume/server/algebra/coordinate.js +6 -6
- package/lib/servers/volume/server/query/encode.js +1 -1
- package/package.json +162 -162
|
@@ -31,9 +31,9 @@ export function OrientationEllipsoidMeshVisual(materialId) {
|
|
|
31
31
|
}, materialId);
|
|
32
32
|
}
|
|
33
33
|
function isUnitApplicable(unit) {
|
|
34
|
-
if (Unit.Traits.is(unit.traits, 1 /* MultiChain */))
|
|
34
|
+
if (Unit.Traits.is(unit.traits, 1 /* Unit.Trait.MultiChain */))
|
|
35
35
|
return false;
|
|
36
|
-
if (Unit.Traits.is(unit.traits, 2 /* Partitioned */))
|
|
36
|
+
if (Unit.Traits.is(unit.traits, 2 /* Unit.Trait.Partitioned */))
|
|
37
37
|
return false;
|
|
38
38
|
if (Unit.isCoarse(unit))
|
|
39
39
|
return true;
|
|
@@ -42,9 +42,9 @@ function isUnitApplicable(unit) {
|
|
|
42
42
|
unit.model.atomicHierarchy.derived.residue.moleculeType;
|
|
43
43
|
var rI = unit.residueIndex[unit.elements[0]];
|
|
44
44
|
var mt = unit.model.atomicHierarchy.derived.residue.moleculeType[rI];
|
|
45
|
-
if (mt === 3 /* Ion */)
|
|
45
|
+
if (mt === 3 /* MoleculeType.Ion */)
|
|
46
46
|
return false;
|
|
47
|
-
if (mt === 2 /* Water */)
|
|
47
|
+
if (mt === 2 /* MoleculeType.Water */)
|
|
48
48
|
return false;
|
|
49
49
|
return true;
|
|
50
50
|
}
|
|
@@ -42,7 +42,7 @@ function createPolymerDirectionWedgeMesh(ctx, unit, structure, theme, props, mes
|
|
|
42
42
|
var v = polymerTraceIt.move();
|
|
43
43
|
builderState.currentGroup = i;
|
|
44
44
|
var isNucleicType = isNucleic(v.moleculeType);
|
|
45
|
-
var isSheet = SecondaryStructureType.is(v.secStrucType, 4 /* Beta */);
|
|
45
|
+
var isSheet = SecondaryStructureType.is(v.secStrucType, 4 /* SecondaryStructureType.Flag.Beta */);
|
|
46
46
|
var tension = (isNucleicType || isSheet) ? 0.5 : 0.9;
|
|
47
47
|
var shift = isNucleicType ? 0.3 : 0.5;
|
|
48
48
|
interpolateCurveSegment(state, v, tension, shift);
|
|
@@ -47,8 +47,8 @@ function createPolymerTraceMesh(ctx, unit, structure, theme, props, mesh) {
|
|
|
47
47
|
var v = polymerTraceIt.move();
|
|
48
48
|
builderState.currentGroup = i;
|
|
49
49
|
var isNucleicType = isNucleic(v.moleculeType);
|
|
50
|
-
var isSheet = SecondaryStructureType.is(v.secStrucType, 4 /* Beta */);
|
|
51
|
-
var isHelix = SecondaryStructureType.is(v.secStrucType, 2 /* Helix */);
|
|
50
|
+
var isSheet = SecondaryStructureType.is(v.secStrucType, 4 /* SecondaryStructureType.Flag.Beta */);
|
|
51
|
+
var isHelix = SecondaryStructureType.is(v.secStrucType, 2 /* SecondaryStructureType.Flag.Helix */);
|
|
52
52
|
var tension = isHelix && !tubularHelices ? HelixTension : StandardTension;
|
|
53
53
|
var shift = isNucleicType ? NucleicShift : StandardShift;
|
|
54
54
|
interpolateCurveSegment(state, v, tension, shift);
|
|
@@ -37,7 +37,7 @@ export function makeIntraBondIgnoreTest(structure, unit, props) {
|
|
|
37
37
|
var ignoreHydrogens = props.ignoreHydrogens, includeTypes = props.includeTypes, excludeTypes = props.excludeTypes;
|
|
38
38
|
var include = BondType.fromNames(includeTypes);
|
|
39
39
|
var exclude = BondType.fromNames(excludeTypes);
|
|
40
|
-
var allBondTypes = BondType.isAll(include) && 0 /* None */ === exclude;
|
|
40
|
+
var allBondTypes = BondType.isAll(include) && 0 /* BondType.Flag.None */ === exclude;
|
|
41
41
|
var child = structure.child;
|
|
42
42
|
var childUnit = child === null || child === void 0 ? void 0 : child.unitMap.get(unit.id);
|
|
43
43
|
if (child && !childUnit)
|
|
@@ -56,7 +56,7 @@ export function makeInterBondIgnoreTest(structure, props) {
|
|
|
56
56
|
var ignoreHydrogens = props.ignoreHydrogens, includeTypes = props.includeTypes, excludeTypes = props.excludeTypes;
|
|
57
57
|
var include = BondType.fromNames(includeTypes);
|
|
58
58
|
var exclude = BondType.fromNames(excludeTypes);
|
|
59
|
-
var allBondTypes = BondType.isAll(include) && 0 /* None */ === exclude;
|
|
59
|
+
var allBondTypes = BondType.isAll(include) && 0 /* BondType.Flag.None */ === exclude;
|
|
60
60
|
var child = structure.child;
|
|
61
61
|
if (allBondTypes && !ignoreHydrogens && !child)
|
|
62
62
|
return;
|
|
@@ -118,9 +118,9 @@ export function ensureReasonableResolution(box, props, maxCells) {
|
|
|
118
118
|
}
|
|
119
119
|
export function getConformation(unit) {
|
|
120
120
|
switch (unit.kind) {
|
|
121
|
-
case 0 /* Atomic */: return unit.model.atomicConformation;
|
|
122
|
-
case 1 /* Spheres */: return unit.model.coarseConformation.spheres;
|
|
123
|
-
case 2 /* Gaussians */: return unit.model.coarseConformation.gaussians;
|
|
121
|
+
case 0 /* Unit.Kind.Atomic */: return unit.model.atomicConformation;
|
|
122
|
+
case 1 /* Unit.Kind.Spheres */: return unit.model.coarseConformation.spheres;
|
|
123
|
+
case 2 /* Unit.Kind.Gaussians */: return unit.model.coarseConformation.gaussians;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
export var CommonSurfaceParams = {
|
|
@@ -103,31 +103,31 @@ export function createLinkCylinderMesh(ctx, linkBuilder, props, mesh) {
|
|
|
103
103
|
v3sub(tmpV12, vb, va);
|
|
104
104
|
var dirFlag = v3dot(tmpV12, up) > 0;
|
|
105
105
|
var linkRadius = radius(edgeIndex);
|
|
106
|
-
var linkStyle = style ? style(edgeIndex) : 0 /* Solid */;
|
|
106
|
+
var linkStyle = style ? style(edgeIndex) : 0 /* LinkStyle.Solid */;
|
|
107
107
|
var linkStub = stubCap && (stub ? stub(edgeIndex) : false);
|
|
108
108
|
var _a = dirFlag ? [linkStub, linkCap] : [linkCap, linkStub], topCap = _a[0], bottomCap = _a[1];
|
|
109
109
|
builderState.currentGroup = edgeIndex;
|
|
110
110
|
var aromaticSegmentCount = aromaticDashCount + 1;
|
|
111
|
-
if (linkStyle === 0 /* Solid */) {
|
|
111
|
+
if (linkStyle === 0 /* LinkStyle.Solid */) {
|
|
112
112
|
cylinderProps.radiusTop = cylinderProps.radiusBottom = linkRadius;
|
|
113
113
|
cylinderProps.topCap = topCap;
|
|
114
114
|
cylinderProps.bottomCap = bottomCap;
|
|
115
115
|
addCylinder(builderState, va, vb, 0.5, cylinderProps);
|
|
116
116
|
}
|
|
117
|
-
else if (linkStyle === 1 /* Dashed */) {
|
|
117
|
+
else if (linkStyle === 1 /* LinkStyle.Dashed */) {
|
|
118
118
|
cylinderProps.radiusTop = cylinderProps.radiusBottom = linkRadius * dashScale;
|
|
119
119
|
cylinderProps.topCap = cylinderProps.bottomCap = dashCap;
|
|
120
120
|
addFixedCountDashedCylinder(builderState, va, vb, 0.5, segmentCount, cylinderProps);
|
|
121
121
|
}
|
|
122
|
-
else if (linkStyle === 2 /* Double */ || linkStyle === 3 /* OffsetDouble */ || linkStyle === 4 /* Triple */ || linkStyle === 5 /* OffsetTriple */ || linkStyle === 7 /* Aromatic */ || linkStyle === 8 /* MirroredAromatic */) {
|
|
123
|
-
var order = (linkStyle === 2 /* Double */ || linkStyle === 3 /* OffsetDouble */) ? 2 :
|
|
124
|
-
(linkStyle === 4 /* Triple */ || linkStyle === 5 /* OffsetTriple */) ? 3 : 1.5;
|
|
122
|
+
else if (linkStyle === 2 /* LinkStyle.Double */ || linkStyle === 3 /* LinkStyle.OffsetDouble */ || linkStyle === 4 /* LinkStyle.Triple */ || linkStyle === 5 /* LinkStyle.OffsetTriple */ || linkStyle === 7 /* LinkStyle.Aromatic */ || linkStyle === 8 /* LinkStyle.MirroredAromatic */) {
|
|
123
|
+
var order = (linkStyle === 2 /* LinkStyle.Double */ || linkStyle === 3 /* LinkStyle.OffsetDouble */) ? 2 :
|
|
124
|
+
(linkStyle === 4 /* LinkStyle.Triple */ || linkStyle === 5 /* LinkStyle.OffsetTriple */) ? 3 : 1.5;
|
|
125
125
|
var multiRadius = linkRadius * (linkScale / (0.5 * order));
|
|
126
126
|
var absOffset = (linkRadius - multiRadius) * linkSpacing;
|
|
127
127
|
calculateShiftDir(vShift, va, vb, referencePosition ? referencePosition(edgeIndex) : null);
|
|
128
128
|
cylinderProps.topCap = topCap;
|
|
129
129
|
cylinderProps.bottomCap = bottomCap;
|
|
130
|
-
if (linkStyle === 7 /* Aromatic */ || linkStyle === 8 /* MirroredAromatic */) {
|
|
130
|
+
if (linkStyle === 7 /* LinkStyle.Aromatic */ || linkStyle === 8 /* LinkStyle.MirroredAromatic */) {
|
|
131
131
|
cylinderProps.radiusTop = cylinderProps.radiusBottom = linkRadius;
|
|
132
132
|
addCylinder(builderState, va, vb, 0.5, cylinderProps);
|
|
133
133
|
var aromaticOffset = linkRadius + aromaticScale * linkRadius + aromaticScale * linkRadius * aromaticSpacing;
|
|
@@ -140,14 +140,14 @@ export function createLinkCylinderMesh(ctx, linkBuilder, props, mesh) {
|
|
|
140
140
|
v3sub(va, va, vShift);
|
|
141
141
|
v3sub(vb, vb, vShift);
|
|
142
142
|
addFixedCountDashedCylinder(builderState, va, vb, 0.5, aromaticSegmentCount, cylinderProps);
|
|
143
|
-
if (linkStyle === 8 /* MirroredAromatic */) {
|
|
143
|
+
if (linkStyle === 8 /* LinkStyle.MirroredAromatic */) {
|
|
144
144
|
v3setMagnitude(vShift, vShift, aromaticOffset * 2);
|
|
145
145
|
v3add(va, va, vShift);
|
|
146
146
|
v3add(vb, vb, vShift);
|
|
147
147
|
addFixedCountDashedCylinder(builderState, va, vb, 0.5, aromaticSegmentCount, cylinderProps);
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
else if (linkStyle === 3 /* OffsetDouble */ || linkStyle === 5 /* OffsetTriple */) {
|
|
150
|
+
else if (linkStyle === 3 /* LinkStyle.OffsetDouble */ || linkStyle === 5 /* LinkStyle.OffsetTriple */) {
|
|
151
151
|
var multipleOffset = linkRadius + multiRadius + linkScale * linkRadius * linkSpacing;
|
|
152
152
|
v3setMagnitude(vShift, vShift, multipleOffset);
|
|
153
153
|
cylinderProps.radiusTop = cylinderProps.radiusBottom = linkRadius;
|
|
@@ -177,7 +177,7 @@ export function createLinkCylinderMesh(ctx, linkBuilder, props, mesh) {
|
|
|
177
177
|
addDoubleCylinder(builderState, va, vb, 0.5, vShift, cylinderProps);
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
else if (linkStyle === 6 /* Disk */) {
|
|
180
|
+
else if (linkStyle === 6 /* LinkStyle.Disk */) {
|
|
181
181
|
v3scale(tmpV12, tmpV12, 0.475);
|
|
182
182
|
v3add(va, va, tmpV12);
|
|
183
183
|
v3sub(vb, vb, tmpV12);
|
|
@@ -230,25 +230,25 @@ export function createLinkCylinderImpostors(ctx, linkBuilder, props, cylinders)
|
|
|
230
230
|
v3add(center, center, vb);
|
|
231
231
|
count += 2;
|
|
232
232
|
var linkRadius = radius(edgeIndex);
|
|
233
|
-
var linkStyle = style ? style(edgeIndex) : 0 /* Solid */;
|
|
233
|
+
var linkStyle = style ? style(edgeIndex) : 0 /* LinkStyle.Solid */;
|
|
234
234
|
var linkStub = stubCap && (stub ? stub(edgeIndex) : false);
|
|
235
|
-
if (linkStyle === 0 /* Solid */) {
|
|
235
|
+
if (linkStyle === 0 /* LinkStyle.Solid */) {
|
|
236
236
|
v3scale(vm, v3add(vm, va, vb), 0.5);
|
|
237
237
|
builder.add(va[0], va[1], va[2], vm[0], vm[1], vm[2], 1, linkCap, linkStub, edgeIndex);
|
|
238
238
|
}
|
|
239
|
-
else if (linkStyle === 1 /* Dashed */) {
|
|
239
|
+
else if (linkStyle === 1 /* LinkStyle.Dashed */) {
|
|
240
240
|
v3scale(tmpV12, v3sub(tmpV12, vb, va), lengthScale);
|
|
241
241
|
v3sub(vb, vb, tmpV12);
|
|
242
242
|
builder.addFixedCountDashes(va, vb, segmentCount, dashScale, dashCap, dashCap, edgeIndex);
|
|
243
243
|
}
|
|
244
|
-
else if (linkStyle === 2 /* Double */ || linkStyle === 3 /* OffsetDouble */ || linkStyle === 4 /* Triple */ || linkStyle === 5 /* OffsetTriple */ || linkStyle === 7 /* Aromatic */ || linkStyle === 8 /* MirroredAromatic */) {
|
|
245
|
-
var order = (linkStyle === 2 /* Double */ || linkStyle === 3 /* OffsetDouble */) ? 2 :
|
|
246
|
-
(linkStyle === 4 /* Triple */ || linkStyle === 5 /* OffsetTriple */) ? 3 : 1.5;
|
|
244
|
+
else if (linkStyle === 2 /* LinkStyle.Double */ || linkStyle === 3 /* LinkStyle.OffsetDouble */ || linkStyle === 4 /* LinkStyle.Triple */ || linkStyle === 5 /* LinkStyle.OffsetTriple */ || linkStyle === 7 /* LinkStyle.Aromatic */ || linkStyle === 8 /* LinkStyle.MirroredAromatic */) {
|
|
245
|
+
var order = (linkStyle === 2 /* LinkStyle.Double */ || linkStyle === 3 /* LinkStyle.OffsetDouble */) ? 2 :
|
|
246
|
+
(linkStyle === 4 /* LinkStyle.Triple */ || linkStyle === 5 /* LinkStyle.OffsetTriple */) ? 3 : 1.5;
|
|
247
247
|
var multiScale = linkScale / (0.5 * order);
|
|
248
248
|
var absOffset = (linkRadius - multiScale * linkRadius) * linkSpacing;
|
|
249
249
|
v3scale(vm, v3add(vm, va, vb), 0.5);
|
|
250
250
|
calculateShiftDir(vShift, va, vb, referencePosition ? referencePosition(edgeIndex) : null);
|
|
251
|
-
if (linkStyle === 7 /* Aromatic */ || linkStyle === 8 /* MirroredAromatic */) {
|
|
251
|
+
if (linkStyle === 7 /* LinkStyle.Aromatic */ || linkStyle === 8 /* LinkStyle.MirroredAromatic */) {
|
|
252
252
|
builder.add(va[0], va[1], va[2], vm[0], vm[1], vm[2], 1, linkCap, linkStub, edgeIndex);
|
|
253
253
|
var aromaticOffset = linkRadius + aromaticScale * linkRadius + aromaticScale * linkRadius * aromaticSpacing;
|
|
254
254
|
v3scale(tmpV12, v3sub(tmpV12, vb, va), aromaticLengthScale);
|
|
@@ -259,14 +259,14 @@ export function createLinkCylinderImpostors(ctx, linkBuilder, props, cylinders)
|
|
|
259
259
|
v3sub(va, va, vShift);
|
|
260
260
|
v3sub(vb, vb, vShift);
|
|
261
261
|
builder.addFixedCountDashes(va, vb, aromaticSegmentCount, aromaticScale, dashCap, dashCap, edgeIndex);
|
|
262
|
-
if (linkStyle === 8 /* MirroredAromatic */) {
|
|
262
|
+
if (linkStyle === 8 /* LinkStyle.MirroredAromatic */) {
|
|
263
263
|
v3setMagnitude(vShift, vShift, aromaticOffset * 2);
|
|
264
264
|
v3add(va, va, vShift);
|
|
265
265
|
v3add(vb, vb, vShift);
|
|
266
266
|
builder.addFixedCountDashes(va, vb, aromaticSegmentCount, aromaticScale, dashCap, dashCap, edgeIndex);
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
|
-
else if (linkStyle === 3 /* OffsetDouble */ || linkStyle === 5 /* OffsetTriple */) {
|
|
269
|
+
else if (linkStyle === 3 /* LinkStyle.OffsetDouble */ || linkStyle === 5 /* LinkStyle.OffsetTriple */) {
|
|
270
270
|
var multipleOffset = linkRadius + multiScale * linkRadius + linkScale * linkRadius * linkSpacing;
|
|
271
271
|
v3setMagnitude(vShift, vShift, multipleOffset);
|
|
272
272
|
builder.add(va[0], va[1], va[2], vm[0], vm[1], vm[2], 1, linkCap, linkStub, edgeIndex);
|
|
@@ -284,7 +284,7 @@ export function createLinkCylinderImpostors(ctx, linkBuilder, props, cylinders)
|
|
|
284
284
|
builder.add(va[0] - vShift[0], va[1] - vShift[1], va[2] - vShift[2], vm[0] - vShift[0], vm[1] - vShift[1], vm[2] - vShift[2], multiScale, linkCap, linkStub, edgeIndex);
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
|
-
else if (linkStyle === 6 /* Disk */) {
|
|
287
|
+
else if (linkStyle === 6 /* LinkStyle.Disk */) {
|
|
288
288
|
v3scale(tmpV12, v3sub(tmpV12, vb, va), 0.475);
|
|
289
289
|
v3add(va, va, tmpV12);
|
|
290
290
|
v3sub(vb, vb, tmpV12);
|
|
@@ -335,24 +335,24 @@ export function createLinkLines(ctx, linkBuilder, props, lines) {
|
|
|
335
335
|
v3add(center, center, va);
|
|
336
336
|
v3add(center, center, vb);
|
|
337
337
|
count += 2;
|
|
338
|
-
var linkStyle = style ? style(edgeIndex) : 0 /* Solid */;
|
|
339
|
-
if (linkStyle === 0 /* Solid */) {
|
|
338
|
+
var linkStyle = style ? style(edgeIndex) : 0 /* LinkStyle.Solid */;
|
|
339
|
+
if (linkStyle === 0 /* LinkStyle.Solid */) {
|
|
340
340
|
v3scale(vm, v3add(vm, va, vb), 0.5);
|
|
341
341
|
builder.add(va[0], va[1], va[2], vm[0], vm[1], vm[2], edgeIndex);
|
|
342
342
|
}
|
|
343
|
-
else if (linkStyle === 1 /* Dashed */) {
|
|
343
|
+
else if (linkStyle === 1 /* LinkStyle.Dashed */) {
|
|
344
344
|
v3scale(tmpV12, v3sub(tmpV12, vb, va), lengthScale);
|
|
345
345
|
v3sub(vb, vb, tmpV12);
|
|
346
346
|
builder.addFixedCountDashes(va, vb, segmentCount, edgeIndex);
|
|
347
347
|
}
|
|
348
|
-
else if (linkStyle === 2 /* Double */ || linkStyle === 3 /* OffsetDouble */ || linkStyle === 4 /* Triple */ || linkStyle === 5 /* OffsetTriple */ || linkStyle === 7 /* Aromatic */ || linkStyle === 8 /* MirroredAromatic */) {
|
|
349
|
-
var order = linkStyle === 2 /* Double */ || linkStyle === 3 /* OffsetDouble */ ? 2 :
|
|
350
|
-
linkStyle === 4 /* Triple */ || linkStyle === 5 /* OffsetTriple */ ? 3 : 1.5;
|
|
348
|
+
else if (linkStyle === 2 /* LinkStyle.Double */ || linkStyle === 3 /* LinkStyle.OffsetDouble */ || linkStyle === 4 /* LinkStyle.Triple */ || linkStyle === 5 /* LinkStyle.OffsetTriple */ || linkStyle === 7 /* LinkStyle.Aromatic */ || linkStyle === 8 /* LinkStyle.MirroredAromatic */) {
|
|
349
|
+
var order = linkStyle === 2 /* LinkStyle.Double */ || linkStyle === 3 /* LinkStyle.OffsetDouble */ ? 2 :
|
|
350
|
+
linkStyle === 4 /* LinkStyle.Triple */ || linkStyle === 5 /* LinkStyle.OffsetTriple */ ? 3 : 1.5;
|
|
351
351
|
var multiRadius = 1 * (linkScale / (0.5 * order));
|
|
352
352
|
var absOffset = (1 - multiRadius) * linkSpacing;
|
|
353
353
|
v3scale(vm, v3add(vm, va, vb), 0.5);
|
|
354
354
|
calculateShiftDir(vShift, va, vb, referencePosition ? referencePosition(edgeIndex) : null);
|
|
355
|
-
if (linkStyle === 7 /* Aromatic */ || linkStyle === 8 /* MirroredAromatic */) {
|
|
355
|
+
if (linkStyle === 7 /* LinkStyle.Aromatic */ || linkStyle === 8 /* LinkStyle.MirroredAromatic */) {
|
|
356
356
|
builder.add(va[0], va[1], va[2], vm[0], vm[1], vm[2], edgeIndex);
|
|
357
357
|
v3scale(tmpV12, v3sub(tmpV12, vb, va), aromaticLengthScale);
|
|
358
358
|
v3sub(vb, vb, tmpV12);
|
|
@@ -360,14 +360,14 @@ export function createLinkLines(ctx, linkBuilder, props, lines) {
|
|
|
360
360
|
v3sub(va, va, vShift);
|
|
361
361
|
v3sub(vb, vb, vShift);
|
|
362
362
|
builder.addFixedCountDashes(va, vb, aromaticSegmentCount, edgeIndex);
|
|
363
|
-
if (linkStyle === 8 /* MirroredAromatic */) {
|
|
363
|
+
if (linkStyle === 8 /* LinkStyle.MirroredAromatic */) {
|
|
364
364
|
v3setMagnitude(vShift, vShift, absOffset * aromaticOffsetFactor * 2);
|
|
365
365
|
v3add(va, va, vShift);
|
|
366
366
|
v3add(vb, vb, vShift);
|
|
367
367
|
builder.addFixedCountDashes(va, vb, aromaticSegmentCount, edgeIndex);
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
|
-
else if (linkStyle === 3 /* OffsetDouble */ || linkStyle === 5 /* OffsetTriple */) {
|
|
370
|
+
else if (linkStyle === 3 /* LinkStyle.OffsetDouble */ || linkStyle === 5 /* LinkStyle.OffsetTriple */) {
|
|
371
371
|
v3setMagnitude(vShift, vShift, absOffset * multipleOffsetFactor);
|
|
372
372
|
builder.add(va[0], va[1], va[2], vm[0], vm[1], vm[2], edgeIndex);
|
|
373
373
|
v3scale(tmpV12, v3sub(tmpV12, va, vb), linkSpacing * linkScale);
|
|
@@ -384,7 +384,7 @@ export function createLinkLines(ctx, linkBuilder, props, lines) {
|
|
|
384
384
|
builder.add(va[0] - vShift[0], va[1] - vShift[1], va[2] - vShift[2], vm[0] - vShift[0], vm[1] - vShift[1], vm[2] - vShift[2], edgeIndex);
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
|
-
else if (linkStyle === 6 /* Disk */) {
|
|
387
|
+
else if (linkStyle === 6 /* LinkStyle.Disk */) {
|
|
388
388
|
v3scale(tmpV12, v3sub(tmpV12, vb, va), 0.475);
|
|
389
389
|
v3add(va, va, tmpV12);
|
|
390
390
|
v3sub(vb, vb, tmpV12);
|
|
@@ -8,9 +8,9 @@ import { SortedRanges } from '../../../../../mol-data/int/sorted-ranges';
|
|
|
8
8
|
import { getPolymerRanges } from '../polymer';
|
|
9
9
|
export function eachPolymerBackboneLink(unit, callback) {
|
|
10
10
|
switch (unit.kind) {
|
|
11
|
-
case 0 /* Atomic */: return eachAtomicPolymerBackboneLink(unit, callback);
|
|
12
|
-
case 1 /* Spheres */:
|
|
13
|
-
case 2 /* Gaussians */:
|
|
11
|
+
case 0 /* Unit.Kind.Atomic */: return eachAtomicPolymerBackboneLink(unit, callback);
|
|
12
|
+
case 1 /* Unit.Kind.Spheres */:
|
|
13
|
+
case 2 /* Unit.Kind.Gaussians */:
|
|
14
14
|
return eachCoarsePolymerBackboneLink(unit, callback);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -74,9 +74,9 @@ function eachCoarsePolymerBackboneLink(unit, callback) {
|
|
|
74
74
|
}
|
|
75
75
|
export function eachPolymerBackboneElement(unit, callback) {
|
|
76
76
|
switch (unit.kind) {
|
|
77
|
-
case 0 /* Atomic */: return eachAtomicPolymerBackboneElement(unit, callback);
|
|
78
|
-
case 1 /* Spheres */:
|
|
79
|
-
case 2 /* Gaussians */:
|
|
77
|
+
case 0 /* Unit.Kind.Atomic */: return eachAtomicPolymerBackboneElement(unit, callback);
|
|
78
|
+
case 1 /* Unit.Kind.Spheres */:
|
|
79
|
+
case 2 /* Unit.Kind.Gaussians */:
|
|
80
80
|
return eachCoarsePolymerBackboneElement(unit, callback);
|
|
81
81
|
}
|
|
82
82
|
}
|
|
@@ -9,9 +9,9 @@ import { getGapRanges } from '../polymer';
|
|
|
9
9
|
/** Iterates over gaps, i.e. the stem residues/coarse elements adjacent to gaps */
|
|
10
10
|
export function PolymerGapIterator(structure, unit) {
|
|
11
11
|
switch (unit.kind) {
|
|
12
|
-
case 0 /* Atomic */: return new AtomicPolymerGapIterator(structure, unit);
|
|
13
|
-
case 1 /* Spheres */:
|
|
14
|
-
case 2 /* Gaussians */:
|
|
12
|
+
case 0 /* Unit.Kind.Atomic */: return new AtomicPolymerGapIterator(structure, unit);
|
|
13
|
+
case 1 /* Unit.Kind.Spheres */:
|
|
14
|
+
case 2 /* Unit.Kind.Gaussians */:
|
|
15
15
|
return new CoarsePolymerGapIterator(structure, unit);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -12,10 +12,10 @@ import { getPolymerRanges } from '../polymer';
|
|
|
12
12
|
import { SecondaryStructureProvider } from '../../../../../mol-model-props/computed/secondary-structure';
|
|
13
13
|
import { HelixOrientationProvider } from '../../../../../mol-model-props/computed/helix-orientation';
|
|
14
14
|
function isHelixSS(ss) {
|
|
15
|
-
return SecondaryStructureType.is(ss, 2 /* Helix */);
|
|
15
|
+
return SecondaryStructureType.is(ss, 2 /* SecondaryStructureType.Flag.Helix */);
|
|
16
16
|
}
|
|
17
17
|
function isSheetSS(ss) {
|
|
18
|
-
return SecondaryStructureType.is(ss, 4 /* Beta */);
|
|
18
|
+
return SecondaryStructureType.is(ss, 4 /* SecondaryStructureType.Flag.Beta */);
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Iterates over individual residues/coarse elements in polymers of a unit while
|
|
@@ -24,13 +24,13 @@ function isSheetSS(ss) {
|
|
|
24
24
|
export function PolymerTraceIterator(unit, structure, options) {
|
|
25
25
|
if (options === void 0) { options = {}; }
|
|
26
26
|
switch (unit.kind) {
|
|
27
|
-
case 0 /* Atomic */: return new AtomicPolymerTraceIterator(unit, structure, options);
|
|
28
|
-
case 1 /* Spheres */:
|
|
29
|
-
case 2 /* Gaussians */:
|
|
27
|
+
case 0 /* Unit.Kind.Atomic */: return new AtomicPolymerTraceIterator(unit, structure, options);
|
|
28
|
+
case 1 /* Unit.Kind.Spheres */:
|
|
29
|
+
case 2 /* Unit.Kind.Gaussians */:
|
|
30
30
|
return new CoarsePolymerTraceIterator(unit, structure);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
var SecStrucTypeNA = SecondaryStructureType.create(536870912 /* NA */);
|
|
33
|
+
var SecStrucTypeNA = SecondaryStructureType.create(536870912 /* SecondaryStructureType.Flag.NA */);
|
|
34
34
|
function createPolymerTraceElement(structure, unit) {
|
|
35
35
|
return {
|
|
36
36
|
center: StructureElement.Location.create(structure, unit),
|
|
@@ -40,7 +40,7 @@ function createPolymerTraceElement(structure, unit) {
|
|
|
40
40
|
initial: false, final: false,
|
|
41
41
|
secStrucFirst: false, secStrucLast: false,
|
|
42
42
|
secStrucType: SecStrucTypeNA,
|
|
43
|
-
moleculeType: 0 /* Unknown */,
|
|
43
|
+
moleculeType: 0 /* MoleculeType.Unknown */,
|
|
44
44
|
coarseBackboneFirst: false, coarseBackboneLast: false,
|
|
45
45
|
isCoarseBackbone: false,
|
|
46
46
|
p0: Vec3(), p1: Vec3(), p2: Vec3(), p3: Vec3(), p4: Vec3(),
|
|
@@ -55,7 +55,7 @@ var AtomicPolymerTraceIterator = /** @class */ (function () {
|
|
|
55
55
|
if (options === void 0) { options = {}; }
|
|
56
56
|
var _a;
|
|
57
57
|
this.unit = unit;
|
|
58
|
-
this.state = 0 /* nextPolymer */;
|
|
58
|
+
this.state = 0 /* AtomicPolymerTraceIteratorState.nextPolymer */;
|
|
59
59
|
this.p0 = Vec3();
|
|
60
60
|
this.p1 = Vec3();
|
|
61
61
|
this.p2 = Vec3();
|
|
@@ -137,7 +137,7 @@ var AtomicPolymerTraceIterator = /** @class */ (function () {
|
|
|
137
137
|
var _a = this.secondaryStructure, type = _a.type, getIndex = _a.getIndex;
|
|
138
138
|
var ss = type[getIndex(residueIndex)];
|
|
139
139
|
// normalize helix-type
|
|
140
|
-
return isHelixSS(ss) ? 2 /* Helix */ : ss;
|
|
140
|
+
return isHelixSS(ss) ? 2 /* SecondaryStructureType.Flag.Helix */ : ss;
|
|
141
141
|
}
|
|
142
142
|
else {
|
|
143
143
|
return SecStrucTypeNA;
|
|
@@ -168,13 +168,13 @@ var AtomicPolymerTraceIterator = /** @class */ (function () {
|
|
|
168
168
|
};
|
|
169
169
|
AtomicPolymerTraceIterator.prototype.move = function () {
|
|
170
170
|
var _a = this, residueIt = _a.residueIt, polymerIt = _a.polymerIt, value = _a.value;
|
|
171
|
-
if (this.state === 0 /* nextPolymer */) {
|
|
171
|
+
if (this.state === 0 /* AtomicPolymerTraceIteratorState.nextPolymer */) {
|
|
172
172
|
while (polymerIt.hasNext) {
|
|
173
173
|
this.polymerSegment = polymerIt.move();
|
|
174
174
|
residueIt.setSegment(this.polymerSegment);
|
|
175
175
|
this.updateResidueSegmentRange(this.polymerSegment);
|
|
176
176
|
if (residueIt.hasNext) {
|
|
177
|
-
this.state = 1 /* nextResidue */;
|
|
177
|
+
this.state = 1 /* AtomicPolymerTraceIteratorState.nextResidue */;
|
|
178
178
|
var residueIndexBeg = this.residueAtomSegments.index[this.unit.elements[this.polymerSegment.start]];
|
|
179
179
|
var residueIndexBegPrev = this.getResidueIndex(residueIndexBeg - 1);
|
|
180
180
|
this.currSecStrucType = residueIndexBeg === residueIndexBegPrev ? SecStrucTypeNA : this.getSecStruc(residueIndexBegPrev);
|
|
@@ -185,7 +185,7 @@ var AtomicPolymerTraceIterator = /** @class */ (function () {
|
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
|
-
if (this.state === 1 /* nextResidue */) {
|
|
188
|
+
if (this.state === 1 /* AtomicPolymerTraceIteratorState.nextResidue */) {
|
|
189
189
|
var residueIndex = residueIt.move().index;
|
|
190
190
|
var residueIndexPrev3 = this.getResidueIndex(residueIndex - 3);
|
|
191
191
|
var residueIndexPrev2 = this.getResidueIndex(residueIndex - 2);
|
|
@@ -348,7 +348,7 @@ var AtomicPolymerTraceIterator = /** @class */ (function () {
|
|
|
348
348
|
this.setDirection(value.d12, this.d01, this.d12, this.d23);
|
|
349
349
|
this.setDirection(value.d23, this.d12, this.d23, this.d34);
|
|
350
350
|
if (!residueIt.hasNext) {
|
|
351
|
-
this.state = 0 /* nextPolymer */;
|
|
351
|
+
this.state = 0 /* AtomicPolymerTraceIteratorState.nextPolymer */;
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
354
|
this.hasNext = residueIt.hasNext || polymerIt.hasNext;
|
|
@@ -360,17 +360,17 @@ export { AtomicPolymerTraceIterator };
|
|
|
360
360
|
var CoarsePolymerTraceIterator = /** @class */ (function () {
|
|
361
361
|
function CoarsePolymerTraceIterator(unit, structure) {
|
|
362
362
|
this.unit = unit;
|
|
363
|
-
this.state = 0 /* nextPolymer */;
|
|
363
|
+
this.state = 0 /* CoarsePolymerTraceIteratorState.nextPolymer */;
|
|
364
364
|
this.hasNext = false;
|
|
365
365
|
this.polymerIt = SortedRanges.transientSegments(getPolymerRanges(unit), unit.elements);
|
|
366
366
|
this.value = createPolymerTraceElement(structure, unit);
|
|
367
367
|
Vec3.set(this.value.d12, 1, 0, 0);
|
|
368
368
|
Vec3.set(this.value.d23, 1, 0, 0);
|
|
369
369
|
switch (unit.kind) {
|
|
370
|
-
case 1 /* Spheres */:
|
|
370
|
+
case 1 /* Unit.Kind.Spheres */:
|
|
371
371
|
this.conformation = unit.model.coarseConformation.spheres;
|
|
372
372
|
break;
|
|
373
|
-
case 2 /* Gaussians */:
|
|
373
|
+
case 2 /* Unit.Kind.Gaussians */:
|
|
374
374
|
this.conformation = unit.model.coarseConformation.gaussians;
|
|
375
375
|
break;
|
|
376
376
|
}
|
|
@@ -386,17 +386,17 @@ var CoarsePolymerTraceIterator = /** @class */ (function () {
|
|
|
386
386
|
target[2] = this.conformation.z[index];
|
|
387
387
|
};
|
|
388
388
|
CoarsePolymerTraceIterator.prototype.move = function () {
|
|
389
|
-
if (this.state === 0 /* nextPolymer */) {
|
|
389
|
+
if (this.state === 0 /* CoarsePolymerTraceIteratorState.nextPolymer */) {
|
|
390
390
|
while (this.polymerIt.hasNext) {
|
|
391
391
|
this.polymerSegment = this.polymerIt.move();
|
|
392
392
|
this.elementIndex = this.polymerSegment.start;
|
|
393
393
|
if (this.elementIndex < this.polymerSegment.end) {
|
|
394
|
-
this.state = 1 /* nextElement */;
|
|
394
|
+
this.state = 1 /* CoarsePolymerTraceIteratorState.nextElement */;
|
|
395
395
|
break;
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
|
-
if (this.state === 1 /* nextElement */) {
|
|
399
|
+
if (this.state === 1 /* CoarsePolymerTraceIteratorState.nextElement */) {
|
|
400
400
|
var elementIndexPrev2 = this.getElementIndex(this.elementIndex - 2);
|
|
401
401
|
var elementIndexPrev1 = this.getElementIndex(this.elementIndex - 1);
|
|
402
402
|
var elementIndexNext1 = this.getElementIndex(this.elementIndex + 1);
|
|
@@ -432,7 +432,7 @@ var CoarsePolymerTraceIterator = /** @class */ (function () {
|
|
|
432
432
|
this.value.first = this.elementIndex === this.polymerSegment.start;
|
|
433
433
|
this.value.last = this.elementIndex === this.polymerSegment.end - 1;
|
|
434
434
|
if (this.elementIndex + 1 >= this.polymerSegment.end) {
|
|
435
|
-
this.state = 0 /* nextPolymer */;
|
|
435
|
+
this.state = 0 /* CoarsePolymerTraceIteratorState.nextPolymer */;
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
438
|
this.hasNext = this.elementIndex + 1 < this.polymerSegment.end || this.polymerIt.hasNext;
|
|
@@ -20,16 +20,16 @@ export var NucleicShift = 0.3;
|
|
|
20
20
|
export var OverhangFactor = 2;
|
|
21
21
|
export function getPolymerRanges(unit) {
|
|
22
22
|
switch (unit.kind) {
|
|
23
|
-
case 0 /* Atomic */: return unit.model.atomicRanges.polymerRanges;
|
|
24
|
-
case 1 /* Spheres */: return unit.model.coarseHierarchy.spheres.polymerRanges;
|
|
25
|
-
case 2 /* Gaussians */: return unit.model.coarseHierarchy.gaussians.polymerRanges;
|
|
23
|
+
case 0 /* Unit.Kind.Atomic */: return unit.model.atomicRanges.polymerRanges;
|
|
24
|
+
case 1 /* Unit.Kind.Spheres */: return unit.model.coarseHierarchy.spheres.polymerRanges;
|
|
25
|
+
case 2 /* Unit.Kind.Gaussians */: return unit.model.coarseHierarchy.gaussians.polymerRanges;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
export function getGapRanges(unit) {
|
|
29
29
|
switch (unit.kind) {
|
|
30
|
-
case 0 /* Atomic */: return unit.model.atomicRanges.gapRanges;
|
|
31
|
-
case 1 /* Spheres */: return unit.model.coarseHierarchy.spheres.gapRanges;
|
|
32
|
-
case 2 /* Gaussians */: return unit.model.coarseHierarchy.gaussians.gapRanges;
|
|
30
|
+
case 0 /* Unit.Kind.Atomic */: return unit.model.atomicRanges.gapRanges;
|
|
31
|
+
case 1 /* Unit.Kind.Spheres */: return unit.model.coarseHierarchy.spheres.gapRanges;
|
|
32
|
+
case 2 /* Unit.Kind.Gaussians */: return unit.model.coarseHierarchy.gaussians.gapRanges;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
export var PolymerLocationIterator;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2018-
|
|
2
|
+
* Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
5
5
|
*/
|
|
@@ -90,6 +90,7 @@ export function VolumeVisual(builder, materialId) {
|
|
|
90
90
|
if (newGeometry) {
|
|
91
91
|
ValueCell.updateIfChanged(renderObject.values.drawCount, Geometry.getDrawCount(newGeometry));
|
|
92
92
|
ValueCell.updateIfChanged(renderObject.values.uVertexCount, Geometry.getVertexCount(newGeometry));
|
|
93
|
+
ValueCell.updateIfChanged(renderObject.values.uGroupCount, Geometry.getGroupCount(newGeometry));
|
|
93
94
|
}
|
|
94
95
|
else {
|
|
95
96
|
throw new Error('expected geometry to be given');
|
|
@@ -10,6 +10,7 @@ export declare namespace MolScriptBuilder {
|
|
|
10
10
|
'@header': string;
|
|
11
11
|
type: {
|
|
12
12
|
'@header': string;
|
|
13
|
+
/** atom macromolecular property set */
|
|
13
14
|
bool: MSymbol<import("./symbol").Arguments<import("./symbol").Arguments.PropTypes<{
|
|
14
15
|
0: import("./symbol").Argument<import("./type").Type.AnyValue>;
|
|
15
16
|
}>>, import("./type").Type.OneOf<boolean>>;
|
|
@@ -16,8 +16,8 @@ export declare namespace Types {
|
|
|
16
16
|
const Regex: Type.Value<RegExp>;
|
|
17
17
|
const Set: <T extends Type<any>>(t?: T | undefined) => Type.Container<Set<T["@type"]>>;
|
|
18
18
|
const List: <T extends Type<any>>(t?: T | undefined) => Type.Container<List<T["@type"]>>;
|
|
19
|
-
const Fn: <T extends Type<any>>(t?: T | undefined, alias?: string
|
|
20
|
-
const Flags: <T extends Type<any>>(t: T, alias?: string
|
|
19
|
+
const Fn: <T extends Type<any>>(t?: T | undefined, alias?: string) => Type.Container<(env: any) => T["@type"]>;
|
|
20
|
+
const Flags: <T extends Type<any>>(t: T, alias?: string) => Type.Container<number>;
|
|
21
21
|
const BitFlags: Type.Container<number>;
|
|
22
22
|
}
|
|
23
23
|
export declare const TTargs: Arguments<Arguments.PropTypes<{
|
|
@@ -209,7 +209,7 @@ var symbols = [
|
|
|
209
209
|
C(MolScript.structureQuery.type.elementSymbol, function (ctx, v) { return ElementSymbol(v[0](ctx)); }),
|
|
210
210
|
C(MolScript.structureQuery.type.atomName, function (ctx, v) { return upperCaseAny(v[0](ctx)); }),
|
|
211
211
|
C(MolScript.structureQuery.type.bondFlags, function (ctx, xs) {
|
|
212
|
-
var ret = 0 /* None */;
|
|
212
|
+
var ret = 0 /* BondType.Flag.None */;
|
|
213
213
|
if (typeof xs.length === 'number') {
|
|
214
214
|
for (var i = 0, _i = xs.length; i < _i; i++)
|
|
215
215
|
ret = bondFlag(ret, xs[i](ctx));
|
|
@@ -224,7 +224,7 @@ var symbols = [
|
|
|
224
224
|
}),
|
|
225
225
|
C(MolScript.structureQuery.type.ringFingerprint, function (ctx, xs) { return UnitRing.elementFingerprint(getArray(ctx, xs)); }),
|
|
226
226
|
C(MolScript.structureQuery.type.secondaryStructureFlags, function (ctx, xs) {
|
|
227
|
-
var ret = 0 /* None */;
|
|
227
|
+
var ret = 0 /* SecondaryStructureType.Flag.None */;
|
|
228
228
|
if (typeof xs.length === 'number') {
|
|
229
229
|
for (var i = 0, _i = xs.length; i < _i; i++)
|
|
230
230
|
ret = secondaryStructureFlag(ret, xs[i](ctx));
|
|
@@ -386,20 +386,20 @@ function atomProp(p) {
|
|
|
386
386
|
return function (ctx, xs) { return p((xs && xs[0] && xs[0](ctx)) || ctx.element); };
|
|
387
387
|
}
|
|
388
388
|
function bondFlag(current, f) {
|
|
389
|
-
return current | (BondType.isName(f) ? BondType.fromName(f) : 0 /* None */);
|
|
389
|
+
return current | (BondType.isName(f) ? BondType.fromName(f) : 0 /* BondType.Flag.None */);
|
|
390
390
|
}
|
|
391
391
|
function secondaryStructureFlag(current, f) {
|
|
392
392
|
switch (f.toLowerCase()) {
|
|
393
|
-
case 'helix': return current | 2 /* Helix */;
|
|
394
|
-
case 'alpha': return current | 2 /* Helix */ | 4096 /* HelixAlpha */;
|
|
395
|
-
case 'pi': return current | 2 /* Helix */ | 32768 /* HelixPi */;
|
|
396
|
-
case '310': return current | 2 /* Helix */ | 2048 /* Helix3Ten */;
|
|
397
|
-
case 'beta': return current | 4 /* Beta */;
|
|
398
|
-
case 'strand': return current | 4 /* Beta */ | 4194304 /* BetaStrand */;
|
|
399
|
-
case 'sheet': return current | 4 /* Beta */ | 8388608 /* BetaSheet */;
|
|
400
|
-
case 'turn': return current | 16 /* Turn */;
|
|
401
|
-
case 'bend': return current | 8 /* Bend */;
|
|
402
|
-
case 'coil': return current | 536870912 /* NA */;
|
|
393
|
+
case 'helix': return current | 2 /* SecondaryStructureType.Flag.Helix */;
|
|
394
|
+
case 'alpha': return current | 2 /* SecondaryStructureType.Flag.Helix */ | 4096 /* SecondaryStructureType.Flag.HelixAlpha */;
|
|
395
|
+
case 'pi': return current | 2 /* SecondaryStructureType.Flag.Helix */ | 32768 /* SecondaryStructureType.Flag.HelixPi */;
|
|
396
|
+
case '310': return current | 2 /* SecondaryStructureType.Flag.Helix */ | 2048 /* SecondaryStructureType.Flag.Helix3Ten */;
|
|
397
|
+
case 'beta': return current | 4 /* SecondaryStructureType.Flag.Beta */;
|
|
398
|
+
case 'strand': return current | 4 /* SecondaryStructureType.Flag.Beta */ | 4194304 /* SecondaryStructureType.Flag.BetaStrand */;
|
|
399
|
+
case 'sheet': return current | 4 /* SecondaryStructureType.Flag.Beta */ | 8388608 /* SecondaryStructureType.Flag.BetaSheet */;
|
|
400
|
+
case 'turn': return current | 16 /* SecondaryStructureType.Flag.Turn */;
|
|
401
|
+
case 'bend': return current | 8 /* SecondaryStructureType.Flag.Bend */;
|
|
402
|
+
case 'coil': return current | 536870912 /* SecondaryStructureType.Flag.NA */;
|
|
403
403
|
default: return current;
|
|
404
404
|
}
|
|
405
405
|
}
|
|
@@ -52,8 +52,8 @@ declare namespace StateObject {
|
|
|
52
52
|
function create<Data, T extends Type>(type: T): {
|
|
53
53
|
new (data: Data, props?: {
|
|
54
54
|
label: string;
|
|
55
|
-
description?: string
|
|
56
|
-
}
|
|
55
|
+
description?: string;
|
|
56
|
+
}): {
|
|
57
57
|
id: UUID;
|
|
58
58
|
type: T;
|
|
59
59
|
label: string;
|
|
@@ -61,7 +61,7 @@ declare namespace StateObject {
|
|
|
61
61
|
data: Data;
|
|
62
62
|
};
|
|
63
63
|
type: T;
|
|
64
|
-
is(obj?: StateObject
|
|
64
|
+
is(obj?: StateObject): obj is {
|
|
65
65
|
id: UUID;
|
|
66
66
|
type: T;
|
|
67
67
|
label: string;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
5
5
|
*/
|
|
6
6
|
import { isProductionMode } from '../../mol-util/debug';
|
|
7
|
-
var hasPerformance = (typeof performance !== 'undefined') && performance.mark && performance.measure;
|
|
7
|
+
var hasPerformance = (typeof performance !== 'undefined') && !!performance.mark && performance.measure;
|
|
8
8
|
var timingEnabled = hasPerformance && !isProductionMode;
|
|
9
9
|
export var UserTiming;
|
|
10
10
|
(function (UserTiming) {
|