| name | resolve-chemical-identities |
| description | 保守解析化学名称、SMILES、InChI、InChIKey、PubChem CID、ChEMBL ID 或 CAS RN,保留多源证据、相关形式、歧义和冲突。用于确认化学记录是谁、对齐开放数据库,或在结构标准化前选择候选。 |
化学身份解析与来源对齐
把名称、结构或编号转换为可审计的化学候选记录。默认失败关闭:不投票选优、不让模型猜结构、不把数据库记录当作用户实物样品。
执行流程
- 接收一个
query;只有纯数字等无法安全判断的输入才追问 input_type。
- 阅读身份判定契约与来源边界,确认
exact、related_forms、ambiguous、conflict 和样品边界。
- 阅读标准化交接合同。只有
standardization_handoff.status=ready 时,才允许 Adapter 将其中唯一
record 转成 standardize-chemical-structures 的通用输入。
- 在隔离环境安装固定依赖:
python -m pip install -r scripts/requirements.txt
- 运行解析器。单条名称示例:
python scripts/resolve_identities.py \
--query 'aspirin' \
--output identity-result.json
明确结构类型示例:
python scripts/resolve_identities.py \
--query 'CCO' \
--input-type smiles \
--output identity-result.json
批量或带上下文时使用 JSON:
{
"requests": [
{
"id": "q1",