Java Native Interface for InChI
(C) 2006-2010 Sam Adams, sea36 at users.sourceforge.net
Unilever Centre for Molecular Science Informatics, University of Cambridge, UK
Precompiled InChI library files and the API header file have been included in
this distribution, for convenience. These files are Copyright (C) The
International Union of Pure and Applied Chemistry 2005: IUPAC International
Chemical Identifier (InChI) (contact: email@example.com). The complete
InChI distribution, including source code, is available from the IUPAC website
3. Package contents
This package provides Java Native Interface (JNI) wrappers for software version
1.03 of the InChI chemical identifier C++ library distributed by IUPAC. The
following features are supported:
* Structure to (Standard/Non-Stanadard) InChI
* InChI to Structure (0D - no coordinates)
* InChI to InChI
* InChI to InChIKey
* Check InChI
* Check InChIKey
* Full range of InChI flags/options
While the Java code is cross-platfrom, the C InChI library requires compiling
for a specific operating system/architecture. JNI InChI includes precompiled
binaries for several common platfroms, and automatically deploys and loads the
appropriate library using the JNati library. Compilation of the native code
is integrated into the build system making it simple to compile JNI InChI for
use on other platforms.
3. Package contents
/ readme and license files
/pom.xml Maven Project Object Model file
/src/main/java Java source code
/src/main/native C source code
/src/test/java Java unit tests
The simplest method of obtaining JNI InChI is to use the JAR file, available for
download from the project web site (http://jni-inchi.sourceforge.net). This
comes with precompiled binaries for several common operating systems and
architectures. If an appropriate binary is available for your system it will
automatically be extracted from the JAR and loaded, otherwise you will need to
recompile JNI InChI for your machine.
In order to build JNI InChI the following software is required:
* Java (JDK) 1.5 or higher
* Maven 2.0
* GNU Make
The JAVA_HOME environment variable MUST be set, pointing to the location of
The Maven build system takes care of JNI InChI's dependencies, and runs Make to
build the native code required. From JNI InChI's root directory (containing the
file pom.xml) simply run 'mvn package' to compile a JAR file for your system.
Maven will compile the Java code, call Make to build the C code, run a suite
of unit tests to ensure the code has compiled successfully and package
everything into a JAR file in the target directory: jniinchi-(version).jar
This can be installed into your local Maven repository by running 'mvn install'
It is not expected that most users interact with the InChI API wrappers
directly, but rather through further wrappers which provide an interface to
whichever molecular handling library or toolkit they are using. InChI
generators for both CML (JUMBO) and CDK have been written as examples, and are
available through the respective projects.
The class net.sf.jniinchi.JniInchiWrapper provides access to the InChI library's
functionality through methods such as:
static JniInchiOutput getInchi(JniInchiInput input)
static JniInchiOutputStructure getStructureFromInchi(JniInchiInputInchi input)
The first of which is used to generate an InChI from a structure, and the second
to generate a structure from an InChI.
JNI InChI is designed to run without requiring any configuration, however there
are a number of customisations that can be made, if required. For more details
see the jnati project documentation.
JNI-InChI is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
JNI-InChI is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with JNI-InChI. If not, see <http://www.gnu.org/licenses/>.