@delta-infra/cli 1.1.17 → 1.1.19

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.
Files changed (77) hide show
  1. package/README.md +520 -506
  2. package/checksums.txt +5 -5
  3. package/package.json +3 -2
  4. package/scripts/install-wizard.js +688 -701
  5. package/scripts/install.js +442 -442
  6. package/scripts/run.js +65 -65
  7. package/skills/delta-protein/AGENTS.md +73 -0
  8. package/skills/delta-protein/SKILL.md +389 -0
  9. package/skills/delta-protein/agents/openai.yaml +4 -0
  10. package/skills/delta-protein/references/bfitter.md +64 -0
  11. package/skills/delta-protein/references/catapro_predict.md +63 -0
  12. package/skills/delta-protein/references/catpred_predict.md +65 -0
  13. package/skills/delta-protein/references/caver_tunnel_analyze.md +63 -0
  14. package/skills/delta-protein/references/consensus_mutation.md +61 -0
  15. package/skills/delta-protein/references/consurf_predict.md +67 -0
  16. package/skills/delta-protein/references/crop_sequence.md +69 -0
  17. package/skills/delta-protein/references/dock.md +82 -0
  18. package/skills/delta-protein/references/dock_score.md +70 -0
  19. package/skills/delta-protein/references/easifa_predict_active_site.md +70 -0
  20. package/skills/delta-protein/references/ephod_predict_mutation.md +66 -0
  21. package/skills/delta-protein/references/ephod_predict_protein.md +61 -0
  22. package/skills/delta-protein/references/esmfold2_predict.md +67 -0
  23. package/skills/delta-protein/references/evcouplings_mutation.md +64 -0
  24. package/skills/delta-protein/references/fasta_to_sequence.md +59 -0
  25. package/skills/delta-protein/references/foldseek.md +61 -0
  26. package/skills/delta-protein/references/generate_msa.md +61 -0
  27. package/skills/delta-protein/references/interpro_analyze.md +63 -0
  28. package/skills/delta-protein/references/mpnn_design_sequence.md +71 -0
  29. package/skills/delta-protein/references/multievolve.md +73 -0
  30. package/skills/delta-protein/references/pisa_query.md +70 -0
  31. package/skills/delta-protein/references/plip_analyze.md +65 -0
  32. package/skills/delta-protein/references/pocket_prediction.md +63 -0
  33. package/skills/delta-protein/references/protein_design.md +65 -0
  34. package/skills/delta-protein/references/protein_evolution.md +77 -0
  35. package/skills/delta-protein/references/protein_sol_predict_mutation.md +66 -0
  36. package/skills/delta-protein/references/protein_sol_predict_protein.md +61 -0
  37. package/skills/delta-protein/references/protenix.md +66 -0
  38. package/skills/delta-protein/references/protrek_search.md +90 -0
  39. package/skills/delta-protein/references/pubchem_search.md +68 -0
  40. package/skills/delta-protein/references/pubmed_search.md +79 -0
  41. package/skills/delta-protein/references/reap_design_primer.md +69 -0
  42. package/skills/delta-protein/references/rfd3_design.md +65 -0
  43. package/skills/delta-protein/references/structure_to_sequence.md +61 -0
  44. package/skills/delta-protein/references/summarize_result.md +68 -0
  45. package/skills/delta-protein/references/surface_charge.md +84 -0
  46. package/skills/delta-protein/references/uniprot_batch_query.md +63 -0
  47. package/skills/delta-protein/references/uniprot_query.md +64 -0
  48. package/skills/delta-protein/references/zero_shot_mutant_candidates.md +76 -0
  49. package/skills/delta-protein/scripts/gen_references.py +167 -0
  50. package/skills/delta-protein/scripts/output_metadata.json +275 -0
  51. package/skills/delta-sandbox/SKILL.md +388 -388
  52. package/skills/delta-sandbox/agents/openai.yaml +4 -4
  53. package/skills/delta-sandbox/references/commands.md +58 -58
  54. package/skills/delta-sandbox/references/lifecycle.md +100 -100
  55. package/skills/delta-sandbox/references/recipes.md +138 -138
  56. package/skills/delta-science/AGENTS.md +47 -47
  57. package/skills/delta-science/SKILL.md +227 -185
  58. package/skills/delta-science/agents/openai.yaml +4 -4
  59. package/skills/delta-science/references/antbo.md +105 -100
  60. package/skills/delta-science/references/delta-bo.md +92 -89
  61. package/skills/delta-science/references/gsasii.md +118 -116
  62. package/skills/delta-science/references/lammps.md +68 -66
  63. package/skills/delta-science/references/ldm-bo.md +132 -129
  64. package/skills/delta-science/references/materials-design.md +130 -118
  65. package/skills/delta-science/references/pubchem.md +128 -126
  66. package/skills/delta-science/references/pymatgen.md +69 -68
  67. package/skills/delta-science/references/qe.md +134 -125
  68. package/skills/delta-science/references/rdkit.md +141 -138
  69. package/skills/delta-science/references/strbo.md +95 -87
  70. package/skills/delta-science/references/synbo.md +201 -198
  71. package/skills/delta-science/references/xrd.md +619 -101
  72. package/skills/delta-science/scripts/catalog.py +92 -92
  73. package/skills/delta-science/scripts/generated_catalog.py +69 -69
  74. package/skills/delta-science/scripts/invoke.py +346 -346
  75. package/skills/delta-shared/SKILL.md +113 -111
  76. package/skills/delta-shared/agents/openai.yaml +4 -4
  77. package/skills/manifest.json +20 -19
