[ PROMPT_NODE_27058 ]
Pubchem Database API 参考
[ SKILL_DOCUMENTATION ]
# PubChem API 参考
## 概述
PubChem 是由美国国家生物技术信息中心 (NCBI) 维护的全球最大的免费化学数据库。它包含超过 1.1 亿个独特的化学结构,以及来自 770 多个数据源的 2.7 亿多条生物活性数据。
## 数据库结构
PubChem 由三个主要子数据库组成:
1. **化合物数据库 (Compound Database)**:具有计算属性的唯一验证化学结构
2. **物质数据库 (Substance Database)**:来自数据源的已存化学物质记录
3. **生物测定数据库 (BioAssay Database)**:化学化合物的生物活性测试结果
## PubChem PUG-REST API
### 基础 URL 结构
https://pubchem.ncbi.nlm.nih.gov/rest/pug///
组件:
- ``: compound/cid, substance/sid, assay/aid, 或搜索规范
- ``: 可选操作,如 property, synonyms, classification 等
- ``: 格式,如 JSON, XML, CSV, PNG, SDF 等
### 常见请求模式
#### 1. 按标识符检索
按 CID (化合物 ID) 获取化合物:
GET /rest/pug/compound/cid/{cid}/property/{properties}/JSON
按名称获取化合物:
GET /rest/pug/compound/name/{name}/property/{properties}/JSON
按 SMILES 获取化合物:
GET /rest/pug/compound/smiles/{smiles}/property/{properties}/JSON
按 InChI 获取化合物:
GET /rest/pug/compound/inchi/{inchi}/property/{properties}/JSON
#### 2. 可用属性
可检索的常见分子属性:
- `MolecularFormula`, `MolecularWeight`, `CanonicalSMILES`, `IsomericSMILES`, `InChI`, `InChIKey`, `IUPACName`, `XLogP`, `ExactMass`, `MonoisotopicMass`, `TPSA` (拓扑极性表面积), `Complexity`, `Charge`, `HBondDonorCount`, `HBondAcceptorCount`, `RotatableBondCount`, `HeavyAtomCount`, `IsotopeAtomCount`, `AtomStereoCount`, `BondStereoCount`, `CovalentUnitCount`, `Volume3D`, `XStericQuadrupole3D`, `YStericQuadrupole3D`, `ZStericQuadrupole3D`, `FeatureCount3D`
若要检索多个属性,请用逗号分隔:
/property/MolecularFormula,MolecularWeight,CanonicalSMILES/JSON
#### 3. 结构搜索操作
**相似性搜索**:
POST /rest/pug/compound/similarity/smiles/{smiles}/JSON
参数: Threshold (默认 90%)
**子结构搜索**:
POST /rest/pug/compound/substructure/smiles/{smiles}/cids/JSON
**超结构搜索**:
POST /rest/pug/compound/superstructure/smiles/{smile