Identify the IUPAC name of a molecule using BioT5 question answering model. Use this skill when: (1) User wants to find the IUPAC name of a molecule, (2) User asks "What is the IUPAC name?" or "What's the systematic name?", (3) User provides a SMILES string and wants the IUPAC nomenclature.
This skill identifies the IUPAC name of a molecule using the BioT5 question answering model.
If user provides a molecule name (e.g., "aspirin"):
from open_biomed.tools.tool_registry import TOOLS
tool = TOOLS["molecule_name_request"]
result, message = tool.run(accession="aspirin")
molecule = result[0] # Returns a list of molecules
If user provides a SMILES string:
from open_biomed.data import Molecule
molecule = Molecule.from_smiles("CC(=O)OC1=CC=CC=C1C(=O)O")
Use the molecule question answering tool:
from open_biomed.data import Text
from open_biomed.tools.tool_registry import TOOLS
qa_tool = TOOLS["molecule_question_answering"]
question = Text.from_str("What's the IUPAC name of this molecule?")
result, message = qa_tool.run(molecule=molecule, text=question)
print(result) # IUPAC name
| Input | Output | Description |
|---|---|---|
| SMILES or molecule name | IUPAC name string | Systematic chemical nomenclature |
Input: "What is the IUPAC name of aspirin?"
Workflow:
Expected output: "2-acetyloxybenzoic acid" or similar systematic name
The molecule_question_answering tool supports multiple models:
| Model | Description |
|---|---|
biot5 (default) | BioT5 model for biomedical QA |
molt5 | MolT5 model specialized for molecules |
Symptom: PubChem request fails for molecule name.
Solution: Ask user for SMILES string directly.
Symptom: No IUPAC name returned.
Solution:
from rdkit.Chem import MolToIUPACName
iupac = MolToIUPACName(molecule.rdmol)