@delta-infra/cli 1.0.80 → 1.0.81

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.
@@ -1,127 +1,127 @@
1
- # PubChem 详细规则
2
-
1
+ # PubChem 详细规则
2
+
3
3
  只能通过当前 Skill 目录下的 `scripts/invoke.py` 调用。wrapper 已解包服务
4
- 信封,因此以下文档所说的业务 `data` 在 wrapper 结果中就是 `result["native"]`
5
- 顶层;禁止再读取 `result["native"]["data"]`。本文件中的 URL 只用于说明 endpoint
6
- schema,不授权直接 HTTP。普通名称基础查询只调用一次 `compound-summary`;多个名称
7
- 只调用一次 `compound-batch-summary`,默认 body 仅包含 `identifiers` 和
8
- `namespace:"name"`,不得先调用 health/schema。
9
-
10
- 结果直接从 `native` 投影。批量记录位于 `native.results[*]`,原始标签在 `input`,
11
- 属性在嵌套 `properties`。SMILES 回退顺序固定为
12
- `CanonicalSMILES -> ConnectivitySMILES -> SMILES -> IsomericSMILES`。
13
- PubChem `XLogP` 与 RDKit `MolLogP` 不得互换;not_found 不得用本地计算补值。
14
-
15
- Namespaces: `cid`, `name`, `smiles`, `inchi`, `inchikey`, `formula`.
16
-
17
- ## Health
18
-
19
- operation:`health`,无 body。
20
-
21
- ## Resolve CIDs
22
-
23
- operation:`compound-resolve-cids`。
24
-
25
- ```json
26
- {"identifier": "aspirin", "namespace": "name", "max_records": 20}
27
- ```
28
-
29
- `max_records`: 1-100.
30
-
31
- ## Properties
32
-
33
- operation:`compound-properties`。
34
-
35
- ```json
36
- {
37
- "identifier": "2244",
38
- "namespace": "cid",
39
- "properties": ["MolecularFormula", "MolecularWeight", "CanonicalSMILES", "IUPACName"]
40
- }
41
- ```
42
-
43
- Allowed properties include `MolecularFormula`, `MolecularWeight`,
44
- `CanonicalSMILES`, `IsomericSMILES`, `SMILES`, `ConnectivitySMILES`,
45
- `IUPACName`, `InChI`, `InChIKey`, `XLogP`, `TPSA`, `HBondDonorCount`,
46
- `HBondAcceptorCount`, `RotatableBondCount`, `ExactMass`, `MonoisotopicMass`,
47
- `Charge`, `HeavyAtomCount`, `Complexity`, `CovalentUnitCount`,
48
- `DefinedAtomStereoCount`, `UndefinedAtomStereoCount`, `DefinedBondStereoCount`,
49
- `UndefinedBondStereoCount`, and `IsotopeAtomCount`.
50
-
51
- ## Synonyms
52
-
53
- operation:`compound-synonyms`。
54
-
55
- ```json
56
- {"identifier": "2244", "namespace": "cid", "max_synonyms": 50}
57
- ```
58
-
59
- `max_synonyms`: 1-500.
60
-
61
- ## Summary
62
-
63
- operation:`compound-summary`。
64
-
65
- ```json
66
- {
67
- "identifier": "aspirin",
68
- "namespace": "name",
69
- "properties": ["MolecularFormula", "MolecularWeight", "CanonicalSMILES", "IUPACName"],
70
- "synonym_limit": 20
71
- }
72
- ```
73
-
74
- `synonym_limit`: 0-100. Use this endpoint for general compound lookup because
75
- it resolves CID, selected properties, and synonyms in one call.
76
-
77
- Response fields include `valid`, `cid`, `properties`, `properties_raw`,
78
- `aliases`, `synonyms`, and `metadata`. Numeric properties are coerced to JSON
79
- numbers when possible. Requested SMILES aliases are filled when PubChem returns
80
- an equivalent key such as `ConnectivitySMILES`.
81
-
82
- ## Batch Summary
83
-
84
- operation:`compound-batch-summary`。
85
-
86
- ```json
87
- {
88
- "identifiers": ["aspirin", "ibuprofen", "caffeine"],
89
- "namespace": "name",
90
- "properties": ["MolecularFormula", "MolecularWeight", "CanonicalSMILES", "XLogP", "TPSA"],
91
- "synonym_limit": 5
92
- }
93
- ```
94
-
95
- Limits: 1-100 identifiers. The response preserves input order and includes
96
- per-item errors:
97
-
98
- ```json
99
- {
100
- "valid": false,
101
- "namespace": "name",
102
- "properties_requested": ["CanonicalSMILES"],
103
- "results": [
104
- {
105
- "input": "aspirin",
106
- "valid": true,
107
- "cid": 2244,
108
- "properties": {
109
- "CanonicalSMILES": "CC(=O)Oc1ccccc1C(=O)O",
110
- "ConnectivitySMILES": "CC(=O)Oc1ccccc1C(=O)O",
111
- "_aliases": {"CanonicalSMILES": "ConnectivitySMILES"},
112
- "properties_raw": {}
113
- },
114
- "properties_raw": {},
115
- "aliases": {"CanonicalSMILES": "ConnectivitySMILES"},
116
- "synonyms": []
117
- },
118
- {
119
- "input": "bad-name",
120
- "valid": false,
121
- "error": "not found"
122
- }
123
- ],
124
- "count": 2,
125
- "failed_count": 1
126
- }
127
- ```
4
+ 信封,因此以下文档所说的业务 `data` 在 wrapper 结果中就是 `result["native"]`
5
+ 顶层;禁止再读取 `result["native"]["data"]`。本文件中的 URL 只用于说明 endpoint
6
+ schema,不授权直接 HTTP。普通名称基础查询只调用一次 `compound-summary`;多个名称
7
+ 只调用一次 `compound-batch-summary`,默认 body 仅包含 `identifiers` 和
8
+ `namespace:"name"`,不得先调用 health/schema。
9
+
10
+ 结果直接从 `native` 投影。批量记录位于 `native.results[*]`,原始标签在 `input`,
11
+ 属性在嵌套 `properties`。SMILES 回退顺序固定为
12
+ `CanonicalSMILES -> ConnectivitySMILES -> SMILES -> IsomericSMILES`。
13
+ PubChem `XLogP` 与 RDKit `MolLogP` 不得互换;not_found 不得用本地计算补值。
14
+
15
+ Namespaces: `cid`, `name`, `smiles`, `inchi`, `inchikey`, `formula`.
16
+
17
+ ## Health
18
+
19
+ operation:`health`,无 body。
20
+
21
+ ## Resolve CIDs
22
+
23
+ operation:`compound-resolve-cids`。
24
+
25
+ ```json
26
+ {"identifier": "aspirin", "namespace": "name", "max_records": 20}
27
+ ```
28
+
29
+ `max_records`: 1-100.
30
+
31
+ ## Properties
32
+
33
+ operation:`compound-properties`。
34
+
35
+ ```json
36
+ {
37
+ "identifier": "2244",
38
+ "namespace": "cid",
39
+ "properties": ["MolecularFormula", "MolecularWeight", "CanonicalSMILES", "IUPACName"]
40
+ }
41
+ ```
42
+
43
+ Allowed properties include `MolecularFormula`, `MolecularWeight`,
44
+ `CanonicalSMILES`, `IsomericSMILES`, `SMILES`, `ConnectivitySMILES`,
45
+ `IUPACName`, `InChI`, `InChIKey`, `XLogP`, `TPSA`, `HBondDonorCount`,
46
+ `HBondAcceptorCount`, `RotatableBondCount`, `ExactMass`, `MonoisotopicMass`,
47
+ `Charge`, `HeavyAtomCount`, `Complexity`, `CovalentUnitCount`,
48
+ `DefinedAtomStereoCount`, `UndefinedAtomStereoCount`, `DefinedBondStereoCount`,
49
+ `UndefinedBondStereoCount`, and `IsotopeAtomCount`.
50
+
51
+ ## Synonyms
52
+
53
+ operation:`compound-synonyms`。
54
+
55
+ ```json
56
+ {"identifier": "2244", "namespace": "cid", "max_synonyms": 50}
57
+ ```
58
+
59
+ `max_synonyms`: 1-500.
60
+
61
+ ## Summary
62
+
63
+ operation:`compound-summary`。
64
+
65
+ ```json
66
+ {
67
+ "identifier": "aspirin",
68
+ "namespace": "name",
69
+ "properties": ["MolecularFormula", "MolecularWeight", "CanonicalSMILES", "IUPACName"],
70
+ "synonym_limit": 20
71
+ }
72
+ ```
73
+
74
+ `synonym_limit`: 0-100. Use this endpoint for general compound lookup because
75
+ it resolves CID, selected properties, and synonyms in one call.
76
+
77
+ Response fields include `valid`, `cid`, `properties`, `properties_raw`,
78
+ `aliases`, `synonyms`, and `metadata`. Numeric properties are coerced to JSON
79
+ numbers when possible. Requested SMILES aliases are filled when PubChem returns
80
+ an equivalent key such as `ConnectivitySMILES`.
81
+
82
+ ## Batch Summary
83
+
84
+ operation:`compound-batch-summary`。
85
+
86
+ ```json
87
+ {
88
+ "identifiers": ["aspirin", "ibuprofen", "caffeine"],
89
+ "namespace": "name",
90
+ "properties": ["MolecularFormula", "MolecularWeight", "CanonicalSMILES", "XLogP", "TPSA"],
91
+ "synonym_limit": 5
92
+ }
93
+ ```
94
+
95
+ Limits: 1-100 identifiers. The response preserves input order and includes
96
+ per-item errors:
97
+
98
+ ```json
99
+ {
100
+ "valid": false,
101
+ "namespace": "name",
102
+ "properties_requested": ["CanonicalSMILES"],
103
+ "results": [
104
+ {
105
+ "input": "aspirin",
106
+ "valid": true,
107
+ "cid": 2244,
108
+ "properties": {
109
+ "CanonicalSMILES": "CC(=O)Oc1ccccc1C(=O)O",
110
+ "ConnectivitySMILES": "CC(=O)Oc1ccccc1C(=O)O",
111
+ "_aliases": {"CanonicalSMILES": "ConnectivitySMILES"},
112
+ "properties_raw": {}
113
+ },
114
+ "properties_raw": {},
115
+ "aliases": {"CanonicalSMILES": "ConnectivitySMILES"},
116
+ "synonyms": []
117
+ },
118
+ {
119
+ "input": "bad-name",
120
+ "valid": false,
121
+ "error": "not found"
122
+ }
123
+ ],
124
+ "count": 2,
125
+ "failed_count": 1
126
+ }
127
+ ```
@@ -1,68 +1,68 @@
1
- # pymatgen 详细规则
2
-
3
- 所有调用只走统一 wrapper。无机化学式、组成和式量优先使用 pymatgen,不用 PubChem
4
- 或本地元素表替代。结构 operation 必须发送完整结构文本,不能发送本地文件路径;
5
- 支持 `cif`、`poscar`、`json`、`cssr`、`xsf`,不接收 LAMMPS data/dump。
6
-
7
- ## Health
8
-
9
- operation:`health`,无 body。
10
-
11
- ## Composition Parse
12
-
13
- operation:`composition-parse`。
14
-
15
- ```json
16
- {"formula": "LiFePO4", "format": "formula"}
17
- ```
18
-
19
- Key response fields in `data`: `valid`, `formula`, `reduced_formula`,
20
- `alphabetic_formula`, `anonymous_formula`, `chemical_system`,
21
- `number_of_atoms`, `weight`, `element_amounts`, `atomic_fractions`,
22
- `weight_fractions`, `error`.
23
-
24
- ## Structure Parse / Summary
25
-
26
- operation:`structure-parse` 或 `structure-summary`。
27
-
28
- ```json
29
- {"input": "<CIF text>", "format": "cif", "primitive": false}
30
- ```
31
-
32
- Input formats: `cif`, `poscar`, `json`, `cssr`, `xsf`.
33
-
34
- Summary fields include `formula`, `reduced_formula`, `chemical_system`,
35
- `nsites`, `nelements`, `density`, `volume`, `lattice`, `element_amounts`, and
36
- `species`.
37
-
38
- ## Structure Convert
39
-
40
- operation:`structure-convert`。
41
-
42
- ```json
43
- {
44
- "input": "<CIF text>",
45
- "input_format": "cif",
46
- "output_format": "poscar",
47
- "primitive": false
48
- }
49
- ```
50
-
51
- Output formats: `cif`, `poscar`, `json`, `cssr`, `xsf`.
52
-
53
- ## Symmetry
54
-
55
- operation:`structure-symmetry`。
56
-
57
- ```json
58
- {
59
- "input": "<CIF text>",
60
- "format": "cif",
61
- "primitive": false,
62
- "symprec": 0.01,
63
- "angle_tolerance": 5.0
64
- }
65
- ```
66
-
67
- Returns `space_group_symbol`, `space_group_number`, `crystal_system`,
68
- `point_group_symbol`, `hall`, and `nsites`.
1
+ # pymatgen 详细规则
2
+
3
+ 所有调用只走统一 wrapper。无机化学式、组成和式量优先使用 pymatgen,不用 PubChem
4
+ 或本地元素表替代。结构 operation 必须发送完整结构文本,不能发送本地文件路径;
5
+ 支持 `cif`、`poscar`、`json`、`cssr`、`xsf`,不接收 LAMMPS data/dump。
6
+
7
+ ## Health
8
+
9
+ operation:`health`,无 body。
10
+
11
+ ## Composition Parse
12
+
13
+ operation:`composition-parse`。
14
+
15
+ ```json
16
+ {"formula": "LiFePO4", "format": "formula"}
17
+ ```
18
+
19
+ Key response fields in `data`: `valid`, `formula`, `reduced_formula`,
20
+ `alphabetic_formula`, `anonymous_formula`, `chemical_system`,
21
+ `number_of_atoms`, `weight`, `element_amounts`, `atomic_fractions`,
22
+ `weight_fractions`, `error`.
23
+
24
+ ## Structure Parse / Summary
25
+
26
+ operation:`structure-parse` 或 `structure-summary`。
27
+
28
+ ```json
29
+ {"input": "<CIF text>", "format": "cif", "primitive": false}
30
+ ```
31
+
32
+ Input formats: `cif`, `poscar`, `json`, `cssr`, `xsf`.
33
+
34
+ Summary fields include `formula`, `reduced_formula`, `chemical_system`,
35
+ `nsites`, `nelements`, `density`, `volume`, `lattice`, `element_amounts`, and
36
+ `species`.
37
+
38
+ ## Structure Convert
39
+
40
+ operation:`structure-convert`。
41
+
42
+ ```json
43
+ {
44
+ "input": "<CIF text>",
45
+ "input_format": "cif",
46
+ "output_format": "poscar",
47
+ "primitive": false
48
+ }
49
+ ```
50
+
51
+ Output formats: `cif`, `poscar`, `json`, `cssr`, `xsf`.
52
+
53
+ ## Symmetry
54
+
55
+ operation:`structure-symmetry`。
56
+
57
+ ```json
58
+ {
59
+ "input": "<CIF text>",
60
+ "format": "cif",
61
+ "primitive": false,
62
+ "symprec": 0.01,
63
+ "angle_tolerance": 5.0
64
+ }
65
+ ```
66
+
67
+ Returns `space_group_symbol`, `space_group_number`, `crystal_system`,
68
+ `point_group_symbol`, `hall`, and `nsites`.
@@ -1,139 +1,139 @@
1
- # RDKit 详细规则
2
-
1
+ # RDKit 详细规则
2
+
3
3
  只能通过当前 Skill 目录下的 `scripts/invoke.py` 调用。wrapper 已解包服务