@@ -1,118 +1,130 @@
1
- # Materials Design 详细规则
2
-
3
- Materials Design 用于从实验或计算材料表格中建立 surrogate、验证模型、定义可行候选空间,
4
- 并生成带不确定性的候选排序。推荐是待验证假设,不是已确认材料、合成方案或实验结果。
5
-
6
- 本 reference 的路由标签是 `materials-design`。`tools.name` 和
7
- `tool_endpoints.name` 仍以当前 `delta-cli science list` 和
8
- `delta-cli science endpoints list <tool>` 的返回为准;下列 Gateway 路径只是服务契约,
9
- 不是可以直接拼接或访问的 URL。
10
-
11
- ## 服务边界
12
-
13
- 服务提供以下能力:
14
-
15
- | 服务路径 | 作用 | 结果边界 |
16
- | --- | --- | --- |
17
- | `/chem/materials-design/health` | Gateway 到服务的就绪检查 | `status`、依赖可用性、limits |
18
- | `/chem/materials-design/v1/capabilities` | 输入格式、模型、验证模式和限制 | 能力目录 |
19
- | `/chem/materials-design/v1/jobs` | 上传训练/候选表并创建异步作业 | `202`、`job_id`、状态和 links |
20
- | `/chem/materials-design/v1/jobs/{job_id}` | 查询作业 | `status`、`result_status`、result、warnings |
21
- | `/chem/materials-design/v1/jobs/{job_id}/cancel` | 请求取消 | 取消请求/终态 |
22
- | `/chem/materials-design/v1/jobs/{job_id}/artifacts` | 列出产物 | name、size、media_type、SHA-256 |
23
- | `/chem/materials-design/v1/jobs/{job_id}/artifacts/{path}` | 下载单个产物 | 原始 report/JSON/CSV/figure bytes |
24
-
25
- 所有 JSON/query 调用都必须走:
26
-
27
- ```text
28
- delta-cli science invoke --tool TOOL --endpoint ENDPOINT --data JSON
29
- ```
30
-
31
- 训练表提交使用受控文件 adapter:
32
-
33
- ```text
34
- delta-cli science file invoke --tool materials-design --endpoint job-submit \
35
- --file train.xlsx --candidate-file candidates.xlsx --data CONFIG_JSON
36
- delta-cli science task submit --tool materials-design --operation job-status \
37
- --input '{"job_id":"mdjob_..."}' --wait
38
- delta-cli science file download --tool materials-design --endpoint artifact-download \
39
- --params '{"job_id":"mdjob_...","artifact_path":"report.html"}' --output report.html
40
- ```
41
-
42
- 只读 query operation 才使用 `--params JSON`。如果新工具尚未出现在目录中,或目录没有
43
- 返回足够的请求 schema,停止并报告未暴露;不要猜测 endpoint 名、body 或兼容别名。
44
-
45
- ## CLI 能力边界
46
-
47
- `POST /v1/jobs` 的原始服务请求是 `multipart/form-data`,至少包含:
48
-
49
- ```text
50
- file=<training table>
51
- candidate_file=<optional candidate table>
52
- config=<serialized JSON object>
53
- ```
54
-
55
- `science invoke` 只接受 JSON object body 和 JSON query 参数,不能表达 multipart;因此不能
56
- 把本地路径或 base64 伪装成文件字段。artifact 下载同样是原始 bytes,必须通过
57
- `science file download` 保存并校验,不能当作普通 JSON 结果。不得调用
58
- `materials-design-service:8900` 或直连 preflight Gateway。
59
-
60
- ## 输入与配置
61
-
62
- 开始建模前必须确认:
63
-
64
- - `feature_columns`、`controllable_columns`、`target_column` 或 `objectives`;
65
- - identifier、metadata、leakage、post-measurement、group/time 列及单位;
66
- - 目标方向、可行性约束、候选表或候选生成规则;
67
- - 缺失值、重复样本、测量条件、数据来源和验证切分策略。
68
-
69
- 单目标配置的核心字段:
70
-
71
- ```json
72
- {
73
- "feature_columns": ["Bi", "In", "Ti"],
74
- "controllable_columns": ["Bi", "In", "Ti"],
75
- "identifier_columns": ["sample_id"],
76
- "target_column": "T",
77
- "target_direction": "maximize",
78
- "validation": {"strategy": "kfold", "n_splits": 5},
79
- "model_names": ["ExtraTrees", "GPR", "Ridge"],
80
- "random_state": 42,
81
- "recommendation_count": 10
82
- }
83
- ```
84
-
85
- 多目标使用 `objectives: [{"target_column": "...", "direction": "maximize|minimize"}]`
86
- 和显式的 Pareto/EHVI 配置。优先传入用户的 `candidate_file`;若服务按观测范围生成
87
- 候选,必须显式保留 steps、hard constraints、composition closure、`max_candidates` 和
88
- `allow_extrapolation`。禁止优化 identifier、测量后变量、泄漏列或未获授权的域外点,禁止
89
- 为填充候选数而任意外推。
90
-
91
- ## 结果处理
92
-
93
- 作业 `status` 与 `result_status` 必须分开判断:
94
-
95
- - `status`:`pending`、`running`、`completed`、`failed`、`cancelled`;
96
- - `result_status`:`complete`、`exploratory`、`readiness_only` 或 `failed`。
97
-
98
- `202` 只表示服务已接收/排队,不表示模型训练完成;`completed` 也不表示排序可靠。
99
- 只有在 `result_status` 为 `complete` 时才能说数据和验证支持候选排序;`exploratory` 只能
100
- 作为学习假设;`readiness_only` 要读取 readiness 信息并请求缺失输入;`failed` 原样报告。
101
- 始终保留服务返回的 validation、ranking、warnings 和 error。
102
-
103
- 预测结果必须和观测值、交叉验证预测区分。报告至少说明数据覆盖、切分、模型比较、
104
- 不确定性校准、候选可行性、域内/域外状态、EI/PI/UCB 或 Pareto 设置,以及后续实验验证
105
- 计划;不要用模型方差冒充实验误差或把候选预测写成实测值。
106
-
107
- ## Artifact 与错误
108
-
109
- 只有用户要求或工作流需要时才读取 artifacts。按 listing 返回的 `size`、`media_type` 和
110
- SHA-256 校验下载内容;不能凭文件名猜格式。服务可能产生 `report.html`、`result.json`、
111
- `data_dictionary.json`、`model_comparison.csv`、OOF/残差/校准文件、`search_space.json`、
112
- `candidate_predictions.csv`、`shortlist.csv`、`recommendation_views.csv`、
113
- `pareto_front.csv` 和 `figures/*`。
114
-
115
- 常见终止条件包括配置/文件格式错误、缺目标或候选空间、超出上传/行数/候选数限制、
116
- 后端未就绪、作业不存在和 artifact 不存在。提交超时或连接中断时不要盲目重试:multipart
117
- 上传可能已经创建作业,先检查是否已经得到 `job_id`。失败或空推荐不得用本地回归、GP、
118
- 随机数或人工排序替代。
1
+ # Materials Design reference
2
+
3
+ Materials Design builds surrogate models from experimental or computational materials tables,
4
+ validates models, defines feasible candidate spaces, and ranks candidates with uncertainty
5
+ estimates. Recommendations are hypotheses to validate, not confirmed materials, synthesis routes
6
+ or experimental results.
7
+
8
+ The routing label for this reference is `materials-design`. Use the current output of
9
+ `delta-cli science list` and `delta-cli science endpoints list <tool>` as the authority for
10
+ `tools.name` and `tool_endpoints.name`. The Gateway paths below describe the service contract;
11
+ they are not URLs to construct or access directly.
12
+
13
+ ## Service boundary
14
+
15
+ The service provides the following capabilities:
16
+
17
+ | Service path | Purpose | Result boundary |
18
+ | --- | --- | --- |
19
+ | `/chem/materials-design/health` | Gateway-to-service readiness check | `status`, dependency availability, limits |
20
+ | `/chem/materials-design/v1/capabilities` | Input formats, models, validation modes and limits | Capability catalogue |
21
+ | `/chem/materials-design/v1/jobs` | Upload training/candidate tables and create an asynchronous job | `202`, `job_id`, status and links |
22
+ | `/chem/materials-design/v1/jobs/{job_id}` | Read job status | `status`, `result_status`, result, warnings |
23
+ | `/chem/materials-design/v1/jobs/{job_id}/cancel` | Request cancellation | Cancellation request/final state |
24
+ | `/chem/materials-design/v1/jobs/{job_id}/artifacts` | List artifacts | name, size, media_type, SHA-256 |
25
+ | `/chem/materials-design/v1/jobs/{job_id}/artifacts/{path}` | Download one artifact | Raw report/JSON/CSV/figure bytes |
26
+
27
+ Route all JSON/query calls through:
28
+
29
+ ```text
30
+ delta-cli science invoke --tool TOOL --endpoint ENDPOINT --data JSON
31
+ ```
32
+
33
+ Submit training tables through the controlled file adapter:
34
+
35
+ ```text
36
+ delta-cli science file invoke --tool materials-design --endpoint job-submit \
37
+ --file train.xlsx --candidate-file candidates.xlsx --data CONFIG_JSON
38
+ delta-cli science task submit --tool materials-design --operation job-status \
39
+ --input '{"job_id":"mdjob_..."}' --wait
40
+ delta-cli science file download --tool materials-design --endpoint artifact-download \
41
+ --params '{"job_id":"mdjob_...","artifact_path":"report.html"}' --output report.html
42
+ ```
43
+
44
+ Use `--params JSON` only for read-only query operations. If a new tool is absent from the
45
+ catalogue, or the catalogue does not return enough request-schema detail, stop and report that it
46
+ is not exposed. Do not guess endpoint names, bodies or compatibility aliases.
47
+
48
+ ## CLI capability boundaries
49
+
50
+ The raw service request for `POST /v1/jobs` is `multipart/form-data` and contains at least:
51
+
52
+ ```text
53
+ file=<training table>
54
+ candidate_file=<optional candidate table>
55
+ config=<serialized JSON object>
56
+ ```
57
+
58
+ `science invoke` accepts only a JSON object body and JSON query parameters; it cannot express
59
+ multipart data. Do not disguise a local path or base64 as a file field. Artifact downloads are
60
+ also raw bytes: save and verify them with `science file download`, and do not treat them as
61
+ ordinary JSON results. Do not call `materials-design-service:8900` or connect directly to the
62
+ preflight Gateway.
63
+
64
+ ## Inputs and configuration
65
+
66
+ Before modelling, confirm:
67
+
68
+ - `feature_columns`, `controllable_columns`, `target_column` or `objectives`;
69
+ - identifier, metadata, leakage, post-measurement and group/time columns, and their units;
70
+ - objective direction, feasibility constraints, candidate table or candidate-generation rules;
71
+ - missing values, duplicate samples, measurement conditions, data sources and validation split strategy.
72
+
73
+ Core fields for a single-objective configuration:
74
+
75
+ ```json
76
+ {
77
+ "feature_columns": ["Bi", "In", "Ti"],
78
+ "controllable_columns": ["Bi", "In", "Ti"],
79
+ "identifier_columns": ["sample_id"],
80
+ "target_column": "T",
81
+ "target_direction": "maximize",
82
+ "validation": {"strategy": "kfold", "n_splits": 5},
83
+ "model_names": ["ExtraTrees", "GPR", "Ridge"],
84
+ "random_state": 42,
85
+ "recommendation_count": 10
86
+ }
87
+ ```
88
+
89
+ For multiple objectives, use `objectives: [{"target_column": "...", "direction": "maximize|minimize"}]`
90
+ and explicit Pareto/EHVI settings. Prefer the user's `candidate_file`. If the service generates
91
+ candidates from observed ranges, explicitly preserve steps, hard constraints, composition
92
+ closure, `max_candidates` and `allow_extrapolation`. Do not optimise identifier, post-measurement
93
+ or leakage columns, or out-of-domain points without authorisation. Do not extrapolate arbitrarily
94
+ to fill the candidate count.
95
+
96
+ ## Results handling
97
+
98
+ Assess job `status` and `result_status` separately:
99
+
100
+ - `status`: `pending`, `running`, `completed`, `failed` or `cancelled`;
101
+ - `result_status`: `complete`, `exploratory`, `readiness_only` or `failed`.
102
+
103
+ `202` means only that the service accepted or queued the job; it does not mean model training is
104
+ complete. `completed` does not mean the ranking is reliable. Say that the data and validation
105
+ support candidate ranking only when `result_status` is `complete`. Treat `exploratory` only as a
106
+ learning hypothesis; for `readiness_only`, read the readiness information and request missing
107
+ inputs; report `failed` as returned. Always preserve the returned validation, ranking, warnings
108
+ and error.
109
+
110
+ Keep predictions distinct from observations and cross-validation predictions. At minimum, report
111
+ data coverage, the split, model comparisons, uncertainty calibration, candidate feasibility,
112
+ in-domain/out-of-domain status, EI/PI/UCB or Pareto settings, and the plan for experimental
113
+ validation. Do not present model variance as experimental error or candidate predictions as
114
+ measured values.
115
+
116
+ ## Artifacts and errors
117
+
118
+ Read artifacts only when the user asks for them or the workflow requires them. Verify downloaded
119
+ content against the `size`, `media_type` and SHA-256 returned by the listing; do not infer formats
120
+ from filenames. The service may produce `report.html`, `result.json`,
121
+ `data_dictionary.json`, `model_comparison.csv`, OOF/residual/calibration files,
122
+ `search_space.json`, `candidate_predictions.csv`, `shortlist.csv`, `recommendation_views.csv`,
123
+ `pareto_front.csv` and `figures/*`.
124
+
125
+ Common terminal conditions include configuration/file-format errors, a missing target or
126
+ candidate space, upload/row/candidate-count limits being exceeded, an unready backend, or a
127
+ missing job or artifact. Do not retry blindly after a submission timeout or disconnection: a
128
+ multipart upload may already have created a job, so first check whether a `job_id` was returned.
129
+ Do not replace a failure or empty recommendation with local regression, GP, random numbers or a
130
+ manual ranking.
@@ -1,126 +1,128 @@
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 reference
2
+
3
+ Call this tool only through `delta-cli science invoke`. Business responses are in the top-level
4
+ CLI `data`; read only the fields described here and do not search recursively. URLs in this file
5
+ explain the endpoint schema and do not authorise direct HTTP access. For a basic lookup by a
6
+ single common name, call `compound-summary` once. For multiple names, call
7
+ `compound-batch-summary` once with a default body containing only `identifiers` and
8
+ `namespace:"name"`; do not call health or schema first.
9
+
10
+ Project results directly from `data`. Batch records are in `data.results[*]`, the original label
11
+ is in `input`, and properties are nested under `properties`. Use this fixed SMILES fallback
12
+ order: `CanonicalSMILES -> ConnectivitySMILES -> SMILES -> IsomericSMILES`. Do not treat PubChem
13
+ `XLogP` and RDKit `MolLogP` as interchangeable; do not fill a `not_found` result with local
14
+ calculations.
15
+
16
+ Namespaces: `cid`, `name`, `smiles`, `inchi`, `inchikey`, `formula`.
17
+
18
+ ## Health
19
+
20
+ Operation: `health`; no request body.
21
+
22
+ ## Resolve CIDs
23
+
24
+ Operation: `compound-resolve-cids`.
25
+
26
+ ```json
27
+ {"identifier": "aspirin", "namespace": "name", "max_records": 20}
28
+ ```
29
+
30
+ `max_records`: 1-100.
31
+
32
+ ## Properties
33
+
34
+ Operation: `compound-properties`.
35
+
36
+ ```json
37
+ {
38
+ "identifier": "2244",
39
+ "namespace": "cid",
40
+ "properties": ["MolecularFormula", "MolecularWeight", "CanonicalSMILES", "IUPACName"]
41
+ }
42
+ ```
43
+
44
+ Allowed properties include `MolecularFormula`, `MolecularWeight`,
45
+ `CanonicalSMILES`, `IsomericSMILES`, `SMILES`, `ConnectivitySMILES`,
46
+ `IUPACName`, `InChI`, `InChIKey`, `XLogP`, `TPSA`, `HBondDonorCount`,
47
+ `HBondAcceptorCount`, `RotatableBondCount`, `ExactMass`, `MonoisotopicMass`,
48
+ `Charge`, `HeavyAtomCount`, `Complexity`, `CovalentUnitCount`,
49
+ `DefinedAtomStereoCount`, `UndefinedAtomStereoCount`, `DefinedBondStereoCount`,
50
+ `UndefinedBondStereoCount`, and `IsotopeAtomCount`.
51
+
52
+ ## Synonyms
53
+
54
+ Operation: `compound-synonyms`.
55
+
56
+ ```json
57
+ {"identifier": "2244", "namespace": "cid", "max_synonyms": 50}
58
+ ```
59
+
60
+ `max_synonyms`: 1-500.
61
+
62
+ ## Summary
63
+
64
+ Operation: `compound-summary`.
65
+
66
+ ```json
67
+ {
68
+ "identifier": "aspirin",
69
+ "namespace": "name",
70
+ "properties": ["MolecularFormula", "MolecularWeight", "CanonicalSMILES", "IUPACName"],
71
+ "synonym_limit": 20
72
+ }
73
+ ```
74
+
75
+ `synonym_limit`: 0-100. Use this endpoint for general compound lookup because
76
+ it resolves CID, selected properties, and synonyms in one call.
77
+
78
+ Response fields include `valid`, `cid`, `properties`, `properties_raw`,
79
+ `aliases`, `synonyms`, and `metadata`. Numeric properties are coerced to JSON
80
+ numbers when possible. Requested SMILES aliases are filled when PubChem returns
81
+ an equivalent key such as `ConnectivitySMILES`.
82
+
83
+ ## Batch Summary
84
+
85
+ Operation: `compound-batch-summary`.
86
+
87
+ ```json
88
+ {
89
+ "identifiers": ["aspirin", "ibuprofen", "caffeine"],
90
+ "namespace": "name",
91
+ "properties": ["MolecularFormula", "MolecularWeight", "CanonicalSMILES", "XLogP", "TPSA"],
92
+ "synonym_limit": 5
93
+ }
94
+ ```
95
+
96
+ Limits: 1-100 identifiers. The response preserves input order and includes
97
+ per-item errors:
98
+
99
+ ```json
100
+ {
101
+ "valid": false,
102
+ "namespace": "name",
103
+ "properties_requested": ["CanonicalSMILES"],
104
+ "results": [
105
+ {
106
+ "input": "aspirin",
107
+ "valid": true,
108
+ "cid": 2244,
109
+ "properties": {
110
+ "CanonicalSMILES": "CC(=O)Oc1ccccc1C(=O)O",
111
+ "ConnectivitySMILES": "CC(=O)Oc1ccccc1C(=O)O",
112
+ "_aliases": {"CanonicalSMILES": "ConnectivitySMILES"},
113
+ "properties_raw": {}
114
+ },
115
+ "properties_raw": {},
116
+ "aliases": {"CanonicalSMILES": "ConnectivitySMILES"},
117
+ "synonyms": []
118
+ },
119
+ {
120
+ "input": "bad-name",
121
+ "valid": false,
122
+ "error": "not found"
123
+ }
124
+ ],
125
+ "count": 2,
126
+ "failed_count": 1
127
+ }
128
+ ```