跳到正文
Skillpedia
分析与电子表格15k · #11046

chemistry-rdkit

它能做什么

该技能为在 Python 中处理化学结构提供规则。适合进行分子分析或药物发现工作的化学家和研究人员。

适用场景

  • ✓当你处理以 SMILES 字符串表示的分子的时候。
  • ✓当你希望计算分子质量或亲脂性等分子性质的时候。
  • ✓当你需要比较分子或搜索某个化学子结构的时候。

技能链接

https://github.com/aiming-lab/AutoResearchClaw/blob/main/.claude/skills/chemistry-rdkit/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/aiming-lab/AutoResearchClaw/blob/main/.claude/skills/chemistry-rdkit/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请把这十个 SMILES 字符串与利平斯基五规则进行比对,并列出通过检验的那些。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会使用 RDKit 库读取分子,计算描述符和指纹,通过相似性比较分子,并搜索结构模式。它会先检查每个输入,因为无效的 SMILES 字符串会返回空的分子。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

RDKit Cheminformatics Best Practice

Molecular I/O

  1. Create molecules from SMILES: mol = Chem.MolFromSmiles('CCO')
  2. Always check for None: MolFromSmiles returns None on invalid input
  3. Convert to canonical SMILES: Chem.MolToSmiles(mol)
  4. Read SDF files: suppl = Chem.SDMolSupplier('file.sdf')
  5. Read SMILES files: suppl = Chem.SmilesMolSupplier('file.smi')
  6. Write molecules: writer = Chem.SDWriter('output.sdf')

Molecular Descriptors

  1. Molecular weight: Descriptors.MolWt(mol)
  2. LogP (lipophilicity): Descriptors.MolLogP(mol)
  3. TPSA (polar surface area): Descriptors.TPSA(mol)
  4. H-bond donors/acceptors: Descriptors.NumHDonors(mol), Descriptors.NumHAcceptors(mol)
  5. Rotatable bonds: Descriptors.NumRotatableBonds(mol)
  6. Lipinski Rule of 5: MW <= 500, LogP <= 5, HBD <= 5, HBA <= 10

Fingerprints and Similarity

  1. Morgan (circular) fingerprints: AllChem.GetMorganFingerprintAsBitVect(mol, radius=2, nBits=2048)
  2. RDKit fingerprints: Chem.RDKFingerprint(mol)
  3. MACCS keys: MACCSkeys.GenMACCSKeys(mol)
  4. Tanimoto similarity: DataStructs.TanimotoSimilarity(fp1, fp2)
  5. Use radius=2 (ECFP4 equivalent) as default for most applications
  6. For virtual screening, Tanimoto > 0.7 suggests structural similarity

Substructure Search

  1. SMARTS patterns: pattern = Chem.MolFromSmarts('[OH]')
  2. Check match: mol.HasSubstructMatch(pattern)
  3. Get all matches: mol.GetSubstructMatches(pattern)
  4. Common SMARTS: [#6](=O)[OH] (carboxylic acid), [NH2] (primary amine)
  5. Filter compound libraries by functional group presence

Property Calculation Patterns

  1. Batch processing: iterate over SDMolSupplier, skip None entries
  2. Use Chem.Descriptors.descList for all available descriptors
  3. For ADMET filtering, calculate Lipinski, Veber, and PAINS filters
  4. Generate 3D coordinates: AllChem.EmbedMolecule(mol, AllChem.ETKDG())
  5. Minimize energy: AllChem.MMFFOptimizeMolecule(mol)

Common Pitfalls

  1. Always sanitize molecules (default behavior) — disable only when needed
  2. Add hydrogens explicitly for 3D work: Chem.AddHs(mol)
  3. Handle stereochemistry: use Chem.AssignStereochemistry(mol)
  4. Large SDF files: use ForwardSDMolSupplier for memory efficiency
  5. Kekulization errors usually indicate invalid SMILES input
常见问题

什么是五规则?

一组关于分子量、亲脂性和氢键的简单限制,该技能用它来判断类药分子。

相似性分数代表什么?

Tanimoto(谷本)分数高于 0.7 表示这些分子在结构上相似。

遇到无效分子会怎样?

该技能会检查这种情况,因为无效输入会返回空的分子,而不是报错。

详情

作者的原始描述

Computational chemistry with RDKit for molecular analysis, descriptors, fingerprints, and substructure search. Use when working with SMILES, drug discovery, or cheminformatics tasks.

repo: aiming-lab/AutoResearchClaw

热度

GitHub 星标
15k
排名
#11046
许可证
MIT
更新时间
2026/8/19

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能