Categories & Groups / Category
47 entries across 4 modules.
A subset of PubChem compound properties, normalized to friendly camelCase field names. Every field is optional because PUG-REST omits properties it cannot compute for a compound.
A compound's textual description from PUG-REST's /description operation.
Retrieves the PubChem CIDs registered for a CAS number via PUG-REST's xref/registry-number lookup. A single CAS number can map to multiple CIDs (e.g. different salt or hydrate forms). Results are cached for three days; unknown CAS numbers resolve to undefined.
Resolves a chemical name to its best-matching PubChem CID via PUG-REST. Returns the first (highest-ranked) CID PubChem reports. Results are cached for three days.
Resolves a molecular formula to its best-matching PubChem CID via the PUG-REST fastformula
search (the plain name endpoint 404s on most formulas). Returns the first CID PubChem reports.
Cached for three days.
Fetches core physical/chemical properties for a compound (formula, molecular weight, IUPAC name, SMILES, InChI, InChIKey, title) via PUG-REST. These map directly onto ChemPal's product fields, so this is the primary way to enrich a product once its CID is known. Cached for three days.
Fetches PubChem's popularity-ranked synonyms for a compound by CID via PUG-REST. Prefer this over getRankedNamesByName when the CID is already known, as it avoids an ambiguous name lookup. Cached for three days.
Fetches a short human-readable description of a compound (with its source) by CID via PUG-REST. Useful for surfacing a plain-language blurb in the product detail view. Cached for three days.
Query the SDQ agent for a compound name from a synonym. Results are cached for three days.
Fetches PubChem's popularity-ranked synonyms for a chemical name via PUG-REST, caching results for three days. The leading entries are the most commonly used names, and CAS numbers appear inline among them. Returns undefined when PubChem has no match.
The compiled classifier regex (built once).
Companion to GRADE_REGEX for labeled fields ("Grade: Technical"), where an explicit label licenses a bare word-grade stem that would otherwise be too weak to classify. Tried only when GRADE_REGEX finds nothing.
The regex source string — paste into regex101 (ECMAScript flavor) to inspect.
Structured chemical properties pulled out of a supplier's free-form product copy. Every field is optional — only the values actually present (and valid) are returned.
Regex patterns used for parse classification values or labeled fields
Element-symbol alternation (all 118 symbols, folded into per-first-letter character classes). Gates formula matching so ordinary prose isn't read as a formula.