$npx -y skills add jinzhezenggroup/computational-chemistry-agent-skills --skill phonopyGeneral phonon-workflow skill built around phonopy, independent of force backend. USE WHEN you need to prepare finite-displacement phonon calculations, build force constants, and analyze phonon properties (band structure, DOS, thermal quantities) while obtaining forces from diffe
| 1 | # Phonopy (Backend-Agnostic) |
| 2 | |
| 3 | Use this skill as a **general phonon orchestration layer**. |
| 4 | |
| 5 | It treats force calculation as a pluggable backend step and focuses on `phonopy` data flow. |
| 6 | |
| 7 | ## Scope |
| 8 | |
| 9 | This skill should: |
| 10 | |
| 11 | - generate displacement supercells from a user-provided structure |
| 12 | - define and validate force-collection requirements |
| 13 | - build force constants from collected forces |
| 14 | - run phonon analysis (band, DOS, thermal properties) |
| 15 | - summarize assumptions and remaining decisions |
| 16 | |
| 17 | This skill should **not**: |
| 18 | |
| 19 | - assume a single force engine |
| 20 | - fabricate force data |
| 21 | - submit cluster jobs directly |
| 22 | |
| 23 | If execution/submission is required, hand off run steps to submission skills (for example `dpdisp-submit`) and backend-specific input skills. |
| 24 | |
| 25 | ## Hard requirement |
| 26 | |
| 27 | Phonon workflows require both: |
| 28 | |
| 29 | - a valid initial structure (unit cell / primitive context) |
| 30 | - force data on displaced supercells (or precomputed force constants) |
| 31 | |
| 32 | If either is missing, stop and ask for it. |
| 33 | |
| 34 | ## Backend abstraction |
| 35 | |
| 36 | Force provider may be one of: |
| 37 | |
| 38 | - DFT backend (for example VASP or QE) |
| 39 | - ML force field backend (for example DeePMD/LAMMPS) |
| 40 | |
| 41 | The role split should be: |
| 42 | |
| 43 | 1. `phonopy` skill: displacement generation, dataset/force-constant assembly, phonon analysis |
| 44 | 1. backend skill: compute forces for each displaced supercell |
| 45 | |
| 46 | ## Expected workflow |
| 47 | |
| 48 | 1. Read and validate initial structure. |
| 49 | 1. Confirm phonon objective (`band`, `dos`, `thermal`, combinations). |
| 50 | 1. Choose supercell and displacement settings. |
| 51 | 1. Generate displaced supercells (`phonopy -d` style). |
| 52 | 1. Route displaced structures to selected backend for force evaluation. |
| 53 | 1. Collect forces and build `FORCE_SETS` or force constants. |
| 54 | 1. Run requested phonon analysis and export outputs. |
| 55 | 1. Report assumptions, convergence caveats, and next steps. |
| 56 | |
| 57 | For concrete command patterns, see `references/commands-and-workflow.md`. |
| 58 | |
| 59 | ## Parameters to collect |
| 60 | |
| 61 | ### Must provide |
| 62 | |
| 63 | - initial structure file (placeholder examples like `structure.ext` mean real files such |
| 64 | as `POSCAR`, `.cif`, or other backend-compatible structure formats) |
| 65 | - backend choice for force evaluation |
| 66 | - supercell setting (matrix or size) |
| 67 | - displacement amplitude (`--amplitude` policy) |
| 68 | - target phonon outputs (`band`, `dos`, `thermal`) |
| 69 | |
| 70 | ### Usually should be explicit |
| 71 | |
| 72 | - primitive matrix choice |
| 73 | - symmetry tolerance settings |
| 74 | - q-point mesh for DOS/thermal calculations |
| 75 | - band path definition source (if band requested) |
| 76 | |
| 77 | ### Task-specific |
| 78 | |
| 79 | For `band`: |
| 80 | |
| 81 | - high-symmetry path definition |
| 82 | - number of points per segment |
| 83 | |
| 84 | For `dos`/`thermal`: |
| 85 | |
| 86 | - mesh density |
| 87 | - temperature range/step for thermal properties |
| 88 | |
| 89 | ## Required behavior |
| 90 | |
| 91 | 1. Validate structure periodicity and cell. |
| 92 | 1. Make backend boundary explicit before running force steps. |
| 93 | 1. Keep traceable mapping between each displacement and force file. |
| 94 | 1. Check force dataset completeness before force-constant build. |
| 95 | 1. Report non-analytic corrections / long-range settings status when relevant. |
| 96 | 1. Flag unresolved scientific choices instead of guessing silently. |
| 97 | |
| 98 | ## Defaulting policy |
| 99 | |
| 100 | Allowed only for low-risk defaults with explicit labels. |
| 101 | |
| 102 | Reasonable defaults: |
| 103 | |
| 104 | - finite-displacement workflow as baseline |
| 105 | - moderate displacement amplitude for first pass |
| 106 | - standard mesh/band resolution for exploratory analysis |
| 107 | |
| 108 | Do **not** silently invent: |
| 109 | |
| 110 | - backend force results |
| 111 | - production-level convergence settings |
| 112 | - band path conventions when crystal standard is unclear |
| 113 | |
| 114 | ## Expected output |
| 115 | |
| 116 | Provide: |
| 117 | |
| 118 | 1. generated displacement task layout |
| 119 | 1. force-data assembly status (`FORCE_SETS`/force constants) |
| 120 | 1. requested phonon outputs (band/DOS/thermal files) |
| 121 | 1. explicit assumptions and unresolved decisions |
| 122 | 1. handoff guidance if backend execution/submission is pending |
| 123 | |
| 124 | ## Common failure points |
| 125 | |
| 126 | - missing or inconsistent force files for displacements |
| 127 | - supercell too small for stable phonon results |
| 128 | - inconsistent units/conventions across backend outputs |
| 129 | - imaginary modes caused by insufficient convergence or setup choices |
| 130 | - unclear band path convention for non-standard cells |