Git Product home page Git Product logo

epam / indigo Goto Github PK

View Code? Open in Web Editor NEW
292.0 46.0 100.0 227.05 MB

Universal cheminformatics toolkit, utilities and database search tools

Home Page: http://lifescience.opensource.epam.com

License: Apache License 2.0

CMake 0.65% C# 3.42% C 2.19% C++ 62.57% Java 9.09% Python 14.47% R 0.04% Makefile 0.01% Batchfile 0.15% Shell 0.11% PLSQL 0.03% NSIS 0.08% TSQL 0.56% PowerShell 0.05% Dockerfile 0.11% JavaScript 0.54% HTML 0.01% Pawn 0.20% PLpgSQL 0.40% Jupyter Notebook 5.35%
indigo bingo cheminformatics chemistry python dotnet postgresql webassembly java molfile

indigo's Introduction

Build Status 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/index.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:

  • GIT 1.8.2+
  • C/C++ compilers with C++14 support (GCC, Clang and MSVC are officially supported)
  • CMake 3.4+
  • Python 3.6+
  • JDK 1.8+
  • .NET Standard 2.0+
  • Emscripten SDK
  • Ninja

Build instruction

Create build folder and use cmake with desired options. For instance:

Indigo/build>cmake .. -DBUILD_INDIGO=ON -DBUILD_INDIGO_WRAPPERS=ON -DBUILD_INDIGO_UTILS=ON

To build Indigo from console:

Indigo/build>cmake --build . --config Release --target all

or any of the following targets could be specified: --target { indigo-dotnet | indigo-java | indigo-python } Build results could be collected from Indigo/dist folder.

Run tests

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

  1. Build indigo-python using '--target all' or '--target indigo=python'. Package should be in 'build' directory, it will be named like 'epam.indigo-version-arch.whl'
  2. Install package using pip python -m pip uninstall epam.indigo -y ; python -m pip install dist/epam.indigo-version-arch.whl

Run integration test using python api/tests/integration/test.py -t 1 for all test, or python api/tests/integration/test.py -t 1 -p test_name to run tests by mask test_name.

To run backend API test:

  1. Install epam-indigo
  2. Install waitress python pip install waitress
  3. 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
  1. Run backend API test:
  • set environment variable export INDIGO_SERVICE_URL=http://localhost:5000/v2 (in powershell $env:INDIGO_SERVICE_URL="http://localhost:5000/v2")
  • 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

indigo's People

Contributors

aatdev21 avatar achurinov avatar alexandersavelyev avatar alexeygirin avatar aliaksandrdziarkach avatar alkornev avatar andreichurinov avatar bodyangug avatar dependabot[bot] avatar dianaprs avatar dmitrii-chernov-epam-com avatar dmitrysigaev avatar dpavlov-ggasoftware avatar even1024 avatar ggasoftware avatar iuriipuzanov avatar ivanminin avatar karnaukhovv avatar khyurri avatar long-m-r avatar mkviatkovskii avatar mysterionrise avatar qnan avatar rybalkin-ggasoftware avatar sa-chem avatar sunfellow avatar suppnova avatar voddan avatar wadym avatar zproksi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

indigo's Issues

Rename maven repositories and move into correct group

Right now we have new group created in Maven central. The following changes are required

  • Artefact "indigo" should be moved from com.epam --> com.epam.indigo group
  • Artefact "bingo" should be renamed bingo-->indigo-nosql

Make dearomatization optional in RPE

Currently Reaction Product Enumeration module breakes the invariant of the molecules provided as an output. Moreover: the dearomatization applied to such molecule makes it impossible to correct it in client modules.
This is why the dearomatization should become an optional procedure in RPE.

When depicting SMILES, do not put stereobonds on bonds belonding to rings

Summary:
when converting SMILES into internal representation, indigo should avoid placing stereobonds into ring bonds. They should be placed into non-ring bonds, where possible. This is especially important when structures like mono- and poly- saccharides where any non-conventional depiction raises questions and bug reports, e.g. the message below.

Obviously reading SMILES and saving again into MOLfile should behave the same way, i.e. it is an issue of SMILES conversion and not of depiction.

