@delta-infra/cli 1.1.13 → 1.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +493 -493
- package/checksums.txt +5 -5
- package/package.json +1 -1
- package/scripts/install-wizard.js +701 -701
- package/scripts/install.js +442 -442
- package/scripts/run.js +65 -65
- package/skills/delta-sandbox/SKILL.md +386 -386
- package/skills/delta-sandbox/agents/openai.yaml +4 -4
- package/skills/delta-sandbox/references/commands.md +58 -58
- package/skills/delta-sandbox/references/lifecycle.md +100 -100
- package/skills/delta-sandbox/references/recipes.md +138 -138
- package/skills/delta-science/AGENTS.md +47 -47
- package/skills/delta-science/SKILL.md +182 -174
- package/skills/delta-science/agents/openai.yaml +4 -4
- package/skills/delta-science/references/antbo.md +100 -100
- package/skills/delta-science/references/delta-bo.md +89 -89
- package/skills/delta-science/references/gsasii.md +116 -116
- package/skills/delta-science/references/lammps.md +66 -66
- package/skills/delta-science/references/ldm-bo.md +129 -129
- package/skills/delta-science/references/materials-design.md +118 -118
- package/skills/delta-science/references/pubchem.md +126 -126
- package/skills/delta-science/references/pymatgen.md +68 -68
- package/skills/delta-science/references/qe.md +125 -125
- package/skills/delta-science/references/rdkit.md +138 -138
- package/skills/delta-science/references/strbo.md +87 -87
- package/skills/delta-science/references/synbo.md +198 -198
- package/skills/delta-science/scripts/catalog.py +92 -92
- package/skills/delta-science/scripts/generated_catalog.py +69 -69
- package/skills/delta-science/scripts/invoke.py +346 -346
- package/skills/delta-shared/SKILL.md +111 -111
- package/skills/delta-shared/agents/openai.yaml +4 -4
- package/skills/manifest.json +19 -19
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
# Delta-BO 详细规则
|
|
2
|
-
|
|
3
|
-
所有在线调用直接使用 `delta-cli science invoke`,tool 固定为 `delta-bo`。当前 CLI catalog 只暴露
|
|
4
|
-
`commands` 和 `generate`;禁止根据旧 HTTP 文档猜测或直连 stateful command API。
|
|
5
|
-
|
|
6
|
-
## commands
|
|
7
|
-
|
|
8
|
-
情景:用户要求查看当前部署支持的 Delta-BO 命令。
|
|
9
|
-
|
|
10
|
-
```text
|
|
11
|
-
delta-cli science invoke --tool delta-bo --endpoint commands
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
无 body。只报告当前业务响应中的命令列表,不从历史文档补全。
|
|
15
|
-
|
|
16
|
-
## generate
|
|
17
|
-
|
|
18
|
-
情景:针对数值、整数或分类实验变量生成随机搜索或贝叶斯优化建议。
|
|
19
|
-
|
|
20
|
-
无真实历史,或历史少于 5 条且用户没有明确要求 BO 时,使用有界随机搜索:
|
|
21
|
-
|
|
22
|
-
```json
|
|
23
|
-
{
|
|
24
|
-
"params": [
|
|
25
|
-
{"name": "x", "type": "numeric", "low": 0.0, "high": 1.0}
|
|
26
|
-
],
|
|
27
|
-
"num_suggestions": 3,
|
|
28
|
-
"algorithm": "random-search",
|
|
29
|
-
"seed": 42
|
|
30
|
-
}
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
有真实历史且用户明确要求 BO 时,可以使用:
|
|
34
|
-
|
|
35
|
-
```json
|
|
36
|
-
{
|
|
37
|
-
"params": [
|
|
38
|
-
{"name": "temperature", "type": "numeric", "low": 20.0, "high": 120.0},
|
|
39
|
-
{"name": "catalyst", "type": "categorical", "choices": ["A", "B", "C"]}
|
|
40
|
-
],
|
|
41
|
-
"objectives": [{"name": "yield", "minimize": false}],
|
|
42
|
-
"num_suggestions": 2,
|
|
43
|
-
"algorithm": "bo",
|
|
44
|
-
"model": {"name": "gp", "min_samples": 2, "train_steps": 50},
|
|
45
|
-
"acq_target": {"name": "ucb", "beta": 2.0},
|
|
46
|
-
"solver": {"name": "ga", "pop_size": 40, "n_gen": 10},
|
|
47
|
-
"histories": {
|
|
48
|
-
"decisions": [
|
|
49
|
-
{"temperature": 40.0, "catalyst": "A"},
|
|
50
|
-
{"temperature": 80.0, "catalyst": "B"}
|
|
51
|
-
],
|
|
52
|
-
"observations": [
|
|
53
|
-
{"yield": 0.42},
|
|
54
|
-
{"yield": 0.61}
|
|
55
|
-
]
|
|
56
|
-
},
|
|
57
|
-
"seed": 7
|
|
58
|
-
}
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
参数类型仅支持 `numeric`、`integer`、`categorical`。优先使用 object-form history,
|
|
62
|
-
避免数组列顺序歧义。不得编造 observation、目标值或所谓最优点。
|
|
63
|
-
|
|
64
|
-
可选去重与约束:
|
|
65
|
-
|
|
66
|
-
```json
|
|
67
|
-
{
|
|
68
|
-
"diversity": {
|
|
69
|
-
"deduplicate": true,
|
|
70
|
-
"min_numeric_distance": {"temperature": 5.0},
|
|
71
|
-
"prefer_unique_categories": true
|
|
72
|
-
},
|
|
73
|
-
"constraints": [
|
|
74
|
-
{"type": "unique_batch"},
|
|
75
|
-
{"type": "avoid_seen_decisions"}
|
|
76
|
-
]
|
|
77
|
-
}
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
只报告业务响应的 `suggestions`、`suggestion_metadata`、`warnings`、
|
|
81
|
-
`generated_candidate_count` 和 `diversity` 中实际存在的字段。空 suggestions 或失败
|
|
82
|
-
不得用本地 GP、UCB 或随机数替代。
|
|
83
|
-
|
|
84
|
-
## 已知但未暴露的旧能力
|
|
85
|
-
|
|
86
|
-
旧服务曾包含 session、space、objective、policy、suggest、observe、loop、status、
|
|
87
|
-
best 等有状态命令,但它们不是当前 Delta CLI operation。本 Skill 只保留这条能力
|
|
88
|
-
边界,不保留 URL 或 curl 示例,也不执行这些操作。需要扩展时,先由 Science Server
|
|
89
|
-
暴露 operation 和请求 schema,再更新本 reference。
|
|
1
|
+
# Delta-BO 详细规则
|
|
2
|
+
|
|
3
|
+
所有在线调用直接使用 `delta-cli science invoke`,tool 固定为 `delta-bo`。当前 CLI catalog 只暴露
|
|
4
|
+
`commands` 和 `generate`;禁止根据旧 HTTP 文档猜测或直连 stateful command API。
|
|
5
|
+
|
|
6
|
+
## commands
|
|
7
|
+
|
|
8
|
+
情景:用户要求查看当前部署支持的 Delta-BO 命令。
|
|
9
|
+
|
|
10
|
+
```text
|
|
11
|
+
delta-cli science invoke --tool delta-bo --endpoint commands
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
无 body。只报告当前业务响应中的命令列表,不从历史文档补全。
|
|
15
|
+
|
|
16
|
+
## generate
|
|
17
|
+
|
|
18
|
+
情景:针对数值、整数或分类实验变量生成随机搜索或贝叶斯优化建议。
|
|
19
|
+
|
|
20
|
+
无真实历史,或历史少于 5 条且用户没有明确要求 BO 时,使用有界随机搜索:
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"params": [
|
|
25
|
+
{"name": "x", "type": "numeric", "low": 0.0, "high": 1.0}
|
|
26
|
+
],
|
|
27
|
+
"num_suggestions": 3,
|
|
28
|
+
"algorithm": "random-search",
|
|
29
|
+
"seed": 42
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
有真实历史且用户明确要求 BO 时,可以使用:
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"params": [
|
|
38
|
+
{"name": "temperature", "type": "numeric", "low": 20.0, "high": 120.0},
|
|
39
|
+
{"name": "catalyst", "type": "categorical", "choices": ["A", "B", "C"]}
|
|
40
|
+
],
|
|
41
|
+
"objectives": [{"name": "yield", "minimize": false}],
|
|
42
|
+
"num_suggestions": 2,
|
|
43
|
+
"algorithm": "bo",
|
|
44
|
+
"model": {"name": "gp", "min_samples": 2, "train_steps": 50},
|
|
45
|
+
"acq_target": {"name": "ucb", "beta": 2.0},
|
|
46
|
+
"solver": {"name": "ga", "pop_size": 40, "n_gen": 10},
|
|
47
|
+
"histories": {
|
|
48
|
+
"decisions": [
|
|
49
|
+
{"temperature": 40.0, "catalyst": "A"},
|
|
50
|
+
{"temperature": 80.0, "catalyst": "B"}
|
|
51
|
+
],
|
|
52
|
+
"observations": [
|
|
53
|
+
{"yield": 0.42},
|
|
54
|
+
{"yield": 0.61}
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"seed": 7
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
参数类型仅支持 `numeric`、`integer`、`categorical`。优先使用 object-form history,
|
|
62
|
+
避免数组列顺序歧义。不得编造 observation、目标值或所谓最优点。
|
|
63
|
+
|
|
64
|
+
可选去重与约束:
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"diversity": {
|
|
69
|
+
"deduplicate": true,
|
|
70
|
+
"min_numeric_distance": {"temperature": 5.0},
|
|
71
|
+
"prefer_unique_categories": true
|
|
72
|
+
},
|
|
73
|
+
"constraints": [
|
|
74
|
+
{"type": "unique_batch"},
|
|
75
|
+
{"type": "avoid_seen_decisions"}
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
只报告业务响应的 `suggestions`、`suggestion_metadata`、`warnings`、
|
|
81
|
+
`generated_candidate_count` 和 `diversity` 中实际存在的字段。空 suggestions 或失败
|
|
82
|
+
不得用本地 GP、UCB 或随机数替代。
|
|
83
|
+
|
|
84
|
+
## 已知但未暴露的旧能力
|
|
85
|
+
|
|
86
|
+
旧服务曾包含 session、space、objective、policy、suggest、observe、loop、status、
|
|
87
|
+
best 等有状态命令,但它们不是当前 Delta CLI operation。本 Skill 只保留这条能力
|
|
88
|
+
边界,不保留 URL 或 curl 示例,也不执行这些操作。需要扩展时,先由 Science Server
|
|
89
|
+
暴露 operation 和请求 schema,再更新本 reference。
|
|
@@ -1,116 +1,116 @@
|
|
|
1
|
-
# GSAS-II 详细规则
|
|
2
|
-
|
|
3
|
-
所有调用直接使用 `delta-cli science invoke`。模拟必须使用真实 CIF;精修必须使用真实 powder data、
|
|
4
|
-
instrument parameters 和 phase CIF,任何失败不得用合成数据补齐。输入不是 CIF 时,
|
|
5
|
-
先使用当前任务中成功的 pymatgen `structure-convert` 结果。
|
|
6
|
-
|
|
7
|
-
## Health
|
|
8
|
-
|
|
9
|
-
operation:`health`,无 body。
|
|
10
|
-
|
|
11
|
-
Key response fields in `data`: `status`, `service`, `gsasii_available`,
|
|
12
|
-
`metadata`, and `limits`.
|
|
13
|
-
|
|
14
|
-
只有用户明确要求健康检查时才调用;不要在模拟或精修前自动增加 health。
|
|
15
|
-
|
|
16
|
-
## Powder Simulation
|
|
17
|
-
|
|
18
|
-
operation:`powder-simulate`。
|
|
19
|
-
|
|
20
|
-
```json
|
|
21
|
-
{
|
|
22
|
-
"cif": "<CIF text>",
|
|
23
|
-
"phase_name": "phase",
|
|
24
|
-
"instrument_parameters": "<GSAS-II instrument parameter text>",
|
|
25
|
-
"histogram_name": "simulation",
|
|
26
|
-
"t_min": 10.0,
|
|
27
|
-
"t_max": 80.0,
|
|
28
|
-
"t_step": 0.02,
|
|
29
|
-
"include_profile": true,
|
|
30
|
-
"max_profile_points": 1000,
|
|
31
|
-
"include_reflections": true,
|
|
32
|
-
"max_reflections": 1000,
|
|
33
|
-
"return_refined_cif": false,
|
|
34
|
-
"return_project": false
|
|
35
|
-
}
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Use either `t_step` or `n_points`, not both. Optional fields include
|
|
39
|
-
`wavelength`, `radiation`, `scale`, `include_profile`, `max_profile_points`,
|
|
40
|
-
`include_reflections`, `max_reflections`, `return_refined_cif`, and
|
|
41
|
-
`return_project`.
|
|
42
|
-
|
|
43
|
-
The response includes `profile` points with `x`, `y_calc`, optional background,
|
|
44
|
-
bounded `reflections` with hkl/d-spacing/2theta where available, and metadata.
|
|
45
|
-
If `return_project` is true, `project_base64` contains the GSAS-II `.gpx`
|
|
46
|
-
project. If `return_refined_cif` is true, `refined_cif` contains exported CIF
|
|
47
|
-
text for pymatgen handoff when GSAS-II supports export for the phase.
|
|
48
|
-
|
|
49
|
-
Notes:
|
|
50
|
-
|
|
51
|
-
- `cif` should be valid CIF text. If the input is POSCAR/JSON/CSSR/XSF, use
|
|
52
|
-
pymatgen `structure-convert` first with `output_format: "cif"`.
|
|
53
|
-
- `instrument_parameters` should be GSAS-II instrument parameter text such as
|
|
54
|
-
`INST_XRY.PRM` when instrument-specific simulation is needed.
|
|
55
|
-
- For quick simulation only, `instrument_parameters` may be omitted. The service
|
|
56
|
-
then generates a simple CW X-ray instrument model from `wavelength` or
|
|
57
|
-
`radiation` (`CuKa` by default; also supports aliases such as `MoKa`, `CoKa`,
|
|
58
|
-
`CrKa`, and explicit numeric wavelength).
|
|
59
|
-
- Refinement still requires real `instrument_parameters`.
|
|
60
|
-
- `max_profile_points` controls response sampling. Use small values for smoke
|
|
61
|
-
tests and larger values for profile comparison.
|
|
62
|
-
- Older deployed gateway images may require `max_profile_points >= 10`.
|
|
63
|
-
|
|
64
|
-
## Powder Refinement
|
|
65
|
-
|
|
66
|
-
operation:`powder-refine`。
|
|
67
|
-
|
|
68
|
-
```json
|
|
69
|
-
{
|
|
70
|
-
"powder_data": "<two-column or three-column powder data text>",
|
|
71
|
-
"powder_format": "xy",
|
|
72
|
-
"instrument_parameters": "<GSAS-II instrument parameter text>",
|
|
73
|
-
"phases": [
|
|
74
|
-
{"name": "phase", "cif": "<CIF text>"}
|
|
75
|
-
],
|
|
76
|
-
"refinement_mode": "rietveld",
|
|
77
|
-
"refinement_steps": [],
|
|
78
|
-
"max_cycles": 3,
|
|
79
|
-
"histogram_name": "powder",
|
|
80
|
-
"include_profile": true,
|
|
81
|
-
"max_profile_points": 1000,
|
|
82
|
-
"include_reflections": true,
|
|
83
|
-
"max_reflections": 1000,
|
|
84
|
-
"return_refined_cif": false,
|
|
85
|
-
"return_project": false
|
|
86
|
-
}
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
Supported `powder_format` values: `xy`, `xye`, `fxye`, `gsas`, and `csv`.
|
|
90
|
-
|
|
91
|
-
`refinement_mode: "rietveld"` is currently implemented. `pawley` and `lebail`
|
|
92
|
-
return a clear not-implemented response until the service wires the
|
|
93
|
-
mode-specific GSAS-II setup.
|
|
94
|
-
|
|
95
|
-
The response includes fit `residuals` when available, phase summaries, sampled
|
|
96
|
-
profile points, bounded `reflections`, warnings, optional `refined_cif`, and
|
|
97
|
-
the optional `.gpx` project.
|
|
98
|
-
|
|
99
|
-
Notes:
|
|
100
|
-
|
|
101
|
-
- Use `xy` for simple whitespace-delimited `x y` rows, `xye` for `x y esd`,
|
|
102
|
-
`csv` for numeric comma-separated rows, or `gsas`/`fxye` for GSAS-like powder
|
|
103
|
-
formats.
|
|
104
|
-
- `max_cycles: 0` is useful for project-construction smoke tests. Increase it
|
|
105
|
-
only when the powder data, phase model, instrument file, and refinement steps
|
|
106
|
-
are realistic.
|
|
107
|
-
- `refinement_steps` is passed to `G2Project.do_refinements`. Keep recipes
|
|
108
|
-
incremental and inspect `warnings`, `residuals`, and `lst` output.
|
|
109
|
-
- Refinement may return `valid: false` with partial phase/profile information
|
|
110
|
-
if GSAS-II constructed the project but a refinement step failed.
|
|
111
|
-
|
|
112
|
-
## 跨工具交接
|
|
113
|
-
|
|
114
|
-
结构转换、衍射模拟和精修必须在本 Skill 内通过 CLI 逐步完成:
|
|
115
|
-
`pymatgen structure-convert -> gsasii powder-simulate/powder-refine`。下游只使用上一步
|
|
116
|
-
成功业务响应中的结构文本或 profile;不得执行本地脚本或直连服务。
|
|
1
|
+
# GSAS-II 详细规则
|
|
2
|
+
|
|
3
|
+
所有调用直接使用 `delta-cli science invoke`。模拟必须使用真实 CIF;精修必须使用真实 powder data、
|
|
4
|
+
instrument parameters 和 phase CIF,任何失败不得用合成数据补齐。输入不是 CIF 时,
|
|
5
|
+
先使用当前任务中成功的 pymatgen `structure-convert` 结果。
|
|
6
|
+
|
|
7
|
+
## Health
|
|
8
|
+
|
|
9
|
+
operation:`health`,无 body。
|
|
10
|
+
|
|
11
|
+
Key response fields in `data`: `status`, `service`, `gsasii_available`,
|
|
12
|
+
`metadata`, and `limits`.
|
|
13
|
+
|
|
14
|
+
只有用户明确要求健康检查时才调用;不要在模拟或精修前自动增加 health。
|
|
15
|
+
|
|
16
|
+
## Powder Simulation
|
|
17
|
+
|
|
18
|
+
operation:`powder-simulate`。
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"cif": "<CIF text>",
|
|
23
|
+
"phase_name": "phase",
|
|
24
|
+
"instrument_parameters": "<GSAS-II instrument parameter text>",
|
|
25
|
+
"histogram_name": "simulation",
|
|
26
|
+
"t_min": 10.0,
|
|
27
|
+
"t_max": 80.0,
|
|
28
|
+
"t_step": 0.02,
|
|
29
|
+
"include_profile": true,
|
|
30
|
+
"max_profile_points": 1000,
|
|
31
|
+
"include_reflections": true,
|
|
32
|
+
"max_reflections": 1000,
|
|
33
|
+
"return_refined_cif": false,
|
|
34
|
+
"return_project": false
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Use either `t_step` or `n_points`, not both. Optional fields include
|
|
39
|
+
`wavelength`, `radiation`, `scale`, `include_profile`, `max_profile_points`,
|
|
40
|
+
`include_reflections`, `max_reflections`, `return_refined_cif`, and
|
|
41
|
+
`return_project`.
|
|
42
|
+
|
|
43
|
+
The response includes `profile` points with `x`, `y_calc`, optional background,
|
|
44
|
+
bounded `reflections` with hkl/d-spacing/2theta where available, and metadata.
|
|
45
|
+
If `return_project` is true, `project_base64` contains the GSAS-II `.gpx`
|
|
46
|
+
project. If `return_refined_cif` is true, `refined_cif` contains exported CIF
|
|
47
|
+
text for pymatgen handoff when GSAS-II supports export for the phase.
|
|
48
|
+
|
|
49
|
+
Notes:
|
|
50
|
+
|
|
51
|
+
- `cif` should be valid CIF text. If the input is POSCAR/JSON/CSSR/XSF, use
|
|
52
|
+
pymatgen `structure-convert` first with `output_format: "cif"`.
|
|
53
|
+
- `instrument_parameters` should be GSAS-II instrument parameter text such as
|
|
54
|
+
`INST_XRY.PRM` when instrument-specific simulation is needed.
|
|
55
|
+
- For quick simulation only, `instrument_parameters` may be omitted. The service
|
|
56
|
+
then generates a simple CW X-ray instrument model from `wavelength` or
|
|
57
|
+
`radiation` (`CuKa` by default; also supports aliases such as `MoKa`, `CoKa`,
|
|
58
|
+
`CrKa`, and explicit numeric wavelength).
|
|
59
|
+
- Refinement still requires real `instrument_parameters`.
|
|
60
|
+
- `max_profile_points` controls response sampling. Use small values for smoke
|
|
61
|
+
tests and larger values for profile comparison.
|
|
62
|
+
- Older deployed gateway images may require `max_profile_points >= 10`.
|
|
63
|
+
|
|
64
|
+
## Powder Refinement
|
|
65
|
+
|
|
66
|
+
operation:`powder-refine`。
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"powder_data": "<two-column or three-column powder data text>",
|
|
71
|
+
"powder_format": "xy",
|
|
72
|
+
"instrument_parameters": "<GSAS-II instrument parameter text>",
|
|
73
|
+
"phases": [
|
|
74
|
+
{"name": "phase", "cif": "<CIF text>"}
|
|
75
|
+
],
|
|
76
|
+
"refinement_mode": "rietveld",
|
|
77
|
+
"refinement_steps": [],
|
|
78
|
+
"max_cycles": 3,
|
|
79
|
+
"histogram_name": "powder",
|
|
80
|
+
"include_profile": true,
|
|
81
|
+
"max_profile_points": 1000,
|
|
82
|
+
"include_reflections": true,
|
|
83
|
+
"max_reflections": 1000,
|
|
84
|
+
"return_refined_cif": false,
|
|
85
|
+
"return_project": false
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Supported `powder_format` values: `xy`, `xye`, `fxye`, `gsas`, and `csv`.
|
|
90
|
+
|
|
91
|
+
`refinement_mode: "rietveld"` is currently implemented. `pawley` and `lebail`
|
|
92
|
+
return a clear not-implemented response until the service wires the
|
|
93
|
+
mode-specific GSAS-II setup.
|
|
94
|
+
|
|
95
|
+
The response includes fit `residuals` when available, phase summaries, sampled
|
|
96
|
+
profile points, bounded `reflections`, warnings, optional `refined_cif`, and
|
|
97
|
+
the optional `.gpx` project.
|
|
98
|
+
|
|
99
|
+
Notes:
|
|
100
|
+
|
|
101
|
+
- Use `xy` for simple whitespace-delimited `x y` rows, `xye` for `x y esd`,
|
|
102
|
+
`csv` for numeric comma-separated rows, or `gsas`/`fxye` for GSAS-like powder
|
|
103
|
+
formats.
|
|
104
|
+
- `max_cycles: 0` is useful for project-construction smoke tests. Increase it
|
|
105
|
+
only when the powder data, phase model, instrument file, and refinement steps
|
|
106
|
+
are realistic.
|
|
107
|
+
- `refinement_steps` is passed to `G2Project.do_refinements`. Keep recipes
|
|
108
|
+
incremental and inspect `warnings`, `residuals`, and `lst` output.
|
|
109
|
+
- Refinement may return `valid: false` with partial phase/profile information
|
|
110
|
+
if GSAS-II constructed the project but a refinement step failed.
|
|
111
|
+
|
|
112
|
+
## 跨工具交接
|
|
113
|
+
|
|
114
|
+
结构转换、衍射模拟和精修必须在本 Skill 内通过 CLI 逐步完成:
|
|
115
|
+
`pymatgen structure-convert -> gsasii powder-simulate/powder-refine`。下游只使用上一步
|
|
116
|
+
成功业务响应中的结构文本或 profile;不得执行本地脚本或直连服务。
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
# LAMMPS 详细规则
|
|
2
|
-
|
|
3
|
-
所有调用直接使用 `delta-cli science invoke`。LAMMPS 不从化学式、CIF 或 POSCAR 自动推断 data、原子
|
|
4
|
-
类型、势函数与边界条件。成功执行不表示物理收敛或生产可用。
|
|
5
|
-
|
|
6
|
-
## Health
|
|
7
|
-
|
|
8
|
-
operation:`health`,无 body。
|
|
9
|
-
|
|
10
|
-
Key response fields in `data`: `status`, `service`, `lammps_available`,
|
|
11
|
-
`metadata`, and `limits`.
|
|
12
|
-
|
|
13
|
-
只有用户明确要求健康检查时才调用;不要在模拟前自动增加 health。
|
|
14
|
-
|
|
15
|
-
## Built-In Lennard-Jones Example
|
|
16
|
-
|
|
17
|
-
operation:`lj-melt-example`。
|
|
18
|
-
|
|
19
|
-
Returns a complete `request` payload for the `run` operation, plus workflow notes
|
|
20
|
-
showing where pymatgen and GSAS-II fit around LAMMPS.
|
|
21
|
-
|
|
22
|
-
## Run
|
|
23
|
-
|
|
24
|
-
operation:`run`。
|
|
25
|
-
|
|
26
|
-
```json
|
|
27
|
-
{
|
|
28
|
-
"input_script": "<LAMMPS input script>",
|
|
29
|
-
"files": [
|
|
30
|
-
{"path": "system.data", "content": "<LAMMPS data file text>", "encoding": "text"}
|
|
31
|
-
],
|
|
32
|
-
"timeout_seconds": 30,
|
|
33
|
-
"max_thermo_rows": 1000,
|
|
34
|
-
"log_tail_lines": 200,
|
|
35
|
-
"output_files": ["dump.lammpstrj", "final.data"],
|
|
36
|
-
"include_log": true,
|
|
37
|
-
"include_stdout": false,
|
|
38
|
-
"include_stderr": false
|
|
39
|
-
}
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
`files` are written into a fresh job working directory before LAMMPS starts.
|
|
43
|
-
`encoding` can be `text` or `base64`.
|
|
44
|
-
|
|
45
|
-
The response includes parsed thermo rows, the final thermo row, atom count when
|
|
46
|
-
detectable, log tail, warnings, and requested output files. Text output files
|
|
47
|
-
return `content`; binary output files return `content_base64`.
|
|
48
|
-
|
|
49
|
-
Notes:
|
|
50
|
-
|
|
51
|
-
- Use relative file paths only.
|
|
52
|
-
- The service rejects unsafe commands such as `shell`, `python`, `plugin`, and
|
|
53
|
-
`jump` by default.
|
|
54
|
-
- `include <relative-file>` is allowed when the included file is supplied in
|
|
55
|
-
`files`; absolute paths, parent-directory traversal, URLs, and `jump` loops
|
|
56
|
-
are rejected.
|
|
57
|
-
- Dump/data products are returned as raw requested output files, not structured
|
|
58
|
-
parsed atom-frame objects.
|
|
59
|
-
- The gateway is synchronous; keep interactive runs short.
|
|
60
|
-
- Force-field choice is caller responsibility. The service executes explicit
|
|
61
|
-
LAMMPS input and does not infer potentials from formulas or structures.
|
|
62
|
-
|
|
63
|
-
最终只复制当前业务响应的 `last_thermo`、final step/temperature/total energy、
|
|
64
|
-
warnings 和用户要求的输出文件摘要。禁止把总能量除以原子数、替换步数、换算单位或
|
|
65
|
-
推测收敛性、稳定性。最小示例必须先调用 `lj-melt-example`,再把其
|
|
66
|
-
当前业务响应的 `request` 原样交给 `run`;不得传 CLI 外层 envelope。
|
|
1
|
+
# LAMMPS 详细规则
|
|
2
|
+
|
|
3
|
+
所有调用直接使用 `delta-cli science invoke`。LAMMPS 不从化学式、CIF 或 POSCAR 自动推断 data、原子
|
|
4
|
+
类型、势函数与边界条件。成功执行不表示物理收敛或生产可用。
|
|
5
|
+
|
|
6
|
+
## Health
|
|
7
|
+
|
|
8
|
+
operation:`health`,无 body。
|
|
9
|
+
|
|
10
|
+
Key response fields in `data`: `status`, `service`, `lammps_available`,
|
|
11
|
+
`metadata`, and `limits`.
|
|
12
|
+
|
|
13
|
+
只有用户明确要求健康检查时才调用;不要在模拟前自动增加 health。
|
|
14
|
+
|
|
15
|
+
## Built-In Lennard-Jones Example
|
|
16
|
+
|
|
17
|
+
operation:`lj-melt-example`。
|
|
18
|
+
|
|
19
|
+
Returns a complete `request` payload for the `run` operation, plus workflow notes
|
|
20
|
+
showing where pymatgen and GSAS-II fit around LAMMPS.
|
|
21
|
+
|
|
22
|
+
## Run
|
|
23
|
+
|
|
24
|
+
operation:`run`。
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"input_script": "<LAMMPS input script>",
|
|
29
|
+
"files": [
|
|
30
|
+
{"path": "system.data", "content": "<LAMMPS data file text>", "encoding": "text"}
|
|
31
|
+
],
|
|
32
|
+
"timeout_seconds": 30,
|
|
33
|
+
"max_thermo_rows": 1000,
|
|
34
|
+
"log_tail_lines": 200,
|
|
35
|
+
"output_files": ["dump.lammpstrj", "final.data"],
|
|
36
|
+
"include_log": true,
|
|
37
|
+
"include_stdout": false,
|
|
38
|
+
"include_stderr": false
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`files` are written into a fresh job working directory before LAMMPS starts.
|
|
43
|
+
`encoding` can be `text` or `base64`.
|
|
44
|
+
|
|
45
|
+
The response includes parsed thermo rows, the final thermo row, atom count when
|
|
46
|
+
detectable, log tail, warnings, and requested output files. Text output files
|
|
47
|
+
return `content`; binary output files return `content_base64`.
|
|
48
|
+
|
|
49
|
+
Notes:
|
|
50
|
+
|
|
51
|
+
- Use relative file paths only.
|
|
52
|
+
- The service rejects unsafe commands such as `shell`, `python`, `plugin`, and
|
|
53
|
+
`jump` by default.
|
|
54
|
+
- `include <relative-file>` is allowed when the included file is supplied in
|
|
55
|
+
`files`; absolute paths, parent-directory traversal, URLs, and `jump` loops
|
|
56
|
+
are rejected.
|
|
57
|
+
- Dump/data products are returned as raw requested output files, not structured
|
|
58
|
+
parsed atom-frame objects.
|
|
59
|
+
- The gateway is synchronous; keep interactive runs short.
|
|
60
|
+
- Force-field choice is caller responsibility. The service executes explicit
|
|
61
|
+
LAMMPS input and does not infer potentials from formulas or structures.
|
|
62
|
+
|
|
63
|
+
最终只复制当前业务响应的 `last_thermo`、final step/temperature/total energy、
|
|
64
|
+
warnings 和用户要求的输出文件摘要。禁止把总能量除以原子数、替换步数、换算单位或
|
|
65
|
+
推测收敛性、稳定性。最小示例必须先调用 `lj-melt-example`,再把其
|
|
66
|
+
当前业务响应的 `request` 原样交给 `run`;不得传 CLI 外层 envelope。
|