Dft qe

From jinzhezenggroup/computational-chemistry-agent-skills · View interactive version

Dft qe is an AI agent skill from the GitHub repository jinzhezenggroup/computational-chemistry-agent-skills. Generate Quantum ESPRESSO DFT input tasks from a user-provided structure plus user-specified DFT settings. Use when the user wants to prepare QE calculations such as SCF, NSCF, relax, vc-relax, MD, bands, DOS, or phonons starting from a structure file or coordinates together with pseudopotentials, f

How to use this skill

Skill file

DFT with Quantum ESPRESSO

Use this skill to build a QE DFT task from a user-provided structure and DFT settings.

Scope

This skill should:

This skill should not:

If the user wants the task submitted, hand off to another skill such as dpdisp-submit after the QE task is generated.

Hard requirement

The user must provide a structure.

Do not generate a QE task without a user-provided structure source. If the structure is missing, stop and ask for it.

Structure input convention

Use this bundled example-plus-layout pattern as the reference:

Treat this as the canonical pattern for what the user is expected to provide and what this skill is expected to generate.

The structure format does not need to be fixed to xyz. If the user provides another reasonable atomistic structure format, convert or normalize it as needed. When format conversion is needed, use the dpdata-cli skill.

For periodic systems, ensure cell information is preserved. If a plain xyz file is used, cell data must be provided separately, for example through a CELL file.

For a concrete file-oriented workflow, see references/commands-and-workflow.md.

Expected workflow

  1. Start from a user-provided structure.
  2. Normalize the structure into the task layout if needed.
  3. Determine the target QE calculation type.
  4. Collect only the missing critical DFT parameters.
  5. Generate the QE input file.
  6. Place the generated task in a runnable task directory.
  7. If submission is requested, pass that directory to dpdisp-submit.

DFT parameters to collect

Must provide

Do not generate a formal QE task unless these are known or explicitly confirmed:

Usually should be explicit

These should normally be confirmed rather than guessed:

Task-specific additions

Also collect task-dependent parameters when relevant.

For relax / vc-relax:

For md:

For spin-polarized or magnetic systems:

For advanced workflows if explicitly requested:

Do not ask for everything at once; ask only for the missing essentials.

Required behavior

  1. Inspect the provided structure if accessible.
  2. Determine elements, cell information, and coordinate representation.
  3. If format normalization is needed, convert the structure using dpdata-cli.
  4. Confirm the QE task type.
  5. Gather only the missing critical DFT settings.
  6. Generate the QE input yourself.
  7. Explain assumptions clearly.
  8. Flag unresolved scientific choices instead of hiding them.
  9. Prepare the task directory so another skill can submit it.

Template pattern

Use the QE example input included in this repository:

assets/pw-water-0.in

as the reference pattern for how a QE task is organized and how the pw.x input is laid out.

In this workflow:

Do not hard-code the example chemistry. Reuse only the workflow pattern.

Defaulting policy

Allowed only for low-risk, clearly labeled assumptions.

Reasonable provisional defaults:

Do not silently invent:

Expected output

Provide:

  1. the full QE input file
  2. a short summary of the chosen settings
  3. explicit assumptions
  4. any decisions the user should still confirm
  5. the generated task directory or file set for the next skill
  6. if submission is requested, explicitly say the next step is dpdisp-submit

Minimal `pw.x` structure

&CONTROL
  calculation = 'scf'
  prefix = 'system'
  outdir = './'
/
&SYSTEM
  ibrav = 0
  nat = ...
  ntyp = ...
  ecutwfc = ...
  ecutrho = ...
/
&ELECTRONS
  conv_thr = 1.0d-8
/
ATOMIC_SPECIES
...
CELL_PARAMETERS angstrom
...
ATOMIC_POSITIONS angstrom
...
K_POINTS automatic
kx ky kz 0 0 0

Handoff rule

When the user asks to submit the generated QE task, do not implement submission logic here. Instead:

Common failure points

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.