Worked Example · E

Audit a QE Calculation

Inspect the committed bcc Fe QE adverse case from its scientific question and visible numerical evidence through execution, convergence, provenance, and claim limits.

Start with the scientific question and visible evidence

This case asks whether a small fixed-geometry set of bcc Fe electronic calculations is sufficient to support a magnetic-state conclusion. Open the input, complete outputs, candidate table, and k-mesh decision together. Look at the SCF iteration history and warnings in the raw outputs, compare the FM energy sequence rather than only its last point, and check whether the candidate set represents the states required by the claim.

The visible result is adverse: the programs and electronic solvers completed, but the declared FM k-mesh energy screen fails and the magnetic candidate set is incomplete. The manifest and hashes bind the reviewed bytes only after that scientific result has been understood.

Audit the current case in scientific language

Read the case from execution to claim without learning an internal evidence code:

QuestionCurrent case evidenceDecision
Are the source, input, raw output, parser, and derived files the declared bytes?The case manifest and repository hash ledger bind the reviewed files.Yes for byte identity; authenticity and scientific validity are separate.
Did the intended QE executable start and finish normally?Each declared raw pw.x output contains its program banner and normal-termination marker.Yes for those executions only.
Did the electronic solver converge?The declared outputs contain the recorded SCF-convergence markers.Yes for those fixed-geometry runs; this is not ionic convergence.
Did an ionic or cell optimization converge?No ionic or cell optimization is part of this fixed-geometry screen.Not applicable, not a pass.
Are the expected parsed artifacts present and tied to the raw outputs?The parser rebuilds the summary and FM mesh screen from the hash-bound outputs.Yes for the declared extraction.
Is the target observable numerically converged?The adjacent FM total-energy changes are compared with the declared tolerance.No: the declared FM k-mesh total-energy screen failed.
Is the result robust to model and method choices?No independent structure, functional, pseudopotential, or broader magnetic-state sensitivity test is declared.Not assessed.
What scientific claim is supported?The evidence documents a failed fixed-geometry teaching screen.No converged Fe ground-state or materials claim is supported.

A failure in model adequacy returns to A, method or numerical setup to B, reference-state choice to C, and observable-specific sampling to D. Do not promote a later row when an earlier required row is unresolved.

Purpose

This worked example audits a real adverse record rather than turning a successful marker into a success story. The committed bcc-fe-spin-qe case contains two attempts:

  • Attempt 01 failed in the Slurm/Open MPI launcher before PWSCF started.
  • Attempt 02 recorded four zero-exit QE 7.5 SCF stages with SCF and JOB DONE. markers.
  • The case still fails its predeclared fixed-geometry FM k-mesh total-energy convergence test.
  • No magnetic-ground-state conclusion is claimed because FM and non-spin-polarized candidates are not an exhaustive magnetic-state set.

The audit asks what each layer can support and stops at the first unresolved gate. It does not repair, rerun, or reinterpret the calculation.

Open the record

Work from the repository root and anchor the exact case:

pwd -P
case_root=examples/cases/bcc-fe-spin-qe
test -f "$case_root/manifest.json"
sha256sum -- "$case_root/manifest.json"

The path and hash identify bytes in this checkout. They do not prove that the manifest’s statements are correct. The companion independently recomputes every artifact size and SHA-256 declared inside the manifest before interpreting any result.

Read the case-level outcome before selecting attractive output lines:

head -n 80 -- "$case_root/manifest.json"
grep -En '"exit_code"|"status"|"claim_boundary"' \
  "$case_root/manifest.json" \
  "$case_root/derived/attempt-02-pmix/bcc-fe-spin-summary.json" \
  "$case_root/derived/attempt-02-pmix/fm-kmesh-screen.json"

This locates the recorded checks and claim boundary. It does not verify their arithmetic or internal consistency.

Inspect the four raw input/output/stderr triplets before invoking the companion. The commands below keep the input geometry, every Cartesian force component, the aggregate force, all three stress rows with printed units, SCF history, state diagnostics, and warnings visible:

