matterviz 0.1.12 → 0.1.13

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.
Files changed (195) hide show
  1. package/dist/ContextMenu.svelte +1 -1
  2. package/dist/ContextMenu.svelte.d.ts +3 -3
  3. package/dist/DraggablePane.svelte +10 -5
  4. package/dist/DraggablePane.svelte.d.ts +3 -3
  5. package/dist/FilePicker.svelte.d.ts +3 -3
  6. package/dist/Icon.svelte.d.ts +3 -3
  7. package/dist/Nav.svelte +76 -31
  8. package/dist/SettingsSection.svelte.d.ts +3 -3
  9. package/dist/Spinner.svelte +18 -29
  10. package/dist/Spinner.svelte.d.ts +3 -3
  11. package/dist/app.css +4 -0
  12. package/dist/bands/Bands.svelte +216 -0
  13. package/dist/bands/Bands.svelte.d.ts +16 -0
  14. package/dist/bands/BandsAndDos.svelte +26 -0
  15. package/dist/bands/BandsAndDos.svelte.d.ts +16 -0
  16. package/dist/bands/Dos.svelte +124 -0
  17. package/dist/bands/Dos.svelte.d.ts +18 -0
  18. package/dist/bands/helpers.d.ts +11 -0
  19. package/dist/bands/helpers.js +195 -0
  20. package/dist/bands/index.d.ts +5 -0
  21. package/dist/bands/index.js +6 -0
  22. package/dist/bands/types.d.ts +54 -0
  23. package/dist/bands/types.js +2 -0
  24. package/dist/brillouin/BrillouinZone.svelte +373 -0
  25. package/dist/brillouin/BrillouinZone.svelte.d.ts +57 -0
  26. package/dist/brillouin/BrillouinZoneControls.svelte +88 -0
  27. package/dist/brillouin/BrillouinZoneControls.svelte.d.ts +14 -0
  28. package/dist/brillouin/BrillouinZoneExportPane.svelte +129 -0
  29. package/dist/brillouin/BrillouinZoneExportPane.svelte.d.ts +15 -0
  30. package/dist/brillouin/BrillouinZoneInfoPane.svelte +115 -0
  31. package/dist/brillouin/BrillouinZoneInfoPane.svelte.d.ts +13 -0
  32. package/dist/brillouin/BrillouinZoneScene.svelte +180 -0
  33. package/dist/brillouin/BrillouinZoneScene.svelte.d.ts +34 -0
  34. package/dist/brillouin/compute.d.ts +7 -0
  35. package/dist/brillouin/compute.js +215 -0
  36. package/dist/brillouin/index.d.ts +7 -0
  37. package/dist/brillouin/index.js +7 -0
  38. package/dist/brillouin/types.d.ts +23 -0
  39. package/dist/brillouin/types.js +1 -0
  40. package/dist/composition/BarChart.svelte.d.ts +3 -3
  41. package/dist/composition/BubbleChart.svelte +7 -6
  42. package/dist/composition/BubbleChart.svelte.d.ts +3 -3
  43. package/dist/composition/Composition.svelte.d.ts +3 -3
  44. package/dist/composition/PieChart.svelte +1 -1
  45. package/dist/composition/PieChart.svelte.d.ts +3 -3
  46. package/dist/composition/parse.d.ts +3 -3
  47. package/dist/coordination/CoordinationBarPlot.svelte +241 -0
  48. package/dist/coordination/CoordinationBarPlot.svelte.d.ts +29 -0
  49. package/dist/coordination/calc-coordination.d.ts +15 -0
  50. package/dist/coordination/calc-coordination.js +66 -0
  51. package/dist/coordination/index.d.ts +8 -0
  52. package/dist/coordination/index.js +7 -0
  53. package/dist/element/BohrAtom.svelte.d.ts +3 -3
  54. package/dist/element/ElementHeading.svelte.d.ts +3 -3
  55. package/dist/element/ElementPhoto.svelte.d.ts +3 -3
  56. package/dist/element/ElementStats.svelte.d.ts +3 -3
  57. package/dist/element/ElementTile.svelte +1 -1
  58. package/dist/element/ElementTile.svelte.d.ts +4 -4
  59. package/dist/element/Nucleus.svelte.d.ts +3 -3
  60. package/dist/icons.d.ts +4 -0
  61. package/dist/icons.js +4 -0
  62. package/dist/index.d.ts +5 -1
  63. package/dist/index.js +5 -1
  64. package/dist/io/export.d.ts +1 -6
  65. package/dist/io/export.js +12 -12
  66. package/dist/labels.d.ts +19 -0
  67. package/dist/labels.js +59 -0
  68. package/dist/math.d.ts +7 -2
  69. package/dist/math.js +24 -12
  70. package/dist/periodic-table/PeriodicTable.svelte.d.ts +3 -3
  71. package/dist/periodic-table/PeriodicTableControls.svelte.d.ts +3 -3
  72. package/dist/periodic-table/PropertySelect.svelte +1 -1
  73. package/dist/periodic-table/PropertySelect.svelte.d.ts +5 -4
  74. package/dist/periodic-table/TableInset.svelte.d.ts +3 -3
  75. package/dist/phase-diagram/PhaseDiagram2D.svelte +44 -107
  76. package/dist/phase-diagram/PhaseDiagram2D.svelte.d.ts +7 -27
  77. package/dist/phase-diagram/PhaseDiagram3D.svelte +67 -170
  78. package/dist/phase-diagram/PhaseDiagram3D.svelte.d.ts +7 -31
  79. package/dist/phase-diagram/PhaseDiagram4D.svelte +87 -145
  80. package/dist/phase-diagram/PhaseDiagram4D.svelte.d.ts +5 -28
  81. package/dist/phase-diagram/PhaseDiagramControls.svelte +9 -9
  82. package/dist/phase-diagram/PhaseDiagramControls.svelte.d.ts +6 -6
  83. package/dist/phase-diagram/PhaseDiagramInfoPane.svelte +4 -4
  84. package/dist/phase-diagram/PhaseDiagramInfoPane.svelte.d.ts +5 -5
  85. package/dist/phase-diagram/PhaseDiagramStats.svelte +9 -16
  86. package/dist/phase-diagram/PhaseDiagramStats.svelte.d.ts +3 -3
  87. package/dist/phase-diagram/StructurePopup.svelte.d.ts +3 -3
  88. package/dist/phase-diagram/barycentric-coords.js +13 -24
  89. package/dist/phase-diagram/helpers.d.ts +12 -14
  90. package/dist/phase-diagram/helpers.js +70 -23
  91. package/dist/phase-diagram/index.d.ts +58 -0
  92. package/dist/phase-diagram/index.js +44 -0
  93. package/dist/phase-diagram/thermodynamics.js +2 -3
  94. package/dist/phase-diagram/types.d.ts +3 -8
  95. package/dist/plot/BarPlot.svelte +474 -240
  96. package/dist/plot/BarPlot.svelte.d.ts +16 -37
  97. package/dist/plot/BarPlotControls.svelte +33 -201
  98. package/dist/plot/BarPlotControls.svelte.d.ts +11 -22
  99. package/dist/plot/ColorBar.svelte.d.ts +3 -3
  100. package/dist/plot/ColorScaleSelect.svelte +1 -1
  101. package/dist/plot/ColorScaleSelect.svelte.d.ts +3 -3
  102. package/dist/plot/ElementScatter.svelte +5 -5
  103. package/dist/plot/ElementScatter.svelte.d.ts +8 -8
  104. package/dist/plot/Histogram.svelte +318 -170
  105. package/dist/plot/Histogram.svelte.d.ts +21 -41
  106. package/dist/plot/HistogramControls.svelte +115 -347
  107. package/dist/plot/HistogramControls.svelte.d.ts +13 -28
  108. package/dist/plot/Line.svelte +1 -1
  109. package/dist/plot/Line.svelte.d.ts +4 -4
  110. package/dist/plot/PlotControls.svelte +280 -0
  111. package/dist/plot/PlotControls.svelte.d.ts +4 -0
  112. package/dist/plot/PlotLegend.svelte +9 -24
  113. package/dist/plot/PlotLegend.svelte.d.ts +3 -3
  114. package/dist/plot/ScatterPlot.svelte +536 -571
  115. package/dist/plot/ScatterPlot.svelte.d.ts +18 -90
  116. package/dist/plot/ScatterPlotControls.svelte +108 -316
  117. package/dist/plot/ScatterPlotControls.svelte.d.ts +11 -38
  118. package/dist/plot/ScatterPoint.svelte +1 -1
  119. package/dist/plot/ScatterPoint.svelte.d.ts +5 -5
  120. package/dist/plot/SpacegroupBarPlot.svelte +235 -0
  121. package/dist/plot/SpacegroupBarPlot.svelte.d.ts +9 -0
  122. package/dist/plot/data-transform.d.ts +2 -2
  123. package/dist/plot/data-transform.js +1 -5
  124. package/dist/plot/index.d.ts +12 -200
  125. package/dist/plot/index.js +14 -6
  126. package/dist/plot/layout.d.ts +10 -16
  127. package/dist/plot/layout.js +40 -25
  128. package/dist/plot/scales.d.ts +7 -8
  129. package/dist/plot/scales.js +22 -7
  130. package/dist/plot/types.d.ts +303 -0
  131. package/dist/plot/types.js +1 -0
  132. package/dist/rdf/RdfPlot.svelte +156 -0
  133. package/dist/rdf/RdfPlot.svelte.d.ts +20 -0
  134. package/dist/rdf/calc-rdf.d.ts +4 -0
  135. package/dist/rdf/calc-rdf.js +107 -0
  136. package/dist/rdf/index.d.ts +22 -0
  137. package/dist/rdf/index.js +2 -0
  138. package/dist/settings.d.ts +86 -75
  139. package/dist/settings.js +257 -155
  140. package/dist/structure/Bond.svelte +126 -110
  141. package/dist/structure/Bond.svelte.d.ts +7 -20
  142. package/dist/structure/CanvasTooltip.svelte.d.ts +4 -4
  143. package/dist/structure/Cylinder.svelte +29 -0
  144. package/dist/structure/Cylinder.svelte.d.ts +10 -0
  145. package/dist/structure/Lattice.svelte +1 -2
  146. package/dist/structure/Lattice.svelte.d.ts +3 -3
  147. package/dist/structure/Structure.svelte +23 -8
  148. package/dist/structure/Structure.svelte.d.ts +10 -7
  149. package/dist/structure/StructureControls.svelte +25 -134
  150. package/dist/structure/StructureControls.svelte.d.ts +4 -9
  151. package/dist/structure/StructureExportPane.svelte +188 -0
  152. package/dist/structure/StructureExportPane.svelte.d.ts +17 -0
  153. package/dist/structure/StructureInfoPane.svelte.d.ts +3 -3
  154. package/dist/structure/StructureLegend.svelte +91 -27
  155. package/dist/structure/StructureLegend.svelte.d.ts +5 -4
  156. package/dist/structure/StructureScene.svelte +93 -100
  157. package/dist/structure/StructureScene.svelte.d.ts +15 -12
  158. package/dist/structure/Vector.svelte +19 -25
  159. package/dist/structure/Vector.svelte.d.ts +3 -3
  160. package/dist/structure/bonding.d.ts +16 -14
  161. package/dist/structure/bonding.js +207 -216
  162. package/dist/structure/export.d.ts +3 -0
  163. package/dist/structure/export.js +120 -0
  164. package/dist/structure/index.d.ts +15 -1
  165. package/dist/structure/index.js +2 -0
  166. package/dist/symmetry/WyckoffTable.svelte.d.ts +3 -3
  167. package/dist/symmetry/index.d.ts +1 -0
  168. package/dist/symmetry/index.js +1 -0
  169. package/dist/symmetry/spacegroups.d.ts +9 -0
  170. package/dist/symmetry/spacegroups.js +397 -0
  171. package/dist/theme/ThemeControl.svelte.d.ts +3 -3
  172. package/dist/theme/themes.js +2 -16
  173. package/dist/trajectory/Trajectory.svelte +52 -78
  174. package/dist/trajectory/Trajectory.svelte.d.ts +5 -5
  175. package/dist/trajectory/TrajectoryError.svelte.d.ts +3 -3
  176. package/dist/trajectory/TrajectoryExportPane.svelte +1 -1
  177. package/dist/trajectory/TrajectoryExportPane.svelte.d.ts +5 -5
  178. package/dist/trajectory/TrajectoryInfoPane.svelte +1 -1
  179. package/dist/trajectory/TrajectoryInfoPane.svelte.d.ts +3 -3
  180. package/dist/trajectory/extract.js +2 -1
  181. package/dist/trajectory/index.d.ts +1 -1
  182. package/dist/trajectory/index.js +1 -1
  183. package/dist/trajectory/parse.js +21 -14
  184. package/dist/utils.d.ts +1 -0
  185. package/dist/utils.js +17 -0
  186. package/dist/xrd/XrdPlot.svelte +14 -11
  187. package/dist/xrd/XrdPlot.svelte.d.ts +6 -5
  188. package/package.json +20 -12
  189. package/readme.md +1 -1
  190. package/dist/material/MaterialCard.svelte +0 -123
  191. package/dist/material/MaterialCard.svelte.d.ts +0 -9
  192. package/dist/material/index.d.ts +0 -1
  193. package/dist/material/index.js +0 -1
  194. package/dist/plot/formatting.d.ts +0 -7
  195. package/dist/plot/formatting.js +0 -53
