关于 cheminformatics
面向药物发现工作流的计算化学技能,使用 RDKit 处理分子结构。研究人员可通过可复现的流程预测性质与 ADMET 风险,并筛选化合物。
主要功能
- 01解析 SMILES 和 SDF 结构
- 02计算分子描述符
- 03按类药性筛选
- 04预测 ADMET 性质
- 05搜索分子相似性
- 06准备对接结构
适用场景
- 01筛选化合物库以寻找先导候选物
- 02评估药物发现中的 ADMET 风险
- 03查找与已知分子相似的化合物
- 04为分子对接准备结构
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ itallstartedwithaidea/ agent-skills --skill cheminformatics安装后在 Claude Code 中输入/cheminformatics确认已加载。
详细介绍
化学信息学
googleadsagent.ai™ 的 Agent Skills™ 项目之一
描述
化学信息学使用 RDKit 提供计算化学工作流,用于分子性质预测、虚拟筛选、ADMET 分析、分子对接准备和化学空间探索。Agent 会生成可复现的化学信息学管线,将分子结构(SMILES、SDF)转化为可用于决策的预测结果,涵盖类药性、毒性和结合亲和力。
药物发现会产生海量化学库,不可能全部合成并测试。化学信息学通过计算缩小搜索空间:依据 Lipinski 五法则进行筛选、预测 ADMET 性质(吸收、分布、代谢、排泄、毒性)、对接姿势评分,并对化学空间进行聚类,以识别多样化的先导候选化合物。每一步都会排除那些无法通过后续成本更高阶段的化合物。
此技能涵盖从 SMILES 解析、描述符计算、指纹生成、相似性搜索、性质预测到可视化的分子信息学工作流。它与 PubChem 和 ChEMBL 等数据库集成,用于检索化合物,并依据已知活性和非活性化合物进行基准测试。
使用场景
- 计算分子性质和描述符
- 筛选化合物库,评估类药性
- 预测先导化合物的 ADMET 性质
- 执行分子相似性搜索
- 准备用于分子对接的结构
- 可视化化学空间和构效关系
工作原理
graph TD
A[Molecular Input: SMILES/SDF] --> B[Parse + Validate Structures]
B --> C[Calculate Descriptors]
C --> D[Drug-likeness Filters]
D --> E{Passes Lipinski?}
E -->|No| F[Flag as Non-Drug-like]
E -->|Yes| G[ADMET Prediction]
G --> H[Virtual Screening Score]
H --> I[Docking Preparation]
I --> J[Ranked Candidate List]
F --> K[Report with Flags]
J --> K
化合物会依次经过筛选标准越来越严格的过滤步骤。类药性筛选会剔除明显不可行的候选物,ADMET 预测会标记吸收和毒性风险,而虚拟筛选则会根据预测活性为剩余化合物排序。
实现
from rdkit import Chem
from rdkit.Chem import Descriptors, AllChem, Draw, Lipinski, DataStructs
from rdkit.Chem import rdMolDescriptors
import pandas as pd
def molecular_properties(smiles: str) -> dict:
mol = Chem.MolFromSmiles(smiles)
if mol is None:
raise ValueError(f"Invalid SMILES: {smiles}")
return {
"smiles": smiles,
"mw": Descriptors.MolWt(mol),
"logp": Descriptors.MolLogP(mol),
"hbd": Descriptors.NumHDonors(mol),
"hba": Descriptors.NumHAcceptors(mol),
"tpsa": Descriptors.TPSA(mol),
"rotatable_bonds": Descriptors.NumRotatableBonds(mol),
"rings": Descriptors.RingCount(mol),
"lipinski_violations": sum([
Descriptors.MolWt(mol) > 500,
Descriptors.MolLogP(mol) > 5,
Descriptors.NumHDonors(mol) > 5,
Descriptors.NumHAcceptors(mol) > 10,
]),
}
def lipinski_filter(df: pd.DataFrame) -> pd.DataFrame:
return df[df["lipinski_violations"] <= 1].copy()
def similarity_search(query_smiles: str, library: list[str], threshold: float = 0.7) -> list[dict]:
query_mol = Chem.MolFromSmiles(query_smiles)
query_fp = AllChem.GetMorganFingerprintAsBitVect(query_mol, radius=2, nBits=2048)
results = []
for smi in library:
mol = Chem.MolFromSmiles(smi)
if mol is None:
continue
fp = AllChem.GetMorganFingerprintAsBitVect(mol, radius=2, nBits=2048)
tanimoto = DataStructs.TanimotoSimilarity(query_fp, fp)
if tanimoto >= threshold:
results.append({"smiles": smi, "tanimoto": tanimoto})
return sorted(results, key=lambda x: -x["tanimoto"])
def admet_flags(props: dict) -> list[str]:
flags = []
if props["logp"] > 5:
flags.append("High lipophilicity: poor aqueous solubility risk")
if props["tpsa"] > 140:
flags.append("High TPSA: poor membrane permeability risk")
if props["mw"] > 500:
flags.append("High MW: poor oral absorption risk")
if props["rotatable_bonds"] > 10:
flags.append("High flexibility: poor oral bioavailability risk")
return flags
最佳实践
- 计算描述符前务必验证 SMILES 是否解析成功——无效结构可能导致不易察觉的错误
- 默认使用 Morgan 指纹(radius=2,2048 位)进行相似性计算
- 将 Lipinski 五法则用作初筛标准,而非绝对门槛
- 报告所有相似性搜索中使用的 Tanimoto 相似度阈值
- 比较前先对分子进行标准化处理(脱盐、中和、规范化)
- 使用指纹表示,通过 t-SNE 或 UMAP 可视化化学空间
平台兼容性
| 平台 | 支持情况 | 备注 |
|---|---|---|
| Cursor | 完全支持 | Python + RDKit 环境 |
| VS Code | 完全支持 | Jupyter + 分子可视化 |
| Windsurf | 完全支持 | 科学计算 Python |
| Claude Code | 完全支持 | 管线生成 |
| Cline | 完全支持 | 化学信息学工作流 |
| aider | 部分支持 | 仅代码生成 |
相关技能
关键词
cheminformatics rdkit molecular-properties virtual-screening admet lipinski drug-discovery molecular-similarity
© 2026 googleadsagent.ai™ | Agent Skills™ | MIT License