Smiles molecular analysis

From XuShuwenn/RedAct · View interactive version

Smiles molecular analysis is an AI agent skill from the GitHub repository XuShuwenn/RedAct. Analyze a molecule from a SMILES string to compute average molecular weight, detect common functional groups, and count total hydrogens with strict output formatting.

How to use this skill

Skill file

SMILES-Based Molecular Analysis

This skill provides a reliable workflow to analyze a molecule from a SMILES string and produce three results with strict formatting: molecular weight (average atomic weights), functional groups (from a specified list), and total hydrogen count (explicit + implicit).

Use this when you need to:

When to Use

Activate this skill when the task requires any combination of:

Core Workflow

  1. Input handling
  1. Parse the molecule
  1. Molecular weight (average mass)
  1. Hydrogen count (explicit + implicit)
  1. Functional group detection
  1. Output formatting

Verification

Perform these checks before finalizing:

1) Count H atoms after adding explicit hydrogens; 2) Sum hydrogens attached to heavy atoms (tool-dependent function). Results must match.

Common Pitfalls and How to Avoid Them

Optional Script Usage

A helper script is provided to perform the entire analysis from a SMILES string using RDKit.

Examples:

The script prints exactly the three required lines, ready to be written to the designated output file.

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.