Molecular analysis

From XuShuwenn/RedAct · View interactive version

Molecular analysis is an AI agent skill from the GitHub repository XuShuwenn/RedAct. Perform complete molecular analysis from SMILES: molecular weight, functional groups, and hydrogen count.

How to use this skill

Skill file

Complete Molecular Analysis

When to Use

Input

Output Format

To /root/output.txt:

Molecular weight: [value] g/mol
Functional groups: [group1], [group2], ...
Hydrogen count: [number]

Requirements

RDKit Usage

from rdkit import Chem
mol = Chem.MolFromSmiles(smiles)


## RDKit Usage

## Execution Protocol

- Follow the current task/system interaction protocol exactly; this skill only covers molecular-analysis steps.
- Before the first tool call, identify the required tool name and wrapper format from the task instructions; if it requires a specific schema (for example `Thought:` plus an `Action:` JSON object naming `bash`), use that exact format for every tool invocation.
- Wait for each tool observation before issuing the next action.
- Write `/root/output.txt` only after computing molecular weight, functional groups, and hydrogen count from the same parsed molecule.
- After writing `/root/output.txt`, read it back once to confirm the file exists, contains exactly the required three lines in order, and matches your computed values.
- If the task requires an exact final completion token or message (for example `ACTION: TASK_COMPLETE`), output it verbatim after verification and do not replace it with a conversational summary.
- Before finishing, verify both `/root/output.txt` contents and any required protocol/completion wording.
## Execution Protocol

## Execution Protocol

- Follow the current task/system interaction protocol exactly; this skill only covers molecular-analysis steps.
- If the environment requires a specific tool-call schema or wrapper (for example `Thought:` plus an `Action:` JSON object), use that exact format for every tool invocation.
- If the task requires an exact final completion token or message (for example `ACTION: TASK_COMPLETE`), output it verbatim and do not replace it with a conversational summary.
- Before finishing, verify both the analysis output file and any required protocol/completion wording.

# Use Descriptors.MolWt for MW
# Use GetNumAtoms for hydrogen count
# Detect functional groups via substructure matching

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.