Overview of Indigo Service
masterIndigo service provides a RESTful application that demonstrates key Indigo toolkit functionalities, including:
- Ketcher
- Bingo cartridge
- Indigo API
- Imago OCR
repository·master·Indexed 19 days ago
https://github.com/epam/indigoA cheminformatics ecosystem providing core algorithms, search engines (Bingo), and language bindings for Java, Python, .NET, and WASM. Features include the indigo_service REST JSON:API for molecular operations, a WASM module for the Ketcher sketcher, and the Bingo Elastic SDK for chemical similarity and substructure searches in Elasticsearch. Also includes the Bingo PostgreSQL cartridge for database-integrated chemical data processing.
Indigo service provides a RESTful application that demonstrates key Indigo toolkit functionalities, including:
EPAM Indigo is a suite of cheminformatics tools and libraries. The repository contains several distinct projects:
Legio: GUI for combinatorial chemistry.ChemDiff: Visual comparison of SDF or SMILES files.indigo-depict: Molecule and reaction rendering.indigo-cano: Canonical SMILES generator.indigo-deco: R-Group deconvolution utility.The third_party/inchi directory contains the source code for the International Chemical Identifier (InChI) software, including the core library, executables, and API examples.
Developers can find usage examples in the following subdirectories:
demos/inchi_main/src, demos/mol2inchi/src, and demos/test_ixa/src. These include projects for MS Visual Studio 2015 (in vc14) and gcc/Linux (in gcc).demos/python_sample.The Indigo WASM module provides a subset of the Indigo API compiled to WebAssembly, specifically designed for integration with the Ketcher molecule sketcher. It allows for performing chemical informatics operations directly in the browser or a WASM-compatible environment.
Supported methods for molecule and reaction manipulation include:
aromatizedearomatizelayoutclean2dconvertcheckcalculaterendercalculateCipautomapFor implementation details and usage patterns, refer to the test.js file in the module directory.
The Indigo Service frontend is a React application that provides two main functional areas:
/search: Used for molecule searching. It includes a Ketcher window for drawing molecules and supports searching via Bingo-Elastic or Postgres. You can perform exact matches, similarity matches, or submatches./libs: Used for library management. This path is password-protected. Once authenticated, you can add or remove libraries and upload .sdf files to existing libraries.The InChI software distribution is organized into specific functional areas. Use the following directory structure to locate the components you need:
INCHI-1-SRC/INCHI_BASE/src contains C source files used by both the InChI Library and the inchi-1 executable.INCHI-1-SRC/INCHI_EXE/inchi-1/src contains C source files specific to the inchi-1 executable.INCHI-1-SRC/INCHI_API/libinchi/src contains C source files specific to the InChI Software Library (API).demos/inchi_main/src: C source files for the inchi_main demo.demos/mol2inchi/src: C source files for the mol2inchi demo.demos/test_ixa/src: C source files for the test_ixa demo.demos/python_sample: Python 3 source files for the Python demo.cppcodec uses a shared template-based implementation to support multiple codecs. This design provides several benefits:
encode and decode methods, making it easy to switch variants.std::string, and templated character vectors, provided they implement necessary methods like .data(), .size(), .reserve(), and .push_back().TinyXML-2 uses a Document Object Model (DOM) where an XMLDocument acts as the owner of all nodes.
XMLDocument can be allocated on the stack or the heap.XMLElement, XMLText, etc.) must be created via the appropriate XMLDocument methods, such as XMLDocument::NewElement() or XMLDocument::NewText().XMLDocument. When the XMLDocument is deleted, all contained nodes are also deleted.For maximum performance in large containers, combine sf::contfree_safe_ptr for the container (table-level locking) with sf::safe_obj<T, Mutex> for individual elements (row-level locking). This pattern allows multiple threads to modify different elements of the same container simultaneously without blocking the entire container.
#include "safe_ptr.h"
#include <map>
using namespace sf;
struct field_t { int money, time; };
// Define a thread-safe object type using a spinlock
typedef safe_obj<field_t, spinlock_t> safe_obj_field_t;
// A map where the map itself is contention-free, but elements have their own locks
contfree_safe_ptr< std::map<int, safe_obj_field_t> > safe_map_global;
// Pattern for updating an element:
// 1. Get a shared lock on the container to find the element
// 2. Get an exclusive lock on the specific element (row-lock)
void update_element(int key, int value) {
auto s_safe_map = slock_safe_ptr(safe_map_global); // S-lock on Table
auto it = s_safe_map->find(key);
if (it != s_safe_map->cend()) {
auto x_field = xlock_safe_ptr(it->second); // X-lock on field
x_field->money += value;
}
}Indigo nodes for KNIME allow for high-performance workflows to process chemical data. The nodes support the following standard chemical input formats:
Tests for the Indigo KNIME implementation can be executed using the provided scripts located in the tests/ directory:
run-indigo-knime-tests.shrun-indigo-knime-tests.batThe tests/workflows/ directory contains the specific test workflows used during this process.
# Linux
./tests/run-indigo-knime-tests.sh
# Windows
./tests/run-indigo-knime-tests.bat