molecula-js
molecula-js provide moleculas informations and operations.
You can work with our smiles database or provide your own smile code.
Feel free to contribute.
Install
Install using your favorite package manager :
npm i --save molecula-js
or
yarn add molecula-js
Import the package in your js / ts file :
import { molecula, database } from "molecula-js";
React projects
Edit your "build" command from package.json like this :
"build": "react-scripts build && node ./node_modules/molecula-js/dist/scripts/react-install.js",
or
"build": "node scripts/build.js && node ./node_modules/molecula-js/dist/scripts/react-install.js",
React exemple is available here : https://github.com/christophe77/molecula-js-react
Available commands
database.searchDatabase.byName.sync("ozo")
database.getDatabase.sync()
database.getDatabase.async().then(db => console.log(db))
molecula.getDraw.fromSmiles.async("[H]", 200, 200).then(svg => console.log(svg))
molecula.getDescription.fromSmiles.async("[H]").then(description => console.log(description))