Install indigo tool kit to OSX and make python wrapper #Indigo #chemoinfo

I am not familiar with Indigo TK. I only have used Indigo TK via Knime.
Indigo TK provides python wrapper, so if I can build indigo TK from source and python wrapper all task can do only python. ( for me )
That sounds nice. So I tried to install Indigo TK from source. It was easy to install to Linux but there are some problem against OSX. Not so big problem.
OK let’s start.
At first down load files from git repository.

iwatobipen$ git clone https://github.com/epam/Indigo.git
iwatobipen$ Indigo

My OSX version is 10.13 Serria, indigo install script is not supported the version. But I changed some lines of cmake file and succeeded the installation

iwatobipen$ vim common/cmake/MacFrameworks.cmake
# comment out line of 8 and hard coded SDK version
8 #set(FRAMEWORK_PATH /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${SSNAME}.sdk/System/Library/Frameworks)
9 set(FRAMEWORK_PATH /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks)

iwatobipen$ vim common/cmake/SetBuildParameters.cmake
#comment out of line 57 and hard corded version.
57 # set(CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${SDK_SUBSYSTEM_NAME}.sdk)
58 set(CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk)

Ready! ;-)
Let’s run install script.

iwatobipen$ python build_scripts/indigo-release-libs.py --preset=mac-universal
iwatobipen$ python build_scripts/indigo-release-utils.py --preset=mac-universal

After installation I can call some commands indigo-cano, indigo-deco, indigo-depict.
Next make python wrapper! If you are familiar for Java, you can make java wrapper with same way.

iwatobipen$ build_scripts\indigo-make-by-libs.py --type=pyhon

I can found zipped python wrapper in dist folder. ;-)
move to dist/indigo-python…
And launch ipython.
Indigo TK has atom mapping function. It is useful because RDKit does not has such function I think.

from indigo import Indigo, IndigoObject
mol = Indigo().loadMolecule('c1ccccc1C')
mol.molecularWeight()
# 92.1384220123291
rxn = indigo.loadReaction('CCBr.N(C)C>>CCN(C)C')
rxn.automap('discard')
rxn.automap('discard')
# '[CH3:1][CH2:2]Br.[NH:4]([CH3:6])[CH3:5]>>[CH3:1][CH2:2][N:4]([CH3:6])[CH3:5]'

In summary Indigo TK is useful for chemoinformatics.
If reader who is interested in indigo TK please try to use command tool and Knime node.
I appreciate comments and/or advice.

Published by iwatobipen

I'm medicinal chemist in mid size of pharmaceutical company. I love chemoinfo, cording, organic synthesis, my family.

One thought on “Install indigo tool kit to OSX and make python wrapper #Indigo #chemoinfo

  1. I would like to kindly ask You to provide assistance – article(?), with install description on OS X Mojave mol2chemfig LaTeX package detailed if possible. I am beginner and it is kind of magic for me, but I would like to have beautiful images of structures in tex documents… Indigo is needed for it.

    Marcin Kloske

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: