QE Workflows
This skill handles practical Quantum ESPRESSO setup, review, and recovery. Use it when the request is clearly about pw.x, dos.x, bands.x, .UPF management, or QE stage orchestration.
When to use
Use this skill when the user mentions or implies:
Quantum ESPRESSO, QE, pw.x, dos.x, bands.x, projwfc.x, .UPF
scf, relax, vc-relax, nscf, DOS, band structure, restart, or scheduler scripts in QE
ecutwfc, ecutrho, occupations, degauss, prefix, pseudo_dir, outdir, or scratch-tree issues
Operating stance
Prioritize missing information in this order:
- task:
scf, relax, dos, band, or restart
- pseudo family and exchange-correlation consistency
- occupations, smearing, and whether the system is metallic or not
- parent-child file flow through
prefix, pseudo_dir, and outdir
- scheduler and MPI launcher
Never silently invent:
.UPF filenames, versions, or pseudo families
- whether a system should be fixed occupations or smearing when the class is unclear
- a band path without a real source
- whether missing QE scratch data can be reconstructed when it is gone
Workflow
1. Classify the request
- Setup: generate or edit QE inputs and stage layout.
- Review: inspect an existing QE directory and summarize status.
- Recovery: identify the likely failure mode and recommend the smallest safe restart.
2. Gather the minimum viable context
Before recommending settings, establish:
- structure source and whether the system is bulk, slab, or molecule-in-box
- target observable: relaxed geometry, total energy, DOS, or band structure
- pseudo policy and whether a standard pseudo family already exists
- whether the system is metallic, insulating, magnetic, or unknown
- scheduler environment and scratch handling
3. Use the bundled helpers
scripts/make_qe_inputs.py
Generate conservative scf, relax, dos, projwfc, or band workflow skeletons.
scripts/check_qe_job.py
Check one QE directory or staged workflow root for missing inputs and pseudo or restart dependencies.
scripts/summarize_qe_run.py
Summarize a QE run using the input and pw.x output.
scripts/recommend_qe_recovery.py
Turn incomplete or failed QE runs into concrete restart and recovery guidance.
scripts/export_status_report.py
Export a shareable markdown status report from a QE run or staged workflow.
scripts/export_input_suggestions.py
Export conservative QE input snippets based on detected recovery patterns.
4. Load focused references only when needed
- QE workflow and file guidance:
references/qe.md
- convergence planning:
references/convergence.md
- QE failures and restarts:
references/failure-modes.md
- scheduler notes:
references/schedulers.md
5. Deliver an auditable answer
Whenever you recommend edits or restarts, include:
- the assumed task and parent-child stage relationship
- unresolved physics choices the user must still confirm
- exact files changed or generated
- what scratch or output artifacts must exist before the next stage can run
Guardrails
- DOS and band workflows are dependent child calculations, not first calculations.
- Keep
prefix, pseudo_dir, and outdir consistent across related stages.
- If the workflow depends on scratch data that is gone, say plainly that the parent stage may need to rerun.
- If the band path is unresolved, say so instead of fabricating one.
Quality bar
- Prefer conservative defaults over flashy guesses.
- Distinguish QE syntax advice from material-specific physics advice.
- Diagnose from the actual logs when logs are available.
1---2name: qe-workflows3description: Use when the task involves Quantum ESPRESSO workflows, including pw.x input preparation, scf, relax, dos.x, projwfc.x, and bands.x setups, pseudopotential and scratch layout checks, restart handling, pw.x output review, convergence checks, and Slurm or PBS job scripts.4---56# QE Workflows78This skill handles practical Quantum ESPRESSO setup, review, and recovery. Use it when the request is clearly about `pw.x`, `dos.x`, `bands.x`, `.UPF` management, or QE stage orchestration.910## When to use1112Use this skill when the user mentions or implies:1314- `Quantum ESPRESSO`, `QE`, `pw.x`, `dos.x`, `bands.x`, `projwfc.x`, `.UPF`15- `scf`, `relax`, `vc-relax`, `nscf`, DOS, band structure, restart, or scheduler scripts in QE16- `ecutwfc`, `ecutrho`, `occupations`, `degauss`, `prefix`, `pseudo_dir`, `outdir`, or scratch-tree issues1718## Operating stance1920Prioritize missing information in this order:21221. task: `scf`, `relax`, `dos`, `band`, or restart232. pseudo family and exchange-correlation consistency243. occupations, smearing, and whether the system is metallic or not254. parent-child file flow through `prefix`, `pseudo_dir`, and `outdir`265. scheduler and MPI launcher2728Never silently invent:2930- `.UPF` filenames, versions, or pseudo families31- whether a system should be fixed occupations or smearing when the class is unclear32- a band path without a real source33- whether missing QE scratch data can be reconstructed when it is gone3435## Workflow3637### 1. Classify the request3839- **Setup**: generate or edit QE inputs and stage layout.40- **Review**: inspect an existing QE directory and summarize status.41- **Recovery**: identify the likely failure mode and recommend the smallest safe restart.4243### 2. Gather the minimum viable context4445Before recommending settings, establish:4647- structure source and whether the system is bulk, slab, or molecule-in-box48- target observable: relaxed geometry, total energy, DOS, or band structure49- pseudo policy and whether a standard pseudo family already exists50- whether the system is metallic, insulating, magnetic, or unknown51- scheduler environment and scratch handling5253### 3. Use the bundled helpers5455- `scripts/make_qe_inputs.py`56 Generate conservative `scf`, `relax`, `dos`, `projwfc`, or `band` workflow skeletons.57- `scripts/check_qe_job.py`58 Check one QE directory or staged workflow root for missing inputs and pseudo or restart dependencies.59- `scripts/summarize_qe_run.py`60 Summarize a QE run using the input and `pw.x` output.61- `scripts/recommend_qe_recovery.py`62 Turn incomplete or failed QE runs into concrete restart and recovery guidance.63- `scripts/export_status_report.py`64 Export a shareable markdown status report from a QE run or staged workflow.65- `scripts/export_input_suggestions.py`66 Export conservative QE input snippets based on detected recovery patterns.6768### 4. Load focused references only when needed6970- QE workflow and file guidance: `references/qe.md`71- convergence planning: `references/convergence.md`72- QE failures and restarts: `references/failure-modes.md`73- scheduler notes: `references/schedulers.md`7475### 5. Deliver an auditable answer7677Whenever you recommend edits or restarts, include:7879- the assumed task and parent-child stage relationship80- unresolved physics choices the user must still confirm81- exact files changed or generated82- what scratch or output artifacts must exist before the next stage can run8384## Guardrails8586- DOS and band workflows are dependent child calculations, not first calculations.87- Keep `prefix`, `pseudo_dir`, and `outdir` consistent across related stages.88- If the workflow depends on scratch data that is gone, say plainly that the parent stage may need to rerun.89- If the band path is unresolved, say so instead of fabricating one.9091## Quality bar9293- Prefer conservative defaults over flashy guesses.94- Distinguish QE syntax advice from material-specific physics advice.95- Diagnose from the actual logs when logs are available.