@delta-infra/cli 1.0.83 → 1.0.84
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 +429 -429
- package/checksums.txt +5 -5
- package/package.json +1 -1
- package/scripts/install-wizard.js +625 -625
- package/scripts/install.js +417 -417
- package/scripts/run.js +65 -65
- package/skills/delta-sandbox/SKILL.md +356 -356
- package/skills/delta-sandbox/agents/openai.yaml +4 -4
- package/skills/delta-sandbox/references/commands.md +56 -56
- package/skills/delta-sandbox/references/lifecycle.md +92 -92
- package/skills/delta-sandbox/references/recipes.md +133 -133
- package/skills/delta-science/SKILL.md +140 -136
- 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/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/pubchem.md +126 -126
- package/skills/delta-science/references/pymatgen.md +68 -68
- package/skills/delta-science/references/rdkit.md +138 -138
- package/skills/delta-science/references/routing-index.md +36 -36
- 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 +61 -61
- package/skills/delta-shared/SKILL.md +95 -95
- package/skills/delta-shared/agents/openai.yaml +4 -4
- package/skills/manifest.json +19 -19
|
@@ -1,129 +1,129 @@
|
|
|
1
|
-
# LDM-BO 详细规则
|
|
2
|
-
|
|
3
|
-
所有调用直接使用 `delta-cli science invoke`,不是本地 PDF2Dock runner。仅用于小分子 SMILES;
|
|
4
|
-
抗体、CDRH3 或 AntBO 场景必须使用 AntBO 能力边界。
|
|
5
|
-
provider、模型路径、Vina/ReaSyn/GPU/LLM 配置由服务端注入,不放入请求 JSON。
|
|
6
|
-
|
|
7
|
-
## Health
|
|
8
|
-
|
|
9
|
-
operation:`health`,无 body。
|
|
10
|
-
|
|
11
|
-
The response reports whether the adapter can see the mounted PDF2Dock
|
|
12
|
-
interpreter, `bo_api.py`, Vina binary, ReaSyn repo/interpreter/checkpoints, NN
|
|
13
|
-
model files, cache directory, GPU settings, and LLM configuration. Missing LLM
|
|
14
|
-
settings degrade health because LDM methods need them.
|
|
15
|
-
|
|
16
|
-
## One-Step Recommend
|
|
17
|
-
|
|
18
|
-
operation:`recommend`。
|
|
19
|
-
|
|
20
|
-
Wraps `bo_api.recommend_next_smiles`.
|
|
21
|
-
|
|
22
|
-
Typical payload:
|
|
23
|
-
|
|
24
|
-
```json
|
|
25
|
-
{
|
|
26
|
-
"method": "bo-tanimoto",
|
|
27
|
-
"pool": ["CCO", "CCN", "CCC"],
|
|
28
|
-
"history": [
|
|
29
|
-
{"smiles": "CCO", "scores": [-7.1]},
|
|
30
|
-
{"smiles": "CCN", "scores": [-6.8]}
|
|
31
|
-
],
|
|
32
|
-
"batch_size": 1
|
|
33
|
-
}
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Typical business response inside the documented gateway `data`:
|
|
37
|
-
|
|
38
|
-
```json
|
|
39
|
-
{
|
|
40
|
-
"recommendations": ["CCC"],
|
|
41
|
-
"acquisition_values": [0.12],
|
|
42
|
-
"n_objectives": 1
|
|
43
|
-
}
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
LDM methods may include an `llm` diagnostics object.
|
|
47
|
-
|
|
48
|
-
`acquisition_values` 只能按业务响应原值报告。除非当前业务响应明确给出字段定义,否则
|
|
49
|
-
不得把它描述为预测 Vina、预测 objective、不确定性、置信度、expected improvement,
|
|
50
|
-
也不得自行判断“越大/越小越好”。服务未返回推荐理由时,明确写“服务未返回推荐
|
|
51
|
-
理由”,不得根据分子骨架、杂原子或模型机制补写解释。
|
|
52
|
-
|
|
53
|
-
## Full Trajectory
|
|
54
|
-
|
|
55
|
-
operation:`trajectory`。
|
|
56
|
-
|
|
57
|
-
Wraps `bo_api.run_search_trajectory`.
|
|
58
|
-
|
|
59
|
-
Small smoke payload:
|
|
60
|
-
|
|
61
|
-
```json
|
|
62
|
-
{
|
|
63
|
-
"method": "bo-tanimoto",
|
|
64
|
-
"seed": 42,
|
|
65
|
-
"seed-smiles": "CCO,CCN,CCC",
|
|
66
|
-
"num-evaluations": 4,
|
|
67
|
-
"batch-size": 1,
|
|
68
|
-
"objective": "vina+nn"
|
|
69
|
-
}
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
Typical business response inside the documented gateway `data`:
|
|
73
|
-
|
|
74
|
-
```json
|
|
75
|
-
{
|
|
76
|
-
"config": {},
|
|
77
|
-
"history": [],
|
|
78
|
-
"summary": {}
|
|
79
|
-
}
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
LDM methods may include `llm_trajectory`.
|
|
83
|
-
|
|
84
|
-
## Error Handling
|
|
85
|
-
|
|
86
|
-
The service maps `bo_api` error JSON to an upstream failure. The gateway
|
|
87
|
-
returns a standard error envelope:
|
|
88
|
-
|
|
89
|
-
```json
|
|
90
|
-
{
|
|
91
|
-
"code": 1,
|
|
92
|
-
"message": "AutoDock Vina executable not found...",
|
|
93
|
-
"data": {
|
|
94
|
-
"endpoint": "/v1/trajectory",
|
|
95
|
-
"ldm_bo_response": {
|
|
96
|
-
"error": "...",
|
|
97
|
-
"error_type": "ValueError",
|
|
98
|
-
"traceback": "Traceback ..."
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
Common causes are missing Vina, missing ReaSyn, wrong Python interpreter, CUDA
|
|
105
|
-
device mismatch, missing LLM credentials for LDM methods, or an unwritable Vina
|
|
106
|
-
cache directory.
|
|
107
|
-
|
|
108
|
-
## Provider Settings
|
|
109
|
-
|
|
110
|
-
Do not send provider settings in request JSON. The adapter reads these from
|
|
111
|
-
deployment config and passes them as Python kwargs to `bo_api`:
|
|
112
|
-
|
|
113
|
-
```text
|
|
114
|
-
vina_bin
|
|
115
|
-
vina_cache_dir
|
|
116
|
-
vina_max_workers
|
|
117
|
-
gp_device
|
|
118
|
-
reasyn_repo
|
|
119
|
-
reasyn_python_bin
|
|
120
|
-
reasyn_model_path
|
|
121
|
-
reasyn_devices
|
|
122
|
-
nn_model_path
|
|
123
|
-
nn_metadata_path
|
|
124
|
-
llm_model
|
|
125
|
-
llm_base_url
|
|
126
|
-
llm_api_key
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
The CLI forwards the user payload; `bo_api` owns business defaults and schema behavior.
|
|
1
|
+
# LDM-BO 详细规则
|
|
2
|
+
|
|
3
|
+
所有调用直接使用 `delta-cli science invoke`,不是本地 PDF2Dock runner。仅用于小分子 SMILES;
|
|
4
|
+
抗体、CDRH3 或 AntBO 场景必须使用 AntBO 能力边界。
|
|
5
|
+
provider、模型路径、Vina/ReaSyn/GPU/LLM 配置由服务端注入,不放入请求 JSON。
|
|
6
|
+
|
|
7
|
+
## Health
|
|
8
|
+
|
|
9
|
+
operation:`health`,无 body。
|
|
10
|
+
|
|
11
|
+
The response reports whether the adapter can see the mounted PDF2Dock
|
|
12
|
+
interpreter, `bo_api.py`, Vina binary, ReaSyn repo/interpreter/checkpoints, NN
|
|
13
|
+
model files, cache directory, GPU settings, and LLM configuration. Missing LLM
|
|
14
|
+
settings degrade health because LDM methods need them.
|
|
15
|
+
|
|
16
|
+
## One-Step Recommend
|
|
17
|
+
|
|
18
|
+
operation:`recommend`。
|
|
19
|
+
|
|
20
|
+
Wraps `bo_api.recommend_next_smiles`.
|
|
21
|
+
|
|
22
|
+
Typical payload:
|
|
23
|
+
|
|
24
|
+
```json
|
|
25
|
+
{
|
|
26
|
+
"method": "bo-tanimoto",
|
|
27
|
+
"pool": ["CCO", "CCN", "CCC"],
|
|
28
|
+
"history": [
|
|
29
|
+
{"smiles": "CCO", "scores": [-7.1]},
|
|
30
|
+
{"smiles": "CCN", "scores": [-6.8]}
|
|
31
|
+
],
|
|
32
|
+
"batch_size": 1
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Typical business response inside the documented gateway `data`:
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"recommendations": ["CCC"],
|
|
41
|
+
"acquisition_values": [0.12],
|
|
42
|
+
"n_objectives": 1
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
LDM methods may include an `llm` diagnostics object.
|
|
47
|
+
|
|
48
|
+
`acquisition_values` 只能按业务响应原值报告。除非当前业务响应明确给出字段定义,否则
|
|
49
|
+
不得把它描述为预测 Vina、预测 objective、不确定性、置信度、expected improvement,
|
|
50
|
+
也不得自行判断“越大/越小越好”。服务未返回推荐理由时,明确写“服务未返回推荐
|
|
51
|
+
理由”,不得根据分子骨架、杂原子或模型机制补写解释。
|
|
52
|
+
|
|
53
|
+
## Full Trajectory
|
|
54
|
+
|
|
55
|
+
operation:`trajectory`。
|
|
56
|
+
|
|
57
|
+
Wraps `bo_api.run_search_trajectory`.
|
|
58
|
+
|
|
59
|
+
Small smoke payload:
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"method": "bo-tanimoto",
|
|
64
|
+
"seed": 42,
|
|
65
|
+
"seed-smiles": "CCO,CCN,CCC",
|
|
66
|
+
"num-evaluations": 4,
|
|
67
|
+
"batch-size": 1,
|
|
68
|
+
"objective": "vina+nn"
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Typical business response inside the documented gateway `data`:
|
|
73
|
+
|
|
74
|
+
```json
|
|
75
|
+
{
|
|
76
|
+
"config": {},
|
|
77
|
+
"history": [],
|
|
78
|
+
"summary": {}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
LDM methods may include `llm_trajectory`.
|
|
83
|
+
|
|
84
|
+
## Error Handling
|
|
85
|
+
|
|
86
|
+
The service maps `bo_api` error JSON to an upstream failure. The gateway
|
|
87
|
+
returns a standard error envelope:
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"code": 1,
|
|
92
|
+
"message": "AutoDock Vina executable not found...",
|
|
93
|
+
"data": {
|
|
94
|
+
"endpoint": "/v1/trajectory",
|
|
95
|
+
"ldm_bo_response": {
|
|
96
|
+
"error": "...",
|
|
97
|
+
"error_type": "ValueError",
|
|
98
|
+
"traceback": "Traceback ..."
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Common causes are missing Vina, missing ReaSyn, wrong Python interpreter, CUDA
|
|
105
|
+
device mismatch, missing LLM credentials for LDM methods, or an unwritable Vina
|
|
106
|
+
cache directory.
|
|
107
|
+
|
|
108
|
+
## Provider Settings
|
|
109
|
+
|
|
110
|
+
Do not send provider settings in request JSON. The adapter reads these from
|
|
111
|
+
deployment config and passes them as Python kwargs to `bo_api`:
|
|
112
|
+
|
|
113
|
+
```text
|
|
114
|
+
vina_bin
|
|
115
|
+
vina_cache_dir
|
|
116
|
+
vina_max_workers
|
|
117
|
+
gp_device
|
|
118
|
+
reasyn_repo
|
|
119
|
+
reasyn_python_bin
|
|
120
|
+
reasyn_model_path
|
|
121
|
+
reasyn_devices
|
|
122
|
+
nn_model_path
|
|
123
|
+
nn_metadata_path
|
|
124
|
+
llm_model
|
|
125
|
+
llm_base_url
|
|
126
|
+
llm_api_key
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
The CLI forwards the user payload; `bo_api` owns business defaults and schema behavior.
|
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
# LDM 科研工作流
|
|
2
|
-
|
|
3
|
-
这里的 **LDM / 大发现模型** 是用户可见的科研工作流名称,不是可以直接访问网关的
|
|
4
|
-
tool。在线计算必须先按任务语义选择 `ldm-bo`、`strbo` 或 `antbo`,再通过
|
|
5
|
-
`delta-cli science invoke`
|
|
6
|
-
调用 Delta CLI;禁止运行旧 `large-discovery-model` Skill、`run_ldm_loop.py`、gateway
|
|
7
|
-
backend、`stream_widget` 中的联网命令或任何 HTTP 客户端。
|
|
8
|
-
|
|
9
|
-
## 路由
|
|
10
|
-
|
|
11
|
-
| 用户目标 | 实际 tool | 需要同时读取 |
|
|
12
|
-
| --- | --- | --- |
|
|
13
|
-
| 在给定 SMILES 候选池中推荐下一批,或运行 PDF2Dock/Vina+NN 轨迹 | `ldm-bo` | `references/ldm-bo.md` |
|
|
14
|
-
| 围绕服务端固定 KRAS G12D 生成、评估并迭代小分子 | `strbo` | `references/strbo.md` |
|
|
15
|
-
| 为指定抗原生成、评估并迭代 11-aa CDRH3 | `antbo` | `references/antbo.md` |
|
|
16
|
-
|
|
17
|
-
不得因为用户只说“LDM”“药物发现”就自动选择后端。根据实体、已有数据和目标判断;
|
|
18
|
-
仍无法区分时,结束并说明需要用户确认“小分子候选池、KRAS G12D 生成优化或抗体
|
|
19
|
-
CDRH3”中的哪一种。
|
|
20
|
-
|
|
21
|
-
## 最小执行范围
|
|
22
|
-
|
|
23
|
-
- 用户只要求检查参数时,只调用相应 `*-validate` operation。
|
|
24
|
-
- 用户只要求评估已有候选时,只调用 evaluate,不生成新候选。
|
|
25
|
-
- 用户只要求推荐下一批且已经给出历史记录时,只调用 suggest/recommend。
|
|
26
|
-
- 用户明确要求“完整迭代优化”时,才运行初始化、评估、建议、再评估的闭环。
|
|
27
|
-
- 用户未给轮数时,STRBO/AntBO 最多执行一个建议轮次;不得沿用旧 Skill 的 6/8 轮
|
|
28
|
-
隐式默认值。LDM-BO `trajectory` 的评估次数必须来自用户,缺失时先要求确认。
|
|
29
|
-
|
|
30
|
-
生成、评估、建议和 trajectory 都会消耗远端资源。一次自然语言中的“帮我优化”视为
|
|
31
|
-
执行授权,但不得擅自扩大候选数、轮数或切换后端。
|
|
32
|
-
|
|
33
|
-
## STRBO 完整闭环
|
|
34
|
-
|
|
35
|
-
1. 调用 `molecules-init` 或 `molecules-init-job`,取得初始 SMILES。
|
|
36
|
-
2. 调用 `molecules-evaluate` 或对应异步 operation,取得 `[vina, activity]`。
|
|
37
|
-
3. 使用当前成功业务响应中的 SMILES 和 scores 构造 `history_xs/history_ys`。
|
|
38
|
-
4. 调用一次 `molecules-suggest-job`,按 STRBO reference 轮询至成功。
|
|
39
|
-
5. 只评估新建议,并把结果与当前任务内历史合并后返回。
|
|
40
|
-
|
|
41
|
-
提交 operation 不得重试。任一步失败、超时或返回数量不一致,立即结束;不得用旧
|
|
42
|
-
gateway、离线 mock、本地 RDKit/Vina 或模型猜测补全。
|
|
43
|
-
|
|
44
|
-
## AntBO 完整闭环
|
|
45
|
-
|
|
46
|
-
1. 用户必须提供抗原;未提供时不得替用户选择。
|
|
47
|
-
2. 必要时调用一次 `ldm-health`,确认抗原与 CDRH3 长度约束。
|
|
48
|
-
3. 调用 `ldm-init` 取得初始 CDRH3,再调用 `evaluate` 取得结合能。
|
|
49
|
-
4. 使用当前成功业务响应构造一维 `history_ys`,调用一次 `ldm-suggest`。
|
|
50
|
-
5. 只评估新建议,并返回当前任务内的候选与结合能。
|
|
51
|
-
|
|
52
|
-
不得把 AntBO 的一维 score 改成 STRBO 的二维 score,也不得把 CDRH3 交给小分子
|
|
53
|
-
LDM-BO。
|
|
54
|
-
|
|
55
|
-
## 固定候选池与轨迹
|
|
56
|
-
|
|
57
|
-
- 已有候选池和历史分数,要求下一批:使用 `ldm-bo/recommend`。
|
|
58
|
-
- 用户明确要求完整 PDF2Dock/Vina+NN 搜索并给出评估次数:使用
|
|
59
|
-
`ldm-bo/trajectory`。
|
|
60
|
-
- 不得把 `ldm-bo` 的 provider、模型路径、密钥、GPU 或 Vina 配置放进请求;这些由
|
|
61
|
-
Science Server 管理。
|
|
62
|
-
|
|
63
|
-
## 结果与展示
|
|
64
|
-
|
|
65
|
-
只报告当前 Delta CLI 业务响应中真实存在的候选、目标值、warnings、job_id、状态和
|
|
66
|
-
服务端 provenance。不得自行添加相似度阈值、机制解释、湿实验结论或“最优”断言;
|
|
67
|
-
只有在方向明确且比较集合完整时,才能按实际目标值指出当前集合中的最好候选。
|
|
68
|
-
推荐结果中的 acquisition value 不是预测目标值、置信度或推荐理由;除非业务响应
|
|
69
|
-
明确给出语义和方向,否则只作为原始采集函数值报告。
|
|
70
|
-
|
|
71
|
-
LDM 的仪表盘是展示层,不是计算入口。用户明确要求图表时,先完成一次 CLI 计算,
|
|
72
|
-
再让外层使用同一份已验证结果绘图;禁止为了仪表盘再次提交远端任务。普通请求直接
|
|
73
|
-
返回简洁文本。
|
|
1
|
+
# LDM 科研工作流
|
|
2
|
+
|
|
3
|
+
这里的 **LDM / 大发现模型** 是用户可见的科研工作流名称,不是可以直接访问网关的
|
|
4
|
+
tool。在线计算必须先按任务语义选择 `ldm-bo`、`strbo` 或 `antbo`,再通过
|
|
5
|
+
`delta-cli science invoke`
|
|
6
|
+
调用 Delta CLI;禁止运行旧 `large-discovery-model` Skill、`run_ldm_loop.py`、gateway
|
|
7
|
+
backend、`stream_widget` 中的联网命令或任何 HTTP 客户端。
|
|
8
|
+
|
|
9
|
+
## 路由
|
|
10
|
+
|
|
11
|
+
| 用户目标 | 实际 tool | 需要同时读取 |
|
|
12
|
+
| --- | --- | --- |
|
|
13
|
+
| 在给定 SMILES 候选池中推荐下一批,或运行 PDF2Dock/Vina+NN 轨迹 | `ldm-bo` | `references/ldm-bo.md` |
|
|
14
|
+
| 围绕服务端固定 KRAS G12D 生成、评估并迭代小分子 | `strbo` | `references/strbo.md` |
|
|
15
|
+
| 为指定抗原生成、评估并迭代 11-aa CDRH3 | `antbo` | `references/antbo.md` |
|
|
16
|
+
|
|
17
|
+
不得因为用户只说“LDM”“药物发现”就自动选择后端。根据实体、已有数据和目标判断;
|
|
18
|
+
仍无法区分时,结束并说明需要用户确认“小分子候选池、KRAS G12D 生成优化或抗体
|
|
19
|
+
CDRH3”中的哪一种。
|
|
20
|
+
|
|
21
|
+
## 最小执行范围
|
|
22
|
+
|
|
23
|
+
- 用户只要求检查参数时,只调用相应 `*-validate` operation。
|
|
24
|
+
- 用户只要求评估已有候选时,只调用 evaluate,不生成新候选。
|
|
25
|
+
- 用户只要求推荐下一批且已经给出历史记录时,只调用 suggest/recommend。
|
|
26
|
+
- 用户明确要求“完整迭代优化”时,才运行初始化、评估、建议、再评估的闭环。
|
|
27
|
+
- 用户未给轮数时,STRBO/AntBO 最多执行一个建议轮次;不得沿用旧 Skill 的 6/8 轮
|
|
28
|
+
隐式默认值。LDM-BO `trajectory` 的评估次数必须来自用户,缺失时先要求确认。
|
|
29
|
+
|
|
30
|
+
生成、评估、建议和 trajectory 都会消耗远端资源。一次自然语言中的“帮我优化”视为
|
|
31
|
+
执行授权,但不得擅自扩大候选数、轮数或切换后端。
|
|
32
|
+
|
|
33
|
+
## STRBO 完整闭环
|
|
34
|
+
|
|
35
|
+
1. 调用 `molecules-init` 或 `molecules-init-job`,取得初始 SMILES。
|
|
36
|
+
2. 调用 `molecules-evaluate` 或对应异步 operation,取得 `[vina, activity]`。
|
|
37
|
+
3. 使用当前成功业务响应中的 SMILES 和 scores 构造 `history_xs/history_ys`。
|
|
38
|
+
4. 调用一次 `molecules-suggest-job`,按 STRBO reference 轮询至成功。
|
|
39
|
+
5. 只评估新建议,并把结果与当前任务内历史合并后返回。
|
|
40
|
+
|
|
41
|
+
提交 operation 不得重试。任一步失败、超时或返回数量不一致,立即结束;不得用旧
|
|
42
|
+
gateway、离线 mock、本地 RDKit/Vina 或模型猜测补全。
|
|
43
|
+
|
|
44
|
+
## AntBO 完整闭环
|
|
45
|
+
|
|
46
|
+
1. 用户必须提供抗原;未提供时不得替用户选择。
|
|
47
|
+
2. 必要时调用一次 `ldm-health`,确认抗原与 CDRH3 长度约束。
|
|
48
|
+
3. 调用 `ldm-init` 取得初始 CDRH3,再调用 `evaluate` 取得结合能。
|
|
49
|
+
4. 使用当前成功业务响应构造一维 `history_ys`,调用一次 `ldm-suggest`。
|
|
50
|
+
5. 只评估新建议,并返回当前任务内的候选与结合能。
|
|
51
|
+
|
|
52
|
+
不得把 AntBO 的一维 score 改成 STRBO 的二维 score,也不得把 CDRH3 交给小分子
|
|
53
|
+
LDM-BO。
|
|
54
|
+
|
|
55
|
+
## 固定候选池与轨迹
|
|
56
|
+
|
|
57
|
+
- 已有候选池和历史分数,要求下一批:使用 `ldm-bo/recommend`。
|
|
58
|
+
- 用户明确要求完整 PDF2Dock/Vina+NN 搜索并给出评估次数:使用
|
|
59
|
+
`ldm-bo/trajectory`。
|
|
60
|
+
- 不得把 `ldm-bo` 的 provider、模型路径、密钥、GPU 或 Vina 配置放进请求;这些由
|
|
61
|
+
Science Server 管理。
|
|
62
|
+
|
|
63
|
+
## 结果与展示
|
|
64
|
+
|
|
65
|
+
只报告当前 Delta CLI 业务响应中真实存在的候选、目标值、warnings、job_id、状态和
|
|
66
|
+
服务端 provenance。不得自行添加相似度阈值、机制解释、湿实验结论或“最优”断言;
|
|
67
|
+
只有在方向明确且比较集合完整时,才能按实际目标值指出当前集合中的最好候选。
|
|
68
|
+
推荐结果中的 acquisition value 不是预测目标值、置信度或推荐理由;除非业务响应
|
|
69
|
+
明确给出语义和方向,否则只作为原始采集函数值报告。
|
|
70
|
+
|
|
71
|
+
LDM 的仪表盘是展示层,不是计算入口。用户明确要求图表时,先完成一次 CLI 计算,
|
|
72
|
+
再让外层使用同一份已验证结果绘图;禁止为了仪表盘再次提交远端任务。普通请求直接
|
|
73
|
+
返回简洁文本。
|
|
@@ -1,126 +1,126 @@
|
|
|
1
|
-
# PubChem 详细规则
|
|
2
|
-
|
|
3
|
-
只能通过 `delta-cli science invoke` 调用。本文件中的业务响应位于 CLI 顶层 `data`;
|
|
4
|
-
只按本文件说明读取字段,不得递归搜索。本文件中的 URL 只用于说明 endpoint schema,
|
|
5
|
-
不授权直接 HTTP。普通名称基础查询只调用一次 `compound-summary`;多个名称
|
|
6
|
-
只调用一次 `compound-batch-summary`,默认 body 仅包含 `identifiers` 和
|
|
7
|
-
`namespace:"name"`,不得先调用 health/schema。
|
|
8
|
-
|
|
9
|
-
结果直接从 `data` 投影。批量记录位于 `data.results[*]`,原始标签在 `input`,
|
|
10
|
-
属性在嵌套 `properties`。SMILES 回退顺序固定为
|
|
11
|
-
`CanonicalSMILES -> ConnectivitySMILES -> SMILES -> IsomericSMILES`。
|
|
12
|
-
PubChem `XLogP` 与 RDKit `MolLogP` 不得互换;not_found 不得用本地计算补值。
|
|
13
|
-
|
|
14
|
-
Namespaces: `cid`, `name`, `smiles`, `inchi`, `inchikey`, `formula`.
|
|
15
|
-
|
|
16
|
-
## Health
|
|
17
|
-
|
|
18
|
-
operation:`health`,无 body。
|
|
19
|
-
|
|
20
|
-
## Resolve CIDs
|
|
21
|
-
|
|
22
|
-
operation:`compound-resolve-cids`。
|
|
23
|
-
|
|
24
|
-
```json
|
|
25
|
-
{"identifier": "aspirin", "namespace": "name", "max_records": 20}
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
`max_records`: 1-100.
|
|
29
|
-
|
|
30
|
-
## Properties
|
|
31
|
-
|
|
32
|
-
operation:`compound-properties`。
|
|
33
|
-
|
|
34
|
-
```json
|
|
35
|
-
{
|
|
36
|
-
"identifier": "2244",
|
|
37
|
-
"namespace": "cid",
|
|
38
|
-
"properties": ["MolecularFormula", "MolecularWeight", "CanonicalSMILES", "IUPACName"]
|
|
39
|
-
}
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Allowed properties include `MolecularFormula`, `MolecularWeight`,
|
|
43
|
-
`CanonicalSMILES`, `IsomericSMILES`, `SMILES`, `ConnectivitySMILES`,
|
|
44
|
-
`IUPACName`, `InChI`, `InChIKey`, `XLogP`, `TPSA`, `HBondDonorCount`,
|
|
45
|
-
`HBondAcceptorCount`, `RotatableBondCount`, `ExactMass`, `MonoisotopicMass`,
|
|
46
|
-
`Charge`, `HeavyAtomCount`, `Complexity`, `CovalentUnitCount`,
|
|
47
|
-
`DefinedAtomStereoCount`, `UndefinedAtomStereoCount`, `DefinedBondStereoCount`,
|
|
48
|
-
`UndefinedBondStereoCount`, and `IsotopeAtomCount`.
|
|
49
|
-
|
|
50
|
-
## Synonyms
|
|
51
|
-
|
|
52
|
-
operation:`compound-synonyms`。
|
|
53
|
-
|
|
54
|
-
```json
|
|
55
|
-
{"identifier": "2244", "namespace": "cid", "max_synonyms": 50}
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
`max_synonyms`: 1-500.
|
|
59
|
-
|
|
60
|
-
## Summary
|
|
61
|
-
|
|
62
|
-
operation:`compound-summary`。
|
|
63
|
-
|
|
64
|
-
```json
|
|
65
|
-
{
|
|
66
|
-
"identifier": "aspirin",
|
|
67
|
-
"namespace": "name",
|
|
68
|
-
"properties": ["MolecularFormula", "MolecularWeight", "CanonicalSMILES", "IUPACName"],
|
|
69
|
-
"synonym_limit": 20
|
|
70
|
-
}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
`synonym_limit`: 0-100. Use this endpoint for general compound lookup because
|
|
74
|
-
it resolves CID, selected properties, and synonyms in one call.
|
|
75
|
-
|
|
76
|
-
Response fields include `valid`, `cid`, `properties`, `properties_raw`,
|
|
77
|
-
`aliases`, `synonyms`, and `metadata`. Numeric properties are coerced to JSON
|
|
78
|
-
numbers when possible. Requested SMILES aliases are filled when PubChem returns
|
|
79
|
-
an equivalent key such as `ConnectivitySMILES`.
|
|
80
|
-
|
|
81
|
-
## Batch Summary
|
|
82
|
-
|
|
83
|
-
operation:`compound-batch-summary`。
|
|
84
|
-
|
|
85
|
-
```json
|
|
86
|
-
{
|
|
87
|
-
"identifiers": ["aspirin", "ibuprofen", "caffeine"],
|
|
88
|
-
"namespace": "name",
|
|
89
|
-
"properties": ["MolecularFormula", "MolecularWeight", "CanonicalSMILES", "XLogP", "TPSA"],
|
|
90
|
-
"synonym_limit": 5
|
|
91
|
-
}
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
Limits: 1-100 identifiers. The response preserves input order and includes
|
|
95
|
-
per-item errors:
|
|
96
|
-
|
|
97
|
-
```json
|
|
98
|
-
{
|
|
99
|
-
"valid": false,
|
|
100
|
-
"namespace": "name",
|
|
101
|
-
"properties_requested": ["CanonicalSMILES"],
|
|
102
|
-
"results": [
|
|
103
|
-
{
|
|
104
|
-
"input": "aspirin",
|
|
105
|
-
"valid": true,
|
|
106
|
-
"cid": 2244,
|
|
107
|
-
"properties": {
|
|
108
|
-
"CanonicalSMILES": "CC(=O)Oc1ccccc1C(=O)O",
|
|
109
|
-
"ConnectivitySMILES": "CC(=O)Oc1ccccc1C(=O)O",
|
|
110
|
-
"_aliases": {"CanonicalSMILES": "ConnectivitySMILES"},
|
|
111
|
-
"properties_raw": {}
|
|
112
|
-
},
|
|
113
|
-
"properties_raw": {},
|
|
114
|
-
"aliases": {"CanonicalSMILES": "ConnectivitySMILES"},
|
|
115
|
-
"synonyms": []
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
"input": "bad-name",
|
|
119
|
-
"valid": false,
|
|
120
|
-
"error": "not found"
|
|
121
|
-
}
|
|
122
|
-
],
|
|
123
|
-
"count": 2,
|
|
124
|
-
"failed_count": 1
|
|
125
|
-
}
|
|
126
|
-
```
|
|
1
|
+
# PubChem 详细规则
|
|
2
|
+
|
|
3
|
+
只能通过 `delta-cli science invoke` 调用。本文件中的业务响应位于 CLI 顶层 `data`;
|
|
4
|
+
只按本文件说明读取字段,不得递归搜索。本文件中的 URL 只用于说明 endpoint schema,
|
|
5
|
+
不授权直接 HTTP。普通名称基础查询只调用一次 `compound-summary`;多个名称
|
|
6
|
+
只调用一次 `compound-batch-summary`,默认 body 仅包含 `identifiers` 和
|
|
7
|
+
`namespace:"name"`,不得先调用 health/schema。
|
|
8
|
+
|
|
9
|
+
结果直接从 `data` 投影。批量记录位于 `data.results[*]`,原始标签在 `input`,
|
|
10
|
+
属性在嵌套 `properties`。SMILES 回退顺序固定为
|
|
11
|
+
`CanonicalSMILES -> ConnectivitySMILES -> SMILES -> IsomericSMILES`。
|
|
12
|
+
PubChem `XLogP` 与 RDKit `MolLogP` 不得互换;not_found 不得用本地计算补值。
|
|
13
|
+
|
|
14
|
+
Namespaces: `cid`, `name`, `smiles`, `inchi`, `inchikey`, `formula`.
|
|
15
|
+
|
|
16
|
+
## Health
|
|
17
|
+
|
|
18
|
+
operation:`health`,无 body。
|
|
19
|
+
|
|
20
|
+
## Resolve CIDs
|
|
21
|
+
|
|
22
|
+
operation:`compound-resolve-cids`。
|
|
23
|
+
|
|
24
|
+
```json
|
|
25
|
+
{"identifier": "aspirin", "namespace": "name", "max_records": 20}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
`max_records`: 1-100.
|
|
29
|
+
|
|
30
|
+
## Properties
|
|
31
|
+
|
|
32
|
+
operation:`compound-properties`。
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"identifier": "2244",
|
|
37
|
+
"namespace": "cid",
|
|
38
|
+
"properties": ["MolecularFormula", "MolecularWeight", "CanonicalSMILES", "IUPACName"]
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Allowed properties include `MolecularFormula`, `MolecularWeight`,
|
|
43
|
+
`CanonicalSMILES`, `IsomericSMILES`, `SMILES`, `ConnectivitySMILES`,
|
|
44
|
+
`IUPACName`, `InChI`, `InChIKey`, `XLogP`, `TPSA`, `HBondDonorCount`,
|
|
45
|
+
`HBondAcceptorCount`, `RotatableBondCount`, `ExactMass`, `MonoisotopicMass`,
|
|
46
|
+
`Charge`, `HeavyAtomCount`, `Complexity`, `CovalentUnitCount`,
|
|
47
|
+
`DefinedAtomStereoCount`, `UndefinedAtomStereoCount`, `DefinedBondStereoCount`,
|
|
48
|
+
`UndefinedBondStereoCount`, and `IsotopeAtomCount`.
|
|
49
|
+
|
|
50
|
+
## Synonyms
|
|
51
|
+
|
|
52
|
+
operation:`compound-synonyms`。
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{"identifier": "2244", "namespace": "cid", "max_synonyms": 50}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
`max_synonyms`: 1-500.
|
|
59
|
+
|
|
60
|
+
## Summary
|
|
61
|
+
|
|
62
|
+
operation:`compound-summary`。
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"identifier": "aspirin",
|
|
67
|
+
"namespace": "name",
|
|
68
|
+
"properties": ["MolecularFormula", "MolecularWeight", "CanonicalSMILES", "IUPACName"],
|
|
69
|
+
"synonym_limit": 20
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
`synonym_limit`: 0-100. Use this endpoint for general compound lookup because
|
|
74
|
+
it resolves CID, selected properties, and synonyms in one call.
|
|
75
|
+
|
|
76
|
+
Response fields include `valid`, `cid`, `properties`, `properties_raw`,
|
|
77
|
+
`aliases`, `synonyms`, and `metadata`. Numeric properties are coerced to JSON
|
|
78
|
+
numbers when possible. Requested SMILES aliases are filled when PubChem returns
|
|
79
|
+
an equivalent key such as `ConnectivitySMILES`.
|
|
80
|
+
|
|
81
|
+
## Batch Summary
|
|
82
|
+
|
|
83
|
+
operation:`compound-batch-summary`。
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"identifiers": ["aspirin", "ibuprofen", "caffeine"],
|
|
88
|
+
"namespace": "name",
|
|
89
|
+
"properties": ["MolecularFormula", "MolecularWeight", "CanonicalSMILES", "XLogP", "TPSA"],
|
|
90
|
+
"synonym_limit": 5
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Limits: 1-100 identifiers. The response preserves input order and includes
|
|
95
|
+
per-item errors:
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"valid": false,
|
|
100
|
+
"namespace": "name",
|
|
101
|
+
"properties_requested": ["CanonicalSMILES"],
|
|
102
|
+
"results": [
|
|
103
|
+
{
|
|
104
|
+
"input": "aspirin",
|
|
105
|
+
"valid": true,
|
|
106
|
+
"cid": 2244,
|
|
107
|
+
"properties": {
|
|
108
|
+
"CanonicalSMILES": "CC(=O)Oc1ccccc1C(=O)O",
|
|
109
|
+
"ConnectivitySMILES": "CC(=O)Oc1ccccc1C(=O)O",
|
|
110
|
+
"_aliases": {"CanonicalSMILES": "ConnectivitySMILES"},
|
|
111
|
+
"properties_raw": {}
|
|
112
|
+
},
|
|
113
|
+
"properties_raw": {},
|
|
114
|
+
"aliases": {"CanonicalSMILES": "ConnectivitySMILES"},
|
|
115
|
+
"synonyms": []
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"input": "bad-name",
|
|
119
|
+
"valid": false,
|
|
120
|
+
"error": "not found"
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"count": 2,
|
|
124
|
+
"failed_count": 1
|
|
125
|
+
}
|
|
126
|
+
```
|