Repository navigation
XinRefinement v1.6.0 — UI overhaul and unit-cell checkboxes now actually work
XinRefinement v1.6.0 — UI overhaul and unit-cell checkboxes now actually work
Baseline
v1.5.0| Theme: engine untouched, make the results clear. v1.5.0 chased fit quality to MAUD's +0.21 pt, but the UI still organized information the v1.0 way: phases shown by CIF filename (1Entry_96-500-0036), bottom-left a string of static placeholder rows, click ▶ with no idea what this step refines, quantification and unit-cell parameters only findable row by row from the summary table. This release reworks those four areas, and fixes a functional defect left over from v1.5—the row of checkboxes in the unit-cell popup never got passed to the engine.Numerics unchanged: golden 50/50 still
3.4074156640940005, CLI/API behavior bit-identical.
Download
| File | Size | SHA256 |
|---|---|---|
XinRefinement-1.6.0-setup.exe |
75.8 MB | c35fceaa37dafa9ebf14f48ca55d7bc62e0c87a86f6fcb44e5230f25c1aa17f2 |
Release installer (includes registration mechanism, zh/en/ja trilingual install UI). The internal evaluation portable package (
XinRefinement-internal-1.6.0-portable.zip, 114.2 MB, sha2565fb97ea234732a3f825cc4e60806b5d9a5ae470b80acdc7edb7e1a6c0044c439) is for internal acceptance only and is not published with this Release.
The change at a glance
| v1.5.0 | v1.6.0 | |
|---|---|---|
| How phases display | CIF filename (1Entry_96-500-0036) |
chemical formula · phase name (TiO2 · Anatase), three modes selectable, formula default |
| Bottom-left run-log area | Static placeholder rows | MAUD-style scrolling log: start line / param: old → new / done · Rwp a → b |
| Click nav ▶ | Starts running directly, no word on what it refines | First pops a step description window (this step's params + current values + explanation), then writes the same content to the log on confirm |
| Marker-bar label | CIF filename | Display name, right-click to switch formula/phase name/filename |
| Results area | Summary / convergence / correlation three tabs | Added phase quantification (5 columns, total row) and unit cell & microstructure (11 columns) |
| Unit-cell popup checkboxes | Decorative (checked but no effect, non-a/c all greyed) | Actually work: RefineConfig.cell_axes → engine; greyed by crystal system with reason |
| Edit→Phase Parameters | Single column vertical, buttons pushed out when multiphase | Two-column grid + scroll area, min width 880 |
Main Changes
1. Phase display, three modes (formula default)
New core/profile/naming.py: formula (default) / label / file.
- Formula normalization does only two safe things: compactify (
O2 Si→SiO2) and regroup within group by "metal → non-metal → anion" with order-preserving then regrouping (O4 S Zn→ZnSO4,Co0.1 Li1.03 Ni0.77 Co0.1 Mn0.1 O2→Co0.2Li1.03Ni0.77Mn0.1O2). Does not change any element count, nor does electronegativity sorting (that would disrupt familiar order of multi-metal systems like NCA). CifStructuregainsname_mineral:parse_ciftakes the first non-empty of_chemical_name_mineral→_chemical_name_common→_chemical_name_systematic.- Three-level fallback (formula → label → file) guarantees any CIF has a displayable string.
- Auto-distinguish same-name polymorphs: anatase/rutile/brookite all have formula
TiO2; in the log twoTiO2.acan't tell which is moving → append phase name when display names collide.
2. Bottom-left run-log window (MAUD-style scrolling log)
Read-only QPlainTextEdit, NoWrap, max 4000 lines (long chains don't grow memory unboundedly), auto-scroll to bottom, with a "Clear log" button. Three line types:
=== Start "Unit Cell Parameters" ===
Initial parameters:
zero: 0.0299
TiO2 · Anatase.a: 3.785
...
TiO2 · Anatase.a: 3.785 → 3.78215
=== "Unit Cell Parameters" done · Rwp 7.1816 → 6.9034 ===
- Parameter lines filtered by relative 1e-9: floating-point jitter doesn't spam the screen, real changes always print.
- When the first snapshot has no "previous frame" to compare, print the initial parameter list—otherwise the log shows only one Rwp line and you can't tell what this round refined.
- Unit cells flattened per phase into keys like
TiO2 · Anatase.a, so which phase and which axis is moving is visible at a glance.
3. Navigation step description window (corresponds line-by-line with the run-log window)
Click any ▶ first pops a window, then writes the same content to the log before starting. Each of the eight steps has a checklist: zero gives current value, background gives mode/node count/peak-shape baseline, scale gives per-phase S, unit cell gives the components actually refined per phase, peak shape gives U/V/W/η/asym, xyz gives over-budget strategy, micro gives X/Y/anisotropy/texture, B gives ΔB_iso and the 6 Ų upper bound. Button label is "▶ Start Refinement" not "OK".
4. Results area gains two tabs
- Phase Quantification: display name / wt% / e.s.d. / Z / unit-cell volume, with a total row at the end (QPA theoretically normalizes to 100, the total row is the fastest consistency check).
- Unit Cell & Microstructure: display name / refined components / a b c α β γ / V / crystallite size D / microstrain ε, laid out across 11 columns.
- Anisotropic phases: coefficients are Cholesky 3×3, the UI takes the mean of singular values (volume average) converted to the same dimension as isotropic Å / ε, and marks the D column with
*; whenanisoexists, the scalar X/Y are no longer read (after micro step enables Popa LB, scalar is no longer refined; reading X/Y would always show initial values).
5. Fix: the unit-cell popup checkboxes were decorative (v1.5 leftover defect)
- Symptom: non-a/c checkboxes all
setEnabled(False)with note "all 6 parameters opened by P1.2"—that statement long expired; worse,_settings["cell"]was never passed to the engine, so refinement always released fully by crystal system, making the checkboxes purely decorative. - Fix:
RefineConfig.cell_axes(phase name → allowed components) →recipe._run_cell→refine_cell_full(axes_override=...)→apply_cell_scales(axes=...). The convention is uniformly given byresolve_axes(system, requested) = crystal-system-allowed ∩ user-checked, illegal axes silently dropped; whenNone(never set), bit-identical to v1.5. - Popup reworked: one group box per phase, 3×2 checkbox grid, two columns side by side (four phases no longer need to scroll 24 rows); non-free axes greyed by crystal system with reason tooltip (cubic frees only a; tetragonal/hexagonal/trigonal free a, c; monoclinic adds β; triclinic frees all).
- End-to-end: check only a →
3.785 → 3.78215, c stays9.5196; recipe message changed from/ 2 paramsto/ 1 param(previously counted by full crystal-system release).
6. Fix: Edit→Phase Parameter Editor layout
Two-column grid (unit cell / preferred orientation / texture & anisotropy / microstrain / symmetry two groups side by side) + QScrollArea + min width 880: bottom buttons no longer pushed out of the window when multiphase. Phase-select combo uses display names.
Validation
- Full regression 512 cases: 512 passed / 0 failed / 0 skipped, EXIT=0 (v1.5.0 was 471; added
test_v16_naming_and_cell_axes.py17 cases,test_v16_gui.py20 cases, plus 4 cases that no longer skip after installinggemmilocally). - golden CLI Rwp 50/50
3.4074156640940005unchanged;axes_override=Nonepath has a dedicated test guarding "bit-identical". - Built artifact actually runs:
XinRefinementCLI.exe refine … --recipe --time-budget-min 3produces a report normally (5.8391%); frozen package confirmed to contain the three new modulesnaming/cell/dialogs. - Also fixed two test issues masked by skip (started really running after installing
gemmi):test_joint_s1's golden constant stopped before M11 (now measured same as golden),test_xyz_phase_select's bit-identical assertion differed by 8e-11 in full run (BLAS multi-threaded reduction not bit-reproducible, the strategy itself not in the numeric path) → aligned and relaxed respectively, seeCHANGELOG.md.
Known Limitations
- Sample 7 still not meeting the bar (+3.39 pt, cristobalite near-amorphous broad-packet starting-point problem), v1.6 did not touch the engine, leaving this for a later dedicated effort.
- Acceptance criterion changed basis: project proposal §5 item 6 changed to "same-dataset mean difference ≤ 1 pt and no single-sample difference > 4 pt"; the old per-sample
≤ MAUD+2is demoted to diagnostic reference. - Unit-cell component checkboxes only affect the
cellstep; theprofilestep's joint refinement still releases fully by crystal system (it's a different degree-of-freedom set; mixing them would distort the parameter-correlation diagnosis).
Installation and Registration
Same as v1.5.0: installer embeds zh/en/ja trilingual UI, registration code interoperable with the XinMatch family (%APPDATA%\PolyXRD\Registration\XinRefinement.json). Internal evaluation build needs no registration or install, marked in red in the status bar.
License
This software uses the MIT license. Built-in crystal structure data comes from COD (CC0) and ICSD-derived public literature, containing no PDF cards or ICDD data.