molstar 3.8.2 → 3.9.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/build/viewer/index.html +4 -1
- package/build/viewer/molstar.js +1 -1
- package/lib/apps/viewer/app.d.ts +1 -1
- package/lib/apps/viewer/app.js +1 -1
- package/lib/apps/viewer/index.html +4 -1
- package/lib/cli/cif2bcif/converter.js +1 -1
- package/lib/commonjs/apps/viewer/app.d.ts +1 -1
- package/lib/commonjs/apps/viewer/app.js +2 -1
- 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/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/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/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.js +106 -106
- 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/context.d.ts +2 -2
- 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/sequence/polymer.js +1 -1
- package/lib/commonjs/mol-plugin-ui/sequence/sequence.js +1 -1
- package/lib/commonjs/mol-plugin-ui/structure/focus.js +1 -1
- package/lib/commonjs/mol-plugin-ui/viewport.d.ts +2 -2
- 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 -12
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-line.js +12 -12
- 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-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 +11 -0
- package/lib/examples/alpha-orbitals/index.js +4 -1
- package/lib/examples/basic-wrapper/custom-theme.js +1 -1
- package/lib/examples/proteopedia-wrapper/coloring.js +3 -3
- 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/model-archive/quality-assessment/color/plddt.js +1 -1
- package/lib/extensions/model-archive/quality-assessment/color/qmean.js +1 -1
- 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/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.js +106 -106
- 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/context.d.ts +2 -2
- 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/sequence/polymer.js +1 -1
- package/lib/mol-plugin-ui/sequence/sequence.js +1 -1
- package/lib/mol-plugin-ui/structure/focus.js +1 -1
- package/lib/mol-plugin-ui/viewport.d.ts +2 -2
- 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 -12
- package/lib/mol-repr/structure/visual/bond-intra-unit-line.js +12 -12
- 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-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 +8 -8
|
@@ -58,47 +58,47 @@ function createCarbohydrateSymbolMesh(ctx, structure, theme, props, mesh) {
|
|
|
58
58
|
Mat4.setTranslation(t, center);
|
|
59
59
|
builderState.currentGroup = i * 2;
|
|
60
60
|
switch (shapeType) {
|
|
61
|
-
case 0 /* FilledSphere */:
|
|
61
|
+
case 0 /* SaccharideShape.FilledSphere */:
|
|
62
62
|
addSphere(builderState, center, radius, detail);
|
|
63
63
|
break;
|
|
64
|
-
case 1 /* FilledCube */:
|
|
64
|
+
case 1 /* SaccharideShape.FilledCube */:
|
|
65
65
|
Mat4.scaleUniformly(t, t, side);
|
|
66
66
|
MeshBuilder.addPrimitive(builderState, t, box);
|
|
67
67
|
break;
|
|
68
|
-
case 2 /* CrossedCube */:
|
|
68
|
+
case 2 /* SaccharideShape.CrossedCube */:
|
|
69
69
|
Mat4.scaleUniformly(t, t, side);
|
|
70
70
|
MeshBuilder.addPrimitive(builderState, t, perforatedBox);
|
|
71
71
|
Mat4.mul(t, t, Mat4.rotZ90X180);
|
|
72
72
|
builderState.currentGroup += 1;
|
|
73
73
|
MeshBuilder.addPrimitive(builderState, t, perforatedBox);
|
|
74
74
|
break;
|
|
75
|
-
case 4 /* FilledCone */:
|
|
75
|
+
case 4 /* SaccharideShape.FilledCone */:
|
|
76
76
|
Mat4.scaleUniformly(t, t, side * 1.2);
|
|
77
77
|
MeshBuilder.addPrimitive(builderState, t, octagonalPyramid);
|
|
78
78
|
break;
|
|
79
|
-
case 5 /* DevidedCone */:
|
|
79
|
+
case 5 /* SaccharideShape.DevidedCone */:
|
|
80
80
|
Mat4.scaleUniformly(t, t, side * 1.2);
|
|
81
81
|
MeshBuilder.addPrimitive(builderState, t, perforatedOctagonalPyramid);
|
|
82
82
|
Mat4.mul(t, t, Mat4.rotZ90);
|
|
83
83
|
builderState.currentGroup += 1;
|
|
84
84
|
MeshBuilder.addPrimitive(builderState, t, perforatedOctagonalPyramid);
|
|
85
85
|
break;
|
|
86
|
-
case 6 /* FlatBox */:
|
|
86
|
+
case 6 /* SaccharideShape.FlatBox */:
|
|
87
87
|
Mat4.mul(t, t, Mat4.rotZY90);
|
|
88
88
|
Mat4.scale(t, t, Vec3.set(sVec, side, side, side / 2));
|
|
89
89
|
MeshBuilder.addPrimitive(builderState, t, box);
|
|
90
90
|
break;
|
|
91
|
-
case 7 /* FilledStar */:
|
|
91
|
+
case 7 /* SaccharideShape.FilledStar */:
|
|
92
92
|
Mat4.scaleUniformly(t, t, side);
|
|
93
93
|
Mat4.mul(t, t, Mat4.rotZY90);
|
|
94
94
|
MeshBuilder.addPrimitive(builderState, t, star);
|
|
95
95
|
break;
|
|
96
|
-
case 8 /* FilledDiamond */:
|
|
96
|
+
case 8 /* SaccharideShape.FilledDiamond */:
|
|
97
97
|
Mat4.mul(t, t, Mat4.rotZY90);
|
|
98
98
|
Mat4.scale(t, t, Vec3.set(sVec, side * 1.4, side * 1.4, side * 1.4));
|
|
99
99
|
MeshBuilder.addPrimitive(builderState, t, octahedron);
|
|
100
100
|
break;
|
|
101
|
-
case 3 /* DividedDiamond */:
|
|
101
|
+
case 3 /* SaccharideShape.DividedDiamond */:
|
|
102
102
|
Mat4.mul(t, t, Mat4.rotZY90);
|
|
103
103
|
Mat4.scale(t, t, Vec3.set(sVec, side * 1.4, side * 1.4, side * 1.4));
|
|
104
104
|
MeshBuilder.addPrimitive(builderState, t, perforatedOctahedron);
|
|
@@ -106,33 +106,33 @@ function createCarbohydrateSymbolMesh(ctx, structure, theme, props, mesh) {
|
|
|
106
106
|
builderState.currentGroup += 1;
|
|
107
107
|
MeshBuilder.addPrimitive(builderState, t, perforatedOctahedron);
|
|
108
108
|
break;
|
|
109
|
-
case 9 /* FlatDiamond */:
|
|
109
|
+
case 9 /* SaccharideShape.FlatDiamond */:
|
|
110
110
|
Mat4.mul(t, t, Mat4.rotZY90);
|
|
111
111
|
Mat4.scale(t, t, Vec3.set(sVec, side, side / 2, side / 2));
|
|
112
112
|
MeshBuilder.addPrimitive(builderState, t, diamondPrism);
|
|
113
113
|
break;
|
|
114
|
-
case 12 /* DiamondPrism */:
|
|
114
|
+
case 12 /* SaccharideShape.DiamondPrism */:
|
|
115
115
|
Mat4.mul(t, t, Mat4.rotZY90);
|
|
116
116
|
Mat4.scale(t, t, Vec3.set(sVec, side, side, side / 2));
|
|
117
117
|
MeshBuilder.addPrimitive(builderState, t, diamondPrism);
|
|
118
118
|
break;
|
|
119
|
-
case 13 /* PentagonalPrism */:
|
|
120
|
-
case 11 /* Pentagon */:
|
|
119
|
+
case 13 /* SaccharideShape.PentagonalPrism */:
|
|
120
|
+
case 11 /* SaccharideShape.Pentagon */:
|
|
121
121
|
Mat4.mul(t, t, Mat4.rotZY90);
|
|
122
122
|
Mat4.scale(t, t, Vec3.set(sVec, side, side, side / 2));
|
|
123
123
|
MeshBuilder.addPrimitive(builderState, t, pentagonalPrism);
|
|
124
124
|
break;
|
|
125
|
-
case 14 /* HexagonalPrism */:
|
|
125
|
+
case 14 /* SaccharideShape.HexagonalPrism */:
|
|
126
126
|
Mat4.mul(t, t, Mat4.rotZY90);
|
|
127
127
|
Mat4.scale(t, t, Vec3.set(sVec, side, side, side / 2));
|
|
128
128
|
MeshBuilder.addPrimitive(builderState, t, hexagonalPrism);
|
|
129
129
|
break;
|
|
130
|
-
case 15 /* HeptagonalPrism */:
|
|
130
|
+
case 15 /* SaccharideShape.HeptagonalPrism */:
|
|
131
131
|
Mat4.mul(t, t, Mat4.rotZY90);
|
|
132
132
|
Mat4.scale(t, t, Vec3.set(sVec, side, side, side / 2));
|
|
133
133
|
MeshBuilder.addPrimitive(builderState, t, heptagonalPrism);
|
|
134
134
|
break;
|
|
135
|
-
case 10 /* FlatHexagon */:
|
|
135
|
+
case 10 /* SaccharideShape.FlatHexagon */:
|
|
136
136
|
default:
|
|
137
137
|
Mat4.mul(t, t, Mat4.rotZYZ90);
|
|
138
138
|
Mat4.scale(t, t, Vec3.set(sVec, side / 1.5, side, side / 2));
|
|
@@ -51,7 +51,7 @@ function createCarbohydrateTerminalLinkCylinderMesh(ctx, structure, theme, props
|
|
|
51
51
|
var l = terminalLinks[edgeIndex];
|
|
52
52
|
var eI = l.elementUnit.elements[l.elementIndex];
|
|
53
53
|
var beI = getElementIdx(l.elementUnit.model.atomicHierarchy.atoms.type_symbol.value(eI));
|
|
54
|
-
return MetalsSet.has(beI) ? 1 /* Dashed */ : 0 /* Solid */;
|
|
54
|
+
return MetalsSet.has(beI) ? 1 /* LinkStyle.Dashed */ : 0 /* LinkStyle.Solid */;
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
var _b = createLinkCylinderMesh(ctx, builderProps, props, mesh), m = _b.mesh, boundingSphere = _b.boundingSphere;
|
|
@@ -19,6 +19,7 @@ import { applyMeshColorSmoothing } from '../../../mol-geo/geometry/mesh/color-sm
|
|
|
19
19
|
import { applyTextureMeshColorSmoothing } from '../../../mol-geo/geometry/texture-mesh/color-smoothing';
|
|
20
20
|
import { ColorSmoothingParams, getColorSmoothingProps } from '../../../mol-geo/geometry/base';
|
|
21
21
|
import { Vec3 } from '../../../mol-math/linear-algebra';
|
|
22
|
+
import { isTimingMode } from '../../../mol-util/debug';
|
|
22
23
|
var SharedParams = __assign(__assign(__assign({}, GaussianDensityParams), ColorSmoothingParams), { ignoreHydrogens: PD.Boolean(false), tryUseGpu: PD.Boolean(true), includeParent: PD.Boolean(false, { isHidden: true }) });
|
|
23
24
|
export var GaussianSurfaceMeshParams = __assign(__assign(__assign({}, UnitsMeshParams), UnitsTextureMeshParams), SharedParams);
|
|
24
25
|
export var StructureGaussianSurfaceMeshParams = __assign(__assign(__assign({}, ComplexMeshParams), ComplexTextureMeshParams), SharedParams);
|
|
@@ -210,6 +211,8 @@ function createGaussianSurfaceTextureMesh(ctx, unit, structure, theme, props, te
|
|
|
210
211
|
case 0:
|
|
211
212
|
if (!ctx.webgl)
|
|
212
213
|
throw new Error('webgl context required to create gaussian surface texture-mesh');
|
|
214
|
+
if (isTimingMode)
|
|
215
|
+
ctx.webgl.timer.mark('createGaussianSurfaceTextureMesh');
|
|
213
216
|
_a = ctx.webgl, namedTextures = _a.namedTextures, resources = _a.resources, _b = _a.extensions, colorBufferFloat = _b.colorBufferFloat, textureFloat = _b.textureFloat, colorBufferHalfFloat = _b.colorBufferHalfFloat, textureHalfFloat = _b.textureHalfFloat;
|
|
214
217
|
if (!namedTextures[GaussianSurfaceName]) {
|
|
215
218
|
namedTextures[GaussianSurfaceName] = colorBufferHalfFloat && textureHalfFloat
|
|
@@ -225,6 +228,8 @@ function createGaussianSurfaceTextureMesh(ctx, unit, structure, theme, props, te
|
|
|
225
228
|
axisOrder = Vec3.create(0, 1, 2);
|
|
226
229
|
buffer = textureMesh === null || textureMesh === void 0 ? void 0 : textureMesh.doubleBuffer.get();
|
|
227
230
|
gv = extractIsosurface(ctx.webgl, densityTextureData.texture, densityTextureData.gridDim, densityTextureData.gridTexDim, densityTextureData.gridTexScale, densityTextureData.transform, isoLevel, false, true, axisOrder, buffer === null || buffer === void 0 ? void 0 : buffer.vertex, buffer === null || buffer === void 0 ? void 0 : buffer.group, buffer === null || buffer === void 0 ? void 0 : buffer.normal);
|
|
231
|
+
if (isTimingMode)
|
|
232
|
+
ctx.webgl.timer.markEnd('createGaussianSurfaceTextureMesh');
|
|
228
233
|
boundingSphere = Sphere3D.expand(Sphere3D(), unit.boundary.sphere, densityTextureData.maxRadius);
|
|
229
234
|
surface = TextureMesh.create(gv.vertexCount, 1, gv.vertexTexture, gv.groupTexture, gv.normalTexture, boundingSphere, textureMesh);
|
|
230
235
|
surface.meta.resolution = densityTextureData.resolution;
|
|
@@ -293,6 +298,8 @@ function createStructureGaussianSurfaceTextureMesh(ctx, structure, theme, props,
|
|
|
293
298
|
case 0:
|
|
294
299
|
if (!ctx.webgl)
|
|
295
300
|
throw new Error('webgl context required to create structure gaussian surface texture-mesh');
|
|
301
|
+
if (isTimingMode)
|
|
302
|
+
ctx.webgl.timer.mark('createStructureGaussianSurfaceTextureMesh');
|
|
296
303
|
_a = ctx.webgl, namedTextures = _a.namedTextures, resources = _a.resources, _b = _a.extensions, colorBufferFloat = _b.colorBufferFloat, textureFloat = _b.textureFloat, colorBufferHalfFloat = _b.colorBufferHalfFloat, textureHalfFloat = _b.textureHalfFloat;
|
|
297
304
|
if (!namedTextures[GaussianSurfaceName]) {
|
|
298
305
|
namedTextures[GaussianSurfaceName] = colorBufferHalfFloat && textureHalfFloat
|
|
@@ -308,6 +315,8 @@ function createStructureGaussianSurfaceTextureMesh(ctx, structure, theme, props,
|
|
|
308
315
|
axisOrder = Vec3.create(0, 1, 2);
|
|
309
316
|
buffer = textureMesh === null || textureMesh === void 0 ? void 0 : textureMesh.doubleBuffer.get();
|
|
310
317
|
gv = extractIsosurface(ctx.webgl, densityTextureData.texture, densityTextureData.gridDim, densityTextureData.gridTexDim, densityTextureData.gridTexScale, densityTextureData.transform, isoLevel, false, true, axisOrder, buffer === null || buffer === void 0 ? void 0 : buffer.vertex, buffer === null || buffer === void 0 ? void 0 : buffer.group, buffer === null || buffer === void 0 ? void 0 : buffer.normal);
|
|
318
|
+
if (isTimingMode)
|
|
319
|
+
ctx.webgl.timer.markEnd('createStructureGaussianSurfaceTextureMesh');
|
|
311
320
|
boundingSphere = Sphere3D.expand(Sphere3D(), structure.boundary.sphere, densityTextureData.maxRadius);
|
|
312
321
|
surface = TextureMesh.create(gv.vertexCount, 1, gv.vertexTexture, gv.groupTexture, gv.normalTexture, boundingSphere, textureMesh);
|
|
313
322
|
surface.meta.resolution = densityTextureData.resolution;
|
|
@@ -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;
|