agentsclimarketplace

Smiles inchi round trip validation

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/smiles-inchi-round-trip-validation

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 smiles-inchi-round-trip-validation

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 you have implemented a new RDKit-based ComputeConverter for SMILES↔InChI conversions and need to verify that the conversion methods preserve molecular structure integrity across round-trip transformations (SMILES → InChI → SMILES or vice versa) before registering it in the MSMetaEnhancer.

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.0 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it

SMILES–InChI Round-Trip Validation

Summary

Validate the chemical correctness and consistency of local SMILES↔InChI conversions by performing bidirectional conversions on test molecules and comparing structural equivalence. This ensures that a ComputeConverter subclass using RDKit produces chemically valid and reversible transformations without relying on external web services.

When to use

You have implemented a new RDKit-based ComputeConverter for SMILES↔InChI conversions and need to verify that the conversion methods preserve molecular structure integrity across round-trip transformations (SMILES → InChI → SMILES or vice versa) before registering it in the MSMetaEnhancer pipeline.

When NOT to use

  • You are validating web service converters (e.g., CTS, CIR, PubChem) — use their API response schemas and rate-limit handling instead.
  • Input molecules contain features unsupported by RDKit (e.g., exotic metals, unusual bonding) — RDKit may fail to parse or generate InChI for these.
  • Your goal is to benchmark speed or throughput rather than correctness — round-trip validation is a correctness check, not a performance benchmark.

Inputs

  • Reference SMILES strings (e.g., 'CC(=O)O', 'c1ccccc1')
  • InChI strings generated by RDKit from test SMILES
  • MSMetaEnhancer ComputeConverter subclass source code

Outputs

  • pytest test report showing pass/fail for each round-trip conversion
  • Validated converter implementation with confirmed chemical equivalence
  • Assertion results for output dictionary structure and content correctness

How to apply

Create a pytest test file that instantiates the converter and tests conversion accuracy by: (1) selecting a set of reference SMILES inputs with known chemical structures (e.g., simple organic molecules, isomers); (2) converting SMILES to InChI using RDKit's Chem.inchi.MolToInchi; (3) converting the InChI back to canonical SMILES using RDKit's Chem.MolFromInchi and Chem.MolToSmiles with isomeric=False; (4) comparing the canonical SMILES output against the input canonical form to detect structural loss or artifact generation; (5) verifying output dictionary structure contains correct target attribute keys; (6) running pytest to confirm the converter passes all chemical correctness assertions and does not break existing tests.

Related tools

  • RDKit (Performs local SMILES parsing (Chem.MolFromSmiles), InChI generation (Chem.inchi.MolToInchi), and canonical SMILES export for round-trip validation)
  • pytest (Executes test suite to validate converter instantiation, conversion accuracy, output structure, and chemical correctness of round-trip transformations)
  • MSMetaEnhancer (Framework providing ComputeConverter base class and registration mechanism for the validated SMILES–InChI converter) — https://github.com/RECETOX/MSMetaEnhancer

Examples

pytest tests/test_rdkit_converter.py -v

Evaluation signals

  • Converter instantiation succeeds without import or initialization errors.
  • Round-trip SMILES → InChI → canonical SMILES produces identical or chemically equivalent canonical SMILES output (e.g., Tautomers and stereoisomers handled consistently).
  • Output dictionary keys match the target attribute names specified in the conversions list (e.g., 'inchi', 'canonical_smiles').
  • All pytest assertions pass for reference SMILES test set covering simple, aromatic, and chiral molecules.
  • pytest run confirms no regression in existing MSMetaEnhancer tests after converter registration.

Limitations

  • RDKit may fail or produce invalid InChI for molecules with exotic metal centers, radical states, or non-standard bonding not representable in standard chemical structure formats.
  • Round-trip conversion is sensitive to SMILES canonicalization settings; non-canonical input SMILES may not round-trip to identical strings, requiring comparison via canonical form or InChIKey.
  • InChI generation from SMILES may lose stereo or charge information depending on RDKit configuration; test cases should document expected information loss.
  • The validation approach does not cover dynamic properties (e.g., tautomeric stability, reactivity) that web services might infer from cheminformatics models.

Evidence

  • [other] Implement conversion methods using RDKit to perform local molecular structure transformations (e.g., parse SMILES strings with RDKit Chem.MolFromSmiles and generate InChI with Chem.inchi.MolToInchi).: "Implement conversion methods using RDKit to perform local molecular structure transformations (e.g., parse SMILES strings with RDKit Chem.MolFromSmiles and generate InChI with Chem.inchi.MolToInchi)."
  • [other] Create a pytest test file that validates converter instantiation and tests conversion accuracy against reference SMILES inputs, verifying output structure and chemical correctness.: "Create a pytest test file that validates converter instantiation and tests conversion accuracy against reference SMILES inputs, verifying output structure and chemical correctness."
  • [other] MSMetaEnhancer uses RDKit as a reference implementation for implementing ComputeConverter subclasses that perform local chemical structure conversions.: "MSMetaEnhancer uses RDKit as a reference implementation for implementing ComputeConverter subclasses that perform local chemical structure conversions."
  • [other] Run pytest to confirm existing tests still pass and new converter tests execute successfully.: "Run pytest to confirm existing tests still pass and new converter tests execute successfully."
  • [readme] All functionality is tested with the pytest framework.: "All functionality is tested with the pytest framework."

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.