JChemPaint

Wrapper for the chemical 2D structure editor based on JChemPaint Java applet.

Simple demo application available here.

Summary
JChemPaintWrapper for the chemical 2D structure editor based on JChemPaint Java applet.
Functions
jchempaintConvert DIV panel into JChemPaint widget.
Types
Options
Functions
smilesGet or set SMILES from/to the widget.
moleculeGet or set MOL file from/to the widget.

Functions

jchempaint

Convert DIV panel into JChemPaint widget.

Parameters

optionsInitialization Options
$('#drawer').jchempaint({
width: 900,
height: 500
});

Types

Options

Properties

widthWidth of the widget in pixels.  Default value - 650
heightHeight of the widget in pixels.  Default value - 350

Functions

smiles

smiles: function (value)

Get or set SMILES from/to the widget.  If the ‘value’ parameter is NULL it returns SMILES of the chemical structure currently drawn in the widget otherwise it sets value to the widget and draw molecule there.

Parameters

valueSMILES
var editor = $('#editorContainer').jchempaint({
width: 900,
height: 520
}).data('jchempaint');

var smiles = editor.smiles();

molecule

molecule: function (value)

Get or set MOL file from/to the widget.  If the ‘value’ parameter is NULL it returns MOL file of the chemical structure currently drawn in the widget, otherwise it sets value to the widget and draw molecule there.

Parameters

valueMOL file
var editor = $('#editorContainer').jchempaint({
width: 900,
height: 520
}).data('jchempaint');

var mol = editor.molecule();
smiles: function (value)
Get or set SMILES from/to the widget.
molecule: function (value)
Get or set MOL file from/to the widget.