Home

Awesome

kekule-clj

A common-lisp-jupyter widget for kekule.js.

Installation

The Jupyter Lab frontend code should be installed using the following command:

jupyter-labextension install kekule-clj

Once the extension has been installed then widget can be loaded in a notebook using Quicklisp.

(ql:quickload :kekule-clj)

Usage

For sample notebooks please see the examples directory. There are two main widgets exported by kekule-clj. The diagram widget displays a molecular diagram using a data source and format id. The composer widget allows editing of the attached data. Both share a set of common slots data and format-id.

The accepted formats are:

The default format is MDL Molfile V2000 hence the following will display a file in the diagram widget and display a toolbar in addition.

(make-instance 'kekule:diagram 
               :enable-toolbar t
               :data (alexandria:read-file-into-string "chemFiles/2D/aromaticRings.mol"))

More options are available on the various widgets and can be seen in the source code.