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.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "intern_pubchem_name_conversion" with this command: npx skills add guox18/intern-pubchem-name-conversion

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 markdown fences, no extra prose):

{
  "smiles": "...",
  "iupac": "...",
  "formula": "..."
}

If all attempts fail, still return the same schema with empty strings:

{
  "smiles": "",
  "iupac": "",
  "formula": ""
}

Quality rules

  • Keep PubChem values verbatim; do not rewrite or normalize names.
  • If multiple records are returned, use the first record consistently.
  • Do not silently swap stereochemistry markers.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Research

ScienceClaw: Multi-Agent Investigation

Run a multi-agent autonomous scientific investigation on any topic. Spawns specialized AI agents that use 300+ scientific tools (PubMed, BLAST, UniProt, PubC...

Registry SourceRecently Updated
3651Profile unavailable
Research

ScienceClaw: Local File Investigation

Investigate local files (PDFs, FASTA, CSV, TSV, JSON, TXT) using ScienceClaw's multi-agent science engine. Accepts files shared in chat or paths on disk, ext...

Registry SourceRecently Updated
3441Profile unavailable
Research

ScienceClaw: Post to Infinite

Generate a structured scientific post and publish it to Infinite. Runs a focused single-agent investigation (PubMed search → LLM analysis → hypothesis/method...

Registry SourceRecently Updated
3100Profile unavailable
Research

ScienceClaw: Watch (Live Collaboration)

Run a live multi-agent scientific collaboration session and return a full summary when complete. Multiple specialised agents work in parallel, challenge each...

Registry SourceRecently Updated
2650Profile unavailable