CompoundInfo

General chemical compound widget.  Convert DIV panel into CompoundInfo.  Contains the next information inside:

  • 2D molecule image desired dimentions
  • ChemSpider ID with link to the compound on main ChemSpider website
  • Molecular formula
  • Average mass
  • Monoisotopic mass
  • Systematic name

Simple demo with displyaing static Aspirin information and changing it dynamically available here.

Summary
CompoundInfoGeneral chemical compound widget.
Functions
compoundinfoConvert DIV panel into CompoundInfo widget.
Types
Options
Functions
setCSIDFunction that loads data from ChemSpider website and display them in the component.
setCompoundDisplay compound information from Compound object.

Functions

compoundinfo

Convert DIV panel into CompoundInfo widget.

Parameters

optionsInitialization Options
$('#compoundInfo').compoundinfo({csid: 2157});

Types

Options

Properties

csidChemSpider ID of the compound that will be loadede during the initialization.  Default value - 0
imgWidthWidth of the 2D molecule in pixels.  Default value - 200
imgHeightHeight of the 2D molecule in pixels.  Default value - 200
zoomWidthWidth of the zoomed 2D molecule.  Default value - 500
zoomHeightHeight of the zoomed 2D molecule.  Default value - 500

Functions

setCSID

setCSID: function (csid)

Function that loads data from ChemSpider website and display them in the component.

Parameters

csidCompound ChemSpider ID that should be loaded
$('#compoundInfo').compoundinfo("setCSID", 2157);

setCompound

setCompound: function (compound)

Display compound information from Compound object.  Sometimes it makes sense to load compound’s information from already existing object instead of loading it one more time and doing additional request to the server.  For example if compound information was pre-loaded during the search function then it can be loaded to the CompoundInfo widget from that object instead of loading it one more time from ChemSpider side.

Parameters

compoundCompound JSON object
$('#compoundInfo').compoundinfo("setCSID", 2157);
setCSID: function (csid)
Function that loads data from ChemSpider website and display them in the component.
setCompound: function (compound)
Display compound information from Compound object.