agentsclimarketplace

Chemical structure validation syntax

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/chemical-structure-validation-syntax

Curated, evidence-grounded skill and software-tool collections for scientific AI agents, generated by the AgenticScienceBuilder

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill chemical-structure-validation-syntax

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

  • 14 stars14 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 author says it does

Copied from the file, not written here

Use when applied immediately after loading raw SMILES strings from external databases or user input during the 2_curating workflow stage, before attempting canonicalization or 2D/3D coordinate generation.

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

6.2 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it

Chemical Structure Validation & Syntax Checking

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

Summary

Validates raw SMILES strings for correct chemical syntax and parsability using RDKit before downstream processing. This skill ensures that only chemically valid structures enter the curation pipeline, preventing silent failures in canonicalization and coordinate generation.

When to use

Applied immediately after loading raw SMILES strings from external databases or user input during the 2_curating workflow stage, before attempting canonicalization or 2D/3D coordinate generation. Use this skill when you have ungoverned or heterogeneous SMILES from multiple sources and cannot assume they are well-formed.

When NOT to use

  • Input SMILES have already been validated by a trusted upstream source (e.g., ChEMBL or PubChem curated downloads with integrity checks).
  • You are only analyzing structure-activity relationships and do not need 3D coordinates; invalid SMILES may still carry semantic information in some contexts.
  • The workflow step is 3_analyzing or later; structure validation should have occurred during 2_curating.

Inputs

  • Raw SMILES strings (TSV or CSV format, e.g., interim/tables/0_original/structure/smiles.tsv.gz)
  • Pandas DataFrame or iterable of SMILES strings

Outputs

  • Validated SMILES (subset of input passing syntax checks)
  • Rejected SMILES list with error messages
  • Boolean validation flags per input record

How to apply

Parse each SMILES string into an RDKit molecule object using RDKit's SMILES parser and evaluate whether the parse succeeds without exception. Invalid SMILES will fail to create a valid mol object; catch these failures and flag or remove them before proceeding. This is a prerequisite for later steps (canonicalization, stereocounting, coordinate generation) because RDKit requires a valid mol object to compute molecular properties and representations. The rationale is that garbage SMILES early in the pipeline propagate errors throughout the curation, reducing the final yield of usable 2D/3D structure records.

Related tools

Examples

from rdkit import Chem; valid_mols = [Chem.MolFromSmiles(smi) for smi in smiles_list]; valid_smiles = [smi for smi, mol in zip(smiles_list, valid_mols) if mol is not None]

Evaluation signals

  • Percentage of input SMILES that parse successfully (yield rate); expect >90% for curated sources, <80% for raw databases.
  • Absence of downstream RDKit errors during canonicalization and coordinate generation; all records that passed validation should proceed without parse failures.
  • Comparison of valid SMILES count to final 2D/3D record count; a large drop suggests late-stage filtering issues unrelated to syntax.
  • Manual spot-check of rejected SMILES for known malformations (e.g., mismatched brackets, invalid atom symbols, disconnected fragments).
  • Cross-validation: re-parse all 'valid' SMILES in a second pass to confirm consistency.

Limitations

  • RDKit's SMILES parser is permissive and may accept non-standard or ambiguous SMILES that are syntactically valid but chemically nonsensical (e.g., hypervalent atoms). Syntax validation does not guarantee chemical correctness.
  • No stereochemical validation at this stage; that is handled separately by stereocounting.py. Invalid stereochemistry (e.g., [C@@H] on a non-stereogenic center) may pass syntax checks.
  • Tautomeric and resonance ambiguities are not resolved by syntax checking; canonicalization with RDKit's MolToSmiles(kekulize=False) occurs in a later step.
  • SMILES with isotope labels, radical charges, or rare bond types may parse but cause issues in later 3D coordinate generation; syntax validation alone cannot catch these.

Evidence

  • [methods] Parse each SMILES string into RDKit molecule objects and validate chemical syntax.: "Parse each SMILES string into RDKit molecule objects and validate chemical syntax."
  • [methods] The LOTUS processor employs Python with RDKit-based tools (smiles.py, sanitizing.py, stereocounting.py) as part of the 2_curating workflow stage to process and standardize molecular structures.: "The LOTUS processor employs Python with RDKit-based tools (smiles.py, sanitizing.py, stereocounting.py) as part of the 2_curating workflow stage to process and standardize molecular structures"
  • [methods] Load raw SMILES strings from interim/tables/0_original/structure/smiles.tsv.gz using pandas.: "Load raw SMILES strings from interim/tables/0_original/structure/smiles.tsv.gz using pandas."

What ships with it

Read from the repository

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

Keep looking

Skills are one crate of 328,083. 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.