-----------original request-----------------------------------
I am a graduate student of Kansas University.
First, I really thanks to your great program, indigo-toolkit.
I would like to let you know the one of the problem of depiction.
I attached a example below.

expected
indigo_actual

I was going to depict the one of important monosaccharides, N-acetyl nuraminic acid, but the 2d depiction show me a little difference with the one in PDB site in terms of their stereochemistry. One of the edges in carbohydrate ring is expressed as hashed wedges.

code using by indigo-toolkit is like this.

‘''
indigo = Indigo()
renderer = IndigoRenderer(indigo)
outputname = 'test'
indigo.setOption("render-output-format", 'png')
indigo.setOption('render-background-color', 1.0, 1.0, 1.0)
test = indigo.loadMolecule("CC(=O)N[C@@h]1C@@HCC@@(O[C@H]1C@HC@HCO)C(O)=O")
renderer.renderToFile(test, '%s.png' % outputname)
‘’'

Could you please check how I can draw like picture above?
I look forward to your reply.

Thank you.

Sincerely,
Sang-Jun Park

Indigo compilation terminated

python indigo-release-libs.py --preset=linux64
cmake -G "Unix Makefiles" -DSUBSYSTEM_NAME=x64 -DNO_STATIC=TRUE /home/dmitry/Indigo/build_scripts/indigo-all
-- System-specific folder name: Linux
-- Subsystem-specific folder name: x64
-- Set CMAKE_BUILD_TYPE to Release
-- CMAKE_BUILD_TYPE=Release
-- Common output dir: /home/dmitry/Indigo/build/indigo_Unix_Makefiles_ReleaseSUBSYSTEM_NAME_x64_NO_STATIC_TRUE/dist/Linux/x64
-- **** Indigo ****
-- Using local ZLib library
-- Indigo version is 1.2.2beta-r1
-- **** Indigo-inchi ****
-- **** Indigo-renderer ****
-- Using local LibPNG library
-- Using local Pixman library
-- Using local Cairo library
-- **** Bingo ****
-- Configuring done
CMake Warning (dev) in /home/dmitry/Indigo/api/CMakeLists.txt:
Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
interface. Run "cmake --help-policy CMP0022" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.

Target "indigo-shared" has an INTERFACE_LINK_LIBRARIES property which
differs from its LINK_INTERFACE_LIBRARIES properties.

INTERFACE_LINK_LIBRARIES:

-lpthread;-lrt;z;tinyxml;inchi

LINK_INTERFACE_LIBRARIES:

-lpthread;z;tinyxml;inchi

This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /home/dmitry/Indigo/build/indigo_Unix_Makefiles_ReleaseSUBSYSTEM_NAME_x64_NO_STATIC_TRUE
[ 4%] Built target z
[ 13%] Built target common
[ 13%] Built target tinyxml
[ 21%] Built target inchi
[ 27%] Built target graph
[ 41%] Built target molecule
[ 47%] Built target reaction
[ 51%] Built target layout
[ 51%] Built target dlopen-test
[ 56%] Built target indigoObj
[ 56%] Built target indigo-shared
[ 57%] Built target indigo-c-test-shared
[ 57%] Built target indigo-inchi-Obj
[ 57%] Built target indigo-inchi-shared
[ 57%] Built target indigo-inchi-c-test-shared
[ 60%] Built target png
[ 66%] Built target pixman
[ 66%] Building C object indigo-renderer/cairo/CMakeFiles/cairo.dir/src/cairo-ft-font.c.o
In file included from /home/dmitry/Indigo/third_party/cairo-src/cairo/src/cairo-ft-private.h:40:0,
from /home/dmitry/Indigo/third_party/cairo-src/cairo/src/cairo-ft-font.c:46:
/home/dmitry/Indigo/third_party/cairo-src/cairo/src/cairo-ft.h:50:35: fatal error: fontconfig/fontconfig.h: No such file or directory
#include <fontconfig/fontconfig.h>
^
compilation terminated.
make[2]: *** [indigo-renderer/cairo/CMakeFiles/cairo.dir/src/cairo-ft-font.c.o] Error 1
make[1]: *** [indigo-renderer/cairo/CMakeFiles/cairo.dir/all] Error 2
make: *** [all] Error 2
Traceback (most recent call last):
File "indigo-release-libs.py", line 158, in
build_libs(sys.argv[1:])
File "indigo-release-libs.py", line 127, in build_libs
subprocess.check_call("make package {0}".format('VERBOSE=1' if args.buildVerbose else ''), shell=True)
File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'make package ' returned non-zero exit status 2

