@cript-web/bigsmiles-toolkit
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

CI

BigSMILES Tookit

JavaScript* parser and serializer for BigSMILES line notation.

* basic TS typings are provided (*.d.ts), but they're just there to provide Typescript compatibility.

Usage

First, you need to install the package and RDKit (the later may be optional depending on the functions you'll use)

npm i @cript-web/bigsmiles-toolkit @rdkit/rdkit

Then import the package and RDKit it in your code:

import * as toolkit from "@cript-web/bigsmiles-toolkit";
import RDKit from '@rdkit/rdkit';

Finally, you can use the library. Below, an example to convert a BigSMILES to a molblock.

// 2. Instantiate RDKit module (required to compute atom coordinates)
rdkit = await RDKit();

// 3. Use bigsmiles-toolkit to convert a bigsmiles string to a molblock
const bigsmiles       = "...";
const molblock        = toolkit.bigsmiles_to_molfile(rdkit, bigsmiles);

console.log(`${bigsmiles} converted to:\n${molblock}`);

Package Sidebar

Install

npm i @cript-web/bigsmiles-toolkit

Weekly Downloads

57

Version

1.1.1

License

MIT

Unpacked Size

302 kB

Total Files

25

Last publish

Collaborators

  • fatjon_mit
  • ardiana.osmani