@delta-infra/cli 1.0.95 → 1.0.97
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 +471 -467
- 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 +356 -345
- package/skills/delta-sandbox/agents/openai.yaml +4 -4
- package/skills/delta-sandbox/references/commands.md +56 -58
- package/skills/delta-sandbox/references/lifecycle.md +92 -98
- package/skills/delta-sandbox/references/recipes.md +133 -138
- package/skills/delta-science/AGENTS.md +49 -49
- package/skills/delta-science/SKILL.md +141 -129
- package/skills/delta-science/agents/openai.yaml +4 -4
- package/skills/delta-science/references/antbo.md +100 -100
- package/skills/delta-science/references/cli-contract.md +53 -53
- package/skills/delta-science/references/delta-bo.md +89 -89
- package/skills/delta-science/references/generated-catalog.md +48 -0
- 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/ldm.md +73 -73
- package/skills/delta-science/references/materials-design.md +109 -0
- package/skills/delta-science/references/molecule-enrich.md +59 -0
- package/skills/delta-science/references/operation-contracts.md +137 -0
- package/skills/delta-science/references/pubchem.md +126 -126
- package/skills/delta-science/references/pymatgen.md +68 -68
- package/skills/delta-science/references/qe-dft.md +123 -0
- package/skills/delta-science/references/rdkit.md +138 -138
- package/skills/delta-science/references/routing-index.md +35 -26
- package/skills/delta-science/references/services.md +112 -0
- package/skills/delta-science/references/strbo.md +87 -87
- package/skills/delta-science/references/synbo.md +198 -198
- package/skills/delta-science/references/workflows.md +86 -49
- package/skills/delta-science/scripts/catalog.py +92 -0
- package/skills/delta-science/scripts/generated_catalog.py +69 -0
- package/skills/delta-science/scripts/invoke.py +346 -0
- package/skills/delta-shared/SKILL.md +95 -97
- package/skills/delta-shared/agents/openai.yaml +4 -4
- package/skills/manifest.json +19 -19
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Quantum ESPRESSO DFT 详细规则
|
|
2
|
+
|
|
3
|
+
QE 用于通过 Chemistry Gateway 执行可追踪的异步 Quantum ESPRESSO 工作流。agent 只接触
|
|
4
|
+
Gateway/Science Server contract,不运行本地 `pw.x`,不调用内部 QE 容器,也不提交 shell
|
|
5
|
+
命令、scheduler 脚本、`pseudo_dir`、`outdir` 或主机路径。
|
|
6
|
+
|
|
7
|
+
本 reference 的服务路由标签为 `qe`,preflight 中对应的领域 skill 名为 `qe-dft`。
|
|
8
|
+
实际 `tools.name` 与 `tool_endpoints.name` 必须逐字取自当前 CLI catalog。下列路径是 QE
|
|
9
|
+
服务契约,不是可直接访问的 URL,也不是可以自动改写的 endpoint 别名。
|
|
10
|
+
|
|
11
|
+
## 能力分组
|
|
12
|
+
|
|
13
|
+
| 服务路径 | 作用 | 类型 |
|
|
14
|
+
| --- | --- | --- |
|
|
15
|
+
| `/chem/qe/health`、`/healthz`、`/readyz` | 运行时、scheduler、存储和 PP 就绪 | 只读 |
|
|
16
|
+
| `/chem/qe/v1/qe/workflow-types` | workflow catalog 和支持状态 | 只读 |
|
|
17
|
+
| `/chem/qe/v1/pp-sets`、`/pp-locks/{digest}` | 已发布 PP profile/lock | 只读 |
|
|
18
|
+
| `/chem/qe/v1/pp-sets:resolve` | 按 campaign 元素全集解析 PP 候选 | 只读/校验 |
|
|
19
|
+
| `/chem/qe/v1/artifacts` | 上传、查询和下载结构/fixed-coordinate artifact | 文件/二进制 |
|
|
20
|
+
| `/chem/qe/v1/qe/jobs` | 提交异步计算并查询 job | 远端变更 |
|
|
21
|
+
| `/chem/qe/v1/qe/jobs/{job_id}/events`、`steps`、`logs`、`artifacts` | 读取作业过程和结果 | 只读 |
|
|
22
|
+
| `/chem/qe/v1/qe/jobs/{job_id}:cancel`、`:retry`、`:review` | 取消、重试和科学审核 | 远端变更 |
|
|
23
|
+
|
|
24
|
+
选择新工具或新 operation 时,依次使用:
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
delta-cli science list
|
|
28
|
+
delta-cli science endpoints list <exact tool name>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
再用目录返回的精确名称调用;如果 catalog 没有 schema,不猜测 operation、路径参数、
|
|
32
|
+
请求头或 body。
|
|
33
|
+
|
|
34
|
+
## 当前 CLI 的文件和请求头边界
|
|
35
|
+
|
|
36
|
+
结构 artifact 上传需要 `application/octet-stream` 和 query metadata,QE job 提交要求
|
|
37
|
+
稳定的 `Idempotency-Key`。当前通用 `delta-cli science invoke` 只有 JSON body/query 参数,
|
|
38
|
+
没有原始二进制上传、multipart 或自定义请求头 flag。因此:
|
|
39
|
+
|
|
40
|
+
- 只有在 Science Server 已提供明确等价 adapter 时,才可以通过 CLI 解析 PP、提交 job
|
|
41
|
+
或上传 artifact;
|
|
42
|
+
- 不要把结构文本、文件路径、base64、`Idempotency-Key` 或 QE service credential 当成
|
|
43
|
+
普通业务字段发送;
|
|
44
|
+
- 若目录没有 adapter,报告“当前 CLI 未暴露该 operation;未发送远端请求”,不要调用
|
|
45
|
+
公开/私有 Gateway URL 或 `qe-cloud-compute:18020`。
|
|
46
|
+
|
|
47
|
+
## 新作业的正确顺序
|
|
48
|
+
|
|
49
|
+
1. 读取 health;需要部署诊断时再读取 readiness,并从 workflow catalog 选择当前
|
|
50
|
+
`supported` 的 task。
|
|
51
|
+
2. 计算完整 `campaign_elements` 集合,使用 `pp-sets:resolve` 得到 profile;生产作业
|
|
52
|
+
必须使用服务返回的 `pp_set_id` 与不可变 `lock_id`,不能只凭 profile 名称推断 lock。
|
|
53
|
+
3. 让服务校验结构 artifact,job 只引用返回的 `sha256:<digest>` artifact ID。
|
|
54
|
+
4. 用稳定幂等语义提交 `qe/jobs`;接收 `202` 只代表 accepted/queued,不代表 QE 已收敛。
|
|
55
|
+
5. 轮询 job、events、steps、logs 和 artifacts;独立读取 `execution`、`solver`、
|
|
56
|
+
`scientific` 三个状态。
|
|
57
|
+
6. 下载结果时校验每个 artifact 的 SHA-256,并分别报告 selected backend、资源 telemetry、
|
|
58
|
+
solver 状态、scientific review 状态和 warnings。
|
|
59
|
+
|
|
60
|
+
PP 解析的最小业务数据形状如下;其中值必须来自当前服务/目录,不能填入虚构的生产 lock:
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"campaign_id": "si-bulk-scf-v1",
|
|
65
|
+
"campaign_elements": ["Si", "O"],
|
|
66
|
+
"workflows": ["qe.pw.scf"],
|
|
67
|
+
"explicit_mode": null
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
作业的核心结构如下,`workflow_inputs` 必须遵循当前 task schema:
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"task": "qe.pw.scf",
|
|
76
|
+
"schema_version": "1.1",
|
|
77
|
+
"campaign_id": "si-bulk-scf-v1",
|
|
78
|
+
"campaign_elements": ["Si"],
|
|
79
|
+
"structure": {"format": "artifact", "artifact_id": "sha256:<64-hex>"},
|
|
80
|
+
"physics": {
|
|
81
|
+
"parameter_set": "<approved-parameter-set>",
|
|
82
|
+
"pp_policy": {
|
|
83
|
+
"mode": "sssp_single",
|
|
84
|
+
"pp_set_id": "<approved-pp-set>",
|
|
85
|
+
"lock_id": "sha256:<64-hex>"
|
|
86
|
+
},
|
|
87
|
+
"kpoints": [4, 4, 4]
|
|
88
|
+
},
|
|
89
|
+
"resources": {
|
|
90
|
+
"profile": "standard",
|
|
91
|
+
"nodes": 1,
|
|
92
|
+
"mpi_ranks_per_node": 1,
|
|
93
|
+
"omp_threads_per_rank": 1,
|
|
94
|
+
"walltime_seconds": 3600,
|
|
95
|
+
"gpu_policy": "cpu"
|
|
96
|
+
},
|
|
97
|
+
"client_request_id": "si-scf-v1",
|
|
98
|
+
"workflow_inputs": {}
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## CPU/GPU 与状态解释
|
|
103
|
+
|
|
104
|
+
CPU 是默认策略,尤其适用于小/中型交互任务、PP/结构/审计/归档任务和成本敏感场景。
|
|
105
|
+
只有用户明确要求或项目已有 GPU 预算,并且 live catalog 返回
|
|
106
|
+
`gpu_support_status: "verified"` 时,才使用 `gpu`;强制 GPU 不得静默回退 CPU。只有
|
|
107
|
+
结果明确返回 `selected_backend: "gpu"` 才能声称实际使用 GPU;`auto` 不是 GPU 使用证明。
|
|
108
|
+
|
|
109
|
+
三个状态通道不可合并:
|
|
110
|
+
|
|
111
|
+
- `execution`:prepared/submitted/queued/running/scheduler completion/cancelled/failed;
|
|
112
|
+
- `solver`:not started/running/converged/not converged/failed/unknown;
|
|
113
|
+
- `scientific`:unreviewed、scientifically accepted、accepted with limitations、needs
|
|
114
|
+
recalculation、not assessable、failed 或 archived。
|
|
115
|
+
|
|
116
|
+
scheduler 完成不等于 solver 收敛,solver 收敛也不等于 scientific acceptance。按稳定
|
|
117
|
+
错误码而不是 message 分支,重点包括 `PP_SET_INCOMPLETE`、`PP_POLICY_INCOMPATIBLE`、
|
|
118
|
+
`PP_CAPABILITY_UNKNOWN`、`ARTIFACT_MISSING`、`SOLVER_NOT_CONVERGED`、
|
|
119
|
+
`SCIENTIFIC_GATE_FAILED`、`RESTART_INCOMPATIBLE`、`IDEMPOTENCY_CONFLICT`、
|
|
120
|
+
`EXECUTION_BACKEND_NOT_READY`、`GPU_UNSUPPORTED` 和 `GPU_UNAVAILABLE`。
|
|
121
|
+
|
|
122
|
+
提交、取消、重试或审核属于远端变更,必须有用户明确授权;结果未知时禁止重试。不要把
|
|
123
|
+
GPU smoke test、scheduler 日志或可解析的 QE 输出描述成科学结论或客户级性能保证。
|
|
@@ -1,138 +1,138 @@
|
|
|
1
|
-
# RDKit 详细规则
|
|
2
|
-
|
|
3
|
-
只能通过 `delta-cli science invoke` 调用。以下业务响应位于 CLI 顶层 `data`;只按本文件
|
|
4
|
-
说明读取字段,不得递归搜索。这里只记录 operation schema,不授权直接 HTTP。
|
|
5
|
-
|
|
6
|
-
一个请求只执行完成目标所需的最少调用。同时校验、规范化并计算基础描述符时使用一次
|
|
7
|
-
`batch-parse-describe`,payload 使用 `molecules:[{id,smiles}]`,不得拆成 parse 和
|
|
8
|
-
descriptors。多个分子的全对相似度使用一次 `similarity-matrix`;排名字段固定为
|
|
9
|
-
`a`、`b`、`similarity`,不是 `i`、`j`、`score`。
|
|
10
|
-
|
|
11
|
-
只报告业务响应实际存在的描述符。渲染 PNG 时只解码文档指定字段,并验证字节以
|
|
12
|
-
`89 50 4e 47 0d 0a 1a 0a` 开头;不得把 JSON envelope 保存成图片。
|
|
13
|
-
|
|
14
|
-
## Health
|
|
15
|
-
|
|
16
|
-
operation:`health`,无 body。
|
|
17
|
-
|
|
18
|
-
## Parse
|
|
19
|
-
|
|
20
|
-
operation:`parse`。
|
|
21
|
-
|
|
22
|
-
```json
|
|
23
|
-
{"input": "CCO", "format": "smiles", "sanitize": true}
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Formats: `smiles`, `inchi`, `molblock`.
|
|
27
|
-
|
|
28
|
-
Key response fields in `data`: `valid`, `canonical_smiles`, `formula`,
|
|
29
|
-
`molecular_weight`, `exact_molecular_weight`, `inchi_key`, `atom_count`,
|
|
30
|
-
`heavy_atom_count`, `bond_count`, `warnings`, `error`.
|
|
31
|
-
|
|
32
|
-
## Descriptors
|
|
33
|
-
|
|
34
|
-
operation:`descriptors`。
|
|
35
|
-
|
|
36
|
-
```json
|
|
37
|
-
{"smiles": "CCO", "descriptor_set": "basic", "sanitize": true}
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
`descriptor_set` currently supports `basic`. Descriptor keys include `Formula`,
|
|
41
|
-
`MolWt`, `ExactMolWt`, `HeavyAtomMolWt`, `TPSA`, `MolLogP`, `NumHDonors`,
|
|
42
|
-
`NumHAcceptors`, `NumRotatableBonds`, `RingCount`, `FractionCSP3`,
|
|
43
|
-
`HeavyAtomCount`, `AtomCount`, and `BondCount`.
|
|
44
|
-
|
|
45
|
-
## Batch Descriptors
|
|
46
|
-
|
|
47
|
-
operation:`batch-descriptors`。
|
|
48
|
-
|
|
49
|
-
```json
|
|
50
|
-
{"smiles": ["CCO", "c1ccccc1"], "descriptor_set": "basic", "sanitize": true}
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Limits: 1-500 SMILES.
|
|
54
|
-
|
|
55
|
-
## Batch Parse Describe
|
|
56
|
-
|
|
57
|
-
operation:`batch-parse-describe`。
|
|
58
|
-
|
|
59
|
-
```json
|
|
60
|
-
{
|
|
61
|
-
"molecules": [
|
|
62
|
-
{"id": "aspirin", "smiles": "CC(=O)Oc1ccccc1C(=O)O"},
|
|
63
|
-
{"id": "caffeine", "smiles": "Cn1cnc2c1c(=O)n(C)c(=O)n2C"}
|
|
64
|
-
],
|
|
65
|
-
"descriptor_set": "basic",
|
|
66
|
-
"fingerprint": {"type": "morgan", "radius": 2, "n_bits": 2048},
|
|
67
|
-
"sanitize": true
|
|
68
|
-
}
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Limits: 1-500 molecules. Returns per-item `valid`, `canonical_smiles`, parse
|
|
72
|
-
fields, `descriptors`, optional `fingerprint_metadata`, `on_bits`, `bit_count`,
|
|
73
|
-
`warnings`, and `error`.
|
|
74
|
-
|
|
75
|
-
## Render
|
|
76
|
-
|
|
77
|
-
operation:`render`。
|
|
78
|
-
|
|
79
|
-
```json
|
|
80
|
-
{"smiles": "CCO", "image_format": "svg", "width": 450, "height": 320}
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
Image formats: `svg`, `png`. SVG returns text; PNG returns base64.
|
|
84
|
-
Width/height range: 150-2000.
|
|
85
|
-
|
|
86
|
-
## Fingerprint
|
|
87
|
-
|
|
88
|
-
operation:`fingerprint`。
|
|
89
|
-
|
|
90
|
-
```json
|
|
91
|
-
{"smiles": "CCO", "radius": 2, "n_bits": 2048}
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
Morgan fingerprint parameters: `radius` 1-6, `n_bits` 128-8192.
|
|
95
|
-
|
|
96
|
-
## Similarity
|
|
97
|
-
|
|
98
|
-
operation:`similarity`。
|
|
99
|
-
|
|
100
|
-
```json
|
|
101
|
-
{"query_smiles": "CCO", "target_smiles": "CCCO", "radius": 2, "n_bits": 2048}
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
Returns Tanimoto similarity.
|
|
105
|
-
|
|
106
|
-
## Similarity Matrix
|
|
107
|
-
|
|
108
|
-
operation:`similarity-matrix`。
|
|
109
|
-
|
|
110
|
-
```json
|
|
111
|
-
{
|
|
112
|
-
"molecules": [
|
|
113
|
-
{"id": "aspirin", "smiles": "CC(=O)Oc1ccccc1C(=O)O"},
|
|
114
|
-
{"id": "ibuprofen", "smiles": "CC(C)Cc1ccc(cc1)[C@@H](C)C(=O)O"}
|
|
115
|
-
],
|
|
116
|
-
"fingerprint": {"type": "morgan", "radius": 2, "n_bits": 2048},
|
|
117
|
-
"sanitize": true
|
|
118
|
-
}
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
Returns `matrix` in input order and `ranked_pairs` sorted by descending
|
|
122
|
-
Tanimoto similarity. Each ranked record is named, not index-based:
|
|
123
|
-
|
|
124
|
-
```json
|
|
125
|
-
{"a":"aspirin","b":"ibuprofen","similarity":0.195122}
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
Do not expect `i`, `j`, or `score` fields.
|
|
129
|
-
|
|
130
|
-
## Substructure
|
|
131
|
-
|
|
132
|
-
operation:`substructure`。
|
|
133
|
-
|
|
134
|
-
```json
|
|
135
|
-
{"query_smarts": "c1ccccc1", "target_smiles": ["c1ccccc1", "CCO"]}
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
Limits: SMARTS max length 5000; target list size 1-500.
|
|
1
|
+
# RDKit 详细规则
|
|
2
|
+
|
|
3
|
+
只能通过 `delta-cli science invoke` 调用。以下业务响应位于 CLI 顶层 `data`;只按本文件
|
|
4
|
+
说明读取字段,不得递归搜索。这里只记录 operation schema,不授权直接 HTTP。
|
|
5
|
+
|
|
6
|
+
一个请求只执行完成目标所需的最少调用。同时校验、规范化并计算基础描述符时使用一次
|
|
7
|
+
`batch-parse-describe`,payload 使用 `molecules:[{id,smiles}]`,不得拆成 parse 和
|
|
8
|
+
descriptors。多个分子的全对相似度使用一次 `similarity-matrix`;排名字段固定为
|
|
9
|
+
`a`、`b`、`similarity`,不是 `i`、`j`、`score`。
|
|
10
|
+
|
|
11
|
+
只报告业务响应实际存在的描述符。渲染 PNG 时只解码文档指定字段,并验证字节以
|
|
12
|
+
`89 50 4e 47 0d 0a 1a 0a` 开头;不得把 JSON envelope 保存成图片。
|
|
13
|
+
|
|
14
|
+
## Health
|
|
15
|
+
|
|
16
|
+
operation:`health`,无 body。
|
|
17
|
+
|
|
18
|
+
## Parse
|
|
19
|
+
|
|
20
|
+
operation:`parse`。
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{"input": "CCO", "format": "smiles", "sanitize": true}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Formats: `smiles`, `inchi`, `molblock`.
|
|
27
|
+
|
|
28
|
+
Key response fields in `data`: `valid`, `canonical_smiles`, `formula`,
|
|
29
|
+
`molecular_weight`, `exact_molecular_weight`, `inchi_key`, `atom_count`,
|
|
30
|
+
`heavy_atom_count`, `bond_count`, `warnings`, `error`.
|
|
31
|
+
|
|
32
|
+
## Descriptors
|
|
33
|
+
|
|
34
|
+
operation:`descriptors`。
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{"smiles": "CCO", "descriptor_set": "basic", "sanitize": true}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
`descriptor_set` currently supports `basic`. Descriptor keys include `Formula`,
|
|
41
|
+
`MolWt`, `ExactMolWt`, `HeavyAtomMolWt`, `TPSA`, `MolLogP`, `NumHDonors`,
|
|
42
|
+
`NumHAcceptors`, `NumRotatableBonds`, `RingCount`, `FractionCSP3`,
|
|
43
|
+
`HeavyAtomCount`, `AtomCount`, and `BondCount`.
|
|
44
|
+
|
|
45
|
+
## Batch Descriptors
|
|
46
|
+
|
|
47
|
+
operation:`batch-descriptors`。
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{"smiles": ["CCO", "c1ccccc1"], "descriptor_set": "basic", "sanitize": true}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Limits: 1-500 SMILES.
|
|
54
|
+
|
|
55
|
+
## Batch Parse Describe
|
|
56
|
+
|
|
57
|
+
operation:`batch-parse-describe`。
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"molecules": [
|
|
62
|
+
{"id": "aspirin", "smiles": "CC(=O)Oc1ccccc1C(=O)O"},
|
|
63
|
+
{"id": "caffeine", "smiles": "Cn1cnc2c1c(=O)n(C)c(=O)n2C"}
|
|
64
|
+
],
|
|
65
|
+
"descriptor_set": "basic",
|
|
66
|
+
"fingerprint": {"type": "morgan", "radius": 2, "n_bits": 2048},
|
|
67
|
+
"sanitize": true
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Limits: 1-500 molecules. Returns per-item `valid`, `canonical_smiles`, parse
|
|
72
|
+
fields, `descriptors`, optional `fingerprint_metadata`, `on_bits`, `bit_count`,
|
|
73
|
+
`warnings`, and `error`.
|
|
74
|
+
|
|
75
|
+
## Render
|
|
76
|
+
|
|
77
|
+
operation:`render`。
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{"smiles": "CCO", "image_format": "svg", "width": 450, "height": 320}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Image formats: `svg`, `png`. SVG returns text; PNG returns base64.
|
|
84
|
+
Width/height range: 150-2000.
|
|
85
|
+
|
|
86
|
+
## Fingerprint
|
|
87
|
+
|
|
88
|
+
operation:`fingerprint`。
|
|
89
|
+
|
|
90
|
+
```json
|
|
91
|
+
{"smiles": "CCO", "radius": 2, "n_bits": 2048}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Morgan fingerprint parameters: `radius` 1-6, `n_bits` 128-8192.
|
|
95
|
+
|
|
96
|
+
## Similarity
|
|
97
|
+
|
|
98
|
+
operation:`similarity`。
|
|
99
|
+
|
|
100
|
+
```json
|
|
101
|
+
{"query_smiles": "CCO", "target_smiles": "CCCO", "radius": 2, "n_bits": 2048}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Returns Tanimoto similarity.
|
|
105
|
+
|
|
106
|
+
## Similarity Matrix
|
|
107
|
+
|
|
108
|
+
operation:`similarity-matrix`。
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"molecules": [
|
|
113
|
+
{"id": "aspirin", "smiles": "CC(=O)Oc1ccccc1C(=O)O"},
|
|
114
|
+
{"id": "ibuprofen", "smiles": "CC(C)Cc1ccc(cc1)[C@@H](C)C(=O)O"}
|
|
115
|
+
],
|
|
116
|
+
"fingerprint": {"type": "morgan", "radius": 2, "n_bits": 2048},
|
|
117
|
+
"sanitize": true
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Returns `matrix` in input order and `ranked_pairs` sorted by descending
|
|
122
|
+
Tanimoto similarity. Each ranked record is named, not index-based:
|
|
123
|
+
|
|
124
|
+
```json
|
|
125
|
+
{"a":"aspirin","b":"ibuprofen","similarity":0.195122}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Do not expect `i`, `j`, or `score` fields.
|
|
129
|
+
|
|
130
|
+
## Substructure
|
|
131
|
+
|
|
132
|
+
operation:`substructure`。
|
|
133
|
+
|
|
134
|
+
```json
|
|
135
|
+
{"query_smarts": "c1ccccc1", "target_smiles": ["c1ccccc1", "CCO"]}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Limits: SMARTS max length 5000; target list size 1-500.
|
|
@@ -1,36 +1,45 @@
|
|
|
1
|
-
# Delta Science 路由索引
|
|
2
|
-
|
|
3
|
-
本文件只描述稳定的科研意图边界,不复制 Science Server 的工具和 endpoint 清单。
|
|
4
|
-
实际可用工具以 `delta-cli science list` 和 `delta-cli science endpoints list` 返回的
|
|
5
|
-
实时目录为准。
|
|
6
|
-
|
|
7
|
-
## 路由优先级
|
|
8
|
-
|
|
1
|
+
# Delta Science 路由索引
|
|
2
|
+
|
|
3
|
+
本文件只描述稳定的科研意图边界,不复制 Science Server 的工具和 endpoint 清单。
|
|
4
|
+
实际可用工具以 `delta-cli science list` 和 `delta-cli science endpoints list` 返回的
|
|
5
|
+
实时目录为准。
|
|
6
|
+
|
|
7
|
+
## 路由优先级
|
|
8
|
+
|
|
9
9
|
- 普通化合物名称、CID 和公共属性使用 PubChem;已有 SMILES/InChI 且需要结构计算时
|
|
10
10
|
使用 RDKit。
|
|
11
|
+
- 用户明确要求一次得到名称解析、PubChem 字段和 RDKit 描述符/指纹时,使用
|
|
12
|
+
`chemistry` 的 molecule-enrich workflow;不要为同一需求重复调用中间服务。
|
|
11
13
|
- 无机化学式、组成、CIF、POSCAR 和空间群使用 pymatgen;粉末衍射模拟或 Rietveld
|
|
12
14
|
精修使用 GSAS-II。
|
|
15
|
+
- 表格材料数据、可控变量/目标、候选空间、 surrogate 验证和候选排序使用
|
|
16
|
+
Materials Design;不要把候选预测说成实验结果。
|
|
17
|
+
- 需要 Quantum ESPRESSO 电子结构计算时使用 QE;先解析 workflow 与整组元素的 PP
|
|
18
|
+
policy/lock,再按异步 job 生命周期处理 execution、solver 和 scientific 状态。
|
|
13
19
|
- 明确的 LAMMPS input、data 和力场任务使用 LAMMPS;不得从化学式或 CIF 猜测势函数。
|
|
14
|
-
- 通用数值、整数或分类实验变量优化使用 Delta-BO。
|
|
15
|
-
- 固定 SMILES 候选池或 PDF2Dock 轨迹使用 LDM-BO;固定 KRAS G12D 生成式优化使用
|
|
16
|
-
STRBO;反应条件与真实历史得率使用 SynBO;抗体 CDRH3 使用 AntBO。
|
|
17
|
-
- “LDM/大发现模型”是跨上述三类能力的工作流意图,先读取 `ldm.md` 决定唯一后端,
|
|
18
|
-
不是服务端 tool,也不得路由到旧 `large-discovery-model` Skill。
|
|
19
|
-
|
|
20
|
-
## 已验证 reference
|
|
21
|
-
|
|
20
|
+
- 通用数值、整数或分类实验变量优化使用 Delta-BO。
|
|
21
|
+
- 固定 SMILES 候选池或 PDF2Dock 轨迹使用 LDM-BO;固定 KRAS G12D 生成式优化使用
|
|
22
|
+
STRBO;反应条件与真实历史得率使用 SynBO;抗体 CDRH3 使用 AntBO。
|
|
23
|
+
- “LDM/大发现模型”是跨上述三类能力的工作流意图,先读取 `ldm.md` 决定唯一后端,
|
|
24
|
+
不是服务端 tool,也不得路由到旧 `large-discovery-model` Skill。
|
|
25
|
+
|
|
26
|
+
## 已验证 reference
|
|
27
|
+
|
|
22
28
|
- [pubchem.md](pubchem.md)
|
|
23
29
|
- [rdkit.md](rdkit.md)
|
|
30
|
+
- [molecule-enrich.md](molecule-enrich.md)
|
|
24
31
|
- [pymatgen.md](pymatgen.md)
|
|
25
|
-
- [gsasii.md](gsasii.md)
|
|
26
|
-
- [lammps.md](lammps.md)
|
|
32
|
+
- [gsasii.md](gsasii.md)
|
|
33
|
+
- [lammps.md](lammps.md)
|
|
27
34
|
- [delta-bo.md](delta-bo.md)
|
|
35
|
+
- [materials-design.md](materials-design.md)
|
|
36
|
+
- [qe-dft.md](qe-dft.md)
|
|
28
37
|
- [ldm-bo.md](ldm-bo.md)
|
|
29
|
-
- [ldm.md](ldm.md)
|
|
30
|
-
- [strbo.md](strbo.md)
|
|
31
|
-
- [synbo.md](synbo.md)
|
|
32
|
-
- [antbo.md](antbo.md)
|
|
33
|
-
|
|
34
|
-
以上 reference 是已验证参数契约,不是服务端完整目录。用户明确点名新工具时,按
|
|
35
|
-
`SKILL.md` 的实时 catalog 流程发现工具和 endpoint;若目录未返回请求 schema,不猜测
|
|
36
|
-
请求体。
|
|
38
|
+
- [ldm.md](ldm.md)
|
|
39
|
+
- [strbo.md](strbo.md)
|
|
40
|
+
- [synbo.md](synbo.md)
|
|
41
|
+
- [antbo.md](antbo.md)
|
|
42
|
+
|
|
43
|
+
以上 reference 是已验证参数契约,不是服务端完整目录。用户明确点名新工具时,按
|
|
44
|
+
`SKILL.md` 的实时 catalog 流程发现工具和 endpoint;若目录未返回请求 schema,不猜测
|
|
45
|
+
请求体。
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# 服务与参数参考
|
|
2
|
+
|
|
3
|
+
只读取当前所选服务对应的部分。下文中的 endpoint 是 Delta CLI catalog 名称,不是 URL 路径。
|
|
4
|
+
|
|
5
|
+
## PubChem
|
|
6
|
+
|
|
7
|
+
Tool:`pubchem`。
|
|
8
|
+
|
|
9
|
+
- 普通名称查询:`compound-summary`,data 为 `{"identifier":"caffeine","namespace":"name"}`。
|
|
10
|
+
- 批量查询:`compound-batch-summary`。模糊的多分子比较必须严格使用 `{"identifiers":["aspirin","caffeine"],"namespace":"name"}`。
|
|
11
|
+
- 批量查询不要添加 `properties` 或 `synonym_limit`,尤其不能把 `CID` 放进 `properties`。
|
|
12
|
+
- 其他 operation:`compound-resolve-cids`、`compound-properties`、`compound-synonyms`。
|
|
13
|
+
|
|
14
|
+
单个 `compound-summary` 的业务字段直接位于 wrapper 的 `native` 顶层:读取
|
|
15
|
+
`native.valid`、`native.cid`、`native.properties` 和 `native.synonyms`;不存在
|
|
16
|
+
`native.data` 这一层。
|
|
17
|
+
|
|
18
|
+
模糊问题优先使用 summary。按 `CanonicalSMILES`、`ConnectivitySMILES`、`SMILES`、`IsomericSMILES` 的顺序提取 SMILES。PubChem 返回的 `MolecularWeight`、`XLogP` 和 `TPSA` 必须保留为 PubChem 数据。
|
|
19
|
+
|
|
20
|
+
批量 native 输出为 `{"results":[...]}`。每条记录用 `input` 保存原始标签,化合物字段位于嵌套的 `properties`;记录不是平铺结构,集合键也不是 `compounds`。
|
|
21
|
+
|
|
22
|
+
## RDKit
|
|
23
|
+
|
|
24
|
+
Tool:`rdkit`。
|
|
25
|
+
|
|
26
|
+
- `parse`:`{"input":"CCO","format":"smiles"}`
|
|
27
|
+
- `descriptors`:`{"smiles":"CCO","descriptor_set":"basic","sanitize":true}`
|
|
28
|
+
- `batch-parse-describe`:`{"molecules":[{"id":"ethanol","smiles":"CCO"}],"descriptor_set":"basic","sanitize":true}`
|
|
29
|
+
- `render`:`{"smiles":"CCO","image_format":"png","width":500,"height":400}`
|
|
30
|
+
- `similarity`:使用 `query_smiles` 和 `target_smiles`
|
|
31
|
+
- `similarity-matrix`:使用 `molecules:[{id,smiles}]`
|
|
32
|
+
- `substructure`:使用 `query_smarts` 和 `target_smiles`
|
|
33
|
+
|
|
34
|
+
`batch-parse-describe` 使用 `molecules`,不能用 `inputs`;分子字段使用 `smiles`,不能用 `input`。fingerprint 选项是对象,不是布尔值。PubChem `XLogP` 与 RDKit `MolLogP` 使用不同模型。
|
|
35
|
+
|
|
36
|
+
`similarity-matrix` 的 `ranked_pairs` 每项是
|
|
37
|
+
`{"a": <输入 id>, "b": <输入 id>, "similarity": <数值>}`。不要读取
|
|
38
|
+
`i`、`j` 或 `score`。
|
|
39
|
+
|
|
40
|
+
## pymatgen
|
|
41
|
+
|
|
42
|
+
Tool:`pymatgen`。
|
|
43
|
+
|
|
44
|
+
- 化学式:`composition-parse`,data 为 `{"formula":"LiFePO4","format":"formula"}`
|
|
45
|
+
- 结构 operation:`structure-parse`、`structure-summary`、`structure-convert`、`structure-symmetry`
|
|
46
|
+
|
|
47
|
+
结构调用必须发送完整结构文本,不能发送本地文件路径。支持 CIF、POSCAR、JSON、CSSR 和 XSF。不要把 LAMMPS data/dump 文件交给 pymatgen。
|
|
48
|
+
|
|
49
|
+
对无机化学式/式量,只报告当前 native 的 `formula`、`reduced_formula`、
|
|
50
|
+
`chemical_system`、`weight` 与元素组成。PubChem 未收录时保留 `not_found`,
|
|
51
|
+
不要编造 CID 或用本地计算补值。
|
|
52
|
+
|
|
53
|
+
## GSAS-II
|
|
54
|
+
|
|
55
|
+
Tool:`gsasii`;operation 为 `powder-simulate` 和 `powder-refine`。
|
|
56
|
+
|
|
57
|
+
模拟需要完整 `cif` 文本。字段必须使用 `phase_name`、`include_profile`、`include_reflections`、`t_min`、`t_max` 和 `t_step`。
|
|
58
|
+
|
|
59
|
+
精修需要真实的 `powder_data`、`instrument_parameters` 和 `phases:[{name,cif}]`。依赖模拟结果时,只能从成功调用的 native `profile[*].x` 和 `profile[*].y_calc` 构造粉末数据。
|
|
60
|
+
|
|
61
|
+
## LAMMPS
|
|
62
|
+
|
|
63
|
+
Tool:`lammps`。
|
|
64
|
+
|
|
65
|
+
- 只读有界示例:`lj-melt-example`,无参数
|
|
66
|
+
- 执行:`run`,参数必须是示例返回的精确 native `request`,或用户明确授权的 `input_script`/files
|
|
67
|
+
|
|
68
|
+
绝不能把 CLI 外层信封传给 `run`,只能传 `native["request"]`。LAMMPS 不会自动推断力场。交互式运行必须保持有界。
|
|
69
|
+
|
|
70
|
+
最小示例最终数值从当前 native `last_thermo` 读取;逐字保留 `Step`、`Temp`
|
|
71
|
+
和 `TotEng`,不要除以原子数、换算单位或推测收敛性。
|
|
72
|
+
|
|
73
|
+
## Delta-BO
|
|
74
|
+
|
|
75
|
+
Tool:`delta-bo`。
|
|
76
|
+
|
|
77
|
+
- 命令目录:`commands`,无参数
|
|
78
|
+
- 无状态建议:`generate`,例如 `{"params":[{"name":"x","type":"numeric","low":0,"high":1}],"num_suggestions":2,"algorithm":"random-search","seed":42}`
|
|
79
|
+
|
|
80
|
+
观测少于五条时,除非用户明确要求 BO,否则优先使用 `random-search`。有状态 native session 命令属于变更操作,不能盲目重试。
|
|
81
|
+
|
|
82
|
+
## LDM-BO
|
|
83
|
+
|
|
84
|
+
Tool:`ldm-bo`;operation 为 `recommend` 和 `trajectory`。
|
|
85
|
+
|
|
86
|
+
有界测试使用 `bo-tanimoto`。`recommend` 接受 `method`、`pool`、`history:[{smiles,scores}]` 和 `batch_size`。`trajectory` 必须保留 native 连字符字段:`seed-smiles`、`num-evaluations` 和 `batch-size`。
|
|
87
|
+
|
|
88
|
+
## SynBO
|
|
89
|
+
|
|
90
|
+
Tool:`synbo`;operation 为 `initialize` 和 `optimize`。
|
|
91
|
+
|
|
92
|
+
二者都使用 `condition_dict`、`opt_metrics` 和 `batch_size`。`optimize` 还要求数值型 `previous_results`,且每条记录必须包含全部条件和指标。有界 CPU 测试使用 `accuracy:"tiny"` 和 `device:"cpu"`,并串行执行。
|
|
93
|
+
|
|
94
|
+
有真实 `previous_results` 的优化请求使用一次 `optimize`;每行必须包含全部条件列和
|
|
95
|
+
数值指标。失败、超时或空 recommendations 时如实报告,禁止本地替代优化。
|
|
96
|
+
|
|
97
|
+
## AntBO
|
|
98
|
+
|
|
99
|
+
Tool:`antbo`。
|
|
100
|
+
|
|
101
|
+
当前 CLI catalog 暴露 `health`、`run-default-job`、`run`、`log`、`jobs` 和
|
|
102
|
+
`stop`;准确参数见 `operation-contracts.md`。没有 `ldm/suggest`、
|
|
103
|
+
`ldm/initialize`、`ldm/evaluate`。遇到 AntBO/CDRH3 的这些 LDM 请求时不要调用工具、
|
|
104
|
+
不要改用小分子 LDM-BO、不要探测目录或直连 HTTP;明确回复“当前 Delta CLI catalog
|
|
105
|
+
未暴露该 operation;未发送远端请求”。
|
|
106
|
+
|
|
107
|
+
启动作业只能根据同一次 native 的 `started`、`pid` 和 `log_name`/`log_path`
|
|
108
|
+
报告;任一字段缺失时标记为未验证,不要重复提交或编造作业信息。
|
|
109
|
+
|
|
110
|
+
`health`、`log`、`jobs` 是只读调用。`run-default-job`、`run`、`stop` 会改变远端状态;
|
|
111
|
+
`run-default-job` 的 `log_name`、`append`、`timeout_seconds` 使用 `--params-json`。
|
|
112
|
+
没有用户明确授权时不得启动或停止;未知结果不得重试。
|