# Qe Workflows

> 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.

- **Type:** Skill
- **Install:** `agentstack add skill-chatmaterials-qe-workflows-qe-workflows`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [chatmaterials](https://agentstack.voostack.com/s/chatmaterials)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [chatmaterials](https://github.com/chatmaterials)
- **Source:** https://github.com/chatmaterials/qe-workflows
- **Website:** https://chatmaterials.github.io/#qe-workflows

## Install

```sh
agentstack add skill-chatmaterials-qe-workflows-qe-workflows
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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:

1. task: `scf`, `relax`, `dos`, `band`, or restart
2. pseudo family and exchange-correlation consistency
3. occupations, smearing, and whether the system is metallic or not
4. parent-child file flow through `prefix`, `pseudo_dir`, and `outdir`
5. 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.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [chatmaterials](https://github.com/chatmaterials)
- **Source:** [chatmaterials/qe-workflows](https://github.com/chatmaterials/qe-workflows)
- **License:** MIT
- **Homepage:** https://chatmaterials.github.io/#qe-workflows

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-chatmaterials-qe-workflows-qe-workflows
- Seller: https://agentstack.voostack.com/s/chatmaterials
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
