ChemPal Documentation - v1.12.0
    Preparing search index...

    Variable getStructureSdfConst

    getStructureSdf: (cid: PubChemCID) => Promise<StructureRecord | undefined> = ...

    Fetches a compound's structure as SDF, preferring the computed 3D conformer and falling back to the 2D layout when PubChem has no 3D record for it. Cached for three days.

    Type declaration

    await getStructureSdf(2519);  // caffeine: { sdf: '2519\n  -OEChem-…', recordType: '3d' }
    await getStructureSdf(5234); // sodium chloride, no conformer: { sdf: …, recordType: '2d' }
    export const getStructureSdf: (cid: PubChemCID) => Promise<StructureRecord | undefined> =
    withTtlCache(getStructureSdfUncached, { namespace: 'structureSdf' });