sdf-creator

    2.0.3 • Public • Published

    sdf-creator

    NPM version build status David deps npm download

    Allow to create a SDF file from an array of object containing the molfile property

    Use of the package

    npm install sdf-creator

    In node script:

     
    // allows to create a SDF file a file test.json in the same directory
     
    var create = require('sdf-creator');
     
    var molecules = JSON.parse(fs.readFileSync(__dirname + '/test.json', 'utf-8'));
     
    var result = create(molecules);
     
    console.log(result.sdf);
     

    require('sdf-creator') (array, options)

    options:

    • eol: end of line separator, by default '\n'
    • molfilePropertyName: name of the property containing the molfile, by default: 'molfile'
    • filter: regexp that define which property will be exported. By default '/.*/'
    • strict: throw an error if a molfile is empty

    Test

    npm test

    Build

    npm run build

    License

    MIT

    Install

    npm i sdf-creator

    DownloadsWeekly Downloads

    0

    Version

    2.0.3

    License

    MIT

    Last publish

    Collaborators

    • avatar
    • avatar