Preparing and Running Batch Files and Shell Scripts
Software Requirements
In order to run the applications in the JChem package Java Virtual Machine version 1.6 or later has to be installed.
JChemManager (jcman) has more requirements. See the Administration Guide for details.
Setting Environmental Variables
Some environmental variables should be set manually.
How to set environment variables ?
Windows:
Under Windows these variables can be set from the Control Panel. For example in the case of Windows 7:
Start menu -> Control panel -> System -> Advanced system settings -> Environment variables
After changing the environment variables a new console (Command Prompt) should be opened so the changes can take effect.
To check the current setting of an environment variables, type "set" in the console. To print a specific variable type "echo %VARIABLE_NAME%".
Linux / UNIX:
The variables are usually set in a profile file for the used shell (e.g. ".bash_profile").
To check the current setting of an environment variables, type "set" in the console. To print a specific variable type "echo $VARIABLE_NAME".
PATH
Including the <JChem home>\bin directory of your JChem installation in the PATH variable allows you to start these programs from other directories of your system.
CLASSPATH / JDBC driver
To allow database access for JChem applications, the appropriate JDBC driver should be included in the CLASSPATH environment variable (create this variable if not already present). JChem suite contains bundled JDBC drivers for the supported databases. If the bundled driver is not appropriate for your case, you can to override it with another JDBC driver. This is usually a .jar file, which is either distributed with the database, or can be downloaded from the vendor's site. Please note, that the actual file should be listed in the CLASSPATH before the bundled driver.
UNIX Shell Scripts and Windows Batch Files in JChem
Since running Java classes directly from command line might be difficult because of the long class names and the necessary setting of the classpath, JChem is supplied with batch files and shell scripts that simplify this task. These files can be found in the <JChem home>/bin directory.
Command |
Name |
Function |
compr |
Compr |
Diversity/dissimilarity calculations for comparing compound libraries and individual compounds in a set. |
crview |
CreateView |
Composing a new SDfile from an SDfile and a data table. It is useful for viewing the results of clustering. |
cxcalc |
Calculator |
Performs chemical calculations by invoking calculator plugins. |
evaluate |
Chemical Term Evaluator |
Evaluates chemical terms. |
fragment |
Fragmenter |
Creates molecule fragments by applying predefined cleavage rules. |
fragstat |
Fragment Statistics |
Creates fragment statistics from the output of Fragmenter. |
generatemd |
GenerateMD |
Generates molecular descriptor for molecular stuctures. |
hitstatistics |
HitStatistics |
Statistics about the performance of parametrized dissimilarity metrics when used for screening. |
jarp |
Jarp |
Clustering by a modified Jarvis-Patrick method. |
jcman |
Administration of structure tables |
|
jcsearch |
Searching in structure files and in JChem tables from command line. |
|
libmcs |
LibMCS |
Maximum Common Substructure based hierarchical clustering. |
molconvert |
MolConverter |
Interconverting various file formats |
msketch |
MarvinSketch |
Drawing molecules |
mspace |
MarvinSpace |
High performance 3D visualization |
mview |
MarvinView |
Displaying structure files |
nneib |
NNeib |
Nearest neighbor search for creating input for Jarp. |
optimizemetrics |
OptimizeMetrics |
Optimization of molecular descriptor dissimilarity metrics for enhancing screening selectivity. |
pmapper |
PMapper |
Perceives pharmacophoric point types and maps them to atoms. |
react |
Reactor |
Simulates chemical reactions. |
screeningoptimizer |
ScreeningOptimizer |
Virtual screening optimizer (combination of optimizemetrics and hitstatistics). |
screenmd |
ScreenMD |
Performs virtual screening of large compound libraries using various molecular descriptors. |
standardize |
Standardizer |
Brings molecules to standardized form based on XML configuration. |
ward |
Ward |
Clustering by Ward's hierarchic clustering method using the RNN approach. |
Note for UNIX/Linux users
As some SMARTS input strings contain "$" characters, the command line escape character "\" might be needed. Otherwise the string within the following parentheses is evaluated.
e.g. msketch "CC[C$(CNC)]" is of false syntax.
use instead: msketch "CC[C\$(CNC)]" or msketch 'CC[C$(CNC)]'
Setting Options in the batch files and scripts
At the beginning of each startup file there are some editable variables with some explanation text.
The following two options are present in every script:
-
HEAP_LIMIT: specifies the maximum amount of memory that can be allocated by the application in megabytes. (This corresponds to the "-Xmx" JVM option.)
-
SERVER_MODE: if set to "true", the application startup and initial speed will be slower, but long calculations will perform better due to more extensive runtime optimization. (This corresponds to the "-server" JVM option.)
The shell scripts (under Linux-like command prompts) can also accept JVM options beginning with "-X" and the "-server" / "-client" options as an argument. Example:
jcman -Xmx200m -server [additional arguments]
This overrides the default settings in the script.