package/dist/settings.js CHANGED
@@ -1,14 +1,44 @@
1
1
  // MatterViz settings schema - single source of truth for all MatterViz settings
2
2
  // Used by both main package and VSCode extension
3
- import { symbol_names } from './plot/formatting';
3
+ import { symbol_names } from './labels';
4
+ import { merge_nested } from './utils';
4
5
  export const show_bonds_options = [`never`, `always`, `crystals`, `molecules`];
6
+ const DISPLAY_CONFIG = {
7
+ x_grid: {
8
+ value: true,
9
+ description: `Show X-axis grid lines`,
10
+ },
11
+ y_grid: {
12
+ value: true,
13
+ description: `Show Y-axis grid lines`,
14
+ },
15
+ y2_grid: {
16
+ value: false,
17
+ description: `Show Y2-axis grid lines`,
18
+ },
19
+ x_zero_line: {
20
+ value: false,
21
+ description: `Show X-axis zero reference line`,
22
+ },
23
+ y_zero_line: {
24
+ value: false,
25
+ description: `Show Y-axis zero reference line`,
26
+ },
27
+ };
5
28
  // Complete settings configuration with values, descriptions, and constraints
6
29
  export const SETTINGS_CONFIG = {
7
30
  // General display settings
8
31
  color_scheme: {
9
32
  value: `Vesta`,
10
33
  description: `Color scheme for atoms and bonds`,
11
- enum: [`Vesta`, `Jmol`, `Alloy`, `Pastel`, `Muted`, `Dark Mode`],
34
+ enum: {
35
+ Vesta: `Vesta`,
36
+ Jmol: `Jmol`,
37
+ Alloy: `Alloy`,
38
+ Pastel: `Pastel`,
39
+ Muted: `Muted`,
40
+ 'Dark Mode': `Dark Mode`,
41
+ },
12
42
  },
13
43
  background_color: {
14
44
  value: `#000000`,
@@ -48,28 +78,27 @@ export const SETTINGS_CONFIG = {
48
78
  maximum: 64,
49
79
  },
50
80
  bond_thickness: {
51
- value: 0.25,
81
+ value: 0.07,
52
82
  description: `Thickness of bonds relative to atom radius`,
53
83
  minimum: 0.01,
54
84
  maximum: 1.0,
55
85
  },
56
86
  show_bonds: {
57
- value: `molecules`,
87
+ value: `always`,
58
88
  description: `When to display bonds between atoms`,
59
- enum: show_bonds_options,
89
+ enum: Object.fromEntries(show_bonds_options.map((key) => [key, key[0].toUpperCase() + key.slice(1)])),
60
90
  },
61
91
  bond_color: {
62
- value: `#ffffff`,
92
+ value: `#666666`,
63
93
  description: `Color for bonds (hex color code)`,
64
94
  },
65
95
  bonding_strategy: {
66
96
  value: `electroneg_ratio`,
67
97
  description: `Method for determining bonds between atoms`,
68
- enum: [
69
- `electroneg_ratio`,
70
- `max_dist`,
71
- `nearest_neighbor`,
72
- ],
98
+ enum: {
99
+ electroneg_ratio: `Electronegativity Ratio`,
100
+ solid_angle: `Solid Angle`,
101
+ },
73
102
  },
74
103
  // Camera & Controls
75
104
  show_gizmo: {
@@ -85,7 +114,10 @@ export const SETTINGS_CONFIG = {
85
114
  camera_projection: {
86
115
  value: `orthographic`,
87
116
  description: `Camera projection type`,
88
- enum: [`perspective`, `orthographic`],
117
+ enum: {
118
+ perspective: `Perspective`,
119
+ orthographic: `Orthographic`,
120
+ },
89
121
  },
90
122
  initial_zoom: {
91
123
  value: 35,
@@ -200,21 +232,21 @@ export const SETTINGS_CONFIG = {
200
232
  description: `Color for force vectors`,
201
233
  },
202
234
  force_shaft_radius: {
203
- value: 0.02,
204
- description: `Radius of force vector shaft`,
205
- minimum: 0.005,
235
+ value: -0.01,
236
+ description: `Radius of force vector shaft (negative = relative to length, positive = absolute)`,
237
+ minimum: -0.1,
206
238
  maximum: 0.1,
207
239
  },
208
240
  force_arrow_head_radius: {
209
- value: 0.08,
210
- description: `Radius of force vector arrow head`,
211
- minimum: 0.02,
241
+ value: -0.025,
242
+ description: `Radius of force vector arrow head (negative = relative to length, positive = absolute)`,
243
+ minimum: -0.2,
212
244
  maximum: 0.2,
213
245
  },
214
246
  force_arrow_head_length: {
215
- value: 0.2,
216
- description: `Length of force vector arrow head`,
217
- minimum: 0.05,
247
+ value: -0.1,
248
+ description: `Length of force vector arrow head (negative = relative to length, positive = absolute)`,
249
+ minimum: -0.5,
218
250
  maximum: 0.5,
219
251
  },
220
252
  show_cell: {
@@ -279,13 +311,13 @@ export const SETTINGS_CONFIG = {
279
311
  display_mode: {
280
312
  value: `structure+scatter`,
281
313
  description: `Visualization mode for trajectory data`,
282
- enum: [
283
- `structure+scatter`,
284
- `structure`,
285
- `scatter`,
286
- `histogram`,
287
- `structure+histogram`,
288
- ],
314
+ enum: {
315
+ 'structure+scatter': `Structure + Scatter`,
316
+ structure: `Structure`,
317
+ scatter: `Scatter`,
318
+ histogram: `Histogram`,
319
+ 'structure+histogram': `Structure + Histogram`,
320
+ },
289
321
  },
290
322
  show_controls: {
291
323
  value: true,
@@ -305,7 +337,11 @@ export const SETTINGS_CONFIG = {
305
337
  layout: {
306
338
  value: `auto`,
307
339
  description: `Layout arrangement for trajectory viewer`,
308
- enum: [`auto`, `horizontal`, `vertical`],
340
+ enum: {
341
+ auto: `Auto`,
342
+ horizontal: `Horizontal`,
343
+ vertical: `Vertical`,
344
+ },
309
345
  },
310
346
  // File handling and loading
311
347
  allow_file_drop: {
@@ -334,34 +370,6 @@ export const SETTINGS_CONFIG = {
334
370
  minimum: 10,
335
371
  maximum: 10000,
336
372
  },
337
- // Histogram specific
338
- histogram_mode: {
339
- value: `overlay`,
340
- description: `Histogram display mode. 'overlay' shows multiple histograms in the same plot, 'single' shows a single histogram`,
341
- enum: [`overlay`, `single`],
342
- },
343
- histogram_show_legend: {
344
- value: true,
345
- description: `Show legend in histogram plots`,
346
- },
347
- histogram_bin_count: {
348
- value: 100,
349
- description: `Number of bins for histogram plots`,
350
- minimum: 1,
351
- maximum: 1000,
352
- },
353
- histogram_bar_opacity: {
354
- value: 0.7,
355
- description: `Opacity of histogram bars`,
356
- minimum: 0,
357
- maximum: 1,
358
- },
359
- histogram_bar_stroke_width: {
360
- value: 1,
361
- description: `Stroke width for histogram bars`,
362
- minimum: 0,
363
- maximum: 5,
364
- },
365
373
  // Formatting
366
374
  step_label_format: {
367
375
  value: `.3~s`,
@@ -441,17 +449,106 @@ export const SETTINGS_CONFIG = {
441
449
  description: `Cache parsed trajectory data`,
442
450
  },
443
451
  },
452
+ // Histogram specific
453
+ histogram: {
454
+ mode: {
455
+ value: `overlay`,
456
+ description: `Histogram display mode. 'overlay' shows multiple histograms in the same plot, 'single' shows a single histogram`,
457
+ enum: {
458
+ overlay: `Overlay`,
459
+ single: `Single`,
460
+ },
461
+ },
462
+ show_legend: {
463
+ value: true,
464
+ description: `Show legend in histogram plots`,
465
+ },
466
+ bin_count: {
467
+ value: 100,
468
+ description: `Number of bins for histogram plots`,
469
+ minimum: 1,
470
+ maximum: 1000,
471
+ },
472
+ bar: {
473
+ color: {
474
+ value: `#4A9EFF`,
475
+ description: `Histogram bar fill color`,
476
+ },
477
+ opacity: {
478
+ value: 0.7,
479
+ description: `Histogram bar opacity`,
480
+ minimum: 0,
481
+ maximum: 1,
482
+ },
483
+ stroke_width: {
484
+ value: 1,
485
+ description: `Histogram bar stroke width`,
486
+ minimum: 0,
487
+ maximum: 5,
488
+ },
489
+ stroke_color: {
490
+ value: `#000000`,
491
+ description: `Histogram bar stroke color`,
492
+ },
493
+ stroke_opacity: {
494
+ value: 0.5,
495
+ description: `Histogram bar stroke opacity`,
496
+ minimum: 0,
497
+ maximum: 1,
498
+ },
499
+ },
500
+ display: DISPLAY_CONFIG,
501
+ },
502
+ // Bar plot specific
503
+ bar: {
504
+ bar: {
505
+ color: {
506
+ value: `#4A9EFF`,
507
+ description: `Bar plot fill color`,
508
+ },
509
+ opacity: {
510
+ value: 0.6,
511
+ description: `Bar plot opacity (overlay mode)`,
512
+ minimum: 0,
513
+ maximum: 1,
514
+ },
515
+ },
516
+ line: {
517
+ width: {
518
+ value: 2,
519
+ description: `Bar plot line width`,
520
+ minimum: 0.5,
521
+ maximum: 10,
522
+ },
523
+ color: {
524
+ value: `#4A9EFF`,
525
+ description: `Bar plot line color`,
526
+ },
527
+ },
528
+ display: DISPLAY_CONFIG,
529
+ },
444
530
  // Composition specific
445
531
  composition: {
446
532
  display_mode: {
447
533
  value: `pie`,
448
534
  description: `Display mode for composition data`,
449
- enum: [`pie`, `bubble`, `bar`],
535
+ enum: {
536
+ pie: `Pie`,
537
+ bubble: `Bubble`,
538
+ bar: `Bar`,
539
+ },
450
540
  },
451
541
  color_scheme: {
452
542
  value: `Vesta`,
453
543
  description: `Color scheme for composition visualization`,
454
- enum: [`Vesta`, `Jmol`, `Alloy`, `Pastel`, `Muted`, `Dark Mode`],
544
+ enum: {
545
+ Vesta: `Vesta`,
546
+ Jmol: `Jmol`,
547
+ Alloy: `Alloy`,
548
+ Pastel: `Pastel`,
549
+ Muted: `Muted`,
550
+ 'Dark Mode': `Dark Mode`,
551
+ },
455
552
  },
456
553
  },
457
554
  // Scatter plot specific
@@ -459,70 +556,12 @@ export const SETTINGS_CONFIG = {
459
556
  symbol_type: {
460
557
  value: `Circle`,
461
558
  description: `Default symbol type for scatter plots`,
462
- enum: symbol_names,
463
- },
464
- line_width: {
465
- value: 2,
466
- description: `Line width for scatter plot connections`,
467
- minimum: 0.5,
468
- maximum: 10,
469
- },
470
- point_size: {
471
- value: 4,
472
- description: `Point size for scatter plots`,
473
- minimum: 1,
474
- maximum: 20,
559
+ enum: Object.fromEntries(symbol_names.map((name) => [name, name])),
475
560
  },
476
561
  show_legend: {
477
562
  value: true,
478
563
  description: `Show legend in scatter plots`,
479
564
  },
480
- // Scatter plot specific
481
- markers: {
482
- value: `line+points`,
483
- description: `Scatter plot marker type`,
484
- enum: [`line`, `points`, `line+points`],
485
- },
486
- point_color: {
487
- value: `#4682b4`,
488
- description: `Default color for scatter plot points`,
489
- },
490
- point_opacity: {
491
- value: 1,
492
- description: `Opacity of scatter plot points`,
493
- minimum: 0,
494
- maximum: 1,
495
- },
496
- point_stroke_width: {
497
- value: 1,
498
- description: `Stroke width for scatter plot points`,
499
- minimum: 0,
500
- maximum: 5,
501
- },
502
- point_stroke_color: {
503
- value: `#000000`,
504
- description: `Stroke color for scatter plot points`,
505
- },
506
- point_stroke_opacity: {
507
- value: 1,
508
- description: `Stroke opacity for scatter plot points`,
509
- minimum: 0,
510
- maximum: 1,
511
- },
512
- line_color: {
513
- value: `#4682b4`,
514
- description: `Default color for scatter plot lines`,
515
- },
516
- line_opacity: {
517
- value: 1,
518
- description: `Opacity of scatter plot lines`,
519
- minimum: 0,
520
- maximum: 1,
521
- },
522
- line_dash: {
523
- value: `solid`,
524
- description: `Line dash pattern for scatter plots (e.g., "4,4" for dashed)`,
525
- },
526
565
  show_points: {
527
566
  value: true,
528
567
  description: `Show points in scatter plots`,
@@ -531,6 +570,63 @@ export const SETTINGS_CONFIG = {
531
570
  value: true,
532
571
  description: `Show connecting lines in scatter plots`,
533
572
  },
573
+ display: DISPLAY_CONFIG,
574
+ point: {
575
+ size: {
576
+ value: 4,
577
+ description: `Point size for scatter plots`,
578
+ minimum: 1,
579
+ maximum: 20,
580
+ },
581
+ color: {
582
+ value: `#4A9EFF`,
583
+ description: `Default color for scatter plot points`,
584
+ },
585
+ opacity: {
586
+ value: 1,
587
+ description: `Opacity of scatter plot points`,
588
+ minimum: 0,
589
+ maximum: 1,
590
+ },
591
+ stroke_width: {
592
+ value: 1,
593
+ description: `Stroke width for scatter plot points`,
594
+ minimum: 0,
595
+ maximum: 5,
596
+ },
597
+ stroke_color: {
598
+ value: `#000000`,
599
+ description: `Stroke color for scatter plot points`,
600
+ },
601
+ stroke_opacity: {
602
+ value: 1,
603
+ description: `Stroke opacity for scatter plot points`,
604
+ minimum: 0,
605
+ maximum: 1,
606
+ },
607
+ },
608
+ line: {
609
+ width: {
610
+ value: 2,
611
+ description: `Line width for scatter plot connections`,
612
+ minimum: 0.5,
613
+ maximum: 10,
614
+ },
615
+ color: {
616
+ value: `#4A9EFF`,
617
+ description: `Default color for scatter plot lines`,
618
+ },
619
+ opacity: {
620
+ value: 1,
621
+ description: `Opacity of scatter plot lines`,
622
+ minimum: 0,
623
+ maximum: 1,
624
+ },
625
+ dash: {
626
+ value: `solid`,
627
+ description: `Line dash pattern for scatter plots (e.g., "4,4" for dashed)`,
628
+ },
629
+ },
534
630
  },
535
631
  // Plot general
536
632
  plot: {
@@ -562,19 +658,23 @@ export const SETTINGS_CONFIG = {
562
658
  value: true,
563
659
  description: `Show axis labels in plots`,
564
660
  },
565
- show_zero_lines: {
661
+ show_x_zero_line: {
566
662
  value: true,
567
- description: `Show zero reference lines in plots`,
663
+ description: `Show X-axis zero reference line`,
568
664
  },
569
- x_grid: {
665
+ show_y_zero_line: {
666
+ value: true,
667
+ description: `Show Y-axis zero reference line`,
668
+ },
669
+ show_x_grid: {
570
670
  value: true,
571
671
  description: `Show X-axis grid lines`,
572
672
  },
573
- y_grid: {
673
+ show_y_grid: {
574
674
  value: true,
575
675
  description: `Show Y-axis grid lines`,
576
676
  },
577
- y2_grid: {
677
+ show_y2_grid: {
578
678
  value: true,
579
679
  description: `Show secondary Y-axis grid lines`,
580
680
  },
@@ -593,12 +693,18 @@ export const SETTINGS_CONFIG = {
593
693
  x_scale_type: {
594
694
  value: `linear`,
595
695
  description: `Scale type for X-axis`,
596
- enum: [`linear`, `log`],
696
+ enum: {
697
+ linear: `Linear`,
698
+ log: `Log`,
699
+ },
597
700
  },
598
701
  y_scale_type: {
599
702
  value: `linear`,
600
703
  description: `Scale type for Y-axis`,
601
- enum: [`linear`, `log`],
704
+ enum: {
705
+ linear: `Linear`,
706
+ log: `Log`,
707
+ },
602
708
  },
603
709
  x_ticks: {
604
710
  value: 8,
@@ -632,7 +738,10 @@ export const SETTINGS_CONFIG = {
632
738
  color_mode: {
633
739
  value: `energy`,
634
740
  description: `Color mode for 2D PD points`,
635
- enum: [`stability`, `energy`],
741
+ enum: {
742
+ stability: `Stability`,
743
+ energy: `Energy`,
744
+ },
636
745
  },
637
746
  color_scale: {
638
747
  value: `interpolateViridis`,
@@ -654,13 +763,13 @@ export const SETTINGS_CONFIG = {
654
763
  value: false,
655
764
  description: `Show labels for unstable phases in 2D PD`,
656
765
  },
657
- energy_threshold: {
766
+ max_hull_dist_show_phases: {
658
767
  value: 0.1,
659
768
  description: `Max eV/atom above hull for showing unstable entries in 2D PD`,
660
769
  minimum: 0,
661
770
  maximum: 2,
662
771
  },
663
- label_energy_threshold: {
772
+ max_hull_dist_show_labels: {
664
773
  value: 0.1,
665
774
  description: `Max eV/atom above hull for labeling unstable entries in 2D PD`,
666
775
  minimum: 0,
@@ -709,7 +818,10 @@ export const SETTINGS_CONFIG = {
709
818
  color_mode: {
710
819
  value: `energy`,
711
820
  description: `Color mode for 3D PD points`,
712
- enum: [`stability`, `energy`],
821
+ enum: {
822
+ stability: `Stability`,
823
+ energy: `Energy`,
824
+ },
713
825
  },
714
826
  color_scale: {
715
827
  value: `interpolateViridis`,
@@ -731,13 +843,13 @@ export const SETTINGS_CONFIG = {
731
843
  value: false,
732
844
  description: `Show labels for unstable phases in 3D PD`,
733
845
  },
734
- energy_threshold: {
846
+ max_hull_dist_show_phases: {
735
847
  value: 0.5,
736
848
  description: `Max eV/atom above hull for showing unstable entries in 3D PD`,
737
849
  minimum: 0,
738
850
  maximum: 2,
739
851
  },
740
- label_energy_threshold: {
852
+ max_hull_dist_show_labels: {
741
853
  value: 0.1,
742
854
  description: `Max eV/atom above hull for labeling unstable entries in 3D PD`,
743
855
  minimum: 0,
@@ -800,7 +912,10 @@ export const SETTINGS_CONFIG = {
800
912
  color_mode: {
801
913
  value: `energy`,
802
914
  description: `Color mode for 4D PD points`,
803
- enum: [`stability`, `energy`],
915
+ enum: {
916
+ stability: `Stability`,
917
+ energy: `Energy`,
918
+ },
804
919
  },
805
920
  color_scale: {
806
921
  value: `interpolateViridis`,
@@ -836,13 +951,13 @@ export const SETTINGS_CONFIG = {
836
951
  minimum: 0,
837
952
  maximum: 1,
838
953
  },
839
- energy_threshold: {
954
+ max_hull_dist_show_phases: {
840
955
  value: 0.1,
841
956
  description: `Max eV/atom above hull for showing unstable entries in 4D PD`,
842
957
  minimum: 0,
843
958
  maximum: 2,
844
959
  },
845
- label_energy_threshold: {
960
+ max_hull_dist_show_labels: {
846
961
  value: 0.1,
847
962
  description: `Max eV/atom above hull for labeling unstable entries in 4D PD`,
848
963
  minimum: 0,
@@ -882,27 +997,14 @@ export const DEFAULTS = extract_values(SETTINGS_CONFIG);
882
997
  export const merge = (user) => ({
883
998
  ...DEFAULTS,
884
999
  ...(user || {}),
885
- structure: { ...DEFAULTS.structure, ...(user?.structure || {}) },
886
- trajectory: { ...DEFAULTS.trajectory, ...(user?.trajectory || {}) },
887
- composition: { ...DEFAULTS.composition, ...(user?.composition || {}) },
888
- plot: { ...DEFAULTS.plot, ...(user?.plot || {}) },
889
- scatter: { ...DEFAULTS.scatter, ...(user?.scatter || {}) },
890
- phase_diagram: {
891
- ...DEFAULTS.phase_diagram,
892
- ...(user?.phase_diagram || {}),
893
- binary: {
894
- ...DEFAULTS.phase_diagram.binary,
895
- ...(user?.phase_diagram?.binary || {}),
896
- },
897
- ternary: {
898
- ...DEFAULTS.phase_diagram.ternary,
899
- ...(user?.phase_diagram?.ternary || {}),
900
- },
901
- quaternary: {
902
- ...DEFAULTS.phase_diagram.quaternary,
903
- ...(user?.phase_diagram?.quaternary || {}),
904
- },
905
- },
1000
+ structure: merge_nested(DEFAULTS.structure, user?.structure),
1001
+ trajectory: merge_nested(DEFAULTS.trajectory, user?.trajectory),
1002
+ composition: merge_nested(DEFAULTS.composition, user?.composition),
1003
+ plot: merge_nested(DEFAULTS.plot, user?.plot),
1004
+ scatter: merge_nested(DEFAULTS.scatter, user?.scatter),
1005
+ histogram: merge_nested(DEFAULTS.histogram, user?.histogram),
1006
+ bar: merge_nested(DEFAULTS.bar, user?.bar),
1007
+ phase_diagram: merge_nested(DEFAULTS.phase_diagram, user?.phase_diagram),
906
1008
  });
907
1009
  export const PD_DEFAULTS = DEFAULTS
908
1010
  .phase_diagram;