stb-gqcaAnalysis¶
Stage 2 - Analysis of the 5.13 Generalized Quasi-Chemical Approximation (GQCA) workflow · menu code 5.13.2
usage: stb-gqcaAnalysis [-h] [--directory DIRECTORY] [--file FILE] [--x-min X_MIN]
[--x-max X_MAX] [--x-points X_POINTS]
[--x-target X_TARGET [X_TARGET ...]] [--temp TEMP]
[--temp-min TEMP_MIN] [--temp-max TEMP_MAX]
[--temp-points TEMP_POINTS]
[--force-tolerance FORCE_TOLERANCE] [-o OUTPUT] [--show]
[--png] [--plot-temp PLOT_TEMP] [--view]
[--export-relaxed [FORMAT]] [-v] [--no-intro]
Stage 2 of 2: solves the GQCA pair-cluster mass-action equilibrium and reports alloy mixing thermodynamics.
Reads the 3 relaxed cluster_n{0,1,2}/ folders written by stb-gqca (AA/AB/BB pair-cluster
representatives; SIESTA output read from <folder>/calc.out by default, level of theory read back
from each folder's own calc.fdf + config_extra.fdf), normalizes each to a per-sublattice-site energy
(the 3 folders generally have different cell sizes -- see read_cluster_energy's own docstring), and
solves the mass-action equilibrium (Sher, van Schilfgaarde, Chen, Chen, Phys. Rev. B 36, 4279, 1987)
over a composition x / temperature T grid to report Delta-H_mix, Delta-S_mix, Delta-G_mix, and a
short-range-order (SRO) parameter.
The report covers: level-of-theory consistency across the 3 folders, per-folder convergence and
relaxed geometry (cell, volume per site, residual force/stress), pair excess energies in several
units, an equivalent regular-solution estimate (Omega, T_c), tables at chosen target compositions,
sanity checks, and a plain-language interpretation. Optional on-screen/PNG dashboard (--show/--png),
interactive 3D viewer of the 3 relaxed structures (--view) and CIF/XSF/... export (--export-relaxed).
[UNVERIFIED] The closed form of the mixing entropy (-(kB/N) * Sum_j x_j*ln(x_j/g_j) per site, the
standard "gas of independent clusters" form -- exact ideal-solution entropy in the random limit)
and the SRO-parameter normalization could not be pinned to a fully confirmed closed form from the
primary literature during this tool's development -- see core/gqca_solver.py's own docstrings
(which also document the per-site vs per-cluster normalization). The mixing-enthalpy and mass-action-law equations ARE
confirmed against a secondary source that restates the original 1987 formalism. Every report/CSV
column derived from an [UNVERIFIED] quantity is documented as such below.
Also runs a discrete-grid common-tangent (miscibility gap) search on Delta-G_mix(x) at every
sampled T -- kept for completeness, but [STRUCTURAL LIMITATION] Delta-G_mix(x) from this
independent-cluster formalism is PROVABLY CONVEX for any Delta_j (a convex-analysis theorem, not
a numerical coincidence), so a gap is essentially never found here regardless of the input
energies -- this model captures short-range order, not genuine phase separation. See
core/gqca_solver.py::common_tangent_gaps' own docstring for the full argument.
options:
-h, --help show this help message and exit
--directory DIRECTORY
Root directory written by stb-gqca (default: gqca_study).
--file FILE SIESTA output filename inside each cluster_n* folder (default: calc.out).
--x-min X_MIN Composition grid minimum (default: 0.0).
--x-max X_MAX Composition grid maximum (default: 1.0).
--x-points X_POINTS Number of composition grid points (default: 21).
--x-target X_TARGET [X_TARGET ...]
Composition(s) x for the detailed per-temperature tables (default: 0.5).
--temp TEMP Single fixed temperature in K. Mutually exclusive with --temp-min/--temp-max/--temp-points.
--temp-min TEMP_MIN Temperature sweep minimum (K). Without any temperature option the sweep 300..1500 K is used.
--temp-max TEMP_MAX Temperature sweep maximum (K).
--temp-points TEMP_POINTS
Number of temperature sweep points (default: 5).
--force-tolerance FORCE_TOLERANCE
Residual atomic force in eV/Ang (default: 0.05) above which a cluster folder's calc.out is flagged as possibly not relaxed. Advisory only, never blocks the result.
-o OUTPUT, --output OUTPUT
Base filename (no extension) for the .csv/.dat/.gplot/.png outputs (default: gqca_results).
--show Open the analysis dashboard (matplotlib) on screen. Needs a display.
--png Save the dashboard as <directory>/<output>_summary.png.
--plot-temp PLOT_TEMP
Temperature (K) used by the single-T dashboard panels (default: the lowest sampled T; the nearest sampled T is used).
--view Open each relaxed cluster structure in ASE's interactive 3D viewer, one after the other (needs a display).
--export-relaxed [FORMAT]
Write the 3 relaxed structures (positions + relaxed cell) to <directory>/relaxed/ as cif (default), xsf, xyz or vasp.
-v, --version show program's version number and exit
--no-intro Do not show the introduction
Usage examples:
stb-gqcaAnalysis # defaults: ./gqca_study, T = 300..1500 K (5 points)
stb-gqcaAnalysis --directory gqca_study --temp 800
stb-gqcaAnalysis --temp-min 300 --temp-max 1500 --temp-points 5 --x-target 0.25 0.5 0.75
stb-gqcaAnalysis --show --view # dashboard + 3D viewer on screen
stb-gqcaAnalysis --png --export-relaxed cif # figure + relaxed structures to files