JSDraw Web Services

JSDraw Web Service integrates JSDraw with MolEngine deployed on server side to do more complicated Cheminformatics computing, such

as calculating molecular properties, performing file conversion etc.

JSDraw/MolEngine Web Services contains three Services:

  1. Chem2Image.aspx - Structure depiction service.  A HTTP GET to retrieve images.
  2. MolEngine.asmx - SOAP web service to call MolEngine APIs
  3. Service.aspx - RESTful web service to feed JSDraw client or other ajax application.

What JSDraw Web Services Do:

  1. Open/write variety of files, including ChemDraw, ISIS/Draw, Marvin files
  2. Name-to-structure, including converting IUPAC name, CAS No, Corporation Compound ID, Trade name and other synonyms into structures
  3. Read SMILES and InChI Strings
  4. Integrating JSDraw to other server applications and databases
  5. And many other custom applications

How to deploy JSDrawWS:

JSDrawWS together with MolEngineWS are deployed as an ASP.NET web application, so you can download the package and unzip the file and then create a typical APS.NET web application.  Typicaly we recommend JSDrawWS to be deployed with JSDraw as one Web App.

Can JSDrawWS be deployed on Linux, besides Windows?

Yes, it can.  Mono is the .NET runtime implementation on Linux. XSP2, FastCGI or Apache mod_mono can host ASP.NET web applications on Linux.

Link: http://www.mono-project.com/ASP.NET

How to enable able JSDrawWS in JSDraw pages:

Add the following line right before JSDraw script line:

<script type='text/javascript' src='..../Service.aspx'/>

<script type='text/javascript src='..../Scilligence.JSDraw.js'/>

How to call using javascript in web pages:

<script type='text/javascript'>

function callback (ret) {

// handle results

// ajax call
JsUtils.ajax("Service.aspx?cmd=[COMMAND]", callback, { q: ... });

// jsonp call
JsUtils.jsonp("http://server/jsdraw/Service.aspx?cmd=[COMMAND]", callback, { q: ... });


How to enable Corporation Compound Lookup:

In order for users to load structures directly from corporation database by using compound ID, you need have the following section filled up in web.config:

<add key="molengine.lookup.1" value="compounddb"/>
<add key="molengine.lookup.1.regex" value="sg-[0-9]{2,10}-[0-9]{2}?/i"/>
<add key="molengine.lookup.1.connectionstring" value="sqlserver:Data Source=;initial catalog=;Integrated Security=True"/>
<add key="molengine.lookup.1.sql" value="select Molfile from Structures where CompoundID={q}"/>
<add key="molengine.lookup.1.molformat" value="molfile"/>

Chem2Image.aspx APIs

  1. Depict SMILES: 
  2. Highlight scaffold or query structure: 
  3. Use chemical name, CAS no, or other synonyms:
  4. Corporation compound database lookup:
    NOTE: you need define corpcompounds look-up source in web.config

Service.aspx APIs

  1. version
  2. smiles2inchi
  3. smiles2inchikey
  4. smiles2hashcode
  5. name2structure
  6. cleanup
  7. readsdf




Download JSDraw.WebServices