4
- 信封,因此以下业务响应在 wrapper 结果中位于 `result["native"]` 顶层;禁止读取
5
- `result["native"]["data"]`。这里只记录 operation schema,不授权直接 HTTP。
6
-
7
- 一个请求只执行完成目标所需的最少调用。同时校验、规范化并计算基础描述符时使用一次
8
- `batch-parse-describe`,payload 使用 `molecules:[{id,smiles}]`,不得拆成 parse 和
9
- descriptors。多个分子的全对相似度使用一次 `similarity-matrix`;排名字段固定为
10
- `a`、`b`、`similarity`,不是 `i`、`j`、`score`。
11
-
12
- 只报告 native 实际存在的描述符。渲染 PNG 时只解码文档指定字段,并验证字节以
13
- `89 50 4e 47 0d 0a 1a 0a` 开头;不得把 JSON envelope 保存成图片。
14
-
15
- ## Health
16
-
17
- operation:`health`,无 body。
18
-
19
- ## Parse
20
-
21
- operation:`parse`。
22
-
23
- ```json
24
- {"input": "CCO", "format": "smiles", "sanitize": true}
25
- ```
26
-
27
- Formats: `smiles`, `inchi`, `molblock`.
28
-
29
- Key response fields in `data`: `valid`, `canonical_smiles`, `formula`,
30
- `molecular_weight`, `exact_molecular_weight`, `inchi_key`, `atom_count`,
31
- `heavy_atom_count`, `bond_count`, `warnings`, `error`.
32
-
33
- ## Descriptors
34
-
35
- operation:`descriptors`。
36
-
37
- ```json
38
- {"smiles": "CCO", "descriptor_set": "basic", "sanitize": true}
39
- ```
40
-
41
- `descriptor_set` currently supports `basic`. Descriptor keys include `Formula`,
42
- `MolWt`, `ExactMolWt`, `HeavyAtomMolWt`, `TPSA`, `MolLogP`, `NumHDonors`,
43
- `NumHAcceptors`, `NumRotatableBonds`, `RingCount`, `FractionCSP3`,
44
- `HeavyAtomCount`, `AtomCount`, and `BondCount`.
45
-
46
- ## Batch Descriptors
47
-
48
- operation:`batch-descriptors`。
49
-
50
- ```json
51
- {"smiles": ["CCO", "c1ccccc1"], "descriptor_set": "basic", "sanitize": true}
52
- ```
53
-
54
- Limits: 1-500 SMILES.
55
-
56
- ## Batch Parse Describe
57
-
58
- operation:`batch-parse-describe`。
59
-
60
- ```json
61
- {
62
- "molecules": [
63
- {"id": "aspirin", "smiles": "CC(=O)Oc1ccccc1C(=O)O"},
64
- {"id": "caffeine", "smiles": "Cn1cnc2c1c(=O)n(C)c(=O)n2C"}
65
- ],
66
- "descriptor_set": "basic",
67
- "fingerprint": {"type": "morgan", "radius": 2, "n_bits": 2048},
68
- "sanitize": true
69
- }
70
- ```
71
-
72
- Limits: 1-500 molecules. Returns per-item `valid`, `canonical_smiles`, parse
73
- fields, `descriptors`, optional `fingerprint_metadata`, `on_bits`, `bit_count`,
74
- `warnings`, and `error`.
75
-
76
- ## Render
77
-
78
- operation:`render`。
79
-
80
- ```json
81
- {"smiles": "CCO", "image_format": "svg", "width": 450, "height": 320}
82
- ```
83
-
84
- Image formats: `svg`, `png`. SVG returns text; PNG returns base64.
85
- Width/height range: 150-2000.
86
-
87
- ## Fingerprint
88
-
89
- operation:`fingerprint`。
90
-
91
- ```json
92
- {"smiles": "CCO", "radius": 2, "n_bits": 2048}
93
- ```
94
-
95
- Morgan fingerprint parameters: `radius` 1-6, `n_bits` 128-8192.
96
-
97
- ## Similarity
98
-
99
- operation:`similarity`。
100
-
101
- ```json
102
- {"query_smiles": "CCO", "target_smiles": "CCCO", "radius": 2, "n_bits": 2048}
103
- ```
104
-
105
- Returns Tanimoto similarity.
106
-
107
- ## Similarity Matrix
108
-
109
- operation:`similarity-matrix`。
110
-
111
- ```json
112
- {
113
- "molecules": [
114
- {"id": "aspirin", "smiles": "CC(=O)Oc1ccccc1C(=O)O"},
115
- {"id": "ibuprofen", "smiles": "CC(C)Cc1ccc(cc1)[C@@H](C)C(=O)O"}
116
- ],
117
- "fingerprint": {"type": "morgan", "radius": 2, "n_bits": 2048},
118
- "sanitize": true
119
- }
120
- ```
121
-
122
- Returns `matrix` in input order and `ranked_pairs` sorted by descending
123
- Tanimoto similarity. Each ranked record is named, not index-based:
124
-
125
- ```json
126
- {"a":"aspirin","b":"ibuprofen","similarity":0.195122}
127
- ```
128
-
129
- Do not expect `i`, `j`, or `score` fields.
130
-
131
- ## Substructure
132
-
133
- operation:`substructure`。
134
-
135
- ```json
136
- {"query_smarts": "c1ccccc1", "target_smiles": ["c1ccccc1", "CCO"]}
137
- ```
138
-
139
- Limits: SMARTS max length 5000; target list size 1-500.
4
+ 信封,因此以下业务响应在 wrapper 结果中位于 `result["native"]` 顶层;禁止读取
5
+ `result["native"]["data"]`。这里只记录 operation schema,不授权直接 HTTP。
6
+
7
+ 一个请求只执行完成目标所需的最少调用。同时校验、规范化并计算基础描述符时使用一次
8
+ `batch-parse-describe`,payload 使用 `molecules:[{id,smiles}]`,不得拆成 parse 和
9
+ descriptors。多个分子的全对相似度使用一次 `similarity-matrix`;排名字段固定为
10
+ `a`、`b`、`similarity`,不是 `i`、`j`、`score`。
11
+
12
+ 只报告 native 实际存在的描述符。渲染 PNG 时只解码文档指定字段,并验证字节以
13
+ `89 50 4e 47 0d 0a 1a 0a` 开头;不得把 JSON envelope 保存成图片。
14
+
15
+ ## Health
16
+
17
+ operation:`health`,无 body。
18
+
19
+ ## Parse
20
+
21
+ operation:`parse`。
22
+
23
+ ```json
24
+ {"input": "CCO", "format": "smiles", "sanitize": true}
25
+ ```
26
+
27
+ Formats: `smiles`, `inchi`, `molblock`.
28
+
29
+ Key response fields in `data`: `valid`, `canonical_smiles`, `formula`,
30
+ `molecular_weight`, `exact_molecular_weight`, `inchi_key`, `atom_count`,
31
+ `heavy_atom_count`, `bond_count`, `warnings`, `error`.
32
+
33
+ ## Descriptors
34
+
35
+ operation:`descriptors`。
36
+
37
+ ```json
38
+ {"smiles": "CCO", "descriptor_set": "basic", "sanitize": true}
39
+ ```
40
+
41
+ `descriptor_set` currently supports `basic`. Descriptor keys include `Formula`,
42
+ `MolWt`, `ExactMolWt`, `HeavyAtomMolWt`, `TPSA`, `MolLogP`, `NumHDonors`,
43
+ `NumHAcceptors`, `NumRotatableBonds`, `RingCount`, `FractionCSP3`,
44
+ `HeavyAtomCount`, `AtomCount`, and `BondCount`.
45
+
46
+ ## Batch Descriptors
47
+
48
+ operation:`batch-descriptors`。
49
+
50
+ ```json
51
+ {"smiles": ["CCO", "c1ccccc1"], "descriptor_set": "basic", "sanitize": true}
52
+ ```
53
+
54
+ Limits: 1-500 SMILES.
55
+
56
+ ## Batch Parse Describe
57
+
58
+ operation:`batch-parse-describe`。
59
+
60
+ ```json
61
+ {
62
+ "molecules": [
63
+ {"id": "aspirin", "smiles": "CC(=O)Oc1ccccc1C(=O)O"},
64
+ {"id": "caffeine", "smiles": "Cn1cnc2c1c(=O)n(C)c(=O)n2C"}
65
+ ],
66
+ "descriptor_set": "basic",
67
+ "fingerprint": {"type": "morgan", "radius": 2, "n_bits": 2048},
68
+ "sanitize": true
69
+ }
70
+ ```
71
+
72
+ Limits: 1-500 molecules. Returns per-item `valid`, `canonical_smiles`, parse
73
+ fields, `descriptors`, optional `fingerprint_metadata`, `on_bits`, `bit_count`,
74
+ `warnings`, and `error`.
75
+
76
+ ## Render
77
+
78
+ operation:`render`。
79
+
80
+ ```json
81
+ {"smiles": "CCO", "image_format": "svg", "width": 450, "height": 320}
82
+ ```
83
+
84
+ Image formats: `svg`, `png`. SVG returns text; PNG returns base64.
85
+ Width/height range: 150-2000.
86
+
87
+ ## Fingerprint
88
+
89
+ operation:`fingerprint`。
90
+
91
+ ```json
92
+ {"smiles": "CCO", "radius": 2, "n_bits": 2048}
93
+ ```
94
+
95
+ Morgan fingerprint parameters: `radius` 1-6, `n_bits` 128-8192.
96
+
97
+ ## Similarity
98
+
99
+ operation:`similarity`。
100
+
101
+ ```json
102
+ {"query_smiles": "CCO", "target_smiles": "CCCO", "radius": 2, "n_bits": 2048}
103
+ ```
104
+
105
+ Returns Tanimoto similarity.
106
+
107
+ ## Similarity Matrix
108
+
109
+ operation:`similarity-matrix`。
110
+
111
+ ```json
112
+ {
113
+ "molecules": [
114
+ {"id": "aspirin", "smiles": "CC(=O)Oc1ccccc1C(=O)O"},
115
+ {"id": "ibuprofen", "smiles": "CC(C)Cc1ccc(cc1)[C@@H](C)C(=O)O"}
116
+ ],
117
+ "fingerprint": {"type": "morgan", "radius": 2, "n_bits": 2048},
118
+ "sanitize": true
119
+ }
120
+ ```
121
+
122
+ Returns `matrix` in input order and `ranked_pairs` sorted by descending
123
+ Tanimoto similarity. Each ranked record is named, not index-based:
124
+
125
+ ```json
126
+ {"a":"aspirin","b":"ibuprofen","similarity":0.195122}
127
+ ```
128
+
129
+ Do not expect `i`, `j`, or `score` fields.
130
+
131
+ ## Substructure
132
+
133
+ operation:`substructure`。
134
+
135
+ ```json
136
+ {"query_smarts": "c1ccccc1", "target_smiles": ["c1ccccc1", "CCO"]}
137
+ ```
138
+
139
+ Limits: SMARTS max length 5000; target list size 1-500.