drclaw/agent_hub/templates/chemistry/skills/molecular-property-profiling/SKILL.md
Comprehensive molecular property analysis covering basic info, hydrophobicity, H-bonding, structural complexity, topology, drug-likeness, charge distribution, and complexity metrics.
npx skillsauth add qzzqzzb/drclaw molecular-property-profilingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use the same DrugSDAClient class as defined in previous skills.
This workflow computes a comprehensive set of molecular descriptors across 8 different categories, providing a complete molecular profile for QSAR modeling, drug discovery, and molecular analysis.
Workflow Steps:
Implementation:
from collections import defaultdict
def merge_lists_by_smiles(*lists):
"""Merge multiple descriptor lists by SMILES key"""
merged = defaultdict(dict)
for lst in lists:
for d in lst:
smiles = d['smiles']
merged[smiles].update(d)
return list(merged.values())
client = DrugSDAClient("https://scp.intern-ai.org.cn/api/v1/mcp/2/DrugSDA-Tool")
if not await client.connect():
print("connection failed")
return
## Input: List of SMILES strings
smiles_list = [
'Nc1nnc(S(=O)(=O)NCCc2ccc(O)cc2)s1',
'COc1ccc2c(=O)cc(C(=O)N3CCN(c4ccc(F)cc4)CC3)oc2c1',
'CCCC1CCC(CC(=O)Cl)(C2CCCCC2)CC1'
]
## Step 1: Calculate basic molecular properties
result = await client.session.call_tool(
"calculate_mol_basic_info",
arguments={"smiles_list": smiles_list}
)
basic_metrics = client.parse_result(result)['metrics']
## Step 2: Calculate hydrophobicity descriptors
result = await client.session.call_tool(
"calculate_mol_hydrophobicity",
arguments={"smiles_list": smiles_list}
)
hydrophobicity_metrics = client.parse_result(result)['metrics']
## Step 3: Calculate hydrogen bonding properties
result = await client.session.call_tool(
"calculate_mol_hbond",
arguments={"smiles_list": smiles_list}
)
hbond_metrics = client.parse_result(result)['metrics']
## Step 4: Calculate structural complexity
result = await client.session.call_tool(
"calculate_mol_structure_complexity",
arguments={"smiles_list": smiles_list}
)
structure_metrics = client.parse_result(result)['metrics']
## Step 5: Calculate topological descriptors
result = await client.session.call_tool(
"calculate_mol_topology",
arguments={"smiles_list": smiles_list}
)
topology_metrics = client.parse_result(result)['metrics']
## Step 6: Calculate drug chemistry properties
result = await client.session.call_tool(
"calculate_mol_drug_chemistry",
arguments={"smiles_list": smiles_list}
)
chemistry_metrics = client.parse_result(result)['metrics']
## Step 7: Calculate charge properties
result = await client.session.call_tool(
"calculate_mol_charge",
arguments={"smiles_list": smiles_list}
)
charge_metrics = client.parse_result(result)['metrics']
## Step 8: Calculate complexity metrics
result = await client.session.call_tool(
"calculate_mol_complexity",
arguments={"smiles_list": smiles_list}
)
complexity_metrics = client.parse_result(result)['metrics']
## Merge all descriptors by SMILES
complete_profiles = merge_lists_by_smiles(
basic_metrics,
hydrophobicity_metrics,
hbond_metrics,
structure_metrics,
topology_metrics,
chemistry_metrics,
charge_metrics,
complexity_metrics
)
## Display results
for profile in complete_profiles:
print(f"\nSMILES: {profile['smiles']}")
print(f"Molecular Formula: {profile['molecular_formula']}")
print(f"Molecular Weight: {profile['molecular_weight']:.2f}")
print(f"LogP: {profile['logp']:.2f}")
print(f"QED Score: {profile['qed']:.4f}")
print(f"H-Bond Donors: {profile['num_h_donors']}")
print(f"H-Bond Acceptors: {profile['num_h_acceptors']}")
print(f"TPSA: {profile['tpsa']:.2f}")
print(f"Lipinski Violations: {profile['lipinski_rule_of_5_violations']}")
await client.disconnect()
molecular_formula: Molecular formulamolecular_weight: Molecular weight (Da)num_heavy_atoms: Count of non-hydrogen atomsnum_atoms, num_bonds: Total atom and bond countsformal_charge: Overall formal chargelogp: Partition coefficient (lipophilicity)molar_refractivity: Molar refractivityfraction_csp3: Fraction of sp3 carbons (saturation)num_h_donors: H-bond donor countnum_h_acceptors: H-bond acceptor counttpsa: Topological polar surface area (Ų)num_rings, num_aromatic_rings: Ring countsnum_rotatable_bonds: Flexible bondsnum_heteroatoms: Non-C/H atomschi0v-chi4v: Chi connectivity indiceskappa1-kappa3: Kappa shape indiceshall_kier_alpha: Hall-Kier alpha valueqed: Quantitative Estimate of Drug-likeness (0-1)lipinski_rule_of_5_violations: Lipinski violations (0-4)min/max/avg_gasteiger_charge: Gasteiger partial chargesgasteiger_charge_range: Charge distribution rangemolecular_complexity: Bertz complexity indexaromatic_proportion: Fraction of aromatic atomsasphericity: 3D shape asphericityInput:
smiles_list: List of SMILES stringsOutput:
Typical ranges for oral drug candidates:
content-media
当用户明确要求“写/生成 NSFC 预算说明书”“写预算说明”“生成 budget.tex / budget.pdf”“写国自然预算 justification”时使用。基于用户标书正文或补充材料,输出一份可提交的预算说明书 LaTeX 项目并渲染 `budget.pdf`。若用户未指定工作目录,必须暂停并先要求其指定。⚠️ 不适用:用户只是想了解预算原则;用户仅要预算表数字而不写说明书;或用户是 2026 青年 A/B/C 默认包干制且无需预算说明书的场景。
tools
当用户明确要求"写/润色 NSFC 标书摘要""生成中文摘要和英文摘要""把中文摘要翻译成英文摘要"时使用。输出中文、英文两个版本(英文必须是中文的忠实翻译版),同时输出标题建议(1个推荐标题+5个候选标题及理由)。中文摘要默认≤400字符,英文摘要默认≤4000字符。输出方式:将结果写入工作目录下的 `NSFC-ABSTRACTS.md`。⚠️ 不适用:用户只想翻译一段与标书无关的通用文本(应直接翻译);用户只想写立项依据/研究内容/研究基础正文(应使用对应 nsfc 系列 skill)。
documentation
当用户明确要求"更新项目指南""同步指南""沉淀洞见到指南"时使用。将对话中新产生的可复用写作洞见实时沉淀到项目指南文件,保持术语口径一致、结构稳定、可检验与可复现。调用时必须指定指南文件路径。
content-media
当用户明确要求"从文件/图片/网页/描述中提取综述主题"或"生成主题+关键词+核心问题结构化输出"时使用。支持文件(PDF/Word/Markdown/Tex)、文件夹、图片、自然语言描述、网页 URL 等多种输入源,自动识别输入类型并提取内容,生成可直接用于 systematic-literature-review 及其他文献综述技能的结构化输出。