bio-molecular-standardization
БесплатноЗапускает вложенные скриптыНе проверенStandardizes molecular structures using ChEMBL chembl_structure_pipeline and RDKit rdMolStandardize covering sanitization, salt/solvent stripping…
от gabrielmoreira★ 23 звезды на GitHubОб этом скилле
Version Compatibility
Reference examples tested with: RDKit 2024.09+, chembl_structure_pipeline 1.2+, MolVS 0.1.1 (legacy reference only -- rdMolStandardize is current).
Before using code patterns, verify installed versions match. If versions differ:
- Python:
pip show <package>thenhelp(module.function)to check signatures
If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
Molecular Standardization
Convert raw molecular structures into a single canonical form for ML training data, deduplication, registry, and cross-database joining. Standardization is the single most underrated upstream step: skipping it causes silent ML data leakage (training and test compounds with different tautomers count as separate), bogus QSAR predictions, and database join misses. The ChEMBL pipeline (Bento 2020) and canSARchem (Ravi 2022) are the two industry references; canSARchem extends ChEMBL with canonical-tautomer-before-parent extraction. RDKit's rdMolStandardize implements ChEMBL-equivalent logic in C++ (the older MolVS Python implementation was deprecated Q1 2024).
For format-level I/O and aromaticity perception, see chemoinformatics/molecular-io. For descriptor calculation after standardization, see chemoinformatics/molecular-descriptors.
Standardization Pipeline Stages
| Stage | RDKit Tool | Operation | Common errors caught |
|---|---|---|---|
| 1. Sanitization | Chem.SanitizeMol |
Kekulize, assign aromaticity, fix valences | Wrong valence on N/O |
| 2. Salt stripping | rdMolStandardize.FragmentRemover or LargestFragmentChooser |
Remove counterions | Cl-, Na+, K+, OH- |
| 3. Mixture choice | LargestFragmentChooser |
Pick parent fragment | Co-crystals, hydrates |
| 4. Charge neutralization | Uncharger |
Neutralize while preserving net charge | Permanent charges preserved (quaternary N+) |
| 5. Tautomer canonicalization | TautomerEnumerator.Canonicalize |
Pick canonical tautomer | Keto/enol; amide/imidate |
| 6. Stereo standardization | Chem.AssignStereochemistry |
Consistent stereo descriptors | Lost wedges, ambiguous R/S |
| 7. Isotope normalization | manual or MolToSmiles(isomericSmiles=False) |
Remove 13C, 2H labels | Tracer studies |
| 8. Output canonicalization | Chem.MolToSmiles(canonical=True) |
Canonical SMILES + InChIKey | Round-trip stability |
Pipeline Reconciliation
| Pipeline | Origin | Tautomer canonicalization | Salt definition | Use case |
|---|---|---|---|---|
| ChEMBL pipeline | EBI ChEMBL | Pre-rdMolStandardize legacy; now uses rdMolStandardize | ChEMBL salt list (extensive) | Drug-like compounds, FDA approvals |
| canSARchem | ICR Cancer Research UK | Canonical tautomer BEFORE parent extraction | Extended salt list | Cancer drug discovery |
| PubChem (OpenEye) | NIH NCBI | OpenEye QUACPAC tautomer | PubChem salt list | Bioassay data, large-scale |
| RDKit rdMolStandardize default | Greg Landrum | RDKit TautomerEnumerator | RDKit default | General purpose, open source |
Key difference (canSARchem vs ChEMBL):
- ChEMBL: parent first, then canonical tautomer of parent
- canSARchem: canonical tautomer first, then parent
For 95% of drug-like molecules these produce identical results. For tautomer-ambiguous molecules (amide/imidate, ketoenol, lactam/lactim), the order matters; canSARchem produces more stable canonical forms.
ChEMBL Structure Pipeline (Reference Implementation)
ChEMBL's standardization is the most widely-used reference. The Python package chembl_structure_pipeline exposes the validated pipeline.
Goal: Apply the industry-reference ChEMBL standardization pipeline to a SMILES.
Approach: Parse SMILES with RDKit, run standardize_mol (sanitize + uncharge + normalize + canonical tautomer), then get_parent_mol (strip salts/counter-ions), and emit canonical SMILES.
from chembl_structure_pipeline import standardize_mol, get_parent_mol
from rdkit import Chem
def chembl_pipeline(smi):
mol = Chem.MolFromSmiles(smi)
if mol is None:
return None, 'parse_failure'
standardized, _ = standardize_mol(mol)
parent, _ = get_parent_mol(standardized)
return Chem.MolToSmiles(parent), 'ok'
standardize_mol: sanitize + uncharge + normalize functional groups + canonicalize tautomers.
get_parent_mol: strip salts/counter-ions; choose largest fragment.
Output: canonical SMILES of the parent (free acid/free base, neutral form).
Full Standardization with rdMolStandardize
For more granular control or non-ChEMBL workflows.
Goal: Execute each standardization step explicitly to control salt stripping, charge handling, tautomer canonicalization, and isotope normalization.
Approach: Run the 8-stage pipeline (sanitize, largest fragment, normalize, uncharge, tautomer canonicalize, isot
Установить bio-molecular-standardization в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл bio-molecular-standardization?
Standardizes molecular structures using ChEMBL chembl_structure_pipeline and RDKit rdMolStandardize covering sanitization, salt/solvent stripping, neutralization, tautomer canonicalization, stereochemistry standardization, mixture handling, and isotope normalization. Explicitly compares ChEMBL pipeline, canSARchem, and PubChem standardization choices. Use when preparing libraries for QSAR training, joining datasets across sources, deduplicating compound collections, or building canonical compound registries.
Как установить скилл bio-molecular-standardization?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл bio-molecular-standardization запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub