aoptk.normalization.pubchem_api

Classes

PubChemAPI

Use PubChem API to normalize chemical names.

Module Contents

class aoptk.normalization.pubchem_api.PubChemAPI[source]

Bases: aoptk.normalization.normalize_chemical.NormalizeChemical

Use PubChem API to normalize chemical names.

timeout = 10[source]
_session[source]
normalize_chemical(chemical: aoptk.chemical.Chemical) aoptk.chemical.Chemical[source]

Use the PubChem API to normalize a chemical name.

This method may modify the given chemical instance in-place by updating its heading attribute when a title is found in PubChem. The same chemical instance that is passed in is returned.

_find_title_in_pubchem(chemical_name: str) str | None[source]

Find the title chemical name from PubChem.

_find_synonyms_in_pubchem(chemical_name: str) set[str][source]

Find synonyms for a chemical name from PubChem.