OpenChemLib JS
    Preparing search index...

    Class SDFileParser

    Index

    Constructors

    Methods

    • Returns the list of field names for the entire SDF.

      Parameters

      • recordsToInspect: number

        Number of records scanned to determine the list.

      Returns string[]

    • Move to the next Molfile. Returns true if there is one, false otherwise.

      Returns boolean


      const sdf = fs.readFileSync('./mysdf.sdf', 'utf8');
      const parser = new SDFileParser(sdf);
      while (parser.next()) {
      const molecule = parser.getMolecule();
      // process molecule
      }