Page tree

Input/Output Web Services application provides methods for

  • converting molecules to different chemical file formats
  • analyzing molecule string and defining its file format
  • preparing molecule file for download
  • collecting properties from molecule

This documentation describes installation, administration and usage of IO Web Services.

IO Web Service is available in two modes:

  1. As part of a microservices system
  2. As a standalone web application

Microservices system mode

In microservices system mode the IO Web Service runs together with Config service, Discovery service and Gateway service. These three services are mandatory and optionally other services can also be part of the system. All configuration must be done in the Config module.

The default configuration applies to the microservices system mode.

The web application runs on host <server-host> and listens on port <gateway-server-port>.

Standalone web application mode

In standalone web application mode the IO Web Service runs alone, without the Config service, Discovery service and Gateway service (however the installer installs them, as well).

The default configuration must be changed according to the standalone web application mode; set eureka.client.enabled=false in application.properties file and spring.cloud.config.failFast=false in bootstrap.properties file.

All configuration must be done in the IO module.

The web application runs on host <server-host> and listens on port <server-port>.

Download

See here.

Software requirements

See here

Installation

See here.

Module is installed into folder: jws/jws-io

Licenses

See here.

Additionally, IUPAC naming plugin license is required for the usage of Name file format.

Logging

See here.

Configuration

Default configuration:

application.properties

server.port=8061


logging.file=../logs/jws-io.log


eureka.client.enabled=true

set eureka.client.enabled=false to switch to standalone DB Web Services application mode 
bootstrap.properties

spring.cloud.config.failFast=true

