@symeres/sdf-parser
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Symeres sdf parser

This parser parses a sdf file and return a collection of records as

export type IRecord = {
    molText: string | undefined;
    [key: string]: string | number | undefined;
}

Example

import {parser} from "@symeres/sdf-parser";

const content = `C8H10N4O2
...
M  END
>  <Compound Name>
Caffeine

>  <Formula>
C8H10N4O2

>  <Molweight>
194.19

$$$$`;

const records = parser(content);

records:

[
    {
        "molText": "C8H10N4O2\r\n...\r\nM  END\r\n",
        "Compound Name": "Caffeine",
        "Formula": "C8H10N4O2",
        "Molweight": "194.19"
    }
]

/@symeres/sdf-parser/

    Package Sidebar

    Install

    npm i @symeres/sdf-parser

    Weekly Downloads

    0

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    80.9 kB

    Total Files

    14

    Last publish

    Collaborators

    • symeres