Skip to content

Latest commit

 

History

History
233 lines (171 loc) · 7.28 KB

README.md

File metadata and controls

233 lines (171 loc) · 7.28 KB

License

EPAM Indigo projects

Copyright (c) 2009-2022 EPAM Systems, Inc.

Licensed under the Apache License version 2.0

Introduction

This repository includes:

  • Bingo: Chemistry search engine for Oracle, Microsoft SQL Server and PostgreSQL databases
  • Bingo-Elastic: Set of APIs for efficient chemistry search in Elasticsearch
    • Java API. Full README is available here
    • Python API. Full README is available here
  • Indigo: Universal cheminformatics library with bindings to .NET, Java, Python, R and WebAssembly, and the following tools:
    • Legio: GUI application for combinatorial chemistry
    • ChemDiff: Visual comparison of two SDF or SMILES files
    • indigo-depict: Molecule and reaction rendering utility
    • indigo-cano: Canonical SMILES generator
    • indigo-deco: R-Group deconvolution utility

Detailed documentation is available at http://lifescience.opensource.epam.com

Changelog could be found in CHANGELOG.md.

Download

https://lifescience.opensource.epam.com/download/indigo.html

Bindings in public repositories:

Source code organization

Main directory structure layout:

  • api: Indigo API sources
  • bingo: Bingo sources
  • core: Core algorithms and data structures sources
  • third_party: sources for third-party libraries
  • utils: utilities sources

Each project is placed in the corresponding directory with CMakeList.txt configuration file, that does not include other projects. In order to build the whole project with the correct references you need to use CMake configurations from the build_scripts directory.

Preinstalled build tools

To build the project from the sources, the following tools should be installed:

Required:

  • GIT 1.8.2+
  • C/C++ compilers with C++14 support (GCC, Clang and MSVC are officially supported)
  • CMake 3.4+
  • Python 3.6+

Required to build all targets:

  • JDK 1.8+
  • .NET Standard 2.0+

Required to build Indigo-WASM:

  • Emscripten SDK
  • Ninja

Dependencies:

On Linux use python3 insted of python. Using virtual environment might be required as well.

To be able to run backend API test set environment variable by running this command export INDIGO_SERVICE_URL=http://localhost:5000/v2 or $env:INDIGO_SERVICE_URL="http://localhost:5000/v2" (in powershell)

Python

  • wheel package installed. Command: python -m pip install wheel
  • setuptools version less than 72.0.0 package installed. Command: python -m pip install setuptools==68.0.0
  • waitress package installed (to run backend API test). Command: python -m pip install waitress
  • flasgger package installed (to run backend API test). Command: python -m pip install flasgger
  • psycopg2 package installed (to run backend API test). Command: python -m pip install psycopg2
  • sqlalchemy package installed (to run backend API test). Command: python -m pip install sqlalchemy
  • numpy package installed (to run backend API test). Command: python -m pip install numpy
  • celery package installed (to run backend API test). Command: python -m pip install celery
  • marshmallow package installed (to run backend API test). Command: python -m pip install marshmallow
  • redis package installed (to run backend API test). Command: python -m pip install redis
  • flask_httpauth package installed (to run backend API test). Command: python -m pip install flask_httpauth
  • pyparsing package installed (to run backend API test). Command: python -m pip install pyparsing
  • requests package installed (to run backend API test). Command: python -m pip install requests

Build instruction

On Windows use cmd to run the commands.

  1. Create build folder

    mkdir build
    
  2. Move to build folder

    cd build
    
  3. Run CMake to configure the project with desired options. For instance:

    cmake .. -DBUILD_INDIGO=ON -DBUILD_INDIGO_WRAPPERS=ON -DBUILD_INDIGO_UTILS=ON
    
  4. Build Indigo from console:

    cmake --build . --config Release --target <target name>
    

Replace <target name> with any of the following targets you need: { ALL_BUILD (on Windows) or all (on Linux) | indigo-dotnet | indigo-java | indigo-python }

Build results could be collected from Indigo/dist folder.

'indigo-python' target is commonly used.

Run tests

Befor run any test you have to build and install indigo-python

  1. Build indigo-python using --target indigo-python or --target ALL_BUILD(on Windows) or --target all(on Linux). See Build instruction above.
  • On Windows the package should be in 'Indigo/api/python/dist' folder
  • On Linux it is located in 'Indigo\dist' folder

Package will be named like 'epam.indigo-<version-arch>.whl'. For instance: epam.indigo-1.29.0.dev2-py3-none-win_amd64.whl

  1. Install package using pip

    python -m pip uninstall <path-to-.whl-file> -y
    

    Replace <path-to-.whl-file> with the right path to .whl package. For instance: python -m pip uninstall ../api/python/dist/epam.indigo-1.29.0.dev2-py3-none-win_amd64.whl

  2. Run integration test

    to run all test

    python api/tests/integration/test.py -t 1
    

    to run tests by mask test_name

    python api/tests/integration/test.py -t 1 -p test_name
    

To run backend API test:

  1. Install epam-indigo
  2. Run backend service :
    • cd utils/indigo-service/backend/service
    • cp v2/common/config.py .
    • waitress-serve --listen="127.0.0.1:5000 [::1]:5000" app:app you may use any port instead of 5000
  3. Run backend API test:
    • run test python utils/indigo-service/backend/service/tests/api/indigo_test.py use -k test_name to run test by pattern.

How to build Indigo-WASM

Build tools prerequisites

  • Git

Make sure git is running from path:

>git --version
git version 2.26.2.windows.1

Make sure python is running from path:

>python --version
Python 3.9.0

Make sure cmake is running from path:

>cmake --version
cmake version 3.18.4

Download corresponding ninja-xxx.zip and unpack to folder on path. Make sure it's running from path:

>ninja --version
1.10.2
>git clone https://github.com/emscripten-core/emsdk.git
>cd emsdk
>./emsdk install latest
>./emsdk activate latest
>source ./emsdk_env.sh

Note: On Windows, run emsdk instead of ./emsdk, and emsdk_env.bat instead of source ./emsdk_env.sh, use cmd instead of powershell.

Get Indigo sources

Clone (or checkout) Indigo repository

>git clone https://github.com/epam/Indigo.git

Build Indigo

For each new session, set environment anew:

>cd emsdk
>./emsdk activate latest

If fresh build:

>mkdir build
>cd build

Now build:

>emcmake cmake .. -DCMAKE_BUILD_TYPE=Debug -G Ninja
>ninja indigo-ketcher-js-test