spring.cloud.config.uri=${CONFIG_SERVER_URI:http\://localhost\:8888/}

spring.cloud.config.retry.initialInterval=3000

spring.cloud.config.retry.multiplier=1.2

spring.cloud.config.retry.maxInterval=60000

spring.cloud.config.retry.maxAttempts=100

For more settings possibilities see spring documentation page.

Running the server

Prerequisites in case of microservices system mode:

  1. Config service is running
  2. Discovery service is running
  3. Gateway service is running


Run the service in command line in folder jws/jws-io:

jws-io-service start (on Windows)

jws-io-service start (on Linux)

or

run-jws-io.exe (on Windows)

run-jws-io (on Linux)

API documentation

Find and try out the API on the Swagger UI.

ModeURL of Swagger UIDefault URL of Swagger UI
microservices system<serverhost>:<gateway-port>jwsio/API/ localhost:8080/jwsio/API/
standalone web application mode<serverhost>:<server-port>/API/localhost:8061/API/

Demo site

For detailed description check out the JWS IO demo site:

https://jchem-microservices.chemaxon.com/jwsio/api/index.html

Usage

IO Web Services provides the following methods:

More details about supported output formats: File Formats

MethodDescriptionParametersExampleExample requestExample response
POST/rest-v1/molconvert

Converts chemical structures between different string type chemical file formats.

outputParams

output molecule format

structure

input molecule

Convert input structure CCO given in SMILES format to MRV format.
{
"outputParams": "smarts",
"structure": "C1CCCCC1"
}
[#6]-1-[#6]-[#6]-[#6]-[#6]-[#6]-1
POST/rest-v1/molconvert/analyze

Gives back the file format and chemical type [molecule, reaction, query molecule] of the string of a chemical structure


Analyze a chemical structure string: CO>>C=O.
[H][H].O=O.[H][H]>>[H]O[H].[H]O[H]
{
"format": "smiles",
"chemicalTypes": [ "Reaction" ]
}
POST/rest-v1/molconvert/binaryGives back a binary stream of the chemical structure in the specified format (including image formats)



inputParams

input molecule format

outputParams

output molecule format

structure

input molecule

Convert input structure CCO given in SMILES format to PNG format and give back a binary stream of PNG file.
{
"inputParams": "smiles",
"outputParams": "mrv",
"structure": "C1CCCCC1"
}

POST/rest-v1/molconvert/downloadGives back a file of the converted chemical structure.Convert input structure CCO given in SMILES format to MRV format and give back the resulting MRV file.
{
"inputParams": "smiles",
"outputParams": "mrv",
"structure": "C1CCCCC1"
}
a file called: molecule.mrv
POST/rest-v1/molconvert/propertiesGives back the molecule properties of the chemical structure
Give back the molecule properties [given as property in the propertyList attribute in the MRV file] of structure given in MRV.
<?xml version='1.0' encoding='UTF-8'?><cml xmlns="http://www.chemaxon.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.chemaxon.com/marvin/schema/mrvSchema_18_11_0.xsd" version="ChemAxon file format v18.11.0, generated by v18.25.0">
<MDocument><MChemicalStruct><molecule title="THC" molID="m1" absStereo="true"><propertyList><property dictRef="type" title="type"><scalar>common</scalar></property><property dictRef="id" title="id"><scalar>420</scalar></property><property dictRef="in store" title="in store"><scalar>true</scalar></property><property dictRef="compliant" title="compliant"><scalar>false</scalar></property></propertyList><atomArray atomID="a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23" elementType="C C C C C C C C O C C C C C C C C C C C O C C" x2="3.907985046680551E-14 1.3336791218280748 2.6673582436561123 4.001037365484148 5.334716487312183 6.668395609140219 8.002074730968257 9.335753852796293 10.669432974624328 9.33575385279629 10.669432974624328 12.003112096452371 13.336791218280403 14.670470340108443 13.336791218280396 12.003112096452357 10.669432974624325 9.335753852796287 10.325646771713554 8.345860933879013 8.002074730968253 8.002074730968255 6.6683956091402194" y2="-9.240000000000002 -10.010000000000003 -9.240000000000002 -10.010000000000003 -9.240000000000002 -10.010000000000002 -9.24 -10.010000000000002 -9.240000000000004 -11.550000000000002 -12.320000000000007 -11.550000000000011 -12.320000000000018 -11.550000000000024 -13.860000000000017 -14.630000000000011 -13.860000000000008 -14.630000000000004 -15.809708442403235 -15.80970844240323 -13.860000000000001 -12.320000000000002 -11.55"/><bondArray><bond id="b1" atomRefs2="a1 a2" order="1"/><bond id="b2" atomRefs2="a2 a3" order="1"/><bond id="b3" atomRefs2="a3 a4" order="1"/><bond id="b4" atomRefs2="a4 a5" order="1"/><bond id="b5" atomRefs2="a5 a6" order="1"/><bond id="b6" atomRefs2="a6 a7" order="2"/><bond id="b7" atomRefs2="a7 a8" order="1"/><bond id="b8" atomRefs2="a8 a9" order="1"/><bond id="b9" atomRefs2="a8 a10" order="2"/><bond id="b10" atomRefs2="a11 a10" order="1"><bondStereo>H</bondStereo></bond><bond id="b11" atomRefs2="a11 a12" order="1"/><bond id="b12" atomRefs2="a12 a13" order="2"/><bond id="b13" atomRefs2="a13 a14" order="1"/><bond id="b14" atomRefs2="a13 a15" order="1"/><bond id="b15" atomRefs2="a15 a16" order="1"/><bond id="b16" atomRefs2="a17 a16" order="1"><bondStereo>W</bondStereo></bond><bond id="b17" atomRefs2="a17 a11" order="1"/><bond id="b18" atomRefs2="a17 a18" order="1"/><bond id="b19" atomRefs2="a18 a19" order="1"><bondStereo>H</bondStereo></bond><bond id="b20" atomRefs2="a18 a20" order="1"><bondStereo>W</bondStereo></bond><bond id="b21" atomRefs2="a18 a21" order="1"/><bond id="b22" atomRefs2="a21 a22" order="1"/><bond id="b23" atomRefs2="a10 a22" order="1"/><bond id="b24" atomRefs2="a22 a23" order="2"/><bond id="b25" atomRefs2="a6 a23" order="1"/></bondArray></molecule></MChemicalStruct></MDocument>
</cml>
{
"in store": "true",
"compliant": "false",
"id": "420",
"type": "common"
}