SegFault on testing stage at time of building on ubuntu 14.04

UpdateCTestConfiguration from :/home/dmitry/Indigo/build/indigo_Unix_Makefiles_ReleaseSUBSYSTEM_NAME_x64_NO_STATIC_TRUE/DartConfiguration.tcl
Parse Config file:/home/dmitry/Indigo/build/indigo_Unix_Makefiles_ReleaseSUBSYSTEM_NAME_x64_NO_STATIC_TRUE/DartConfiguration.tcl
UpdateCTestConfiguration from :/home/dmitry/Indigo/build/indigo_Unix_Makefiles_ReleaseSUBSYSTEM_NAME_x64_NO_STATIC_TRUE/DartConfiguration.tcl
Parse Config file:/home/dmitry/Indigo/build/indigo_Unix_Makefiles_ReleaseSUBSYSTEM_NAME_x64_NO_STATIC_TRUE/DartConfiguration.tcl
Test project /home/dmitry/Indigo/build/indigo_Unix_Makefiles_ReleaseSUBSYSTEM_NAME_x64_NO_STATIC_TRUE
Constructing a list of tests
Done constructing a list of tests
Checking test dependency graph...
Checking test dependency graph end
test 1
Start 1: dlopen-test

1: Test command: /home/dmitry/Indigo/build/indigo_Unix_Makefiles_ReleaseSUBSYSTEM_NAME_x64_NO_STATIC_TRUE/dist/Linux/x64/lib/dlopen-test "/home/dmitry/Indigo/api/libs/shared/Linux/x64/libindigo.so" "/home/dmitry/Indigo/api/libs/shared/Linux/x64/libindigo-inchi.so" "/home/dmitry/Indigo/api/libs/shared/Linux/x64/libindigo-renderer.so" "/home/dmitry/Indigo/api/libs/shared/Linux/x64/libbingo.so"
1: Test timeout computed to be: 20
1/4 Test #1: dlopen-test ......................***Exception: SegFault 0.14 sec
test 2
Start 2: indigo-c-test-shared

2: Test command: /home/dmitry/Indigo/build/indigo_Unix_Makefiles_ReleaseSUBSYSTEM_NAME_x64_NO_STATIC_TRUE/dist/Linux/x64/lib/indigo-c-test-shared
2: Test timeout computed to be: 20
2/4 Test #2: indigo-c-test-shared .............***Exception: SegFault 0.12 sec
test 3
Start 3: indigo-inchi-c-test-shared

3: Test command: /home/dmitry/Indigo/build/indigo_Unix_Makefiles_ReleaseSUBSYSTEM_NAME_x64_NO_STATIC_TRUE/dist/Linux/x64/lib/indigo-inchi-c-test-shared
3: Test timeout computed to be: 20
3/4 Test #3: indigo-inchi-c-test-shared .......***Exception: SegFault 0.13 sec
test 4
Start 4: indigo-renderer-c-test-shared

4: Test command: /home/dmitry/Indigo/build/indigo_Unix_Makefiles_ReleaseSUBSYSTEM_NAME_x64_NO_STATIC_TRUE/dist/Linux/x64/lib/indigo-renderer-c-test-shared
4: Test timeout computed to be: 20
4/4 Test #4: indigo-renderer-c-test-shared ....***Exception: SegFault 0.11 sec

0% tests passed, 4 tests failed out of 4

Total Test time (real) = 0.51 sec

The following tests FAILED:
1 - dlopen-test (SEGFAULT)
2 - indigo-c-test-shared (SEGFAULT)
3 - indigo-inchi-c-test-shared (SEGFAULT)
4 - indigo-renderer-c-test-shared (SEGFAULT)
Errors while running CTest
Traceback (most recent call last):
File "indigo-release-libs.py", line 158, in
build_libs(sys.argv[1:])
File "indigo-release-libs.py", line 140, in build_libs
subprocess.check_call("ctest -V --timeout 20 -C %s ." % (args.config), shell=True)
File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'ctest -V --timeout 20 -C Release .' returned non-zero exit status 8
dmitry@dmitry-vb:~/Indigo/build_scripts$

