Pharma Pharmacology Agent v2.0.0
Overview
Predictive pharmacology profiling for drug candidates. Combines ADMETlab 3.0 ML predictions (when available) with comprehensive RDKit descriptor-based models. Provides full ADME assessment, toxicity risk, druglikeness scoring, and risk flagging — all from a SMILES string.
Key capabilities:
- - Drug-likeness: Lipinski Rule of Five, Veber oral bioavailability rules
- Scores: QED (Quantitative Estimate of Drug-likeness), SA Score (Synthetic Accessibility)
- ADME predictions: BBB permeability, aqueous solubility (ESOL), GI absorption (Egan), CYP3A4 inhibition risk, P-glycoprotein substrate, plasma protein binding
- Safety: PAINS (Pan-Assay Interference) filter alerts
- Risk assessment: Automated flagging of pharmacological concerns
- Standard chain output: JSON schema compatible with all downstream agents
Quick Start
CODEBLOCK0
Scripts
scripts/chain_entry.py
Main entry point. Accepts JSON with
smiles field, returns full pharmacology profile.
Input:
CODEBLOCK1
Output schema:
CODEBLOCK2
ADME Prediction Rules
| Property | Method | Thresholds |
|---|
| BBB permeability | Clark's rules (TPSA/logP) | TPSA<60+logP 1-3 = high; TPSA<90 = moderate |
| Solubility |
ESOL approximation | logS > -2 high; > -4 moderate; else low |
| GI absorption | Egan egg model | logP<5.6 and TPSA<131.6 = high |
| CYP3A4 inhibition | Rule-based | logP>3 and MW>300 = high risk |
| P-gp substrate | Rule-based | MW>400 and HBD>2 = likely |
| Plasma protein binding | logP correlation | logP>3 = high (>90%) |
Chaining
This agent is designed to receive output from chemistry-query:
CODEBLOCK3
The recommend_next field always includes ["toxicology", "ip-expansion"] for pipeline continuation.
Tested With
All features verified end-to-end with RDKit 2024.03+:
| Molecule | MW | logP | Lipinski | Key Findings |
|---|
| Caffeine | 194.08 | -1.03 | ✅ Pass (0 violations) | High solubility, moderate BBB, QED 0.54 |
| Aspirin |
180.04 | 1.31 | ✅ Pass (0 violations) | Moderate solubility, SA 1.58 (easy), QED 0.55 |
| Sotorasib | 560.23 | 4.48 | ✅ Pass (1 violation: MW) | Low solubility, CYP3A4 risk, high PPB |
| Metformin | 129.10 | -1.03 | ✅ Pass (0 violations) | High solubility, low BBB, QED 0.25 |
| Invalid SMILES | — | — | — | Graceful JSON error |
| Empty input | — | — | — | Graceful JSON error |
Error Handling
- - Invalid SMILES: Returns
status: "error" with descriptive warning - Missing input: Clear error message requesting
smiles or INLINECODE7 - All errors produce valid JSON (never crashes)
scripts/admetlab3.py
Enhanced ADME/Tox predictor. Attempts ADMETlab 3.0 API first, falls back to comprehensive RDKit models.
CODEBLOCK4
Output includes:
- - Physicochemical: MW, LogP, TPSA, LogS (ESOL), solubility class, fraction CSP3, molar refractivity
- Absorption: Lipinski, Veber, Egan, HIA, Caco-2 permeability, P-gp substrate, oral bioavailability
- Distribution: BBB penetration (Clark model), plasma protein binding
- Metabolism: CYP3A4 inhibition risk
- Toxicity: hERG risk, Ames mutagenicity, DILI, structural alerts (nitro, aromatic amine)
- Druglikeness: QED, SA Score, lead-like, drug-like classifications
Resources
- -
references/api_reference.md — API and methodology references
Changelog
v2.0.0 (2026-02-18)
- - ADMETlab 3.0 integration (ML-based predictions, auto-fallback to RDKit)
- Enhanced RDKit ADME: Caco-2 permeability, Egan model, HIA, hERG, Ames, DILI
- Solubility via ESOL model
- Lead-like / drug-like classification
- Structural alerts: nitro groups, aromatic amines
v1.1.0 (2026-02-14)
- - Initial production release with full ADME profiling
- Lipinski, Veber, QED, SA Score, PAINS
- BBB, solubility, GI absorption, CYP3A4, P-gp, PPB predictions
- Automated risk assessment
- Standard chain output schema
- Comprehensive error handling
- End-to-end tested with diverse molecules
Pharma Pharmacology Agent v2.0.0
概述
对候选药物进行预测性药理学分析。结合ADMETlab 3.0机器学习预测(可用时)与基于RDKit描述符的综合模型。仅需SMILES字符串即可提供完整的ADME评估、毒性风险、类药性评分和风险标记。
核心能力:
- - 类药性: 利平斯基五规则、韦伯口服生物利用度规则
- 评分: QED(类药性定量评估)、SA评分(合成可及性)
- ADME预测: 血脑屏障通透性、水溶性(ESOL)、胃肠道吸收(Egan模型)、CYP3A4抑制风险、P-糖蛋白底物、血浆蛋白结合率
- 安全性: PAINS(泛分析干扰化合物)过滤警报
- 风险评估: 自动标记药理学问题
- 标准链输出: 兼容所有下游代理的JSON模式
快速开始
bash
从SMILES分析分子
exec python scripts/chain_entry.py --input-json {smiles: CC(=O)Oc1ccccc1C(=O)O, context: user}
从chemistry-query输出链式调用
exec python scripts/chain
entry.py --input-json {smiles: smiles>, context: from_chemistry}
脚本
scripts/chain_entry.py
主入口点。接受包含smiles字段的JSON,返回完整的药理学分析报告。
输入:
json
{smiles: CN1C=NC2=C1C(=O)N(C(=O)N2C)C, context: user}
输出模式:
json
{
agent: pharma-pharmacology,
version: 1.1.0,
smiles: ,
status: success|error,
report: {
descriptors: {mw: 194.08, logp: -1.03, tpsa: 61.82, hbd: 0, hba: 6, rotb: 0, aromrings: 2, heavyatoms: 14, mr: 51.2},
lipinski: {pass: true, violations: 0, details: {...}},
veber: {pass: true, tpsa: {...}, rotatable_bonds: {...}},
qed: 0.5385,
sa_score: 2.3,
adme: {
bbb: {prediction: moderate, confidence: medium, rationale: ...},
solubility: {logS_estimate: -1.87, class: high, rationale: ...},
gi_absorption: {prediction: high, rationale: ...},
cyp3a4_inhibition: {risk: low, rationale: ...},
pgp_substrate: {prediction: unlikely, rationale: ...},
plasmaproteinbinding: {prediction: moderate-low, rationale: ...}
},
pains: {alert: false}
},
risks: [],
recommend_next: [toxicology, ip-expansion],
confidence: 0.85,
warnings: [],
timestamp: ISO8601
}
ADME预测规则
| 属性 | 方法 | 阈值 |
|---|
| 血脑屏障通透性 | Clark规则(TPSA/logP) | TPSA<60且logP 1-3 = 高;TPSA<90 = 中等 |
| 水溶性 |
ESOL近似法 | logS > -2 高;> -4 中等;否则低 |
| 胃肠道吸收 | Egan蛋模型 | logP<5.6且TPSA<131.6 = 高 |
| CYP3A4抑制 | 基于规则 | logP>3且MW>300 = 高风险 |
| P-糖蛋白底物 | 基于规则 | MW>400且HBD>2 = 可能 |
| 血浆蛋白结合率 | logP相关性 | logP>3 = 高(>90%) |
链式调用
该代理设计用于接收来自chemistry-query的输出:
chemistry-query(名称→SMILES+属性)→ pharma-pharmacology(ADME分析)→ toxicology / ip-expansion
recommend_next字段始终包含[toxicology, ip-expansion]以支持流程延续。
测试验证
所有功能已使用RDKit 2024.03+进行端到端验证:
| 分子 | MW | logP | 利平斯基规则 | 关键发现 |
|---|
| 咖啡因 | 194.08 | -1.03 | ✅ 通过(0个违反) | 高水溶性,中等血脑屏障,QED 0.54 |
| 阿司匹林 |
180.04 | 1.31 | ✅ 通过(0个违反) | 中等水溶性,SA 1.58(易合成),QED 0.55 |
| 索托拉西布 | 560.23 | 4.48 | ✅ 通过(1个违反:MW) | 低水溶性,CYP3A4风险,高血浆蛋白结合率 |
| 二甲双胍 | 129.10 | -1.03 | ✅ 通过(0个违反) | 高水溶性,低血脑屏障,QED 0.25 |
| 无效SMILES | — | — | — | 优雅的JSON错误处理 |
| 空输入 | — | — | — | 优雅的JSON错误处理 |
错误处理
- - 无效SMILES:返回status: error并附带描述性警告
- 缺少输入:清晰的错误信息,要求提供smiles或name
- 所有错误均生成有效JSON(绝不崩溃)
scripts/admetlab3.py
增强型ADME/毒性预测器。优先尝试ADMETlab 3.0 API,失败时回退到全面的RDKit模型。
bash
完整ADME分析
python scripts/admetlab3.py --smiles CC(=O)Oc1ccccc1C(=O)O
特定类别
python scripts/admetlab3.py --smiles CN1C=NC2=C1C(=O)N(C(=O)N2C)C --categories absorption,toxicity
输出包括:
- - 物理化学性质: MW、LogP、TPSA、LogS(ESOL)、水溶性类别、CSP3分数、摩尔折射率
- 吸收: 利平斯基规则、韦伯规则、Egan模型、人体肠道吸收、Caco-2通透性、P-糖蛋白底物、口服生物利用度
- 分布: 血脑屏障穿透(Clark模型)、血浆蛋白结合率
- 代谢: CYP3A4抑制风险
- 毒性: hERG风险、Ames致突变性、药物性肝损伤、结构警报(硝基、芳香胺)
- 类药性: QED、SA评分、先导化合物样、药物样分类
参考资料
- - references/api_reference.md — API和方法参考文献
更新日志
v2.0.0(2026-02-18)
- - 集成ADMETlab 3.0(基于机器学习的预测,自动回退到RDKit)
- 增强型RDKit ADME:Caco-2通透性、Egan模型、人体肠道吸收、hERG、Ames、药物性肝损伤
- 通过ESOL模型进行水溶性预测
- 先导化合物样/药物样分类
- 结构警报:硝基、芳香胺
v1.1.0(2026-02-14)
- - 初始生产版本,具备完整ADME分析功能
- 利平斯基规则、韦伯规则、QED、SA评分、PAINS
- 血脑屏障、水溶性、胃肠道吸收、CYP3A4、P-糖蛋白、血浆蛋白结合率预测
- 自动化风险评估
- 标准链输出模式
- 全面的错误处理
- 使用多种分子进行端到端测试