Skip to content
Back to skills

Smiles Validation

ASecurity

Strict SMILES validation, structural comparison, and modification verification. Catches invalid LLM-generated molecules.

  • 4 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added September 11, 2026
testingpythongobash

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 2 files and shows the line behind each finding

Scanned September 11, 2026

npx -y skills add huang-sh/DeepScience --skill smiles-validation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Smiles Validation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Smiles Validation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/huang-sh-smiles-validation/badge)](https://www.skillsdirectory.com/skills/huang-sh-smiles-validation)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: smiles-validation
description: Strict SMILES validation, structural comparison, and modification verification. Catches invalid LLM-generated molecules.
category: chemistry
license: MIT
metadata:
version: 1.0.0
tags: [cheminformatics, validation, SMILES, quality-control]
dependencies: ["rdkit-pypi"]
---

# SMILES Validation

## Overview

LLMs frequently generate invalid SMILES or produce molecules that don't match their stated reasoning. This skill provides strict validation, structural comparison, and modification verification.

Key checks:
- **Parse validation**: RDKit sanitization, valence checking, parenthesis/bracket balance
- **Structural comparison**: Tanimoto similarity, scaffold preservation, MCS analysis
- **Modification verification**: Confirm claimed structural changes exist in the actual molecule
- **Classification**: Categorize changes as optimization (>0.6 similarity), significant modification (0.4-0.6), or de novo design (<0.4)

## When to Use This Skill

- **After molecule generation**: Validate every SMILES before reporting results
- **Optimization verification**: Confirm proposed modifications match the actual structure
- **Batch validation**: Check a library of generated molecules for validity
- **Quality control**: Ensure reproducibility of molecular designs

## Installation

```bash
pip install rdkit-pypi
```

## Core Workflows

### 1. Validate a Single SMILES

```bash
python scripts/validate.py --smiles "c1ccccc1"
```

### 2. Compare Original vs Modified

```bash
python scripts/validate.py --original "c1ccccc1" --proposed "c1ccc(O)cc1" --check-modification "Added hydroxyl group"
```

### 3. Batch Validation

```bash
python scripts/validate.py --input generated_molecules.csv --output validation_report.json
```

## Script Reference

| Script | Purpose | Key Outputs |
|--------|---------|-------------|
| `validate.py` | SMILES validation, comparison, and modification checking | JSON report with validity, similarity, scaffold match, modification verification |

Files in this skill

  • SKILL.md2 KB
  • scripts/validate.py8.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…