gliquid 0.3.2__tar.gz → 0.3.3__tar.gz

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 (125) hide show
  1. {gliquid-0.3.2 → gliquid-0.3.3}/.gitattributes +3 -0
  2. {gliquid-0.3.2 → gliquid-0.3.3}/CHANGELOG.md +134 -1
  3. {gliquid-0.3.2 → gliquid-0.3.3}/CITATION.cff +6 -2
  4. {gliquid-0.3.2 → gliquid-0.3.3}/PKG-INFO +2 -2
  5. {gliquid-0.3.2 → gliquid-0.3.3}/notebooks/GaRu_adjustment.ipynb +1 -1
  6. {gliquid-0.3.2 → gliquid-0.3.3}/notebooks/PbTb_adjustment.ipynb +1 -1
  7. {gliquid-0.3.2 → gliquid-0.3.3}/notebooks/colab_demo.ipynb +1 -1
  8. {gliquid-0.3.2 → gliquid-0.3.3}/notebooks/fitting_demo.ipynb +1 -1
  9. {gliquid-0.3.2 → gliquid-0.3.3}/notebooks/interpolation_demo.ipynb +1 -1
  10. {gliquid-0.3.2 → gliquid-0.3.3}/pyproject.toml +2 -1
  11. {gliquid-0.3.2 → gliquid-0.3.3}/requirements/min-constraints.txt +2 -1
  12. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/_version.py +2 -2
  13. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/binary.py +60 -52
  14. gliquid-0.3.3/src/gliquid/liquidus_sheets.py +1314 -0
  15. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/mpds.py +44 -0
  16. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/plotting/liquidus_fields.py +574 -119
  17. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/plotting/ternary_surface.py +22 -19
  18. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/solution.py +28 -16
  19. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/ternary.py +659 -177
  20. gliquid-0.3.2/src/gliquid/liquidus_sheets.py +0 -527
  21. {gliquid-0.3.2 → gliquid-0.3.3}/.githooks/pre-commit +0 -0
  22. {gliquid-0.3.2 → gliquid-0.3.3}/.github/CODEOWNERS +0 -0
  23. {gliquid-0.3.2 → gliquid-0.3.3}/.github/dependabot.yml +0 -0
  24. {gliquid-0.3.2 → gliquid-0.3.3}/.github/workflows/release.yml +0 -0
  25. {gliquid-0.3.2 → gliquid-0.3.3}/.github/workflows/tests.yml +0 -0
  26. {gliquid-0.3.2 → gliquid-0.3.3}/.gitignore +0 -0
  27. {gliquid-0.3.2 → gliquid-0.3.3}/CONTRIBUTING.md +0 -0
  28. {gliquid-0.3.2 → gliquid-0.3.3}/LICENSE +0 -0
  29. {gliquid-0.3.2 → gliquid-0.3.3}/README.md +0 -0
  30. {gliquid-0.3.2 → gliquid-0.3.3}/assets/digitized_pd_anatomy.png +0 -0
  31. {gliquid-0.3.2 → gliquid-0.3.3}/assets/gliq_logo_tall.png +0 -0
  32. {gliquid-0.3.2 → gliquid-0.3.3}/assets/invariant_points_and_reactions.png +0 -0
  33. {gliquid-0.3.2 → gliquid-0.3.3}/assets/ru_si_assessed_pd.png +0 -0
  34. {gliquid-0.3.2 → gliquid-0.3.3}/conftest.py +0 -0
  35. {gliquid-0.3.2 → gliquid-0.3.3}/scripts/run_colab_notebook.py +0 -0
  36. {gliquid-0.3.2 → gliquid-0.3.3}/scripts/run_notebooks.py +0 -0
  37. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/__init__.py +0 -0
  38. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/api.py +0 -0
  39. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/cache.py +0 -0
  40. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/config.py +0 -0
  41. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/hsx.py +0 -0
  42. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/hull_editor.py +0 -0
  43. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/imputation/__init__.py +0 -0
  44. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/imputation/ablation.py +0 -0
  45. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/imputation/binary_imputation.py +0 -0
  46. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/imputation/core.py +0 -0
  47. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/imputation/lifecycle.py +0 -0
  48. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/imputation/ternary_imputation.py +0 -0
  49. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/.gitkeep +0 -0
  50. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/feature_names.json +0 -0
  51. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/features_antisymmetric.json +0 -0
  52. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/features_symmetric.json +0 -0
  53. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/manifest.json +0 -0
  54. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_0/L0_a.ubj +0 -0
  55. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_0/L0_b.ubj +0 -0
  56. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_0/L1_a.ubj +0 -0
  57. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_0/best_params.json +0 -0
  58. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_0/metadata.json +0 -0
  59. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_0/model_summary.txt +0 -0
  60. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_0/preprocess.json +0 -0
  61. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_10/L0_a.ubj +0 -0
  62. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_10/L0_b.ubj +0 -0
  63. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_10/L1_a.ubj +0 -0
  64. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_10/best_params.json +0 -0
  65. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_10/metadata.json +0 -0
  66. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_10/model_summary.txt +0 -0
  67. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_10/preprocess.json +0 -0
  68. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_20/L0_a.ubj +0 -0
  69. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_20/L0_b.ubj +0 -0
  70. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_20/L1_a.ubj +0 -0
  71. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_20/best_params.json +0 -0
  72. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_20/metadata.json +0 -0
  73. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_20/model_summary.txt +0 -0
  74. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_20/preprocess.json +0 -0
  75. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_30/L0_a.ubj +0 -0
  76. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_30/L0_b.ubj +0 -0
  77. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_30/L1_a.ubj +0 -0
  78. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_30/best_params.json +0 -0
  79. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_30/metadata.json +0 -0
  80. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_30/model_summary.txt +0 -0
  81. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_30/preprocess.json +0 -0
  82. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_42/L0_a.ubj +0 -0
  83. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_42/L0_b.ubj +0 -0
  84. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_42/L1_a.ubj +0 -0
  85. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_42/best_params.json +0 -0
  86. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_42/metadata.json +0 -0
  87. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_42/model_summary.txt +0 -0
  88. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_42/preprocess.json +0 -0
  89. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_50/L0_a.ubj +0 -0
  90. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_50/L0_b.ubj +0 -0
  91. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_50/L1_a.ubj +0 -0
  92. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_50/best_params.json +0 -0
  93. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_50/metadata.json +0 -0
  94. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_50/model_summary.txt +0 -0
  95. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_50/preprocess.json +0 -0
  96. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_60/L0_a.ubj +0 -0
  97. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_60/L0_b.ubj +0 -0
  98. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_60/L1_a.ubj +0 -0
  99. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_60/best_params.json +0 -0
  100. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_60/metadata.json +0 -0
  101. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_60/model_summary.txt +0 -0
  102. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_60/preprocess.json +0 -0
  103. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_70/L0_a.ubj +0 -0
  104. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_70/L0_b.ubj +0 -0
  105. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_70/L1_a.ubj +0 -0
  106. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_70/best_params.json +0 -0
  107. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_70/metadata.json +0 -0
  108. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_70/model_summary.txt +0 -0
  109. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/models/20261028_105725/seed_70/preprocess.json +0 -0
  110. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/phase.py +0 -0
  111. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/plotting/__init__.py +0 -0
  112. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/plotting/binary_figs.py +0 -0
  113. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/plotting/binary_tx.py +0 -0
  114. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/plotting/export.py +0 -0
  115. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/plotting/phase_highlight.py +0 -0
  116. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/plotting/style.py +0 -0
  117. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/plotting/ternary_labels.py +0 -0
  118. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/plotting/ternary_projection.py +0 -0
  119. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/production_model_runner.py +0 -0
  120. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/reference/omegas_hcp.json +0 -0
  121. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/reference/phase_transitions.json +0 -0
  122. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/reference/spurious_structures.json +0 -0
  123. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/shap_compat.py +0 -0
  124. {gliquid-0.3.2 → gliquid-0.3.3}/src/gliquid/solid_coverage.py +0 -0
  125. {gliquid-0.3.2 → gliquid-0.3.3}/tox.ini +0 -0
