matterviz 0.3.6 → 0.3.7
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.d.ts +9 -0
- package/dist/FilePicker.svelte +360 -0
- package/dist/FilePicker.svelte.d.ts +17 -0
- package/dist/Icon.svelte.d.ts +13 -0
- package/dist/MillerIndexInput.svelte +66 -0
- package/dist/MillerIndexInput.svelte.d.ts +7 -0
- package/dist/api/mp.d.ts +6 -0
- package/dist/api/mp.js +22 -0
- package/dist/api/optimade.d.ts +45 -0
- package/dist/api/optimade.js +135 -0
- package/dist/brillouin/BrillouinZone.svelte +549 -0
- package/dist/brillouin/BrillouinZone.svelte.d.ts +83 -0
- package/dist/brillouin/BrillouinZoneControls.svelte +144 -0
- package/dist/brillouin/BrillouinZoneControls.svelte.d.ts +17 -0
- package/dist/brillouin/BrillouinZoneExportPane.svelte +146 -0
- package/dist/brillouin/BrillouinZoneExportPane.svelte.d.ts +15 -0
- package/dist/brillouin/BrillouinZoneInfoPane.svelte +146 -0
- package/dist/brillouin/BrillouinZoneInfoPane.svelte.d.ts +13 -0
- package/dist/brillouin/BrillouinZoneScene.svelte +476 -0
- package/dist/brillouin/BrillouinZoneScene.svelte.d.ts +48 -0
- package/dist/brillouin/BrillouinZoneTooltip.svelte +92 -0
- package/dist/brillouin/BrillouinZoneTooltip.svelte.d.ts +8 -0
- package/dist/brillouin/compute.d.ts +17 -0
- package/dist/brillouin/compute.js +426 -0
- package/dist/brillouin/index.d.ts +8 -0
- package/dist/brillouin/index.js +7 -0
- package/dist/brillouin/types.d.ts +43 -0
- package/dist/brillouin/types.js +1 -0
- package/dist/chempot-diagram/ChemPotDiagram.svelte +327 -0
- package/dist/chempot-diagram/ChemPotDiagram.svelte.d.ts +13 -0
- package/dist/chempot-diagram/ChemPotDiagram2D.svelte +846 -0
- package/dist/chempot-diagram/ChemPotDiagram2D.svelte.d.ts +16 -0
- package/dist/chempot-diagram/ChemPotDiagram3D.svelte +3193 -0
- package/dist/chempot-diagram/ChemPotDiagram3D.svelte.d.ts +16 -0
- package/dist/chempot-diagram/ChemPotScene3D.svelte.d.ts +7 -0
- package/dist/chempot-diagram/async-compute.svelte.d.ts +3 -0
- package/dist/chempot-diagram/async-compute.svelte.js +78 -0
- package/dist/chempot-diagram/chempot-worker.d.ts +1 -0
- package/dist/chempot-diagram/chempot-worker.js +11 -0
- package/dist/chempot-diagram/color.d.ts +10 -0
- package/dist/chempot-diagram/color.js +32 -0
- package/dist/chempot-diagram/compute.d.ts +48 -0
- package/dist/chempot-diagram/compute.js +806 -0
- package/dist/chempot-diagram/index.d.ts +6 -0
- package/dist/chempot-diagram/index.js +6 -0
- package/dist/chempot-diagram/pointer.d.ts +16 -0
- package/dist/chempot-diagram/pointer.js +40 -0
- package/dist/chempot-diagram/temperature.d.ts +15 -0
- package/dist/chempot-diagram/temperature.js +34 -0
- package/dist/chempot-diagram/types.d.ts +81 -0
- package/dist/chempot-diagram/types.js +28 -0
- package/dist/colors/index.d.ts +47 -0
- package/dist/colors/index.js +203 -0
- package/dist/composition/BarChart.svelte +297 -0
- package/dist/composition/BarChart.svelte.d.ts +39 -0
- package/dist/composition/BubbleChart.svelte +218 -0
- package/dist/composition/BubbleChart.svelte.d.ts +28 -0
- package/dist/composition/Composition.svelte +165 -0
- package/dist/composition/Composition.svelte.d.ts +15 -0
- package/dist/composition/Formula.svelte +268 -0
- package/dist/composition/Formula.svelte.d.ts +19 -0
- package/dist/composition/FormulaFilter.svelte +1257 -0
- package/dist/composition/FormulaFilter.svelte.d.ts +51 -0
- package/dist/composition/PieChart.svelte +323 -0
- package/dist/composition/PieChart.svelte.d.ts +37 -0
- package/dist/composition/format.d.ts +15 -0
- package/dist/composition/format.js +109 -0
- package/dist/composition/index.d.ts +20 -0
- package/dist/composition/index.js +14 -0
- package/dist/composition/parse.d.ts +56 -0
- package/dist/composition/parse.js +474 -0
- package/dist/constants.d.ts +29 -0
- package/dist/constants.js +99 -0
- package/dist/controls.d.ts +14 -0
- package/dist/controls.js +30 -0
- package/dist/convex-hull/ConvexHull.svelte +157 -0
- package/dist/convex-hull/ConvexHull.svelte.d.ts +13 -0
- package/dist/convex-hull/ConvexHull2D.svelte +825 -0
- package/dist/convex-hull/ConvexHull2D.svelte.d.ts +11 -0
- package/dist/convex-hull/ConvexHull3D.svelte +1801 -0
- package/dist/convex-hull/ConvexHull3D.svelte.d.ts +8 -0
- package/dist/convex-hull/ConvexHull4D.svelte +1398 -0
- package/dist/convex-hull/ConvexHull4D.svelte.d.ts +8 -0
- package/dist/convex-hull/ConvexHullControls.svelte +535 -0
- package/dist/convex-hull/ConvexHullControls.svelte.d.ts +48 -0
- package/dist/convex-hull/ConvexHullInfoPane.svelte +125 -0
- package/dist/convex-hull/ConvexHullInfoPane.svelte.d.ts +20 -0
- package/dist/convex-hull/ConvexHullStats.svelte +929 -0
- package/dist/convex-hull/ConvexHullStats.svelte.d.ts +17 -0
- package/dist/convex-hull/ConvexHullTooltip.svelte +131 -0
- package/dist/convex-hull/ConvexHullTooltip.svelte.d.ts +33 -0
- package/dist/convex-hull/GasPressureControls.svelte +247 -0
- package/dist/convex-hull/GasPressureControls.svelte.d.ts +11 -0
- package/dist/convex-hull/StructurePopup.svelte +151 -0
- package/dist/convex-hull/StructurePopup.svelte.d.ts +18 -0
- package/dist/convex-hull/TemperatureSlider.svelte.d.ts +8 -0
- package/dist/convex-hull/barycentric-coords.d.ts +18 -0
- package/dist/convex-hull/barycentric-coords.js +182 -0
- package/dist/convex-hull/demo-temperature.d.ts +6 -0
- package/dist/convex-hull/demo-temperature.js +40 -0
- package/dist/convex-hull/gas-thermodynamics.d.ts +16 -0
- package/dist/convex-hull/gas-thermodynamics.js +314 -0
- package/dist/convex-hull/helpers.d.ts +114 -0
- package/dist/convex-hull/helpers.js +710 -0
- package/dist/convex-hull/index.d.ts +119 -0
- package/dist/convex-hull/index.js +58 -0
- package/dist/convex-hull/thermodynamics.d.ts +67 -0
- package/dist/convex-hull/thermodynamics.js +1752 -0
- package/dist/convex-hull/types.d.ts +162 -0
- package/dist/convex-hull/types.js +36 -0
- package/dist/coordination/CoordinationBarPlot.svelte +311 -0
- package/dist/coordination/CoordinationBarPlot.svelte.d.ts +30 -0
- package/dist/coordination/calc-coordination.d.ts +15 -0
- package/dist/coordination/calc-coordination.js +63 -0
- package/dist/coordination/index.d.ts +8 -0
- package/dist/coordination/index.js +7 -0
- package/dist/effects.svelte.d.ts +12 -0
- package/dist/effects.svelte.js +37 -0
- package/dist/element/BohrAtom.svelte.d.ts +20 -0
- package/dist/element/ElementHeading.svelte +26 -0
- package/dist/element/ElementHeading.svelte.d.ts +8 -0
- package/dist/element/ElementPhoto.svelte +57 -0
- package/dist/element/ElementPhoto.svelte.d.ts +9 -0
- package/dist/element/ElementStats.svelte +80 -0
- package/dist/element/ElementStats.svelte.d.ts +8 -0
- package/dist/element/ElementTile.svelte +484 -0
- package/dist/element/ElementTile.svelte.d.ts +29 -0
- package/dist/element/Nucleus.svelte.d.ts +17 -0
- package/dist/element/data.d.ts +2 -0
- package/dist/element/data.js +2 -0
- package/dist/element/index.d.ts +8 -0
- package/dist/element/index.js +7 -0
- package/dist/element/types.d.ts +57 -0
- package/dist/element/types.js +1 -0
- package/dist/feedback/ClickFeedback.svelte +58 -0
- package/dist/feedback/ClickFeedback.svelte.d.ts +12 -0
- package/dist/feedback/DragOverlay.svelte +42 -0
- package/dist/feedback/DragOverlay.svelte.d.ts +7 -0
- package/dist/feedback/Spinner.svelte.d.ts +7 -0
- package/dist/feedback/StatusMessage.svelte.d.ts +9 -0
- package/dist/feedback/index.d.ts +4 -0
- package/dist/feedback/index.js +4 -0
- package/dist/fermi-surface/FermiSlice.svelte +189 -0
- package/dist/fermi-surface/FermiSlice.svelte.d.ts +24 -0
- package/dist/fermi-surface/FermiSurface.svelte +600 -0
- package/dist/fermi-surface/FermiSurface.svelte.d.ts +83 -0
- package/dist/fermi-surface/FermiSurfaceControls.svelte +448 -0
- package/dist/fermi-surface/FermiSurfaceControls.svelte.d.ts +35 -0
- package/dist/fermi-surface/FermiSurfaceScene.svelte +794 -0
- package/dist/fermi-surface/FermiSurfaceScene.svelte.d.ts +50 -0
- package/dist/fermi-surface/FermiSurfaceTooltip.svelte +111 -0
- package/dist/fermi-surface/FermiSurfaceTooltip.svelte.d.ts +8 -0
- package/dist/fermi-surface/compute.d.ts +5 -0
- package/dist/fermi-surface/compute.js +538 -0
- package/dist/fermi-surface/constants.d.ts +9 -0
- package/dist/fermi-surface/constants.js +27 -0
- package/dist/fermi-surface/export.d.ts +5 -0
- package/dist/fermi-surface/export.js +50 -0
- package/dist/fermi-surface/index.d.ts +12 -0
- package/dist/fermi-surface/index.js +13 -0
- package/dist/fermi-surface/marching-cubes.d.ts +2 -0
- package/dist/fermi-surface/marching-cubes.js +2 -0
- package/dist/fermi-surface/parse.d.ts +2 -0
- package/dist/fermi-surface/parse.js +491 -0
- package/dist/fermi-surface/symmetry.d.ts +3 -0
- package/dist/fermi-surface/symmetry.js +46 -0
- package/dist/fermi-surface/types.d.ts +110 -0
- package/dist/fermi-surface/types.js +4 -0
- package/dist/heatmap-matrix/HeatmapMatrix.svelte +1545 -0
- package/dist/heatmap-matrix/HeatmapMatrix.svelte.d.ts +110 -0
- package/dist/heatmap-matrix/HeatmapMatrixControls.svelte +225 -0
- package/dist/heatmap-matrix/HeatmapMatrixControls.svelte.d.ts +30 -0
- package/dist/heatmap-matrix/index.d.ts +53 -0
- package/dist/heatmap-matrix/index.js +100 -0
- package/dist/heatmap-matrix/shared.d.ts +2 -0
- package/dist/heatmap-matrix/shared.js +4 -0
- package/dist/icons.d.ts +569 -0
- package/dist/icons.js +648 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.js +39 -0
- package/dist/io/decompress.d.ts +11 -0
- package/dist/io/decompress.js +74 -0
- package/dist/io/export.d.ts +16 -0
- package/dist/io/export.js +316 -0
- package/dist/io/fetch.d.ts +5 -0
- package/dist/io/fetch.js +39 -0
- package/dist/io/file-drop.d.ts +7 -0
- package/dist/io/file-drop.js +43 -0
- package/dist/io/index.d.ts +7 -0
- package/dist/io/index.js +6 -0
- package/dist/io/is-binary.d.ts +1 -0
- package/dist/io/is-binary.js +20 -0
- package/dist/io/types.d.ts +8 -0
- package/dist/io/types.js +1 -0
- package/dist/io/url-drop.d.ts +2 -0
- package/dist/io/url-drop.js +123 -0
- package/dist/isosurface/Isosurface.svelte +285 -0
- package/dist/isosurface/Isosurface.svelte.d.ts +8 -0
- package/dist/isosurface/IsosurfaceControls.svelte +277 -0
- package/dist/isosurface/IsosurfaceControls.svelte.d.ts +9 -0
- package/dist/isosurface/index.d.ts +5 -0
- package/dist/isosurface/index.js +6 -0
- package/dist/isosurface/parse.d.ts +6 -0
- package/dist/isosurface/parse.js +553 -0
- package/dist/isosurface/slice.d.ts +11 -0
- package/dist/isosurface/slice.js +140 -0
- package/dist/isosurface/types.d.ts +56 -0
- package/dist/isosurface/types.js +227 -0
- package/dist/labels.d.ts +53 -0
- package/dist/labels.js +277 -0
- package/dist/layout/FullscreenToggle.svelte +50 -0
- package/dist/layout/FullscreenToggle.svelte.d.ts +7 -0
- package/dist/layout/InfoCard.svelte +120 -0
- package/dist/layout/InfoCard.svelte.d.ts +21 -0
- package/dist/layout/InfoTag.svelte +185 -0
- package/dist/layout/InfoTag.svelte.d.ts +19 -0
- package/dist/layout/PropertyFilter.svelte +246 -0
- package/dist/layout/PropertyFilter.svelte.d.ts +24 -0
- package/dist/layout/SettingsSection.svelte +148 -0
- package/dist/layout/SettingsSection.svelte.d.ts +17 -0
- package/dist/layout/SubpageGrid.svelte +82 -0
- package/dist/layout/SubpageGrid.svelte.d.ts +14 -0
- package/dist/layout/fullscreen.d.ts +9 -0
- package/dist/layout/fullscreen.js +53 -0
- package/dist/layout/index.d.ts +10 -0
- package/dist/layout/index.js +8 -0
- package/dist/layout/json-tree/JsonNode.svelte +548 -0
- package/dist/layout/json-tree/JsonNode.svelte.d.ts +11 -0
- package/dist/layout/json-tree/JsonTree.svelte +1230 -0
- package/dist/layout/json-tree/JsonTree.svelte.d.ts +6 -0
- package/dist/layout/json-tree/JsonValue.svelte.d.ts +9 -0
- package/dist/layout/json-tree/index.d.ts +3 -0
- package/dist/layout/json-tree/index.js +3 -0
- package/dist/layout/json-tree/types.d.ts +74 -0
- package/dist/layout/json-tree/types.js +2 -0
- package/dist/layout/json-tree/utils.d.ts +29 -0
- package/dist/layout/json-tree/utils.js +641 -0
- package/dist/marching-cubes.d.ts +14 -0
- package/dist/marching-cubes.js +540 -0
- package/dist/math.d.ts +101 -0
- package/dist/math.js +905 -0
- package/dist/overlays/ContextMenu.svelte +162 -0
- package/dist/overlays/ContextMenu.svelte.d.ts +25 -0
- package/dist/overlays/CopyButton.svelte +45 -0
- package/dist/overlays/CopyButton.svelte.d.ts +8 -0
- package/dist/overlays/DragControlTab.svelte +98 -0
- package/dist/overlays/DragControlTab.svelte.d.ts +8 -0
- package/dist/overlays/DraggablePane.svelte +487 -0
- package/dist/overlays/DraggablePane.svelte.d.ts +36 -0
- package/dist/overlays/InfoPaneCards.svelte +149 -0
- package/dist/overlays/InfoPaneCards.svelte.d.ts +22 -0
- package/dist/overlays/index.d.ts +3 -0
- package/dist/overlays/index.js +3 -0
- package/dist/periodic-table/PeriodicTable.svelte +469 -0
- package/dist/periodic-table/PeriodicTable.svelte.d.ts +55 -0
- package/dist/periodic-table/PeriodicTableControls.svelte +557 -0
- package/dist/periodic-table/PeriodicTableControls.svelte.d.ts +24 -0
- package/dist/periodic-table/PropertySelect.svelte +37 -0
- package/dist/periodic-table/PropertySelect.svelte.d.ts +13 -0
- package/dist/periodic-table/TableInset.svelte.d.ts +9 -0
- package/dist/periodic-table/index.d.ts +10 -0
- package/dist/periodic-table/index.js +4 -0
- package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte +1086 -0
- package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte.d.ts +44 -0
- package/dist/phase-diagram/PhaseDiagramControls.svelte +444 -0
- package/dist/phase-diagram/PhaseDiagramControls.svelte.d.ts +30 -0
- package/dist/phase-diagram/PhaseDiagramEditorPane.svelte +126 -0
- package/dist/phase-diagram/PhaseDiagramEditorPane.svelte.d.ts +15 -0
- package/dist/phase-diagram/PhaseDiagramExportPane.svelte +184 -0
- package/dist/phase-diagram/PhaseDiagramExportPane.svelte.d.ts +19 -0
- package/dist/phase-diagram/PhaseDiagramTooltip.svelte +391 -0
- package/dist/phase-diagram/PhaseDiagramTooltip.svelte.d.ts +16 -0
- package/dist/phase-diagram/TdbInfoPanel.svelte +203 -0
- package/dist/phase-diagram/TdbInfoPanel.svelte.d.ts +12 -0
- package/dist/phase-diagram/build-diagram.d.ts +11 -0
- package/dist/phase-diagram/build-diagram.js +160 -0
- package/dist/phase-diagram/colors.d.ts +35 -0
- package/dist/phase-diagram/colors.js +51 -0
- package/dist/phase-diagram/diagram-input.d.ts +29 -0
- package/dist/phase-diagram/diagram-input.js +3 -0
- package/dist/phase-diagram/index.d.ts +13 -0
- package/dist/phase-diagram/index.js +11 -0
- package/dist/phase-diagram/parse.d.ts +55 -0
- package/dist/phase-diagram/parse.js +272 -0
- package/dist/phase-diagram/svg-to-diagram.d.ts +2 -0
- package/dist/phase-diagram/svg-to-diagram.js +867 -0
- package/dist/phase-diagram/types.d.ts +93 -0
- package/dist/phase-diagram/types.js +1 -0
- package/dist/phase-diagram/utils.d.ts +118 -0
- package/dist/phase-diagram/utils.js +604 -0
- package/dist/plot/AxisLabel.svelte +51 -0
- package/dist/plot/AxisLabel.svelte.d.ts +16 -0
- package/dist/plot/BarPlot.svelte +2113 -0
- package/dist/plot/BarPlot.svelte.d.ts +84 -0
- package/dist/plot/BarPlotControls.svelte +66 -0
- package/dist/plot/BarPlotControls.svelte.d.ts +18 -0
- package/dist/plot/BinnedScatterPlot.svelte +1114 -0
- package/dist/plot/BinnedScatterPlot.svelte.d.ts +66 -0
- package/dist/plot/ColorBar.svelte +721 -0
- package/dist/plot/ColorBar.svelte.d.ts +31 -0
- package/dist/plot/ColorScaleSelect.svelte +54 -0
- package/dist/plot/ColorScaleSelect.svelte.d.ts +15 -0
- package/dist/plot/ElementScatter.svelte +63 -0
- package/dist/plot/ElementScatter.svelte.d.ts +14 -0
- package/dist/plot/FillArea.svelte.d.ts +21 -0
- package/dist/plot/Histogram.svelte +1558 -0
- package/dist/plot/Histogram.svelte.d.ts +50 -0
- package/dist/plot/HistogramControls.svelte +212 -0
- package/dist/plot/HistogramControls.svelte.d.ts +22 -0
- package/dist/plot/InteractiveAxisLabel.svelte +96 -0
- package/dist/plot/InteractiveAxisLabel.svelte.d.ts +14 -0
- package/dist/plot/Line.svelte +84 -0
- package/dist/plot/Line.svelte.d.ts +15 -0
- package/dist/plot/PlotAxis.svelte +169 -0
- package/dist/plot/PlotAxis.svelte.d.ts +24 -0
- package/dist/plot/PlotControls.svelte +537 -0
- package/dist/plot/PlotControls.svelte.d.ts +4 -0
- package/dist/plot/PlotLegend.svelte +569 -0
- package/dist/plot/PlotLegend.svelte.d.ts +29 -0
- package/dist/plot/PlotTooltip.svelte +67 -0
- package/dist/plot/PlotTooltip.svelte.d.ts +17 -0
- package/dist/plot/PortalSelect.svelte +253 -0
- package/dist/plot/PortalSelect.svelte.d.ts +16 -0
- package/dist/plot/ReferenceLine.svelte.d.ts +20 -0
- package/dist/plot/ReferenceLine3D.svelte +156 -0
- package/dist/plot/ReferenceLine3D.svelte.d.ts +14 -0
- package/dist/plot/ReferencePlane.svelte +175 -0
- package/dist/plot/ReferencePlane.svelte.d.ts +14 -0
- package/dist/plot/ScatterPlot.svelte +2778 -0
- package/dist/plot/ScatterPlot.svelte.d.ts +96 -0
- package/dist/plot/ScatterPlot3D.svelte +529 -0
- package/dist/plot/ScatterPlot3D.svelte.d.ts +95 -0
- package/dist/plot/ScatterPlot3DControls.svelte +437 -0
- package/dist/plot/ScatterPlot3DControls.svelte.d.ts +20 -0
- package/dist/plot/ScatterPlot3DScene.svelte +912 -0
- package/dist/plot/ScatterPlot3DScene.svelte.d.ts +74 -0
- package/dist/plot/ScatterPlotControls.svelte +306 -0
- package/dist/plot/ScatterPlotControls.svelte.d.ts +17 -0
- package/dist/plot/ScatterPoint.svelte +182 -0
- package/dist/plot/ScatterPoint.svelte.d.ts +22 -0
- package/dist/plot/SpacegroupBarPlot.svelte +293 -0
- package/dist/plot/SpacegroupBarPlot.svelte.d.ts +9 -0
- package/dist/plot/Surface3D.svelte +197 -0
- package/dist/plot/Surface3D.svelte.d.ts +13 -0
- package/dist/plot/ZeroLines.svelte +97 -0
- package/dist/plot/ZeroLines.svelte.d.ts +33 -0
- package/dist/plot/ZoomRect.svelte +23 -0
- package/dist/plot/ZoomRect.svelte.d.ts +8 -0
- package/dist/plot/adaptive-density.d.ts +69 -0
- package/dist/plot/adaptive-density.js +191 -0
- package/dist/plot/auto-place.d.ts +43 -0
- package/dist/plot/auto-place.js +122 -0
- package/dist/plot/axis-utils.d.ts +19 -0
- package/dist/plot/axis-utils.js +78 -0
- package/dist/plot/binned-scatter-types.d.ts +59 -0
- package/dist/plot/binned-scatter-types.js +1 -0
- package/dist/plot/data-cleaning.d.ts +37 -0
- package/dist/plot/data-cleaning.js +855 -0
- package/dist/plot/data-transform.d.ts +16 -0
- package/dist/plot/data-transform.js +45 -0
- package/dist/plot/defaults.d.ts +19 -0
- package/dist/plot/defaults.js +9 -0
- package/dist/plot/fill-utils.d.ts +46 -0
- package/dist/plot/fill-utils.js +322 -0
- package/dist/plot/hover-lock.svelte.d.ts +14 -0
- package/dist/plot/hover-lock.svelte.js +46 -0
- package/dist/plot/index.d.ts +41 -0
- package/dist/plot/index.js +39 -0
- package/dist/plot/interactions.d.ts +12 -0
- package/dist/plot/interactions.js +101 -0
- package/dist/plot/layout.d.ts +78 -0
- package/dist/plot/layout.js +273 -0
- package/dist/plot/reference-line.d.ts +60 -0
- package/dist/plot/reference-line.js +314 -0
- package/dist/plot/scales.d.ts +48 -0
- package/dist/plot/scales.js +481 -0
- package/dist/plot/svg.d.ts +1 -0
- package/dist/plot/svg.js +11 -0
- package/dist/plot/types.d.ts +831 -0
- package/dist/plot/types.js +99 -0
- package/dist/plot/utils/label-placement.d.ts +68 -0
- package/dist/plot/utils/label-placement.js +326 -0
- package/dist/plot/utils/series-visibility.d.ts +15 -0
- package/dist/plot/utils/series-visibility.js +85 -0
- package/dist/plot/utils.d.ts +1 -0
- package/dist/plot/utils.js +14 -0
- package/dist/rdf/RdfPlot.svelte +247 -0
- package/dist/rdf/RdfPlot.svelte.d.ts +27 -0
- package/dist/rdf/calc-rdf.d.ts +4 -0
- package/dist/rdf/calc-rdf.js +111 -0
- package/dist/rdf/index.d.ts +23 -0
- package/dist/rdf/index.js +2 -0
- package/dist/sanitize.d.ts +6 -0
- package/dist/sanitize.js +116 -0
- package/dist/settings.d.ts +255 -0
- package/dist/settings.js +1132 -0
- package/dist/spectral/Bands.svelte +1040 -0
- package/dist/spectral/Bands.svelte.d.ts +40 -0
- package/dist/spectral/BandsAndDos.svelte +134 -0
- package/dist/spectral/BandsAndDos.svelte.d.ts +18 -0
- package/dist/spectral/BrillouinBandsDos.svelte +252 -0
- package/dist/spectral/BrillouinBandsDos.svelte.d.ts +20 -0
- package/dist/spectral/Dos.svelte +697 -0
- package/dist/spectral/Dos.svelte.d.ts +29 -0
- package/dist/spectral/helpers.d.ts +119 -0
- package/dist/spectral/helpers.js +1032 -0
- package/dist/spectral/index.d.ts +6 -0
- package/dist/spectral/index.js +6 -0
- package/dist/spectral/types.d.ts +84 -0
- package/dist/spectral/types.js +2 -0
- package/dist/state.svelte.d.ts +25 -0
- package/dist/state.svelte.js +45 -0
- package/dist/structure/Arrow.svelte +72 -0
- package/dist/structure/Arrow.svelte.d.ts +15 -0
- package/dist/structure/AtomLegend.svelte +815 -0
- package/dist/structure/AtomLegend.svelte.d.ts +35 -0
- package/dist/structure/Bond.svelte +140 -0
- package/dist/structure/Bond.svelte.d.ts +9 -0
- package/dist/structure/CanvasTooltip.svelte +33 -0
- package/dist/structure/CanvasTooltip.svelte.d.ts +12 -0
- package/dist/structure/CellSelect.svelte +349 -0
- package/dist/structure/CellSelect.svelte.d.ts +13 -0
- package/dist/structure/Cylinder.svelte +45 -0
- package/dist/structure/Cylinder.svelte.d.ts +10 -0
- package/dist/structure/Lattice.svelte +196 -0
- package/dist/structure/Lattice.svelte.d.ts +17 -0
- package/dist/structure/Structure.svelte +2248 -0
- package/dist/structure/Structure.svelte.d.ts +89 -0
- package/dist/structure/StructureControls.svelte +1273 -0
- package/dist/structure/StructureControls.svelte.d.ts +31 -0
- package/dist/structure/StructureExportPane.svelte +252 -0
- package/dist/structure/StructureExportPane.svelte.d.ts +17 -0
- package/dist/structure/StructureInfoPane.svelte +737 -0
- package/dist/structure/StructureInfoPane.svelte.d.ts +19 -0
- package/dist/structure/StructureScene.svelte +2255 -0
- package/dist/structure/StructureScene.svelte.d.ts +111 -0
- package/dist/structure/atom-properties.d.ts +37 -0
- package/dist/structure/atom-properties.js +200 -0
- package/dist/structure/bond-order-perception.d.ts +13 -0
- package/dist/structure/bond-order-perception.js +384 -0
- package/dist/structure/bonding.d.ts +68 -0
- package/dist/structure/bonding.js +696 -0
- package/dist/structure/export.d.ts +20 -0
- package/dist/structure/export.js +727 -0
- package/dist/structure/index.d.ts +126 -0
- package/dist/structure/index.js +169 -0
- package/dist/structure/label-placement.d.ts +14 -0
- package/dist/structure/label-placement.js +72 -0
- package/dist/structure/measure.d.ts +6 -0
- package/dist/structure/measure.js +29 -0
- package/dist/structure/parse.d.ts +66 -0
- package/dist/structure/parse.js +1392 -0
- package/dist/structure/partial-occupancy.d.ts +25 -0
- package/dist/structure/partial-occupancy.js +99 -0
- package/dist/structure/pbc.d.ts +9 -0
- package/dist/structure/pbc.js +123 -0
- package/dist/structure/supercell.d.ts +8 -0
- package/dist/structure/supercell.js +170 -0
- package/dist/structure/validation.d.ts +2 -0
- package/dist/structure/validation.js +10 -0
- package/dist/symmetry/SymmetryStats.svelte +226 -0
- package/dist/symmetry/SymmetryStats.svelte.d.ts +21 -0
- package/dist/symmetry/WyckoffTable.svelte +120 -0
- package/dist/symmetry/WyckoffTable.svelte.d.ts +11 -0
- package/dist/symmetry/cell-transform.d.ts +12 -0
- package/dist/symmetry/cell-transform.js +91 -0
- package/dist/symmetry/index.d.ts +43 -0
- package/dist/symmetry/index.js +228 -0
- package/dist/symmetry/spacegroups.d.ts +9 -0
- package/dist/symmetry/spacegroups.js +394 -0
- package/dist/table/HeatmapTable.svelte +1833 -0
- package/dist/table/HeatmapTable.svelte.d.ts +49 -0
- package/dist/table/ToggleMenu.svelte +385 -0
- package/dist/table/ToggleMenu.svelte.d.ts +11 -0
- package/dist/table/index.d.ts +74 -0
- package/dist/table/index.js +38 -0
- package/dist/theme/ThemeControl.svelte +53 -0
- package/dist/theme/ThemeControl.svelte.d.ts +9 -0
- package/dist/theme/index.d.ts +29 -0
- package/dist/theme/index.js +79 -0
- package/dist/time.d.ts +4 -0
- package/dist/time.js +70 -0
- package/dist/tooltip/TooltipContent.svelte +58 -0
- package/dist/tooltip/TooltipContent.svelte.d.ts +31 -0
- package/dist/tooltip/index.d.ts +2 -0
- package/dist/tooltip/index.js +1 -0
- package/dist/tooltip/types.d.ts +8 -0
- package/dist/tooltip/types.js +1 -0
- package/dist/trajectory/Trajectory.svelte +1545 -0
- package/dist/trajectory/Trajectory.svelte.d.ts +77 -0
- package/dist/trajectory/TrajectoryError.svelte +128 -0
- package/dist/trajectory/TrajectoryError.svelte.d.ts +13 -0
- package/dist/trajectory/TrajectoryExportPane.svelte +357 -0
- package/dist/trajectory/TrajectoryExportPane.svelte.d.ts +17 -0
- package/dist/trajectory/TrajectoryInfoPane.svelte +313 -0
- package/dist/trajectory/TrajectoryInfoPane.svelte.d.ts +17 -0
- package/dist/trajectory/constants.d.ts +6 -0
- package/dist/trajectory/constants.js +7 -0
- package/dist/trajectory/extract.d.ts +5 -0
- package/dist/trajectory/extract.js +162 -0
- package/dist/trajectory/format-detect.d.ts +9 -0
- package/dist/trajectory/format-detect.js +76 -0
- package/dist/trajectory/frame-reader.d.ts +17 -0
- package/dist/trajectory/frame-reader.js +332 -0
- package/dist/trajectory/helpers.d.ts +15 -0
- package/dist/trajectory/helpers.js +164 -0
- package/dist/trajectory/index.d.ts +63 -0
- package/dist/trajectory/index.js +126 -0
- package/dist/trajectory/parse/ase.d.ts +2 -0
- package/dist/trajectory/parse/ase.js +73 -0
- package/dist/trajectory/parse/hdf5.d.ts +2 -0
- package/dist/trajectory/parse/hdf5.js +127 -0
- package/dist/trajectory/parse/index.d.ts +12 -0
- package/dist/trajectory/parse/index.js +298 -0
- package/dist/trajectory/parse/lammps.d.ts +5 -0
- package/dist/trajectory/parse/lammps.js +179 -0
- package/dist/trajectory/parse/vasp.d.ts +2 -0
- package/dist/trajectory/parse/vasp.js +68 -0
- package/dist/trajectory/parse/xyz.d.ts +2 -0
- package/dist/trajectory/parse/xyz.js +110 -0
- package/dist/trajectory/plotting.d.ts +28 -0
- package/dist/trajectory/plotting.js +423 -0
- package/dist/trajectory/types.d.ts +11 -0
- package/dist/trajectory/types.js +1 -0
- package/dist/utils.d.ts +6 -0
- package/dist/utils.js +45 -0
- package/dist/xrd/XrdPlot.svelte +615 -0
- package/dist/xrd/XrdPlot.svelte.d.ts +28 -0
- package/dist/xrd/broadening.d.ts +20 -0
- package/dist/xrd/broadening.js +97 -0
- package/dist/xrd/calc-xrd.d.ts +37 -0
- package/dist/xrd/calc-xrd.js +336 -0
- package/dist/xrd/index.d.ts +37 -0
- package/dist/xrd/index.js +4 -0
- package/dist/xrd/parse.d.ts +13 -0
- package/dist/xrd/parse.js +749 -0
- package/license +1 -1
- package/package.json +232 -1457
- package/readme.md +98 -171
- package/.vscode/launch.json +0 -13
- package/.vscodeignore +0 -7
- package/dist/assets/STLExporter-BpTH3YHE.js +0 -8
- package/dist/assets/browser-DdDecX_W.js +0 -1
- package/dist/assets/export-qgn-H9y6.js +0 -2
- package/dist/assets/main-DiKYzti2.css +0 -1
- package/dist/assets/moyo_wasm_bg-0ocwg7xY.wasm +0 -0
- package/dist/extension.js +0 -31293
- package/dist/src/lib/FilePicker.svelte +0 -360
- package/dist/src/lib/MillerIndexInput.svelte +0 -66
- package/dist/src/lib/api/mp.ts +0 -26
- package/dist/src/lib/api/optimade.ts +0 -204
- package/dist/src/lib/brillouin/BrillouinZone.svelte +0 -549
- package/dist/src/lib/brillouin/BrillouinZoneControls.svelte +0 -144
- package/dist/src/lib/brillouin/BrillouinZoneExportPane.svelte +0 -146
- package/dist/src/lib/brillouin/BrillouinZoneInfoPane.svelte +0 -146
- package/dist/src/lib/brillouin/BrillouinZoneScene.svelte +0 -476
- package/dist/src/lib/brillouin/BrillouinZoneTooltip.svelte +0 -92
- package/dist/src/lib/brillouin/compute.ts +0 -529
- package/dist/src/lib/brillouin/index.ts +0 -8
- package/dist/src/lib/brillouin/types.ts +0 -51
- package/dist/src/lib/chempot-diagram/ChemPotDiagram.svelte +0 -327
- package/dist/src/lib/chempot-diagram/ChemPotDiagram2D.svelte +0 -846
- package/dist/src/lib/chempot-diagram/ChemPotDiagram3D.svelte +0 -3193
- package/dist/src/lib/chempot-diagram/async-compute.svelte.ts +0 -94
- package/dist/src/lib/chempot-diagram/chempot-worker.ts +0 -11
- package/dist/src/lib/chempot-diagram/color.ts +0 -42
- package/dist/src/lib/chempot-diagram/compute.ts +0 -1014
- package/dist/src/lib/chempot-diagram/index.ts +0 -6
- package/dist/src/lib/chempot-diagram/pointer.ts +0 -56
- package/dist/src/lib/chempot-diagram/temperature.ts +0 -77
- package/dist/src/lib/chempot-diagram/types.ts +0 -130
- package/dist/src/lib/colors/index.ts +0 -249
- package/dist/src/lib/composition/BarChart.svelte +0 -297
- package/dist/src/lib/composition/BubbleChart.svelte +0 -218
- package/dist/src/lib/composition/Composition.svelte +0 -165
- package/dist/src/lib/composition/Formula.svelte +0 -268
- package/dist/src/lib/composition/FormulaFilter.svelte +0 -1257
- package/dist/src/lib/composition/PieChart.svelte +0 -323
- package/dist/src/lib/composition/format.ts +0 -155
- package/dist/src/lib/composition/index.ts +0 -37
- package/dist/src/lib/composition/parse.ts +0 -605
- package/dist/src/lib/constants.ts +0 -134
- package/dist/src/lib/controls.ts +0 -42
- package/dist/src/lib/convex-hull/ConvexHull.svelte +0 -157
- package/dist/src/lib/convex-hull/ConvexHull2D.svelte +0 -825
- package/dist/src/lib/convex-hull/ConvexHull3D.svelte +0 -1801
- package/dist/src/lib/convex-hull/ConvexHull4D.svelte +0 -1398
- package/dist/src/lib/convex-hull/ConvexHullControls.svelte +0 -535
- package/dist/src/lib/convex-hull/ConvexHullInfoPane.svelte +0 -125
- package/dist/src/lib/convex-hull/ConvexHullStats.svelte +0 -929
- package/dist/src/lib/convex-hull/ConvexHullTooltip.svelte +0 -131
- package/dist/src/lib/convex-hull/GasPressureControls.svelte +0 -247
- package/dist/src/lib/convex-hull/StructurePopup.svelte +0 -151
- package/dist/src/lib/convex-hull/barycentric-coords.ts +0 -246
- package/dist/src/lib/convex-hull/demo-temperature.ts +0 -63
- package/dist/src/lib/convex-hull/gas-thermodynamics.ts +0 -405
- package/dist/src/lib/convex-hull/helpers.ts +0 -932
- package/dist/src/lib/convex-hull/index.ts +0 -202
- package/dist/src/lib/convex-hull/thermodynamics.ts +0 -2192
- package/dist/src/lib/convex-hull/types.ts +0 -267
- package/dist/src/lib/coordination/CoordinationBarPlot.svelte +0 -311
- package/dist/src/lib/coordination/calc-coordination.ts +0 -93
- package/dist/src/lib/coordination/index.ts +0 -9
- package/dist/src/lib/effects.svelte.ts +0 -48
- package/dist/src/lib/element/ElementHeading.svelte +0 -26
- package/dist/src/lib/element/ElementPhoto.svelte +0 -57
- package/dist/src/lib/element/ElementStats.svelte +0 -80
- package/dist/src/lib/element/ElementTile.svelte +0 -484
- package/dist/src/lib/element/data.ts +0 -14
- package/dist/src/lib/element/index.ts +0 -8
- package/dist/src/lib/element/types.ts +0 -62
- package/dist/src/lib/feedback/ClickFeedback.svelte +0 -58
- package/dist/src/lib/feedback/DragOverlay.svelte +0 -42
- package/dist/src/lib/feedback/index.ts +0 -4
- package/dist/src/lib/fermi-surface/FermiSlice.svelte +0 -189
- package/dist/src/lib/fermi-surface/FermiSurface.svelte +0 -600
- package/dist/src/lib/fermi-surface/FermiSurfaceControls.svelte +0 -448
- package/dist/src/lib/fermi-surface/FermiSurfaceScene.svelte +0 -794
- package/dist/src/lib/fermi-surface/FermiSurfaceTooltip.svelte +0 -111
- package/dist/src/lib/fermi-surface/compute.ts +0 -728
- package/dist/src/lib/fermi-surface/constants.ts +0 -32
- package/dist/src/lib/fermi-surface/export.ts +0 -64
- package/dist/src/lib/fermi-surface/index.ts +0 -14
- package/dist/src/lib/fermi-surface/marching-cubes.ts +0 -3
- package/dist/src/lib/fermi-surface/parse.ts +0 -574
- package/dist/src/lib/fermi-surface/symmetry.ts +0 -56
- package/dist/src/lib/fermi-surface/types.ts +0 -159
- package/dist/src/lib/heatmap-matrix/HeatmapMatrix.svelte +0 -1545
- package/dist/src/lib/heatmap-matrix/HeatmapMatrixControls.svelte +0 -225
- package/dist/src/lib/heatmap-matrix/index.ts +0 -167
- package/dist/src/lib/heatmap-matrix/shared.ts +0 -7
- package/dist/src/lib/icons.ts +0 -650
- package/dist/src/lib/index.ts +0 -61
- package/dist/src/lib/io/decompress.ts +0 -92
- package/dist/src/lib/io/export.ts +0 -385
- package/dist/src/lib/io/fetch.ts +0 -46
- package/dist/src/lib/io/file-drop.ts +0 -51
- package/dist/src/lib/io/index.ts +0 -7
- package/dist/src/lib/io/is-binary.ts +0 -24
- package/dist/src/lib/io/types.ts +0 -8
- package/dist/src/lib/io/url-drop.ts +0 -141
- package/dist/src/lib/isosurface/Isosurface.svelte +0 -285
- package/dist/src/lib/isosurface/IsosurfaceControls.svelte +0 -277
- package/dist/src/lib/isosurface/index.ts +0 -7
- package/dist/src/lib/isosurface/parse.ts +0 -656
- package/dist/src/lib/isosurface/slice.ts +0 -175
- package/dist/src/lib/isosurface/types.ts +0 -309
- package/dist/src/lib/labels.ts +0 -320
- package/dist/src/lib/layout/FullscreenToggle.svelte +0 -50
- package/dist/src/lib/layout/InfoCard.svelte +0 -120
- package/dist/src/lib/layout/InfoTag.svelte +0 -185
- package/dist/src/lib/layout/PropertyFilter.svelte +0 -246
- package/dist/src/lib/layout/SettingsSection.svelte +0 -148
- package/dist/src/lib/layout/SubpageGrid.svelte +0 -82
- package/dist/src/lib/layout/fullscreen.ts +0 -65
- package/dist/src/lib/layout/index.ts +0 -11
- package/dist/src/lib/layout/json-tree/JsonNode.svelte +0 -548
- package/dist/src/lib/layout/json-tree/JsonTree.svelte +0 -1230
- package/dist/src/lib/layout/json-tree/index.ts +0 -3
- package/dist/src/lib/layout/json-tree/types.ts +0 -126
- package/dist/src/lib/layout/json-tree/utils.ts +0 -682
- package/dist/src/lib/marching-cubes.ts +0 -614
- package/dist/src/lib/math.ts +0 -1081
- package/dist/src/lib/overlays/ContextMenu.svelte +0 -162
- package/dist/src/lib/overlays/CopyButton.svelte +0 -45
- package/dist/src/lib/overlays/DragControlTab.svelte +0 -98
- package/dist/src/lib/overlays/DraggablePane.svelte +0 -487
- package/dist/src/lib/overlays/InfoPaneCards.svelte +0 -149
- package/dist/src/lib/overlays/index.ts +0 -3
- package/dist/src/lib/periodic-table/PeriodicTable.svelte +0 -469
- package/dist/src/lib/periodic-table/PeriodicTableControls.svelte +0 -557
- package/dist/src/lib/periodic-table/PropertySelect.svelte +0 -37
- package/dist/src/lib/periodic-table/index.ts +0 -12
- package/dist/src/lib/phase-diagram/IsobaricBinaryPhaseDiagram.svelte +0 -1086
- package/dist/src/lib/phase-diagram/PhaseDiagramControls.svelte +0 -444
- package/dist/src/lib/phase-diagram/PhaseDiagramEditorPane.svelte +0 -126
- package/dist/src/lib/phase-diagram/PhaseDiagramExportPane.svelte +0 -184
- package/dist/src/lib/phase-diagram/PhaseDiagramTooltip.svelte +0 -391
- package/dist/src/lib/phase-diagram/TdbInfoPanel.svelte +0 -203
- package/dist/src/lib/phase-diagram/build-diagram.ts +0 -186
- package/dist/src/lib/phase-diagram/colors.ts +0 -58
- package/dist/src/lib/phase-diagram/diagram-input.ts +0 -40
- package/dist/src/lib/phase-diagram/index.ts +0 -13
- package/dist/src/lib/phase-diagram/parse.ts +0 -348
- package/dist/src/lib/phase-diagram/svg-to-diagram.ts +0 -1023
- package/dist/src/lib/phase-diagram/types.ts +0 -144
- package/dist/src/lib/phase-diagram/utils.ts +0 -775
- package/dist/src/lib/plot/AxisLabel.svelte +0 -51
- package/dist/src/lib/plot/BarPlot.svelte +0 -2113
- package/dist/src/lib/plot/BarPlotControls.svelte +0 -66
- package/dist/src/lib/plot/BinnedScatterPlot.svelte +0 -1114
- package/dist/src/lib/plot/ColorBar.svelte +0 -721
- package/dist/src/lib/plot/ColorScaleSelect.svelte +0 -54
- package/dist/src/lib/plot/ElementScatter.svelte +0 -63
- package/dist/src/lib/plot/Histogram.svelte +0 -1558
- package/dist/src/lib/plot/HistogramControls.svelte +0 -212
- package/dist/src/lib/plot/InteractiveAxisLabel.svelte +0 -96
- package/dist/src/lib/plot/Line.svelte +0 -84
- package/dist/src/lib/plot/PlotAxis.svelte +0 -169
- package/dist/src/lib/plot/PlotControls.svelte +0 -537
- package/dist/src/lib/plot/PlotLegend.svelte +0 -569
- package/dist/src/lib/plot/PlotTooltip.svelte +0 -67
- package/dist/src/lib/plot/PortalSelect.svelte +0 -253
- package/dist/src/lib/plot/ReferenceLine3D.svelte +0 -156
- package/dist/src/lib/plot/ReferencePlane.svelte +0 -175
- package/dist/src/lib/plot/ScatterPlot.svelte +0 -2778
- package/dist/src/lib/plot/ScatterPlot3D.svelte +0 -529
- package/dist/src/lib/plot/ScatterPlot3DControls.svelte +0 -437
- package/dist/src/lib/plot/ScatterPlot3DScene.svelte +0 -912
- package/dist/src/lib/plot/ScatterPlotControls.svelte +0 -306
- package/dist/src/lib/plot/ScatterPoint.svelte +0 -182
- package/dist/src/lib/plot/SpacegroupBarPlot.svelte +0 -293
- package/dist/src/lib/plot/Surface3D.svelte +0 -197
- package/dist/src/lib/plot/ZeroLines.svelte +0 -97
- package/dist/src/lib/plot/ZoomRect.svelte +0 -23
- package/dist/src/lib/plot/adaptive-density.ts +0 -316
- package/dist/src/lib/plot/auto-place.ts +0 -184
- package/dist/src/lib/plot/axis-utils.ts +0 -122
- package/dist/src/lib/plot/binned-scatter-types.ts +0 -83
- package/dist/src/lib/plot/data-cleaning.ts +0 -1069
- package/dist/src/lib/plot/data-transform.ts +0 -69
- package/dist/src/lib/plot/defaults.ts +0 -9
- package/dist/src/lib/plot/fill-utils.ts +0 -494
- package/dist/src/lib/plot/hover-lock.svelte.ts +0 -60
- package/dist/src/lib/plot/index.ts +0 -53
- package/dist/src/lib/plot/interactions.ts +0 -119
- package/dist/src/lib/plot/layout.ts +0 -425
- package/dist/src/lib/plot/reference-line.ts +0 -426
- package/dist/src/lib/plot/scales.ts +0 -654
- package/dist/src/lib/plot/svg.ts +0 -23
- package/dist/src/lib/plot/types.ts +0 -1144
- package/dist/src/lib/plot/utils/label-placement.ts +0 -541
- package/dist/src/lib/plot/utils/series-visibility.ts +0 -140
- package/dist/src/lib/plot/utils.ts +0 -11
- package/dist/src/lib/rdf/RdfPlot.svelte +0 -247
- package/dist/src/lib/rdf/calc-rdf.ts +0 -167
- package/dist/src/lib/rdf/index.ts +0 -27
- package/dist/src/lib/sanitize.ts +0 -126
- package/dist/src/lib/settings.ts +0 -1479
- package/dist/src/lib/spectral/Bands.svelte +0 -1040
- package/dist/src/lib/spectral/BandsAndDos.svelte +0 -134
- package/dist/src/lib/spectral/BrillouinBandsDos.svelte +0 -252
- package/dist/src/lib/spectral/Dos.svelte +0 -697
- package/dist/src/lib/spectral/helpers.ts +0 -1381
- package/dist/src/lib/spectral/index.ts +0 -8
- package/dist/src/lib/spectral/types.ts +0 -112
- package/dist/src/lib/state.svelte.ts +0 -64
- package/dist/src/lib/structure/Arrow.svelte +0 -72
- package/dist/src/lib/structure/AtomLegend.svelte +0 -815
- package/dist/src/lib/structure/Bond.svelte +0 -140
- package/dist/src/lib/structure/CanvasTooltip.svelte +0 -33
- package/dist/src/lib/structure/CellSelect.svelte +0 -349
- package/dist/src/lib/structure/Cylinder.svelte +0 -45
- package/dist/src/lib/structure/Lattice.svelte +0 -196
- package/dist/src/lib/structure/Structure.svelte +0 -2248
- package/dist/src/lib/structure/StructureControls.svelte +0 -1273
- package/dist/src/lib/structure/StructureExportPane.svelte +0 -252
- package/dist/src/lib/structure/StructureInfoPane.svelte +0 -737
- package/dist/src/lib/structure/StructureScene.svelte +0 -2255
- package/dist/src/lib/structure/atom-properties.ts +0 -316
- package/dist/src/lib/structure/bond-order-perception.ts +0 -447
- package/dist/src/lib/structure/bonding.ts +0 -944
- package/dist/src/lib/structure/export.ts +0 -861
- package/dist/src/lib/structure/index.ts +0 -291
- package/dist/src/lib/structure/label-placement.ts +0 -130
- package/dist/src/lib/structure/measure.ts +0 -45
- package/dist/src/lib/structure/parse.ts +0 -1705
- package/dist/src/lib/structure/partial-occupancy.ts +0 -183
- package/dist/src/lib/structure/pbc.ts +0 -164
- package/dist/src/lib/structure/supercell.ts +0 -226
- package/dist/src/lib/structure/validation.ts +0 -11
- package/dist/src/lib/symmetry/SymmetryStats.svelte +0 -226
- package/dist/src/lib/symmetry/WyckoffTable.svelte +0 -120
- package/dist/src/lib/symmetry/cell-transform.ts +0 -118
- package/dist/src/lib/symmetry/index.ts +0 -348
- package/dist/src/lib/symmetry/spacegroups.ts +0 -404
- package/dist/src/lib/table/HeatmapTable.svelte +0 -1833
- package/dist/src/lib/table/ToggleMenu.svelte +0 -385
- package/dist/src/lib/table/index.ts +0 -139
- package/dist/src/lib/theme/ThemeControl.svelte +0 -53
- package/dist/src/lib/theme/index.ts +0 -107
- package/dist/src/lib/time.ts +0 -71
- package/dist/src/lib/tooltip/TooltipContent.svelte +0 -58
- package/dist/src/lib/tooltip/index.ts +0 -2
- package/dist/src/lib/tooltip/types.ts +0 -13
- package/dist/src/lib/trajectory/Trajectory.svelte +0 -1545
- package/dist/src/lib/trajectory/TrajectoryError.svelte +0 -128
- package/dist/src/lib/trajectory/TrajectoryExportPane.svelte +0 -357
- package/dist/src/lib/trajectory/TrajectoryInfoPane.svelte +0 -313
- package/dist/src/lib/trajectory/constants.ts +0 -7
- package/dist/src/lib/trajectory/extract.ts +0 -196
- package/dist/src/lib/trajectory/format-detect.ts +0 -96
- package/dist/src/lib/trajectory/frame-reader.ts +0 -456
- package/dist/src/lib/trajectory/helpers.ts +0 -217
- package/dist/src/lib/trajectory/index.ts +0 -218
- package/dist/src/lib/trajectory/parse/ase.ts +0 -109
- package/dist/src/lib/trajectory/parse/hdf5.ts +0 -173
- package/dist/src/lib/trajectory/parse/index.ts +0 -411
- package/dist/src/lib/trajectory/parse/lammps.ts +0 -215
- package/dist/src/lib/trajectory/parse/vasp.ts +0 -102
- package/dist/src/lib/trajectory/parse/xyz.ts +0 -143
- package/dist/src/lib/trajectory/plotting.ts +0 -599
- package/dist/src/lib/trajectory/types.ts +0 -13
- package/dist/src/lib/utils.ts +0 -56
- package/dist/src/lib/xrd/XrdPlot.svelte +0 -615
- package/dist/src/lib/xrd/broadening.ts +0 -130
- package/dist/src/lib/xrd/calc-xrd.ts +0 -397
- package/dist/src/lib/xrd/index.ts +0 -38
- package/dist/src/lib/xrd/parse.ts +0 -858
- package/dist/webview.js +0 -29421
- package/icon.png +0 -0
- 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/scripts/sync-config.ts +0 -101
- package/src/declarations.d.ts +0 -2
- package/src/extension.ts +0 -972
- package/src/node-io.ts +0 -65
- package/src/types.ts +0 -17
- package/src/webview/JsonBrowser.svelte +0 -1079
- package/src/webview/PlotPanel.svelte +0 -346
- package/src/webview/detect.ts +0 -444
- package/src/webview/main.ts +0 -764
- package/src/webview/plot-utils.ts +0 -250
- 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 +0 -604
- package/tests/extension.test.ts +0 -2041
- package/tests/node-io.test.ts +0 -39
- package/tests/plot-utils.test.ts +0 -302
- package/tests/vite-plugin-json-gz.test.ts +0 -114
- package/tests/vscode-mock.ts +0 -18
- package/tests/webview.test.ts +0 -231
- package/tsconfig.json +0 -20
- package/vite-plugin-json-gz.ts +0 -29
- package/vite.config.ts +0 -34
- package/vite.extension.config.ts +0 -34
- /package/dist/{src/lib/EmptyState.svelte → EmptyState.svelte} +0 -0
- /package/dist/{src/lib/Icon.svelte → Icon.svelte} +0 -0
- /package/dist/{src/lib/app.css → app.css} +0 -0
- /package/dist/{src/lib/chempot-diagram → chempot-diagram}/ChemPotScene3D.svelte +0 -0
- /package/dist/{src/lib/colors → colors}/alloy-colors.json +0 -0
- /package/dist/{src/lib/colors → colors}/dark-mode-colors.json +0 -0
- /package/dist/{src/lib/colors → colors}/jmol-colors.json +0 -0
- /package/dist/{src/lib/colors → colors}/muted-colors.json +0 -0
- /package/dist/{src/lib/colors → colors}/pastel-colors.json +0 -0
- /package/dist/{src/lib/colors → colors}/vesta-colors.json +0 -0
- /package/dist/{src/lib/convex-hull → convex-hull}/TemperatureSlider.svelte +0 -0
- /package/dist/{src/lib/element → element}/BohrAtom.svelte +0 -0
- /package/dist/{src/lib/element → element}/Nucleus.svelte +0 -0
- /package/dist/{src/lib/element → element}/data.json +0 -0
- /package/dist/{src/lib/element → element}/data.json.gz +0 -0
- /package/dist/{src/lib/element → element}/data.json.gz.d.ts +0 -0
- /package/dist/{src/lib/element → element}/data.schema.json +0 -0
- /package/dist/{src/lib/element-image-urls.json → element-image-urls.json} +0 -0
- /package/dist/{src/lib/feedback → feedback}/Spinner.svelte +0 -0
- /package/dist/{src/lib/feedback → feedback}/StatusMessage.svelte +0 -0
- /package/dist/{src/lib/layout → layout}/json-tree/JsonValue.svelte +0 -0
- /package/dist/{src/lib/periodic-table → periodic-table}/TableInset.svelte +0 -0
- /package/dist/{src/lib/plot → plot}/FillArea.svelte +0 -0
- /package/dist/{src/lib/plot → plot}/ReferenceLine.svelte +0 -0
- /package/dist/{src/lib/theme → theme}/themes.mjs +0 -0
- /package/dist/{src/lib/xrd → xrd}/atomic_scattering_params.json +0 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { compute_e_form_per_atom, find_lowest_energy_unary_refs } from './thermodynamics';
|
|
2
|
+
import { is_unary_entry } from './helpers';
|
|
3
|
+
// --- Ternary coordinates ---
|
|
4
|
+
export const TRIANGLE_VERTICES = [
|
|
5
|
+
[1, 0],
|
|
6
|
+
[0.5, Math.sqrt(3) / 2],
|
|
7
|
+
[0, 0],
|
|
8
|
+
];
|
|
9
|
+
export function composition_to_barycentric_3d(composition, elements) {
|
|
10
|
+
if (elements.length !== 3) {
|
|
11
|
+
throw new Error(`Ternary system requires exactly 3 elements, got ${elements.length}`);
|
|
12
|
+
}
|
|
13
|
+
const amounts = elements.map((el) => composition[el] || 0);
|
|
14
|
+
const total = amounts.reduce((sum, amt) => sum + amt, 0);
|
|
15
|
+
if (total === 0) {
|
|
16
|
+
throw new Error(`Composition has no elements from the ternary system: ${elements.join(`-`)}`);
|
|
17
|
+
}
|
|
18
|
+
const normalized = amounts.map((amount) => amount / total);
|
|
19
|
+
return [normalized[0], normalized[1], normalized[2]];
|
|
20
|
+
}
|
|
21
|
+
// map barycentric coordinates to triangular 2D coordinates
|
|
22
|
+
export function barycentric_to_ternary_xy(barycentric) {
|
|
23
|
+
const [v0, v1, v2] = TRIANGLE_VERTICES;
|
|
24
|
+
const [a, b, c] = barycentric;
|
|
25
|
+
const x = v0[0] * a + v1[0] * b + v2[0] * c;
|
|
26
|
+
const y = v0[1] * a + v1[1] * b + v2[1] * c;
|
|
27
|
+
return [x, y];
|
|
28
|
+
}
|
|
29
|
+
// map barycentric coordinates to ternary 3D coordinates
|
|
30
|
+
export function barycentric_to_ternary_xyz(barycentric, formation_energy) {
|
|
31
|
+
const [x, y] = barycentric_to_ternary_xy(barycentric);
|
|
32
|
+
return { x, y, z: formation_energy };
|
|
33
|
+
}
|
|
34
|
+
export function get_triangle_centroid() {
|
|
35
|
+
const [v0, v1, v2] = TRIANGLE_VERTICES;
|
|
36
|
+
const centroid_x = (v0[0] + v1[0] + v2[0]) / 3;
|
|
37
|
+
const centroid_y = (v0[1] + v1[1] + v2[1]) / 3;
|
|
38
|
+
return { x: centroid_x, y: centroid_y, z: 0 };
|
|
39
|
+
}
|
|
40
|
+
export function calculate_face_normal(p1, p2, p3) {
|
|
41
|
+
const edge1 = { x: p2.x - p1.x, y: p2.y - p1.y, z: p2.z - p1.z };
|
|
42
|
+
const edge2 = { x: p3.x - p1.x, y: p3.y - p1.y, z: p3.z - p1.z };
|
|
43
|
+
const nx = edge1.y * edge2.z - edge1.z * edge2.y;
|
|
44
|
+
const ny = edge1.z * edge2.x - edge1.x * edge2.z;
|
|
45
|
+
const nz = edge1.x * edge2.y - edge1.y * edge2.x;
|
|
46
|
+
const magnitude = Math.hypot(nx, ny, nz);
|
|
47
|
+
if (magnitude === 0)
|
|
48
|
+
return { x: 0, y: 0, z: 1 };
|
|
49
|
+
return { x: nx / magnitude, y: ny / magnitude, z: nz / magnitude };
|
|
50
|
+
}
|
|
51
|
+
export const calculate_face_centroid = (p1, p2, p3) => ({
|
|
52
|
+
x: (p1.x + p2.x + p3.x) / 3,
|
|
53
|
+
y: (p1.y + p2.y + p3.y) / 3,
|
|
54
|
+
z: (p1.z + p2.z + p3.z) / 3,
|
|
55
|
+
});
|
|
56
|
+
export function get_ternary_3d_coordinates(entries, elements, el_refs) {
|
|
57
|
+
if (elements.length !== 3) {
|
|
58
|
+
throw new Error(`Ternary convex hull requires exactly 3 elements, got ${elements.length}`);
|
|
59
|
+
}
|
|
60
|
+
// Filter to entries within the ternary system first (use Set for O(1) lookups)
|
|
61
|
+
const element_set = new Set(elements);
|
|
62
|
+
const within_system = entries.filter((entry) => Object.keys(entry.composition).every((el) => element_set.has(el)));
|
|
63
|
+
if (within_system.length === 0) {
|
|
64
|
+
throw new Error(`No entries found within the ternary system: ${elements.join(`-`)}`);
|
|
65
|
+
}
|
|
66
|
+
// Check if we have formation energies - provide detailed diagnostics if missing
|
|
67
|
+
const entries_with_e_form = within_system.filter((entry) => typeof entry.e_form_per_atom === `number` && Number.isFinite(entry.e_form_per_atom));
|
|
68
|
+
// If none have e_form_per_atom, try to derive them using refs; only error if we can't
|
|
69
|
+
const refs = el_refs ?? find_lowest_energy_unary_refs(entries);
|
|
70
|
+
if (entries_with_e_form.length === 0) {
|
|
71
|
+
const missing_refs = elements.filter((el) => !refs[el]);
|
|
72
|
+
if (missing_refs.length > 0) {
|
|
73
|
+
throw new Error([
|
|
74
|
+
`Ternary convex hull requires formation energies (e_form_per_atom) for z-axis positioning, but none of the ${within_system.length} entries in the ${elements.join(`-`)} system have this field.`,
|
|
75
|
+
`\nCannot compute formation energies because elemental references are missing for: ${missing_refs.join(`, `)}.`,
|
|
76
|
+
`To fix: Ensure your dataset includes stable unary (single-element) entries for each element.`,
|
|
77
|
+
].join(`\n`));
|
|
78
|
+
}
|
|
79
|
+
// proceed; values will be computed during mapping below
|
|
80
|
+
}
|
|
81
|
+
// Map entries to ternary plot coordinates
|
|
82
|
+
const result = within_system.map((entry) => {
|
|
83
|
+
const barycentric = composition_to_barycentric_3d(entry.composition, elements);
|
|
84
|
+
const e_form_per_atom = typeof entry.e_form_per_atom === `number` && Number.isFinite(entry.e_form_per_atom)
|
|
85
|
+
? entry.e_form_per_atom
|
|
86
|
+
: (compute_e_form_per_atom(entry, refs) ?? NaN);
|
|
87
|
+
const xyz = barycentric_to_ternary_xyz(barycentric, e_form_per_atom);
|
|
88
|
+
const is_element = is_unary_entry(entry);
|
|
89
|
+
return { ...entry, ...xyz, is_element };
|
|
90
|
+
});
|
|
91
|
+
return result;
|
|
92
|
+
}
|
|
93
|
+
export function get_triangle_edges() {
|
|
94
|
+
const [v0, v1, v2] = TRIANGLE_VERTICES.map(([x, y]) => ({ x, y, z: 0 }));
|
|
95
|
+
return [
|
|
96
|
+
[v0, v1],
|
|
97
|
+
[v1, v2],
|
|
98
|
+
[v2, v0],
|
|
99
|
+
];
|
|
100
|
+
}
|
|
101
|
+
export function get_triangle_vertical_edges(min_z, max_z) {
|
|
102
|
+
const vertices = TRIANGLE_VERTICES.map(([x, y]) => ({ x, y, z: 0 }));
|
|
103
|
+
return vertices.map((vertex) => [
|
|
104
|
+
{ ...vertex, z: min_z },
|
|
105
|
+
{ ...vertex, z: max_z },
|
|
106
|
+
]);
|
|
107
|
+
}
|
|
108
|
+
// --- N-dimensional barycentric coordinates (for 5+ element systems) ---
|
|
109
|
+
// Convert composition to N-dimensional barycentric coordinates
|
|
110
|
+
// Returns array of length N where coords sum to 1 (all N coords are explicit)
|
|
111
|
+
// The last coordinate represents formation energy when used in hull calculations
|
|
112
|
+
export function composition_to_barycentric_nd(composition, elements) {
|
|
113
|
+
const n = elements.length;
|
|
114
|
+
if (n < 2) {
|
|
115
|
+
throw new Error(`Barycentric coordinates require at least 2 elements, got ${n}`);
|
|
116
|
+
}
|
|
117
|
+
// NaN and undefined/missing elements are treated as 0
|
|
118
|
+
const amounts = elements.map((el) => {
|
|
119
|
+
const val = composition[el];
|
|
120
|
+
return val == null || Number.isNaN(val) ? 0 : val;
|
|
121
|
+
});
|
|
122
|
+
let total = 0;
|
|
123
|
+
const negative = [];
|
|
124
|
+
for (let idx = 0; idx < amounts.length; idx++) {
|
|
125
|
+
if (amounts[idx] < 0)
|
|
126
|
+
negative.push(elements[idx]);
|
|
127
|
+
else
|
|
128
|
+
total += amounts[idx];
|
|
129
|
+
}
|
|
130
|
+
if (negative.length > 0) {
|
|
131
|
+
throw new Error(`Composition contains negative amounts for: ${negative.join(`, `)}`);
|
|
132
|
+
}
|
|
133
|
+
if (total === 0) {
|
|
134
|
+
throw new Error(`Composition has no elements from the system: ${elements.join(`-`)}`);
|
|
135
|
+
}
|
|
136
|
+
return amounts.map((amount) => amount / total);
|
|
137
|
+
}
|
|
138
|
+
// --- Quaternary coordinates ---
|
|
139
|
+
export const TETRAHEDRON_VERTICES = [
|
|
140
|
+
[1, 0, 0],
|
|
141
|
+
[0.5, Math.sqrt(3) / 2, 0],
|
|
142
|
+
[0.5, Math.sqrt(3) / 6, Math.sqrt(6) / 3],
|
|
143
|
+
[0, 0, 0],
|
|
144
|
+
];
|
|
145
|
+
export function composition_to_barycentric_4d(composition, elements) {
|
|
146
|
+
if (elements.length !== 4) {
|
|
147
|
+
throw new Error(`Quaternary barycentric coordinates require exactly 4 elements`);
|
|
148
|
+
}
|
|
149
|
+
const amounts = elements.map((el) => composition[el] || 0);
|
|
150
|
+
const total = amounts.reduce((sum, amount) => sum + amount, 0);
|
|
151
|
+
if (total === 0) {
|
|
152
|
+
throw new Error(`Composition has no elements from the quaternary system: ${elements.join(`-`)}`);
|
|
153
|
+
}
|
|
154
|
+
return amounts.map((amount) => amount / total);
|
|
155
|
+
}
|
|
156
|
+
// map barycentric coordinates to tetrahedral 3D coordinates
|
|
157
|
+
export function barycentric_to_tetrahedral(barycentric) {
|
|
158
|
+
if (barycentric.length !== 4) {
|
|
159
|
+
throw new Error(`Tetrahedral coordinates require exactly 4D barycentric input, got ${barycentric.length}`);
|
|
160
|
+
}
|
|
161
|
+
let [x, y, z] = [0, 0, 0];
|
|
162
|
+
for (let idx = 0; idx < 4; idx++) {
|
|
163
|
+
x += barycentric[idx] * TETRAHEDRON_VERTICES[idx][0];
|
|
164
|
+
y += barycentric[idx] * TETRAHEDRON_VERTICES[idx][1];
|
|
165
|
+
z += barycentric[idx] * TETRAHEDRON_VERTICES[idx][2];
|
|
166
|
+
}
|
|
167
|
+
return { x, y, z };
|
|
168
|
+
}
|
|
169
|
+
export function compute_4d_coords(entries, elements) {
|
|
170
|
+
if (elements.length !== 4) {
|
|
171
|
+
throw new Error(`Quaternary convex hull requires exactly 4 elements`);
|
|
172
|
+
}
|
|
173
|
+
// Use Set for O(1) lookups instead of O(n) includes
|
|
174
|
+
const element_set = new Set(elements);
|
|
175
|
+
const within_system = entries.filter((entry) => Object.keys(entry.composition).every((el) => element_set.has(el)));
|
|
176
|
+
return within_system.map((entry) => {
|
|
177
|
+
const barycentric_4d = composition_to_barycentric_4d(entry.composition, elements);
|
|
178
|
+
const tetrahedral = barycentric_to_tetrahedral(barycentric_4d);
|
|
179
|
+
const is_element = is_unary_entry(entry);
|
|
180
|
+
return { ...entry, ...tetrahedral, is_element };
|
|
181
|
+
});
|
|
182
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PhaseData } from './types';
|
|
2
|
+
export declare const demo_temperatures: number[];
|
|
3
|
+
type Composition = Record<string, number>;
|
|
4
|
+
export declare function make_demo_phase(composition: Composition, seed: number, entropy_boost?: number): PhaseData;
|
|
5
|
+
export declare function create_temp_ternary_entries_li_fe_o(): PhaseData[];
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export const demo_temperatures = Array.from({ length: 13 }, (_, idx) => 300 + idx * 100);
|
|
2
|
+
function seeded_random(seed) {
|
|
3
|
+
const x_val = Math.sin(seed * 9999) * 10000;
|
|
4
|
+
return x_val - Math.floor(x_val);
|
|
5
|
+
}
|
|
6
|
+
export function make_demo_phase(composition, seed, entropy_boost = 0) {
|
|
7
|
+
const n_elements = Object.keys(composition).length;
|
|
8
|
+
const energy = -0.3 * n_elements - seeded_random(seed) * 0.5;
|
|
9
|
+
const entropy_coef = 0.5 + n_elements * 0.3 + seeded_random(seed + 1) * 2 + entropy_boost;
|
|
10
|
+
return {
|
|
11
|
+
composition,
|
|
12
|
+
energy,
|
|
13
|
+
temperatures: demo_temperatures,
|
|
14
|
+
free_energies: demo_temperatures.map((temp_kelvin) => energy +
|
|
15
|
+
entropy_coef * temp_kelvin * 0.0001 -
|
|
16
|
+
0.00005 * temp_kelvin * Math.log(temp_kelvin)),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export function create_temp_ternary_entries_li_fe_o() {
|
|
20
|
+
return [
|
|
21
|
+
...[`Li`, `Fe`, `O`].map((element, idx) => make_demo_phase({ [element]: 1 }, idx)),
|
|
22
|
+
...[
|
|
23
|
+
[`Li`, `Fe`],
|
|
24
|
+
[`Li`, `O`],
|
|
25
|
+
[`Fe`, `O`],
|
|
26
|
+
].flatMap(([element_a, element_b], idx) => [0.33, 0.5, 0.67].flatMap((fraction, jdx) => [
|
|
27
|
+
make_demo_phase({ [element_a]: fraction, [element_b]: 1 - fraction }, 100 + idx * 10 + jdx),
|
|
28
|
+
make_demo_phase({ [element_a]: fraction, [element_b]: 1 - fraction }, 200 + idx * 10 + jdx, 3),
|
|
29
|
+
])),
|
|
30
|
+
...[
|
|
31
|
+
{ Li: 0.33, Fe: 0.33, O: 0.34 },
|
|
32
|
+
{ Li: 0.5, Fe: 0.25, O: 0.25 },
|
|
33
|
+
{ Li: 0.25, Fe: 0.5, O: 0.25 },
|
|
34
|
+
{ Li: 0.25, Fe: 0.25, O: 0.5 },
|
|
35
|
+
].flatMap((composition, idx) => [
|
|
36
|
+
make_demo_phase(composition, 300 + idx),
|
|
37
|
+
make_demo_phase(composition, 400 + idx, 4),
|
|
38
|
+
]),
|
|
39
|
+
];
|
|
40
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { GasAnalysis, GasSpecies, GasThermodynamicsConfig, GasThermodynamicsProvider, PhaseData } from './types';
|
|
2
|
+
import type { ElementSymbol } from '../element';
|
|
3
|
+
export declare const R_EV_PER_K = 0.00008617333262;
|
|
4
|
+
export declare const P_REF = 1;
|
|
5
|
+
export declare const DEFAULT_ELEMENT_TO_GAS: Readonly<Partial<Record<ElementSymbol, GasSpecies>>>;
|
|
6
|
+
export declare const GAS_STOICHIOMETRY: Readonly<Record<GasSpecies, Partial<Record<ElementSymbol, number>>>>;
|
|
7
|
+
export declare function create_default_gas_provider(): GasThermodynamicsProvider;
|
|
8
|
+
export declare function get_default_gas_provider(): GasThermodynamicsProvider;
|
|
9
|
+
export declare function compute_gas_chemical_potential(provider: GasThermodynamicsProvider, gas: GasSpecies, T: number, P: number): number;
|
|
10
|
+
export declare function compute_element_chemical_potential(provider: GasThermodynamicsProvider, gas: GasSpecies, element: ElementSymbol, T: number, P: number): number;
|
|
11
|
+
export declare function analyze_gas_data(entries: PhaseData[], config: GasThermodynamicsConfig): GasAnalysis;
|
|
12
|
+
export declare function get_effective_pressures(config: GasThermodynamicsConfig): Record<GasSpecies, number>;
|
|
13
|
+
export declare function compute_gas_correction(entry: PhaseData, config: GasThermodynamicsConfig, T: number, pressures: Record<GasSpecies, number>): number;
|
|
14
|
+
export declare function apply_gas_corrections(entries: PhaseData[], config: GasThermodynamicsConfig | undefined, T: number): PhaseData[];
|
|
15
|
+
export declare function format_chemical_potential(mu: number, decimals?: number): string;
|
|
16
|
+
export declare function format_pressure(P: number): string;
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
// Gas phase thermodynamics for convex hull calculations
|
|
2
|
+
// Enables atmosphere-controlled phase diagram analysis
|
|
3
|
+
import { count_atoms_in_composition } from '../composition';
|
|
4
|
+
import { DEFAULT_GAS_PRESSURES, GAS_SPECIES } from './types';
|
|
5
|
+
// Physical constants
|
|
6
|
+
export const R_EV_PER_K = 8.617333262e-5; // Gas constant in eV/K (k_B)
|
|
7
|
+
export const P_REF = 1.0; // Reference pressure in bar
|
|
8
|
+
// Default element-to-gas mapping (which element comes from which gas)
|
|
9
|
+
export const DEFAULT_ELEMENT_TO_GAS = {
|
|
10
|
+
O: `O2`,
|
|
11
|
+
N: `N2`,
|
|
12
|
+
H: `H2`,
|
|
13
|
+
F: `F2`,
|
|
14
|
+
C: `CO2`, // Carbon typically from CO2 in oxidizing atmospheres
|
|
15
|
+
};
|
|
16
|
+
// Stoichiometric coefficients: atoms of element per molecule of gas
|
|
17
|
+
// e.g., O2 has 2 O atoms, H2O has 2 H and 1 O
|
|
18
|
+
export const GAS_STOICHIOMETRY = {
|
|
19
|
+
O2: { O: 2 },
|
|
20
|
+
N2: { N: 2 },
|
|
21
|
+
H2: { H: 2 },
|
|
22
|
+
F2: { F: 2 },
|
|
23
|
+
CO: { C: 1, O: 1 },
|
|
24
|
+
CO2: { C: 1, O: 2 },
|
|
25
|
+
H2O: { H: 2, O: 1 },
|
|
26
|
+
};
|
|
27
|
+
// Default T*S data for common gases (in eV/molecule)
|
|
28
|
+
// Source: Barin Thermochemical Tables and NBS Thermochemical Tables
|
|
29
|
+
// Data compiled to match PIRO (https://github.com/GENESIS-EFRC/piro)
|
|
30
|
+
// Note: These values are T*S in eV/molecule
|
|
31
|
+
// oxfmt-ignore
|
|
32
|
+
const DEFAULT_TS_DATA = {
|
|
33
|
+
O2: {
|
|
34
|
+
temperatures: [0, 298, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000],
|
|
35
|
+
values: [0, 0.317, 0.3192, 0.4433, 0.5718, 0.7041, 0.8396, 0.9781, 1.119, 1.2623, 1.4075, 1.5547, 1.7036, 1.8541, 2.006, 2.1594, 2.3141, 2.47, 2.6271, 2.7854],
|
|
36
|
+
},
|
|
37
|
+
H2: {
|
|
38
|
+
temperatures: [0, 298, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000],
|
|
39
|
+
values: [0, 0.2019, 0.2034, 0.2886, 0.3776, 0.4697, 0.5645, 0.6614, 0.7605, 0.8614, 0.964, 1.0683, 1.1741, 1.2815, 1.3902, 1.5003, 1.6116, 1.7242, 1.838, 1.9528],
|
|
40
|
+
},
|
|
41
|
+
N2: {
|
|
42
|
+
temperatures: [0, 298, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000],
|
|
43
|
+
values: [0, 0.2959, 0.2981, 0.4149, 0.5356, 0.6596, 0.7866, 0.9161, 1.0481, 1.1822, 1.3184, 1.4563, 1.596, 1.7372, 1.8799, 2.0239, 2.1693, 2.3158, 2.4634, 2.6122],
|
|
44
|
+
},
|
|
45
|
+
CO: {
|
|
46
|
+
temperatures: [0, 298, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000],
|
|
47
|
+
values: [0, 0.3054, 0.3076, 0.4275, 0.5515, 0.6788, 0.8092, 0.9423, 1.0778, 1.2155, 1.3552, 1.4967, 1.64, 1.7848, 1.9311, 2.0788, 2.2277, 2.3779, 2.5291, 2.6815],
|
|
48
|
+
},
|
|
49
|
+
CO2: {
|
|
50
|
+
temperatures: [0, 298, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000],
|
|
51
|
+
values: [0, 0.2202, 0.2218, 0.3113, 0.4057, 0.5042, 0.6064, 0.7116, 0.8197, 0.9303, 1.0432, 1.1582, 1.2751, 1.3938, 1.5141, 1.636, 1.7593, 1.8839, 2.0098, 2.1369],
|
|
52
|
+
},
|
|
53
|
+
H2O: {
|
|
54
|
+
temperatures: [0, 298, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000],
|
|
55
|
+
values: [0, 0.1946, 0.1961, 0.2749, 0.357, 0.4419, 0.5293, 0.6189, 0.7107, 0.8045, 0.9001, 0.9975, 1.0966, 1.1972, 1.2994, 1.403, 1.5079, 1.6142, 1.7216, 1.8303],
|
|
56
|
+
},
|
|
57
|
+
F2: {
|
|
58
|
+
// F2 not in Barin/NBS tables used by PIRO - approximated from similar homonuclear diatomics (O2, N2)
|
|
59
|
+
temperatures: [
|
|
60
|
+
0, 298, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600,
|
|
61
|
+
1700, 1800, 1900, 2000,
|
|
62
|
+
],
|
|
63
|
+
values: [
|
|
64
|
+
0, 0.31, 0.312, 0.435, 0.56, 0.69, 0.82, 0.96, 1.1, 1.24, 1.38, 1.53, 1.68, 1.83,
|
|
65
|
+
1.98, 2.13, 2.29, 2.45, 2.61, 2.77,
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
// Formation enthalpies H_f at 0K in eV/molecule
|
|
70
|
+
// These are the reference energies for formation from elements
|
|
71
|
+
const DEFAULT_ENTHALPY = {
|
|
72
|
+
CO: -0.5897,
|
|
73
|
+
// CO2: Base value -1.3583 eV from JANAF tables, with -0.2482 eV correction
|
|
74
|
+
// to improve accuracy for carbonate phase predictions (Wang et al., PRB 73, 195107)
|
|
75
|
+
CO2: -1.3583 - 0.2482,
|
|
76
|
+
H2O: -0.82547,
|
|
77
|
+
// O2, N2, H2, F2 are reference states with H_f = 0
|
|
78
|
+
};
|
|
79
|
+
// Interpolation Helpers
|
|
80
|
+
// Linearly interpolate T*S value at given temperature
|
|
81
|
+
function interpolate_ts(data, T) {
|
|
82
|
+
const { temperatures, values } = data;
|
|
83
|
+
// Clamp to valid range
|
|
84
|
+
if (T <= temperatures[0])
|
|
85
|
+
return values[0];
|
|
86
|
+
if (T >= temperatures[temperatures.length - 1]) {
|
|
87
|
+
return values[values.length - 1];
|
|
88
|
+
}
|
|
89
|
+
// Find bracketing indices
|
|
90
|
+
let idx = 0;
|
|
91
|
+
while (idx < temperatures.length - 1 && temperatures[idx + 1] < T)
|
|
92
|
+
idx++;
|
|
93
|
+
const T_low = temperatures[idx];
|
|
94
|
+
const T_high = temperatures[idx + 1];
|
|
95
|
+
const v_low = values[idx];
|
|
96
|
+
const v_high = values[idx + 1];
|
|
97
|
+
// Linear interpolation
|
|
98
|
+
const fraction = (T - T_low) / (T_high - T_low);
|
|
99
|
+
return v_low + fraction * (v_high - v_low);
|
|
100
|
+
}
|
|
101
|
+
// Default Provider Implementation
|
|
102
|
+
// Create the default gas thermodynamics provider using built-in data
|
|
103
|
+
export function create_default_gas_provider() {
|
|
104
|
+
return {
|
|
105
|
+
get_standard_chemical_potential(gas, T) {
|
|
106
|
+
// μ°(T) = H_f - T*S
|
|
107
|
+
// For elemental gases (O2, N2, H2, F2), H_f = 0
|
|
108
|
+
const H_f = DEFAULT_ENTHALPY[gas] ?? 0;
|
|
109
|
+
const TS = interpolate_ts(DEFAULT_TS_DATA[gas], T);
|
|
110
|
+
return H_f - TS;
|
|
111
|
+
},
|
|
112
|
+
get_supported_gases() {
|
|
113
|
+
return [...GAS_SPECIES];
|
|
114
|
+
},
|
|
115
|
+
get_temperature_range() {
|
|
116
|
+
return [0, 2000];
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
// Singleton default provider
|
|
121
|
+
let default_provider = null;
|
|
122
|
+
// Get the default gas thermodynamics provider (lazy initialization)
|
|
123
|
+
export function get_default_gas_provider() {
|
|
124
|
+
default_provider ??= create_default_gas_provider();
|
|
125
|
+
return default_provider;
|
|
126
|
+
}
|
|
127
|
+
// Gas Chemical Potential Calculations
|
|
128
|
+
// Number of atoms in each gas molecule
|
|
129
|
+
const GAS_NUM_ATOMS = {
|
|
130
|
+
O2: 2,
|
|
131
|
+
N2: 2,
|
|
132
|
+
H2: 2,
|
|
133
|
+
F2: 2,
|
|
134
|
+
CO: 2,
|
|
135
|
+
CO2: 3,
|
|
136
|
+
H2O: 3,
|
|
137
|
+
};
|
|
138
|
+
// Compute gas chemical potential at given temperature and pressure
|
|
139
|
+
// Following PIRO's convention, all values are per atom:
|
|
140
|
+
// μ_per_atom(T, P) = H_per_atom - (TS)_per_atom + k_B·T·ln(P/P₀) / num_atoms
|
|
141
|
+
// provider - Thermodynamic data provider
|
|
142
|
+
// gas - Gas species
|
|
143
|
+
// T - Temperature in Kelvin
|
|
144
|
+
// P - Pressure in bar
|
|
145
|
+
// Returns chemical potential in eV/atom
|
|
146
|
+
export function compute_gas_chemical_potential(provider, gas, T, P) {
|
|
147
|
+
const mu_standard = provider.get_standard_chemical_potential(gas, T);
|
|
148
|
+
// Clamp invalid/infinite pressure to reference pressure
|
|
149
|
+
const effective_P = Number.isFinite(P) && P > 0 ? P : P_REF;
|
|
150
|
+
// μ_per_atom(T, P) = μ°_per_atom(T) + k_B·T·ln(P/P₀) / num_atoms
|
|
151
|
+
// The RT·ln(P) term must be divided by num_atoms to match PIRO's per-atom convention
|
|
152
|
+
const num_atoms = GAS_NUM_ATOMS[gas];
|
|
153
|
+
return mu_standard + (R_EV_PER_K * T * Math.log(effective_P / P_REF)) / num_atoms;
|
|
154
|
+
}
|
|
155
|
+
// Compute chemical potential per atom of a specific element from a gas
|
|
156
|
+
// Since compute_gas_chemical_potential returns per-atom of gas molecule,
|
|
157
|
+
// we need to convert to per-atom of the specific element.
|
|
158
|
+
// For O from O2: μ(O) = μ(O2)_per_atom * num_atoms(O2) / stoich(O in O2) = μ(O2)_per_atom * 2 / 2 = μ(O2)_per_atom
|
|
159
|
+
// For O from CO2: μ(O) = μ(CO2)_per_atom * num_atoms(CO2) / stoich(O in CO2) = μ(CO2)_per_atom * 3 / 2
|
|
160
|
+
// provider - Thermodynamic data provider
|
|
161
|
+
// gas - Gas species
|
|
162
|
+
// element - Element symbol
|
|
163
|
+
// T - Temperature in Kelvin
|
|
164
|
+
// P - Pressure in bar
|
|
165
|
+
// Returns chemical potential per atom of element in eV/atom
|
|
166
|
+
export function compute_element_chemical_potential(provider, gas, element, T, P) {
|
|
167
|
+
const mu_gas_per_atom = compute_gas_chemical_potential(provider, gas, T, P);
|
|
168
|
+
const num_atoms = GAS_NUM_ATOMS[gas];
|
|
169
|
+
const stoich = GAS_STOICHIOMETRY[gas][element] ?? 1;
|
|
170
|
+
// Convert from per-atom-of-gas to per-atom-of-element
|
|
171
|
+
return (mu_gas_per_atom * num_atoms) / stoich;
|
|
172
|
+
}
|
|
173
|
+
// Gas Analysis and Corrections
|
|
174
|
+
// Analyze entries to determine which gases are relevant for the chemical system
|
|
175
|
+
export function analyze_gas_data(entries, config) {
|
|
176
|
+
const enabled_gases = config.enabled_gases ?? [];
|
|
177
|
+
if (enabled_gases.length === 0) {
|
|
178
|
+
return {
|
|
179
|
+
has_gas_dependent_elements: false,
|
|
180
|
+
gas_elements: [],
|
|
181
|
+
relevant_gases: [],
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
// Get element-to-gas mapping
|
|
185
|
+
const element_to_gas = {
|
|
186
|
+
...DEFAULT_ELEMENT_TO_GAS,
|
|
187
|
+
...config.element_to_gas,
|
|
188
|
+
};
|
|
189
|
+
// Find all elements in the chemical system
|
|
190
|
+
const all_elements = new Set();
|
|
191
|
+
for (const entry of entries) {
|
|
192
|
+
for (const el of Object.keys(entry.composition)) {
|
|
193
|
+
if ((entry.composition[el] ?? 0) > 0) {
|
|
194
|
+
all_elements.add(el);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
// Find elements that come from enabled gases
|
|
199
|
+
const gas_elements = [];
|
|
200
|
+
const relevant_gases = [];
|
|
201
|
+
for (const el of all_elements) {
|
|
202
|
+
const gas = element_to_gas[el];
|
|
203
|
+
if (gas && enabled_gases.includes(gas)) {
|
|
204
|
+
gas_elements.push(el);
|
|
205
|
+
if (!relevant_gases.includes(gas)) {
|
|
206
|
+
relevant_gases.push(gas);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
return {
|
|
211
|
+
has_gas_dependent_elements: gas_elements.length > 0,
|
|
212
|
+
gas_elements,
|
|
213
|
+
relevant_gases,
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
// Get effective pressures for gases, using defaults for unspecified values
|
|
217
|
+
export function get_effective_pressures(config) {
|
|
218
|
+
const pressures = { ...DEFAULT_GAS_PRESSURES };
|
|
219
|
+
if (config.pressures) {
|
|
220
|
+
for (const [gas, P] of Object.entries(config.pressures)) {
|
|
221
|
+
if (Number.isFinite(P) && P > 0) {
|
|
222
|
+
pressures[gas] = P;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return pressures;
|
|
227
|
+
}
|
|
228
|
+
// Compute gas chemical potential correction for an entry's energy
|
|
229
|
+
// The correction accounts for the difference between the gas chemical potential
|
|
230
|
+
// at the given (T, P) and the reference state (0 K, 1 bar).
|
|
231
|
+
// For a compound A_x B_y where B comes from gas B2:
|
|
232
|
+
// ΔE_correction = (y/2) * [μ(B2, T, P) - μ(B2, 0K, 1bar)]
|
|
233
|
+
// This shifts the formation energy based on the gas atmosphere.
|
|
234
|
+
export function compute_gas_correction(entry, config, T, pressures) {
|
|
235
|
+
const provider = config.provider ?? get_default_gas_provider();
|
|
236
|
+
const element_to_gas = {
|
|
237
|
+
...DEFAULT_ELEMENT_TO_GAS,
|
|
238
|
+
...config.element_to_gas,
|
|
239
|
+
};
|
|
240
|
+
const enabled_gases = new Set(config.enabled_gases ?? []);
|
|
241
|
+
let correction = 0;
|
|
242
|
+
const n_atoms = count_atoms_in_composition(entry.composition);
|
|
243
|
+
for (const [el_str, amount] of Object.entries(entry.composition)) {
|
|
244
|
+
if (typeof amount !== `number` || amount <= 0)
|
|
245
|
+
continue;
|
|
246
|
+
const el = el_str;
|
|
247
|
+
const gas = element_to_gas[el];
|
|
248
|
+
if (!gas || !enabled_gases.has(gas))
|
|
249
|
+
continue;
|
|
250
|
+
const P = pressures[gas];
|
|
251
|
+
const stoich = GAS_STOICHIOMETRY[gas][el] ?? 1;
|
|
252
|
+
const num_atoms = GAS_NUM_ATOMS[gas];
|
|
253
|
+
// Chemical potential per atom of gas at current (T, P)
|
|
254
|
+
const mu_TP = compute_gas_chemical_potential(provider, gas, T, P);
|
|
255
|
+
// Chemical potential per atom of gas at reference (0K, 1bar) - just H_f since T*S = 0 at 0K
|
|
256
|
+
const mu_ref = provider.get_standard_chemical_potential(gas, 0);
|
|
257
|
+
// Correction per atom of this element
|
|
258
|
+
// Convert from per-atom-of-gas to per-atom-of-element: multiply by num_atoms, divide by stoich
|
|
259
|
+
const delta_mu = ((mu_TP - mu_ref) * num_atoms) / stoich;
|
|
260
|
+
// Total correction for this element in the compound (per atom of compound)
|
|
261
|
+
correction += (amount / n_atoms) * delta_mu;
|
|
262
|
+
}
|
|
263
|
+
return correction;
|
|
264
|
+
}
|
|
265
|
+
// Apply gas chemical potential corrections to elemental reference entries only.
|
|
266
|
+
// IMPORTANT: Corrections are only applied to unary (single-element) entries.
|
|
267
|
+
// This is thermodynamically correct because:
|
|
268
|
+
// - Formation energy = E(compound) - Σ n_i * μ_i
|
|
269
|
+
// - For gas-forming elements (O, N, H...), μ_i = μ(gas, T, P)
|
|
270
|
+
// - For solid elements, μ_i = E(element)
|
|
271
|
+
// If we applied corrections to ALL entries, they would cancel out in the
|
|
272
|
+
// formation energy calculation, resulting in no change to the hull.
|
|
273
|
+
// By only correcting unary references, we effectively replace the standard
|
|
274
|
+
// elemental reference with the gas chemical potential at (T, P).
|
|
275
|
+
export function apply_gas_corrections(entries, config, T) {
|
|
276
|
+
if (!config?.enabled_gases?.length)
|
|
277
|
+
return entries;
|
|
278
|
+
const analysis = analyze_gas_data(entries, config);
|
|
279
|
+
// No gas-dependent elements, return entries unchanged
|
|
280
|
+
if (!analysis.has_gas_dependent_elements)
|
|
281
|
+
return entries;
|
|
282
|
+
const pressures = get_effective_pressures(config);
|
|
283
|
+
return entries.map((entry) => {
|
|
284
|
+
// Only apply corrections to unary (single-element) entries
|
|
285
|
+
// These serve as reference states for formation energy calculations
|
|
286
|
+
const elements_in_entry = Object.entries(entry.composition).filter(([, amt]) => typeof amt === `number` && amt > 0);
|
|
287
|
+
if (elements_in_entry.length !== 1)
|
|
288
|
+
return entry; // Not unary, skip
|
|
289
|
+
const correction = compute_gas_correction(entry, config, T, pressures);
|
|
290
|
+
// If no correction needed, return entry unchanged
|
|
291
|
+
if (Math.abs(correction) < 1e-12)
|
|
292
|
+
return entry;
|
|
293
|
+
// Apply correction to energy (update both energy and energy_per_atom
|
|
294
|
+
// so downstream formation energy calculations use the corrected value)
|
|
295
|
+
// Both fields store per-atom values, and correction is also per-atom
|
|
296
|
+
const corrected_energy = entry.energy + correction;
|
|
297
|
+
return {
|
|
298
|
+
...entry,
|
|
299
|
+
energy: corrected_energy,
|
|
300
|
+
energy_per_atom: corrected_energy,
|
|
301
|
+
};
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
// Format chemical potential for display (e.g., "-1.23 eV")
|
|
305
|
+
export function format_chemical_potential(mu, decimals = 3) {
|
|
306
|
+
return `${mu >= 0 ? `+` : ``}${mu.toFixed(decimals)} eV`;
|
|
307
|
+
}
|
|
308
|
+
// Format pressure for display (scientific notation for very small/large values)
|
|
309
|
+
export function format_pressure(P) {
|
|
310
|
+
if (P >= 0.01 && P < 100) {
|
|
311
|
+
return `${P.toPrecision(3)} bar`;
|
|
312
|
+
}
|
|
313
|
+
return `${P.toExponential(2)} bar`;
|
|
314
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { type D3InterpolateName } from '../colors';
|
|
2
|
+
import type { EnergyModeInfo } from './';
|
|
3
|
+
import type { ElementSymbol } from '../element';
|
|
4
|
+
import type { ConvexHullConfig, GasAnalysis, GasThermodynamicsConfig, HighlightStyle, MarkerSymbol, PhaseData } from './types';
|
|
5
|
+
import { DEFAULT_GAS_TEMP } from './types';
|
|
6
|
+
export { DEFAULT_GAS_TEMP };
|
|
7
|
+
export declare const HULL_STABILITY_TOL = 0.000001;
|
|
8
|
+
export declare function compute_hull_stability(raw_distance: number, exclude_from_hull?: boolean, tol?: number): {
|
|
9
|
+
e_above_hull: number;
|
|
10
|
+
is_stable: boolean;
|
|
11
|
+
};
|
|
12
|
+
type StabilityEntry = {
|
|
13
|
+
is_stable?: boolean;
|
|
14
|
+
e_above_hull?: number;
|
|
15
|
+
};
|
|
16
|
+
export declare const entry_is_stable: (entry: StabilityEntry, tol?: number) => boolean;
|
|
17
|
+
export declare const is_on_hull: (entry: PhaseData, tol?: number) => boolean;
|
|
18
|
+
export declare const get_arity: (entry: PhaseData) => number;
|
|
19
|
+
export declare const is_unary_entry: (entry: PhaseData) => boolean;
|
|
20
|
+
export declare const entry_is_unstable: (entry: StabilityEntry) => boolean;
|
|
21
|
+
export declare const entry_is_visible: (entry: StabilityEntry, show_stable: boolean, show_unstable: boolean) => boolean;
|
|
22
|
+
export declare const visible_entries: <Entry extends StabilityEntry>(entries: readonly Entry[], show_stable: boolean, show_unstable: boolean) => Entry[];
|
|
23
|
+
export declare function get_energy_color_scale(color_mode: `stability` | `energy`, color_scale: D3InterpolateName, plot_entries: {
|
|
24
|
+
e_above_hull?: number;
|
|
25
|
+
}[]): ((value: number) => string) | null;
|
|
26
|
+
export declare function get_point_color_for_entry(entry: {
|
|
27
|
+
is_stable?: boolean;
|
|
28
|
+
e_above_hull?: number;
|
|
29
|
+
}, color_mode: `stability` | `energy`, colors: ConvexHullConfig[`colors`] | undefined, energy_scale: ((value: number) => string) | null): string;
|
|
30
|
+
export declare function parse_hull_entries_from_drop(event: DragEvent): Promise<PhaseData[] | null>;
|
|
31
|
+
export declare function calc_max_hull_dist_in_data(processed_entries: PhaseData[]): number;
|
|
32
|
+
export declare function compute_auto_hull_dist_threshold(n_entries: number, max_hull_dist_in_data: number, static_default: number): number;
|
|
33
|
+
export declare function auto_threshold_reset(default_threshold: number): (next_source: unknown, current_threshold: number, next_auto_threshold: number) => number | undefined;
|
|
34
|
+
export declare function current_entry<Entry extends {
|
|
35
|
+
entry_id?: string;
|
|
36
|
+
}>(entry: Entry | null | undefined, entries: readonly Entry[]): Entry | null;
|
|
37
|
+
export declare function build_entry_tooltip_text(entry: PhaseData): string;
|
|
38
|
+
export declare function find_hull_entry_at_mouse<T extends {
|
|
39
|
+
x: number;
|
|
40
|
+
y: number;
|
|
41
|
+
z: number;
|
|
42
|
+
size?: number;
|
|
43
|
+
is_stable?: boolean;
|
|
44
|
+
e_above_hull?: number;
|
|
45
|
+
}>(canvas: HTMLCanvasElement | undefined, event: MouseEvent, plot_entries: T[], project_point: (x: number, y: number, z: number) => {
|
|
46
|
+
x: number;
|
|
47
|
+
y: number;
|
|
48
|
+
}): T | null;
|
|
49
|
+
export declare function calculate_modal_side(wrapper: HTMLDivElement | undefined): boolean;
|
|
50
|
+
export declare function compute_energy_mode_info(entries: PhaseData[], // Array of phase entries to analyze
|
|
51
|
+
find_lowest_energy_unary_refs_fn: (entries: PhaseData[]) => Record<string, PhaseData>, // Function to find unary references
|
|
52
|
+
energy_source_mode: `precomputed` | `on-the-fly`): EnergyModeInfo;
|
|
53
|
+
export declare function get_effective_entries(entries: PhaseData[], // Original phase entries
|
|
54
|
+
energy_mode: `precomputed` | `on-the-fly`, // Energy source mode (precomputed or on-the-fly)
|
|
55
|
+
unary_refs: Record<string, PhaseData>, // Unary reference entries for energy computation
|
|
56
|
+
compute_e_form_fn: (entry: PhaseData, unary_refs: Record<string, PhaseData>) => number | null): PhaseData[];
|
|
57
|
+
export declare function copy_entry_to_clipboard(entry: PhaseData, position: {
|
|
58
|
+
x: number;
|
|
59
|
+
y: number;
|
|
60
|
+
}, on_feedback: (visible: boolean, pos: {
|
|
61
|
+
x: number;
|
|
62
|
+
y: number;
|
|
63
|
+
}) => void): Promise<void>;
|
|
64
|
+
export declare const DEFAULT_HIGHLIGHT_STYLE: Required<HighlightStyle>;
|
|
65
|
+
export declare const merge_highlight_style: (custom_style: HighlightStyle | undefined) => Required<HighlightStyle>;
|
|
66
|
+
export declare function is_entry_highlighted<T extends {
|
|
67
|
+
entry_id?: string;
|
|
68
|
+
structure_id?: string;
|
|
69
|
+
}>(entry: T, highlighted_list: (string | T)[]): boolean;
|
|
70
|
+
export declare function get_fractional_composition(composition: Record<string, number>): Record<string, number>;
|
|
71
|
+
export interface PolymorphStats {
|
|
72
|
+
total: number;
|
|
73
|
+
higher: number;
|
|
74
|
+
lower: number;
|
|
75
|
+
equal: number;
|
|
76
|
+
}
|
|
77
|
+
export declare function get_composition_label_entries<T extends PhaseData>(entries: Iterable<T>): T[];
|
|
78
|
+
export declare function compute_all_polymorph_stats(all_entries: PhaseData[]): Map<string, PolymorphStats>;
|
|
79
|
+
export declare function draw_highlight_effect(ctx: CanvasRenderingContext2D, projected: {
|
|
80
|
+
x: number;
|
|
81
|
+
y: number;
|
|
82
|
+
}, size: number, container_scale: number, pulse_time: number, style: Required<HighlightStyle>): void;
|
|
83
|
+
export declare function draw_selection_highlight(ctx: CanvasRenderingContext2D, projected: {
|
|
84
|
+
x: number;
|
|
85
|
+
y: number;
|
|
86
|
+
}, base_size: number, container_scale: number, pulse_time: number, pulse_opacity: number): void;
|
|
87
|
+
export declare function get_canvas_text_color(dark_mode: boolean, element?: HTMLElement | null): string;
|
|
88
|
+
export declare function create_marker_path(size: number, marker?: MarkerSymbol): Path2D;
|
|
89
|
+
export interface TemperatureAnalysis {
|
|
90
|
+
has_temp_data: boolean;
|
|
91
|
+
available_temperatures: number[];
|
|
92
|
+
}
|
|
93
|
+
export declare function analyze_temperature_data(entries: PhaseData[]): TemperatureAnalysis;
|
|
94
|
+
export declare const entry_has_temperature: (entry: PhaseData, T: number) => boolean;
|
|
95
|
+
export declare function get_energy_at_temperature(entry: PhaseData, T: number): number;
|
|
96
|
+
export declare function can_interpolate_at_temperature(entry: PhaseData, T: number, max_gap: number): boolean;
|
|
97
|
+
export declare function interpolate_energy_at_temperature(entry: PhaseData, T: number, max_gap: number): number | null;
|
|
98
|
+
export interface TemperatureFilterOptions {
|
|
99
|
+
interpolate?: boolean;
|
|
100
|
+
max_interpolation_gap?: number;
|
|
101
|
+
}
|
|
102
|
+
export declare function filter_entries_at_temperature(entries: PhaseData[], T: number, options?: TemperatureFilterOptions): PhaseData[];
|
|
103
|
+
export declare function safe_analyze_gas_data(entries: PhaseData[], config?: GasThermodynamicsConfig): GasAnalysis;
|
|
104
|
+
export declare function safe_apply_gas_corrections(entries: PhaseData[], config: GasThermodynamicsConfig | undefined, T: number): PhaseData[];
|
|
105
|
+
export declare function get_gas_corrected_entries(entries: PhaseData[], gas_config: GasThermodynamicsConfig | undefined, gas_pressures: Partial<Record<string, number>>, temperature: number): {
|
|
106
|
+
entries: PhaseData[];
|
|
107
|
+
analysis: GasAnalysis;
|
|
108
|
+
merged_config: GasThermodynamicsConfig | undefined;
|
|
109
|
+
};
|
|
110
|
+
export declare function get_entry_label(entry: {
|
|
111
|
+
reduced_formula?: string;
|
|
112
|
+
name?: string;
|
|
113
|
+
composition: Record<string, number>;
|
|
114
|
+
}, elements?: ElementSymbol[]): string;
|