molstar 3.0.0-dev.8 → 3.0.2
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/viewer/app.d.ts +230 -0
- package/lib/apps/viewer/app.js +528 -0
- package/lib/apps/viewer/index.d.ts +2 -225
- package/lib/apps/viewer/index.html +2 -2
- package/lib/apps/viewer/index.js +2 -509
- package/lib/commonjs/apps/viewer/app.d.ts +230 -0
- package/lib/commonjs/apps/viewer/app.js +534 -0
- package/lib/commonjs/apps/viewer/index.d.ts +2 -225
- package/lib/commonjs/apps/viewer/index.js +2 -512
- 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/representation.js +1 -1
- 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 +2 -2
- package/lib/commonjs/extensions/rcsb/graphql/types.d.ts +2 -2
- package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +12 -4
- package/lib/commonjs/mol-canvas3d/canvas3d.js +2 -2
- 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-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/mol2/parser.d.ts +1 -1
- package/lib/commonjs/mol-io/reader/mol2/parser.js +33 -3
- package/lib/commonjs/mol-io/reader/mol2/schema.d.ts +12 -1
- package/lib/commonjs/mol-io/reader/mol2/schema.js +1 -1
- 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/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/element/stats.js +8 -0
- 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/unit/bonds/common.d.ts +2 -1
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/common.js +11 -2
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/inter-compute.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/inter-compute.js +20 -10
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/intra-compute.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/intra-compute.js +21 -11
- 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-formats/structure/mol2.d.ts +1 -1
- package/lib/commonjs/mol-model-formats/structure/mol2.js +37 -7
- package/lib/commonjs/mol-model-formats/structure/property/bonds/index-pair.d.ts +18 -1
- package/lib/commonjs/mol-model-formats/structure/property/bonds/index-pair.js +18 -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/static/representation.js +1 -1
- package/lib/commonjs/mol-plugin/commands.d.ts +6 -2
- package/lib/commonjs/mol-plugin/config.d.ts +1 -1
- 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/structure.d.ts +1 -0
- package/lib/commonjs/mol-plugin-state/actions/structure.js +41 -8
- 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 +6 -6
- package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy.d.ts +1 -1
- package/lib/commonjs/mol-plugin-state/builder/structure/representation-preset.d.ts +172 -6
- package/lib/commonjs/mol-plugin-state/builder/structure/representation-preset.js +74 -2
- 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-ui/structure/superposition.js +2 -2
- 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/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/representation.js +1 -1
- 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 +2 -2
- package/lib/extensions/rcsb/graphql/types.d.ts +2 -2
- package/lib/mol-canvas3d/canvas3d.d.ts +12 -4
- package/lib/mol-canvas3d/canvas3d.js +2 -2
- 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-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/mol2/parser.d.ts +1 -1
- package/lib/mol-io/reader/mol2/parser.js +33 -3
- package/lib/mol-io/reader/mol2/schema.d.ts +12 -1
- package/lib/mol-io/reader/mol2/schema.js +1 -1
- 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/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/element/stats.js +8 -0
- 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/unit/bonds/common.d.ts +2 -1
- package/lib/mol-model/structure/structure/unit/bonds/common.js +9 -1
- package/lib/mol-model/structure/structure/unit/bonds/inter-compute.d.ts +1 -1
- package/lib/mol-model/structure/structure/unit/bonds/inter-compute.js +21 -11
- package/lib/mol-model/structure/structure/unit/bonds/intra-compute.d.ts +1 -1
- package/lib/mol-model/structure/structure/unit/bonds/intra-compute.js +22 -12
- 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-formats/structure/mol2.d.ts +1 -1
- package/lib/mol-model-formats/structure/mol2.js +37 -7
- package/lib/mol-model-formats/structure/property/bonds/index-pair.d.ts +18 -1
- package/lib/mol-model-formats/structure/property/bonds/index-pair.js +18 -5
- 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/static/representation.js +1 -1
- package/lib/mol-plugin/commands.d.ts +6 -2
- package/lib/mol-plugin/config.d.ts +1 -1
- 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/structure.d.ts +1 -0
- package/lib/mol-plugin-state/actions/structure.js +41 -8
- 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 +6 -6
- package/lib/mol-plugin-state/builder/structure/hierarchy.d.ts +1 -1
- package/lib/mol-plugin-state/builder/structure/representation-preset.d.ts +172 -6
- package/lib/mol-plugin-state/builder/structure/representation-preset.js +74 -2
- 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-ui/structure/superposition.js +2 -2
- 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/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 +36 -38
|
@@ -27,7 +27,7 @@ function createModels(data, format, ctx) {
|
|
|
27
27
|
return (0, tslib_1.__generator)(this, function (_b) {
|
|
28
28
|
switch (_b.label) {
|
|
29
29
|
case 0:
|
|
30
|
-
properties = (
|
|
30
|
+
properties = getCommonProperties(data, format);
|
|
31
31
|
if (!(data.ihm_model_list._rowCount > 0)) return [3 /*break*/, 2];
|
|
32
32
|
return [4 /*yield*/, readIntegrative(ctx, data, properties, format)];
|
|
33
33
|
case 1:
|
|
@@ -48,6 +48,13 @@ function createModels(data, format, ctx) {
|
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
exports.createModels = createModels;
|
|
51
|
+
function getCommonProperties(data, format) {
|
|
52
|
+
return {
|
|
53
|
+
missingResidues: (0, properties_1.getMissingResidues)(data),
|
|
54
|
+
chemicalComponentMap: (0, properties_1.getChemicalComponentMap)(data),
|
|
55
|
+
saccharideComponentMap: (0, properties_1.getSaccharideComponentMap)(data)
|
|
56
|
+
};
|
|
57
|
+
}
|
|
51
58
|
/** Standard atomic model */
|
|
52
59
|
function createStandardModel(data, atom_site, sourceIndex, entities, properties, format, previous) {
|
|
53
60
|
var atomic = (0, atomic_1.getAtomicHierarchyAndConformation)(atom_site, sourceIndex, entities, properties.chemicalComponentMap, format, previous);
|
|
@@ -58,6 +65,7 @@ function createStandardModel(data, atom_site, sourceIndex, entities, properties,
|
|
|
58
65
|
var coarse = coarse_1.EmptyCoarse;
|
|
59
66
|
var sequence = (0, sequence_1.getSequence)(data, entities, atomic.hierarchy, coarse.hierarchy);
|
|
60
67
|
var atomicRanges = (0, atomic_ranges_1.getAtomicRanges)(atomic.hierarchy, entities, atomic.conformation, sequence);
|
|
68
|
+
var structAsymMap = (0, properties_1.getStructAsymMap)(atomic.hierarchy);
|
|
61
69
|
var entry = data.entry.id.valueKind(0) === 0 /* Present */
|
|
62
70
|
? data.entry.id.value(0) : format.name;
|
|
63
71
|
var label = [];
|
|
@@ -73,7 +81,7 @@ function createStandardModel(data, atom_site, sourceIndex, entities, properties,
|
|
|
73
81
|
sourceData: format,
|
|
74
82
|
modelNum: modelNum,
|
|
75
83
|
parent: undefined,
|
|
76
|
-
entities: entities,
|
|
84
|
+
entities: (0, entities_1.getEntitiesWithPRD)(data, entities, structAsymMap),
|
|
77
85
|
sequence: sequence,
|
|
78
86
|
atomicHierarchy: atomic.hierarchy,
|
|
79
87
|
atomicConformation: atomic.conformation,
|
|
@@ -81,7 +89,7 @@ function createStandardModel(data, atom_site, sourceIndex, entities, properties,
|
|
|
81
89
|
atomicChainOperatorMappinng: atomic.chainOperatorMapping,
|
|
82
90
|
coarseHierarchy: coarse.hierarchy,
|
|
83
91
|
coarseConformation: coarse.conformation,
|
|
84
|
-
properties: properties,
|
|
92
|
+
properties: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, properties), { structAsymMap: structAsymMap }),
|
|
85
93
|
customProperties: new custom_property_1.CustomProperties(),
|
|
86
94
|
_staticPropertyData: Object.create(null),
|
|
87
95
|
_dynamicPropertyData: Object.create(null)
|
|
@@ -90,7 +98,7 @@ function createStandardModel(data, atom_site, sourceIndex, entities, properties,
|
|
|
90
98
|
/** Integrative model with atomic/coarse parts */
|
|
91
99
|
function createIntegrativeModel(data, ihm, properties, format) {
|
|
92
100
|
var atomic = (0, atomic_1.getAtomicHierarchyAndConformation)(ihm.atom_site, ihm.atom_site_sourceIndex, ihm.entities, properties.chemicalComponentMap, format);
|
|
93
|
-
var coarse = (0, coarse_1.getCoarse)(ihm, properties);
|
|
101
|
+
var coarse = (0, coarse_1.getCoarse)(ihm, properties.chemicalComponentMap);
|
|
94
102
|
var sequence = (0, sequence_1.getSequence)(data, ihm.entities, atomic.hierarchy, coarse.hierarchy);
|
|
95
103
|
var atomicRanges = (0, atomic_ranges_1.getAtomicRanges)(atomic.hierarchy, ihm.entities, atomic.conformation, sequence);
|
|
96
104
|
var entry = data.entry.id.valueKind(0) === 0 /* Present */
|
|
@@ -104,6 +112,7 @@ function createIntegrativeModel(data, ihm, properties, format) {
|
|
|
104
112
|
label.push(ihm.model_name);
|
|
105
113
|
if (ihm.model_group_name)
|
|
106
114
|
label.push(ihm.model_group_name);
|
|
115
|
+
var structAsymMap = (0, properties_1.getStructAsymMap)(atomic.hierarchy, data);
|
|
107
116
|
return {
|
|
108
117
|
id: uuid_1.UUID.create22(),
|
|
109
118
|
entryId: entry,
|
|
@@ -112,7 +121,7 @@ function createIntegrativeModel(data, ihm, properties, format) {
|
|
|
112
121
|
sourceData: format,
|
|
113
122
|
modelNum: ihm.model_id,
|
|
114
123
|
parent: undefined,
|
|
115
|
-
entities: ihm.entities,
|
|
124
|
+
entities: (0, entities_1.getEntitiesWithPRD)(data, ihm.entities, structAsymMap),
|
|
116
125
|
sequence: sequence,
|
|
117
126
|
atomicHierarchy: atomic.hierarchy,
|
|
118
127
|
atomicConformation: atomic.conformation,
|
|
@@ -120,7 +129,7 @@ function createIntegrativeModel(data, ihm, properties, format) {
|
|
|
120
129
|
atomicChainOperatorMappinng: atomic.chainOperatorMapping,
|
|
121
130
|
coarseHierarchy: coarse.hierarchy,
|
|
122
131
|
coarseConformation: coarse.conformation,
|
|
123
|
-
properties: properties,
|
|
132
|
+
properties: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, properties), { structAsymMap: structAsymMap }),
|
|
124
133
|
customProperties: new custom_property_1.CustomProperties(),
|
|
125
134
|
_staticPropertyData: Object.create(null),
|
|
126
135
|
_dynamicPropertyData: Object.create(null)
|
|
@@ -144,7 +153,7 @@ function readStandard(ctx, data, properties, format) {
|
|
|
144
153
|
models = [];
|
|
145
154
|
if (!data.atom_site) return [3 /*break*/, 3];
|
|
146
155
|
atomCount = data.atom_site.id.rowCount;
|
|
147
|
-
entities = (0, entities_1.
|
|
156
|
+
entities = (0, entities_1.getEntityData)(data);
|
|
148
157
|
modelStart = 0;
|
|
149
158
|
_b.label = 1;
|
|
150
159
|
case 1:
|
|
@@ -184,7 +193,7 @@ function readIntegrative(ctx, data, properties, format) {
|
|
|
184
193
|
return (0, tslib_1.__generator)(this, function (_c) {
|
|
185
194
|
switch (_c.label) {
|
|
186
195
|
case 0:
|
|
187
|
-
entities = (0, entities_1.
|
|
196
|
+
entities = (0, entities_1.getEntityData)(data);
|
|
188
197
|
atom_sites_modelColumn = data.atom_site.ihm_model_id.isDefined
|
|
189
198
|
? data.atom_site.ihm_model_id : data.atom_site.pdbx_PDB_model_num;
|
|
190
199
|
atom_sites = splitTable(data.atom_site, atom_sites_modelColumn);
|
|
@@ -5,5 +5,10 @@
|
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
6
6
|
*/
|
|
7
7
|
import { Model } from '../../../mol-model/structure/model/model';
|
|
8
|
+
import { AtomicHierarchy } from '../../../mol-model/structure/model/properties/atomic';
|
|
9
|
+
import { SaccharideComponentMap } from '../../../mol-model/structure/structure/carbohydrates/constants';
|
|
8
10
|
import { BasicData } from './schema';
|
|
9
|
-
export declare function
|
|
11
|
+
export declare function getMissingResidues(data: BasicData): Model['properties']['missingResidues'];
|
|
12
|
+
export declare function getChemicalComponentMap(data: BasicData): Model['properties']['chemicalComponentMap'];
|
|
13
|
+
export declare function getSaccharideComponentMap(data: BasicData): SaccharideComponentMap;
|
|
14
|
+
export declare function getStructAsymMap(atomic: AtomicHierarchy, data?: BasicData): Model['properties']['structAsymMap'];
|
|
@@ -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) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
|
+
* Copyright (c) 2020-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
|
*/
|
|
@@ -17,9 +17,12 @@ var index_pair_1 = require("./property/bonds/index-pair");
|
|
|
17
17
|
var partial_charge_1 = require("./property/partial-charge");
|
|
18
18
|
var structure_1 = require("../../mol-model/structure");
|
|
19
19
|
var util_1 = require("./util");
|
|
20
|
+
var symmetry_1 = require("./property/symmetry");
|
|
21
|
+
var geometry_1 = require("../../mol-math/geometry");
|
|
22
|
+
var linear_algebra_1 = require("../../mol-math/linear-algebra");
|
|
20
23
|
function getModels(mol2, ctx) {
|
|
21
24
|
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
|
|
22
|
-
var models, i, il, _a, atoms, bonds,
|
|
25
|
+
var models, i, il, _a, molecule, atoms, bonds, crysin, A, type_symbol, hasAtomType, i_1, i_2, atom_site, entityBuilder, componentBuilder, i_3, il_1, basics, _models, indexA, indexB, key, order, flag, pairBonds, first, symmetry;
|
|
23
26
|
return (0, tslib_1.__generator)(this, function (_b) {
|
|
24
27
|
switch (_b.label) {
|
|
25
28
|
case 0:
|
|
@@ -28,11 +31,20 @@ function getModels(mol2, ctx) {
|
|
|
28
31
|
_b.label = 1;
|
|
29
32
|
case 1:
|
|
30
33
|
if (!(i < il)) return [3 /*break*/, 4];
|
|
31
|
-
_a = mol2.structures[i], atoms = _a.atoms, bonds = _a.bonds,
|
|
34
|
+
_a = mol2.structures[i], molecule = _a.molecule, atoms = _a.atoms, bonds = _a.bonds, crysin = _a.crysin;
|
|
32
35
|
A = db_1.Column.ofConst('A', atoms.count, db_1.Column.Schema.str);
|
|
33
36
|
type_symbol = new Array(atoms.count);
|
|
37
|
+
hasAtomType = false;
|
|
34
38
|
for (i_1 = 0; i_1 < atoms.count; ++i_1) {
|
|
35
|
-
|
|
39
|
+
if (atoms.atom_type.value(i_1).includes('.')) {
|
|
40
|
+
hasAtomType = true;
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
for (i_2 = 0; i_2 < atoms.count; ++i_2) {
|
|
45
|
+
type_symbol[i_2] = hasAtomType
|
|
46
|
+
? atoms.atom_type.value(i_2).split('.')[0].toUpperCase()
|
|
47
|
+
: (0, util_1.guessElementSymbolString)(atoms.atom_name.value(i_2));
|
|
36
48
|
}
|
|
37
49
|
atom_site = db_1.Table.ofPartialColumns(schema_1.BasicSchema.atom_site, {
|
|
38
50
|
auth_asym_id: A,
|
|
@@ -56,8 +68,8 @@ function getModels(mol2, ctx) {
|
|
|
56
68
|
entityBuilder.setNames([['MOL', molecule.mol_name || 'Unknown Entity']]);
|
|
57
69
|
entityBuilder.getEntityId('MOL', 0 /* Unknown */, 'A');
|
|
58
70
|
componentBuilder = new component_1.ComponentBuilder(atoms.subst_id, atoms.atom_name);
|
|
59
|
-
for (
|
|
60
|
-
componentBuilder.add(atoms.subst_name.value(
|
|
71
|
+
for (i_3 = 0, il_1 = atoms.subst_name.rowCount; i_3 < il_1; ++i_3) {
|
|
72
|
+
componentBuilder.add(atoms.subst_name.value(i_3), i_3);
|
|
61
73
|
}
|
|
62
74
|
basics = (0, schema_1.createBasic)({
|
|
63
75
|
entity: entityBuilder.getEntityTable(),
|
|
@@ -70,6 +82,7 @@ function getModels(mol2, ctx) {
|
|
|
70
82
|
if (_models.frameCount > 0) {
|
|
71
83
|
indexA = db_1.Column.ofIntArray(db_1.Column.mapToArray(bonds.origin_atom_id, function (x) { return x - 1; }, Int32Array));
|
|
72
84
|
indexB = db_1.Column.ofIntArray(db_1.Column.mapToArray(bonds.target_atom_id, function (x) { return x - 1; }, Int32Array));
|
|
85
|
+
key = bonds.bond_id;
|
|
73
86
|
order = db_1.Column.ofIntArray(db_1.Column.mapToArray(bonds.bond_type, function (x) {
|
|
74
87
|
switch (x) {
|
|
75
88
|
case 'ar': // aromatic
|
|
@@ -96,13 +109,18 @@ function getModels(mol2, ctx) {
|
|
|
96
109
|
return 1 /* Covalent */;
|
|
97
110
|
}
|
|
98
111
|
}, Int8Array));
|
|
99
|
-
pairBonds = index_pair_1.IndexPairBonds.fromData({ pairs: { indexA: indexA, indexB: indexB, order: order, flag: flag }, count: atoms.count });
|
|
112
|
+
pairBonds = index_pair_1.IndexPairBonds.fromData({ pairs: { key: key, indexA: indexA, indexB: indexB, order: order, flag: flag }, count: atoms.count });
|
|
100
113
|
first = _models.representative;
|
|
101
114
|
index_pair_1.IndexPairBonds.Provider.set(first, pairBonds);
|
|
102
115
|
partial_charge_1.AtomPartialCharge.Provider.set(first, {
|
|
103
116
|
data: atoms.charge,
|
|
104
117
|
type: molecule.charge_type
|
|
105
118
|
});
|
|
119
|
+
if (crysin) {
|
|
120
|
+
symmetry = getSymmetry(crysin);
|
|
121
|
+
if (symmetry)
|
|
122
|
+
symmetry_1.ModelSymmetry.Provider.set(first, symmetry);
|
|
123
|
+
}
|
|
106
124
|
models.push(first);
|
|
107
125
|
}
|
|
108
126
|
_b.label = 3;
|
|
@@ -114,6 +132,18 @@ function getModels(mol2, ctx) {
|
|
|
114
132
|
});
|
|
115
133
|
});
|
|
116
134
|
}
|
|
135
|
+
function getSymmetry(crysin) {
|
|
136
|
+
// TODO handle `crysin.setting`
|
|
137
|
+
if (crysin.setting !== 1)
|
|
138
|
+
return;
|
|
139
|
+
var spaceCell = geometry_1.SpacegroupCell.create(crysin.spaceGroup, linear_algebra_1.Vec3.create(crysin.a, crysin.b, crysin.c), linear_algebra_1.Vec3.scale((0, linear_algebra_1.Vec3)(), linear_algebra_1.Vec3.create(crysin.alpha, crysin.beta, crysin.gamma), Math.PI / 180));
|
|
140
|
+
return {
|
|
141
|
+
spacegroup: geometry_1.Spacegroup.create(spaceCell),
|
|
142
|
+
assemblies: [],
|
|
143
|
+
isNonStandardCrystalFrame: false,
|
|
144
|
+
ncsOperators: []
|
|
145
|
+
};
|
|
146
|
+
}
|
|
117
147
|
var Mol2Format;
|
|
118
148
|
(function (Mol2Format) {
|
|
119
149
|
function is(x) {
|
|
@@ -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 Alexander Rose <alexander.rose@weirdbyte.de>
|
|
5
5
|
*/
|
|
@@ -10,6 +10,7 @@ import { FormatPropertyProvider } from '../../common/property';
|
|
|
10
10
|
import { BondType } from '../../../../mol-model/structure/model/types';
|
|
11
11
|
import { ElementIndex } from '../../../../mol-model/structure';
|
|
12
12
|
export declare type IndexPairsProps = {
|
|
13
|
+
readonly key: ArrayLike<number>;
|
|
13
14
|
readonly order: ArrayLike<number>;
|
|
14
15
|
readonly distance: ArrayLike<number>;
|
|
15
16
|
readonly flag: ArrayLike<BondType.Flag>;
|
|
@@ -26,13 +27,29 @@ export declare namespace IndexPairBonds {
|
|
|
26
27
|
pairs: {
|
|
27
28
|
indexA: Column<number>;
|
|
28
29
|
indexB: Column<number>;
|
|
30
|
+
key?: Column<number>;
|
|
29
31
|
order?: Column<number>;
|
|
32
|
+
/**
|
|
33
|
+
* Useful for bonds in periodic cells. That is, only bonds within the given
|
|
34
|
+
* distance are added. This allows for bond between periodic image but
|
|
35
|
+
* avoids unwanted bonds with wrong distances. If negative, test using the
|
|
36
|
+
* `maxDistance` option from `Props`.
|
|
37
|
+
*/
|
|
30
38
|
distance?: Column<number>;
|
|
31
39
|
flag?: Column<BondType.Flag>;
|
|
32
40
|
};
|
|
33
41
|
count: number;
|
|
34
42
|
};
|
|
35
43
|
const DefaultProps: {
|
|
44
|
+
/**
|
|
45
|
+
* If negative, test using element-based threshold, otherwise distance in Angstrom.
|
|
46
|
+
*
|
|
47
|
+
* This option exists to handle bonds in periodic cells. For systems that are
|
|
48
|
+
* made from beads (as opposed to atomic elements), set to a specific distance.
|
|
49
|
+
*
|
|
50
|
+
* Note that `Data` has a `distance` field which allows specifying a distance
|
|
51
|
+
* for each bond individually which takes precedence over this option.
|
|
52
|
+
*/
|
|
36
53
|
maxDistance: number;
|
|
37
54
|
};
|
|
38
55
|
type Props = typeof DefaultProps;
|
|
@@ -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
|
*/
|
|
@@ -9,19 +9,20 @@ exports.IndexPairBonds = void 0;
|
|
|
9
9
|
var tslib_1 = require("tslib");
|
|
10
10
|
var graph_1 = require("../../../../mol-math/graph");
|
|
11
11
|
var property_1 = require("../../common/property");
|
|
12
|
-
var common_1 = require("../../../../mol-model/structure/structure/unit/bonds/common");
|
|
13
12
|
function getGraph(indexA, indexB, props, count) {
|
|
14
13
|
var builder = new graph_1.IntAdjacencyGraph.EdgeBuilder(count, indexA, indexB);
|
|
14
|
+
var key = new Int32Array(builder.slotCount);
|
|
15
15
|
var order = new Int8Array(builder.slotCount);
|
|
16
16
|
var distance = new Array(builder.slotCount);
|
|
17
17
|
var flag = new Array(builder.slotCount);
|
|
18
18
|
for (var i = 0, _i = builder.edgeCount; i < _i; i++) {
|
|
19
19
|
builder.addNextEdge();
|
|
20
|
+
builder.assignProperty(key, props.key ? props.key[i] : -1);
|
|
20
21
|
builder.assignProperty(order, props.order ? props.order[i] : 1);
|
|
21
22
|
builder.assignProperty(distance, props.distance ? props.distance[i] : -1);
|
|
22
23
|
builder.assignProperty(flag, props.flag ? props.flag[i] : 1 /* Covalent */);
|
|
23
24
|
}
|
|
24
|
-
return builder.createGraph({ order: order, distance: distance, flag: flag });
|
|
25
|
+
return builder.createGraph({ key: key, order: order, distance: distance, flag: flag });
|
|
25
26
|
}
|
|
26
27
|
var IndexPairBonds;
|
|
27
28
|
(function (IndexPairBonds) {
|
|
@@ -29,18 +30,30 @@ var IndexPairBonds;
|
|
|
29
30
|
name: 'index_pair_bonds',
|
|
30
31
|
};
|
|
31
32
|
IndexPairBonds.Provider = property_1.FormatPropertyProvider.create(IndexPairBonds.Descriptor);
|
|
32
|
-
IndexPairBonds.DefaultProps = {
|
|
33
|
+
IndexPairBonds.DefaultProps = {
|
|
34
|
+
/**
|
|
35
|
+
* If negative, test using element-based threshold, otherwise distance in Angstrom.
|
|
36
|
+
*
|
|
37
|
+
* This option exists to handle bonds in periodic cells. For systems that are
|
|
38
|
+
* made from beads (as opposed to atomic elements), set to a specific distance.
|
|
39
|
+
*
|
|
40
|
+
* Note that `Data` has a `distance` field which allows specifying a distance
|
|
41
|
+
* for each bond individually which takes precedence over this option.
|
|
42
|
+
*/
|
|
43
|
+
maxDistance: -1
|
|
44
|
+
};
|
|
33
45
|
function fromData(data, props) {
|
|
34
46
|
if (props === void 0) { props = {}; }
|
|
35
47
|
var p = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, IndexPairBonds.DefaultProps), props);
|
|
36
48
|
var pairs = data.pairs, count = data.count;
|
|
37
49
|
var indexA = pairs.indexA.toArray();
|
|
38
50
|
var indexB = pairs.indexB.toArray();
|
|
51
|
+
var key = pairs.key && pairs.key.toArray();
|
|
39
52
|
var order = pairs.order && pairs.order.toArray();
|
|
40
53
|
var distance = pairs.distance && pairs.distance.toArray();
|
|
41
54
|
var flag = pairs.flag && pairs.flag.toArray();
|
|
42
55
|
return {
|
|
43
|
-
bonds: getGraph(indexA, indexB, { order: order, distance: distance, flag: flag }, count),
|
|
56
|
+
bonds: getGraph(indexA, indexB, { key: key, order: order, distance: distance, flag: flag }, count),
|
|
44
57
|
maxDistance: p.maxDistance
|
|
45
58
|
};
|
|
46
59
|
}
|
|
@@ -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) {
|