Kekule.js Overview

Kekule.js is an open source JavaScript library for chemoinformatics released under MIT license. Currently, it is molecule-centric, focusing on providing the ability to represent, draw, edit, compare and search molecule structures on web browsers.

Major Features

The whole library is divided into several modules, each provides different features and functions. Users can use the combination of modules for specific purpose. The following table lists the major features of each module in Kekule.js.

Module Major feature(s)
Core
  • Representation of chemical concepts including element, atom, bond, molecule and reaction.
IO
  • Read/write different format of chemical data. Now including:
    • Kekule JSON/XML format
    • CML
    • MDL MOL2000/3000
    • SMILES
Render
  • Provides low-level cross-browser render methods to draw molecule (and other chemical objects) in web browser context..
Widget
  • Small components to be used in web applications, including button, text box, combo box, dialog, tree view, tab view, text editor, color picker, object inspector and so on.
  • Animation system to show/hide those widgets.
  • Actions associated with those widgets.
Chem Widget
  • Widgets related to chemistry, including:
    • Periodical table
    • 2D or 3D viewer for molecule and other chemical objects.
    • 2D diagram editor for molecule and other chemical objects.
Algorithm
  • Algorithms for chemical graph theory, including:
    • Ring perception
    • Aromatic ring recognization
    • Molecule comparison
    • Sub-structure search
    • Stereo center and stereo bond identification
Extra
  • Some extra function, including:
    • Adapter for Open Babel, support of many other chemical data formats.

Installation

As a JavaScript library, usually Kekule.js need to be included in HTML page by <script> tag. You can use the compressed script file to reduce the net traffic:

<script src="kekule.min.js"></script>

By using kekule.min.js, all modules (exclude module Extra) are loaded into HTML page. If only a few modules is needed, you can utilize a special bootstrap script:

<script src="kekule.js?module=chemWidget,algorithm"></script>

Note the module param after "?". In the example above, module chemWidget and algorithm, as well as other prerequisite modules will be loaded.

If widget or chem widget modules are used, additional style sheet file also need to be linked in HTML page:

<link rel="stylesheet" type="text/css" href="themes/default/kekule.css" />

Tutorial

A tutorial explaining the basic usage of Kekule.js has been made available at here.

Supported Web Browsers

All modern web browsers, including ones on mobile devices are supported. For instance (but not limited to):

Publication

The work of Kekule.js has been publish on Journal of Chemical Information and Modeling. To support our work, please cite: J. Chem. Inf. Model. 2016, 56, 1132−1138.