Organic chemistry smarts

From XuShuwenn/RedAct · View interactive version

Organic chemistry smarts is an AI agent skill from the GitHub repository XuShuwenn/RedAct. Match SMILES molecules against SMARTS patterns to detect functional groups using RDKit.

How to use this skill

Skill file

SMARTS Pattern Matching for Molecules

When to Use

Input Format

File /root/input.txt (2 lines):

Output Format

To /root/output.txt:

Match: yes/no

Output "yes" if pattern matches, "no" otherwise.

Using RDKit

from rdkit import Chem

mol = Chem.MolFromSmiles(smiles)
pattern = Chem.MolFromSmarts(smarts_pattern)

if mol.HasSubstructMatch(pattern):
    # Match found

SMARTS Patterns

Tips

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.