molstar 3.0.0-dev.9 → 3.1.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/README.md +7 -0
- package/build/viewer/index.html +2 -2
- package/build/viewer/molstar.js +1 -1
- package/lib/apps/docking-viewer/viewport.d.ts +2 -0
- package/lib/apps/viewer/app.d.ts +2 -1
- package/lib/apps/viewer/app.js +21 -8
- package/lib/apps/viewer/index.html +2 -2
- package/lib/commonjs/apps/docking-viewer/viewport.d.ts +2 -0
- package/lib/commonjs/apps/viewer/app.d.ts +2 -1
- package/lib/commonjs/apps/viewer/app.js +23 -10
- package/lib/commonjs/examples/basic-wrapper/index.js +7 -3
- package/lib/commonjs/examples/proteopedia-wrapper/index.js +7 -1
- package/lib/commonjs/extensions/anvil/behavior.d.ts +1 -0
- package/lib/commonjs/extensions/anvil/representation.js +1 -1
- package/lib/commonjs/extensions/dnatco/confal-pyramids/behavior.d.ts +1 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/behavior.d.ts +2 -0
- package/lib/commonjs/extensions/model-export/export.d.ts +9 -0
- package/lib/commonjs/extensions/model-export/export.js +129 -0
- package/lib/commonjs/extensions/model-export/index.d.ts +7 -0
- package/lib/commonjs/extensions/model-export/index.js +36 -0
- package/lib/commonjs/extensions/model-export/ui.d.ts +11 -0
- package/lib/commonjs/extensions/model-export/ui.js +77 -0
- package/lib/commonjs/extensions/mp4-export/encoder.js +1 -1
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/behavior.d.ts +4 -2
- package/lib/commonjs/extensions/rcsb/graphql/types.d.ts +13 -13
- package/lib/commonjs/extensions/rcsb/validation-report/behavior.d.ts +3 -0
- package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +12 -4
- package/lib/commonjs/mol-canvas3d/canvas3d.js +1 -1
- package/lib/commonjs/mol-canvas3d/controls/trackball.d.ts +9 -4
- package/lib/commonjs/mol-canvas3d/controls/trackball.js +50 -11
- package/lib/commonjs/mol-canvas3d/helper/interaction-events.js +1 -1
- package/lib/commonjs/mol-canvas3d/passes/draw.d.ts +1 -1
- package/lib/commonjs/mol-canvas3d/passes/draw.js +3 -3
- package/lib/commonjs/mol-gl/renderer.d.ts +2 -2
- package/lib/commonjs/mol-gl/renderer.js +3 -3
- package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.js +2 -2
- package/lib/commonjs/mol-gl/shader/cylinders.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/cylinders.frag.js +2 -2
- package/lib/commonjs/mol-gl/shader/direct-volume.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/direct-volume.frag.js +2 -2
- package/lib/commonjs/mol-gl/shader/mesh.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/mesh.frag.js +2 -2
- package/lib/commonjs/mol-gl/shader/spheres.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/spheres.frag.js +2 -2
- package/lib/commonjs/mol-io/reader/cif/schema/bird.d.ts +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/bird.js +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/ccd.d.ts +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/ccd.js +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif.d.ts +2 -2
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif.js +1 -1
- package/lib/commonjs/mol-io/reader/mol/parser.d.ts +23 -1
- package/lib/commonjs/mol-io/reader/mol/parser.js +116 -4
- package/lib/commonjs/mol-io/reader/sdf/parser-v3-util.d.ts +6 -0
- package/lib/commonjs/mol-io/reader/sdf/parser-v3-util.js +9 -0
- package/lib/commonjs/mol-io/reader/sdf/parser.d.ts +3 -1
- package/lib/commonjs/mol-io/reader/sdf/parser.js +11 -2
- package/lib/commonjs/mol-io/writer/cif/encoder/binary.js +9 -2
- package/lib/commonjs/mol-math/geometry/primitives/sphere3d.d.ts +1 -1
- package/lib/commonjs/mol-math/geometry/primitives/sphere3d.js +17 -4
- package/lib/commonjs/mol-math/geometry/symmetry-operator.d.ts +1 -1
- package/lib/commonjs/mol-math/geometry/symmetry-operator.js +10 -4
- package/lib/commonjs/mol-model/structure/export/categories/secondary-structure.js +8 -8
- package/lib/commonjs/mol-model/structure/export/mmcif.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/export/mmcif.js +8 -5
- package/lib/commonjs/mol-model/structure/model/properties/coarse/hierarchy.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/model/properties/coarse/hierarchy.js +24 -2
- package/lib/commonjs/mol-model/structure/model/properties/common.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/structure/element/loci.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/structure/element/loci.js +4 -2
- package/lib/commonjs/mol-model/structure/structure/properties.d.ts +1 -0
- package/lib/commonjs/mol-model/structure/structure/properties.js +2 -1
- package/lib/commonjs/mol-model/structure/structure/symmetry.js +1 -3
- package/lib/commonjs/mol-model/structure/structure/util/superposition-db-mapping.js +10 -5
- package/lib/commonjs/mol-model/volume/volume.d.ts +7 -0
- package/lib/commonjs/mol-model/volume/volume.js +18 -0
- package/lib/commonjs/mol-model-formats/structure/basic/atomic.d.ts +2 -2
- package/lib/commonjs/mol-model-formats/structure/basic/atomic.js +6 -6
- package/lib/commonjs/mol-model-formats/structure/basic/coarse.d.ts +1 -1
- package/lib/commonjs/mol-model-formats/structure/basic/coarse.js +3 -3
- package/lib/commonjs/mol-model-formats/structure/basic/entities.d.ts +2 -1
- package/lib/commonjs/mol-model-formats/structure/basic/entities.js +28 -24
- package/lib/commonjs/mol-model-formats/structure/basic/parser.js +17 -8
- package/lib/commonjs/mol-model-formats/structure/basic/properties.d.ts +6 -1
- package/lib/commonjs/mol-model-formats/structure/basic/properties.js +12 -22
- package/lib/commonjs/mol-model-formats/structure/mol.d.ts +2 -1
- package/lib/commonjs/mol-model-formats/structure/mol.js +19 -5
- package/lib/commonjs/mol-model-props/common/custom-property.d.ts +1 -1
- package/lib/commonjs/mol-model-props/computed/interactions/common.d.ts +1 -1
- package/lib/commonjs/mol-model-props/computed/interactions/common.js +16 -24
- package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +1 -1
- package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.js +44 -18
- package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +1 -1
- package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.js +38 -13
- package/lib/commonjs/mol-model-props/sequence/best-database-mapping.js +15 -15
- package/lib/commonjs/mol-plugin/animation-loop.d.ts +2 -0
- package/lib/commonjs/mol-plugin/animation-loop.js +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/representation.d.ts +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/representation.js +11 -6
- package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +2 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +16 -7
- package/lib/commonjs/mol-plugin/behavior/static/representation.js +1 -1
- package/lib/commonjs/mol-plugin/commands.d.ts +6 -2
- package/lib/commonjs/mol-plugin/spec.d.ts +1 -1
- package/lib/commonjs/mol-plugin/spec.js +3 -1
- package/lib/commonjs/mol-plugin-state/actions/file.d.ts +3 -2
- package/lib/commonjs/mol-plugin-state/actions/file.js +67 -31
- package/lib/commonjs/mol-plugin-state/actions/volume.d.ts +1 -1
- package/lib/commonjs/mol-plugin-state/actions/volume.js +3 -3
- package/lib/commonjs/mol-plugin-state/animation/built-in/camera-rock.d.ts +16 -0
- package/lib/commonjs/mol-plugin-state/animation/built-in/camera-rock.js +62 -0
- package/lib/commonjs/mol-plugin-state/animation/built-in/camera-spin.d.ts +1 -1
- package/lib/commonjs/mol-plugin-state/animation/built-in/camera-spin.js +9 -8
- package/lib/commonjs/mol-plugin-state/animation/model.d.ts +4 -0
- package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +8 -6
- package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy.d.ts +2 -1
- package/lib/commonjs/mol-plugin-state/builder/structure/representation-preset.d.ts +180 -6
- package/lib/commonjs/mol-plugin-state/builder/structure/representation-preset.js +48 -2
- package/lib/commonjs/mol-plugin-state/builder/structure/representation.d.ts +2 -1
- package/lib/commonjs/mol-plugin-state/formats/volume.js +1 -11
- package/lib/commonjs/mol-plugin-state/manager/animation.d.ts +5 -1
- package/lib/commonjs/mol-plugin-state/manager/animation.js +5 -5
- package/lib/commonjs/mol-plugin-state/manager/structure/component.d.ts +2 -1
- package/lib/commonjs/mol-plugin-state/manager/structure/component.js +11 -8
- package/lib/commonjs/mol-plugin-ui/controls/icons.d.ts +2 -1
- package/lib/commonjs/mol-plugin-ui/controls/icons.js +8 -5
- package/lib/commonjs/mol-plugin-ui/controls.d.ts +1 -1
- package/lib/commonjs/mol-plugin-ui/controls.js +2 -1
- package/lib/commonjs/mol-plugin-ui/structure/quick-styles.d.ts +25 -0
- package/lib/commonjs/mol-plugin-ui/structure/quick-styles.js +131 -0
- package/lib/commonjs/mol-plugin-ui/structure/superposition.js +2 -2
- package/lib/commonjs/mol-plugin-ui/structure/volume.js +4 -4
- package/lib/commonjs/mol-plugin-ui/viewport/simple-settings.d.ts +1 -1
- package/lib/commonjs/mol-plugin-ui/viewport/simple-settings.js +4 -8
- package/lib/commonjs/mol-repr/shape/loci/common.d.ts +1 -1
- package/lib/commonjs/mol-repr/shape/loci/common.js +3 -3
- package/lib/commonjs/mol-repr/structure/registry.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/representation/cartoon.d.ts +4 -4
- package/lib/commonjs/mol-repr/structure/representation/cartoon.js +3 -3
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.js +8 -4
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.js +10 -6
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.js +8 -4
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.js +2 -2
- package/lib/commonjs/mol-repr/structure/visual/util/bond.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/util/bond.js +5 -4
- package/lib/commonjs/mol-repr/visual.d.ts +1 -1
- package/lib/commonjs/mol-repr/visual.js +2 -1
- package/lib/commonjs/mol-state/transform.js +12 -2
- package/lib/commonjs/mol-state/tree/immutable.d.ts +18 -0
- package/lib/commonjs/mol-state/tree/transient.d.ts +3 -4
- package/lib/commonjs/mol-theme/color/element-symbol.d.ts +289 -3
- package/lib/commonjs/mol-theme/color/element-symbol.js +25 -15
- package/lib/commonjs/mol-theme/color/entity-id.d.ts +1 -1
- package/lib/commonjs/mol-theme/color/entity-id.js +29 -5
- package/lib/commonjs/mol-theme/color/illustrative.d.ts +100 -29
- package/lib/commonjs/mol-theme/color/illustrative.js +26 -7
- package/lib/commonjs/mol-theme/color/molecule-type.d.ts +19 -1
- package/lib/commonjs/mol-theme/color/molecule-type.js +10 -5
- package/lib/commonjs/mol-theme/color/residue-name.d.ts +77 -1
- package/lib/commonjs/mol-theme/color/residue-name.js +10 -5
- package/lib/commonjs/mol-theme/color/secondary-structure.d.ts +27 -1
- package/lib/commonjs/mol-theme/color/secondary-structure.js +10 -5
- package/lib/commonjs/mol-theme/color.d.ts +253 -15
- package/lib/commonjs/mol-util/color/color.d.ts +1 -1
- package/lib/commonjs/mol-util/color/color.js +1 -1
- package/lib/commonjs/mol-util/color/params.d.ts +10 -0
- package/lib/commonjs/mol-util/color/params.js +19 -0
- package/lib/commonjs/servers/volume/config.js +3 -3
- package/lib/commonjs/servers/volume/query.js +1 -1
- package/lib/examples/basic-wrapper/index.js +7 -3
- package/lib/examples/proteopedia-wrapper/index.js +7 -1
- package/lib/extensions/anvil/behavior.d.ts +1 -0
- package/lib/extensions/anvil/representation.js +1 -1
- package/lib/extensions/dnatco/confal-pyramids/behavior.d.ts +1 -0
- package/lib/extensions/model-archive/quality-assessment/behavior.d.ts +2 -0
- package/lib/extensions/model-export/export.d.ts +9 -0
- package/lib/extensions/model-export/export.js +125 -0
- package/lib/extensions/model-export/index.d.ts +7 -0
- package/lib/extensions/model-export/index.js +33 -0
- package/lib/extensions/model-export/ui.d.ts +11 -0
- package/lib/extensions/model-export/ui.js +74 -0
- package/lib/extensions/mp4-export/encoder.js +1 -1
- package/lib/extensions/rcsb/assembly-symmetry/behavior.d.ts +4 -2
- package/lib/extensions/rcsb/graphql/types.d.ts +13 -13
- package/lib/extensions/rcsb/validation-report/behavior.d.ts +3 -0
- package/lib/mol-canvas3d/canvas3d.d.ts +12 -4
- package/lib/mol-canvas3d/canvas3d.js +1 -1
- package/lib/mol-canvas3d/controls/trackball.d.ts +9 -4
- package/lib/mol-canvas3d/controls/trackball.js +51 -12
- package/lib/mol-canvas3d/helper/interaction-events.js +1 -1
- package/lib/mol-canvas3d/passes/draw.d.ts +1 -1
- package/lib/mol-canvas3d/passes/draw.js +3 -3
- package/lib/mol-gl/renderer.d.ts +2 -2
- package/lib/mol-gl/renderer.js +3 -3
- package/lib/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +2 -2
- package/lib/mol-gl/shader/chunks/apply-light-color.glsl.js +2 -2
- package/lib/mol-gl/shader/cylinders.frag.d.ts +2 -2
- package/lib/mol-gl/shader/cylinders.frag.js +2 -2
- package/lib/mol-gl/shader/direct-volume.frag.d.ts +2 -2
- package/lib/mol-gl/shader/direct-volume.frag.js +2 -2
- package/lib/mol-gl/shader/mesh.frag.d.ts +2 -2
- package/lib/mol-gl/shader/mesh.frag.js +2 -2
- package/lib/mol-gl/shader/spheres.frag.d.ts +2 -2
- package/lib/mol-gl/shader/spheres.frag.js +2 -2
- package/lib/mol-io/reader/cif/schema/bird.d.ts +1 -1
- package/lib/mol-io/reader/cif/schema/bird.js +1 -1
- package/lib/mol-io/reader/cif/schema/ccd.d.ts +1 -1
- package/lib/mol-io/reader/cif/schema/ccd.js +1 -1
- package/lib/mol-io/reader/cif/schema/mmcif.d.ts +2 -2
- package/lib/mol-io/reader/cif/schema/mmcif.js +1 -1
- package/lib/mol-io/reader/mol/parser.d.ts +23 -1
- package/lib/mol-io/reader/mol/parser.js +112 -3
- package/lib/mol-io/reader/sdf/parser-v3-util.d.ts +6 -0
- package/lib/mol-io/reader/sdf/parser-v3-util.js +9 -0
- package/lib/mol-io/reader/sdf/parser.d.ts +3 -1
- package/lib/mol-io/reader/sdf/parser.js +12 -3
- package/lib/mol-io/writer/cif/encoder/binary.js +9 -2
- package/lib/mol-math/geometry/primitives/sphere3d.d.ts +1 -1
- package/lib/mol-math/geometry/primitives/sphere3d.js +17 -4
- package/lib/mol-math/geometry/symmetry-operator.d.ts +1 -1
- package/lib/mol-math/geometry/symmetry-operator.js +10 -4
- package/lib/mol-model/structure/export/categories/secondary-structure.js +8 -8
- package/lib/mol-model/structure/export/mmcif.d.ts +1 -1
- package/lib/mol-model/structure/export/mmcif.js +8 -5
- package/lib/mol-model/structure/model/properties/coarse/hierarchy.d.ts +1 -1
- package/lib/mol-model/structure/model/properties/coarse/hierarchy.js +24 -2
- package/lib/mol-model/structure/model/properties/common.d.ts +1 -1
- package/lib/mol-model/structure/structure/element/loci.d.ts +1 -1
- package/lib/mol-model/structure/structure/element/loci.js +4 -2
- package/lib/mol-model/structure/structure/properties.d.ts +1 -0
- package/lib/mol-model/structure/structure/properties.js +2 -1
- package/lib/mol-model/structure/structure/symmetry.js +1 -3
- package/lib/mol-model/structure/structure/util/superposition-db-mapping.js +10 -5
- package/lib/mol-model/volume/volume.d.ts +7 -0
- package/lib/mol-model/volume/volume.js +18 -0
- package/lib/mol-model-formats/structure/basic/atomic.d.ts +2 -2
- package/lib/mol-model-formats/structure/basic/atomic.js +6 -6
- package/lib/mol-model-formats/structure/basic/coarse.d.ts +1 -1
- package/lib/mol-model-formats/structure/basic/coarse.js +3 -3
- package/lib/mol-model-formats/structure/basic/entities.d.ts +2 -1
- package/lib/mol-model-formats/structure/basic/entities.js +25 -22
- package/lib/mol-model-formats/structure/basic/parser.js +19 -10
- package/lib/mol-model-formats/structure/basic/properties.d.ts +6 -1
- package/lib/mol-model-formats/structure/basic/properties.js +12 -25
- package/lib/mol-model-formats/structure/mol.d.ts +2 -1
- package/lib/mol-model-formats/structure/mol.js +17 -3
- package/lib/mol-model-props/common/custom-property.d.ts +1 -1
- package/lib/mol-model-props/computed/interactions/common.d.ts +1 -1
- package/lib/mol-model-props/computed/interactions/common.js +16 -24
- package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +1 -1
- package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.js +44 -18
- package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +1 -1
- package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.js +38 -13
- package/lib/mol-model-props/sequence/best-database-mapping.js +15 -15
- package/lib/mol-plugin/animation-loop.d.ts +2 -0
- package/lib/mol-plugin/animation-loop.js +1 -1
- package/lib/mol-plugin/behavior/dynamic/representation.d.ts +1 -1
- package/lib/mol-plugin/behavior/dynamic/representation.js +11 -6
- package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +2 -1
- package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +16 -7
- package/lib/mol-plugin/behavior/static/representation.js +1 -1
- package/lib/mol-plugin/commands.d.ts +6 -2
- package/lib/mol-plugin/spec.d.ts +1 -1
- package/lib/mol-plugin/spec.js +3 -1
- package/lib/mol-plugin/version.js +2 -2
- package/lib/mol-plugin-state/actions/file.d.ts +3 -2
- package/lib/mol-plugin-state/actions/file.js +67 -31
- package/lib/mol-plugin-state/actions/volume.d.ts +1 -1
- package/lib/mol-plugin-state/actions/volume.js +3 -3
- package/lib/mol-plugin-state/animation/built-in/camera-rock.d.ts +16 -0
- package/lib/mol-plugin-state/animation/built-in/camera-rock.js +59 -0
- package/lib/mol-plugin-state/animation/built-in/camera-spin.d.ts +1 -1
- package/lib/mol-plugin-state/animation/built-in/camera-spin.js +9 -8
- package/lib/mol-plugin-state/animation/model.d.ts +4 -0
- package/lib/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +8 -6
- package/lib/mol-plugin-state/builder/structure/hierarchy.d.ts +2 -1
- package/lib/mol-plugin-state/builder/structure/representation-preset.d.ts +180 -6
- package/lib/mol-plugin-state/builder/structure/representation-preset.js +48 -2
- package/lib/mol-plugin-state/builder/structure/representation.d.ts +2 -1
- package/lib/mol-plugin-state/formats/volume.js +1 -11
- package/lib/mol-plugin-state/manager/animation.d.ts +5 -1
- package/lib/mol-plugin-state/manager/animation.js +5 -5
- package/lib/mol-plugin-state/manager/structure/component.d.ts +2 -1
- package/lib/mol-plugin-state/manager/structure/component.js +11 -8
- package/lib/mol-plugin-ui/controls/icons.d.ts +2 -1
- package/lib/mol-plugin-ui/controls/icons.js +5 -3
- package/lib/mol-plugin-ui/controls.d.ts +1 -1
- package/lib/mol-plugin-ui/controls.js +2 -1
- package/lib/mol-plugin-ui/structure/quick-styles.d.ts +25 -0
- package/lib/mol-plugin-ui/structure/quick-styles.js +128 -0
- package/lib/mol-plugin-ui/structure/superposition.js +2 -2
- package/lib/mol-plugin-ui/structure/volume.js +4 -4
- package/lib/mol-plugin-ui/viewport/simple-settings.d.ts +1 -1
- package/lib/mol-plugin-ui/viewport/simple-settings.js +4 -8
- package/lib/mol-repr/shape/loci/common.d.ts +1 -1
- package/lib/mol-repr/shape/loci/common.js +3 -3
- package/lib/mol-repr/structure/registry.d.ts +1 -1
- package/lib/mol-repr/structure/representation/cartoon.d.ts +4 -4
- package/lib/mol-repr/structure/representation/cartoon.js +3 -3
- package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +1 -1
- package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.js +8 -4
- package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +1 -1
- package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.js +10 -6
- package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +1 -1
- package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.js +8 -4
- package/lib/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -1
- package/lib/mol-repr/structure/visual/molecular-surface-mesh.js +2 -2
- package/lib/mol-repr/structure/visual/util/bond.d.ts +1 -1
- package/lib/mol-repr/structure/visual/util/bond.js +5 -4
- package/lib/mol-repr/visual.d.ts +1 -1
- package/lib/mol-repr/visual.js +2 -1
- package/lib/mol-state/transform.js +12 -2
- package/lib/mol-state/tree/immutable.d.ts +18 -0
- package/lib/mol-state/tree/transient.d.ts +3 -4
- package/lib/mol-theme/color/element-symbol.d.ts +289 -3
- package/lib/mol-theme/color/element-symbol.js +25 -15
- package/lib/mol-theme/color/entity-id.d.ts +1 -1
- package/lib/mol-theme/color/entity-id.js +29 -5
- package/lib/mol-theme/color/illustrative.d.ts +100 -29
- package/lib/mol-theme/color/illustrative.js +26 -7
- package/lib/mol-theme/color/molecule-type.d.ts +19 -1
- package/lib/mol-theme/color/molecule-type.js +10 -5
- package/lib/mol-theme/color/residue-name.d.ts +77 -1
- package/lib/mol-theme/color/residue-name.js +10 -5
- package/lib/mol-theme/color/secondary-structure.d.ts +27 -1
- package/lib/mol-theme/color/secondary-structure.js +10 -5
- package/lib/mol-theme/color.d.ts +253 -15
- package/lib/mol-util/color/color.d.ts +1 -1
- package/lib/mol-util/color/color.js +1 -1
- package/lib/mol-util/color/params.d.ts +10 -0
- package/lib/mol-util/color/params.js +15 -0
- package/lib/servers/volume/config.js +3 -3
- package/lib/servers/volume/query.js +1 -1
- package/package.json +38 -40
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.
|
|
9
|
+
exports.getStructAsymMap = exports.getSaccharideComponentMap = exports.getChemicalComponentMap = exports.getMissingResidues = void 0;
|
|
10
|
+
var db_1 = require("../../../mol-data/db");
|
|
10
11
|
var types_1 = require("../../../mol-model/structure/model/types");
|
|
11
12
|
var constants_1 = require("../../../mol-model/structure/structure/carbohydrates/constants");
|
|
12
13
|
var memoize_1 = require("../../../mol-util/memoize");
|
|
13
|
-
var db_1 = require("../../../mol-data/db");
|
|
14
14
|
function getMissingResidues(data) {
|
|
15
15
|
var map = new Map();
|
|
16
16
|
var getKey = function (model_num, asym_id, seq_id) {
|
|
@@ -31,6 +31,7 @@ function getMissingResidues(data) {
|
|
|
31
31
|
size: map.size
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
+
exports.getMissingResidues = getMissingResidues;
|
|
34
35
|
function getChemicalComponentMap(data) {
|
|
35
36
|
var map = new Map();
|
|
36
37
|
if (data.chem_comp._rowCount > 0) {
|
|
@@ -47,6 +48,7 @@ function getChemicalComponentMap(data) {
|
|
|
47
48
|
}
|
|
48
49
|
return map;
|
|
49
50
|
}
|
|
51
|
+
exports.getChemicalComponentMap = getChemicalComponentMap;
|
|
50
52
|
function getSaccharideComponentMap(data) {
|
|
51
53
|
var map = new Map();
|
|
52
54
|
if (data.pdbx_chem_comp_identifier._rowCount > 0) {
|
|
@@ -93,6 +95,7 @@ function getSaccharideComponentMap(data) {
|
|
|
93
95
|
}
|
|
94
96
|
return map;
|
|
95
97
|
}
|
|
98
|
+
exports.getSaccharideComponentMap = getSaccharideComponentMap;
|
|
96
99
|
var getUniqueComponentNames = (0, memoize_1.memoize1)(function (data) {
|
|
97
100
|
var uniqueNames = new Set();
|
|
98
101
|
var _a = data.atom_site, label_comp_id = _a.label_comp_id, auth_comp_id = _a.auth_comp_id;
|
|
@@ -102,20 +105,15 @@ var getUniqueComponentNames = (0, memoize_1.memoize1)(function (data) {
|
|
|
102
105
|
}
|
|
103
106
|
return uniqueNames;
|
|
104
107
|
});
|
|
105
|
-
function getStructAsymMap(data) {
|
|
108
|
+
function getStructAsymMap(atomic, data) {
|
|
106
109
|
var map = new Map();
|
|
107
|
-
var _a =
|
|
108
|
-
for (var i = 0,
|
|
110
|
+
var _a = atomic.chains, auth_asym_id = _a.auth_asym_id, label_asym_id = _a.label_asym_id, label_entity_id = _a.label_entity_id;
|
|
111
|
+
for (var i = 0, _i = atomic.chains._rowCount; i < _i; i++) {
|
|
109
112
|
var id = label_asym_id.value(i);
|
|
110
|
-
|
|
111
|
-
map.set(id, {
|
|
112
|
-
id: id,
|
|
113
|
-
auth_id: auth_asym_id.value(i),
|
|
114
|
-
entity_id: label_entity_id.value(i)
|
|
115
|
-
});
|
|
116
|
-
}
|
|
113
|
+
map.set(id, { id: id, auth_id: auth_asym_id.value(i), entity_id: label_entity_id.value(i) });
|
|
117
114
|
}
|
|
118
|
-
|
|
115
|
+
// to get asym mapping for coarse/ihm data
|
|
116
|
+
if (data === null || data === void 0 ? void 0 : data.struct_asym._rowCount) {
|
|
119
117
|
var _b = data.struct_asym, id = _b.id, entity_id = _b.entity_id;
|
|
120
118
|
for (var i = 0, il = id.rowCount; i < il; ++i) {
|
|
121
119
|
var _id = id.value(i);
|
|
@@ -130,13 +128,5 @@ function getStructAsymMap(data) {
|
|
|
130
128
|
}
|
|
131
129
|
return map;
|
|
132
130
|
}
|
|
133
|
-
|
|
134
|
-
return {
|
|
135
|
-
missingResidues: getMissingResidues(data),
|
|
136
|
-
chemicalComponentMap: getChemicalComponentMap(data),
|
|
137
|
-
saccharideComponentMap: getSaccharideComponentMap(data),
|
|
138
|
-
structAsymMap: getStructAsymMap(data)
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
exports.getProperties = getProperties;
|
|
131
|
+
exports.getStructAsymMap = getStructAsymMap;
|
|
142
132
|
//# sourceMappingURL=properties.js.map
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
6
|
+
* @author Panagiotis Tourlas <panagiot_tourlov@hotmail.com>
|
|
6
7
|
*/
|
|
7
8
|
import { MolFile } from '../../mol-io/reader/mol/parser';
|
|
8
9
|
import { RuntimeContext, Task } from '../../mol-task';
|
|
@@ -1,31 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2019-
|
|
3
|
+
* Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
6
6
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
7
|
+
* @author Panagiotis Tourlas <panagiot_tourlov@hotmail.com>
|
|
7
8
|
*/
|
|
8
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
10
|
exports.trajectoryFromMol = exports.MolFormat = exports.getMolModels = void 0;
|
|
10
11
|
var tslib_1 = require("tslib");
|
|
11
12
|
var db_1 = require("../../mol-data/db");
|
|
13
|
+
var parser_1 = require("../../mol-io/reader/mol/parser");
|
|
12
14
|
var mol_task_1 = require("../../mol-task");
|
|
13
|
-
var
|
|
15
|
+
var parser_2 = require("./basic/parser");
|
|
14
16
|
var schema_1 = require("./basic/schema");
|
|
15
17
|
var component_1 = require("./common/component");
|
|
16
18
|
var entity_1 = require("./common/entity");
|
|
17
19
|
var index_pair_1 = require("./property/bonds/index-pair");
|
|
18
20
|
function getMolModels(mol, format, ctx) {
|
|
19
21
|
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
|
|
20
|
-
var atoms, bonds, MOL, A, type_symbol, seq_id, atom_site, entityBuilder, componentBuilder, basics, models, indexA, indexB, order, pairBonds;
|
|
22
|
+
var atoms, bonds, formalCharges, MOL, A, type_symbol, seq_id, computedFormalCharges, i, i, atom_site, entityBuilder, componentBuilder, basics, models, indexA, indexB, order, pairBonds;
|
|
21
23
|
return (0, tslib_1.__generator)(this, function (_a) {
|
|
22
24
|
switch (_a.label) {
|
|
23
25
|
case 0:
|
|
24
|
-
atoms = mol.atoms, bonds = mol.bonds;
|
|
26
|
+
atoms = mol.atoms, bonds = mol.bonds, formalCharges = mol.formalCharges;
|
|
25
27
|
MOL = db_1.Column.ofConst('MOL', mol.atoms.count, db_1.Column.Schema.str);
|
|
26
28
|
A = db_1.Column.ofConst('A', mol.atoms.count, db_1.Column.Schema.str);
|
|
27
29
|
type_symbol = db_1.Column.asArrayColumn(atoms.type_symbol);
|
|
28
30
|
seq_id = db_1.Column.ofConst(1, atoms.count, db_1.Column.Schema.int);
|
|
31
|
+
computedFormalCharges = new Int32Array(mol.atoms.count);
|
|
32
|
+
if (formalCharges.atomIdx.rowCount > 0) {
|
|
33
|
+
for (i = 0; i < formalCharges.atomIdx.rowCount; i++) {
|
|
34
|
+
computedFormalCharges[formalCharges.atomIdx.value(i) - 1] = formalCharges.charge.value(i);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
for (i = 0; i < mol.atoms.count; i++) {
|
|
39
|
+
computedFormalCharges[i] = (0, parser_1.formalChargeMapper)(atoms.formal_charge.value(i));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
29
42
|
atom_site = db_1.Table.ofPartialColumns(schema_1.BasicSchema.atom_site, {
|
|
30
43
|
auth_asym_id: A,
|
|
31
44
|
auth_atom_id: type_symbol,
|
|
@@ -43,6 +56,7 @@ function getMolModels(mol, format, ctx) {
|
|
|
43
56
|
occupancy: db_1.Column.ofConst(1, atoms.count, db_1.Column.Schema.float),
|
|
44
57
|
type_symbol: type_symbol,
|
|
45
58
|
pdbx_PDB_model_num: db_1.Column.ofConst(1, atoms.count, db_1.Column.Schema.int),
|
|
59
|
+
pdbx_formal_charge: db_1.Column.ofIntArray(computedFormalCharges)
|
|
46
60
|
}, atoms.count);
|
|
47
61
|
entityBuilder = new entity_1.EntityBuilder();
|
|
48
62
|
entityBuilder.setNames([['MOL', 'Unknown Entity']]);
|
|
@@ -55,7 +69,7 @@ function getMolModels(mol, format, ctx) {
|
|
|
55
69
|
chem_comp: componentBuilder.getChemCompTable(),
|
|
56
70
|
atom_site: atom_site
|
|
57
71
|
});
|
|
58
|
-
return [4 /*yield*/, (0,
|
|
72
|
+
return [4 /*yield*/, (0, parser_2.createModels)(basics, format !== null && format !== void 0 ? format : MolFormat.create(mol), ctx)];
|
|
59
73
|
case 1:
|
|
60
74
|
models = _a.sent();
|
|
61
75
|
if (models.frameCount > 0) {
|
|
@@ -47,7 +47,7 @@ declare namespace CustomProperty {
|
|
|
47
47
|
}>>;
|
|
48
48
|
};
|
|
49
49
|
setDefaultAutoAttach(name: string, value: boolean): void;
|
|
50
|
-
get(name: string): Provider<Data, any, any
|
|
50
|
+
get(name: string): Provider<Data, any, any> | undefined;
|
|
51
51
|
register(provider: Provider<Data, any, any>, defaultAutoAttach: boolean): void;
|
|
52
52
|
unregister(name: string): void;
|
|
53
53
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2019-
|
|
3
|
+
* Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
6
6
|
*/
|
|
@@ -64,29 +64,21 @@ var InteractionsInterContacts = /** @class */ (function (_super) {
|
|
|
64
64
|
(0, tslib_1.__extends)(InteractionsInterContacts, _super);
|
|
65
65
|
function InteractionsInterContacts(map, unitsFeatures) {
|
|
66
66
|
var _this = _super.call(this, map) || this;
|
|
67
|
-
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
var
|
|
71
|
-
var
|
|
72
|
-
|
|
73
|
-
elementKeyIndex.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
for (var j = offsetsA[indexA], jl = offsetsA[indexA + 1]; j < jl; ++j) {
|
|
83
|
-
add(membersA[j], unitA);
|
|
84
|
-
}
|
|
85
|
-
count += 1;
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
_this.elementKeyIndex = elementKeyIndex;
|
|
67
|
+
_this.elementKeyIndex = new Map();
|
|
68
|
+
for (var i = 0, il = _this.edges.length; i < il; ++i) {
|
|
69
|
+
var _a = _this.edges[i], unitA = _a.unitA, indexA = _a.indexA;
|
|
70
|
+
var _b = unitsFeatures.get(unitA), offsets = _b.offsets, members = _b.members;
|
|
71
|
+
for (var j = offsets[indexA], jl = offsets[indexA + 1]; j < jl; ++j) {
|
|
72
|
+
var vertexKey = _this.getElementKey(members[j], unitA);
|
|
73
|
+
var e = _this.elementKeyIndex.get(vertexKey);
|
|
74
|
+
if (e === undefined) {
|
|
75
|
+
_this.elementKeyIndex.set(vertexKey, [i]);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
e.push(i);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
90
82
|
return _this;
|
|
91
83
|
}
|
|
92
84
|
InteractionsInterContacts.prototype.getContactIndicesForElement = function (index, unit) {
|
package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2019-
|
|
3
|
+
* Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
6
6
|
*/
|
|
@@ -66,11 +66,12 @@ function createInterUnitInteractionCylinderMesh(ctx, structure, theme, props, me
|
|
|
66
66
|
if (!childUnitA)
|
|
67
67
|
return true;
|
|
68
68
|
var unitA = structure.unitMap.get(b.unitA);
|
|
69
|
-
var
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
var _a = unitsFeatures.get(b.unitA), offsets = _a.offsets, members = _a.members;
|
|
70
|
+
for (var i = offsets[b.indexA], il = offsets[b.indexA + 1]; i < il; ++i) {
|
|
71
|
+
var eA = unitA.elements[members[i]];
|
|
72
|
+
if (!int_1.SortedArray.has(childUnitA.elements, eA))
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
74
75
|
}
|
|
75
76
|
return false;
|
|
76
77
|
}
|
|
@@ -119,8 +120,9 @@ function getInteractionLoci(pickingId, structure, id) {
|
|
|
119
120
|
}
|
|
120
121
|
return loci_1.EmptyLoci;
|
|
121
122
|
}
|
|
123
|
+
var __unitMap = new Map();
|
|
124
|
+
var __contactIndicesSet = new Set();
|
|
122
125
|
function eachInteraction(loci, structure, apply, isMarking) {
|
|
123
|
-
var _a;
|
|
124
126
|
var changed = false;
|
|
125
127
|
if (interactions_1.Interactions.isLoci(loci)) {
|
|
126
128
|
if (!structure_1.Structure.areEquivalent(loci.data.structure, structure))
|
|
@@ -129,8 +131,8 @@ function eachInteraction(loci, structure, apply, isMarking) {
|
|
|
129
131
|
if (loci.data.interactions !== interactions)
|
|
130
132
|
return false;
|
|
131
133
|
var contacts = interactions.contacts;
|
|
132
|
-
for (var _i = 0,
|
|
133
|
-
var c =
|
|
134
|
+
for (var _i = 0, _a = loci.elements; _i < _a.length; _i++) {
|
|
135
|
+
var c = _a[_i];
|
|
134
136
|
var idx = contacts.getEdgeIndex(c.indexA, c.unitA.id, c.indexB, c.unitB.id);
|
|
135
137
|
if (idx !== -1) {
|
|
136
138
|
if (apply(int_1.Interval.ofSingleton(idx)))
|
|
@@ -143,28 +145,52 @@ function eachInteraction(loci, structure, apply, isMarking) {
|
|
|
143
145
|
return false;
|
|
144
146
|
if (isMarking && loci.elements.length === 1)
|
|
145
147
|
return false; // only a single unit
|
|
146
|
-
var
|
|
147
|
-
if (!
|
|
148
|
+
var interactions = interactions_2.InteractionsProvider.get(structure).value;
|
|
149
|
+
if (!interactions)
|
|
148
150
|
return false;
|
|
151
|
+
var contacts_1 = interactions.contacts, unitsFeatures_1 = interactions.unitsFeatures;
|
|
152
|
+
for (var _b = 0, _c = loci.elements; _b < _c.length; _b++) {
|
|
153
|
+
var e = _c[_b];
|
|
154
|
+
__unitMap.set(e.unit.id, e.indices);
|
|
155
|
+
}
|
|
149
156
|
var _loop_1 = function (e) {
|
|
150
157
|
var unit = e.unit;
|
|
151
158
|
if (!structure_2.Unit.isAtomic(unit))
|
|
152
159
|
return "continue";
|
|
153
|
-
if (isMarking && int_1.OrderedSet.size(e.indices) === 1)
|
|
154
|
-
return "continue";
|
|
155
160
|
int_1.OrderedSet.forEach(e.indices, function (v) {
|
|
156
161
|
for (var _i = 0, _a = contacts_1.getContactIndicesForElement(v, unit); _i < _a.length; _i++) {
|
|
157
162
|
var idx = _a[_i];
|
|
158
|
-
|
|
159
|
-
changed = true;
|
|
163
|
+
__contactIndicesSet.add(idx);
|
|
160
164
|
}
|
|
161
165
|
});
|
|
162
166
|
};
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
var e = _d[_c];
|
|
167
|
+
for (var _d = 0, _e = loci.elements; _d < _e.length; _d++) {
|
|
168
|
+
var e = _e[_d];
|
|
166
169
|
_loop_1(e);
|
|
167
170
|
}
|
|
171
|
+
__contactIndicesSet.forEach(function (i) {
|
|
172
|
+
if (isMarking) {
|
|
173
|
+
var _a = contacts_1.edges[i], indexA = _a.indexA, unitA = _a.unitA, indexB = _a.indexB, unitB = _a.unitB;
|
|
174
|
+
var indicesA = __unitMap.get(unitA);
|
|
175
|
+
var indicesB = __unitMap.get(unitB);
|
|
176
|
+
if (!indicesA || !indicesB)
|
|
177
|
+
return;
|
|
178
|
+
var _b = unitsFeatures_1.get(unitA), offsetsA = _b.offsets, membersA = _b.members;
|
|
179
|
+
for (var j = offsetsA[indexA], jl = offsetsA[indexA + 1]; j < jl; ++j) {
|
|
180
|
+
if (!int_1.OrderedSet.has(indicesA, membersA[j]))
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
var _c = unitsFeatures_1.get(unitB), offsetsB = _c.offsets, membersB = _c.members;
|
|
184
|
+
for (var j = offsetsB[indexB], jl = offsetsB[indexB + 1]; j < jl; ++j) {
|
|
185
|
+
if (!int_1.OrderedSet.has(indicesB, membersB[j]))
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
if (apply(int_1.Interval.ofSingleton(i)))
|
|
190
|
+
changed = true;
|
|
191
|
+
});
|
|
192
|
+
__unitMap.clear();
|
|
193
|
+
__contactIndicesSet.clear();
|
|
168
194
|
}
|
|
169
195
|
return changed;
|
|
170
196
|
}
|
package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2019-
|
|
3
|
+
* Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
6
6
|
*/
|
|
@@ -52,9 +52,19 @@ function createIntraUnitInteractionsCylinderMesh(ctx, unit, structure, theme, pr
|
|
|
52
52
|
var sizeB = theme.size.size(location);
|
|
53
53
|
return Math.min(sizeA, sizeB) * sizeFactor;
|
|
54
54
|
},
|
|
55
|
-
ignore: function (edgeIndex) {
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
ignore: function (edgeIndex) {
|
|
56
|
+
if (flag[edgeIndex] === 1 /* Filtered */)
|
|
57
|
+
return true;
|
|
58
|
+
if (childUnit) {
|
|
59
|
+
var f = a[edgeIndex];
|
|
60
|
+
for (var i = offsets[f], jl = offsets[f + 1]; i < jl; ++i) {
|
|
61
|
+
var e = unit.elements[members[offsets[i]]];
|
|
62
|
+
if (!int_1.SortedArray.has(childUnit.elements, e))
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
58
68
|
};
|
|
59
69
|
m = (0, link_1.createLinkCylinderMesh)(ctx, builderProps, props, mesh);
|
|
60
70
|
sphere = geometry_1.Sphere3D.expand((0, geometry_1.Sphere3D)(), (childUnit !== null && childUnit !== void 0 ? childUnit : unit).boundary.sphere, 1 * sizeFactor);
|
|
@@ -102,6 +112,7 @@ function getInteractionLoci(pickingId, structureGroup, id) {
|
|
|
102
112
|
}
|
|
103
113
|
return loci_1.EmptyLoci;
|
|
104
114
|
}
|
|
115
|
+
var __contactIndicesSet = new Set();
|
|
105
116
|
function eachInteraction(loci, structureGroup, apply, isMarking) {
|
|
106
117
|
var changed = false;
|
|
107
118
|
if (interactions_2.Interactions.isLoci(loci)) {
|
|
@@ -136,28 +147,42 @@ function eachInteraction(loci, structureGroup, apply, isMarking) {
|
|
|
136
147
|
if (!interactions)
|
|
137
148
|
return false;
|
|
138
149
|
var unit = group.units[0];
|
|
139
|
-
var
|
|
150
|
+
var contacts_1 = interactions.unitsContacts.get(unit.id);
|
|
140
151
|
var features = interactions.unitsFeatures.get(unit.id);
|
|
141
|
-
var groupCount_1 =
|
|
142
|
-
var offset_1 =
|
|
152
|
+
var groupCount_1 = contacts_1.edgeCount * 2;
|
|
153
|
+
var offset_1 = contacts_1.offset;
|
|
143
154
|
var _b = features.elementsIndex, fOffsets_1 = _b.offsets, fIndices_1 = _b.indices;
|
|
155
|
+
var members_1 = features.members, offsets_1 = features.offsets;
|
|
144
156
|
var _loop_1 = function (e) {
|
|
145
157
|
var unitIdx = group.unitIndexMap.get(e.unit.id);
|
|
146
|
-
if (unitIdx
|
|
147
|
-
return "continue";
|
|
148
|
-
if (isMarking && int_1.OrderedSet.size(e.indices) === 1)
|
|
158
|
+
if (unitIdx === undefined)
|
|
149
159
|
return "continue";
|
|
150
160
|
int_1.OrderedSet.forEach(e.indices, function (v) {
|
|
151
161
|
for (var i = fOffsets_1[v], il = fOffsets_1[v + 1]; i < il; ++i) {
|
|
152
162
|
var fI = fIndices_1[i];
|
|
153
163
|
for (var j = offset_1[fI], jl = offset_1[fI + 1]; j < jl; ++j) {
|
|
154
|
-
|
|
155
|
-
|
|
164
|
+
__contactIndicesSet.add(j);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
__contactIndicesSet.forEach(function (i) {
|
|
169
|
+
if (isMarking) {
|
|
170
|
+
var fA = contacts_1.a[i];
|
|
171
|
+
for (var j = offsets_1[fA], jl = offsets_1[fA + 1]; j < jl; ++j) {
|
|
172
|
+
if (!int_1.OrderedSet.has(e.indices, members_1[j]))
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
var fB = contacts_1.b[i];
|
|
176
|
+
for (var j = offsets_1[fB], jl = offsets_1[fB + 1]; j < jl; ++j) {
|
|
177
|
+
if (!int_1.OrderedSet.has(e.indices, members_1[j]))
|
|
178
|
+
return;
|
|
156
179
|
}
|
|
157
180
|
}
|
|
181
|
+
if (apply(int_1.Interval.ofSingleton(unitIdx * groupCount_1 + i)))
|
|
182
|
+
changed = true;
|
|
158
183
|
});
|
|
184
|
+
__contactIndicesSet.clear();
|
|
159
185
|
};
|
|
160
|
-
// TODO: when isMarking, all elements of contact features need to be in the loci
|
|
161
186
|
for (var _c = 0, _d = loci.elements; _c < _d.length; _c++) {
|
|
162
187
|
var e = _d[_c];
|
|
163
188
|
_loop_1(e);
|
|
@@ -21,7 +21,7 @@ var BestDatabaseSequenceMapping;
|
|
|
21
21
|
type: 'static',
|
|
22
22
|
defaultParams: {},
|
|
23
23
|
getParams: function () { return ({}); },
|
|
24
|
-
isApplicable: function (data) { var _a, _b; return mmcif_1.MmcifFormat.is(data.sourceData) && ((_b = (_a = data.sourceData.data.frame.categories) === null || _a === void 0 ? void 0 : _a.atom_site) === null || _b === void 0 ? void 0 : _b.fieldNames.indexOf('
|
|
24
|
+
isApplicable: function (data) { var _a, _b; return mmcif_1.MmcifFormat.is(data.sourceData) && ((_b = (_a = data.sourceData.data.frame.categories) === null || _a === void 0 ? void 0 : _a.atom_site) === null || _b === void 0 ? void 0 : _b.fieldNames.indexOf('pdbx_sifts_xref_db_name')) >= 0; },
|
|
25
25
|
obtain: function (ctx, data) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
|
|
26
26
|
return (0, tslib_1.__generator)(this, function (_a) {
|
|
27
27
|
return [2 /*return*/, { value: fromCif(data) }];
|
|
@@ -34,7 +34,7 @@ var BestDatabaseSequenceMapping;
|
|
|
34
34
|
if (!data)
|
|
35
35
|
return '';
|
|
36
36
|
var eI = loc.unit.elements[loc.element];
|
|
37
|
-
var rI = model.atomicHierarchy.residueAtomSegments.
|
|
37
|
+
var rI = model.atomicHierarchy.residueAtomSegments.index[eI];
|
|
38
38
|
return data.accession[rI];
|
|
39
39
|
}
|
|
40
40
|
BestDatabaseSequenceMapping.getKey = getKey;
|
|
@@ -44,7 +44,7 @@ var BestDatabaseSequenceMapping;
|
|
|
44
44
|
if (!data)
|
|
45
45
|
return;
|
|
46
46
|
var eI = loc.unit.elements[loc.element];
|
|
47
|
-
var rI = model.atomicHierarchy.residueAtomSegments.
|
|
47
|
+
var rI = model.atomicHierarchy.residueAtomSegments.index[eI];
|
|
48
48
|
var dbName = data.dbName[rI];
|
|
49
49
|
if (!dbName)
|
|
50
50
|
return;
|
|
@@ -55,10 +55,10 @@ var BestDatabaseSequenceMapping;
|
|
|
55
55
|
if (!mmcif_1.MmcifFormat.is(model.sourceData))
|
|
56
56
|
return;
|
|
57
57
|
var atom_site = model.sourceData.data.frame.categories.atom_site;
|
|
58
|
-
var db_name = atom_site.getField('
|
|
59
|
-
var db_acc = atom_site.getField('
|
|
60
|
-
var db_num = atom_site.getField('
|
|
61
|
-
var db_res = atom_site.getField('
|
|
58
|
+
var db_name = atom_site.getField('pdbx_sifts_xref_db_name');
|
|
59
|
+
var db_acc = atom_site.getField('pdbx_sifts_xref_db_acc');
|
|
60
|
+
var db_num = atom_site.getField('pdbx_sifts_xref_db_num');
|
|
61
|
+
var db_res = atom_site.getField('pdbx_sifts_xref_db_res');
|
|
62
62
|
if (!db_name || !db_acc || !db_num || !db_res)
|
|
63
63
|
return;
|
|
64
64
|
var atomSourceIndex = model.atomicHierarchy.atomSourceIndex;
|
|
@@ -70,16 +70,16 @@ var BestDatabaseSequenceMapping;
|
|
|
70
70
|
for (var i = 0; i < count; i++) {
|
|
71
71
|
var row = atomSourceIndex.value(residueOffsets[i]);
|
|
72
72
|
if (db_name.valueKind(row) !== 0 /* Present */) {
|
|
73
|
-
dbName[
|
|
74
|
-
accession[
|
|
75
|
-
num[
|
|
76
|
-
residue[
|
|
73
|
+
dbName[i] = '';
|
|
74
|
+
accession[i] = '';
|
|
75
|
+
num[i] = 0;
|
|
76
|
+
residue[i] = '';
|
|
77
77
|
continue;
|
|
78
78
|
}
|
|
79
|
-
dbName[
|
|
80
|
-
accession[
|
|
81
|
-
num[
|
|
82
|
-
residue[
|
|
79
|
+
dbName[i] = db_name.str(row);
|
|
80
|
+
accession[i] = db_acc.str(row);
|
|
81
|
+
num[i] = db_num.int(row);
|
|
82
|
+
residue[i] = db_res.str(row);
|
|
83
83
|
}
|
|
84
84
|
return { dbName: dbName, accession: accession, num: num, residue: residue };
|
|
85
85
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
5
5
|
*/
|
|
6
6
|
import { PluginContext } from './context';
|
|
7
|
+
import { PluginAnimationManager } from '../mol-plugin-state/manager/animation';
|
|
7
8
|
export declare class PluginAnimationLoop {
|
|
8
9
|
private plugin;
|
|
9
10
|
private currentFrame;
|
|
@@ -12,6 +13,7 @@ export declare class PluginAnimationLoop {
|
|
|
12
13
|
tick(t: number, options?: {
|
|
13
14
|
isSynchronous?: boolean;
|
|
14
15
|
manualDraw?: boolean;
|
|
16
|
+
animation?: PluginAnimationManager.AnimationInfo;
|
|
15
17
|
}): Promise<void>;
|
|
16
18
|
private frame;
|
|
17
19
|
resetTime(t?: number): void;
|
|
@@ -33,7 +33,7 @@ var PluginAnimationLoop = /** @class */ (function () {
|
|
|
33
33
|
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
|
|
34
34
|
return (0, tslib_1.__generator)(this, function (_b) {
|
|
35
35
|
switch (_b.label) {
|
|
36
|
-
case 0: return [4 /*yield*/, this.plugin.managers.animation.tick(t, options === null || options === void 0 ? void 0 : options.isSynchronous)];
|
|
36
|
+
case 0: return [4 /*yield*/, this.plugin.managers.animation.tick(t, options === null || options === void 0 ? void 0 : options.isSynchronous, options === null || options === void 0 ? void 0 : options.animation)];
|
|
37
37
|
case 1:
|
|
38
38
|
_b.sent();
|
|
39
39
|
(_a = this.plugin.canvas3d) === null || _a === void 0 ? void 0 : _a.tick(t, options);
|
|
@@ -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 David Sehnal <david.sehnal@gmail.com>
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2018-
|
|
3
|
+
* Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
6
6
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
@@ -216,11 +216,16 @@ exports.DefaultLociLabelProvider = behavior_1.PluginBehavior.create({
|
|
|
216
216
|
this.f = {
|
|
217
217
|
label: function (loci) {
|
|
218
218
|
var label = [];
|
|
219
|
-
if (structure_1.StructureElement.Loci.is(loci)
|
|
220
|
-
var
|
|
221
|
-
var
|
|
222
|
-
|
|
223
|
-
|
|
219
|
+
if (structure_1.StructureElement.Loci.is(loci)) {
|
|
220
|
+
var entityNames = new Set();
|
|
221
|
+
for (var _i = 0, _a = loci.elements; _i < _a.length; _i++) {
|
|
222
|
+
var u = _a[_i].unit;
|
|
223
|
+
var l = structure_1.StructureElement.Location.create(loci.structure, u, u.elements[0]);
|
|
224
|
+
var name_1 = structure_1.StructureProperties.entity.pdbx_description(l).join(', ');
|
|
225
|
+
entityNames.add(name_1);
|
|
226
|
+
}
|
|
227
|
+
if (entityNames.size === 1)
|
|
228
|
+
entityNames.forEach(function (name) { return label.push(name); });
|
|
224
229
|
}
|
|
225
230
|
label.push((0, label_1.lociLabel)(loci));
|
|
226
231
|
return label.filter(function (l) { return !!l; }).join('</br>');
|
package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
@@ -22,6 +22,7 @@ declare const StructureFocusRepresentationParams: (plugin: PluginContext) => {
|
|
|
22
22
|
components: PD.MultiSelect<"target" | "surroundings" | "interactions">;
|
|
23
23
|
excludeTargetFromSurroundings: PD.BooleanParam;
|
|
24
24
|
ignoreHydrogens: PD.BooleanParam;
|
|
25
|
+
ignoreLight: PD.BooleanParam;
|
|
25
26
|
material: PD.Group<PD.Normalize<{
|
|
26
27
|
metalness: number;
|
|
27
28
|
roughness: number;
|