Information

Pathway Tools Overview
Academic Download

Publications
Release Note History
Contributions
Pathway Tools Blog
Technical Datasheet
Contact Us

Technical Specs

Web Services
Pathway Tools APIs
Installation Guide
Ontologies
Operations
File Formats

Support

Submitting Bug Reports
Tutorials
User Forum / FAQ
User Group Meetings
Webinars
Installing the Marvin JS Compound Structure Editor

Installing the Marvin JS Compound Structure Editor

Marvin JS is not developed by SRI International and is not included in the Pathway Tools distribution. Marvin JS must be obtained from ChemAxon and then installed. Obtaining and using Marvin JS is free of charge for most types of users, although it is a commercial product. Marvin JS is updated continuously, and new versions become available routinely. The ChemAxon web site does offer the older versions, so if the most recent version proves incompatible, download an older version. Version 16.1.11.1 is known to work with Pathway Tools 20.5.

Some useful features are available only as additional Webservices, such as the 2D structure cleanup. For this, unfortunately a separate Tomcat server has to be set up, which is fairly heavy weight, but instructions for this are provided further below, as well.

Downloading

Download Marvin JS from the ChemAxon web site (https://www.chemaxon.com/products/marvin/marvin-js/). Note that this should not be confused with the older Marvin Java applet. Marvin JS is intended to be the replacement for the Java applet, to avoid many of the security headaches that were encountered with Java applets in the past.

The Marvin JS distribution is available in the .zip archive format.

Installation on UNIX or Mac OS X

On UNIX platforms, uncompress the file you downloaded into a newly created local directory, by using the following command in a terminal:
unzip marvinjs-16.1.11.1-all.zip
Next, define a shell environment variable called MARVIN_JS_PATH and set it to the absolute path of the directory containing editor.html file. It is best to do this in one of the user's shell init scripts such as .cshrc or .login. For example, in csh syntax:
setenv MARVIN_JS_PATH /example/of/full/marvinjs/path
For Mac OS X, you have bash as your default shell, so you'd want to add the following to your .bashrc file:
export MARVIN_JS_PATH=/example/of/full/marvinjs/path
The license file has to be placed in the directory indicated by MARVIN_JS_PATH , according to the instructions that ChemAxon supplies.

Installation on MS Windows

Unzip the file you downloaded into a newly created local directory (e.g., C:\Program Files\ChemAxon\Marvin).

Next, you need to create an environment variable called MARVIN_JS_PATH, and set it to the absolute directory path, in which the file editor.html was installed. To do so: right-click on the "My Computer" icon (on the desktop), and choose "Properties". In the window that opens click on the "Advanced" tab, then click on the "Environment Variables" button. A window like the one depicted in the Figure below will open.

Under "System Variables", click the "New" button and type MARVIN_JS_PATH for the Variable name, and the absolute path of the editor.html file for the Variable value, as seen in the Figure below.

The license file has to be placed in the directory indicated by MARVIN_JS_PATH , according to the instructions that ChemAxon supplies.

Installation of ChemAxon JChem Webservices

To obtain some other useful features, it is optionally possible to install additional Webservices. These are implemented as Java executables that need to run in a Tomcat server. And the recent versions of the Webservices requires a Java runtime version 8. So all this is a bit complicated to install and configure. Below, an abbreviated recipe is provided for how to make this work. Version 16.8.15.0-b962 of the Webservices is known to work with version 8.5.4 of Tomcat.

  1. Download Java 8
    Search for "Java 8 Runtime Download" for the download Website and follow the instructions.
  2. Download the JChem Webservices
    The Marvin JS download page on the ChemAxon web site has a link pointing to the Webservices, which are available in the .zip archive format. Unzip the downloaded file into a newly created local directory.

    The license file has to be placed into a directory under the home directory of the user's account. This is very likely the same license as used above for Marvin JS, but it is another copy (and with a different name, according to the instructions that ChemAxon supplies). As an example for UNIX and Mac OS X, the appropriate directory can be created at a terminal like this:

    mkdir -p ~/.chemaxon/licenses/
    
  3. Download Apache Tomcat
    Download the Core Binary distribution that is available from https://tomcat.apache.org/download-80.cgi in the .zip archive format. Unzip the downloaded file.
  4. Configuration:
    The following shell environment variables have to be defined.
    • JRE_HOME has to refer to the absolute path of the directory of the Java Runtime installation.
    • CATALINA_HOME has to refer to the absolute path of the directory of the Tomcat installation.
    • CATALINA_OPTS should contain a string of options recommended by the Webservices installation instructions.
    As with the definition of MARVIN_JS_PATH above, these additional 3 definitions should go into one of the init shell scripts of the user. The following are examples of what this should look like: In csh syntax:
    setenv JRE_HOME /usr/lib/jvm/jre1.8.0_101
    setenv CATALINA_HOME /homedir/brg/bio/software/apache-tomcat/apache-tomcat-8.5.4
    setenv CATALINA_OPTS "-Xmx1500m -Djava.awt.headless=true"
    
    In bash syntax (for Mac OS X):
    JRE_HOME=/usr/lib/jvm/jre1.8.0_101
    export JRE_HOME
    CATALINA_HOME=/homedir/brg/bio/software/apache-tomcat/apache-tomcat-8.5.4
    export CATALINA_HOME
    CATALINA_OPTS="-Xmx1500m -Djava.awt.headless=true"
    export CATALINA_OPTS
    
    Then, copy the file webservices.war from the installation directory of the Webservices to the directory $CATALINA_HOME/webapps/ , to make the Webservices code available to Tomcat, when the server starts up.

    By default, Tomcat exposes its server on port 8080 . However, if this would cause a collision with another existing service on the same port, then the port should be changed to a different number. To do this, search for 8080 in the file $CATALINA_HOME/conf/server.xml and edit this file. When invoking Marvin JS from Pathway Tools, this file will serve as the authoritative source of the port number needed to interact with the Webservices.

After this setup is completed, Pathway Tools should be restarted, and when Marvin JS is invoked, if valid values are found in the JRE_HOME and CATALINA_HOME environment variables, then the Tomcat server will be launched. This server will thereafter stay up and running, to avoid having to repeat the heavy weight launching.