matterviz 0.3.5 → 0.3.6
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/.vscode/launch.json +13 -0
- package/.vscodeignore +7 -0
- package/dist/assets/STLExporter-BpTH3YHE.js +8 -0
- package/dist/assets/browser-DdDecX_W.js +1 -0
- package/dist/assets/export-qgn-H9y6.js +2 -0
- package/dist/assets/main-DiKYzti2.css +1 -0
- package/dist/assets/moyo_wasm_bg-0ocwg7xY.wasm +0 -0
- package/dist/extension.js +31293 -0
- package/dist/src/lib/FilePicker.svelte +360 -0
- package/dist/src/lib/MillerIndexInput.svelte +66 -0
- package/dist/src/lib/api/mp.ts +26 -0
- package/dist/src/lib/api/optimade.ts +204 -0
- package/dist/src/lib/brillouin/BrillouinZone.svelte +549 -0
- package/dist/src/lib/brillouin/BrillouinZoneControls.svelte +144 -0
- package/dist/src/lib/brillouin/BrillouinZoneExportPane.svelte +146 -0
- package/dist/src/lib/brillouin/BrillouinZoneInfoPane.svelte +146 -0
- package/dist/src/lib/brillouin/BrillouinZoneScene.svelte +476 -0
- package/dist/src/lib/brillouin/BrillouinZoneTooltip.svelte +92 -0
- package/dist/src/lib/brillouin/compute.ts +529 -0
- package/dist/src/lib/brillouin/index.ts +8 -0
- package/dist/src/lib/brillouin/types.ts +51 -0
- package/dist/src/lib/chempot-diagram/ChemPotDiagram.svelte +327 -0
- package/dist/src/lib/chempot-diagram/ChemPotDiagram2D.svelte +846 -0
- package/dist/src/lib/chempot-diagram/ChemPotDiagram3D.svelte +3193 -0
- package/dist/src/lib/chempot-diagram/async-compute.svelte.ts +94 -0
- package/dist/src/lib/chempot-diagram/chempot-worker.ts +11 -0
- package/dist/src/lib/chempot-diagram/color.ts +42 -0
- package/dist/src/lib/chempot-diagram/compute.ts +1014 -0
- package/dist/src/lib/chempot-diagram/index.ts +6 -0
- package/dist/src/lib/chempot-diagram/pointer.ts +56 -0
- package/dist/src/lib/chempot-diagram/temperature.ts +77 -0
- package/dist/src/lib/chempot-diagram/types.ts +130 -0
- package/dist/src/lib/colors/index.ts +249 -0
- package/dist/src/lib/composition/BarChart.svelte +297 -0
- package/dist/src/lib/composition/BubbleChart.svelte +218 -0
- package/dist/src/lib/composition/Composition.svelte +165 -0
- package/dist/src/lib/composition/Formula.svelte +268 -0
- package/dist/src/lib/composition/FormulaFilter.svelte +1257 -0
- package/dist/src/lib/composition/PieChart.svelte +323 -0
- package/dist/src/lib/composition/format.ts +155 -0
- package/dist/src/lib/composition/index.ts +37 -0
- package/dist/src/lib/composition/parse.ts +605 -0
- package/dist/src/lib/constants.ts +134 -0
- package/dist/src/lib/controls.ts +42 -0
- package/dist/src/lib/convex-hull/ConvexHull.svelte +157 -0
- package/dist/src/lib/convex-hull/ConvexHull2D.svelte +825 -0
- package/dist/src/lib/convex-hull/ConvexHull3D.svelte +1801 -0
- package/dist/src/lib/convex-hull/ConvexHull4D.svelte +1398 -0
- package/dist/src/lib/convex-hull/ConvexHullControls.svelte +535 -0
- package/dist/src/lib/convex-hull/ConvexHullInfoPane.svelte +125 -0
- package/dist/src/lib/convex-hull/ConvexHullStats.svelte +929 -0
- package/dist/src/lib/convex-hull/ConvexHullTooltip.svelte +131 -0
- package/dist/src/lib/convex-hull/GasPressureControls.svelte +247 -0
- package/dist/src/lib/convex-hull/StructurePopup.svelte +151 -0
- package/dist/src/lib/convex-hull/TemperatureSlider.svelte +140 -0
- package/dist/src/lib/convex-hull/barycentric-coords.ts +246 -0
- package/dist/src/lib/convex-hull/demo-temperature.ts +63 -0
- package/dist/src/lib/convex-hull/gas-thermodynamics.ts +405 -0
- package/dist/src/lib/convex-hull/helpers.ts +932 -0
- package/dist/src/lib/convex-hull/index.ts +202 -0
- package/dist/src/lib/convex-hull/thermodynamics.ts +2192 -0
- package/dist/src/lib/convex-hull/types.ts +267 -0
- package/dist/src/lib/coordination/CoordinationBarPlot.svelte +311 -0
- package/dist/src/lib/coordination/calc-coordination.ts +93 -0
- package/dist/src/lib/coordination/index.ts +9 -0
- package/dist/src/lib/effects.svelte.ts +48 -0
- package/dist/src/lib/element/BohrAtom.svelte +147 -0
- package/dist/src/lib/element/ElementHeading.svelte +26 -0
- package/dist/src/lib/element/ElementPhoto.svelte +57 -0
- package/dist/src/lib/element/ElementStats.svelte +80 -0
- package/dist/src/lib/element/ElementTile.svelte +484 -0
- package/dist/src/lib/element/data.json.gz.d.ts +4 -0
- package/dist/src/lib/element/data.ts +14 -0
- package/dist/src/lib/element/index.ts +8 -0
- package/dist/src/lib/element/types.ts +62 -0
- package/dist/src/lib/feedback/ClickFeedback.svelte +58 -0
- package/dist/src/lib/feedback/DragOverlay.svelte +42 -0
- package/dist/src/lib/feedback/index.ts +4 -0
- package/dist/src/lib/fermi-surface/FermiSlice.svelte +189 -0
- package/dist/src/lib/fermi-surface/FermiSurface.svelte +600 -0
- package/dist/src/lib/fermi-surface/FermiSurfaceControls.svelte +448 -0
- package/dist/src/lib/fermi-surface/FermiSurfaceScene.svelte +794 -0
- package/dist/src/lib/fermi-surface/FermiSurfaceTooltip.svelte +111 -0
- package/dist/src/lib/fermi-surface/compute.ts +728 -0
- package/dist/src/lib/fermi-surface/constants.ts +32 -0
- package/dist/src/lib/fermi-surface/export.ts +64 -0
- package/dist/src/lib/fermi-surface/index.ts +14 -0
- package/dist/src/lib/fermi-surface/marching-cubes.ts +3 -0
- package/dist/src/lib/fermi-surface/parse.ts +574 -0
- package/dist/src/lib/fermi-surface/symmetry.ts +56 -0
- package/dist/src/lib/fermi-surface/types.ts +159 -0
- package/dist/src/lib/heatmap-matrix/HeatmapMatrix.svelte +1545 -0
- package/dist/src/lib/heatmap-matrix/HeatmapMatrixControls.svelte +225 -0
- package/dist/src/lib/heatmap-matrix/index.ts +167 -0
- package/dist/src/lib/heatmap-matrix/shared.ts +7 -0
- package/dist/src/lib/icons.ts +650 -0
- package/dist/src/lib/index.ts +61 -0
- package/dist/src/lib/io/decompress.ts +92 -0
- package/dist/src/lib/io/export.ts +385 -0
- package/dist/src/lib/io/fetch.ts +46 -0
- package/dist/src/lib/io/file-drop.ts +51 -0
- package/dist/src/lib/io/index.ts +7 -0
- package/dist/src/lib/io/is-binary.ts +24 -0
- package/dist/src/lib/io/types.ts +8 -0
- package/dist/src/lib/io/url-drop.ts +141 -0
- package/dist/src/lib/isosurface/Isosurface.svelte +285 -0
- package/dist/src/lib/isosurface/IsosurfaceControls.svelte +277 -0
- package/dist/src/lib/isosurface/index.ts +7 -0
- package/dist/src/lib/isosurface/parse.ts +656 -0
- package/dist/src/lib/isosurface/slice.ts +175 -0
- package/dist/src/lib/isosurface/types.ts +309 -0
- package/dist/src/lib/labels.ts +320 -0
- package/dist/src/lib/layout/FullscreenToggle.svelte +50 -0
- package/dist/src/lib/layout/InfoCard.svelte +120 -0
- package/dist/src/lib/layout/InfoTag.svelte +185 -0
- package/dist/src/lib/layout/PropertyFilter.svelte +246 -0
- package/dist/src/lib/layout/SettingsSection.svelte +148 -0
- package/dist/src/lib/layout/SubpageGrid.svelte +82 -0
- package/dist/src/lib/layout/fullscreen.ts +65 -0
- package/dist/src/lib/layout/index.ts +11 -0
- package/dist/src/lib/layout/json-tree/JsonNode.svelte +548 -0
- package/dist/src/lib/layout/json-tree/JsonTree.svelte +1230 -0
- package/dist/src/lib/layout/json-tree/JsonValue.svelte +334 -0
- package/dist/src/lib/layout/json-tree/index.ts +3 -0
- package/dist/src/lib/layout/json-tree/types.ts +126 -0
- package/dist/src/lib/layout/json-tree/utils.ts +682 -0
- package/dist/src/lib/marching-cubes.ts +614 -0
- package/dist/src/lib/math.ts +1081 -0
- package/dist/src/lib/overlays/ContextMenu.svelte +162 -0
- package/dist/src/lib/overlays/CopyButton.svelte +45 -0
- package/dist/src/lib/overlays/DragControlTab.svelte +98 -0
- package/dist/src/lib/overlays/DraggablePane.svelte +487 -0
- package/dist/src/lib/overlays/InfoPaneCards.svelte +149 -0
- package/dist/src/lib/overlays/index.ts +3 -0
- package/dist/src/lib/periodic-table/PeriodicTable.svelte +469 -0
- package/dist/src/lib/periodic-table/PeriodicTableControls.svelte +557 -0
- package/dist/src/lib/periodic-table/PropertySelect.svelte +37 -0
- package/dist/src/lib/periodic-table/index.ts +12 -0
- package/dist/src/lib/phase-diagram/IsobaricBinaryPhaseDiagram.svelte +1086 -0
- package/dist/src/lib/phase-diagram/PhaseDiagramControls.svelte +444 -0
- package/dist/src/lib/phase-diagram/PhaseDiagramEditorPane.svelte +126 -0
- package/dist/src/lib/phase-diagram/PhaseDiagramExportPane.svelte +184 -0
- package/dist/src/lib/phase-diagram/PhaseDiagramTooltip.svelte +391 -0
- package/dist/src/lib/phase-diagram/TdbInfoPanel.svelte +203 -0
- package/dist/src/lib/phase-diagram/build-diagram.ts +186 -0
- package/dist/src/lib/phase-diagram/colors.ts +58 -0
- package/dist/src/lib/phase-diagram/diagram-input.ts +40 -0
- package/dist/src/lib/phase-diagram/index.ts +13 -0
- package/dist/src/lib/phase-diagram/parse.ts +348 -0
- package/dist/src/lib/phase-diagram/svg-to-diagram.ts +1023 -0
- package/dist/src/lib/phase-diagram/types.ts +144 -0
- package/dist/src/lib/phase-diagram/utils.ts +775 -0
- package/dist/src/lib/plot/AxisLabel.svelte +51 -0
- package/dist/src/lib/plot/BarPlot.svelte +2113 -0
- package/dist/src/lib/plot/BarPlotControls.svelte +66 -0
- package/dist/src/lib/plot/BinnedScatterPlot.svelte +1114 -0
- package/dist/src/lib/plot/ColorBar.svelte +721 -0
- package/dist/src/lib/plot/ColorScaleSelect.svelte +54 -0
- package/dist/src/lib/plot/ElementScatter.svelte +63 -0
- package/dist/src/lib/plot/FillArea.svelte +223 -0
- package/dist/src/lib/plot/Histogram.svelte +1558 -0
- package/dist/src/lib/plot/HistogramControls.svelte +212 -0
- package/dist/src/lib/plot/InteractiveAxisLabel.svelte +96 -0
- package/dist/src/lib/plot/Line.svelte +84 -0
- package/dist/src/lib/plot/PlotAxis.svelte +169 -0
- package/dist/src/lib/plot/PlotControls.svelte +537 -0
- package/dist/src/lib/plot/PlotLegend.svelte +569 -0
- package/dist/src/lib/plot/PlotTooltip.svelte +67 -0
- package/dist/src/lib/plot/PortalSelect.svelte +253 -0
- package/dist/src/lib/plot/ReferenceLine3D.svelte +156 -0
- package/dist/src/lib/plot/ReferencePlane.svelte +175 -0
- package/dist/src/lib/plot/ScatterPlot.svelte +2778 -0
- package/dist/src/lib/plot/ScatterPlot3D.svelte +529 -0
- package/dist/src/lib/plot/ScatterPlot3DControls.svelte +437 -0
- package/dist/src/lib/plot/ScatterPlot3DScene.svelte +912 -0
- package/dist/src/lib/plot/ScatterPlotControls.svelte +306 -0
- package/dist/src/lib/plot/ScatterPoint.svelte +182 -0
- package/dist/src/lib/plot/SpacegroupBarPlot.svelte +293 -0
- package/dist/src/lib/plot/Surface3D.svelte +197 -0
- package/dist/src/lib/plot/ZeroLines.svelte +97 -0
- package/dist/src/lib/plot/ZoomRect.svelte +23 -0
- package/dist/src/lib/plot/adaptive-density.ts +316 -0
- package/dist/src/lib/plot/auto-place.ts +184 -0
- package/dist/src/lib/plot/axis-utils.ts +122 -0
- package/dist/src/lib/plot/binned-scatter-types.ts +83 -0
- package/dist/src/lib/plot/data-cleaning.ts +1069 -0
- package/dist/src/lib/plot/data-transform.ts +69 -0
- package/dist/src/lib/plot/defaults.ts +9 -0
- package/dist/src/lib/plot/fill-utils.ts +494 -0
- package/dist/src/lib/plot/hover-lock.svelte.ts +60 -0
- package/dist/src/lib/plot/index.ts +53 -0
- package/dist/src/lib/plot/interactions.ts +119 -0
- package/dist/src/lib/plot/layout.ts +425 -0
- package/dist/src/lib/plot/reference-line.ts +426 -0
- package/dist/src/lib/plot/scales.ts +654 -0
- package/dist/src/lib/plot/svg.ts +23 -0
- package/dist/src/lib/plot/types.ts +1144 -0
- package/dist/src/lib/plot/utils/label-placement.ts +541 -0
- package/dist/src/lib/plot/utils/series-visibility.ts +140 -0
- package/dist/src/lib/plot/utils.ts +11 -0
- package/dist/src/lib/rdf/RdfPlot.svelte +247 -0
- package/dist/src/lib/rdf/calc-rdf.ts +167 -0
- package/dist/src/lib/rdf/index.ts +27 -0
- package/dist/src/lib/sanitize.ts +126 -0
- package/dist/src/lib/settings.ts +1479 -0
- package/dist/src/lib/spectral/Bands.svelte +1040 -0
- package/dist/src/lib/spectral/BandsAndDos.svelte +134 -0
- package/dist/src/lib/spectral/BrillouinBandsDos.svelte +252 -0
- package/dist/src/lib/spectral/Dos.svelte +697 -0
- package/dist/src/lib/spectral/helpers.ts +1381 -0
- package/dist/src/lib/spectral/index.ts +8 -0
- package/dist/src/lib/spectral/types.ts +112 -0
- package/dist/src/lib/state.svelte.ts +64 -0
- package/dist/src/lib/structure/Arrow.svelte +72 -0
- package/dist/src/lib/structure/AtomLegend.svelte +815 -0
- package/dist/src/lib/structure/Bond.svelte +140 -0
- package/dist/src/lib/structure/CanvasTooltip.svelte +33 -0
- package/dist/src/lib/structure/CellSelect.svelte +349 -0
- package/dist/src/lib/structure/Cylinder.svelte +45 -0
- package/dist/src/lib/structure/Lattice.svelte +196 -0
- package/dist/src/lib/structure/Structure.svelte +2248 -0
- package/dist/src/lib/structure/StructureControls.svelte +1273 -0
- package/dist/src/lib/structure/StructureExportPane.svelte +252 -0
- package/dist/src/lib/structure/StructureInfoPane.svelte +737 -0
- package/dist/src/lib/structure/StructureScene.svelte +2255 -0
- package/dist/src/lib/structure/atom-properties.ts +316 -0
- package/dist/src/lib/structure/bond-order-perception.ts +447 -0
- package/dist/src/lib/structure/bonding.ts +944 -0
- package/dist/src/lib/structure/export.ts +861 -0
- package/dist/src/lib/structure/index.ts +291 -0
- package/dist/src/lib/structure/label-placement.ts +130 -0
- package/dist/src/lib/structure/measure.ts +45 -0
- package/dist/src/lib/structure/parse.ts +1705 -0
- package/dist/src/lib/structure/partial-occupancy.ts +183 -0
- package/dist/src/lib/structure/pbc.ts +164 -0
- package/dist/src/lib/structure/supercell.ts +226 -0
- package/dist/src/lib/structure/validation.ts +11 -0
- package/dist/src/lib/symmetry/SymmetryStats.svelte +226 -0
- package/dist/src/lib/symmetry/WyckoffTable.svelte +120 -0
- package/dist/src/lib/symmetry/cell-transform.ts +118 -0
- package/dist/src/lib/symmetry/index.ts +348 -0
- package/dist/src/lib/symmetry/spacegroups.ts +404 -0
- package/dist/src/lib/table/HeatmapTable.svelte +1833 -0
- package/dist/src/lib/table/ToggleMenu.svelte +385 -0
- package/dist/src/lib/table/index.ts +139 -0
- package/dist/src/lib/theme/ThemeControl.svelte +53 -0
- package/dist/src/lib/theme/index.ts +107 -0
- package/dist/src/lib/theme/themes.mjs +297 -0
- package/dist/src/lib/time.ts +71 -0
- package/dist/src/lib/tooltip/TooltipContent.svelte +58 -0
- package/dist/src/lib/tooltip/index.ts +2 -0
- package/dist/src/lib/tooltip/types.ts +13 -0
- package/dist/src/lib/trajectory/Trajectory.svelte +1545 -0
- package/dist/src/lib/trajectory/TrajectoryError.svelte +128 -0
- package/dist/src/lib/trajectory/TrajectoryExportPane.svelte +357 -0
- package/dist/src/lib/trajectory/TrajectoryInfoPane.svelte +313 -0
- package/dist/src/lib/trajectory/constants.ts +7 -0
- package/dist/src/lib/trajectory/extract.ts +196 -0
- package/dist/src/lib/trajectory/format-detect.ts +96 -0
- package/dist/src/lib/trajectory/frame-reader.ts +456 -0
- package/dist/src/lib/trajectory/helpers.ts +217 -0
- package/dist/src/lib/trajectory/index.ts +218 -0
- package/dist/src/lib/trajectory/parse/ase.ts +109 -0
- package/dist/src/lib/trajectory/parse/hdf5.ts +173 -0
- package/dist/src/lib/trajectory/parse/index.ts +411 -0
- package/dist/src/lib/trajectory/parse/lammps.ts +215 -0
- package/dist/src/lib/trajectory/parse/vasp.ts +102 -0
- package/dist/src/lib/trajectory/parse/xyz.ts +143 -0
- package/dist/src/lib/trajectory/plotting.ts +599 -0
- package/dist/src/lib/trajectory/types.ts +13 -0
- package/dist/src/lib/utils.ts +56 -0
- package/dist/src/lib/xrd/XrdPlot.svelte +615 -0
- package/dist/src/lib/xrd/broadening.ts +130 -0
- package/dist/src/lib/xrd/calc-xrd.ts +397 -0
- package/dist/src/lib/xrd/index.ts +38 -0
- package/dist/src/lib/xrd/parse.ts +858 -0
- package/dist/webview.js +29421 -0
- package/icon.png +0 -0
- package/license +1 -1
- package/matterviz-0.3.2.vsix +0 -0
- package/matterviz-0.3.4.vsix +0 -0
- package/matterviz-0.3.5.vsix +0 -0
- package/package.json +1460 -215
- package/readme.md +171 -98
- package/scripts/sync-config.ts +101 -0
- package/src/declarations.d.ts +2 -0
- package/src/extension.ts +972 -0
- package/src/node-io.ts +65 -0
- package/src/types.ts +17 -0
- package/src/webview/JsonBrowser.svelte +1079 -0
- package/src/webview/PlotPanel.svelte +346 -0
- package/src/webview/detect.ts +444 -0
- package/src/webview/main.ts +764 -0
- package/src/webview/plot-utils.ts +250 -0
- package/test-fixtures/all-viz-types.json.gz +0 -0
- package/test-fixtures/plot-demo-data.json.gz +0 -0
- package/tests/detect.test.ts +604 -0
- package/tests/extension.test.ts +2041 -0
- package/tests/node-io.test.ts +39 -0
- package/tests/plot-utils.test.ts +302 -0
- package/tests/vite-plugin-json-gz.test.ts +114 -0
- package/tests/vscode-mock.ts +18 -0
- package/tests/webview.test.ts +231 -0
- package/tsconfig.json +20 -0
- package/vite-plugin-json-gz.ts +29 -0
- package/vite.config.ts +34 -0
- package/vite.extension.config.ts +34 -0
- package/dist/EmptyState.svelte.d.ts +0 -9
- package/dist/FilePicker.svelte +0 -360
- package/dist/FilePicker.svelte.d.ts +0 -17
- package/dist/Icon.svelte.d.ts +0 -13
- package/dist/MillerIndexInput.svelte +0 -66
- package/dist/MillerIndexInput.svelte.d.ts +0 -7
- package/dist/api/mp.d.ts +0 -6
- package/dist/api/mp.js +0 -22
- package/dist/api/optimade.d.ts +0 -45
- package/dist/api/optimade.js +0 -135
- package/dist/brillouin/BrillouinZone.svelte +0 -546
- package/dist/brillouin/BrillouinZone.svelte.d.ts +0 -83
- package/dist/brillouin/BrillouinZoneControls.svelte +0 -144
- package/dist/brillouin/BrillouinZoneControls.svelte.d.ts +0 -17
- package/dist/brillouin/BrillouinZoneExportPane.svelte +0 -148
- package/dist/brillouin/BrillouinZoneExportPane.svelte.d.ts +0 -15
- package/dist/brillouin/BrillouinZoneInfoPane.svelte +0 -146
- package/dist/brillouin/BrillouinZoneInfoPane.svelte.d.ts +0 -13
- package/dist/brillouin/BrillouinZoneScene.svelte +0 -476
- package/dist/brillouin/BrillouinZoneScene.svelte.d.ts +0 -48
- package/dist/brillouin/BrillouinZoneTooltip.svelte +0 -92
- package/dist/brillouin/BrillouinZoneTooltip.svelte.d.ts +0 -8
- package/dist/brillouin/compute.d.ts +0 -17
- package/dist/brillouin/compute.js +0 -426
- package/dist/brillouin/index.d.ts +0 -8
- package/dist/brillouin/index.js +0 -8
- package/dist/brillouin/types.d.ts +0 -48
- package/dist/brillouin/types.js +0 -1
- package/dist/chempot-diagram/ChemPotDiagram.svelte +0 -327
- package/dist/chempot-diagram/ChemPotDiagram.svelte.d.ts +0 -13
- package/dist/chempot-diagram/ChemPotDiagram2D.svelte +0 -847
- package/dist/chempot-diagram/ChemPotDiagram2D.svelte.d.ts +0 -16
- package/dist/chempot-diagram/ChemPotDiagram3D.svelte +0 -3194
- package/dist/chempot-diagram/ChemPotDiagram3D.svelte.d.ts +0 -16
- package/dist/chempot-diagram/ChemPotScene3D.svelte.d.ts +0 -7
- package/dist/chempot-diagram/async-compute.svelte.d.ts +0 -3
- package/dist/chempot-diagram/async-compute.svelte.js +0 -78
- package/dist/chempot-diagram/chempot-worker.d.ts +0 -1
- package/dist/chempot-diagram/chempot-worker.js +0 -11
- package/dist/chempot-diagram/color.d.ts +0 -10
- package/dist/chempot-diagram/color.js +0 -32
- package/dist/chempot-diagram/compute.d.ts +0 -48
- package/dist/chempot-diagram/compute.js +0 -812
- package/dist/chempot-diagram/index.d.ts +0 -6
- package/dist/chempot-diagram/index.js +0 -6
- package/dist/chempot-diagram/pointer.d.ts +0 -16
- package/dist/chempot-diagram/pointer.js +0 -40
- package/dist/chempot-diagram/temperature.d.ts +0 -15
- package/dist/chempot-diagram/temperature.js +0 -36
- package/dist/chempot-diagram/types.d.ts +0 -86
- package/dist/chempot-diagram/types.js +0 -28
- package/dist/colors/index.d.ts +0 -47
- package/dist/colors/index.js +0 -203
- package/dist/composition/BarChart.svelte +0 -297
- package/dist/composition/BarChart.svelte.d.ts +0 -39
- package/dist/composition/BubbleChart.svelte +0 -218
- package/dist/composition/BubbleChart.svelte.d.ts +0 -28
- package/dist/composition/Composition.svelte +0 -164
- package/dist/composition/Composition.svelte.d.ts +0 -15
- package/dist/composition/Formula.svelte +0 -265
- package/dist/composition/Formula.svelte.d.ts +0 -19
- package/dist/composition/FormulaFilter.svelte +0 -1259
- package/dist/composition/FormulaFilter.svelte.d.ts +0 -51
- package/dist/composition/PieChart.svelte +0 -323
- package/dist/composition/PieChart.svelte.d.ts +0 -37
- package/dist/composition/format.d.ts +0 -15
- package/dist/composition/format.js +0 -109
- package/dist/composition/index.d.ts +0 -20
- package/dist/composition/index.js +0 -14
- package/dist/composition/parse.d.ts +0 -55
- package/dist/composition/parse.js +0 -459
- package/dist/constants.d.ts +0 -29
- package/dist/constants.js +0 -99
- package/dist/controls.d.ts +0 -14
- package/dist/controls.js +0 -30
- package/dist/convex-hull/ConvexHull.svelte +0 -157
- package/dist/convex-hull/ConvexHull.svelte.d.ts +0 -13
- package/dist/convex-hull/ConvexHull2D.svelte +0 -814
- package/dist/convex-hull/ConvexHull2D.svelte.d.ts +0 -11
- package/dist/convex-hull/ConvexHull3D.svelte +0 -1790
- package/dist/convex-hull/ConvexHull3D.svelte.d.ts +0 -8
- package/dist/convex-hull/ConvexHull4D.svelte +0 -1386
- package/dist/convex-hull/ConvexHull4D.svelte.d.ts +0 -8
- package/dist/convex-hull/ConvexHullControls.svelte +0 -546
- package/dist/convex-hull/ConvexHullControls.svelte.d.ts +0 -48
- package/dist/convex-hull/ConvexHullInfoPane.svelte +0 -122
- package/dist/convex-hull/ConvexHullInfoPane.svelte.d.ts +0 -18
- package/dist/convex-hull/ConvexHullStats.svelte +0 -922
- package/dist/convex-hull/ConvexHullStats.svelte.d.ts +0 -15
- package/dist/convex-hull/ConvexHullTooltip.svelte +0 -131
- package/dist/convex-hull/ConvexHullTooltip.svelte.d.ts +0 -33
- package/dist/convex-hull/GasPressureControls.svelte +0 -247
- package/dist/convex-hull/GasPressureControls.svelte.d.ts +0 -11
- package/dist/convex-hull/StructurePopup.svelte +0 -116
- package/dist/convex-hull/StructurePopup.svelte.d.ts +0 -18
- package/dist/convex-hull/TemperatureSlider.svelte +0 -137
- package/dist/convex-hull/TemperatureSlider.svelte.d.ts +0 -8
- package/dist/convex-hull/barycentric-coords.d.ts +0 -18
- package/dist/convex-hull/barycentric-coords.js +0 -182
- package/dist/convex-hull/demo-temperature.d.ts +0 -6
- package/dist/convex-hull/demo-temperature.js +0 -40
- package/dist/convex-hull/gas-thermodynamics.d.ts +0 -16
- package/dist/convex-hull/gas-thermodynamics.js +0 -316
- package/dist/convex-hull/helpers.d.ts +0 -103
- package/dist/convex-hull/helpers.js +0 -689
- package/dist/convex-hull/index.d.ts +0 -118
- package/dist/convex-hull/index.js +0 -57
- package/dist/convex-hull/thermodynamics.d.ts +0 -66
- package/dist/convex-hull/thermodynamics.js +0 -1752
- package/dist/convex-hull/types.d.ts +0 -162
- package/dist/convex-hull/types.js +0 -36
- package/dist/coordination/CoordinationBarPlot.svelte +0 -311
- package/dist/coordination/CoordinationBarPlot.svelte.d.ts +0 -30
- package/dist/coordination/calc-coordination.d.ts +0 -15
- package/dist/coordination/calc-coordination.js +0 -63
- package/dist/coordination/index.d.ts +0 -8
- package/dist/coordination/index.js +0 -7
- package/dist/element/BohrAtom.svelte +0 -147
- package/dist/element/BohrAtom.svelte.d.ts +0 -20
- package/dist/element/ElementHeading.svelte +0 -26
- package/dist/element/ElementHeading.svelte.d.ts +0 -8
- package/dist/element/ElementPhoto.svelte +0 -57
- package/dist/element/ElementPhoto.svelte.d.ts +0 -9
- package/dist/element/ElementStats.svelte +0 -80
- package/dist/element/ElementStats.svelte.d.ts +0 -8
- package/dist/element/ElementTile.svelte +0 -484
- package/dist/element/ElementTile.svelte.d.ts +0 -29
- package/dist/element/Nucleus.svelte.d.ts +0 -17
- package/dist/element/data.d.ts +0 -2
- package/dist/element/data.js +0 -2
- package/dist/element/data.json.gz.d.ts +0 -2
- package/dist/element/index.d.ts +0 -8
- package/dist/element/index.js +0 -8
- package/dist/element/types.d.ts +0 -57
- package/dist/element/types.js +0 -1
- package/dist/feedback/ClickFeedback.svelte +0 -58
- package/dist/feedback/ClickFeedback.svelte.d.ts +0 -12
- package/dist/feedback/DragOverlay.svelte +0 -42
- package/dist/feedback/DragOverlay.svelte.d.ts +0 -7
- package/dist/feedback/Spinner.svelte.d.ts +0 -7
- package/dist/feedback/StatusMessage.svelte.d.ts +0 -9
- package/dist/feedback/index.d.ts +0 -4
- package/dist/feedback/index.js +0 -4
- package/dist/fermi-surface/FermiSlice.svelte +0 -189
- package/dist/fermi-surface/FermiSlice.svelte.d.ts +0 -24
- package/dist/fermi-surface/FermiSurface.svelte +0 -600
- package/dist/fermi-surface/FermiSurface.svelte.d.ts +0 -83
- package/dist/fermi-surface/FermiSurfaceControls.svelte +0 -452
- package/dist/fermi-surface/FermiSurfaceControls.svelte.d.ts +0 -35
- package/dist/fermi-surface/FermiSurfaceScene.svelte +0 -792
- package/dist/fermi-surface/FermiSurfaceScene.svelte.d.ts +0 -50
- package/dist/fermi-surface/FermiSurfaceTooltip.svelte +0 -111
- package/dist/fermi-surface/FermiSurfaceTooltip.svelte.d.ts +0 -8
- package/dist/fermi-surface/compute.d.ts +0 -5
- package/dist/fermi-surface/compute.js +0 -538
- package/dist/fermi-surface/constants.d.ts +0 -9
- package/dist/fermi-surface/constants.js +0 -27
- package/dist/fermi-surface/export.d.ts +0 -5
- package/dist/fermi-surface/export.js +0 -63
- package/dist/fermi-surface/index.d.ts +0 -12
- package/dist/fermi-surface/index.js +0 -13
- package/dist/fermi-surface/marching-cubes.d.ts +0 -2
- package/dist/fermi-surface/marching-cubes.js +0 -2
- package/dist/fermi-surface/parse.d.ts +0 -2
- package/dist/fermi-surface/parse.js +0 -495
- package/dist/fermi-surface/symmetry.d.ts +0 -3
- package/dist/fermi-surface/symmetry.js +0 -46
- package/dist/fermi-surface/types.d.ts +0 -113
- package/dist/fermi-surface/types.js +0 -4
- package/dist/heatmap-matrix/HeatmapMatrix.svelte +0 -1527
- package/dist/heatmap-matrix/HeatmapMatrix.svelte.d.ts +0 -110
- package/dist/heatmap-matrix/HeatmapMatrixControls.svelte +0 -225
- package/dist/heatmap-matrix/HeatmapMatrixControls.svelte.d.ts +0 -30
- package/dist/heatmap-matrix/index.d.ts +0 -53
- package/dist/heatmap-matrix/index.js +0 -100
- package/dist/heatmap-matrix/shared.d.ts +0 -2
- package/dist/heatmap-matrix/shared.js +0 -4
- package/dist/icons.d.ts +0 -569
- package/dist/icons.js +0 -648
- package/dist/index.d.ts +0 -39
- package/dist/index.js +0 -39
- package/dist/io/decompress.d.ts +0 -10
- package/dist/io/decompress.js +0 -74
- package/dist/io/export.d.ts +0 -16
- package/dist/io/export.js +0 -316
- package/dist/io/fetch.d.ts +0 -5
- package/dist/io/fetch.js +0 -39
- package/dist/io/file-drop.d.ts +0 -7
- package/dist/io/file-drop.js +0 -43
- package/dist/io/index.d.ts +0 -7
- package/dist/io/index.js +0 -7
- package/dist/io/is-binary.d.ts +0 -1
- package/dist/io/is-binary.js +0 -20
- package/dist/io/types.d.ts +0 -8
- package/dist/io/types.js +0 -1
- package/dist/io/url-drop.d.ts +0 -2
- package/dist/io/url-drop.js +0 -117
- package/dist/isosurface/Isosurface.svelte +0 -285
- package/dist/isosurface/Isosurface.svelte.d.ts +0 -8
- package/dist/isosurface/IsosurfaceControls.svelte +0 -291
- package/dist/isosurface/IsosurfaceControls.svelte.d.ts +0 -9
- package/dist/isosurface/index.d.ts +0 -5
- package/dist/isosurface/index.js +0 -6
- package/dist/isosurface/parse.d.ts +0 -6
- package/dist/isosurface/parse.js +0 -553
- package/dist/isosurface/slice.d.ts +0 -11
- package/dist/isosurface/slice.js +0 -140
- package/dist/isosurface/types.d.ts +0 -56
- package/dist/isosurface/types.js +0 -227
- package/dist/labels.d.ts +0 -53
- package/dist/labels.js +0 -274
- package/dist/layout/FullscreenToggle.svelte +0 -50
- package/dist/layout/FullscreenToggle.svelte.d.ts +0 -7
- package/dist/layout/InfoCard.svelte +0 -120
- package/dist/layout/InfoCard.svelte.d.ts +0 -21
- package/dist/layout/InfoTag.svelte +0 -183
- package/dist/layout/InfoTag.svelte.d.ts +0 -19
- package/dist/layout/PropertyFilter.svelte +0 -244
- package/dist/layout/PropertyFilter.svelte.d.ts +0 -24
- package/dist/layout/SettingsSection.svelte +0 -148
- package/dist/layout/SettingsSection.svelte.d.ts +0 -17
- package/dist/layout/SubpageGrid.svelte +0 -82
- package/dist/layout/SubpageGrid.svelte.d.ts +0 -14
- package/dist/layout/fullscreen.d.ts +0 -9
- package/dist/layout/fullscreen.js +0 -53
- package/dist/layout/index.d.ts +0 -10
- package/dist/layout/index.js +0 -8
- package/dist/layout/json-tree/JsonNode.svelte +0 -548
- package/dist/layout/json-tree/JsonNode.svelte.d.ts +0 -11
- package/dist/layout/json-tree/JsonTree.svelte +0 -1222
- package/dist/layout/json-tree/JsonTree.svelte.d.ts +0 -6
- package/dist/layout/json-tree/JsonValue.svelte +0 -334
- package/dist/layout/json-tree/JsonValue.svelte.d.ts +0 -9
- package/dist/layout/json-tree/index.d.ts +0 -3
- package/dist/layout/json-tree/index.js +0 -3
- package/dist/layout/json-tree/types.d.ts +0 -73
- package/dist/layout/json-tree/types.js +0 -3
- package/dist/layout/json-tree/utils.d.ts +0 -29
- package/dist/layout/json-tree/utils.js +0 -649
- package/dist/marching-cubes.d.ts +0 -14
- package/dist/marching-cubes.js +0 -542
- package/dist/math.d.ts +0 -91
- package/dist/math.js +0 -896
- package/dist/overlays/ContextMenu.svelte +0 -162
- package/dist/overlays/ContextMenu.svelte.d.ts +0 -25
- package/dist/overlays/CopyButton.svelte +0 -45
- package/dist/overlays/CopyButton.svelte.d.ts +0 -8
- package/dist/overlays/DraggablePane.svelte +0 -564
- package/dist/overlays/DraggablePane.svelte.d.ts +0 -36
- package/dist/overlays/InfoPaneCards.svelte +0 -149
- package/dist/overlays/InfoPaneCards.svelte.d.ts +0 -22
- package/dist/overlays/index.d.ts +0 -2
- package/dist/overlays/index.js +0 -2
- package/dist/periodic-table/PeriodicTable.svelte +0 -469
- package/dist/periodic-table/PeriodicTable.svelte.d.ts +0 -55
- package/dist/periodic-table/PeriodicTableControls.svelte +0 -557
- package/dist/periodic-table/PeriodicTableControls.svelte.d.ts +0 -24
- package/dist/periodic-table/PropertySelect.svelte +0 -37
- package/dist/periodic-table/PropertySelect.svelte.d.ts +0 -13
- package/dist/periodic-table/TableInset.svelte.d.ts +0 -9
- package/dist/periodic-table/index.d.ts +0 -10
- package/dist/periodic-table/index.js +0 -4
- package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte +0 -1084
- package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte.d.ts +0 -44
- package/dist/phase-diagram/PhaseDiagramControls.svelte +0 -449
- package/dist/phase-diagram/PhaseDiagramControls.svelte.d.ts +0 -30
- package/dist/phase-diagram/PhaseDiagramEditorPane.svelte +0 -126
- package/dist/phase-diagram/PhaseDiagramEditorPane.svelte.d.ts +0 -15
- package/dist/phase-diagram/PhaseDiagramExportPane.svelte +0 -192
- package/dist/phase-diagram/PhaseDiagramExportPane.svelte.d.ts +0 -19
- package/dist/phase-diagram/PhaseDiagramTooltip.svelte +0 -392
- package/dist/phase-diagram/PhaseDiagramTooltip.svelte.d.ts +0 -16
- package/dist/phase-diagram/TdbInfoPanel.svelte +0 -203
- package/dist/phase-diagram/TdbInfoPanel.svelte.d.ts +0 -12
- package/dist/phase-diagram/build-diagram.d.ts +0 -11
- package/dist/phase-diagram/build-diagram.js +0 -167
- package/dist/phase-diagram/colors.d.ts +0 -35
- package/dist/phase-diagram/colors.js +0 -51
- package/dist/phase-diagram/diagram-input.d.ts +0 -33
- package/dist/phase-diagram/diagram-input.js +0 -3
- package/dist/phase-diagram/index.d.ts +0 -13
- package/dist/phase-diagram/index.js +0 -13
- package/dist/phase-diagram/parse.d.ts +0 -55
- package/dist/phase-diagram/parse.js +0 -276
- package/dist/phase-diagram/svg-to-diagram.d.ts +0 -2
- package/dist/phase-diagram/svg-to-diagram.js +0 -867
- package/dist/phase-diagram/types.d.ts +0 -99
- package/dist/phase-diagram/types.js +0 -1
- package/dist/phase-diagram/utils.d.ts +0 -118
- package/dist/phase-diagram/utils.js +0 -606
- package/dist/plot/AxisLabel.svelte +0 -51
- package/dist/plot/AxisLabel.svelte.d.ts +0 -16
- package/dist/plot/BarPlot.svelte +0 -2265
- package/dist/plot/BarPlot.svelte.d.ts +0 -83
- package/dist/plot/BarPlotControls.svelte +0 -66
- package/dist/plot/BarPlotControls.svelte.d.ts +0 -18
- package/dist/plot/ColorBar.svelte +0 -719
- package/dist/plot/ColorBar.svelte.d.ts +0 -31
- package/dist/plot/ColorScaleSelect.svelte +0 -54
- package/dist/plot/ColorScaleSelect.svelte.d.ts +0 -15
- package/dist/plot/ElementScatter.svelte +0 -63
- package/dist/plot/ElementScatter.svelte.d.ts +0 -14
- package/dist/plot/FillArea.svelte +0 -225
- package/dist/plot/FillArea.svelte.d.ts +0 -21
- package/dist/plot/Histogram.svelte +0 -1672
- package/dist/plot/Histogram.svelte.d.ts +0 -50
- package/dist/plot/HistogramControls.svelte +0 -212
- package/dist/plot/HistogramControls.svelte.d.ts +0 -22
- package/dist/plot/InteractiveAxisLabel.svelte +0 -94
- package/dist/plot/InteractiveAxisLabel.svelte.d.ts +0 -14
- package/dist/plot/Line.svelte +0 -84
- package/dist/plot/Line.svelte.d.ts +0 -15
- package/dist/plot/PlotControls.svelte +0 -537
- package/dist/plot/PlotControls.svelte.d.ts +0 -4
- package/dist/plot/PlotLegend.svelte +0 -569
- package/dist/plot/PlotLegend.svelte.d.ts +0 -29
- package/dist/plot/PlotTooltip.svelte +0 -67
- package/dist/plot/PlotTooltip.svelte.d.ts +0 -17
- package/dist/plot/PortalSelect.svelte +0 -253
- package/dist/plot/PortalSelect.svelte.d.ts +0 -16
- package/dist/plot/ReferenceLine.svelte.d.ts +0 -20
- package/dist/plot/ReferenceLine3D.svelte +0 -154
- package/dist/plot/ReferenceLine3D.svelte.d.ts +0 -14
- package/dist/plot/ReferencePlane.svelte +0 -178
- package/dist/plot/ReferencePlane.svelte.d.ts +0 -14
- package/dist/plot/ScatterPlot.svelte +0 -2845
- package/dist/plot/ScatterPlot.svelte.d.ts +0 -93
- package/dist/plot/ScatterPlot3D.svelte +0 -502
- package/dist/plot/ScatterPlot3D.svelte.d.ts +0 -94
- package/dist/plot/ScatterPlot3DControls.svelte +0 -437
- package/dist/plot/ScatterPlot3DControls.svelte.d.ts +0 -20
- package/dist/plot/ScatterPlot3DScene.svelte +0 -912
- package/dist/plot/ScatterPlot3DScene.svelte.d.ts +0 -74
- package/dist/plot/ScatterPlotControls.svelte +0 -307
- package/dist/plot/ScatterPlotControls.svelte.d.ts +0 -17
- package/dist/plot/ScatterPoint.svelte +0 -191
- package/dist/plot/ScatterPoint.svelte.d.ts +0 -21
- package/dist/plot/SpacegroupBarPlot.svelte +0 -293
- package/dist/plot/SpacegroupBarPlot.svelte.d.ts +0 -9
- package/dist/plot/Surface3D.svelte +0 -200
- package/dist/plot/Surface3D.svelte.d.ts +0 -13
- package/dist/plot/ZeroLines.svelte +0 -96
- package/dist/plot/ZeroLines.svelte.d.ts +0 -32
- package/dist/plot/ZoomRect.svelte +0 -23
- package/dist/plot/ZoomRect.svelte.d.ts +0 -8
- package/dist/plot/axis-utils.d.ts +0 -19
- package/dist/plot/axis-utils.js +0 -80
- package/dist/plot/data-cleaning.d.ts +0 -37
- package/dist/plot/data-cleaning.js +0 -855
- package/dist/plot/data-transform.d.ts +0 -16
- package/dist/plot/data-transform.js +0 -45
- package/dist/plot/defaults.d.ts +0 -19
- package/dist/plot/defaults.js +0 -9
- package/dist/plot/fill-utils.d.ts +0 -51
- package/dist/plot/fill-utils.js +0 -337
- package/dist/plot/hover-lock.svelte.d.ts +0 -14
- package/dist/plot/hover-lock.svelte.js +0 -46
- package/dist/plot/index.d.ts +0 -37
- package/dist/plot/index.js +0 -37
- package/dist/plot/interactions.d.ts +0 -12
- package/dist/plot/interactions.js +0 -100
- package/dist/plot/layout.d.ts +0 -60
- package/dist/plot/layout.js +0 -230
- package/dist/plot/reference-line.d.ts +0 -60
- package/dist/plot/reference-line.js +0 -316
- package/dist/plot/scales.d.ts +0 -48
- package/dist/plot/scales.js +0 -484
- package/dist/plot/svg.d.ts +0 -1
- package/dist/plot/svg.js +0 -11
- package/dist/plot/types.d.ts +0 -859
- package/dist/plot/types.js +0 -103
- package/dist/plot/utils/label-placement.d.ts +0 -47
- package/dist/plot/utils/label-placement.js +0 -256
- package/dist/plot/utils/series-visibility.d.ts +0 -9
- package/dist/plot/utils/series-visibility.js +0 -67
- package/dist/plot/utils.d.ts +0 -1
- package/dist/plot/utils.js +0 -14
- package/dist/rdf/RdfPlot.svelte +0 -247
- package/dist/rdf/RdfPlot.svelte.d.ts +0 -27
- package/dist/rdf/calc-rdf.d.ts +0 -4
- package/dist/rdf/calc-rdf.js +0 -111
- package/dist/rdf/index.d.ts +0 -23
- package/dist/rdf/index.js +0 -2
- package/dist/sanitize.d.ts +0 -4
- package/dist/sanitize.js +0 -114
- package/dist/settings.d.ts +0 -255
- package/dist/settings.js +0 -1132
- package/dist/spectral/Bands.svelte +0 -1040
- package/dist/spectral/Bands.svelte.d.ts +0 -40
- package/dist/spectral/BandsAndDos.svelte +0 -128
- package/dist/spectral/BandsAndDos.svelte.d.ts +0 -18
- package/dist/spectral/BrillouinBandsDos.svelte +0 -248
- package/dist/spectral/BrillouinBandsDos.svelte.d.ts +0 -20
- package/dist/spectral/Dos.svelte +0 -697
- package/dist/spectral/Dos.svelte.d.ts +0 -29
- package/dist/spectral/helpers.d.ts +0 -117
- package/dist/spectral/helpers.js +0 -1023
- package/dist/spectral/index.d.ts +0 -6
- package/dist/spectral/index.js +0 -7
- package/dist/spectral/types.d.ts +0 -84
- package/dist/spectral/types.js +0 -2
- package/dist/state.svelte.d.ts +0 -25
- package/dist/state.svelte.js +0 -45
- package/dist/structure/Arrow.svelte +0 -72
- package/dist/structure/Arrow.svelte.d.ts +0 -15
- package/dist/structure/AtomLegend.svelte +0 -798
- package/dist/structure/AtomLegend.svelte.d.ts +0 -34
- package/dist/structure/Bond.svelte +0 -140
- package/dist/structure/Bond.svelte.d.ts +0 -9
- package/dist/structure/CanvasTooltip.svelte +0 -33
- package/dist/structure/CanvasTooltip.svelte.d.ts +0 -12
- package/dist/structure/CellSelect.svelte +0 -351
- package/dist/structure/CellSelect.svelte.d.ts +0 -13
- package/dist/structure/Cylinder.svelte +0 -45
- package/dist/structure/Cylinder.svelte.d.ts +0 -10
- package/dist/structure/Lattice.svelte +0 -196
- package/dist/structure/Lattice.svelte.d.ts +0 -17
- package/dist/structure/Structure.svelte +0 -1999
- package/dist/structure/Structure.svelte.d.ts +0 -87
- package/dist/structure/StructureControls.svelte +0 -1298
- package/dist/structure/StructureControls.svelte.d.ts +0 -31
- package/dist/structure/StructureExportPane.svelte +0 -251
- package/dist/structure/StructureExportPane.svelte.d.ts +0 -17
- package/dist/structure/StructureInfoPane.svelte +0 -735
- package/dist/structure/StructureInfoPane.svelte.d.ts +0 -19
- package/dist/structure/StructureScene.svelte +0 -1905
- package/dist/structure/StructureScene.svelte.d.ts +0 -108
- package/dist/structure/atom-properties.d.ts +0 -37
- package/dist/structure/atom-properties.js +0 -200
- package/dist/structure/bond-order-perception.d.ts +0 -13
- package/dist/structure/bond-order-perception.js +0 -367
- package/dist/structure/bonding.d.ts +0 -42
- package/dist/structure/bonding.js +0 -525
- package/dist/structure/export.d.ts +0 -20
- package/dist/structure/export.js +0 -727
- package/dist/structure/index.d.ts +0 -125
- package/dist/structure/index.js +0 -171
- package/dist/structure/label-placement.d.ts +0 -14
- package/dist/structure/label-placement.js +0 -72
- package/dist/structure/measure.d.ts +0 -6
- package/dist/structure/measure.js +0 -29
- package/dist/structure/parse.d.ts +0 -66
- package/dist/structure/parse.js +0 -1363
- package/dist/structure/partial-occupancy.d.ts +0 -25
- package/dist/structure/partial-occupancy.js +0 -99
- package/dist/structure/pbc.d.ts +0 -9
- package/dist/structure/pbc.js +0 -123
- package/dist/structure/supercell.d.ts +0 -8
- package/dist/structure/supercell.js +0 -170
- package/dist/structure/validation.d.ts +0 -2
- package/dist/structure/validation.js +0 -10
- package/dist/symmetry/SymmetryStats.svelte +0 -226
- package/dist/symmetry/SymmetryStats.svelte.d.ts +0 -21
- package/dist/symmetry/WyckoffTable.svelte +0 -113
- package/dist/symmetry/WyckoffTable.svelte.d.ts +0 -11
- package/dist/symmetry/cell-transform.d.ts +0 -12
- package/dist/symmetry/cell-transform.js +0 -91
- package/dist/symmetry/index.d.ts +0 -43
- package/dist/symmetry/index.js +0 -229
- package/dist/symmetry/spacegroups.d.ts +0 -9
- package/dist/symmetry/spacegroups.js +0 -394
- package/dist/table/HeatmapTable.svelte +0 -1854
- package/dist/table/HeatmapTable.svelte.d.ts +0 -49
- package/dist/table/ToggleMenu.svelte +0 -376
- package/dist/table/ToggleMenu.svelte.d.ts +0 -11
- package/dist/table/index.d.ts +0 -74
- package/dist/table/index.js +0 -38
- package/dist/theme/ThemeControl.svelte +0 -53
- package/dist/theme/ThemeControl.svelte.d.ts +0 -9
- package/dist/theme/index.d.ts +0 -29
- package/dist/theme/index.js +0 -79
- package/dist/theme/themes.mjs +0 -285
- package/dist/time.d.ts +0 -4
- package/dist/time.js +0 -70
- package/dist/tooltip/TooltipContent.svelte +0 -58
- package/dist/tooltip/TooltipContent.svelte.d.ts +0 -31
- package/dist/tooltip/index.d.ts +0 -2
- package/dist/tooltip/index.js +0 -2
- package/dist/tooltip/types.d.ts +0 -8
- package/dist/tooltip/types.js +0 -1
- package/dist/trajectory/Trajectory.svelte +0 -1517
- package/dist/trajectory/Trajectory.svelte.d.ts +0 -77
- package/dist/trajectory/TrajectoryError.svelte +0 -128
- package/dist/trajectory/TrajectoryError.svelte.d.ts +0 -13
- package/dist/trajectory/TrajectoryExportPane.svelte +0 -357
- package/dist/trajectory/TrajectoryExportPane.svelte.d.ts +0 -17
- package/dist/trajectory/TrajectoryInfoPane.svelte +0 -313
- package/dist/trajectory/TrajectoryInfoPane.svelte.d.ts +0 -17
- package/dist/trajectory/constants.d.ts +0 -6
- package/dist/trajectory/constants.js +0 -7
- package/dist/trajectory/extract.d.ts +0 -5
- package/dist/trajectory/extract.js +0 -162
- package/dist/trajectory/format-detect.d.ts +0 -9
- package/dist/trajectory/format-detect.js +0 -76
- package/dist/trajectory/frame-reader.d.ts +0 -17
- package/dist/trajectory/frame-reader.js +0 -332
- package/dist/trajectory/helpers.d.ts +0 -14
- package/dist/trajectory/helpers.js +0 -172
- package/dist/trajectory/index.d.ts +0 -63
- package/dist/trajectory/index.js +0 -126
- package/dist/trajectory/parse/ase.d.ts +0 -2
- package/dist/trajectory/parse/ase.js +0 -73
- package/dist/trajectory/parse/hdf5.d.ts +0 -2
- package/dist/trajectory/parse/hdf5.js +0 -127
- package/dist/trajectory/parse/index.d.ts +0 -12
- package/dist/trajectory/parse/index.js +0 -299
- package/dist/trajectory/parse/lammps.d.ts +0 -5
- package/dist/trajectory/parse/lammps.js +0 -179
- package/dist/trajectory/parse/vasp.d.ts +0 -2
- package/dist/trajectory/parse/vasp.js +0 -68
- package/dist/trajectory/parse/xyz.d.ts +0 -2
- package/dist/trajectory/parse/xyz.js +0 -110
- package/dist/trajectory/plotting.d.ts +0 -28
- package/dist/trajectory/plotting.js +0 -423
- package/dist/trajectory/types.d.ts +0 -11
- package/dist/trajectory/types.js +0 -1
- package/dist/utils.d.ts +0 -5
- package/dist/utils.js +0 -36
- package/dist/xrd/XrdPlot.svelte +0 -615
- package/dist/xrd/XrdPlot.svelte.d.ts +0 -28
- package/dist/xrd/broadening.d.ts +0 -20
- package/dist/xrd/broadening.js +0 -97
- package/dist/xrd/calc-xrd.d.ts +0 -37
- package/dist/xrd/calc-xrd.js +0 -337
- package/dist/xrd/index.d.ts +0 -37
- package/dist/xrd/index.js +0 -4
- package/dist/xrd/parse.d.ts +0 -13
- package/dist/xrd/parse.js +0 -749
- /package/dist/{EmptyState.svelte → src/lib/EmptyState.svelte} +0 -0
- /package/dist/{Icon.svelte → src/lib/Icon.svelte} +0 -0
- /package/dist/{app.css → src/lib/app.css} +0 -0
- /package/dist/{chempot-diagram → src/lib/chempot-diagram}/ChemPotScene3D.svelte +0 -0
- /package/dist/{colors → src/lib/colors}/alloy-colors.json +0 -0
- /package/dist/{colors → src/lib/colors}/dark-mode-colors.json +0 -0
- /package/dist/{colors → src/lib/colors}/jmol-colors.json +0 -0
- /package/dist/{colors → src/lib/colors}/muted-colors.json +0 -0
- /package/dist/{colors → src/lib/colors}/pastel-colors.json +0 -0
- /package/dist/{colors → src/lib/colors}/vesta-colors.json +0 -0
- /package/dist/{element → src/lib/element}/Nucleus.svelte +0 -0
- /package/dist/{element → src/lib/element}/data.json +0 -0
- /package/dist/{element → src/lib/element}/data.json.gz +0 -0
- /package/dist/{element → src/lib/element}/data.schema.json +0 -0
- /package/dist/{element-image-urls.json → src/lib/element-image-urls.json} +0 -0
- /package/dist/{feedback → src/lib/feedback}/Spinner.svelte +0 -0
- /package/dist/{feedback → src/lib/feedback}/StatusMessage.svelte +0 -0
- /package/dist/{periodic-table → src/lib/periodic-table}/TableInset.svelte +0 -0
- /package/dist/{plot → src/lib/plot}/ReferenceLine.svelte +0 -0
- /package/dist/{xrd → src/lib/xrd}/atomic_scattering_params.json +0 -0
|
@@ -0,0 +1,697 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { PLOT_COLORS } from '$lib/colors'
|
|
3
|
+
import EmptyState from '$lib/EmptyState.svelte'
|
|
4
|
+
import { SettingsSection } from '$lib/layout'
|
|
5
|
+
import ScatterPlot from '$lib/plot/ScatterPlot.svelte'
|
|
6
|
+
import type { AxisConfig, DataSeries } from '$lib/plot/types'
|
|
7
|
+
import type { ComponentProps } from 'svelte'
|
|
8
|
+
import { tooltip as attach_tooltip } from 'svelte-multiselect/attachments'
|
|
9
|
+
import {
|
|
10
|
+
apply_gaussian_smearing,
|
|
11
|
+
calculate_sigma_step,
|
|
12
|
+
convert_frequencies,
|
|
13
|
+
extract_efermi,
|
|
14
|
+
extract_pdos,
|
|
15
|
+
format_dos_tooltip,
|
|
16
|
+
format_sigma,
|
|
17
|
+
FREQUENCY_UNITS,
|
|
18
|
+
IMAGINARY_MODE_NOISE_THRESHOLD,
|
|
19
|
+
is_valid_range,
|
|
20
|
+
negative_fraction,
|
|
21
|
+
NORMALIZATION_MODES,
|
|
22
|
+
normalize_densities,
|
|
23
|
+
normalize_dos,
|
|
24
|
+
SPIN_MODES,
|
|
25
|
+
validate_sigma_range,
|
|
26
|
+
} from './helpers'
|
|
27
|
+
import type {
|
|
28
|
+
DosData,
|
|
29
|
+
DosInput,
|
|
30
|
+
FrequencyUnit,
|
|
31
|
+
NormalizationMode,
|
|
32
|
+
PdosType,
|
|
33
|
+
SpinMode,
|
|
34
|
+
StackedAreaData,
|
|
35
|
+
} from './types'
|
|
36
|
+
|
|
37
|
+
let {
|
|
38
|
+
doses,
|
|
39
|
+
stack = false,
|
|
40
|
+
sigma = $bindable(0),
|
|
41
|
+
units = $bindable(`THz`),
|
|
42
|
+
normalize = $bindable(null),
|
|
43
|
+
orientation = `vertical`,
|
|
44
|
+
show_legend = true,
|
|
45
|
+
x_axis = {},
|
|
46
|
+
y_axis = $bindable({}),
|
|
47
|
+
hovered_frequency = $bindable(null),
|
|
48
|
+
reference_frequency = null,
|
|
49
|
+
fermi_level = undefined,
|
|
50
|
+
spin_mode = $bindable(`mirror`),
|
|
51
|
+
pdos_type = null,
|
|
52
|
+
pdos_filter = undefined,
|
|
53
|
+
// Controls configuration
|
|
54
|
+
show_controls = true,
|
|
55
|
+
show_sigma_control = true,
|
|
56
|
+
show_normalize_control = false,
|
|
57
|
+
show_units_control = false,
|
|
58
|
+
sigma_range = undefined,
|
|
59
|
+
...rest
|
|
60
|
+
}: ComponentProps<typeof ScatterPlot> & {
|
|
61
|
+
doses: DosInput | Record<string, DosInput>
|
|
62
|
+
x_axis?: AxisConfig
|
|
63
|
+
y_axis?: AxisConfig
|
|
64
|
+
stack?: boolean
|
|
65
|
+
sigma?: number
|
|
66
|
+
units?: FrequencyUnit
|
|
67
|
+
normalize?: NormalizationMode
|
|
68
|
+
orientation?: `vertical` | `horizontal`
|
|
69
|
+
show_legend?: boolean
|
|
70
|
+
hovered_frequency?: number | null
|
|
71
|
+
reference_frequency?: number | null
|
|
72
|
+
fermi_level?: number // Fermi level for electronic DOS (auto-detected if not provided)
|
|
73
|
+
spin_mode?: SpinMode // How to display spin-polarized DOS: mirror (default), overlay, up_only, down_only, or null (auto)
|
|
74
|
+
pdos_type?: PdosType | null // Extract projected DOS: 'atom' for atom-resolved, 'orbital' for orbital-resolved (s, p, d)
|
|
75
|
+
pdos_filter?: string[] // Filter projected DOS to specific keys (e.g., ["Fe", "O"] for atoms or ["s", "p", "d"] for orbitals)
|
|
76
|
+
// Controls configuration
|
|
77
|
+
show_controls?: boolean // Show the controls pane
|
|
78
|
+
show_sigma_control?: boolean // Show sigma/smearing control
|
|
79
|
+
show_normalize_control?: boolean // Show normalization selector
|
|
80
|
+
show_units_control?: boolean // Show units selector (phonon DOS only)
|
|
81
|
+
sigma_range?: [number, number] // Min/max range for sigma slider (auto-detected if not provided)
|
|
82
|
+
} = $props()
|
|
83
|
+
|
|
84
|
+
const is_horizontal = $derived(orientation === `horizontal`)
|
|
85
|
+
|
|
86
|
+
// Normalize input to dict format - converts any DosInput format to DosData
|
|
87
|
+
// If pdos_type is set, extract projected DOS from the input instead
|
|
88
|
+
let doses_dict = $derived.by((): Record<string, DosData> => {
|
|
89
|
+
if (!doses) return {}
|
|
90
|
+
|
|
91
|
+
// If pdos_type is set, try to extract projected DOS
|
|
92
|
+
if (pdos_type) {
|
|
93
|
+
// Try extracting from the doses object directly (single CompleteDos)
|
|
94
|
+
const pdos = extract_pdos(doses, pdos_type, pdos_filter)
|
|
95
|
+
if (pdos) return pdos
|
|
96
|
+
|
|
97
|
+
// Try extracting from first entry if doses is a dict
|
|
98
|
+
if (typeof doses === `object` && !(`densities` in doses)) {
|
|
99
|
+
const first_dos = Object.values(doses)[0]
|
|
100
|
+
const pdos_from_first = extract_pdos(first_dos, pdos_type, pdos_filter)
|
|
101
|
+
if (pdos_from_first) return pdos_from_first
|
|
102
|
+
}
|
|
103
|
+
// PDOS extraction was requested but failed - warn and revert to normal processing
|
|
104
|
+
console.warn(
|
|
105
|
+
`PDOS extraction requested (pdos_type="${pdos_type}") but no projected DOS data found. ` +
|
|
106
|
+
`Falling back to total DOS. Ensure input has atom_dos (for atom) or spd_dos (for orbital) data.`,
|
|
107
|
+
)
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (`densities` in doses && (`frequencies` in doses || `energies` in doses)) {
|
|
111
|
+
// Single DOS
|
|
112
|
+
const normalized = normalize_dos(doses)
|
|
113
|
+
return normalized ? { '': normalized } : {}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Already a dict - normalize each DOS
|
|
117
|
+
const result: Record<string, DosData> = {}
|
|
118
|
+
for (const [key, dos] of Object.entries(doses as Record<string, DosInput>)) {
|
|
119
|
+
const normalized = normalize_dos(dos)
|
|
120
|
+
if (normalized) result[key] = normalized
|
|
121
|
+
}
|
|
122
|
+
return result
|
|
123
|
+
})
|
|
124
|
+
|
|
125
|
+
// Determine if this is phonon or electronic DOS using discriminated union
|
|
126
|
+
let is_phonon = $derived(Object.values(doses_dict)[0]?.type === `phonon`)
|
|
127
|
+
|
|
128
|
+
// Auto-detect Fermi level from electronic DOS data if not explicitly provided
|
|
129
|
+
let effective_fermi_level = $derived.by((): number | undefined => {
|
|
130
|
+
if (fermi_level !== undefined) return fermi_level
|
|
131
|
+
if (is_phonon) return undefined
|
|
132
|
+
return extract_efermi(doses)
|
|
133
|
+
})
|
|
134
|
+
|
|
135
|
+
// Check if any DOS in the dict has spin-polarized data
|
|
136
|
+
let has_spin_polarized = $derived(
|
|
137
|
+
Object.values(doses_dict).some(
|
|
138
|
+
(dos) => dos.type === `electronic` && dos.spin_down_densities?.length,
|
|
139
|
+
),
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
// Effective spin mode: null means auto-detect (mirror if spin data exists)
|
|
143
|
+
let effective_spin_mode = $derived.by((): SpinMode => {
|
|
144
|
+
if (spin_mode !== null) return spin_mode
|
|
145
|
+
return has_spin_polarized ? `mirror` : null
|
|
146
|
+
})
|
|
147
|
+
|
|
148
|
+
// Convert DOS data to scatter plot series and stacked area data
|
|
149
|
+
// Performance: Only recalculates when doses_dict, units, sigma, normalize, or spin_mode changes
|
|
150
|
+
let { series_data, stacked_areas } = $derived.by(
|
|
151
|
+
(): { series_data: DataSeries[]; stacked_areas: StackedAreaData[] } => {
|
|
152
|
+
if (Object.keys(doses_dict).length === 0) {
|
|
153
|
+
return { series_data: [], stacked_areas: [] }
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const all_series: DataSeries[] = []
|
|
157
|
+
const areas: StackedAreaData[] = []
|
|
158
|
+
const dos_entries = Object.entries(doses_dict)
|
|
159
|
+
// Separate cumulative trackers for spin-up and spin-down in overlay mode
|
|
160
|
+
// This prevents spin-down from incorrectly stacking on top of spin-up
|
|
161
|
+
let cumulative_spin_up: number[] | null = null
|
|
162
|
+
let cumulative_spin_down: number[] | null = null
|
|
163
|
+
|
|
164
|
+
for (let dos_idx = 0; dos_idx < dos_entries.length; dos_idx++) {
|
|
165
|
+
const [label, dos] = dos_entries[dos_idx]
|
|
166
|
+
const color = PLOT_COLORS[dos_idx % PLOT_COLORS.length]
|
|
167
|
+
|
|
168
|
+
// Get frequencies or energies using discriminated union type narrowing
|
|
169
|
+
let x_values = dos.type === `phonon` ? dos.frequencies : dos.energies
|
|
170
|
+
|
|
171
|
+
// Convert units if needed
|
|
172
|
+
if (dos.type === `phonon` && units !== `THz`) {
|
|
173
|
+
x_values = convert_frequencies(x_values, units)
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Check for spin-down data (only for electronic DOS)
|
|
177
|
+
const has_spin_down = dos.type === `electronic` &&
|
|
178
|
+
dos.spin_down_densities?.length === dos.densities.length
|
|
179
|
+
const should_show_spin_up = effective_spin_mode !== `down_only`
|
|
180
|
+
const should_show_spin_down = has_spin_down &&
|
|
181
|
+
effective_spin_mode !== `up_only` && effective_spin_mode !== null
|
|
182
|
+
|
|
183
|
+
// Process spin-up (or total) densities
|
|
184
|
+
if (should_show_spin_up) {
|
|
185
|
+
let densities_up = sigma > 0
|
|
186
|
+
? apply_gaussian_smearing(x_values, dos.densities, sigma)
|
|
187
|
+
: [...dos.densities]
|
|
188
|
+
|
|
189
|
+
densities_up = normalize_densities(densities_up, x_values, normalize)
|
|
190
|
+
|
|
191
|
+
// Store previous cumulative for area fill baseline
|
|
192
|
+
const prev_cumulative = cumulative_spin_up ? [...cumulative_spin_up] : null
|
|
193
|
+
|
|
194
|
+
// For stacked plots, accumulate densities (only if array lengths match)
|
|
195
|
+
if (stack && cumulative_spin_up?.length === densities_up.length) {
|
|
196
|
+
densities_up = densities_up.map((density, idx) =>
|
|
197
|
+
density + (cumulative_spin_up?.[idx] ?? 0)
|
|
198
|
+
)
|
|
199
|
+
} else if (stack && cumulative_spin_up) {
|
|
200
|
+
console.warn(`DOS stacking: length mismatch for "${label}"`)
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// Store stacked area data for rendering
|
|
204
|
+
if (stack) {
|
|
205
|
+
areas.push({
|
|
206
|
+
x_values: [...x_values],
|
|
207
|
+
upper_densities: [...densities_up],
|
|
208
|
+
lower_densities: prev_cumulative ?? x_values.map(() => 0),
|
|
209
|
+
color,
|
|
210
|
+
})
|
|
211
|
+
cumulative_spin_up = densities_up
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
const spin_label = has_spin_down && effective_spin_mode
|
|
215
|
+
? `${label || `DOS ${dos_idx + 1}`} (↑)`
|
|
216
|
+
: (label || `DOS ${dos_idx + 1}`)
|
|
217
|
+
|
|
218
|
+
const series_up: DataSeries = {
|
|
219
|
+
x: is_horizontal ? densities_up : x_values,
|
|
220
|
+
y: is_horizontal ? x_values : densities_up,
|
|
221
|
+
markers: `line`,
|
|
222
|
+
label: spin_label,
|
|
223
|
+
line_style: { stroke: color, stroke_width: 1.5 },
|
|
224
|
+
point_style: { fill: stack ? color : undefined },
|
|
225
|
+
}
|
|
226
|
+
all_series.push(series_up)
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// Process spin-down densities if available
|
|
230
|
+
if (
|
|
231
|
+
should_show_spin_down && dos.type === `electronic` &&
|
|
232
|
+
dos.spin_down_densities
|
|
233
|
+
) {
|
|
234
|
+
let densities_down = sigma > 0
|
|
235
|
+
? apply_gaussian_smearing(x_values, dos.spin_down_densities, sigma)
|
|
236
|
+
: [...dos.spin_down_densities]
|
|
237
|
+
|
|
238
|
+
densities_down = normalize_densities(densities_down, x_values, normalize)
|
|
239
|
+
|
|
240
|
+
// For mirror mode, negate the densities
|
|
241
|
+
if (effective_spin_mode === `mirror`) {
|
|
242
|
+
densities_down = densities_down.map((density) => -density)
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// For stacked plots with overlay mode, use separate spin-down cumulative
|
|
246
|
+
// This prevents spin-down from stacking on top of spin-up within the same DOS
|
|
247
|
+
if (stack && effective_spin_mode === `overlay`) {
|
|
248
|
+
const prev_spin_down = cumulative_spin_down
|
|
249
|
+
? [...cumulative_spin_down]
|
|
250
|
+
: null
|
|
251
|
+
if (cumulative_spin_down?.length === densities_down.length) {
|
|
252
|
+
densities_down = densities_down.map((density, idx) =>
|
|
253
|
+
density + (cumulative_spin_down?.[idx] ?? 0)
|
|
254
|
+
)
|
|
255
|
+
} else if (cumulative_spin_down) {
|
|
256
|
+
console.warn(`DOS stacking (spin-down): length mismatch for "${label}"`)
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// Store stacked area for spin-down
|
|
260
|
+
areas.push({
|
|
261
|
+
x_values: [...x_values],
|
|
262
|
+
upper_densities: [...densities_down],
|
|
263
|
+
lower_densities: prev_spin_down ?? x_values.map(() => 0),
|
|
264
|
+
color: PLOT_COLORS[(dos_idx * 2 + 1) % PLOT_COLORS.length],
|
|
265
|
+
})
|
|
266
|
+
cumulative_spin_down = densities_down
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// Use a slightly different shade for spin-down in overlay mode
|
|
270
|
+
const spin_down_color = effective_spin_mode === `overlay`
|
|
271
|
+
? PLOT_COLORS[(dos_idx * 2 + 1) % PLOT_COLORS.length]
|
|
272
|
+
: color
|
|
273
|
+
|
|
274
|
+
const series_down: DataSeries = {
|
|
275
|
+
x: is_horizontal ? densities_down : x_values,
|
|
276
|
+
y: is_horizontal ? x_values : densities_down,
|
|
277
|
+
markers: `line`,
|
|
278
|
+
label: `${label || `DOS ${dos_idx + 1}`} (↓)`,
|
|
279
|
+
line_style: {
|
|
280
|
+
stroke: spin_down_color,
|
|
281
|
+
stroke_width: 1.5,
|
|
282
|
+
line_dash: effective_spin_mode === `overlay` ? `4,2` : undefined,
|
|
283
|
+
},
|
|
284
|
+
point_style: { fill: stack ? spin_down_color : undefined },
|
|
285
|
+
}
|
|
286
|
+
all_series.push(series_down)
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
return { series_data: all_series, stacked_areas: areas }
|
|
290
|
+
},
|
|
291
|
+
)
|
|
292
|
+
|
|
293
|
+
let all_freqs = $derived( // for clamping phonon noise
|
|
294
|
+
Object.values(doses_dict).flatMap((dos) =>
|
|
295
|
+
dos.type === `phonon` ? dos.frequencies : dos.energies
|
|
296
|
+
),
|
|
297
|
+
)
|
|
298
|
+
let clamp_to_zero = $derived(
|
|
299
|
+
is_phonon &&
|
|
300
|
+
all_freqs.length > 0 &&
|
|
301
|
+
Math.min(...all_freqs) < 0 &&
|
|
302
|
+
negative_fraction(all_freqs) < IMAGINARY_MODE_NOISE_THRESHOLD,
|
|
303
|
+
)
|
|
304
|
+
|
|
305
|
+
// Check if we have mirrored spin-down data (negative densities)
|
|
306
|
+
let has_mirrored_spin = $derived(
|
|
307
|
+
effective_spin_mode === `mirror` && has_spin_polarized,
|
|
308
|
+
)
|
|
309
|
+
|
|
310
|
+
let x_range = $derived.by((): [number, number] | undefined => {
|
|
311
|
+
if (!series_data.length) return undefined
|
|
312
|
+
const all_x = series_data.flatMap((srs) => srs.x)
|
|
313
|
+
const min_x = Math.min(...all_x), max_x = Math.max(...all_x)
|
|
314
|
+
// For horizontal orientation with mirror mode, allow negative values (mirrored densities)
|
|
315
|
+
if (is_horizontal && has_mirrored_spin) return [min_x, max_x]
|
|
316
|
+
if (is_horizontal || clamp_to_zero) return [0, max_x]
|
|
317
|
+
return [min_x, max_x]
|
|
318
|
+
})
|
|
319
|
+
|
|
320
|
+
let y_range = $derived.by((): [number, number] | undefined => {
|
|
321
|
+
if (!series_data.length) return undefined
|
|
322
|
+
const all_y = series_data.flatMap((srs) => srs.y)
|
|
323
|
+
const min_y = Math.min(...all_y), max_y = Math.max(...all_y)
|
|
324
|
+
// For vertical orientation with mirror mode, allow negative values (mirrored densities)
|
|
325
|
+
if (!is_horizontal && has_mirrored_spin) return [min_y, max_y]
|
|
326
|
+
if (!is_horizontal || clamp_to_zero) return [0, max_y]
|
|
327
|
+
return [min_y, max_y]
|
|
328
|
+
})
|
|
329
|
+
|
|
330
|
+
// Get axis labels based on orientation
|
|
331
|
+
let x_label = $derived(
|
|
332
|
+
is_horizontal
|
|
333
|
+
? `Density of States`
|
|
334
|
+
: is_phonon
|
|
335
|
+
? `Frequency (${units})`
|
|
336
|
+
: `Energy (eV)`,
|
|
337
|
+
)
|
|
338
|
+
let y_label = $derived(
|
|
339
|
+
is_horizontal
|
|
340
|
+
? (is_phonon ? `Frequency (${units})` : `Energy (eV)`)
|
|
341
|
+
: `Density of States`,
|
|
342
|
+
)
|
|
343
|
+
|
|
344
|
+
// Compute final axis configurations with default labels
|
|
345
|
+
let final_x_axis = $derived({
|
|
346
|
+
label: x_label,
|
|
347
|
+
format: `.2f`,
|
|
348
|
+
range: x_range,
|
|
349
|
+
label_shift: { x: 0, y: -48 }, // Increase standoff from tick labels
|
|
350
|
+
...(is_horizontal && { ticks: 4 }),
|
|
351
|
+
...x_axis,
|
|
352
|
+
})
|
|
353
|
+
// Internal y_axis that ScatterPlot binds to - syncs zoom changes back to parent
|
|
354
|
+
let internal_y_axis = $derived({
|
|
355
|
+
label: y_label,
|
|
356
|
+
format: `.2f`,
|
|
357
|
+
range: y_range,
|
|
358
|
+
...y_axis,
|
|
359
|
+
})
|
|
360
|
+
|
|
361
|
+
// Sync zoom changes from ScatterPlot back to parent via bindable y_axis
|
|
362
|
+
// Also clears parent range when internal range becomes invalid (auto-range reset)
|
|
363
|
+
$effect(() => {
|
|
364
|
+
const range = internal_y_axis.range
|
|
365
|
+
if (is_valid_range(range)) {
|
|
366
|
+
if (y_axis.range?.[0] !== range[0] || y_axis.range?.[1] !== range[1]) {
|
|
367
|
+
y_axis = { ...y_axis, range }
|
|
368
|
+
}
|
|
369
|
+
return
|
|
370
|
+
}
|
|
371
|
+
// Range became invalid - clear parent's range to propagate reset
|
|
372
|
+
if (`range` in y_axis) {
|
|
373
|
+
const { range: _omit, ...axis_without_range } = y_axis
|
|
374
|
+
y_axis = axis_without_range
|
|
375
|
+
}
|
|
376
|
+
})
|
|
377
|
+
|
|
378
|
+
let display = $state({
|
|
379
|
+
x_grid: true,
|
|
380
|
+
y_grid: true,
|
|
381
|
+
x_zero_line: true,
|
|
382
|
+
y_zero_line: true,
|
|
383
|
+
})
|
|
384
|
+
|
|
385
|
+
// Determine if we have valid data to display
|
|
386
|
+
let has_valid_data = $derived(series_data.length > 0)
|
|
387
|
+
|
|
388
|
+
// Auto-detect sigma range based on frequency/energy range
|
|
389
|
+
let effective_sigma_range = $derived.by((): [number, number] => {
|
|
390
|
+
if (sigma_range) return sigma_range
|
|
391
|
+
if (!all_freqs.length) return [0, 1]
|
|
392
|
+
const freq_range = Math.max(...all_freqs) - Math.min(...all_freqs)
|
|
393
|
+
// Reasonable sigma range: 0 to ~5% of total range
|
|
394
|
+
const max_sigma = Math.max(0.1, freq_range * 0.05)
|
|
395
|
+
return [0, max_sigma]
|
|
396
|
+
})
|
|
397
|
+
|
|
398
|
+
// Computed values for sigma slider
|
|
399
|
+
let safe_sigma_range = $derived(validate_sigma_range(effective_sigma_range))
|
|
400
|
+
let sigma_step = $derived(calculate_sigma_step(effective_sigma_range))
|
|
401
|
+
|
|
402
|
+
// Build SVG path for stacked area fill between upper and lower density curves
|
|
403
|
+
function build_stacked_area_path(
|
|
404
|
+
area: StackedAreaData,
|
|
405
|
+
x_scale_fn: (val: number) => number,
|
|
406
|
+
y_scale_fn: (val: number) => number,
|
|
407
|
+
horizontal: boolean,
|
|
408
|
+
): string {
|
|
409
|
+
const pts = area.x_values.length
|
|
410
|
+
if (pts < 2) return ``
|
|
411
|
+
|
|
412
|
+
const upper_coords: string[] = []
|
|
413
|
+
const lower_coords: string[] = []
|
|
414
|
+
|
|
415
|
+
for (let idx = 0; idx < pts; idx++) {
|
|
416
|
+
const freq = area.x_values[idx]
|
|
417
|
+
const upper_dens = area.upper_densities[idx]
|
|
418
|
+
const lower_dens = area.lower_densities[idx]
|
|
419
|
+
// For vertical orientation: x = freq, y = density
|
|
420
|
+
// For horizontal orientation: x = density, y = freq
|
|
421
|
+
const [upper_x, upper_y] = horizontal
|
|
422
|
+
? [x_scale_fn(upper_dens), y_scale_fn(freq)]
|
|
423
|
+
: [x_scale_fn(freq), y_scale_fn(upper_dens)]
|
|
424
|
+
const [lower_x, lower_y] = horizontal
|
|
425
|
+
? [x_scale_fn(lower_dens), y_scale_fn(freq)]
|
|
426
|
+
: [x_scale_fn(freq), y_scale_fn(lower_dens)]
|
|
427
|
+
upper_coords.push(`${upper_x.toFixed(2)},${upper_y.toFixed(2)}`)
|
|
428
|
+
lower_coords.push(`${lower_x.toFixed(2)},${lower_y.toFixed(2)}`)
|
|
429
|
+
}
|
|
430
|
+
// Trace upper edge forward, lower edge backward, close path
|
|
431
|
+
return `M${upper_coords[0]} ${
|
|
432
|
+
upper_coords.slice(1).map((coord) => `L${coord}`).join(` `)
|
|
433
|
+
} ${lower_coords.toReversed().map((coord) => `L${coord}`).join(` `)} Z`
|
|
434
|
+
}
|
|
435
|
+
</script>
|
|
436
|
+
|
|
437
|
+
{#if has_valid_data}
|
|
438
|
+
<ScatterPlot
|
|
439
|
+
series={series_data}
|
|
440
|
+
x_axis={final_x_axis}
|
|
441
|
+
bind:y_axis={internal_y_axis}
|
|
442
|
+
bind:display
|
|
443
|
+
legend={show_legend ? {} : null}
|
|
444
|
+
hover_config={{ threshold_px: 50 }}
|
|
445
|
+
controls={{ show: show_controls }}
|
|
446
|
+
on_point_hover={(event) => {
|
|
447
|
+
hovered_frequency = is_horizontal
|
|
448
|
+
? (event?.point?.y ?? null)
|
|
449
|
+
: (event?.point?.x ?? null)
|
|
450
|
+
}}
|
|
451
|
+
{...{ range_padding: 0, ...rest }}
|
|
452
|
+
>
|
|
453
|
+
{#snippet tooltip({ x_formatted, y_formatted, label })}
|
|
454
|
+
{@const tooltip_data = format_dos_tooltip(
|
|
455
|
+
x_formatted,
|
|
456
|
+
y_formatted,
|
|
457
|
+
label ?? null,
|
|
458
|
+
is_horizontal,
|
|
459
|
+
is_phonon,
|
|
460
|
+
units,
|
|
461
|
+
final_x_axis.label ?? ``,
|
|
462
|
+
internal_y_axis.label ?? ``,
|
|
463
|
+
Object.keys(doses_dict).length,
|
|
464
|
+
)}
|
|
465
|
+
{#if tooltip_data.title}<strong>{tooltip_data.title}</strong><br />{/if}
|
|
466
|
+
{#each tooltip_data.lines as line, line_idx (line_idx)}
|
|
467
|
+
{line}{#if line_idx < tooltip_data.lines.length - 1}<br />{/if}
|
|
468
|
+
{/each}
|
|
469
|
+
{/snippet}
|
|
470
|
+
|
|
471
|
+
{#snippet controls_extra()}
|
|
472
|
+
<!-- Spin Mode (for spin-polarized electronic DOS) -->
|
|
473
|
+
{#if has_spin_polarized}
|
|
474
|
+
<SettingsSection
|
|
475
|
+
title="Spin Display"
|
|
476
|
+
current_values={{ spin_mode }}
|
|
477
|
+
on_reset={() => (spin_mode = `mirror`)}
|
|
478
|
+
>
|
|
479
|
+
<div class="dos-spin-modes">
|
|
480
|
+
{#each SPIN_MODES as mode (mode.value)}
|
|
481
|
+
<button
|
|
482
|
+
type="button"
|
|
483
|
+
class="spin-mode-btn"
|
|
484
|
+
class:active={spin_mode === mode.value}
|
|
485
|
+
onclick={() => (spin_mode = mode.value)}
|
|
486
|
+
aria-label={mode.title}
|
|
487
|
+
aria-pressed={spin_mode === mode.value}
|
|
488
|
+
{@attach attach_tooltip({ content: mode.title })}
|
|
489
|
+
>
|
|
490
|
+
{mode.label}
|
|
491
|
+
</button>
|
|
492
|
+
{/each}
|
|
493
|
+
</div>
|
|
494
|
+
</SettingsSection>
|
|
495
|
+
{/if}
|
|
496
|
+
|
|
497
|
+
<!-- Smearing (Sigma) -->
|
|
498
|
+
{#if show_sigma_control}
|
|
499
|
+
<SettingsSection
|
|
500
|
+
title="Smearing"
|
|
501
|
+
current_values={{ sigma }}
|
|
502
|
+
on_reset={() => (sigma = 0)}
|
|
503
|
+
>
|
|
504
|
+
<div class="pane-row">
|
|
505
|
+
<label for="dos-sigma" title="Gaussian smearing width (σ)">σ:</label>
|
|
506
|
+
<input
|
|
507
|
+
id="dos-sigma"
|
|
508
|
+
type="range"
|
|
509
|
+
min={safe_sigma_range[0]}
|
|
510
|
+
max={safe_sigma_range[1]}
|
|
511
|
+
step={sigma_step}
|
|
512
|
+
bind:value={sigma}
|
|
513
|
+
/>
|
|
514
|
+
<span class="sigma-value">{format_sigma(sigma)}</span>
|
|
515
|
+
</div>
|
|
516
|
+
</SettingsSection>
|
|
517
|
+
{/if}
|
|
518
|
+
|
|
519
|
+
<!-- Normalization -->
|
|
520
|
+
{#if show_normalize_control}
|
|
521
|
+
<SettingsSection
|
|
522
|
+
title="Normalization"
|
|
523
|
+
current_values={{ normalize }}
|
|
524
|
+
on_reset={() => (normalize = null)}
|
|
525
|
+
>
|
|
526
|
+
<div class="pane-row">
|
|
527
|
+
<label for="dos-normalize">Mode:</label>
|
|
528
|
+
<select id="dos-normalize" bind:value={normalize}>
|
|
529
|
+
{#each NORMALIZATION_MODES as mode (mode.value)}
|
|
530
|
+
<option value={mode.value}>{mode.label}</option>
|
|
531
|
+
{/each}
|
|
532
|
+
</select>
|
|
533
|
+
</div>
|
|
534
|
+
</SettingsSection>
|
|
535
|
+
{/if}
|
|
536
|
+
|
|
537
|
+
<!-- Frequency Units (phonon DOS only) -->
|
|
538
|
+
{#if show_units_control && is_phonon}
|
|
539
|
+
<SettingsSection
|
|
540
|
+
title="Units"
|
|
541
|
+
current_values={{ units }}
|
|
542
|
+
on_reset={() => (units = `THz`)}
|
|
543
|
+
>
|
|
544
|
+
<div class="pane-row">
|
|
545
|
+
<label for="dos-units">Frequency:</label>
|
|
546
|
+
<select id="dos-units" bind:value={units}>
|
|
547
|
+
{#each FREQUENCY_UNITS as unit (unit)}
|
|
548
|
+
<option value={unit}>{unit}</option>
|
|
549
|
+
{/each}
|
|
550
|
+
</select>
|
|
551
|
+
</div>
|
|
552
|
+
</SettingsSection>
|
|
553
|
+
{/if}
|
|
554
|
+
{/snippet}
|
|
555
|
+
|
|
556
|
+
{#snippet user_content({ width, height, y_scale_fn, x_scale_fn, pad })}
|
|
557
|
+
<!-- Stacked area fills (rendered first so they appear behind lines) -->
|
|
558
|
+
{#if stack && stacked_areas.length > 0}
|
|
559
|
+
{#each stacked_areas as area, area_idx (area_idx)}
|
|
560
|
+
<path
|
|
561
|
+
d={build_stacked_area_path(area, x_scale_fn, y_scale_fn, is_horizontal)}
|
|
562
|
+
fill={area.color}
|
|
563
|
+
fill-opacity="var(--dos-stacked-area-opacity, 0.3)"
|
|
564
|
+
stroke="none"
|
|
565
|
+
/>
|
|
566
|
+
{/each}
|
|
567
|
+
{/if}
|
|
568
|
+
|
|
569
|
+
<!-- Fermi level line for electronic DOS -->
|
|
570
|
+
{@const fermi_pos = effective_fermi_level !== undefined
|
|
571
|
+
? (is_horizontal
|
|
572
|
+
? y_scale_fn(effective_fermi_level)
|
|
573
|
+
: x_scale_fn(effective_fermi_level))
|
|
574
|
+
: NaN}
|
|
575
|
+
{#if Number.isFinite(fermi_pos)}
|
|
576
|
+
{@const [x1, x2, y1, y2] = is_horizontal
|
|
577
|
+
? [pad.l, width - pad.r, fermi_pos, fermi_pos]
|
|
578
|
+
: [fermi_pos, fermi_pos, pad.t, height - pad.b]}
|
|
579
|
+
<line
|
|
580
|
+
class="fermi-level-line"
|
|
581
|
+
{x1}
|
|
582
|
+
{x2}
|
|
583
|
+
{y1}
|
|
584
|
+
{y2}
|
|
585
|
+
stroke="var(--dos-fermi-line-color, light-dark(#e74c3c, #ff6b6b))"
|
|
586
|
+
stroke-width="var(--dos-fermi-line-width, 1.5)"
|
|
587
|
+
stroke-dasharray="var(--dos-fermi-line-dash, 6,3)"
|
|
588
|
+
opacity="var(--dos-fermi-line-opacity, 0.8)"
|
|
589
|
+
/>
|
|
590
|
+
<!-- Fermi level label -->
|
|
591
|
+
{#if is_horizontal}
|
|
592
|
+
<text
|
|
593
|
+
class="fermi-level-label"
|
|
594
|
+
x={width - pad.r + 4}
|
|
595
|
+
y={fermi_pos}
|
|
596
|
+
dy="0.35em"
|
|
597
|
+
font-size="10"
|
|
598
|
+
fill="var(--dos-fermi-line-color, light-dark(#e74c3c, #ff6b6b))"
|
|
599
|
+
opacity="0.9"
|
|
600
|
+
>
|
|
601
|
+
E<tspan dy="2" font-size="8">F</tspan>
|
|
602
|
+
</text>
|
|
603
|
+
{:else}
|
|
604
|
+
<text
|
|
605
|
+
class="fermi-level-label"
|
|
606
|
+
x={fermi_pos}
|
|
607
|
+
y={pad.t - 4}
|
|
608
|
+
text-anchor="middle"
|
|
609
|
+
font-size="10"
|
|
610
|
+
fill="var(--dos-fermi-line-color, light-dark(#e74c3c, #ff6b6b))"
|
|
611
|
+
opacity="0.9"
|
|
612
|
+
>
|
|
613
|
+
E<tspan dy="2" font-size="8">F</tspan>
|
|
614
|
+
</text>
|
|
615
|
+
{/if}
|
|
616
|
+
{/if}
|
|
617
|
+
|
|
618
|
+
<!-- Reference frequency line -->
|
|
619
|
+
{@const ref_pos = reference_frequency !== null
|
|
620
|
+
? (is_horizontal
|
|
621
|
+
? y_scale_fn(reference_frequency)
|
|
622
|
+
: x_scale_fn(reference_frequency))
|
|
623
|
+
: NaN}
|
|
624
|
+
{#if Number.isFinite(ref_pos)}
|
|
625
|
+
{@const [x1, x2, y1, y2] = is_horizontal
|
|
626
|
+
? [pad.l, width - pad.r, ref_pos, ref_pos]
|
|
627
|
+
: [ref_pos, ref_pos, pad.t, height - pad.b]}
|
|
628
|
+
<line
|
|
629
|
+
{x1}
|
|
630
|
+
{x2}
|
|
631
|
+
{y1}
|
|
632
|
+
{y2}
|
|
633
|
+
stroke="var(--dos-reference-line-color, light-dark(#d48860, #c47850))"
|
|
634
|
+
stroke-width="var(--dos-reference-line-width, 1)"
|
|
635
|
+
stroke-dasharray="var(--dos-reference-line-dash, 4,3)"
|
|
636
|
+
opacity="var(--dos-reference-line-opacity, 0.5)"
|
|
637
|
+
/>
|
|
638
|
+
{/if}
|
|
639
|
+
{/snippet}
|
|
640
|
+
</ScatterPlot>
|
|
641
|
+
{:else}
|
|
642
|
+
<EmptyState message="No valid DOS data to display" />
|
|
643
|
+
{/if}
|
|
644
|
+
|
|
645
|
+
<style>
|
|
646
|
+
/* Control row layout */
|
|
647
|
+
.pane-row {
|
|
648
|
+
display: flex;
|
|
649
|
+
align-items: center;
|
|
650
|
+
gap: 0.5em;
|
|
651
|
+
margin: 0.3em 0;
|
|
652
|
+
font-size: 0.9em;
|
|
653
|
+
}
|
|
654
|
+
.pane-row label {
|
|
655
|
+
min-width: 4em;
|
|
656
|
+
flex-shrink: 0;
|
|
657
|
+
}
|
|
658
|
+
.pane-row input[type='range'] {
|
|
659
|
+
flex: 1;
|
|
660
|
+
min-width: 4em;
|
|
661
|
+
}
|
|
662
|
+
.pane-row select {
|
|
663
|
+
flex: 1;
|
|
664
|
+
min-width: 0;
|
|
665
|
+
}
|
|
666
|
+
/* Spin mode button group */
|
|
667
|
+
.dos-spin-modes {
|
|
668
|
+
display: flex;
|
|
669
|
+
gap: 2px;
|
|
670
|
+
flex-wrap: wrap;
|
|
671
|
+
}
|
|
672
|
+
.spin-mode-btn {
|
|
673
|
+
padding: 4px 8px;
|
|
674
|
+
border: 1px solid var(--border-color, light-dark(#d1d5db, #4b5563));
|
|
675
|
+
background: var(--btn-bg, light-dark(#f3f4f6, #374151));
|
|
676
|
+
border-radius: var(--border-radius, 3pt);
|
|
677
|
+
cursor: pointer;
|
|
678
|
+
font-size: 1em;
|
|
679
|
+
transition: all 0.15s ease;
|
|
680
|
+
min-width: 2em;
|
|
681
|
+
}
|
|
682
|
+
.spin-mode-btn:hover {
|
|
683
|
+
background: var(--btn-bg-hover, light-dark(#e5e7eb, #4b5563));
|
|
684
|
+
}
|
|
685
|
+
.spin-mode-btn.active {
|
|
686
|
+
background: var(--btn-bg-active, light-dark(#dbeafe, #1e40af));
|
|
687
|
+
border-color: var(--btn-border-active, light-dark(#3b82f6, #60a5fa));
|
|
688
|
+
color: var(--btn-color-active, light-dark(#1d4ed8, #93c5fd));
|
|
689
|
+
}
|
|
690
|
+
/* Sigma value display */
|
|
691
|
+
.sigma-value {
|
|
692
|
+
font-family: var(--font-mono, monospace);
|
|
693
|
+
font-size: 0.9em;
|
|
694
|
+
min-width: 3.5em;
|
|
695
|
+
text-align: right;
|
|
696
|
+
}
|
|
697
|
+
</style>
|