ggasoftware / indigo Goto Github PK
View Code? Open in Web Editor NEWIndigo: a cheminformatics toolkit. Bingo: RDBMS data cartridge for Oracle, MS SQL Server, and PostgreSQL
Home Page: https://lifescience.opensource.epam.com/indigo
Indigo: a cheminformatics toolkit. Bingo: RDBMS data cartridge for Oracle, MS SQL Server, and PostgreSQL
Home Page: https://lifescience.opensource.epam.com/indigo
When I use Indigo to draw compounds with amide (such as L-glutamine or L-asparagine) using InChI as the input, the double bond is between the C=N instead of C=O.
For example the InChI for L-glutamine is:
InChI=1S/C5H10N2O3/c6-3(5(9)10)1-2-4(7)8/h3H,1-2,6H2,(H2,7,8)(H,9,10)/t3-/m0/s1
and the resulting image is:
When calling indigoRenderWriteHDC the image always renders the same size. The "render-image-size" setting does not seem to have any effect. Is this the intended design, or is it a bug?
I downloaded the project and converted the indigo-depict solution to a Visual Studio 2010 solution. When I attempted to build I go 10 link errors. Is there something I am missing during the build, or is there documentation on how to build somewhere? Thanks.
tinyxml.lib(tinyxml.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
LIBCMT.lib(invarg.obj) : error LNK2005: ___pInvalidArgHandler already defined in LIBCMTD.lib(invarg.obj)
LIBCMT.lib(invarg.obj) : error LNK2005: __initp_misc_invarg already defined in LIBCMTD.lib(invarg.obj)
LIBCMT.lib(invarg.obj) : error LNK2005: __call_reportfault already defined in LIBCMTD.lib(invarg.obj)
LIBCMT.lib(invarg.obj) : error LNK2005: __set_invalid_parameter_handler already defined in LIBCMTD.lib(invarg.obj)
LIBCMT.lib(invarg.obj) : error LNK2005: __get_invalid_parameter_handler already defined in LIBCMTD.lib(invarg.obj)
LIBCMT.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in LIBCMTD.lib(invarg.obj)
LIBCMT.lib(invarg.obj) : error LNK2005: "void __cdecl _invoke_watson(unsigned short const *,unsigned short const *,unsigned short const *,unsigned int,unsigned int)" (?_invoke_watson@@YAXPBG00II@Z) already defined in LIBCMTD.lib(invarg.obj)
LIBCMT.lib(invarg.obj) : error LNK2005: __invalid_parameter already defined in LIBCMTD.lib(invarg.obj)
LIBCMT.lib(invarg.obj) : error LNK2005: "void __cdecl _invalid_parameter(unsigned short const *,unsigned short const *,unsigned short const *,unsigned int,unsigned int)" (?_invalid_parameter@@YAXPBG00II@Z) already defined in LIBCMTD.lib(invarg.obj)
is it possible to use this library with android? if so, how would i go about doing it? thank you
foo=# SELECT bingo.getversion() ;
getversion
-----------------
1.7.9.0 linux64
(1 row)
foo=# SELECT version();
version
----------------------------------------------------------------------------------------------
PostgreSQL 9.1.9 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.8.1-6) 4.8.1, 64-bit
(1 row)
Input data:
We get the same inchi string using smiles from both sources:
foo=# SELECT bingo.inchi('CN1C=NC2=C1C(=O)N(C)C(=O)N2C', '') = bingo.inchi('Cn1cnc2c1c(=O)n(C)c(=O)n2C', '');
?column?
----------
t
(1 row)
Exact search with 'MAS' option treats both representations as identical.
foo=# SELECT 'Cn1cnc2c1c(=O)n(C)c(=O)n2C' @ ('CN1C=NC2=C1C(=O)N(C)C(=O)N2C', 'MAS') :: bingo.exact;
?column?
----------
t
(1 row)
But when we try similarity search we get extremely low Tanimoto Coefficient.
foo=# SELECT bingo.getsimilarity('Cn1cnc2c1c(=O)n(C)c(=O)n2C', 'CN1C=NC2=C1C(=O)N(C)C(=O)N2C', 'tanimoto');
getsimilarity
---------------
0.21875
(1 row)
I assume it is due the way of handling aromaticity:
from indigo import *
from indigo_renderer import *
indigo = Indigo()
renderer = IndigoRenderer(indigo)
indigo.setOption("render-output-format", "png")
indigo.setOption("render-image-size", 200, 250);
indigo.setOption("render-background-color", 1.0, 1.0, 1.0);
m1 = indigo.loadMolecule('CN1C=NC2=C1C(=O)N(C)C(=O)N2C')
renderer.renderToFile(m1, "caffeine_m1.png");
m2 = indigo.loadMolecule('Cn1cnc2c1c(=O)n(C)c(=O)n2C')
renderer.renderToFile(m2, "caffeine_m2.png");
Hello everyone,
We are getting this error after upgrade to indigo 1.1.11, Platform is Linux 64 running indigo via mono .net wrapper:
Stacktrace:
at <0xffffffff>
at (wrapper managed-to-native) com.ggasoftware.indigo.LibraryLoader/LinuxLoader.dlclose (intptr) <0xffffffff>
at com.ggasoftware.indigo.LibraryLoader.FreeLibrary (intptr) <0x0007f>
at com.ggasoftware.indigo.IndigoDllLoader.Finalize () <0x000c7>
at (wrapper runtime-invoke) object.runtime_invoke_virtual_void__this__ (object,intptr,intptr,intptr) <0xffffffff>
Native stacktrace:
/opt/mono/bin/mono() [0x4942c6]
/lib64/libpthread.so.0(+0xf500) [0x7fceafec4500]
/lib64/libc.so.6(gsignal+0x35) [0x7fceafb548a5]
/lib64/libc.so.6(abort+0x175) [0x7fceafb56085]
/lib64/libc.so.6(+0x707b7) [0x7fceafb927b7]
/lib64/libc.so.6(+0x760e6) [0x7fceafb980e6]
/lib64/libc.so.6(+0x78c13) [0x7fceafb9ac13]
/tmp/GGA_indigo/indigo-dotnet/1.1.4933.3712/Linux/x64/libindigo.so(+0xb7dc1) [0x7fce9f213dc1]
/tmp/GGA_indigo/indigo-dotnet/1.1.4933.3712/Linux/x64/libindigo.so(+0xb8ed7) [0x7fce9f214ed7]
/tmp/GGA_indigo/indigo-dotnet/1.1.4933.3712/Linux/x64/libindigo.so(+0xb9321) [0x7fce9f215321]
/lib64/libc.so.6(__cxa_finalize+0x9d) [0x7fceafb5813d]
/tmp/GGA_indigo/indigo-dotnet/1.1.4933.3712/Linux/x64/libindigo.so(+0x88ce3) [0x7fce9f1e4ce3]
Debug info from gdb:
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
The documentation can actually be found at http://lifescience.opensource.epam.com/indigo/ the existing links take me to http://www.epam.com/ (with no clear link to the actual information)
I downloaded the project and converted the indigo-depict solution to a Visual Studio 2010 solution. When I attempted to build I go 10 link errors. The problem seems to be a conflict between debug and release libraries. The solution builds and links in Release mode.
tinyxml.lib(tinyxml.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
Error occurs while I update the postgresql database, how to solve it ? Thank you !
running
python build_scripts/indigo-release-libs.py --preset=linux64
fails with the following:
(tried with master and indigo-1.1-rc.zip as well, same effect)
[...]
CMakeFiles/dlopen-test.dir/tests/c/dlopen-test.c.o:dlopen-test.c:(.text.startup+0x266): more undefined references to `dlsym' follow
CMakeFiles/dlopen-test.dir/tests/c/dlopen-test.c.o: In function `main':
dlopen-test.c:(.text.startup+0x2c1): undefined reference to `dlclose'
dlopen-test.c:(.text.startup+0x2d0): undefined reference to `dlclose'
collect2: ld returned 1 exit status
make[2]: *** [dist/Linux/x64/shared/dlopen-test] Error 1
make[1]: *** [indigo/api/CMakeFiles/dlopen-test.dir/all] Error 2
make: *** [all] Error 2
[ 4%] Built target z
[ 12%] Built target common
[ 13%] Built target tinyxml
[ 20%] Built target graph
[ 32%] Built target molecule
[ 38%] Built target reaction
[ 42%] Built target layout
Linking C executable ../../dist/Linux/x64/shared/dlopen-test
CMakeFiles/dlopen-test.dir/tests/c/dlopen-test.c.o: In function `dlOpenWithCheck':
dlopen-test.c:(.text+0x7): undefined reference to `dlopen'
dlopen-test.c:(.text+0x19): undefined reference to `dlerror'
CMakeFiles/dlopen-test.dir/tests/c/dlopen-test.c.o: In function `main':
dlopen-test.c:(.text.startup+0x10e): undefined reference to `dlclose'
dlopen-test.c:(.text.startup+0x15f): undefined reference to `dlsym'
dlopen-test.c:(.text.startup+0x1cb): undefined reference to `dlsym'
dlopen-test.c:(.text.startup+0x1dd): undefined reference to `dlsym'
dlopen-test.c:(.text.startup+0x244): undefined reference to `dlsym'
dlopen-test.c:(.text.startup+0x256): undefined reference to `dlsym'
CMakeFiles/dlopen-test.dir/tests/c/dlopen-test.c.o:dlopen-test.c:(.text.startup+0x266): more undefined references to `dlsym' follow
CMakeFiles/dlopen-test.dir/tests/c/dlopen-test.c.o: In function `main':
dlopen-test.c:(.text.startup+0x2c1): undefined reference to `dlclose'
dlopen-test.c:(.text.startup+0x2d0): undefined reference to `dlclose'
collect2: ld returned 1 exit status
make[2]: *** [dist/Linux/x64/shared/dlopen-test] Error 1
make[1]: *** [indigo/api/CMakeFiles/dlopen-test.dir/all] Error 2
make: *** [all] Error 2
[ 4%] Built target z
[ 12%] Built target common
[ 13%] Built target tinyxml
[ 20%] Built target graph
[ 32%] Built target molecule
[ 38%] Built target reaction
[ 42%] Built target layout
Linking C executable ../../dist/Linux/x64/shared/dlopen-test
CMakeFiles/dlopen-test.dir/tests/c/dlopen-test.c.o: In function `dlOpenWithCheck':
dlopen-test.c:(.text+0x7): undefined reference to `dlopen'
dlopen-test.c:(.text+0x19): undefined reference to `dlerror'
CMakeFiles/dlopen-test.dir/tests/c/dlopen-test.c.o: In function `main':
dlopen-test.c:(.text.startup+0x10e): undefined reference to `dlclose'
dlopen-test.c:(.text.startup+0x15f): undefined reference to `dlsym'
dlopen-test.c:(.text.startup+0x1cb): undefined reference to `dlsym'
dlopen-test.c:(.text.startup+0x1dd): undefined reference to `dlsym'
dlopen-test.c:(.text.startup+0x244): undefined reference to `dlsym'
dlopen-test.c:(.text.startup+0x256): undefined reference to `dlsym'
CMakeFiles/dlopen-test.dir/tests/c/dlopen-test.c.o:dlopen-test.c:(.text.startup+0x266): more undefined references to `dlsym' follow
CMakeFiles/dlopen-test.dir/tests/c/dlopen-test.c.o: In function `main':
dlopen-test.c:(.text.startup+0x2c1): undefined reference to `dlclose'
dlopen-test.c:(.text.startup+0x2d0): undefined reference to `dlclose'
collect2: ld returned 1 exit status
make[2]: *** [dist/Linux/x64/shared/dlopen-test] Error 1
make[1]: *** [indigo/api/CMakeFiles/dlopen-test.dir/all] Error 2
make: *** [all] Error 2
Traceback (most recent call last):
File "build_scripts/indigo-release-libs.py", line 72, in <module>
subprocess.check_call("make package", shell=True)
File "/usr/lib/python2.7/subprocess.py", line 511, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'make package' returned non-zero exit status 2
any idea why?
The following code can be used to reproduce the problem. Only the "reactantlist" part is written as CML to out buffer or file. The written CML data is not well formed.
const char* rxnV2 = "$RXN\r\nDiels Alder V2000\r\n \r\n\r\n 2 1\r\n$MOL\r\n\r\n\r\n\r\n 6 5 0 0 0 0 0 0 0 0999 V2000\r\n 0.6489 0.9959 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\r\n 0.0656 0.4125 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\r\n 0.0656 -0.4125 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\r\n 0.6489 -0.9959 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\r\n -0.6489 0.8250 0.0000 R1 0 0 0 0 0 0 0 0 0 0 0 0\r\n -0.6489 -0.8250 0.0000 R2 0 0 0 0 0 0 0 0 0 0 0 0\r\n 1 2 2 0 0\r\n 2 3 1 0 0\r\n 3 4 2 0 0\r\n 2 5 1 0 0\r\n 3 6 1 0 0\r\nM END\r\n$MOL\r\n\r\n\r\n\r\n 4 3 0 0 0 0 0 0 0 0999 V2000\r\n -0.2917 0.4125 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\r\n -0.2917 -0.4125 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\r\n 0.2917 0.9959 0.0000 R3 0 0 0 0 0 0 0 0 0 0 0 0\r\n 0.2917 -0.9959 0.0000 R4 0 0 0 0 0 0 0 0 0 0 0 0\r\n 1 2 2 0 0\r\n 1 3 1 0 0\r\n 2 4 1 0 0\r\nM END\r\n$MOL\r\n\r\n\r\n\r\n 10 10 0 0 0 0 0 0 0 0999 V2000\r\n -0.7145 0.4125 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\r\n -0.7145 -0.4125 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\r\n -0.0000 -0.8250 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\r\n 0.7145 -0.4125 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\r\n 0.7145 0.4125 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\r\n -0.0000 0.8250 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\r\n 1.4289 0.8250 0.0000 R3 0 0 0 0 0 0 0 0 0 0 0 0\r\n 1.4289 -0.8250 0.0000 R4 0 0 0 0 0 0 0 0 0 0 0 0\r\n -1.4289 0.8250 0.0000 R1 0 0 0 0 0 0 0 0 0 0 0 0\r\n -1.4289 -0.8250 0.0000 R2 0 0 0 0 0 0 0 0 0 0 0 0\r\n 1 2 2 0 0\r\n 2 3 1 0 0\r\n 3 4 1 0 0\r\n 4 5 1 0 0\r\n 5 6 1 0 0\r\n 6 1 1 0 0\r\n 5 7 1 0 0\r\n 4 8 1 0 0\r\n 1 9 1 0 0\r\n 2 10 1 0 0\r\nM END\r\n";
int rxn = indigoLoadReactionFromBuffer(rxnV2, strlen(rxnV2) + 1);
int bufHandle = indigoWriteBuffer();
int saver = indigoCreateSaver(bufHandle, "cml");
indigoAppend(saver, rxn);
indigoClose(saver);
char* out;
int outSize = 0;
char* tempBuffer;
if((indigoToBuffer(bufHandle, &tempBuffer, &outSize) > 0) && (outSize > 0))
{
out = new char[outSize];
memcpy_s(out, outSize, tempBuffer, outSize);
}
The output is:
<?xml version="1.0" ?>
<cml>
<reaction title="Diels Alder V2000">
<reactantList>
<molecule title="">
<atomArray>
<atom id="a0" elementType="C"
x2="0.648900" y2="0.995900"/>
<atom id="a1" elementType="C"
x2="0.065600" y2="0.412500"/>
<atom id="a2" elementType="C"
x2="0.065600" y2="-0.412500"/>
<atom id="a3" elementType="C"
x2="0.648900" y2="-0.995900"/>
<atom id="a4" elementType="R1"
running build_scripts/indigo-release-libs.py
fails due to a test-related file not being checked in to the repository. Commenting out any test-related lines from api/{,plugins/inchi/,renderer}CMakeLists.txt
works around this problem, but obviously is not the most advantageous.
I think the code that renders a reaction file to CDXML is missing from: "indigo/render2d/src/render_cdxml.cpp".
The method RenderParamCdxmlInterface::render is responsible for rendering CDXML format for both molecules and reactions but the code only considers params.mols structure. There is no usage of params.rxns that contains reaction components.
To reproduce:
The following code returns a NULL pointer for inchikey:
int mol = indigoLoadMoleculeFromString("C1CCCCC1");
const char* inchi = indigoInchiGetInchi(mol); // InChI=1S/C6H12/c1-2-4-6-5-3-1/h1-6H2
const char* inchik = indigoInchiGetInchiKey(inchi); // NULL pointer
The problem lies in indigoInchiGetInchiKey method of indigo_inchi_api.cpp file. The passed in inchi_string is somehow assigned to self.tmp_string which is cleared for output in IndigoInchi::InChIKey method of indigo_inchi_core.cpp.
Hello
When using indigo-depic the 2D depiction is getting cropped.
Here is a test case.
indigo-depict - "CN1CC[C@]2([C@@H]1C[C@@H](CC2)O)C3=CC(=C(C=C3)OC)OC" test.png
I tried playing with margins and pixels without success.
Thanks
hello everyone,how can i use cmake create VS C++ project?TH'X ALL
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.