matterviz 0.4.1 → 0.4.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/dist/EmptyState.svelte +10 -4
- package/dist/FilePicker.svelte +12 -14
- package/dist/Icon.svelte +7 -4
- package/dist/MillerIndexInput.svelte +2 -2
- package/dist/app.css +53 -0
- package/dist/brillouin/BrillouinZone.svelte +75 -85
- package/dist/brillouin/BrillouinZone.svelte.d.ts +5 -7
- package/dist/brillouin/BrillouinZoneControls.svelte +3 -6
- package/dist/brillouin/BrillouinZoneExportPane.svelte +18 -14
- package/dist/brillouin/BrillouinZoneInfoPane.svelte +6 -10
- package/dist/brillouin/BrillouinZoneScene.svelte +26 -39
- package/dist/brillouin/BrillouinZoneScene.svelte.d.ts +1 -1
- package/dist/chempot-diagram/ChemPotDiagram.svelte +33 -38
- package/dist/chempot-diagram/ChemPotDiagram2D.svelte +62 -74
- package/dist/chempot-diagram/ChemPotDiagram2D.svelte.d.ts +1 -1
- package/dist/chempot-diagram/ChemPotDiagram3D.svelte +511 -547
- package/dist/chempot-diagram/ChemPotDiagram3D.svelte.d.ts +1 -1
- package/dist/chempot-diagram/async-compute.svelte.js +1 -1
- package/dist/chempot-diagram/controls-state.svelte.js +1 -1
- package/dist/colors/index.d.ts +0 -4
- package/dist/colors/index.js +19 -20
- package/dist/composition/BarChart.svelte +37 -31
- package/dist/composition/BubbleChart.svelte +17 -17
- package/dist/composition/Composition.svelte +7 -11
- package/dist/composition/Formula.svelte +18 -25
- package/dist/composition/FormulaFilter.svelte +92 -95
- package/dist/composition/PieChart.svelte +55 -41
- package/dist/composition/format.js +1 -1
- package/dist/composition/index.d.ts +2 -0
- package/dist/composition/index.js +14 -0
- package/dist/composition/parse.d.ts +2 -2
- package/dist/composition/parse.js +11 -10
- package/dist/constants.js +11 -9
- package/dist/convex-hull/ConvexHull.svelte +12 -15
- package/dist/convex-hull/ConvexHull.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHull2D.svelte +93 -92
- package/dist/convex-hull/ConvexHull2D.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHull3D.svelte +109 -140
- package/dist/convex-hull/ConvexHull3D.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHull4D.svelte +75 -94
- package/dist/convex-hull/ConvexHull4D.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHullChrome.svelte +36 -40
- package/dist/convex-hull/ConvexHullControls.svelte +46 -48
- package/dist/convex-hull/ConvexHullStats.svelte +193 -195
- package/dist/convex-hull/ConvexHullTooltip.svelte +5 -12
- package/dist/convex-hull/GasPressureControls.svelte +5 -12
- package/dist/convex-hull/StructurePopup.svelte +17 -21
- package/dist/convex-hull/StructurePopup.svelte.d.ts +2 -0
- package/dist/convex-hull/TemperatureSlider.svelte +4 -10
- package/dist/convex-hull/canvas-interactions.svelte.js +2 -1
- package/dist/convex-hull/helpers.d.ts +8 -10
- package/dist/convex-hull/helpers.js +36 -36
- package/dist/convex-hull/hull-state.svelte.d.ts +1 -1
- package/dist/convex-hull/thermodynamics.js +18 -17
- package/dist/coordination/CoordinationBarPlot.svelte +38 -33
- package/dist/coordination/CoordinationBarPlot.svelte.d.ts +1 -1
- package/dist/coordination/calc-coordination.d.ts +1 -1
- package/dist/coordination/calc-coordination.js +28 -25
- package/dist/element/BohrAtom.svelte +5 -8
- package/dist/element/ElementHeading.svelte +4 -1
- package/dist/element/ElementPhoto.svelte +11 -9
- package/dist/element/ElementStats.svelte +12 -10
- package/dist/element/ElementTile.svelte +24 -29
- package/dist/element/Nucleus.svelte +4 -2
- package/dist/element/data.d.ts +1 -2
- package/dist/element/helpers.d.ts +4 -0
- package/dist/element/helpers.js +18 -0
- package/dist/element/index.d.ts +1 -4
- package/dist/element/index.js +3 -18
- package/dist/feedback/DragOverlay.svelte +5 -5
- package/dist/feedback/DragOverlay.svelte.d.ts +2 -2
- package/dist/feedback/StatusMessage.svelte +7 -4
- package/dist/fermi-surface/FermiSlice.svelte +21 -18
- package/dist/fermi-surface/FermiSurface.svelte +14 -22
- package/dist/fermi-surface/FermiSurface.svelte.d.ts +5 -7
- package/dist/fermi-surface/FermiSurfaceControls.svelte +6 -20
- package/dist/fermi-surface/FermiSurfaceControls.svelte.d.ts +1 -1
- package/dist/fermi-surface/FermiSurfaceScene.svelte +37 -64
- package/dist/fermi-surface/FermiSurfaceScene.svelte.d.ts +1 -1
- package/dist/fermi-surface/FermiSurfaceTooltip.svelte +9 -6
- package/dist/fermi-surface/compute.js +3 -3
- package/dist/fermi-surface/parse.js +22 -24
- package/dist/heatmap-matrix/HeatmapMatrix.svelte +109 -148
- package/dist/heatmap-matrix/HeatmapMatrix.svelte.d.ts +2 -2
- package/dist/heatmap-matrix/HeatmapMatrixControls.svelte +9 -7
- package/dist/heatmap-matrix/HeatmapMatrixControls.svelte.d.ts +1 -1
- package/dist/heatmap-matrix/index.d.ts +5 -0
- package/dist/icons.d.ts +4 -0
- package/dist/icons.js +4 -0
- package/dist/io/ExportPane.svelte +10 -6
- package/dist/io/decompress.d.ts +2 -1
- package/dist/io/decompress.js +22 -35
- package/dist/io/export.d.ts +4 -0
- package/dist/io/export.js +5 -1
- package/dist/io/fetch.d.ts +0 -3
- package/dist/io/fetch.js +0 -11
- package/dist/io/index.d.ts +0 -1
- package/dist/io/index.js +2 -9
- package/dist/io/is-binary.d.ts +9 -0
- package/dist/io/is-binary.js +45 -1
- package/dist/io/url-drop.js +13 -25
- package/dist/isosurface/Isosurface.svelte +17 -23
- package/dist/isosurface/IsosurfaceControls.svelte +37 -42
- package/dist/isosurface/parse-vaspwave.d.ts +3 -0
- package/dist/isosurface/parse-vaspwave.js +138 -0
- package/dist/isosurface/parse.js +6 -6
- package/dist/labels.d.ts +6 -2
- package/dist/labels.js +43 -13
- package/dist/layout/FullscreenButton.svelte +2 -1
- package/dist/layout/FullscreenToggle.svelte +10 -4
- package/dist/layout/InfoCard.svelte +7 -18
- package/dist/layout/InfoTag.svelte +1 -3
- package/dist/layout/NumberRangeInput.svelte +46 -0
- package/dist/layout/NumberRangeInput.svelte.d.ts +12 -0
- package/dist/layout/PropertyFilter.svelte +2 -6
- package/dist/layout/SettingsSection.svelte +21 -17
- package/dist/layout/SubpageGrid.svelte +3 -1
- package/dist/layout/ViewerChrome.svelte +9 -10
- package/dist/layout/ViewerChrome.svelte.d.ts +2 -1
- package/dist/layout/fullscreen.js +3 -5
- package/dist/layout/fullscreen.svelte.js +1 -2
- package/dist/layout/index.d.ts +1 -0
- package/dist/layout/index.js +1 -0
- package/dist/layout/json-tree/JsonNode.svelte +8 -11
- package/dist/layout/json-tree/JsonTree.svelte +53 -77
- package/dist/layout/json-tree/JsonValue.svelte +7 -15
- package/dist/layout/json-tree/utils.js +14 -23
- package/dist/math.d.ts +2 -0
- package/dist/math.js +19 -0
- package/dist/overlays/ContextMenu.svelte +4 -2
- package/dist/overlays/CopyButton.svelte +11 -5
- package/dist/overlays/DragControlTab.svelte +6 -1
- package/dist/overlays/DraggablePane.svelte +81 -26
- package/dist/overlays/DraggablePane.svelte.d.ts +1 -0
- package/dist/overlays/GlassChip.svelte +30 -0
- package/dist/overlays/GlassChip.svelte.d.ts +8 -0
- package/dist/overlays/InfoPaneCards.svelte +11 -23
- package/dist/overlays/index.d.ts +7 -0
- package/dist/overlays/index.js +26 -0
- package/dist/overlays/portal.d.ts +2 -0
- package/dist/overlays/portal.js +14 -0
- package/dist/periodic-table/PeriodicTable.svelte +113 -145
- package/dist/periodic-table/PeriodicTable.svelte.d.ts +5 -3
- package/dist/periodic-table/PeriodicTableControls.svelte +11 -63
- package/dist/periodic-table/TableInset.svelte +9 -4
- package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte +50 -71
- package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte.d.ts +6 -8
- package/dist/phase-diagram/PhaseDiagramControls.svelte +70 -94
- package/dist/phase-diagram/PhaseDiagramControls.svelte.d.ts +1 -1
- package/dist/phase-diagram/PhaseDiagramEditorPane.svelte +2 -1
- package/dist/phase-diagram/PhaseDiagramExportPane.svelte +12 -12
- package/dist/phase-diagram/PhaseDiagramTooltip.svelte +54 -58
- package/dist/phase-diagram/TdbInfoPanel.svelte +21 -15
- package/dist/phase-diagram/build-diagram.js +3 -3
- package/dist/phase-diagram/diagram-input.d.ts +1 -2
- package/dist/phase-diagram/parse.js +15 -15
- package/dist/phase-diagram/svg-to-diagram.js +21 -15
- package/dist/phase-diagram/utils.js +2 -3
- package/dist/plot/bar/BarPlot.svelte +430 -391
- package/dist/plot/bar/BarPlot.svelte.d.ts +2 -0
- package/dist/plot/bar/BarPlotControls.svelte +1 -3
- package/dist/plot/bar/BarPlotControls.svelte.d.ts +4 -6
- package/dist/plot/bar/SpacegroupBarPlot.svelte +29 -36
- package/dist/plot/bar/data.d.ts +5 -4
- package/dist/plot/bar/data.js +2 -1
- package/dist/plot/box/BoxPlot.svelte +301 -209
- package/dist/plot/box/BoxPlot.svelte.d.ts +2 -0
- package/dist/plot/box/Violin.svelte.d.ts +1 -0
- package/dist/plot/box/box-plot.js +1 -1
- package/dist/plot/core/auto-place.js +1 -1
- package/dist/plot/core/axis-utils.d.ts +12 -7
- package/dist/plot/core/axis-utils.js +48 -48
- package/dist/plot/core/components/AxisLabel.svelte +82 -20
- package/dist/plot/core/components/AxisLabel.svelte.d.ts +1 -0
- package/dist/plot/core/components/ColorBar.svelte +101 -106
- package/dist/plot/core/components/ColorScaleSelect.svelte +1 -1
- package/dist/plot/core/components/FillArea.svelte +10 -17
- package/dist/plot/core/components/HierarchyControls.svelte +249 -0
- package/dist/plot/{sunburst/SunburstControls.svelte.d.ts → core/components/HierarchyControls.svelte.d.ts} +12 -8
- package/dist/plot/core/components/InteractiveAxisLabel.svelte +1 -1
- package/dist/plot/core/components/InteractiveAxisLabel.svelte.d.ts +1 -1
- package/dist/plot/core/components/Line.svelte +18 -9
- package/dist/plot/core/components/Line.svelte.d.ts +2 -0
- package/dist/plot/core/components/PlotAxis.svelte +40 -17
- package/dist/plot/core/components/PlotControls.svelte +65 -41
- package/dist/plot/core/components/PlotLegend.svelte +31 -35
- package/dist/plot/core/components/PlotMarginals.svelte +616 -0
- package/dist/plot/core/components/PlotMarginals.svelte.d.ts +15 -0
- package/dist/plot/core/components/PlotTooltip.svelte +1 -1
- package/dist/plot/core/components/PortalSelect.svelte +4 -8
- package/dist/plot/core/components/ReferenceLine.svelte +27 -24
- package/dist/plot/core/components/ReferenceLine3D.svelte +54 -57
- package/dist/plot/core/components/ReferencePlane.svelte +7 -8
- package/dist/plot/core/components/ZeroLines.svelte +4 -8
- package/dist/plot/core/components/ZoomRect.svelte +1 -2
- package/dist/plot/core/components/index.d.ts +1 -0
- package/dist/plot/core/components/index.js +1 -0
- package/dist/plot/core/data-cleaning-signal.d.ts +46 -0
- package/dist/plot/core/data-cleaning-signal.js +467 -0
- package/dist/plot/core/data-cleaning.d.ts +2 -42
- package/dist/plot/core/data-cleaning.js +27 -474
- package/dist/plot/core/data-transform.js +9 -5
- package/dist/plot/core/fill-utils.d.ts +3 -1
- package/dist/plot/core/fill-utils.js +28 -6
- package/dist/plot/core/index.d.ts +1 -0
- package/dist/plot/core/index.js +1 -0
- package/dist/plot/core/interactions.js +0 -2
- package/dist/plot/core/layout.d.ts +3 -1
- package/dist/plot/core/layout.js +22 -13
- package/dist/plot/core/marginals.d.ts +170 -0
- package/dist/plot/core/marginals.js +436 -0
- package/dist/plot/core/reference-line.js +1 -1
- package/dist/plot/core/scales.d.ts +23 -0
- package/dist/plot/core/scales.js +39 -13
- package/dist/plot/core/types/fills.d.ts +101 -0
- package/dist/plot/core/types/fills.js +15 -0
- package/dist/plot/core/types/plot-3d.d.ts +87 -0
- package/dist/plot/core/types/plot-3d.js +4 -0
- package/dist/plot/core/types/reference-lines.d.ts +140 -0
- package/dist/plot/core/types/reference-lines.js +9 -0
- package/dist/plot/core/types.d.ts +29 -324
- package/dist/plot/core/types.js +23 -20
- package/dist/plot/core/utils/hierarchy-chart.d.ts +51 -0
- package/dist/plot/core/utils/hierarchy-chart.js +179 -0
- package/dist/plot/core/utils/hierarchy-labels.d.ts +20 -0
- package/dist/plot/core/utils/hierarchy-labels.js +99 -0
- package/dist/plot/core/utils/label-placement.js +2 -2
- package/dist/plot/histogram/Histogram.svelte +304 -325
- package/dist/plot/histogram/Histogram.svelte.d.ts +7 -7
- package/dist/plot/histogram/HistogramControls.svelte +30 -28
- package/dist/plot/histogram/histogram.d.ts +31 -0
- package/dist/plot/histogram/histogram.js +70 -0
- package/dist/plot/histogram/index.d.ts +1 -0
- package/dist/plot/histogram/index.js +1 -0
- package/dist/plot/index.d.ts +1 -0
- package/dist/plot/index.js +1 -0
- package/dist/plot/sankey/Sankey.svelte +78 -69
- package/dist/plot/sankey/Sankey.svelte.d.ts +2 -2
- package/dist/plot/sankey/SankeyControls.svelte +22 -16
- package/dist/plot/scatter/BinnedScatterPlot.svelte +263 -109
- package/dist/plot/scatter/BinnedScatterPlot.svelte.d.ts +7 -0
- package/dist/plot/scatter/ElementScatter.svelte +4 -1
- package/dist/plot/scatter/ScatterPlot.svelte +477 -385
- package/dist/plot/scatter/ScatterPlot.svelte.d.ts +2 -0
- package/dist/plot/scatter/ScatterPlotControls.svelte +18 -19
- package/dist/plot/scatter/ScatterPlotControls.svelte.d.ts +1 -1
- package/dist/plot/scatter/ScatterPoint.svelte +16 -9
- package/dist/plot/scatter/binned-scatter-types.d.ts +3 -2
- package/dist/plot/scatter/binned-scatter-types.js +6 -1
- package/dist/plot/scatter/scatter-data.d.ts +1 -1
- package/dist/plot/scatter/scatter-data.js +8 -7
- package/dist/plot/scatter-3d/ScatterPlot3D.svelte +25 -34
- package/dist/plot/scatter-3d/ScatterPlot3D.svelte.d.ts +2 -2
- package/dist/plot/scatter-3d/ScatterPlot3DControls.svelte +8 -5
- package/dist/plot/scatter-3d/ScatterPlot3DScene.svelte +113 -116
- package/dist/plot/scatter-3d/ScatterPlot3DScene.svelte.d.ts +2 -2
- package/dist/plot/scatter-3d/Surface3D.svelte +4 -13
- package/dist/plot/sunburst/Sunburst.svelte +251 -329
- package/dist/plot/sunburst/Sunburst.svelte.d.ts +2 -2
- package/dist/plot/sunburst/index.d.ts +1 -1
- package/dist/plot/sunburst/index.js +2 -1
- package/dist/plot/sunburst/render.d.ts +2 -2
- package/dist/plot/sunburst/render.js +47 -22
- package/dist/plot/sunburst/sunburst.d.ts +5 -1
- package/dist/plot/sunburst/sunburst.js +10 -3
- package/dist/plot/treemap/Treemap.svelte +907 -0
- package/dist/plot/treemap/Treemap.svelte.d.ts +84 -0
- package/dist/plot/treemap/index.d.ts +3 -0
- package/dist/plot/treemap/index.js +4 -0
- package/dist/plot/treemap/treemap.d.ts +26 -0
- package/dist/plot/treemap/treemap.js +99 -0
- package/dist/rdf/RdfPlot.svelte +22 -26
- package/dist/rdf/RdfPlot.svelte.d.ts +1 -1
- package/dist/rdf/calc-rdf.js +4 -8
- package/dist/sanitize.js +1 -1
- package/dist/scene/bind-renderer.svelte.js +14 -6
- package/dist/settings.d.ts +19 -9
- package/dist/settings.js +77 -50
- package/dist/spectral/Bands.svelte +223 -230
- package/dist/spectral/BandsAndDos.svelte +11 -9
- package/dist/spectral/BrillouinBandsDos.svelte +19 -27
- package/dist/spectral/Dos.svelte +70 -73
- package/dist/spectral/helpers.d.ts +3 -3
- package/dist/spectral/helpers.js +25 -35
- package/dist/state.svelte.js +5 -18
- package/dist/structure/Arrow.svelte +5 -18
- package/dist/structure/ArrowInstances.svelte +160 -0
- package/dist/structure/ArrowInstances.svelte.d.ts +16 -0
- package/dist/structure/AtomLegend.svelte +115 -75
- package/dist/structure/AtomLegend.svelte.d.ts +1 -1
- package/dist/structure/Bond.svelte +31 -23
- package/dist/structure/CanvasTooltip.svelte +15 -3
- package/dist/structure/CellSelect.svelte +11 -26
- package/dist/structure/Cylinder.svelte +24 -40
- package/dist/structure/InstancedAtoms.svelte +114 -0
- package/dist/structure/InstancedAtoms.svelte.d.ts +15 -0
- package/dist/structure/Lattice.svelte +85 -149
- package/dist/structure/SiteLabels.svelte +122 -0
- package/dist/structure/SiteLabels.svelte.d.ts +18 -0
- package/dist/structure/Structure.svelte +473 -419
- package/dist/structure/Structure.svelte.d.ts +4 -2
- package/dist/structure/StructureCarousel.svelte +630 -0
- package/dist/structure/StructureCarousel.svelte.d.ts +19 -0
- package/dist/structure/StructureControls.svelte +157 -399
- package/dist/structure/StructureControls.svelte.d.ts +1 -1
- package/dist/structure/StructureExportPane.svelte +17 -21
- package/dist/structure/StructureInfoPane.svelte +72 -66
- package/dist/structure/StructureInfoPane.svelte.d.ts +1 -1
- package/dist/structure/StructureScene.svelte +467 -476
- package/dist/structure/StructureScene.svelte.d.ts +3 -1
- package/dist/structure/StructureViewport.svelte +386 -0
- package/dist/structure/StructureViewport.svelte.d.ts +63 -0
- package/dist/structure/atom-label-placement.d.ts +16 -12
- package/dist/structure/atom-label-placement.js +70 -37
- package/dist/structure/atom-properties.d.ts +2 -0
- package/dist/structure/atom-properties.js +104 -38
- package/dist/structure/bonding.d.ts +10 -3
- package/dist/structure/bonding.js +84 -28
- package/dist/structure/edit-history.d.ts +6 -0
- package/dist/structure/edit-history.js +27 -0
- package/dist/structure/export.d.ts +1 -0
- package/dist/structure/export.js +39 -31
- package/dist/structure/format-detect.d.ts +1 -0
- package/dist/structure/format-detect.js +22 -0
- package/dist/structure/geometry.d.ts +9 -0
- package/dist/structure/geometry.js +27 -0
- package/dist/structure/index.d.ts +16 -1
- package/dist/structure/index.js +13 -2
- package/dist/structure/measure.d.ts +1 -1
- package/dist/structure/measure.js +6 -12
- package/dist/structure/parse.d.ts +2 -1
- package/dist/structure/parse.js +243 -222
- package/dist/structure/partial-occupancy.js +4 -2
- package/dist/structure/pbc.js +78 -98
- package/dist/structure/polyhedra.d.ts +0 -1
- package/dist/structure/polyhedra.js +3 -18
- package/dist/structure/supercell.d.ts +1 -2
- package/dist/structure/supercell.js +7 -13
- package/dist/symmetry/SymmetryElements.svelte +11 -15
- package/dist/symmetry/SymmetryStats.svelte +56 -68
- package/dist/symmetry/WyckoffTable.svelte +5 -24
- package/dist/symmetry/cell-transform.js +1 -0
- package/dist/symmetry/index.d.ts +1 -0
- package/dist/symmetry/index.js +8 -2
- package/dist/symmetry/spacegroups.js +3 -2
- package/dist/table/HeatmapTable.svelte +1102 -365
- package/dist/table/HeatmapTable.svelte.d.ts +12 -2
- package/dist/table/ToggleMenu.svelte +5 -12
- package/dist/table/index.d.ts +21 -6
- package/dist/table/index.js +34 -21
- package/dist/theme/ThemeControl.svelte +16 -8
- package/dist/theme/index.d.ts +1 -5
- package/dist/theme/index.js +4 -10
- package/dist/theme/themes.mjs +14 -7
- package/dist/tooltip/KCoords.svelte +4 -1
- package/dist/tooltip/TooltipContent.svelte +2 -5
- package/dist/trajectory/Trajectory.svelte +515 -308
- package/dist/trajectory/Trajectory.svelte.d.ts +1 -1
- package/dist/trajectory/TrajectoryError.svelte +11 -8
- package/dist/trajectory/TrajectoryExportPane.svelte +14 -31
- package/dist/trajectory/TrajectoryInfoPane.svelte +85 -97
- package/dist/trajectory/extract.js +56 -34
- package/dist/trajectory/format-detect.js +11 -9
- package/dist/trajectory/frame-reader.d.ts +2 -0
- package/dist/trajectory/frame-reader.js +33 -29
- package/dist/trajectory/helpers.d.ts +2 -0
- package/dist/trajectory/helpers.js +18 -7
- package/dist/trajectory/index.d.ts +1 -0
- package/dist/trajectory/index.js +3 -0
- package/dist/trajectory/parse/h5-utils.d.ts +13 -0
- package/dist/trajectory/parse/h5-utils.js +109 -0
- package/dist/trajectory/parse/hdf5.d.ts +1 -1
- package/dist/trajectory/parse/hdf5.js +116 -106
- package/dist/trajectory/parse/index.d.ts +2 -3
- package/dist/trajectory/parse/index.js +17 -20
- package/dist/trajectory/parse/lammps.js +8 -12
- package/dist/trajectory/parse/vasp.js +10 -7
- package/dist/trajectory/parse/vaspout-electronic.d.ts +13 -0
- package/dist/trajectory/parse/vaspout-electronic.js +207 -0
- package/dist/trajectory/parse/vaspout-h5.d.ts +5 -0
- package/dist/trajectory/parse/vaspout-h5.js +284 -0
- package/dist/trajectory/parse/xyz.js +11 -7
- package/dist/trajectory/plotting.d.ts +8 -9
- package/dist/trajectory/plotting.js +99 -27
- package/dist/utils.d.ts +3 -0
- package/dist/utils.js +7 -0
- package/dist/xrd/XrdPlot.svelte +47 -61
- package/dist/xrd/broadening.js +2 -1
- package/dist/xrd/calc-xrd.js +2 -4
- package/dist/xrd/parse.d.ts +0 -1
- package/dist/xrd/parse.js +56 -73
- package/package.json +61 -33
- package/dist/api/mp.d.ts +0 -6
- package/dist/api/mp.js +0 -22
- package/dist/plot/sunburst/SunburstControls.svelte +0 -200
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import IsosurfaceControls from '../isosurface/IsosurfaceControls.svelte'
|
|
6
6
|
import type { IsosurfaceSettings, VolumetricData } from '../isosurface/types'
|
|
7
7
|
import { format_num } from '../labels'
|
|
8
|
-
import { SettingsSection } from '../layout'
|
|
8
|
+
import { NumberRangeInput, SettingsSection } from '../layout'
|
|
9
9
|
import { to_degrees, to_radians } from '../math'
|
|
10
10
|
import DraggablePane from '../overlays/DraggablePane.svelte'
|
|
11
11
|
import { ColorScaleSelect } from '../plot'
|
|
@@ -97,15 +97,13 @@
|
|
|
97
97
|
|
|
98
98
|
// Sync local selection to config
|
|
99
99
|
$effect(() => {
|
|
100
|
-
if (
|
|
101
|
-
|
|
102
|
-
) atom_color_config.scale = color_scale_selected[0]
|
|
100
|
+
if (color_scale_selected[0] && color_scale_selected[0] !== atom_color_config.scale)
|
|
101
|
+
atom_color_config.scale = color_scale_selected[0]
|
|
103
102
|
})
|
|
104
103
|
// Sync config to local selection (for external updates)
|
|
105
104
|
$effect(() => {
|
|
106
|
-
if (
|
|
107
|
-
|
|
108
|
-
) color_scale_selected = [atom_color_config.scale]
|
|
105
|
+
if (atom_color_config.scale && atom_color_config.scale !== color_scale_selected[0])
|
|
106
|
+
color_scale_selected = [atom_color_config.scale]
|
|
109
107
|
})
|
|
110
108
|
// Auto-set scale_type based on mode
|
|
111
109
|
$effect(() => {
|
|
@@ -121,9 +119,7 @@
|
|
|
121
119
|
// actually use as centers - minority occupancies of disordered sites never are.
|
|
122
120
|
let structure_elements = $derived(
|
|
123
121
|
[
|
|
124
|
-
...new Set(
|
|
125
|
-
(structure?.sites ?? []).flatMap((site) => get_majority_element(site) ?? []),
|
|
126
|
-
),
|
|
122
|
+
...new Set((structure?.sites ?? []).flatMap((site) => get_majority_element(site) ?? [])),
|
|
127
123
|
].sort(),
|
|
128
124
|
)
|
|
129
125
|
|
|
@@ -135,8 +131,10 @@
|
|
|
135
131
|
const is_polyhedra_center_enabled = (element: string): boolean => {
|
|
136
132
|
const excluded = scene_props.polyhedra_excluded_elements ?? []
|
|
137
133
|
const included = scene_props.polyhedra_included_elements ?? []
|
|
138
|
-
return
|
|
134
|
+
return (
|
|
135
|
+
!excluded.includes(element) &&
|
|
139
136
|
(included.includes(element) || polyhedra_rendered_elements.includes(element))
|
|
137
|
+
)
|
|
140
138
|
}
|
|
141
139
|
|
|
142
140
|
// Toggle an element as polyhedra center. Enabled elements get excluded; disabled
|
|
@@ -154,9 +152,9 @@
|
|
|
154
152
|
}
|
|
155
153
|
}
|
|
156
154
|
|
|
157
|
-
const hex_color_pattern = /^#[0-9a-f]{3}([0-9a-f]{3})?$/i
|
|
155
|
+
const hex_color_pattern = /^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i
|
|
158
156
|
const color_mix_pattern =
|
|
159
|
-
/^color-mix\(in srgb,\s*(
|
|
157
|
+
/^color-mix\(in srgb,\s*(?<hex>#[0-9a-f]{3}(?:[0-9a-f]{3})?)\s+(?<pct>\d+(?:\.\d+)?)%,\s*transparent\)$/i
|
|
160
158
|
|
|
161
159
|
const as_hex_color = (color: string | undefined, fallback: string): string =>
|
|
162
160
|
color?.match(hex_color_pattern)?.[0] ?? fallback
|
|
@@ -183,10 +181,7 @@
|
|
|
183
181
|
: { hex_color, opacity: 1 }
|
|
184
182
|
}
|
|
185
183
|
|
|
186
|
-
const default_site_label_color = as_hex_color(
|
|
187
|
-
DEFAULTS.structure.site_label_color,
|
|
188
|
-
`#111111`,
|
|
189
|
-
)
|
|
184
|
+
const default_site_label_color = as_hex_color(DEFAULTS.structure.site_label_color, `#111111`)
|
|
190
185
|
const default_site_label_bg = parse_label_bg_color(
|
|
191
186
|
DEFAULTS.structure.site_label_bg_color,
|
|
192
187
|
`#000000`,
|
|
@@ -231,10 +226,10 @@
|
|
|
231
226
|
|
|
232
227
|
if (!external_color_changed) scene_props.site_label_color = site_label_hex_color
|
|
233
228
|
if (!external_bg_changed) {
|
|
234
|
-
scene_props.site_label_bg_color =
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
229
|
+
scene_props.site_label_bg_color = `color-mix(in srgb, ${site_label_bg_hex_color} ${format_num(
|
|
230
|
+
site_label_background_opacity,
|
|
231
|
+
`.1~%`,
|
|
232
|
+
)}, transparent)`
|
|
238
233
|
}
|
|
239
234
|
|
|
240
235
|
last_synced_site_label_color = scene_props.site_label_color
|
|
@@ -245,9 +240,7 @@
|
|
|
245
240
|
scene_props.site_label_offset ??= [...DEFAULTS.structure.site_label_offset]
|
|
246
241
|
|
|
247
242
|
// Collect available vector property keys from the structure
|
|
248
|
-
let available_vector_keys = $derived(
|
|
249
|
-
structure ? get_structure_vector_keys(structure) : [],
|
|
250
|
-
)
|
|
243
|
+
let available_vector_keys = $derived(structure ? get_structure_vector_keys(structure) : [])
|
|
251
244
|
const is_key_visible = (key: string): boolean =>
|
|
252
245
|
scene_props.vector_configs?.[key]?.visible !== false
|
|
253
246
|
|
|
@@ -384,6 +377,7 @@
|
|
|
384
377
|
</label>
|
|
385
378
|
{#if available_vector_keys.length > 0}
|
|
386
379
|
{#each available_vector_keys as key, idx (key)}
|
|
380
|
+
{@const key_visible = is_key_visible(key)}
|
|
387
381
|
<label
|
|
388
382
|
{@attach tooltip({
|
|
389
383
|
content: `Toggle ${key} vectors`,
|
|
@@ -392,18 +386,18 @@
|
|
|
392
386
|
>
|
|
393
387
|
<input
|
|
394
388
|
type="checkbox"
|
|
395
|
-
checked={
|
|
396
|
-
onchange={() => update_vector_config(key, { visible: !
|
|
389
|
+
checked={key_visible}
|
|
390
|
+
onchange={() => update_vector_config(key, { visible: !key_visible })}
|
|
397
391
|
/>
|
|
398
392
|
<input
|
|
399
393
|
type="color"
|
|
400
394
|
aria-label={`${key} vector color`}
|
|
401
395
|
value={scene_props.vector_configs?.[key]?.color ??
|
|
402
|
-
|
|
396
|
+
VECTOR_PALETTE[idx % VECTOR_PALETTE.length]}
|
|
403
397
|
onchange={(evt) =>
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
398
|
+
update_vector_config(key, {
|
|
399
|
+
color: evt.currentTarget.value,
|
|
400
|
+
})}
|
|
407
401
|
style="width: 22px; height: 22px; padding: 0; border: none; cursor: pointer"
|
|
408
402
|
/>
|
|
409
403
|
{key}
|
|
@@ -430,10 +424,7 @@
|
|
|
430
424
|
>
|
|
431
425
|
Bonds:
|
|
432
426
|
<select bind:value={scene_props.show_bonds}>
|
|
433
|
-
{#each Object.entries(SETTINGS_CONFIG.structure.show_bonds.enum ?? {}) as
|
|
434
|
-
[value, label]
|
|
435
|
-
(value)
|
|
436
|
-
}
|
|
427
|
+
{#each Object.entries(SETTINGS_CONFIG.structure.show_bonds.enum ?? {}) as [value, label] (value)}
|
|
437
428
|
<option {value}>{label}</option>
|
|
438
429
|
{/each}
|
|
439
430
|
</select>
|
|
@@ -444,10 +435,7 @@
|
|
|
444
435
|
>
|
|
445
436
|
Polyhedra:
|
|
446
437
|
<select bind:value={scene_props.show_polyhedra}>
|
|
447
|
-
{#each Object.entries(SETTINGS_CONFIG.structure.show_polyhedra.enum ?? {}) as
|
|
448
|
-
[value, label]
|
|
449
|
-
(value)
|
|
450
|
-
}
|
|
438
|
+
{#each Object.entries(SETTINGS_CONFIG.structure.show_polyhedra.enum ?? {}) as [value, label] (value)}
|
|
451
439
|
<option {value}>{label}</option>
|
|
452
440
|
{/each}
|
|
453
441
|
</select>
|
|
@@ -484,127 +472,60 @@
|
|
|
484
472
|
Projection
|
|
485
473
|
</span>
|
|
486
474
|
<select bind:value={scene_props.camera_projection}>
|
|
487
|
-
{#each Object.entries(
|
|
488
|
-
SETTINGS_CONFIG.structure.camera_projection.enum ?? {},
|
|
489
|
-
) as
|
|
490
|
-
[value, label]
|
|
491
|
-
(value)
|
|
492
|
-
}
|
|
475
|
+
{#each Object.entries(SETTINGS_CONFIG.structure.camera_projection.enum ?? {}) as [value, label] (value)}
|
|
493
476
|
<option {value}>{label}</option>
|
|
494
477
|
{/each}
|
|
495
478
|
</select>
|
|
496
479
|
</label>
|
|
497
|
-
<
|
|
498
|
-
{
|
|
480
|
+
<NumberRangeInput
|
|
481
|
+
min={0}
|
|
482
|
+
max={2}
|
|
483
|
+
step={0.01}
|
|
484
|
+
bind:value={scene_props.auto_rotate}
|
|
485
|
+
title={SETTINGS_CONFIG.structure.auto_rotate.description}
|
|
486
|
+
>Auto-rotate speed</NumberRangeInput
|
|
499
487
|
>
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
bind:value={scene_props.auto_rotate}
|
|
507
|
-
/>
|
|
508
|
-
<input
|
|
509
|
-
type="range"
|
|
510
|
-
min={0}
|
|
511
|
-
max={2}
|
|
512
|
-
step={0.01}
|
|
513
|
-
bind:value={scene_props.auto_rotate}
|
|
514
|
-
/>
|
|
515
|
-
</label>
|
|
516
|
-
<label
|
|
517
|
-
{@attach tooltip({ content: SETTINGS_CONFIG.structure.rotate_speed.description })}
|
|
488
|
+
<NumberRangeInput
|
|
489
|
+
min={0}
|
|
490
|
+
max={2}
|
|
491
|
+
step={0.05}
|
|
492
|
+
bind:value={scene_props.rotate_speed}
|
|
493
|
+
title={SETTINGS_CONFIG.structure.rotate_speed.description}>Rotate speed</NumberRangeInput
|
|
518
494
|
>
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
bind:value={scene_props.rotate_speed}
|
|
526
|
-
/>
|
|
527
|
-
<input
|
|
528
|
-
type="range"
|
|
529
|
-
min={0}
|
|
530
|
-
max={2}
|
|
531
|
-
step={0.05}
|
|
532
|
-
bind:value={scene_props.rotate_speed}
|
|
533
|
-
/>
|
|
534
|
-
</label>
|
|
535
|
-
<label
|
|
536
|
-
{@attach tooltip({ content: SETTINGS_CONFIG.structure.zoom_speed.description })}
|
|
495
|
+
<NumberRangeInput
|
|
496
|
+
min={0.1}
|
|
497
|
+
max={0.8}
|
|
498
|
+
step={0.02}
|
|
499
|
+
bind:value={scene_props.zoom_speed}
|
|
500
|
+
title={SETTINGS_CONFIG.structure.zoom_speed.description}>Zoom speed</NumberRangeInput
|
|
537
501
|
>
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
bind:value={scene_props.zoom_speed}
|
|
545
|
-
/>
|
|
546
|
-
<input
|
|
547
|
-
type="range"
|
|
548
|
-
min={0.1}
|
|
549
|
-
max={0.8}
|
|
550
|
-
step={0.02}
|
|
551
|
-
bind:value={scene_props.zoom_speed}
|
|
552
|
-
/>
|
|
553
|
-
</label>
|
|
554
|
-
<label
|
|
555
|
-
{@attach tooltip({ content: SETTINGS_CONFIG.structure.pan_speed.description })}
|
|
502
|
+
<NumberRangeInput
|
|
503
|
+
min={0}
|
|
504
|
+
max={2}
|
|
505
|
+
step={0.01}
|
|
506
|
+
bind:value={scene_props.pan_speed}
|
|
507
|
+
title={SETTINGS_CONFIG.structure.pan_speed.description}>Pan speed</NumberRangeInput
|
|
556
508
|
>
|
|
557
|
-
Pan speed
|
|
558
|
-
<input
|
|
559
|
-
type="number"
|
|
560
|
-
min={0}
|
|
561
|
-
max={2}
|
|
562
|
-
step={0.01}
|
|
563
|
-
bind:value={scene_props.pan_speed}
|
|
564
|
-
/>
|
|
565
|
-
<input
|
|
566
|
-
type="range"
|
|
567
|
-
min={0}
|
|
568
|
-
max={2}
|
|
569
|
-
step={0.01}
|
|
570
|
-
bind:value={scene_props.pan_speed}
|
|
571
|
-
/>
|
|
572
|
-
</label>
|
|
573
509
|
<label
|
|
574
510
|
{@attach tooltip({ content: SETTINGS_CONFIG.structure.zoom_to_cursor.description })}
|
|
575
511
|
>
|
|
576
512
|
<input type="checkbox" bind:checked={scene_props.zoom_to_cursor} />
|
|
577
513
|
<span>Zoom to cursor</span>
|
|
578
514
|
</label>
|
|
579
|
-
<
|
|
580
|
-
{
|
|
515
|
+
<NumberRangeInput
|
|
516
|
+
min={0.01}
|
|
517
|
+
max={0.3}
|
|
518
|
+
step={0.01}
|
|
519
|
+
bind:value={scene_props.rotation_damping}
|
|
520
|
+
title={SETTINGS_CONFIG.structure.rotation_damping.description}
|
|
521
|
+
>Rotation damping</NumberRangeInput
|
|
581
522
|
>
|
|
582
|
-
Rotation damping
|
|
583
|
-
<input
|
|
584
|
-
type="number"
|
|
585
|
-
min={0.01}
|
|
586
|
-
max={0.3}
|
|
587
|
-
step={0.01}
|
|
588
|
-
bind:value={scene_props.rotation_damping}
|
|
589
|
-
/>
|
|
590
|
-
<input
|
|
591
|
-
type="range"
|
|
592
|
-
min={0.01}
|
|
593
|
-
max={0.3}
|
|
594
|
-
step={0.01}
|
|
595
|
-
bind:value={scene_props.rotation_damping}
|
|
596
|
-
/>
|
|
597
|
-
</label>
|
|
598
523
|
|
|
599
524
|
Axis Rotation
|
|
600
525
|
<div class="rotation-axes">
|
|
601
526
|
{#each AXIS_COLORS as [axis, color], idx (axis)}
|
|
602
527
|
<div>
|
|
603
|
-
<div
|
|
604
|
-
{@attach tooltip()}
|
|
605
|
-
title="{axis}-axis rotation in degrees"
|
|
606
|
-
style:color
|
|
607
|
-
>
|
|
528
|
+
<div {@attach tooltip()} title="{axis}-axis rotation in degrees" style:color>
|
|
608
529
|
<span>{axis.toUpperCase()} = </span>
|
|
609
530
|
<input
|
|
610
531
|
type="number"
|
|
@@ -612,8 +533,7 @@
|
|
|
612
533
|
max={360}
|
|
613
534
|
step={1}
|
|
614
535
|
value={rotation_degrees[idx].toFixed(0)}
|
|
615
|
-
oninput={(event) =>
|
|
616
|
-
update_rotation(axis, Number(event.currentTarget.value))}
|
|
536
|
+
oninput={(event) => update_rotation(axis, Number(event.currentTarget.value))}
|
|
617
537
|
style:color
|
|
618
538
|
style="margin: 0"
|
|
619
539
|
/>
|
|
@@ -653,34 +573,21 @@
|
|
|
653
573
|
color_scale_selected = [DEFAULTS.structure.atom_color_scale]
|
|
654
574
|
}}
|
|
655
575
|
>
|
|
656
|
-
<
|
|
657
|
-
{
|
|
576
|
+
<NumberRangeInput
|
|
577
|
+
min={0.2}
|
|
578
|
+
max={2}
|
|
579
|
+
step={0.05}
|
|
580
|
+
bind:value={scene_props.atom_radius}
|
|
581
|
+
title={SETTINGS_CONFIG.structure.atom_radius.description}
|
|
582
|
+
>Radius <small>(Å)</small></NumberRangeInput
|
|
658
583
|
>
|
|
659
|
-
Radius <small>(Å)</small>
|
|
660
|
-
<input
|
|
661
|
-
type="number"
|
|
662
|
-
min={0.2}
|
|
663
|
-
max={2}
|
|
664
|
-
step={0.05}
|
|
665
|
-
bind:value={scene_props.atom_radius}
|
|
666
|
-
/>
|
|
667
|
-
<input
|
|
668
|
-
type="range"
|
|
669
|
-
min={0.2}
|
|
670
|
-
max={2}
|
|
671
|
-
step={0.05}
|
|
672
|
-
bind:value={scene_props.atom_radius}
|
|
673
|
-
/>
|
|
674
|
-
</label>
|
|
675
584
|
<label
|
|
676
585
|
{@attach tooltip({ content: SETTINGS_CONFIG.structure.same_size_atoms.description })}
|
|
677
586
|
>
|
|
678
587
|
Same size atoms
|
|
679
588
|
<input type="checkbox" bind:checked={scene_props.same_size_atoms} />
|
|
680
589
|
</label>
|
|
681
|
-
<label
|
|
682
|
-
{@attach tooltip({ content: SETTINGS_CONFIG.color_scheme.description })}
|
|
683
|
-
>
|
|
590
|
+
<label {@attach tooltip({ content: SETTINGS_CONFIG.color_scheme.description })}>
|
|
684
591
|
Color scheme
|
|
685
592
|
<Select
|
|
686
593
|
options={Object.keys(ELEMENT_COLOR_SCHEMES)}
|
|
@@ -695,14 +602,12 @@
|
|
|
695
602
|
aria-label="Color scheme"
|
|
696
603
|
>
|
|
697
604
|
{#snippet children({ option })}
|
|
698
|
-
{@const option_style =
|
|
699
|
-
`display: flex; align-items: center; gap: 6pt; justify-content: space-between;`}
|
|
605
|
+
{@const option_style = `display: flex; align-items: center; gap: 6pt; justify-content: space-between;`}
|
|
700
606
|
<div style={option_style}>
|
|
701
607
|
{option}
|
|
702
608
|
<div style="display: flex; gap: 3pt">
|
|
703
609
|
{#each get_representative_colors(String(option)) as color (color)}
|
|
704
|
-
{@const color_style =
|
|
705
|
-
`width: 15px; height: 15px; border-radius: 2px; background: ${color};`}
|
|
610
|
+
{@const color_style = `width: 15px; height: 15px; border-radius: 2px; background: ${color};`}
|
|
706
611
|
<div style={color_style}></div>
|
|
707
612
|
{/each}
|
|
708
613
|
</div>
|
|
@@ -715,10 +620,7 @@
|
|
|
715
620
|
>
|
|
716
621
|
Atom coloring
|
|
717
622
|
<select bind:value={atom_color_config.mode}>
|
|
718
|
-
{#each Object.entries(SETTINGS_CONFIG.structure.atom_color_mode.enum || {}) as
|
|
719
|
-
[value, label]
|
|
720
|
-
(value)
|
|
721
|
-
}
|
|
623
|
+
{#each Object.entries(SETTINGS_CONFIG.structure.atom_color_mode.enum || {}) as [value, label] (value)}
|
|
722
624
|
<option {value} disabled={!sym_data && value === `wyckoff`}>{label}</option>
|
|
723
625
|
{/each}
|
|
724
626
|
</select>
|
|
@@ -866,31 +768,16 @@
|
|
|
866
768
|
scene_props.vector_color_mode = DEFAULTS.structure.vector_color_mode
|
|
867
769
|
scene_props.vector_color_scale = DEFAULTS.structure.vector_color_scale
|
|
868
770
|
scene_props.vector_normalize = DEFAULTS.structure.vector_normalize
|
|
869
|
-
scene_props.vector_uniform_thickness =
|
|
870
|
-
DEFAULTS.structure.vector_uniform_thickness
|
|
771
|
+
scene_props.vector_uniform_thickness = DEFAULTS.structure.vector_uniform_thickness
|
|
871
772
|
scene_props.vector_origin_gap = DEFAULTS.structure.vector_origin_gap
|
|
872
773
|
for (const key of available_vector_keys) {
|
|
873
774
|
update_vector_config(key, { scale: null })
|
|
874
775
|
}
|
|
875
776
|
}}
|
|
876
777
|
>
|
|
877
|
-
<
|
|
878
|
-
Global Scale
|
|
879
|
-
|
|
880
|
-
type="number"
|
|
881
|
-
min={0.001}
|
|
882
|
-
max={5}
|
|
883
|
-
step={0.001}
|
|
884
|
-
bind:value={scene_props.vector_scale}
|
|
885
|
-
/>
|
|
886
|
-
<input
|
|
887
|
-
type="range"
|
|
888
|
-
min={0.001}
|
|
889
|
-
max={5}
|
|
890
|
-
step={0.001}
|
|
891
|
-
bind:value={scene_props.vector_scale}
|
|
892
|
-
/>
|
|
893
|
-
</label>
|
|
778
|
+
<NumberRangeInput min={0.001} max={5} step={0.001} bind:value={scene_props.vector_scale}
|
|
779
|
+
>Global Scale</NumberRangeInput
|
|
780
|
+
>
|
|
894
781
|
<label
|
|
895
782
|
{@attach tooltip({ content: SETTINGS_CONFIG.structure.vector_normalize.description })}
|
|
896
783
|
style="gap: 6pt"
|
|
@@ -899,7 +786,9 @@
|
|
|
899
786
|
Normalize
|
|
900
787
|
</label>
|
|
901
788
|
<label
|
|
902
|
-
{@attach tooltip({
|
|
789
|
+
{@attach tooltip({
|
|
790
|
+
content: SETTINGS_CONFIG.structure.vector_uniform_thickness.description,
|
|
791
|
+
})}
|
|
903
792
|
style="gap: 6pt"
|
|
904
793
|
>
|
|
905
794
|
<input type="checkbox" bind:checked={scene_props.vector_uniform_thickness} />
|
|
@@ -931,35 +820,24 @@
|
|
|
931
820
|
</label>
|
|
932
821
|
{/if}
|
|
933
822
|
{#if available_vector_keys.length > 1}
|
|
934
|
-
<
|
|
935
|
-
{
|
|
823
|
+
<NumberRangeInput
|
|
824
|
+
min={0}
|
|
825
|
+
max={0.5}
|
|
826
|
+
step={0.02}
|
|
827
|
+
bind:value={scene_props.vector_origin_gap}
|
|
828
|
+
title={SETTINGS_CONFIG.structure.vector_origin_gap.description}
|
|
829
|
+
>Origin Gap</NumberRangeInput
|
|
936
830
|
>
|
|
937
|
-
Origin Gap
|
|
938
|
-
<input
|
|
939
|
-
type="number"
|
|
940
|
-
min={0}
|
|
941
|
-
max={0.5}
|
|
942
|
-
step={0.02}
|
|
943
|
-
bind:value={scene_props.vector_origin_gap}
|
|
944
|
-
/>
|
|
945
|
-
<input
|
|
946
|
-
type="range"
|
|
947
|
-
min={0}
|
|
948
|
-
max={0.5}
|
|
949
|
-
step={0.02}
|
|
950
|
-
bind:value={scene_props.vector_origin_gap}
|
|
951
|
-
/>
|
|
952
|
-
</label>
|
|
953
831
|
{#each available_vector_keys as key (key)}
|
|
954
832
|
{#if is_key_visible(key)}
|
|
955
|
-
{@const on_scale = (
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
update_vector_config(key, { scale: Number.isNaN(parsed) ? 1.0 : parsed })
|
|
960
|
-
}}
|
|
833
|
+
{@const on_scale = (evt: Event & { currentTarget: HTMLInputElement }) => {
|
|
834
|
+
const parsed = parseFloat(evt.currentTarget.value)
|
|
835
|
+
update_vector_config(key, { scale: Number.isNaN(parsed) ? 1.0 : parsed })
|
|
836
|
+
}}
|
|
961
837
|
<label
|
|
962
|
-
{@attach tooltip({
|
|
838
|
+
{@attach tooltip({
|
|
839
|
+
content: `Scale multiplier for ${key} arrows (applied on top of global scale)`,
|
|
840
|
+
})}
|
|
963
841
|
>
|
|
964
842
|
{key} scale
|
|
965
843
|
<input
|
|
@@ -1021,7 +899,9 @@
|
|
|
1021
899
|
</label>
|
|
1022
900
|
<label>
|
|
1023
901
|
<span
|
|
1024
|
-
{@attach tooltip({
|
|
902
|
+
{@attach tooltip({
|
|
903
|
+
content: `Create supercells by repeating the unit cell. Examples: "2x2x2", "3x1x2", or "2"`,
|
|
904
|
+
})}
|
|
1025
905
|
>
|
|
1026
906
|
Supercell Scaling
|
|
1027
907
|
</span>
|
|
@@ -1038,8 +918,8 @@
|
|
|
1038
918
|
pattern="^(\d+|\d+x\d+x\d+)$"
|
|
1039
919
|
aria-invalid={!supercell_input_valid}
|
|
1040
920
|
title={supercell_input_valid
|
|
1041
|
-
|
|
1042
|
-
|
|
921
|
+
? `Valid supercell scaling: ${supercell_scaling}`
|
|
922
|
+
: `Invalid format. Use "2x2x2", "3x1x2", or "2"`}
|
|
1043
923
|
/>
|
|
1044
924
|
</label>
|
|
1045
925
|
{#if supercell_loading}
|
|
@@ -1063,48 +943,15 @@
|
|
|
1063
943
|
</div>
|
|
1064
944
|
{/if}
|
|
1065
945
|
|
|
1066
|
-
{#each [
|
|
1067
|
-
{
|
|
1068
|
-
label: `Edge color`,
|
|
1069
|
-
color_prop: `cell_edge_color`,
|
|
1070
|
-
opacity_prop: `cell_edge_opacity`,
|
|
1071
|
-
step: 0.05,
|
|
1072
|
-
},
|
|
1073
|
-
{
|
|
1074
|
-
label: `Surface color`,
|
|
1075
|
-
color_prop: `cell_surface_color`,
|
|
1076
|
-
opacity_prop: `cell_surface_opacity`,
|
|
1077
|
-
step: 0.01,
|
|
1078
|
-
},
|
|
1079
|
-
] as const as
|
|
1080
|
-
{ label, color_prop, opacity_prop, step }
|
|
1081
|
-
(label)
|
|
1082
|
-
}
|
|
946
|
+
{#each [{ label: `Edge color`, color_prop: `cell_edge_color`, opacity_prop: `cell_edge_opacity`, step: 0.05 }, { label: `Surface color`, color_prop: `cell_surface_color`, opacity_prop: `cell_surface_opacity`, step: 0.01 }] as const as { label, color_prop, opacity_prop, step } (label)}
|
|
1083
947
|
<div class="pane-row">
|
|
1084
948
|
<label>
|
|
1085
949
|
{label}
|
|
1086
|
-
<input
|
|
1087
|
-
type="color"
|
|
1088
|
-
bind:value={lattice_props[color_prop]}
|
|
1089
|
-
/>
|
|
950
|
+
<input type="color" bind:value={lattice_props[color_prop]} />
|
|
1090
951
|
</label>
|
|
1091
|
-
<
|
|
952
|
+
<NumberRangeInput min={0} max={1} {step} bind:value={lattice_props[opacity_prop]}>
|
|
1092
953
|
opacity
|
|
1093
|
-
|
|
1094
|
-
type="number"
|
|
1095
|
-
min={0}
|
|
1096
|
-
max={1}
|
|
1097
|
-
{step}
|
|
1098
|
-
bind:value={lattice_props[opacity_prop]}
|
|
1099
|
-
/>
|
|
1100
|
-
<input
|
|
1101
|
-
type="range"
|
|
1102
|
-
min={0}
|
|
1103
|
-
max={1}
|
|
1104
|
-
{step}
|
|
1105
|
-
bind:value={lattice_props[opacity_prop]}
|
|
1106
|
-
/>
|
|
1107
|
-
</label>
|
|
954
|
+
</NumberRangeInput>
|
|
1108
955
|
</div>
|
|
1109
956
|
{/each}
|
|
1110
957
|
</SettingsSection>
|
|
@@ -1133,17 +980,9 @@
|
|
|
1133
980
|
}}
|
|
1134
981
|
/>
|
|
1135
982
|
</label>
|
|
1136
|
-
<
|
|
983
|
+
<NumberRangeInput min={0} max={1} step={0.02} bind:value={background_opacity}>
|
|
1137
984
|
Opacity
|
|
1138
|
-
|
|
1139
|
-
type="number"
|
|
1140
|
-
min={0}
|
|
1141
|
-
max={1}
|
|
1142
|
-
step={0.02}
|
|
1143
|
-
bind:value={background_opacity}
|
|
1144
|
-
/>
|
|
1145
|
-
<input type="range" min={0} max={1} step={0.02} bind:value={background_opacity} />
|
|
1146
|
-
</label>
|
|
985
|
+
</NumberRangeInput>
|
|
1147
986
|
</div>
|
|
1148
987
|
</SettingsSection>
|
|
1149
988
|
|
|
@@ -1158,44 +997,22 @@
|
|
|
1158
997
|
scene_props.ambient_light = DEFAULTS.structure.ambient_light
|
|
1159
998
|
}}
|
|
1160
999
|
>
|
|
1161
|
-
<
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
bind:value={scene_props.directional_light}
|
|
1178
|
-
/>
|
|
1179
|
-
</label>
|
|
1180
|
-
<label>
|
|
1181
|
-
<span title="Intensity of the ambient light" {@attach tooltip()}>
|
|
1182
|
-
Ambient light
|
|
1183
|
-
</span>
|
|
1184
|
-
<input
|
|
1185
|
-
type="number"
|
|
1186
|
-
min={0.5}
|
|
1187
|
-
max={3}
|
|
1188
|
-
step={0.05}
|
|
1189
|
-
bind:value={scene_props.ambient_light}
|
|
1190
|
-
/>
|
|
1191
|
-
<input
|
|
1192
|
-
type="range"
|
|
1193
|
-
min={0.5}
|
|
1194
|
-
max={3}
|
|
1195
|
-
step={0.05}
|
|
1196
|
-
bind:value={scene_props.ambient_light}
|
|
1197
|
-
/>
|
|
1198
|
-
</label>
|
|
1000
|
+
<NumberRangeInput
|
|
1001
|
+
min={0}
|
|
1002
|
+
max={4}
|
|
1003
|
+
step={0.01}
|
|
1004
|
+
bind:value={scene_props.directional_light}
|
|
1005
|
+
title={SETTINGS_CONFIG.structure.directional_light.description}
|
|
1006
|
+
>Directional light</NumberRangeInput
|
|
1007
|
+
>
|
|
1008
|
+
<NumberRangeInput
|
|
1009
|
+
min={0.5}
|
|
1010
|
+
max={3}
|
|
1011
|
+
step={0.05}
|
|
1012
|
+
bind:value={scene_props.ambient_light}
|
|
1013
|
+
title={SETTINGS_CONFIG.structure.ambient_light.description}
|
|
1014
|
+
>Ambient light</NumberRangeInput
|
|
1015
|
+
>
|
|
1199
1016
|
</SettingsSection>
|
|
1200
1017
|
|
|
1201
1018
|
{#if scene_props.show_bonds && scene_props.show_bonds !== `never`}
|
|
@@ -1218,12 +1035,7 @@
|
|
|
1218
1035
|
>
|
|
1219
1036
|
<label>
|
|
1220
1037
|
Strategy <select bind:value={scene_props.bonding_strategy}>
|
|
1221
|
-
{#each Object.entries(
|
|
1222
|
-
SETTINGS_CONFIG.structure.bonding_strategy.enum ?? {},
|
|
1223
|
-
) as
|
|
1224
|
-
[value, label]
|
|
1225
|
-
(value)
|
|
1226
|
-
}
|
|
1038
|
+
{#each Object.entries(SETTINGS_CONFIG.structure.bonding_strategy.enum ?? {}) as [value, label] (value)}
|
|
1227
1039
|
<option {value}>{label}</option>
|
|
1228
1040
|
{/each}
|
|
1229
1041
|
</select>
|
|
@@ -1237,15 +1049,12 @@
|
|
|
1237
1049
|
</label>
|
|
1238
1050
|
{#if scene_props.auto_bond_order}
|
|
1239
1051
|
<label
|
|
1240
|
-
{@attach tooltip({
|
|
1052
|
+
{@attach tooltip({
|
|
1053
|
+
content: SETTINGS_CONFIG.structure.aromatic_display.description,
|
|
1054
|
+
})}
|
|
1241
1055
|
>
|
|
1242
1056
|
Aromatic display <select bind:value={scene_props.aromatic_display}>
|
|
1243
|
-
{#each Object.entries(
|
|
1244
|
-
SETTINGS_CONFIG.structure.aromatic_display.enum ?? {},
|
|
1245
|
-
) as
|
|
1246
|
-
[value, label]
|
|
1247
|
-
(value)
|
|
1248
|
-
}
|
|
1057
|
+
{#each Object.entries(SETTINGS_CONFIG.structure.aromatic_display.enum ?? {}) as [value, label] (value)}
|
|
1249
1058
|
<option {value}>{label}</option>
|
|
1250
1059
|
{/each}
|
|
1251
1060
|
</select>
|
|
@@ -1254,23 +1063,14 @@
|
|
|
1254
1063
|
<label>
|
|
1255
1064
|
Color <input type="color" bind:value={scene_props.bond_color} />
|
|
1256
1065
|
</label>
|
|
1257
|
-
<
|
|
1066
|
+
<NumberRangeInput
|
|
1067
|
+
min={0.05}
|
|
1068
|
+
max={0.5}
|
|
1069
|
+
step={0.05}
|
|
1070
|
+
bind:value={scene_props.bond_thickness}
|
|
1071
|
+
>
|
|
1258
1072
|
Thickness
|
|
1259
|
-
|
|
1260
|
-
type="number"
|
|
1261
|
-
min={0.05}
|
|
1262
|
-
max={0.5}
|
|
1263
|
-
step={0.05}
|
|
1264
|
-
bind:value={scene_props.bond_thickness}
|
|
1265
|
-
/>
|
|
1266
|
-
<input
|
|
1267
|
-
type="range"
|
|
1268
|
-
min={0.05}
|
|
1269
|
-
max={0.5}
|
|
1270
|
-
step={0.05}
|
|
1271
|
-
bind:value={scene_props.bond_thickness}
|
|
1272
|
-
/>
|
|
1273
|
-
</label>
|
|
1073
|
+
</NumberRangeInput>
|
|
1274
1074
|
</SettingsSection>
|
|
1275
1075
|
{/if}
|
|
1276
1076
|
|
|
@@ -1305,39 +1105,21 @@
|
|
|
1305
1105
|
DEFAULTS.structure.polyhedra_included_elements
|
|
1306
1106
|
}}
|
|
1307
1107
|
>
|
|
1308
|
-
<
|
|
1309
|
-
{
|
|
1310
|
-
|
|
1311
|
-
}
|
|
1108
|
+
<NumberRangeInput
|
|
1109
|
+
min={0}
|
|
1110
|
+
max={1}
|
|
1111
|
+
step={0.05}
|
|
1112
|
+
bind:value={scene_props.polyhedra_opacity}
|
|
1113
|
+
title={SETTINGS_CONFIG.structure.polyhedra_opacity.description}
|
|
1114
|
+
>Opacity</NumberRangeInput
|
|
1312
1115
|
>
|
|
1313
|
-
Opacity
|
|
1314
|
-
<input
|
|
1315
|
-
type="number"
|
|
1316
|
-
min={0}
|
|
1317
|
-
max={1}
|
|
1318
|
-
step={0.05}
|
|
1319
|
-
bind:value={scene_props.polyhedra_opacity}
|
|
1320
|
-
/>
|
|
1321
|
-
<input
|
|
1322
|
-
type="range"
|
|
1323
|
-
min={0}
|
|
1324
|
-
max={1}
|
|
1325
|
-
step={0.05}
|
|
1326
|
-
bind:value={scene_props.polyhedra_opacity}
|
|
1327
|
-
/>
|
|
1328
|
-
</label>
|
|
1329
1116
|
<label
|
|
1330
1117
|
{@attach tooltip({
|
|
1331
1118
|
content: SETTINGS_CONFIG.structure.polyhedra_color_mode.description,
|
|
1332
1119
|
})}
|
|
1333
1120
|
>
|
|
1334
1121
|
Color <select bind:value={scene_props.polyhedra_color_mode}>
|
|
1335
|
-
{#each Object.entries(
|
|
1336
|
-
SETTINGS_CONFIG.structure.polyhedra_color_mode.enum ?? {},
|
|
1337
|
-
) as
|
|
1338
|
-
[value, label]
|
|
1339
|
-
(value)
|
|
1340
|
-
}
|
|
1122
|
+
{#each Object.entries(SETTINGS_CONFIG.structure.polyhedra_color_mode.enum ?? {}) as [value, label] (value)}
|
|
1341
1123
|
<option {value}>{label}</option>
|
|
1342
1124
|
{/each}
|
|
1343
1125
|
</select>
|
|
@@ -1366,53 +1148,29 @@
|
|
|
1366
1148
|
<input type="checkbox" bind:checked={scene_props.polyhedra_hide_center_atoms} />
|
|
1367
1149
|
Hide center atoms
|
|
1368
1150
|
</label>
|
|
1369
|
-
<
|
|
1370
|
-
{
|
|
1371
|
-
|
|
1372
|
-
}
|
|
1151
|
+
<NumberRangeInput
|
|
1152
|
+
min={4}
|
|
1153
|
+
max={12}
|
|
1154
|
+
step={1}
|
|
1155
|
+
bind:value={scene_props.polyhedra_min_neighbors}
|
|
1156
|
+
title={SETTINGS_CONFIG.structure.polyhedra_min_neighbors.description}
|
|
1157
|
+
>Min neighbors</NumberRangeInput
|
|
1373
1158
|
>
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
/>
|
|
1382
|
-
<input
|
|
1383
|
-
type="range"
|
|
1384
|
-
min={4}
|
|
1385
|
-
max={12}
|
|
1386
|
-
step={1}
|
|
1387
|
-
bind:value={scene_props.polyhedra_min_neighbors}
|
|
1388
|
-
/>
|
|
1389
|
-
</label>
|
|
1390
|
-
<label
|
|
1391
|
-
{@attach tooltip({
|
|
1392
|
-
content: SETTINGS_CONFIG.structure.polyhedra_max_neighbors.description,
|
|
1393
|
-
})}
|
|
1159
|
+
<NumberRangeInput
|
|
1160
|
+
min={4}
|
|
1161
|
+
max={16}
|
|
1162
|
+
step={1}
|
|
1163
|
+
bind:value={scene_props.polyhedra_max_neighbors}
|
|
1164
|
+
title={SETTINGS_CONFIG.structure.polyhedra_max_neighbors.description}
|
|
1165
|
+
>Max neighbors</NumberRangeInput
|
|
1394
1166
|
>
|
|
1395
|
-
Max neighbors
|
|
1396
|
-
<input
|
|
1397
|
-
type="number"
|
|
1398
|
-
min={4}
|
|
1399
|
-
max={16}
|
|
1400
|
-
step={1}
|
|
1401
|
-
bind:value={scene_props.polyhedra_max_neighbors}
|
|
1402
|
-
/>
|
|
1403
|
-
<input
|
|
1404
|
-
type="range"
|
|
1405
|
-
min={4}
|
|
1406
|
-
max={16}
|
|
1407
|
-
step={1}
|
|
1408
|
-
bind:value={scene_props.polyhedra_max_neighbors}
|
|
1409
|
-
/>
|
|
1410
|
-
</label>
|
|
1411
1167
|
{#if structure_elements.length > 0}
|
|
1412
1168
|
<div
|
|
1413
1169
|
style="display: flex; flex-wrap: wrap; gap: 8pt; align-items: center"
|
|
1414
1170
|
{@attach tooltip({
|
|
1415
|
-
content:
|
|
1171
|
+
content: `${
|
|
1172
|
+
SETTINGS_CONFIG.structure.polyhedra_excluded_elements.description
|
|
1173
|
+
}. Force-including a spectator center (alkali or heavy alkaline-earth, e.g. Li, Na, Ba) may render its polyhedra truncated at cell boundaries.`,
|
|
1416
1174
|
})}
|
|
1417
1175
|
>
|
|
1418
1176
|
Centers:
|