Fix indigo pka model API. Remove static model

Remove static initialization in pka model (molecule_ionize.cpp)

  • create molecule_pka_model.cpp and move MoleculePkaModel class
  • change indigo methods signatures

// Method for building PKA standard model
CEXPORT int indigoBuildPkaModel (int max_level, float threshold);

// Method for building PKA custom model from user SD file
CEXPORT int indigoBuildCustomPkaModel (int max_level, float threshold, const char *filename);

//use standard model
CEXPORT int indigoIonize (int item, float pH, float pH_toll);
CEXPORT int indigoIonizeCustom (int model, int item, float pH, float pH_toll);

CEXPORT float * indigoGetAcidPkaValue (int model, int item, int atom, int level, int min_level);
CEXPORT float * indigoGetBasicPkaValue (int model, int item, int atom, int level, int min_level);

Fix incorrect brackets rendering for SRU group

Please see the attached file test.mol.zip
Code to reproduce

      Indigo indigo = new Indigo();

      indigo.setOption("treat-x-as-pseudoatom", "true");
      IndigoRenderer renderer = new IndigoRenderer(indigo);

      IndigoObject mol = indigo.loadMolecule(structure);
      indigo.setOption("render-coloring", "true");
      indigo.setOption("render-stereo-style", "none");
      indigo.setOption("render-image-size", 400, 400);
      indigo.setOption("render-output-format", "png");
      indigo.setOption("render-background-color", "1,1,1");

      byte[] test = renderer.renderToBuffer(mol);
      try (FileOutputStream writer = new FileOutputStream(new File("test.png"))) {
         writer.write(test);
      }

Find why Indigo NoSQL and Bingo gives different number of search results

The presentation at http://www.slideshare.net/NextMoveSoftware/substructure-search-faceoff
on slide 20 for the same database and same search query shows different number of search hits for Indigo NoSQL (498,427) and Bingo(500,865). The search query is simple enough to expect that the number of hits should be the same. Database is available from here https://www.emolecules.com/info/plus/download-database
It is necessary to reproduce this finding and confirm that the number of hits is different. If this is the case, it is necessary to find a reason and if this is a bug, fix it.

Fix aromatize/dearomatize functions

Currently there are problems with aromatization/dearomatization of molecules with unusual number of hydrogens.

Lets take a molecule: N1C(S)=C2C([NH]=CN2)=NC=1N. Please see that the atom 5 (zero-based numbering) has one single, one double bond and one additional hydrogen. Thus the connectivity of nitrogen is 4.

The first question is if this molecule is valid (it was taken from the file with tautomers, but the question is open).
Next, there will be a problem if we perform sequential dearomatize(aromatize(molecule)): we will not get the initial molecule, but the one with several unresolved aromatic bonds. So, one of these procedures doesn't work well (if we assume that the molecule is valid).
If we compare the results of aromatization of this molecule given by Indigo and Marvin, we can see the difference.
Indigo: [n]1c(N)[n]c2[nH]c[nH]c2c1S (all cycles aromatized)
Marvin: Nc1nc(S)c2NC=[NH]c2n1 (only one cycle is aromatized)

Building: indigo_Visual_Studio_11_Win64_Release_NO_STATIC_TRUE - 2

molecule_layout_macrocycles.h(290): error C2864: 'indigo::TriangleLattice::_sink' : only static const integral data members can be initialized within a class

SHA ea9a78a
by Valeriy Samoylov, 10/17/2014 10:24 AM
parent 4cc429d

olecule_layout_macrocycles.h(315): error C2864: 'indigo::AnswerField::ACCEPTABLE_ERROR' : only static const integral data members can be initialized within a class

SHA 4cc429d
by Valeriy Samoylov, 09/11/2014 05:41 AM
parent af1a6e3

Fix bingo postgres AND queries

From Zoubeyr Boudene
https://groups.google.com/forum/#!topic/indigo-bugs/oX66ZxMBs1U

requested molecules : carboxylic acids containing C double bonds:

select *
from
molecules m
where
m.smiles @ ('CX3[OX2H]','')::bingo.smarts AND
m.smiles @ ('C=C','')::bingo.smarts