@@ -5,3 +5,6 @@ src/gliquid/models/** -text
5
5
 
6
6
  # The pre-commit hook is run by sh; CRLF in it fails at the shebang line.
7
7
  .githooks/** text eol=lf
8
+
9
+ # Keeps cache/ out of GitHub source archives (and the Zenodo record built from them).
10
+ cache/** export-ignore
@@ -9,6 +9,138 @@ source tree carries a version literal that could disagree with this file.
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [0.3.3] - 2026-11-09
13
+
14
+ ### Added
15
+
16
+ - `generate_comp_grid(..., edge_rows=0)`: with `edge_rows` > 0, each side of the composition
17
+ triangle also gets rows of nodes at `delta / 3**k` from it (k = 1..`edge_rows`).
18
+ - `SolutionModel.nonideal_h_s` and `SolutionModel.nonideal_gradients` return the two halves of
19
+ `nonideal_h_s_gradients`.
20
+ - `BinaryLiquid.update_phase_points(every_row=False)` and
21
+ `BinaryLiquid.liquid_tstar_row_errors(liq, every_row=False)`: with `every_row=True` the
22
+ liquid's linearization also converges the rows outside the digitized liquidus.
23
+
24
+ ### Changed
25
+
26
+ - **`BinaryLiquid(...)` takes its assessed (MPDS) reference as one
27
+ `reference=LiquidusReference(...)`** (`gliquid.mpds.LiquidusReference`, also importable from
28
+ `gliquid.binary`), holding `mpds_json`, `digitized_liq`, `temp_range`, `pd_ind`,
29
+ `liq_coverage` and `undigitized_comp_ranges`. The system keeps each as an attribute of the
30
+ same name, and `bl.reference` collects them again. Passing one of those keywords, or the
31
+ unused `invariants=`, raises `TypeError` naming its replacement. `BinaryLiquid.from_cache`
32
+ is unchanged.
33
+ - **`hull_mode='gtx'` ternaries default to a 25 K temperature grid.** `T_incr` now defaults to
34
+ `None`, which means 25 K for `gtx` and 10 K for `hsx`; pass `T_incr=10` to keep the old `gtx`
35
+ grid. A `gtx` figure takes about 0.84 times as long, and a solid-phase field's top can sit up
36
+ to one grid step lower. A `gtx` ternary imputation accepts a realized temperature within one
37
+ `T_incr` of its target, so that window is now 25 K by default.
38
+ - **Ternary grids carry extra rows of nodes along each side.** With `delta` at most 0.05 and no
39
+ solid solutions, `TernaryLiquidInterpolation` adds three rows at `delta / 3`, `delta / 9` and
40
+ `delta / 27` from each side, so `comp_grid`, `proc_df` and the hull hold more nodes.
41
+ `TernaryLiquidInterpolation.HULL_COMP_DECIMALS` is now 12 (was 4), so `hull_table()` keeps
42
+ those rows apart.
43
+ - **The ternary liquid's frames hold its H and S at the components' mean melting point.**
44
+ `hsx_df` and `surface_df` take the liquid's H and S at the mean component melting point instead
45
+ of the x-weighted melting point, and `proc_df` keeps them there instead of re-linearizing them
46
+ at each node's liquidus, so a ternary edge's rows in all three depend on the third element
47
+ again (0.3.2 had made them independent of it). The liquidus and the melting points are
48
+ unaffected (see Fixed).
49
+ - **`TernaryLiquidInterpolation.liquid_tstar` holds each liquid node's exact liquidus, K,** in
50
+ both hull modes, and `liquid_tstar_field()` builds from it.
51
+
52
+ ### Removed
53
+
54
+ - `gliquid.plotting.liquidus_fields.SIDE_FRACTION`: use `gliquid.liquidus_sheets.SIDE_FRACTION`.
55
+ - Tuning constants that are used together are grouped into one frozen object each, and their
56
+ old names are gone:
57
+ - in `gliquid.plotting.liquidus_fields`: `GRADING_SHARE` and `GRADING_EDGE` are
58
+ `GRADING.share` and `GRADING.edge`; `CROSSING_STEPS`, `CROSSING_TOLERANCE` and
59
+ `CROSSING_WIDTH` are `CROSSING.steps`, `.tolerance` and `.width`; `TRIPLE_POINT_STEPS` and
60
+ `TRIPLE_POINT_HALVINGS` are `TRIPLE_POINT.steps` and `.halvings`;
61
+ - in `gliquid.liquidus_sheets`: `BINODAL_RADII`, `BINODAL_MOVES`, `BINODAL_RISE` and
62
+ `BINODAL_REACH_STEPS` are `CLIMB.radii`, `.moves`, `.rise` and `.reach_steps`.
63
+ - `gliquid.solution.DEFAULT_TERNARY_TSTAR_MAX_HULLS`: a ternary liquid no longer iterates its
64
+ T*.
65
+ - The `tqdm` dependency: `hull_mode='gtx'` no longer prints a progress bar over its slices.
66
+
67
+ ### Fixed
68
+
69
+ - **`fig.show()` works in a bare Jupyter kernel.** `nbformat>=5.7` is now a base dependency. A
70
+ plain `pip install gliquid` plus `ipykernel` (the VS Code setup) lacked it, and plotly raised
71
+ `Mime type rendering requires nbformat>=4.2.0` on every figure. plotly checks for nbformat
72
+ once, at import, so installing it afterwards needs a kernel restart.
73
+ - **A ternary's liquidus and its solids' melting points are solved with the liquid's Gibbs energy
74
+ at temperature, in both hull modes.** This replaces the per-node re-linearization of 0.3.2,
75
+ which inside a liquid miscibility gap could cycle without converging and drew one-node spikes,
76
+ white holes and nodes missing from the surface.
77
+ - In `hull_mode='hsx'` every node's liquidus, and every solid's highest temperature on the
78
+ hull, is solved on its own HSX facet with the liquid's H and S at that temperature; a node no
79
+ facet solves is solved on lower hulls at fixed temperatures.
80
+ - In `hull_mode='gtx'` every slice carries the liquid's Gibbs energy at its own temperature,
81
+ and a node's liquidus is refined between the last slice it is off the hull at and the next,
82
+ instead of read off the slice. A solid's melting point is still the last slice it is on.
83
+ - Both hull modes take the liquidus sheets' T* from their own liquidus at the nodes, so they
84
+ draw the same sheets, where 0.3.2's two modes could differ by hundreds of kelvin. Both keep
85
+ the phase fields while no node of the hull lies more than 1 K above the sheets.
86
+ - `get_inter_melting_temps` and an imputed phase's realized temperature follow.
87
+ - **Two-liquid (L1 + L2) fields no longer drop out of the ternary liquidus.** Where the liquid
88
+ splits into two liquids only when it is hot, at the foot of a steep dome wall, in a narrow band
89
+ between the grid's rows, along a ridge or in a valley narrower than the grid, or in a narrow
90
+ temperature window, the L1 + L2 sheet came back missing or far too low, and the figure drew the
91
+ solid's sheet there instead: slots, teeth, fins and stray islands along two-liquid fields,
92
+ hundreds of kelvin below the liquidus, and a banded edge along steep dome walls.
93
+ - **A ternary whose miscibility gap tops out far above its nodes' liquidus draws its phase
94
+ fields** (for example Bi-Sn-Ti) instead of rejecting an infinite two-liquid sheet. Where the
95
+ binodal lies far above T*, the two-liquid sheet takes the whole liquid at the binodal's own
96
+ temperature, so in `hull_mode='hsx'` it lies on the exact binodal rather than up to 50 K off.
97
+ Such a ternary takes several times as long to draw as its figure without fields did.
98
+ - **No white holes from the binodal near a grid node.** Every liquid composition's H and S are
99
+ taken at the T* of the composition the binodal solves for. Taking each at its own T* had let a
100
+ single liquidus vertex sit far above its neighbours, which plotly clipped at the top of the
101
+ window as a white hole.
102
+ - **The edge of a two-liquid field that stands above the solids is drawn as a wall.** Where the
103
+ L1 + L2 sheet ends in a jump, the ternary liquidus figure drew a ramp across one mesh cell that
104
+ overshot the solid's liquidus on one side and fell short of the two-liquid liquidus on the
105
+ other. Both fields now keep their own liquidus up to the boundary, joined by a vertical wall,
106
+ and the mesh is refined on the two-liquid side where its liquidus climbs steeply from the wall.
107
+ - **A steep liquidus next to a binary edge or a corner is drawn** instead of being cut across one
108
+ mesh cell. The liquidus partition adds points in six rows near each side, down to 0.025 mole
109
+ fraction from each corner, where the mesh's straight-line liquidus misses the sheets by more
110
+ than 15 K, and takes each such point's solid sheets with the liquid at the hottest solid's own
111
+ temperature.
112
+ - **Curved liquidus domes sag less between grid nodes.** The liquidus partition adds the midpoint
113
+ of a mesh edge whose straight line misses the liquidus there by more than 15 K, so narrow
114
+ two-liquid domes and the creases between their basins are no longer drawn as facets up to
115
+ 75 K off. A figure holds about 6% more vertices.
116
+ - **A ternary liquidus surface no longer shows mottled patches where it overlaps itself in
117
+ view.** Each translucent surface mesh lists its faces coolest first, so they blend in a
118
+ consistent order.
119
+ - **No needle at the sides of the liquidus.** The liquidus sheets read a mole fraction within
120
+ `gliquid.liquidus_sheets.SIDE_FRACTION` of zero as zero, so a partition vertex that round-off
121
+ puts a hair off a side takes that side's liquidus instead of a phase holding the missing
122
+ element. A vertex the partition adds lies at most 25 K above the hottest vertex next to it, so
123
+ a steep wall near a corner no longer draws as a needle; the mesh nodes keep their liquidus.
124
+ - **A liquidus partition with a non-finite vertex falls back to the node mesh.** An infinite
125
+ two-liquid sheet at a refinement vertex no longer makes `get_plot('tx')` raise
126
+ `ValueError: arange: cannot compute length`; the figure is drawn without phase fields, as
127
+ when the sheets disagree with the hull at a node.
128
+ - **The drawn temperature window reaches the liquidus surface's hottest vertex** unless
129
+ `temp_range` pins its top, so a two-liquid dome a few K above the hull's window is no longer
130
+ cut flat.
131
+ - **A ternary `temp_range` with one end pinned past the other end's derived value** no longer
132
+ leaves an empty temperature grid (`IndexError`): a pinned floor above the derived ceiling gets a
133
+ padded ceiling above it, and a pinned ceiling below the derived floor (`hull_mode='gtx'`) caps
134
+ the floor at itself. A pinned range whose low end is above its high end raises `ValueError`.
135
+ A pinned ceiling that leaves too few liquidus nodes to triangulate draws the figure without a
136
+ liquidus mesh, and a WARNING says how few the window holds; one that leaves a patch of
137
+ liquidus nodes touching no side of the composition triangle splits it into the same phase
138
+ fields as the unpinned figure.
139
+ - **A ternary's binary edge figures match the ternary's own edges.** `build_binary_edge_figures`
140
+ converges every row of each edge's liquid (`every_row=True`). It had stopped once the rows
141
+ inside the digitized MPDS liquidus converged, so a predicted edge whose MPDS liquidus is a
142
+ corner fragment drew its liquidus and two-liquid dome up to 60 K off. Fits are unchanged.
143
+
12
144
  ## [0.3.2] - 2026-10-29
13
145
 
14
146
  ### Changed
@@ -830,7 +962,8 @@ earlier published versions to diff against; this entry describes what the packag
830
962
  - **An empty Materials Project fetch now raises rather than being cached.** A zero-entry result
831
963
  used to be written out as a 2-byte `[]`, which every later read then accepted as a warm cache.
832
964
 
833
- [Unreleased]: https://github.com/willwerj/gliquid_python/compare/v0.3.2...HEAD
965
+ [Unreleased]: https://github.com/willwerj/gliquid_python/compare/v0.3.3...HEAD
966
+ [0.3.3]: https://github.com/willwerj/gliquid_python/compare/v0.3.2...v0.3.3
834
967
  [0.3.2]: https://github.com/willwerj/gliquid_python/compare/v0.3.1...v0.3.2
835
968
  [0.3.1]: https://github.com/willwerj/gliquid_python/compare/v0.3.0...v0.3.1
836
969
  [0.3.0]: https://github.com/willwerj/gliquid_python/compare/v0.2.0...v0.3.0
@@ -7,8 +7,8 @@ abstract: >-
7
7
  liquid descriptions.
8
8
  type: software
9
9
  # A literal: bump `version` and `date-released` by hand at each release (CONTRIBUTING.md).
10
- version: "0.3.2"
11
- date-released: "2026-10-29"
10
+ version: "0.3.3"
11
+ date-released: "2026-11-09"
12
12
  license: MIT
13
13
  repository-code: "https://github.com/willwerj/gliquid_python"
14
14
  url: "https://viz.whsunresearch.group/gliquid/interactive-matrix.html"
@@ -17,18 +17,22 @@ authors:
17
17
  family-names: Willwerth
18
18
  email: willwerj@umich.edu
19
19
  affiliation: "University of Michigan"
20
+ orcid: "https://orcid.org/0009-0004-6334-9426"
20
21
  - given-names: Abrar
21
22
  family-names: Rauf
22
23
  email: arauf@umich.edu
23
24
  affiliation: "University of Michigan"
25
+ orcid: "https://orcid.org/0000-0001-5205-0075"
24
26
  - given-names: Shibo
25
27
  family-names: Tan
26
28
  email: shibot@umich.edu
27
29
  affiliation: "University of Michigan"
30
+ orcid: "https://orcid.org/0000-0002-1193-5878"
28
31
  - given-names: Wenhao
29
32
  family-names: Sun
30
33
  email: whsun@umich.edu
31
34
  affiliation: "University of Michigan"
35
+ orcid: "https://orcid.org/0000-0002-8416-455X"
32
36
  keywords:
33
37
  - "density functional theory"
34
38
  - "thermodynamic modeling"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: gliquid
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: A package for fitting DFT-referenced liquid free energies from digitized equilibrium phase boundaries
5
5
  Project-URL: Homepage, https://viz.whsunresearch.group/gliquid/interactive-matrix.html
6
6
  Project-URL: TernaryInterpolation, https://viz.whsunresearch.group/gliquid/ternary-interpolation/
@@ -27,13 +27,13 @@ Requires-Python: <3.14,>=3.10
27
27
  Requires-Dist: emmet-core<0.86,>=0.84
28
28
  Requires-Dist: matplotlib>=3.10.0
29
29
  Requires-Dist: mp-api>=0.45.1
30
+ Requires-Dist: nbformat>=5.7
30
31
  Requires-Dist: numpy>=1.24
31
32
  Requires-Dist: pandas>=2.0
32
33
  Requires-Dist: plotly<6.0.0,>=5.24
33
34
  Requires-Dist: pymatgen>=2024.1.1
34
35
  Requires-Dist: scipy>=1.11
35
36
  Requires-Dist: sympy>=1.13
36
- Requires-Dist: tqdm>=4.65
37
37
  Provides-Extra: ml
38
38
  Requires-Dist: xgboost-cpu<4,>=2.1.1; (sys_platform != 'darwin') and extra == 'ml'
39
39
  Requires-Dist: xgboost<4,>=2.0; (sys_platform == 'darwin') and extra == 'ml'
@@ -21,7 +21,7 @@
21
21
  "source": [
22
22
  "## UNCOMMENT THIS BLOCK FOR GOOGLE COLAB\n",
23
23
  "# !git clone --depth 1 https://github.com/willwerj/gliquid_python.git # per-system data in cache/\n",
24
- "# !pip install -q \"gliquid==0.3.2\" \"pymatgen<2026\" # keeps Colab's requests==2.32.4\n",
24
+ "# !pip install -q \"gliquid==0.3.3\" \"pymatgen<2026\" # keeps Colab's requests==2.32.4\n",
25
25
  "# import gliquid.config as cfg\n",
26
26
  "# cfg.set_cache_dir(\"/content/gliquid_python/cache\")\n",
27
27
  "# from google.colab import output\n",
@@ -21,7 +21,7 @@
21
21
  "source": [
22
22
  "## UNCOMMENT THIS BLOCK FOR GOOGLE COLAB\n",
23
23
  "# !git clone --depth 1 https://github.com/willwerj/gliquid_python.git # per-system data in cache/\n",
24
- "# !pip install -q \"gliquid==0.3.2\" \"pymatgen<2026\" # keeps Colab's requests==2.32.4\n",
24
+ "# !pip install -q \"gliquid==0.3.3\" \"pymatgen<2026\" # keeps Colab's requests==2.32.4\n",
25
25
  "# import gliquid.config as cfg\n",
26
26
  "# cfg.set_cache_dir(\"/content/gliquid_python/cache\")\n",
27
27
  "# from google.colab import output\n",
@@ -71,7 +71,7 @@
71
71
  "outputs": [],
72
72
  "source": [
73
73
  "!git clone --depth 1 https://github.com/willwerj/gliquid_python.git\n",
74
- "!pip install -q \"gliquid==0.3.2\" \"pymatgen<2026\"\n",
74
+ "!pip install -q \"gliquid==0.3.3\" \"pymatgen<2026\"\n",
75
75
  "from google.colab import output\n",
76
76
  "output.enable_custom_widget_manager()"
77
77
  ]
@@ -30,7 +30,7 @@
30
30
  "source": [
31
31
  "## UNCOMMENT THIS BLOCK FOR GOOGLE COLAB\n",
32
32
  "# !git clone --depth 1 https://github.com/willwerj/gliquid_python.git # per-system data in cache/\n",
33
- "# !pip install -q \"gliquid==0.3.2\" \"pymatgen<2026\" # keeps Colab's requests==2.32.4\n",
33
+ "# !pip install -q \"gliquid==0.3.3\" \"pymatgen<2026\" # keeps Colab's requests==2.32.4\n",
34
34
  "# import gliquid.config as cfg\n",
35
35
  "# cfg.set_cache_dir(\"/content/gliquid_python/cache\")\n",
36
36
  "# from google.colab import output\n",
@@ -22,7 +22,7 @@
22
22
  "source": [
23
23
  "## UNCOMMENT THIS BLOCK FOR GOOGLE COLAB\n",
24
24
  "# !git clone --depth 1 https://github.com/willwerj/gliquid_python.git # per-system data in cache/\n",
25
- "# !pip install -q \"gliquid==0.3.2\" \"pymatgen<2026\" # keeps Colab's requests==2.32.4\n",
25
+ "# !pip install -q \"gliquid==0.3.3\" \"pymatgen<2026\" # keeps Colab's requests==2.32.4\n",
26
26
  "# import gliquid.config as cfg\n",
27
27
  "# cfg.set_cache_dir(\"/content/gliquid_python/cache\")\n",
28
28
  "# from google.colab import output\n",
@@ -9,6 +9,8 @@ dynamic = ["version"]
9
9
  dependencies = [
10
10
  # >=5.24 works with pandas 3; <6 keeps the fill behaviour the solid-solution envelope uses.
11
11
  "plotly>=5.24,<6.0.0",
12
+ # fig.show() inside a Jupyter kernel needs nbformat.
13
+ "nbformat>=5.7",
12
14
  # <0.86: later emmet-core breaks live Materials Project fetches. Do not lift.
13
15
  "emmet-core>=0.84,<0.86",
14
16
  "mp-api>=0.45.1",
@@ -18,7 +20,6 @@ dependencies = [
18
20
  "scipy>=1.11",
19
21
  "matplotlib>=3.10.0",
20
22
  "sympy>=1.13",
21
- "tqdm>=4.65",
22
23
  # No ML packages here: they are the `ml` extra (test_optional_ml_extras.py checks this).
23
24
  ]
24
25
  requires-python = ">=3.10,<3.14"
@@ -16,6 +16,7 @@
16
16
  # - plotly 5.24.0 is the minimum: 5.18's express layer calls grouped.get_group(s[0]),
17
17
  # which pandas 3.x rejects (KeyError). Measured in the compat matrix on every -min
18
18
  # env at py311+, where pandas 3 is installable; py310-min escapes on pandas 2.3.3.
19
+ # - nbformat 5.7.0 is the floor nbconvert 7 and jupyter already require.
19
20
  # - emmet-core is now capped <0.86 in pyproject: 0.87.1 imports pymatgen.core.entries,
20
21
  # removed from current pymatgen, breaking every live MP fetch on py311+.
21
22
  # - emmet-core is not pinned here; mp-api==0.45.1 resolves it within pyproject's >=0.84,<0.86.
@@ -33,7 +34,7 @@
33
34
  # pin stays. Removing it is a matrix experiment, not a cleanup.
34
35
 
35
36
  plotly==5.24.0
36
- nbformat==4.2.0
37
+ nbformat==5.7.0
37
38
  mp-api==0.45.1
38
39
  matplotlib==3.10.0
39
40
  sympy==1.13
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '0.3.2'
22
- __version_tuple__ = version_tuple = (0, 3, 2)
21
+ __version__ = version = '0.3.3'
22
+ __version_tuple__ = version_tuple = (0, 3, 3)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -37,6 +37,7 @@ from gliquid.cache import (
37
37
  non_dft_entry_label,
38
38
  )
39
39
  from gliquid.hsx import HSX
40
+ from gliquid.mpds import LiquidusReference
40
41
  from gliquid.phase import (
41
42
  EV_ATOM_TO_J_MOL,
42
43
  UNARY,
@@ -528,22 +529,15 @@ class BinaryLiquid:
528
529
  mean_elt_tm (float): Mean elemental melting temperature.
529
530
  liquid_tstar (np.ndarray | None): Linearization temperature (K) of each interior grid
530
531
  row in the last ``update_phase_points``.
531
- pd_ind (int | None): Index of the MPDS phase diagram used.
532
- mpds_json (dict): MPDS phase equilibrium data for the system.
533
- digitized_liq (list): Digitized liquidus data points.
532
+ mpds_json, digitized_liq, temp_range, pd_ind, liq_coverage, undigitized_comp_ranges:
533
+ the fields of the :class:`~gliquid.mpds.LiquidusReference` the system was built
534
+ from, in its component frame (:attr:`reference` collects them again).
534
535
  max_liq_temp (float | None): Maximum temperature on the liquidus line.
535
536
  min_liq_temp (float | None): Minimum temperature on the liquidus line.
536
- temp_range (list): Temperature range for calculations.
537
537
  assessed_crange_floor (float): Minimum fraction of the composition axis that must
538
- carry digitized liquidus for the system to be considered fittable.
539
- liq_coverage (dict | None): ``mpds.liquidus_coverage`` metrics of the pre-fill
540
- digitized liquidus (``max_gap``, ``covered_fraction``, ``holes``, ...), in this
541
- object's component frame. A dict measured on a reversed-frame json is mirrored
542
- first (``mpds.mirror_liquidus_coverage``).
538
+ carry digitized liquidus, outside ``undigitized_comp_ranges``, for the system to be
539
+ considered fittable.
543
540
  liquidus_holes (list): Read-only view of ``liq_coverage['holes']``.
544
- undigitized_comp_ranges (list): ``[lo, hi]`` intervals of the whole composition axis
545
- with no digitized liquidus: outside the digitized endpoints, or inside a hole.
546
- ``assessed_crange_floor`` gates on their complement.
547
541
  unsupported_comp_ranges (list): ``[lo, hi]`` composition intervals whose conjugate
548
542
  solid has no evaluable free energy. ``fit_parameters`` fills it from
549
543
  ``coverage_report.unsupported_ranges`` and its own invariant walk.
@@ -587,6 +581,18 @@ class BinaryLiquid:
587
581
  {
588
582
  "ignored_comp_ranges": "unsupported_comp_ranges",
589
583
  "comp_range_fit_lim": "assessed_crange_floor",
584
+ **{
585
+ name: f"reference=LiquidusReference({name}=...)"
586
+ for name in (
587
+ "mpds_json",
588
+ "digitized_liq",
589
+ "temp_range",
590
+ "pd_ind",
591
+ "liq_coverage",
592
+ "undigitized_comp_ranges",
593
+ )
594
+ },
595
+ "invariants": "find_invariant_points()",
590
596
  }
591
597
  )
592
598
  def __init__(
@@ -597,13 +603,8 @@ class BinaryLiquid:
597
603
  *,
598
604
  skip_reason=None,
599
605
  component_data=None,
600
- pd_ind=None,
601
- mpds_json=None,
602
- digitized_liq=None,
603
- temp_range=None,
606
+ reference: LiquidusReference | None = None,
604
607
  assessed_crange_floor=None,
605
- undigitized_comp_ranges=None,
606
- liq_coverage=None,
607
608
  unsupported_comp_ranges=None,
608
609
  dft_type="GGA",
609
610
  dft_ch=None,
@@ -615,7 +616,6 @@ class BinaryLiquid:
615
616
  params=(),
616
617
  tau=DEFAULT_TAU,
617
618
  eqs=None,
618
- invariants=None,
619
619
  ):
620
620
  self.init_error = init_error
621
621
  self.skip_reason = skip_reason
@@ -625,21 +625,22 @@ class BinaryLiquid:
625
625
  self.components = components
626
626
  self.component_data = {} if component_data is None else component_data
627
627
  self.mean_elt_tm = np.mean([self.component_data[comp].t_fusion for comp in self.components])
628
- self.pd_ind = pd_ind
629
- self.mpds_json = {} if mpds_json is None else mpds_json
630
- self.digitized_liq = [] if digitized_liq is None else digitized_liq
628
+ ref = LiquidusReference() if reference is None else reference
629
+ self.pd_ind = ref.pd_ind
630
+ self.mpds_json = {} if ref.mpds_json is None else ref.mpds_json
631
+ self.digitized_liq = [] if ref.digitized_liq is None else ref.digitized_liq
631
632
  self.max_liq_temp = (
632
633
  max(self.digitized_liq, key=lambda x: x[1])[1] if self.digitized_liq else None
633
634
  )
634
635
  self.min_liq_temp = (
635
636
  min(self.digitized_liq, key=lambda x: x[1])[1] if self.digitized_liq else None
636
637
  )
637
- self.temp_range = [] if temp_range is None else temp_range
638
+ self.temp_range = [] if ref.temp_range is None else ref.temp_range
638
639
  self.assessed_crange_floor = (
639
640
  config.assessed_crange_floor if assessed_crange_floor is None else assessed_crange_floor
640
641
  )
641
- self.undigitized_comp_ranges = undigitized_comp_ranges or []
642
- self.liq_coverage = liq_coverage
642
+ self.undigitized_comp_ranges = ref.undigitized_comp_ranges or []
643
+ self.liq_coverage = ref.liq_coverage
643
644
  self.unsupported_comp_ranges = (
644
645
  [] if unsupported_comp_ranges is None else unsupported_comp_ranges
645
646
  )
@@ -658,7 +659,7 @@ class BinaryLiquid:
658
659
  self.xs_mix.format.guess_params, self.dft_ch, tau=self.tau, fmt=self.xs_mix.format
659
660
  )
660
661
  self.eqs = eqs if eqs is not None else self._build_eqs()
661
- self.invariants = invariants
662
+ self.invariants = None
662
663
  self.low_t_exp_phases = None
663
664
  self.guess_symbols = None
664
665
  self.constraints = None
@@ -667,6 +668,18 @@ class BinaryLiquid:
667
668
  self.hsx = None
668
669
  self.liquid_tstar = None
669
670
 
671
+ @property
672
+ def reference(self) -> LiquidusReference:
673
+ """The :class:`~gliquid.mpds.LiquidusReference` of the current reference attributes."""
674
+ return LiquidusReference(
675
+ mpds_json=self.mpds_json,
676
+ digitized_liq=self.digitized_liq,
677
+ temp_range=self.temp_range,
678
+ pd_ind=self.pd_ind,
679
+ liq_coverage=self.liq_coverage,
680
+ undigitized_comp_ranges=self.undigitized_comp_ranges,
681
+ )
682
+
670
683
  def __str__(self):
671
684
  return f"BinaryLiquid({self.sys_name})"
672
685
 
@@ -1099,19 +1112,21 @@ class BinaryLiquid:
1099
1112
  skip_reason = SKIP_SPARSE_LIQUIDUS
1100
1113
 
1101
1114
  kwargs = {
1102
- "mpds_json": mpds_json,
1103
1115
  "component_data": component_data,
1104
- "digitized_liq": digitized_liq,
1105
- "temp_range": temp_range,
1116
+ "reference": LiquidusReference(
1117
+ mpds_json=mpds_json,
1118
+ digitized_liq=digitized_liq,
1119
+ temp_range=temp_range,
1120
+ pd_ind=pd_ind,
1121
+ liq_coverage=liq_coverage,
1122
+ undigitized_comp_ranges=ignored_ranges,
1123
+ ),
1106
1124
  "dft_type": dft_type,
1107
1125
  "dft_ch": ch,
1108
1126
  "phases": phases,
1109
1127
  "xs_mix": xs_mix,
1110
1128
  "eqs": eqs,
1111
- "pd_ind": pd_ind,
1112
1129
  "assessed_crange_floor": assessed_crange_floor,
1113
- "undigitized_comp_ranges": ignored_ranges,
1114
- "liq_coverage": liq_coverage,
1115
1130
  "skip_reason": skip_reason,
1116
1131
  "ss_models": ss_models,
1117
1132
  }
@@ -1147,7 +1162,6 @@ class BinaryLiquid:
1147
1162
  order = resolve_component_order(order, self.components)
1148
1163
  if list(order) == list(self.components):
1149
1164
  return self
1150
- mirrored_liq = mpds.mirror_liquidus(self.digitized_liq) if self.digitized_liq else []
1151
1165
  ch = self.dft_ch
1152
1166
  if ch is not None:
1153
1167
  ch = PhaseDiagram(ch.all_entries, elements=[Element(c) for c in order])
@@ -1157,21 +1171,11 @@ class BinaryLiquid:
1157
1171
  init_error=self.init_error,
1158
1172
  skip_reason=self.skip_reason,
1159
1173
  component_data={c: ref.copy() for c, ref in self.component_data.items()},
1160
- mpds_json=self.mpds_json,
1161
- digitized_liq=mirrored_liq,
1162
- temp_range=list(self.temp_range),
1174
+ reference=self.reference.mirrored(),
1163
1175
  assessed_crange_floor=self.assessed_crange_floor,
1164
- undigitized_comp_ranges=[
1165
- [1 - b, 1 - a] for a, b in reversed(self.undigitized_comp_ranges or [])
1166
- ],
1167
1176
  unsupported_comp_ranges=[
1168
1177
  [1 - hi, 1 - lo] for lo, hi in reversed(self.unsupported_comp_ranges or [])
1169
1178
  ],
1170
- liq_coverage=(
1171
- mpds.mirror_liquidus_coverage(self.liq_coverage)
1172
- if self.liq_coverage
1173
- else self.liq_coverage
1174
- ),
1175
1179
  dft_type=self.dft_type,
1176
1180
  dft_ch=ch,
1177
1181
  removed_entry_ids=self.removed_entry_ids,
@@ -1179,7 +1183,6 @@ class BinaryLiquid:
1179
1183
  phases=[replace(p, points=[]) for p in self.phases if p.name not in self.ss_models],
1180
1184
  ss_models=self.ss_models,
1181
1185
  xs_mix=self.xs_mix.swapped(),
1182
- pd_ind=self.pd_ind,
1183
1186
  )
1184
1187
  clone._rebuild_thermodynamic_expressions()
1185
1188
  clone.fit_unsupported_range_mode = self.fit_unsupported_range_mode
@@ -1320,7 +1323,7 @@ class BinaryLiquid:
1320
1323
  else:
1321
1324
  raise ValueError("kwarg 'fmt' must be either 'dict' or 'dataframe'!")
1322
1325
 
1323
- def update_phase_points(self) -> dict:
1326
+ def update_phase_points(self, every_row: bool = False) -> dict:
1324
1327
  """
1325
1328
  Calculates every phase's points for the current parameters with ``self.hsx``.
1326
1329
 
@@ -1334,6 +1337,10 @@ class BinaryLiquid:
1334
1337
  ``self.hsx`` is updated in place, and rebuilt only when absent or when the hull's
1335
1338
  phase list changed.
1336
1339
 
1340
+ Args:
1341
+ every_row: the loop checks every interior row, not only those inside the digitized
1342
+ liquidus (``liquid_tstar_row_errors``).
1343
+
1337
1344
  Returns:
1338
1345
  data (dict): A dictionary containing the phase data in HSX format, including phase names and components.
1339
1346
  """
@@ -1355,7 +1362,7 @@ class BinaryLiquid:
1355
1362
  if k + 1 == DEFAULT_TSTAR_MAX_HULLS:
1356
1363
  break
1357
1364
  liq = _grid_liquidus(phase_points.get("L"), grid)
1358
- errors = self.liquid_tstar_row_errors(liq)
1365
+ errors = self.liquid_tstar_row_errors(liq, every_row)
1359
1366
  if (
1360
1367
  errors.max() <= DEFAULT_TSTAR_TOL
1361
1368
  and self.liquidus_shift_estimate(data, liq, errors).max() <= DEFAULT_TSTAR_LIQ_TOL
@@ -1389,15 +1396,16 @@ class BinaryLiquid:
1389
1396
  """
1390
1397
  return float(self.liquid_tstar_row_errors(liq).max())
1391
1398
 
1392
- def liquid_tstar_row_errors(self, liq: np.ndarray) -> np.ndarray:
1399
+ def liquid_tstar_row_errors(self, liq: np.ndarray, every_row: bool = False) -> np.ndarray:
1393
1400
  """|G_lin(T_liq; T*) - G(T_liq)| (J/mol) of the liquid on each interior row.
1394
1401
 
1395
- ``G_lin`` takes H and S at ``liquid_tstar``, ``G`` at ``liq``. Rows outside the
1396
- digitized liquidus's composition span, and rows where either temperature is not finite,
1397
- report 0.
1402
+ ``G_lin`` takes H and S at ``liquid_tstar``, ``G`` at ``liq``. Rows where either
1403
+ temperature is not finite report 0, and so, unless ``every_row``, do the rows outside the
1404
+ digitized liquidus's composition span.
1398
1405
 
1399
1406
  Args:
1400
1407
  liq: liquidus temperature (K) of each interior grid row; NaN where there is none.
1408
+ every_row: count the rows outside the digitized liquidus too.
1401
1409
 
1402
1410
  Returns:
1403
1411
  np.ndarray: one difference per interior grid row.
@@ -1408,7 +1416,7 @@ class BinaryLiquid:
1408
1416
  errors = np.zeros(len(grid))
1409
1417
  ok = np.isfinite(liq) & np.isfinite(t_star)
1410
1418
  dig = np.asarray(self.digitized_liq or [], dtype=float).reshape(-1, 2)
1411
- if len(dig):
1419
+ if len(dig) and not every_row:
1412
1420
  ok &= (grid >= dig[:, 0].min()) & (grid <= dig[:, 0].max())
1413
1421
  if not ok.any():
1414
1422
  return errors