SMILES Functional Group Editor

SkillDev tools

Edit molecular structures in SMILES notation by adding, deleting, or replacing functional groups. Use this skill whenever the user asks to modify a molecule's SMILES by manipulating functional groups (e.g., "delete hydroxyl", "add nitrile", "replace amine with carboxyl"). This skill prevents the most common error: treating the same atom pattern (like -OH) as one functional group when it actually represents different groups depending on chemical context.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the SMILES Functional Group Editor skill

What this skill tells your AI

The instructions your AI receives, as published by internscience/molclaw in skills/L1_tools/molclaw-smiles-fg-editor/SKILL.md and read by ahel’s review.

Note:

  • Local files are not directly accessible by the server. Please upload them to the server using molclaw-file-transfer before execution.
  • For PDB file inputs, it is recommended to preprocess them using molclaw-pdbfixer before execution.
  • Please refer to skill molclaw-scp-server to complete tool invocation.

Core Rule: Context Determines Identity

Never match functional groups by SMILES substring alone. The same pattern represents different groups depending on what it's bonded to. Always classify from most-specific to least-specific — first match wins.

Functional Group Hierarchy

Oxygen-containing (check top-down)

PriorityGroupPatternKey Test
1Carboxylic acidC(=O)O (terminal OH)C=O adjacent to OH
2EsterC(=O)OCC=O adjacent to O-C
3Phenolc-O (aromatic carbon-OH)Lowercase c bonded to O
4EnolC=C-OVinyl carbon bonded to OH
5KetoneCC(=O)C (non-terminal)Internal C=O, no adjacent N or OC
6Aldehydeterminal C=OTerminal C=O
7EtherC-O-C (aliphatic)Not part of ester
8Alcohol/HydroxylC-O (aliphatic C-OH)Aliphatic C — lowest priority

Nitrogen-containing

PriorityGroupPatternKey Test
1Nitro[N+](=O)[O-]Charged N with two oxygens
2AmideC(=O)NN adjacent to C=O
3NitrileC#NTriple bond
4ImineC=NDouble bond
5Heterocyclic Nn in ringRing member — not an amine
6AmineC-N (aliphatic)Not in amide/ring — lowest

User Term → Target Mapping

User saysTarget onlyDo NOT touch
"hydroxyl"Alcohol (aliphatic C-OH)Phenol, enol, carboxyl OH
"amine"Aliphatic amineAmide N, ring N
"carbonyl"Ketone/Aldehyde C=OEster/amide/carboxyl C=O
"nitrile"C≡NIsocyanide
"carboxyl"-COOHEster

Workflow

  1. Inventory: list all candidate groups in the molecule
  2. Classify: walk the hierarchy top-down for each candidate, first match wins
  3. Filter: keep only groups matching the user's term per the mapping table above
  4. Modify: delete/add/replace at the matched positions; preserve @/@@ stereochemistry
  5. Validate: check parentheses balanced, ring closures matched, stereo preserved

Output Format

{
    "output": "Modified Molecule SMILES"
}

Signals

GitHub stars
33
Forks
3
Last commit
Aug 2026
Advanced
Catalog kind
skill
Gateway key
molclaw-smiles-fg-editor
Source
github.com/internscience/molclaw