PharmaClaw Toxicology Agent
Overview
Predictive toxicology and drug safety profiling agent for the PharmaClaw pipeline. Screens drug candidates via RDKit descriptors, rule-based filters (Lipinski Ro5, Veber), QED scoring, and PAINS alerts to flag safety risks early in the discovery process.
Quick Start
CODEBLOCK0
Capabilities
| Check | Method | Threshold |
|---|
| Lipinski Ro5 | MW, LogP, HBD, HBA | MW>500, LogP>5, HBD>5, HBA>10 |
| Veber Rules |
TPSA, Rotatable Bonds | TPSA>140, RotB>10 |
| QED Score | RDKit QED module | 0-1 (higher = more drug-like) |
| PAINS Alerts | Substructure matching | Known assay interference patterns |
| Ring Analysis | Aromatic/total ring count | Complexity indicator |
Decision Tree
- - SMILES input → RDKit descriptor calculation → Rule-based screening
- Lipinski violations = 0 AND PAINS = 0 → Risk: Low
- Any violations or PAINS hits → Risk: Medium/High
- High risk flagged → Recommend analogs via Chemistry Query / IP Expansion
Output Format
CODEBLOCK1
Risk Classification
- - Low: No Lipinski violations, no PAINS alerts, QED > 0.5
- Medium: 1-2 Lipinski violations OR low QED
- High: 3+ Lipinski violations, PAINS hits, or multiple Veber violations
Chain Integration
- - Receives from: Chemistry Query (SMILES), Pharmacology (ADME flags)
- Feeds into: IP Expansion (safer derivative suggestions), Synthesis (avoid toxic intermediates)
- Cross-references: Market Intel (FAERS adverse events for similar structures)
Dependencies
- -
rdkit-pypi — Molecular descriptors, QED, substructure matching
Scripts
- -
scripts/tox_agent.py — Main agent: ToxAgent class with analyze(smiles) method
Limitations
- - PAINS screening uses simplified substructure set (production should use full PAINS catalog)
- No Ames mutagenicity or hERG channel prediction (descriptor-based proxies planned)
- LD50 estimation not yet implemented (QSAR model planned for future version)
PharmaClaw 毒理学代理
概述
PharmaClaw 流程中的预测毒理学和药物安全性评估代理。通过 RDKit 描述符、基于规则的过滤器(Lipinski Ro5、Veber)、QED 评分和 PAINS 警报,在发现过程早期筛选候选药物,标记安全风险。
快速开始
bash
分析化合物
python scripts/tox_agent.py CC(=O)Nc1ccc(O)cc1
默认(乙醇)
python scripts/tox_agent.py
功能
| 检查项 | 方法 | 阈值 |
|---|
| Lipinski Ro5 | 分子量、LogP、氢键供体、氢键受体 | 分子量>500、LogP>5、氢键供体>5、氢键受体>10 |
| Veber 规则 |
拓扑极性表面积、可旋转键 | 拓扑极性表面积>140、可旋转键>10 |
| QED 评分 | RDKit QED 模块 | 0-1(越高越类药) |
| PAINS 警报 | 子结构匹配 | 已知检测干扰模式 |
| 环分析 | 芳香环/总环数 | 复杂性指标 |
决策树
- - SMILES 输入 → RDKit 描述符计算 → 基于规则的筛选
- Lipinski 违规=0 且 PAINS=0 → 风险:低
- 任何违规或 PAINS 命中 → 风险:中/高
- 标记高风险 → 通过化学查询/IP扩展推荐类似物
输出格式
json
{
lipinski_viol: 0,
veber_viol: 0,
qed: 0.737,
pains: 0,
risk: Low,
props: {
mw: 151.2,
logp: 1.02,
tpsa: 49.3,
hbd: 2,
hba: 2,
rotb: 1,
rings: 1,
arom: 1
}
}
风险分类
- - 低: 无 Lipinski 违规,无 PAINS 警报,QED > 0.5
- 中: 1-2 个 Lipinski 违规或 QED 较低
- 高: 3 个以上 Lipinski 违规、PAINS 命中或多个 Veber 违规
链式集成
- - 接收自: 化学查询(SMILES)、药理学(ADME 标志)
- 输入至: IP扩展(更安全的衍生物建议)、合成(避免有毒中间体)
- 交叉参考: 市场情报(类似结构的 FAERS 不良事件)
依赖项
- - rdkit-pypi — 分子描述符、QED、子结构匹配
脚本
- - scripts/tox_agent.py — 主代理:包含 analyze(smiles) 方法的 ToxAgent 类
局限性
- - PAINS 筛选使用简化的子结构集(生产环境应使用完整 PAINS 目录)
- 无 Ames 致突变性或 hERG 通道预测(计划使用基于描述符的代理)
- LD50 估算尚未实现(计划在未来版本中引入 QSAR 模型)