/install intern-pubchem-name-conversion
Intern PubChem Name Conversion
Convert one molecular representation into all three fields:
smilesiupacformula
When to use
Use this skill when the user asks to:
- convert IUPAC \x3C-> 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:iupacorsmilesinput_value: raw string
If the user gives only one string without type:
- treat strings with many bond symbols (
=,#,[,],@) assmiles - otherwise treat as
iupac/name query
Required behavior
Always query PubChem first. Do not answer from memory when tools are available.
- URL-encode the full input string:
ENCODED=$(python3 -c 'import urllib.parse,sys; print(urllib.parse.quote(sys.argv[1], safe=""))' "$INPUT_VALUE")
- 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
- If
smilesprimary endpoint is non-200, retry once with:
https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/fastidentity/smiles/{ENCODED}/property/SMILES,IUPACName,MolecularFormula/JSON
- If still non-200, do CID fallback:
- Resolve CID:
- iupac:
.../compound/name/{ENCODED}/cids/JSON - smiles:
.../compound/smiles/{ENCODED}/cids/JSON
- iupac:
- Then fetch properties by CID:
.../compound/cid/{CID}/property/SMILES,IUPACName,MolecularFormula/JSON
- Parse
PropertyTable.Properties[0]and map:
smiles \x3C- SMILES(fallbackConnectivitySMILES)iupac \x3C- IUPACNameformula \x3C- 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.
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install intern-pubchem-name-conversion - After installation, invoke the skill by name or use
/intern-pubchem-name-conversion - Provide required inputs per the skill's parameter spec and get structured output
What is 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, o... It is an AI Agent Skill for Claude Code / OpenClaw, with 357 downloads so far.
How do I install Intern PubChem Name Conversion?
Run "/install intern-pubchem-name-conversion" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Intern PubChem Name Conversion free?
Yes, Intern PubChem Name Conversion is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Intern PubChem Name Conversion support?
Intern PubChem Name Conversion is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Intern PubChem Name Conversion?
It is built and maintained by guox18 (@guox18); the current version is v0.1.0.