Marvin JS Web Services

    Installation, Administration and User Guide

    Marvin JS Web Services is a small, simple web service application embedding Marvin JSand providing tools for transforming, exporting, converting chemical structures. It contains the latest webjar release of Marvin JS.

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

    Software requirements

    Windows, Linux, or Mac OS

    Java 8 is needed. Beside Oracle JDK, Marvin JS Web Services is also tested against AdoptOpenJDK 8. Note: In the case of AdoptOpenJDK libfontconfig package must be included

    Installation

    The operating system dependent mjs-webservice (mjsws) installers (exe, sh, deb, rpm dmg) must be run or the independent installers must be extracted (zip, tar.gz).

    Licenses

    Required license: Marvin JS license

    Put the Marvin JS license file under <userhome>/chemaxon/licenses/ (on Windows) or <userhome>/.chemaxon/licenses/ (on Linux) folder or apply any of the options listed on the Installing to Servers page.

    Configuration

    Configuration file application.properties is available under the installed mjs-webservice/config/ folder.

    In application.properties file you can set the followings:

    • server.port

    default: 8080

    • logging.file

    default: ./logs/mjs-webservice.log

    • spring.application.name

    default: mjs-webservice

    For more settings possibilities see spring documentation page.

    Configuring Cross Origin Policy:

    By default it is allowed to access the web services from every origin. If you want to limit which JavaScript applications can access the web services, then you should set the following values in application.properties accordingly: default CORS in application.properties endpoints.cors.allowed-headers=*

    endpoints.cors.allowed-methods=*

    endpoints.cors.allowed-origins=*

    endpoints.cors.max-age=1800

    You can find more information here: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

    You can set a list of values by separating the individual values with a comma.

    Example: forbid CORS

    how to disable cross origin endpoints.cors.allowed-headers=

    endpoints.cors.allowed-methods=

    endpoints.cors.allowed-origins=

    This setting accepts same-origin requests only.

    Example: allow CORS on two origins

    Enable Cross origin calls from origin1.com and origin2.example.com endpoints.cors.allowed-headers=*

    endpoints.cors.allowed-methods=*

    endpoints.cors.allowed-origins=http://origin1.com, http://origin2.example.com

    endpoints.cors.max-age=1800

    Running the server

    Start the service application by

    run-mjs-webservice.exe (or run-mjs-webservice.sh)

    The service application (mjs-webservice.exe or mjs-webservice.sh) can also be set as a service, and started/stopped by the operating system.

    For installing as a service in Windows , run

    mjs-webservice/mjs-webservice.exe --install

    Usage

    Open Marvin JS on <serverhost>:<port>. Default: localhost:8080

    See below how to work with the provided web service functions.

    Functionalities available on the canvas of Marvin JS

    The red labeled icons below on the top toolbar of Marvin JS serve for executing structure transformations.

    images/download/attachments/20419676/marvinjs_canvas.jpg

    Functionalities available from API

    Click on the WebServices API icon on the right bottom corner of Marvin JS.

    images/download/attachments/20419676/marvinjs_api.jpg

    The opening Marvin JS Web Services page contains API examples and a link to the API documentation.

    images/download/attachments/20419676/marvinjs_api3.jpg
    • Calculate controller

      • cipStereoInfo

      • elementalAnalysis

      • molExport

      • reactionExport

    • Convert controller

      • clean

      • formats

      • hydrogenizer

      • reactionConverter

    • License controller

      • grant