$npx -y skills add jinzhezenggroup/computational-chemistry-agent-skills --skill dpgen-simplifyPrepare, explain, validate, and run DP-GEN simplify workflows for reducing repeated or redundant DeepMD datasets. Use when the user wants to generate or modify param.json and machine.json, run dpgen simplify param.json machine.json, organize repeated simplify experiments, o
| 1 | # DP-GEN Simplify |
| 2 | |
| 3 | Use this skill when the user wants to prepare, explain, validate, or execute the `dpgen simplify` workflow. |
| 4 | |
| 5 | This skill is for dataset simplification workflows where the user already has candidate data in DeepMD-compatible format and wants to reduce repeated or redundant structures through iterative selection. |
| 6 | |
| 7 | ## Core Rule (Critical) |
| 8 | |
| 9 | DP-GEN simplify always uses **two parameter classes** and therefore **two JSON files**: |
| 10 | |
| 11 | - **Workflow parameters** -> `param.json` |
| 12 | - **Execution / machine parameters** -> `machine.json` |
| 13 | |
| 14 | Run exactly: |
| 15 | |
| 16 | ```bash |
| 17 | dpgen simplify param.json machine.json |
| 18 | ``` |
| 19 | |
| 20 | Environment boundary rule: |
| 21 | |
| 22 | - Outer layer: run `dpgen simplify param.json machine.json` in an activated environment where `dpgen --version` works. |
| 23 | - Inner layer: for scheduler stages, explicitly activate runtime in `resources.source_list` on the server side. |
| 24 | |
| 25 | ## Agent responsibilities |
| 26 | |
| 27 | When using this skill, the agent should: |
| 28 | |
| 29 | 1. confirm that the task is a simplify workflow |
| 30 | 1. check whether existing configs or templates are already available |
| 31 | 1. collect only the missing dataset, training, FP, and machine inputs |
| 32 | 1. generate or patch `param.json` |
| 33 | 1. generate or patch `machine.json` |
| 34 | 1. explain important simplify parameters in plain language when asked |
| 35 | 1. validate the workflow before execution |
| 36 | 1. provide the exact command for running simplify |
| 37 | 1. if requested, help structure repeated experiments |
| 38 | 1. after execution, summarize outputs and next inspection targets |
| 39 | |
| 40 | ## Working policy |
| 41 | |
| 42 | ### 1. Ask only for missing inputs |
| 43 | |
| 44 | Do not ask the user for everything if part of the configuration is already available. |
| 45 | |
| 46 | If the user already provides: |
| 47 | |
| 48 | - a partial `param.json` |
| 49 | - a partial `machine.json` |
| 50 | - a known training template |
| 51 | - a known cluster template |
| 52 | |
| 53 | then patch those files instead of rebuilding everything from scratch. |
| 54 | |
| 55 | ### 2. Preserve the user's scientific choices |
| 56 | |
| 57 | Do not silently change: |
| 58 | |
| 59 | - descriptor family |
| 60 | - fitting net structure |
| 61 | - fp backend |
| 62 | - trust thresholds |
| 63 | - `type_map` ordering |
| 64 | |
| 65 | If a value looks scientifically questionable, explain the concern instead of silently replacing it. |
| 66 | |
| 67 | ### 3. Keep local and scheduler execution explicit |
| 68 | |
| 69 | If the user wants local execution, produce local-friendly commands. |
| 70 | |
| 71 | If the user wants scheduler execution, produce scheduler-friendly commands and keep queue, partition, and resource requests explicit. |
| 72 | |
| 73 | Do not invent scheduler module names or executable paths. |
| 74 | |
| 75 | ### 4. Do not invent environment activation commands |
| 76 | |
| 77 | If the user already has a working activation command such as: |
| 78 | |
| 79 | - `conda activate ...` |
| 80 | - `module load ...` |
| 81 | - `source ...` |
| 82 | |
| 83 | reuse it exactly. |
| 84 | |
| 85 | If execution is requested and the activation method is unknown, ask the user for the precise activation command. |
| 86 | |
| 87 | Do not guess conda environment names, module names, or site-specific paths. |
| 88 | |
| 89 | ### 4.1 Outer launcher policy |
| 90 | |
| 91 | Use an activated DP-GEN environment and verify with: |
| 92 | |
| 93 | ```bash |
| 94 | dpgen --version |
| 95 | ``` |
| 96 | |
| 97 | Do not start simplify from a shell where `dpgen` is unavailable. |
| 98 | |
| 99 | ### 4.2 Outer vs inner runtime boundaries (critical) |
| 100 | |
| 101 | Treat simplify execution as two separate environment layers: |
| 102 | |
| 103 | 1. Outer layer: the shell that launches `dpgen simplify param.json machine.json` (must have `dpgen` in PATH) |
| 104 | 1. Inner layer: stage tasks dispatched by DP-GEN (`train` / `model_devi` / `fp`) on server/runtime side |
| 105 | |
| 106 | Even if the outer layer is correct, inner stage tasks still need explicit runtime setup in `machine.json`. |
| 107 | Do not assume the outer shell environment will be inherited by dispatched stage jobs. |
| 108 | For scheduler-style execution, `resources.source_list` must explicitly activate the required runtime environment. |
| 109 | |
| 110 | ### 5. Prefer reproducible output layout |
| 111 | |
| 112 | When generating a simplify workflow, keep files organized and predictable. |
| 113 | |
| 114 | Recommended structure: |
| 115 | |
| 116 | ```text |
| 117 | project/ |
| 118 | ├── param.json |
| 119 | ├── machine.json |
| 120 | ├── run.sh |
| 121 | ├── logs/ |
| 122 | └── summary/ |
| 123 | ``` |
| 124 | |
| 125 | For repeated experiments: |
| 126 | |
| 127 | ```text |
| 128 | project/ |
| 129 | ├── base/ |
| 130 | ├── exp_01/ |
| 131 | ├── exp_02/ |
| 132 | ├── exp_03/ |
| 133 | └── summary/ |
| 134 | ``` |
| 135 | |
| 136 | ## Minimum required inputs |
| 137 | |
| 138 | Collect the following information before generating files. |
| 139 | |
| 140 | ### Dataset information |
| 141 | |
| 142 | - `pick_data` |
| 143 | - `sys_configs` |
| 144 | - `init_data_prefix` |
| 145 | - `init_data_sys` |
| 146 | - `sys_bat |