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.