Search

PythonReactSEOPDF
OpenClaw

intern_pubchem_name_conversion

Convert molecules between IUPAC, SMILES, and molecular formula using PubChem as the source of truth. Use this whenever the user asks to convert, normalize, or cross-check molecular representations in chemistry/science workflows (including Intern research tasks). Prefer API lookup over memory; do not guess.

guox180 source installs☆ 0 Repository stars

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install guox18/intern-pubchem-name-conversion

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

Intern PubChem Name Conversion

Convert one molecular representation into all three fields:

  • smiles
  • iupac
  • formula

When to use

Use this skill when the user asks to:

  • convert IUPAC <-> SMILES
  • fetch molecular formula from IUPAC/SMILES
  • validate molecule identity against PubChem

Do not use this skill for:

  • reaction mechanism explanation
  • quantum chemistry simulation
  • docking or property prediction beyond PubChem identifiers

Input contract

Expect one input value and one type:

  • input_type: iupac or smiles
  • input_value: raw string

If the user gives only one string without type:

  • treat strings with many bond symbols (=, #, [, ], @) as smiles
  • otherwise treat as iupac/name query

Required behavior

Always query PubChem first. Do not answer from memory when tools are available.

  1. URL-encode the full input string:
ENCODED=$(python3 -c 'import urllib.parse,sys; print(urllib.parse.quote(sys.argv[1], safe=""))' "$INPUT_VALUE")
  1. Build the primary endpoint:
  • If input_type == iupac:
    • https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/{ENCODED}/property/SMILES,IUPACName,MolecularFormula/JSON
  • If input_type == smiles:
    • https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/smiles/{ENCODED}/property/SMILES,IUPACName,MolecularFormula/JSON
  1. If smiles primary endpoint is non-200, retry once with:
  • https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/fastidentity/smiles/{ENCODED}/property/SMILES,IUPACName,MolecularFormula/JSON
  1. If still non-200, do CID fallback:
  • Resolve CID:
    • iupac: .../compound/name/{ENCODED}/cids/JSON
    • smiles: .../compound/smiles/{ENCODED}/cids/JSON
  • Then fetch properties by CID:
    • .../compound/cid/{CID}/property/SMILES,IUPACName,MolecularFormula/JSON
  1. Parse PropertyTable.Properties[0] and map:
  • smiles <- SMILES (fallback ConnectivitySMILES)
  • iupac <- IUPACName
  • formula <- MolecularFormula

Output format

Return JSON only (no markdo...

Source information

Source
github
Repository
openclaw/skills
Path
skills/guox18/intern-pubchem-name-conversion
Version
—
Commit
1845478cb8894083c1c66bcc9ca73810191c348a
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

Extracted content

SKILL.md
# Intern PubChem Name Conversion

Convert one molecular representation into all three fields:
- `smiles`
- `iupac`
- `formula`

## When to use

Use this skill when the user asks to:
- convert IUPAC <-> SMILES
- fetch molecular formula from IUPAC/SMILES
- validate molecule identity against PubChem

Do not use this skill for:
- reaction mechanism explanation
- quantum chemistry simulation
- docking or property prediction beyond PubChem identifiers

## Input contract

Expect one input value and one type:
- `input_type`: `iupac` or `smiles`
- `input_value`: raw string

If the user gives only one string without type:
- treat strings with many bond symbols (`=`, `#`, `[`, `]`, `@`) as `smiles`
- otherwise treat as `iupac`/name query

## Required behavior

Always query PubChem first. Do not answer from memory when tools are available.

1) URL-encode the full input string:

```bash
ENCODED=$(python3 -c 'import urllib.parse,sys; print(urllib.parse.quote(sys.argv[1], safe=""))' "$INPUT_VALUE")
```

2) Build the primary endpoint:
- If `input_type == iupac`:
  - `https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/{ENCODED}/property/SMILES,IUPACName,MolecularFormula/JSON`
- If `input_type == smiles`:
  - `https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/smiles/{ENCODED}/property/SMILES,IUPACName,MolecularFormula/JSON`

3) If `smiles` primary endpoint is non-200, retry once with:
- `https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/fastidentity/smiles/{ENCODED}/property/SMILES,IUPACName,MolecularFormula/JSON`

4) If still non-200, do CID fallback:
- Resolve CID:
  - iupac: `.../compound/name/{ENCODED}/cids/JSON`
  - smiles: `.../compound/smiles/{ENCODED}/cids/JSON`
- Then fetch properties by CID:
  - `.../compound/cid/{CID}/property/SMILES,IUPACName,MolecularFormula/JSON`

5) Parse `PropertyTable.Properties[0]` and map:
- `smiles <- SMILES` (fallback `ConnectivitySMILES`)
- `iupac <- IUPACName`
- `formula <- MolecularFormula`

## Output format

Return JSON only (no markdo...

Related skills

OpenClaw

ai-maestro

23blocks-os

AI Agent Orchestrator with Skills System - Give AI Agents superpowers: memory search, code graph queries, agent-to-agent messaging. Manage Claude, Codex or any AI Agent from one dashboard. Move Agents between c...

OpenClaw

registry-broker-skills

hashgraph-online

AI agent skills for the Universal Registry - search, chat, and register 72,000+ agents across 14+ protocols. Works with Claude, Codex, Cursor, OpenClaw, and any AI assistant.

OpenClaw

skills-manager

rito-w

A cross-platform skills manager for AI IDEs. Search marketplace, download locally, and install to Claude, Cursor, Windsurf, and more with one click.