attempt="$case_root/output/attempt-02-pmix"
cat -- "$attempt/run-status.json"
for stage in fm-k8 fm-k10 fm-k12 nm-k12; do
  input="$case_root/input/$stage.scf.in"
  out="$attempt/$stage.out"
  err="$attempt/$stage.err"
  printf '\n%s\n' "$stage"
  sed -n '/^ATOMIC_POSITIONS/,/^K_POINTS/p' "$input"
  test "$(grep -cF 'Program PWSCF v.' -- "$out")" -eq 1
  test "$(grep -cF 'JOB DONE.' -- "$out")" -eq 1
  grep -E '^[[:space:]]+convergence has been achieved in[[:space:]]+[0-9]+ iterations[[:space:]]*$' -- "$out" | tail -n 1
  grep -E '!.*total energy|the Fermi energy is|total magnetization|absolute magnetization' \
    -- "$out" | tail -n 8

  awk '
    /Forces acting on atoms/ {block=$0 ORS; inside=1; next}
    inside {block=block $0 ORS}
    inside && /Total force =/ {last=block; inside=0}
    END {if (last == "") exit 1; printf "%s", last}
  ' "$out"

  awk '
    /total[[:space:]]+stress/ {block=$0 ORS; rows=3; next}
    rows > 0 {block=block $0 ORS; rows--; if (rows == 0) last=block}
    END {if (last == "") exit 1; printf "%s", last}
  ' "$out"

  tail -n 40 -- "$err"
  grep -niE 'warning|error in routine|stopping|not converged|no convergence|segmentation|out of memory|killed' \
    -- "$out" "$err" || true
done

These fixed-geometry inputs have no if_pos columns and do not request ionic motion. Their Cartesian force and 3 x 3 stress values are diagnostics of the declared cell, not an ionic or pressure-convergence gate. The aggregate Total force is printed separately and never substitutes for component inspection.

Optional reproducibility audit

After inspecting the human-readable inputs, outputs, table, and failed criterion, execute the read-only audit:

python3 examples/practical-guides/qe_calculation_audit.py

The script reads the manifest, input files, both attempt records, four Attempt 02 stdout/stderr pairs, the derived candidate summary, and the FM mesh screen. It does not write a report file, regenerate a figure, invoke QE, contact Slurm, or alter the case.

Inspect and decide

Artifact identity

Every artifact listed in manifest.json is checked against its declared byte count and SHA-256. This covers inputs, environment, launch scripts, sanitized failure evidence, Attempt 02 outputs, derived JSON, and the original PNG.

Passing this check proves that the audit read the manifest-bound bytes. It does not prove that the raw uncommitted hostname-bearing stderr is available, that a pseudopotential body may be redistributed, or that the calculation is scientifically acceptable.

Termination and scheduler boundaries

Attempt 01 has zero-byte stdout and sanitized stderr stating that Open MPI lacked the required Slurm PMI support and aborted before MPI_Init. Its early-exit run-status.json is deliberately preserved with a trailing comma and is not valid JSON. These are launch-failure facts, not evidence about SCF behavior.

Attempt 02 records zero exit codes for fm-k8, fm-k10, fm-k12, and nm-k12. Each stdout has one Program PWSCF v.7.5 banner, one SCF-convergence marker, and one JOB DONE. marker; each stderr is empty. This supports recorded program and SCF completion for those four stages only.

The case manifest remains exit_code: 1 with completed_at: null. The recorded wrapper failure came from an initial parser expectation, while the child QE stages exited zero. A wrapper exit, scheduler state, and program exit must therefore remain separate fields.

SCF, energy, and Fermi evidence

The committed outputs report:

CandidateFinal total energy (Ry per Fe primitive cell)Fermi energy (eV)Recorded spin state
fm-k8-329.2661073917.4646spin-polarized FM seed
fm-k10-329.2672025817.4445spin-polarized FM seed
fm-k12-329.2671055817.4521spin-polarized FM seed
nm-k12-329.2252736217.5581non-spin-polarized candidate

The script checks these values against the hash-bound parsed summary. Their presence proves what QE printed for the declared fixed-geometry states. It does not establish cutoff, smearing, lattice, k-mesh, magnetic-state, or Fermi-level convergence. Fermi levels are not compared as independently meaningful absolute reference energies.

At the 12 x 12 x 12 mesh, the stored comparison is

E(nm-k12)−E(fm-k12)=0.04183196000002454 Ry=569.1528104936939 meV per Fe primitive cell.E(\text{nm-k12})-E(\text{fm-k12}) =0.04183196000002454\,\mathrm{Ry} =569.1528104936939\,\mathrm{meV\ per\ Fe\ primitive\ cell}.

This arithmetic supports a bounded difference between two declared candidates under one stored setup. Because the FM mesh gate fails and the candidate set excludes AFM, ferrimagnetic, noncollinear, SOC, structural, strain, defect, surface, and finite-temperature alternatives, it cannot identify the magnetic ground state or justify a general Fe conclusion.

Forces, stress, and coordinates

