Smarts substructure matching

From XuShuwenn/RedAct · View interactive version

Smarts substructure matching is an AI agent skill from the GitHub repository XuShuwenn/RedAct. Check if a SMARTS pattern occurs in a SMILES molecule using RDKit and emit a yes/no match.

How to use this skill

Skill file

SMARTS Substructure Matching

Use this skill to determine whether a molecule (given as a SMILES string) contains a functional group or substructure defined by a SMARTS pattern. It standardizes the matching workflow, handles common RDKit pitfalls (sanitization, explicit hydrogens, chirality), and produces a deterministic yes/no result.

When to Use

Activate this skill when:

Core Workflow

  1. Parse input
  1. Build RDKit objects
  1. Decide on explicit hydrogens
  1. Perform the match
  1. Output exactly

Verification

Common Pitfalls

Success Criteria

Optional Script Usage

Use the helper script to perform matching in a reproducible way.

Input file format expected by the script:

The script will write exactly one line to the specified output file: Match: yes or Match: no.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.