example of results that don't contain C double bonds:

"CCCCCCCCCC@HCC(O)=O"
"CCCCCCCCC@HCCC(O)=O"
"CC(CO)C(O)=O"
"OC(=O)Cc1ccccc1"
"Cc1ccccc1C(O)=O"
"Cc1cc(ccc1)C(O)=O"
"Cc1ccc(cc1)C(O)=O"

I don't have this issue if the column is not indexed.

Fix reaction CML saving

CML saver for reactions adds incorrect additional molecules. Code to reproduce

   rxn = indigo.loadReactionFromFile("reaction_for_cml.rxn")
   print(rxn.countProducts())
   rxn.saveCml("test_rxn.cml")
   rxn2 = indigo.loadReactionFromFile("test_rxn.cml")
   print(rxn2.countProducts())

Output: 1 2

see attached RXN
reaction_for_cml.rxn.zip

Create bingo batch processing in API

New methods are required (java,python,c#)

  • Array<IndigoObject index> bingoIndexStructures(Array molecules, String properties)
  • Array<IndigoObject match> bingoMatchStructures(IndigoObject query, Array molecules, String properties)

Should process input structures by batches and return calculated values. index object contains

  • fingerprints
  • cmf
  • coordinates
  • exact hash
    ...

Create CDXML support Reactions

Here are the requirements:
• Input is RXN file (V3000 type), please refer to the attachments for the sample files.
• RXN file will not contain multiple reactions or multi-step reactions. Only one reaction is expected.
• Conversion should preserve all properties specified in RXN file, such as: reaction name, ISIS, etc.
• Conversion should support reaction atom-to-atom mapping.
• Outcome of the conversion is CDXML file which can be open by both ChemBioDraw Ultra (starting from version 13) and ChemDraw Direct (https://chemdrawdirect-cdn.perkinelmer.com/1.5.1/demo/index.html#)
• When displayed, converted reaction should be vertically and horizontally center aligned and not divided by columns.

Nice to have
• Support of different fonts and styles

Add support S-group hierarchy during rendering Data SGroup information.

Example of MOL file with Data SGroups and PARENT key:

SRU1
  ACCLDraw03131513562D

  0  0  0     0  0            999 V3000
M  V30 BEGIN CTAB
M  V30 COUNTS 14 15 3 0 0
M  V30 BEGIN ATOM
M  V30 1 C 12.2108 -4.4993 0 0 
M  V30 2 C 12.4501 -3.6062 0 0 
M  V30 3 C 11.5719 -3.3709 0 0 
M  V30 4 C 11.3326 -4.264 0 0 CFG=3 
M  V30 5 C 10.5453 -4.7185 0 0 
M  V30 6 C 9.758 -4.264 0 0 
M  V30 7 O 8.9708 -4.7185 0 0 
M  V30 8 C 8.1835 -4.264 0 0 
M  V30 9 C 5.8236 -5.6323 0 0 
M  V30 10 C 6.6134 -6.0822 0 0 
M  V30 11 C 7.3962 -5.6282 0 0 
M  V30 12 C 7.3962 -4.7185 0 0 
M  V30 13 C 6.6114 -4.2644 0 0 
M  V30 14 C 5.8236 -4.7189 0 0 
M  V30 END ATOM
M  V30 BEGIN BOND
M  V30 1 1 1 4 
M  V30 2 1 2 1 
M  V30 3 1 2 3 
M  V30 4 1 3 4 
M  V30 5 1 5 4 
M  V30 6 1 6 5 
M  V30 7 1 7 6 
M  V30 8 1 8 7 
M  V30 9 1 12 8 
M  V30 10 1 14 9 
M  V30 11 2 9 10 
M  V30 12 1 10 11 
M  V30 13 2 11 12 
M  V30 14 1 12 13 
M  V30 15 2 13 14 
M  V30 END BOND
M  V30 BEGIN SGROUP
M  V30 1 SRU 1 ATOMS=(3 7 5 6) XBONDS=(2 8 5) BRKXYZ=(9 8.57 -4.94 0 8.57 -
M  V30 -4.03 0 0 0 0) BRKXYZ=(9 10.94 -4.03 0 10.94 -4.94 0 0 0 0) -
M  V30 CONNECT=HT LABEL=n 
M  V30 2 DAT 2 PARENT=1 FIELDNAME=MOLWT_DISTRIBUTION -
M  V30 FIELDDISP="   -2.4375    1.6250    DR    ALL  1    D  5" -
M  V30 FIELDDATA=1.05 
M  V30 3 DAT 3 PARENT=1 FIELDNAME=MOLWT_NUMBER_AVERAGE -
M  V30 FIELDDISP="    0.3438    1.7188    DR    ALL  1    A  5" -
M  V30 FIELDDATA=5000 
M  V30 END SGROUP
M  V30 END CTAB
M  END

Building: indigo_Visual_Studio_11_Win64_Release_NO_STATIC_TRUE

molecule_ionize.h(37): error C2864: 'indigo::IonizeOptions::level' : only static const integral data members can be initialized within a class
molecule_ionize.h(38): error C2864: 'indigo::IonizeOptions::min_level' : only static const integral data members can be initialized within a class

Python build script fails on make-by-libs

the faling code:

or lib in libs:
       name = "indigo-libs-%s-%s-shared%s" % (version, lib, suffix)
       if exists(name + ".zip"):

it happens because of the new convention to use '-r'

Render charges for pseudo-atoms

Right now for pseudo atoms there are no charges rendered. Use this code as an example

String structure = "\n"
              + "  Ketcher 03101613542D 1   1.00000     0.00000     0\n"
              + "\n"
              + "  1  0  0     0  0            999 V2000\n"
              + "    4.5500   -3.6750    0.0000 X   0  0  0  0  0  0  0  0  0  0  0  0\n"
              + "M  CHG  1   1  -1\n"
              + "M  END\n";

      Indigo indigo = new Indigo();

      indigo.setOption("treat-x-as-pseudoatom", "true");
      IndigoRenderer renderer = new IndigoRenderer(indigo);

      IndigoObject mol = indigo.loadMolecule(structure);
      indigo.setOption("render-coloring", "true");
      indigo.setOption("render-stereo-style", "none");
      indigo.setOption("render-image-size", 400, 400);
      indigo.setOption("render-output-format", "png");
      indigo.setOption("render-background-color", "1,1,1");

      byte[] halide1 = renderer.renderToBuffer(mol);
      try (FileOutputStream writer = new FileOutputStream(new File("halide1.png"))) {
         writer.write(halide1);
      }

Add methods for r-group composition (scaffold based enumeration)

Add methods for r-group composition (scaffold based enumeration). See the attached as an example. The output should contain enumerated products from scaffold and monomers
Create new method

iter indigoScaffoldProductEnumerate(mol, params)
  • mol - a molecule with RGroups
  • params - string
  • iter - returns iterator for the enumerated products

Fix bingo compilation errors

mango_tautomer.cpp:89:126: error: no matching function for call to 'indigo::MoleculeTautomerMatcher::parseConditions(const char*&, int&, bool&, bool&, bool&)'
    MoleculeTautomerMatcher::parseConditions(conditions, _params.conditions, _params.force_hydrogens, _params.ring_chain, stub);`

FFI and uncaught exception when parsing invalid SMILES

I'm trying to use the Indigo API through ffi on OS X:

https://en.wikipedia.org/wiki/Foreign_function_interface

My target language is JavaScript (nodejs 5.6.0), and I'm using the node-ffi package.

I define my interface like this:

var libpath = './libindigo.dylib'
var lib = ffi.Library(indigoPath, {
  'indigoLoadMoleculeFromString': ['uint64', ['string']]
};

Loading a valid SMILES works fine:

var mol = lib.indigoLoadMoleculeFromString('c1ccccc1');

However, the node process exits when loading an invalid SMILES:

var mol = lib.indigoLoadMoleculeFromString('foobar');

libc++abi.dylib: terminating with uncaught exception of type indigo::SmilesLoader::Error
Abort trap: 6

So far I haven't found a way for node-ffi to catch errors thrown by a native library to allow them to be processed by the JavaScript interpreter.

Given that apparent limitation, is it possible to prevent Indigo from throwing errors in the first place? I though that's what the return value mechanism defined in indigo.h was for.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.