All four inputs request forces and stress. They use one Fe atom at fractional coordinates (0, 0, 0) in an ibrav = 3 primitive cell with celldm(1) = 5.4169 bohr. The companion parses the input coordinate unit and atom record, the final aggregate total-force line, and stress-block presence. The manual block above supplies the required component-level force and 3 x 3 stress-value inspection that the companion does not automate.

This verifies consistency between the audited input objects and the printed fixed-geometry diagnostics. A zero total force on this one-atom symmetry position does not prove a relaxed lattice, a global minimum, or dynamical stability. The stress is a diagnostic of this fixed cell, not an instruction to change the cell and not a pressure-convergence study.

Warnings and adverse text

The audit scans each Attempt 02 stdout for explicit warning, fatal-routine, nonconvergence, segmentation, out-of-memory, and killed-signal patterns, while retaining stderr as a separate artifact. No matching line is treated as only a pattern result; it is not proof that the run was numerically healthy.

Attempt 01’s launcher error remains adverse evidence even though the later attempt ran. A later successful launch does not erase the failed attempt or establish that the launcher combination is portable to another cluster.

Phonons and downstream artifacts

The case manifest contains no ph.x, dynamical-matrix, q2r.x, or matdyn.x artifact. The audit therefore reports phonons as NOT ASSESSED.

No total-energy, force, stress, magnetic-moment, or SCF marker can substitute for harmonic force constants or q-space coverage. This case cannot support a phonon frequency, dispersion, dynamical-stability, electron-phonon, or finite-temperature claim.

Numerical convergence and claim boundary

The predeclared FM adjacent energy changes are 0.0010951900000009118 Ry from the 8 x 8 x 8 mesh to 10 x 10 x 10 and 0.00009699999998247222 Ry from 10 x 10 x 10 to 12 x 12 x 12, against a tolerance of 0.0005 Ry.

The first change exceeds the tolerance, so the declared k-mesh total-energy convergence test fails. Artifact-identity, recorded-exit, SCF-marker, and expected-record checks pass within their stated scope; they do not override the failed numerical test. No broader material conclusion is claimed.

Do not read this series as a pass/fail number alone. Plot or tabulate the three FM energies against mesh density, look for monotonic or oscillatory behaviour, and ask whether the tested interval contains a stable tail under a predeclared observable-specific tolerance. The stored series does not establish that condition.

Read

The strongest supported statement is narrow: four declared QE 7.5 SCF stages completed and provide hash-bound energies, Fermi levels, forces, stresses, and FM moments for a fixed bcc Fe model; the stored FM/NM difference is reproducible from those records.

The strongest acceptance statement is adverse: the declared FM k-mesh total-energy screen failed, the case manifest remains incomplete, and no magnetic-ground-state or phonon conclusion is claimed. This is a useful audit result. Scientific validation does not require converting every case into a pass.

The conditional pass criterion is consistent with the recorded FAIL status: one adjacent energy change exceeds the tolerance. The raw values, tolerance, and failure decision are unchanged.

If it fails

If artifact hashes fail, stop before scientific interpretation and determine whether the path, checkout, manifest, or file bytes changed. Do not update a hash merely to make the audit pass.

If a program marker is missing, inspect scheduler exit, stdout, stderr, truncation, and expected downstream artifacts. Do not append JOB DONE. or discard the failed stage.

If an observable-specific gate fails, preserve the adverse series and decide whether a new, predeclared calculation is authorized. A denser mesh after seeing the result is new evidence, not a retroactive pass. This guide does not authorize a rerun, a new magnetic candidate set, a phonon calculation, or a changed acceptance threshold.

Next

Return to B and predeclare a controlled extension of the same fixed-geometry FM k-mesh series, holding the method, cutoff, smearing, and SCF settings fixed; then apply the same adjacent-change criterion to the extended series. If the iteration history itself is abnormal, start from Troubleshooting: SCF does not converge. A VASP, ABINIT, or CP2K user can use the Software Bridge to locate equivalent native outputs without treating parameter names as interchangeable. Until the test passes, retain the completed executions as evidence of a failed numerical screen and make no magnetic-ground-state claim.

Official sources

Ways to work: PythonQuantum ESPRESSO

Companion checked with: Python 3.12; Quantum ESPRESSO 7.5 committed-output format.

Reproducibility note

The companion material was checked with Python 3.12; Quantum ESPRESSO 7.5 committed-output format. It tests only the bounded software or analysis behaviour described here; it does not establish numerical convergence, model validity, or a material property.

The manifest records at least one failed check, so not every declared check passed. Inspect the failed evidence layer before using the case; an earlier program execution or analysis step may still have completed.

Open the exact case record or its manifest.