$npx -y skills add jinzhezenggroup/computational-chemistry-agent-skills --skill dft-qeGenerate 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
| 1 | # DFT with Quantum ESPRESSO |
| 2 | |
| 3 | Use this skill to **build a QE DFT task** from a user-provided structure and DFT settings. |
| 4 | |
| 5 | ## Scope |
| 6 | |
| 7 | This skill should: |
| 8 | |
| 9 | - require a user-provided structure |
| 10 | - read or normalize the structure input |
| 11 | - identify the target calculation type |
| 12 | - collect the minimum required DFT settings |
| 13 | - generate the QE input file |
| 14 | - organize the task directory in a way that can be handed off to a submission skill |
| 15 | - state assumptions and unresolved choices |
| 16 | |
| 17 | This skill should **not**: |
| 18 | |
| 19 | - submit jobs |
| 20 | - manage schedulers |
| 21 | - handle remote execution |
| 22 | - invent critical scientific parameters |
| 23 | |
| 24 | If the user wants the task submitted, hand off to another skill such as `dpdisp-submit` after the QE task is generated. |
| 25 | |
| 26 | ## Hard requirement |
| 27 | |
| 28 | The user must provide a structure. |
| 29 | |
| 30 | Do not generate a QE task without a user-provided structure source. If the structure is missing, stop and ask for it. |
| 31 | |
| 32 | ## Structure input convention |
| 33 | |
| 34 | Use this bundled example-plus-layout pattern as the reference: |
| 35 | |
| 36 | - generated QE input example: `assets/pw-water-0.in` |
| 37 | - user-provided structure staging pattern: `openclaw_input/` containing files such as `structure.xyz` and `CELL` |
| 38 | |
| 39 | Treat this as the canonical pattern for what the user is expected to provide and what this skill is expected to generate. |
| 40 | |
| 41 | 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. |
| 42 | |
| 43 | 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. |
| 44 | |
| 45 | For a concrete file-oriented workflow, see `references/commands-and-workflow.md`. |
| 46 | |
| 47 | ## Expected workflow |
| 48 | |
| 49 | 1. Start from a user-provided structure. |
| 50 | 1. Normalize the structure into the task layout if needed. |
| 51 | 1. Determine the target QE calculation type. |
| 52 | 1. Collect only the missing critical DFT parameters. |
| 53 | 1. Generate the QE input file. |
| 54 | 1. Place the generated task in a runnable task directory. |
| 55 | 1. If submission is requested, pass that directory to `dpdisp-submit`. |
| 56 | |
| 57 | ## DFT parameters to collect |
| 58 | |
| 59 | ### Must provide |
| 60 | |
| 61 | Do not generate a formal QE task unless these are known or explicitly confirmed: |
| 62 | |
| 63 | - `calculation` |
| 64 | - `input_dft` |
| 65 | - `ecutwfc` |
| 66 | - `pseudo_dir` |
| 67 | - pseudopotential file for each element |
| 68 | |
| 69 | ### Usually should be explicit |
| 70 | |
| 71 | These should normally be confirmed rather than guessed: |
| 72 | |
| 73 | - `vdw_corr` when dispersion may matter |
| 74 | - `ecutrho` when relevant to the pseudopotential family or workflow |
| 75 | - `K_POINTS` setting, for example `gamma` or an automatic mesh |
| 76 | - occupation / smearing settings for metallic or ambiguous systems |
| 77 | - `conv_thr` |
| 78 | - `electron_maxstep` |
| 79 | |
| 80 | ### Task-specific additions |
| 81 | |
| 82 | Also collect task-dependent parameters when relevant. |
| 83 | |
| 84 | For `relax` / `vc-relax`: |
| 85 | |
| 86 | - `forc_conv_thr` |
| 87 | - `etot_conv_thr` |
| 88 | - `cell_dofree` for `vc-relax` |
| 89 | |
| 90 | For `md`: |
| 91 | |
| 92 | - `nstep` |
| 93 | - `dt` |
| 94 | - `ion_temperature` |
| 95 | - `tempw` |
| 96 | - `ion_dynamics` |
| 97 | |
| 98 | For spin-polarized or magnetic systems: |
| 99 | |
| 100 | - `nspin` |
| 101 | - `starting_magnetization` |
| 102 | - charge or spin-related settings if requested |
| 103 | |
| 104 | For advanced workflows if explicitly requested: |
| 105 | |
| 106 | - Hubbard U settings |
| 107 | - hybrid-functional settings |
| 108 | - electric field settings such as `edir`, `emaxpos`, or related controls |
| 109 | |
| 110 | Do not ask for everything at once; ask only for the missing essentials. |
| 111 | |
| 112 | ## Required behavior |
| 113 | |
| 114 | 1. Inspect the provided structure if accessible. |
| 115 | 1. Determine elements, cell information, and coordinate representation. |
| 116 | 1. If format normalization is needed, convert the structure using `dpdata-cli`. |
| 117 | 1. Confirm the QE task type. |
| 118 | 1. Gather only the missing critical DFT settings. |
| 119 | 1. Generate the QE input yourself. |
| 120 | 1. Explain assumptions clearly. |
| 121 | 1. Flag unresolved scientific choices instead of hiding them. |
| 122 | 1. Prepare the task directory so another skill can submit it. |
| 123 | |
| 124 | ## Template pattern |
| 125 | |
| 126 | Use the QE example input included in this repository: |
| 127 | |
| 128 | `assets/pw-water-0.in` |
| 129 | |
| 130 | as the reference pattern for how a QE task is organized and how the `pw.x` input is laid out. |
| 131 | |
| 132 | In this workflow: |
| 133 | |
| 134 | - the user provides the structure in `openclaw_input`-style form |
| 135 | - this skill generate |