JavaScript port of the OpenChemLib Java library.
npm install openchemlibThis library is available in three different builds: minimal, core and full.
Each larger build contains all functionalities from the smaller ones.
The core build is the one that you get when you require('openchemlib'). It
contains all functionalities that can be used in Node.js.
The minimal (require('openchemlib/minimal')) build is a smaller one
(~ half the size of core) that is meant to be used in a browser application
if bundle size matters and prediction functionalities are not needed.
The full build (require('openchemlib/full')) build is the largest build.
It contains a structure viewer and a structure editor for browser applications.
- CanonizerUtil
- ConformerGenerator
- DruglikenessPredictor
- DrugScoreCalculator
- ForceFieldMMFF94
- MoleculeProperties
- ReactionEncoder
- Reactor
- ToxicityPredictor
- Transformer
To build this project, you need :
- Java JDK (Tested with version 21)
- GWT (Tested with version 2.11, Download build here)
- Node.js (Tested with version 18, Download here)
npm ci
Copy config.default.json to config.json and put the path to the GWT classes on your computer.
If you want to use a custom JDK installation, set the "jdk" key to be the path to your JDK directory.
To run one of the scripts, use npm run <scriptName>.
To pass an options, use npm run <scriptName> -- --option.
Options:
- -m [name]: only process module "name"
- -v: verbose output
Execute the GWT compiler.
Transform the GWT compiled files to JavaScript modules.
Compile and export.
Copy the required java files from the openchemlib project.