Synchronously parse an SDF file into an array of molecule objects.
The SDF content as a string, ArrayBuffer, or ArrayBufferView.
ArrayBuffer
ArrayBufferView
Parsing options.
A ParseResult containing molecules and statistics.
import { readFileSync } from 'node:fs';import { parse } from 'sdf-parser';const sdf = readFileSync('compounds.sdf', 'utf8');const { molecules, statistics } = parse(sdf); Copy
import { readFileSync } from 'node:fs';import { parse } from 'sdf-parser';const sdf = readFileSync('compounds.sdf', 'utf8');const { molecules, statistics } = parse(sdf);
Synchronously parse an SDF file into an array of molecule objects.