Copy, point, inspect
Quick Reference
Change only OUT=..., run the block, and read the evidence it prints. These commands locate records; they do not declare a calculation accepted.
A readable file, a scheduler state, JOB DONE., an SCF marker, optimizer termination, numerical convergence, and scientific support are separate checks. Keep stdout, stderr, shell or scheduler exit status, exact input, software version, and parent-artifact identity together.
QE SCF quick check
The positive SCF marker is anchored to the complete QE 7.5 text shape observed in the published cases. Negative and fatal markers are searched separately so a negative sentence cannot be counted as success.
OUT=scf.out
test -r "$OUT" || { printf 'Cannot read %s\n' "$OUT" >&2; exit 1; }
printf 'PWSCF banners: %s\n' "$(grep -cF 'Program PWSCF v.' -- "$OUT" || true)"
printf 'JOB DONE markers: %s\n' "$(grep -Ec '^[[:space:]]*JOB DONE\.[[:space:]]*$' -- "$OUT" || true)"
printf 'SCF convergence markers: %s\n' "$(grep -Ec '^[[:space:]]+convergence has been achieved in[[:space:]]+[0-9]+ iterations[[:space:]]*$' -- "$OUT" || true)"
grep -E '^![[:space:]]+total energy[[:space:]]+=' -- "$OUT" | tail -n 1
grep -Ei 'the Fermi energy is' -- "$OUT" | tail -n 1 || true
grep -niE 'convergence NOT achieved|No convergence has been achieved|warning|error in routine|stopping|not converged|segmentation fault|out of memory|oom-kill|killed by signal' -- "$OUT" || trueRead next: one coherent run normally has one banner and one termination marker. Inspect the full iteration history, separate stderr and exit status before deciding execution completion. A reported SCF stop does not establish the lowest relevant state or convergence of the target observable.
QE relaxation quick check
This locates electronic stops, optimizer termination, the last complete force and stress blocks, final coordinates, and adverse text in one stdout file.
OUT=relax.out
test -r "$OUT" || { printf 'Cannot read %s\n' "$OUT" >&2; exit 1; }
printf 'PWSCF banners: %s\n' "$(grep -cF 'Program PWSCF v.' -- "$OUT" || true)"
printf 'JOB DONE markers: %s\n' "$(grep -Ec '^[[:space:]]*JOB DONE\.[[:space:]]*$' -- "$OUT" || true)"
printf 'SCF convergence markers: %s\n' "$(grep -Ec '^[[:space:]]+convergence has been achieved in[[:space:]]+[0-9]+ iterations[[:space:]]*$' -- "$OUT" || true)"
grep -E 'bfgs converged|End of BFGS Geometry Optimization|maximum number of steps' -- "$OUT" | tail -n 4 || true
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 == "") print "No complete force block found."; else 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 == "") print "No complete stress block found; stress is not assessed."; else printf "%s", last}
' "$OUT"
awk '
/Begin final coordinates/ {block=$0 ORS; inside=1; next}
inside {block=block $0 ORS}
inside && /End final coordinates/ {last=block; inside=0}
END {if (last == "") print "No complete final-coordinate block found."; else printf "%s", last}
' "$OUT"
grep -niE 'convergence NOT achieved|No convergence has been achieved|warning|error in routine|stopping|not converged|segmentation fault|out of memory|oom-kill|killed by signal' -- "$OUT" || trueRead next: use the exact input to identify if_pos masks or documented defaults. Apply the force gate to every free Cartesian component, not aggregate Total force. A stress gate also needs the declared active cell degrees of freedom and target. Reopen the final structure and run a fresh fixed-geometry SCF before using it as a downstream parent.
Job-output quick check
An absent or empty output can mean pending allocation, launch failure, wrong path, buffering, or a scheduler/storage problem. This block inspects the named file only; use the recorded job ID with the site's scheduler tools to determine current state.
OUT=slurm-job.out
test -e "$OUT" || { printf 'No output file exists yet: %s\n' "$OUT" >&2; exit 1; }
ls -lh -- "$OUT"
head -n 30 -- "$OUT"
tail -n 80 -- "$OUT"
grep -nE 'Program (PWSCF|PHONON|BANDS|DOS|PROJWFC|Q2R|MATDYN)|JOB DONE' -- "$OUT" || true
grep -niE 'error|failed|killed|timeout|time limit|preempt|segmentation fault|out of memory|oom-kill|MPI_ABORT|slurmstepd' -- "$OUT" || trueRead next: no program banner means no evidence that QE launched. Preserve the job script, submission receipt, stdout, stderr, exit record, resource record, working directory, and software environment before retrying.
Output-artifact quick check
Start from the stage output that should have produced the missing object. Inventory sibling files without guessing that the newest or largest file is the right parent.
OUT=bands.out
test -r "$OUT" || { printf 'Cannot read %s\n' "$OUT" >&2; exit 1; }
DIR=$(dirname -- "$OUT")
printf 'Output bytes and identity\n'
wc -c -- "$OUT"
sha256sum -- "$OUT"
printf '\nFiles beside the selected output\n'
find "$DIR" -maxdepth 2 -type f -printf '%12s %p\n' | sort
printf '\nZero-byte files\n'
find "$DIR" -maxdepth 2 -type f -size 0 -printRead next: compare the inventory with the executable's official output contract and the intended stage manifest. Existence, size, timestamp, and hash establish different facts; none proves semantic completeness or correct lineage.
Bands / DOS consistency quick check
Point OUT to one bands or DOS stage in a directory that retains its sibling logs and data files. The block exposes program identities, termination markers, energy-reference text, band warnings, and candidate data artifacts.
OUT=bands.out
test -r "$OUT" || { printf 'Cannot read %s\n' "$OUT" >&2; exit 1; }
DIR=$(dirname -- "$OUT")
grep -HnE 'Program (PWSCF|BANDS|DOS|PROJWFC)|JOB DONE|Fermi energy|highest occupied' -- "$DIR"/*.out 2>/dev/null || true
grep -HniE 'warning|error in routine|c_bands|not converged|no convergence|stopping' -- "$DIR"/*.out 2>/dev/null || true
find "$DIR" -maxdepth 2 -type f \( -name '*.bands*' -o -name '*.dos' -o -name '*.dos.dat' -o -name '*.pdos*' -o -name '*projwfc*' \) -printf '%12s %p\n' | sortRead next: verify that SCF, dense NSCF, bands.x, dos.x, and projwfc.x objects come from the intended compatible parent chain. Align the same energy reference before comparing plots. A selected high-symmetry path and an integrated DOS answer different sampling questions.
QE phonon quick check
This locates the PHONON program identity, requested q points, printed frequencies, termination, and adverse text.
OUT=ph.out
test -r "$OUT" || { printf 'Cannot read %s\n' "$OUT" >&2; exit 1; }
printf 'PHONON banners: %s\n' "$(grep -cF 'Program PHONON v.' -- "$OUT" || true)"
printf 'JOB DONE markers: %s\n' "$(grep -Ec '^[[:space:]]*JOB DONE\.[[:space:]]*$' -- "$OUT" || true)"
grep -nE 'Calculation of q[[:space:]]*=|freq[[:space:]]*\(' -- "$OUT" || true
grep -niE 'convergence NOT achieved|No convergence has been achieved|warning|error in routine|stopping|not converged|segmentation fault|out of memory|oom-kill|killed by signal' -- "$OUT" || trueRead next: preserve negative or imaginary modes. Check the electronic parent, residual force and stress, response convergence, q coverage or supercell, acoustic-sum treatment, eigenvectors, and numerical series before calling a mode physical or numerical.