agentsclimarketplace

Smiles canonicalization rdkit

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/smiles-canonicalization-rdkit

Use when when processing raw SMILES strings from external databases or user input that may contain non-canonical tautomeric forms, variable stereochemical notation, or redundant representations of the same chemical structure.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill smiles-canonicalization-rdkit

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 15 stars15 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as CC-BY-4.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

7.2 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it

SMILES Canonicalization via RDKit

License: restricted — no clear open-source license detected for the underlying tool; verify licensing before commercial use or redistribution. <!-- asb-license-banner -->

Summary

Standardize raw SMILES strings into canonical form using RDKit's MolToSmiles function, removing stereochemical ambiguities and tautomeric variations to ensure consistent molecular representation across structure curation pipelines.

When to use

When processing raw SMILES strings from external databases or user input that may contain non-canonical tautomeric forms, variable stereochemical notation, or redundant representations of the same chemical structure. Apply this skill during the structure standardization phase of natural products curation workflows to ensure all structures in the downstream 2D/3D coordinate generation and database deposition steps are normalized.

When NOT to use

  • Input structures are already validated as canonical (e.g., from a trusted vendor SMILES list or pre-curated database with documented canonicalization protocol).
  • Stereochemistry must be preserved exactly as input (e.g., for diastereomer-specific bioactivity studies); canonicalization will lose original stereochemical intent if the raw SMILES used non-standard notation.
  • SMILES strings represent polymers, mixtures, or organometallic complexes where RDKit parsing may fail or produce unexpected canonical forms; manual curation is required.

Inputs

  • raw SMILES strings (from tsv.gz file, comma- or tab-delimited)
  • RDKit-compatible molecular structure data
  • structure-organism pair metadata with raw SMILES identifiers

Outputs

  • canonical SMILES strings (standardized, kekulized with aromaticity preserved)
  • curated structure dataset with canonical SMILES and traceability to raw input
  • validation log (parse errors, failed canonicalizations)
  • tsv.gz file with canonical SMILES and associated molecular metadata

How to apply

Parse each raw SMILES string into an RDKit molecule object and validate chemical syntax; if parsing fails, log the invalid SMILES for manual review. Call RDKit's MolToSmiles function with kekulize=False to canonicalize the structure, standardizing tautomeric forms and removing stereochemical ambiguities. Serialize the canonical SMILES output alongside the original raw SMILES for traceability. Store both forms in the curated structure dataset (e.g., interim/tables/1_translated/structure/smiles.tsv.gz). The kekulize=False parameter preserves aromaticity notation, which is critical for consistent downstream coordinate generation and structure comparison.

Related tools

Examples

from rdkit import Chem; raw_smiles = 'C1=CC=C(C=C1)O'; mol = Chem.MolFromSmiles(raw_smiles); canonical_smiles = Chem.MolToSmiles(mol, kekuleSmiles=False); print(canonical_smiles)

Evaluation signals

  • All output canonical SMILES parse successfully into RDKit molecule objects with no errors.
  • Canonical SMILES are stable under re-canonicalization (applying MolToSmiles again yields identical output).
  • Tautomeric forms of the same structure (e.g., keto vs. enol) map to a single canonical SMILES.
  • Original and canonical SMILES represent the same molecular graph (validated via InChIKey comparison or Tanimoto similarity on fingerprints).
  • No structural information is lost: atom count, bond count, and formal charges match between input and canonical output.

Limitations

  • RDKit may fail to parse or canonicalize highly unusual or non-standard SMILES notation; invalid inputs must be manually curated or excluded.
  • Canonicalization with kekulize=False assumes aromaticity perception is unambiguous; some ambiguous aromatic systems may produce inconsistent canonical forms across RDKit versions.
  • Stereochemistry is removed or simplified by canonicalization; if stereospecific bioactivity data exist, the link between raw stereochemistry and canonical form must be documented separately.
  • Large-scale canonicalization (>100k structures) may be I/O or memory-bound; batch processing and checkpointing are recommended.
  • No changelog documented for the LOTUS processor—version-specific canonicalization behavior changes are not tracked, making reproducibility across releases uncertain.

Evidence

  • [methods] Canonicalization method and output format: "Canonicalize SMILES using RDKit's MolToSmiles with kekulize=False to standardize tautomeric forms and remove stereochemical ambiguities."
  • [methods] Input file and parsing workflow: "Load raw SMILES strings from interim/tables/0_original/structure/smiles.tsv.gz using pandas. Parse each SMILES string into RDKit molecule objects and validate chemical syntax."
  • [methods] Output file and dataset integration: "Serialize both 2D and 3D representations alongside canonical SMILES, storing results to interim/tables/1_translated/structure/smiles.tsv.gz."
  • [methods] Tool ecosystem and role in curation pipeline: "The LOTUS processor employs Python with RDKit-based tools (smiles.py, sanitizing.py, stereocounting.py) as part of the 2_curating workflow stage"
  • [methods] Broader curation context and dataset scale: "231330 | 153956 (3D|2D) unique curated structures and 42166 unique organisms"

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.