Code Monkey home page Code Monkey logo

neo4j-rdkit's Issues

XCode10 CI tests are failing

I'm not enough of a Java wizard to figure out what's going on here and don't have an XCode10 machine available to try on my own, but the Travis-CI builds for XCode10 are regularly failing. Here's an example from the dev branch:
https://travis-ci.com/rdkit/neo4j-rdkit/jobs/232173334

@evgerher @sarmbruster : any thoughts on how we can deal with this? Given that the other CI builds are passing, I'm happy to either ignore it or disable the XCode10 builds, but that's not a great long-term solution. Something seems to have changed that is interfering with Evgeniy's code that extracts native libraries from the jar file and saves a temp copy.

Creating a mol from inchi (String)

Can anyone help me how to create a mol from an inchi passed as a string? I only see MolToInchi method in the API. Thank you so much !

mvn package error

Hello,

When I run "mvn package" the build is failing with the following error message:
[INFO] --- maven-shade-plugin:3.2.4:shade (default) @ rdkit-index --- [ERROR] The project main artifact does not exist. This could have the following [ERROR] reasons: [ERROR] - You have invoked the goal directly from the command line. This is not [ERROR] supported. Please add the goal to the default lifecycle via an [ERROR] <execution> element in your POM and use "mvn package" to have it run. [ERROR] - You have bound the goal to a lifecycle phase before "package". Please [ERROR] remove this binding from your POM such that the goal will be run in [ERROR] the proper phase. [ERROR] - You removed the configuration of the maven-jar-plugin that produces the main artifact. [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 41.605 s [INFO] Finished at: 2022-06-03T10:34:40+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.2.4:shade (default) on project rdkit-index: Failed to create shaded artifact, project main artifact does not exist. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

the system information are:

  • OS : Windows 10
  • Apache Maven : 3.8.5
  • Java : 11.0.15.1

Regards.

neo4j-rdkit plugin : org.rdkit.neo4j.bin.LibraryLoaderLifecycle@6094de13' failed to initialize

I used the neo4j-rdkit plugin in (neo4j desktop) windows environment without any issue. However, I tried the the same for the neo4j-rdkit plugin within the neo4j docker image but with no success. I have found here another related post but unfortunately it doesn't solve my issue. Other neo4j plugins such as APOC, GDS, etc. worked fine with me.

Here the detailed error:

`docker run --user="$(id -u):$(id -g)" --publish=7474:7474 --publish=7687:7687 -e NEO4J_dbms_security_procedures_unrestricted=apoc.,gds.,n10s.,rdkit. -e NEO4J_rdkit_index_sanitize=true --volume=$HOME/data/neo4j/data:/var/lib/neo4j/data --volume=$HOME/data/neo4j/logs:/var/lib/neo4j/logs --volume=$HOME/data/neo4j/plugins:/var/lib/neo4j/plugins --volume=$HOME/data/neo4j/import:/var/lib/neo4j/import --name neo4j neo4j

2022-02-07 17:13:52.340+0000 INFO Starting...
2022-02-07 17:13:52.753+0000 INFO This instance is ServerId{f2bc4375} (f2bc4375-4ffd-45e6-ab0a-9b108d516b64)
2022-02-07 17:13:54.369+0000 INFO ======== Neo4j 4.4.3 ========
2022-02-07 17:13:54.722+0000 INFO Loading libraries from JAR
2022-02-07 17:13:54.839+0000 INFO trying to load native library /tmp/rdkit-153718487753989773/libGraphMolWrap.so
2022-02-07 17:13:54.854+0000 ERROR Failed to start Neo4j on 0.0.0.0:7474.
java.lang.RuntimeException: Error starting Neo4j database server at /data/databases
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:228) ~[neo4j-4.4.3.jar:4.4.3]
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:181) ~[neo4j-4.4.3.jar:4.4.3]
at org.neo4j.server.CommunityBootstrapper.createNeo(CommunityBootstrapper.java:36) ~[neo4j-4.4.3.jar:4.4.3]
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:142) [neo4j-4.4.3.jar:4.4.3]
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:95) [neo4j-4.4.3.jar:4.4.3]
at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:34) [neo4j-4.4.3.jar:4.4.3]
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.rdkit.neo4j.bin.LibraryLoaderLifecycle@6094de13' failed to initialize. Please see the attached cause exception "/tmp/rdkit-153718487753989773/libGraphMolWrap.so: libfreetype.so.6: cannot open shared object file: No such file or directory".
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:424) ~[neo4j-common-4.4.3.jar:4.4.3]
at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:65) ~[neo4j-common-4.4.3.jar:4.4.3]
at org.neo4j.kernel.extension.AbstractExtensions.init(AbstractExtensions.java:77) ~[neo4j-kernel-4.4.3.jar:4.4.3]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:403) ~[neo4j-common-4.4.3.jar:4.4.3]
at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:65) ~[neo4j-common-4.4.3.jar:4.4.3]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:101) ~[neo4j-common-4.4.3.jar:4.4.3]
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:219) ~[neo4j-4.4.3.jar:4.4.3]
... 5 more
Caused by: java.lang.UnsatisfiedLinkError: /tmp/rdkit-153718487753989773/libGraphMolWrap.so: libfreetype.so.6: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load0(Native Method) ~[?:?]
at java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442) ~[?:?]
at java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498) ~[?:?]
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694) ~[?:?]
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:2627) ~[?:?]
at java.lang.Runtime.load0(Runtime.java:768) ~[?:?]
at java.lang.System.load(System.java:1837) ~[?:?]
at org.rdkit.neo4j.bin.LibraryLoaderLifecycle.lambda$loadNativeLibraries$0(LibraryLoaderLifecycle.java:75) ~[rdkit-index-1.2.0-4.2.jar:?]
at java.util.ArrayList.forEach(ArrayList.java:1541) ~[?:?]
at org.rdkit.neo4j.bin.LibraryLoaderLifecycle.loadNativeLibraries(LibraryLoaderLifecycle.java:73) ~[rdkit-index-1.2.0-4.2.jar:?]
at org.rdkit.neo4j.bin.LibraryLoaderLifecycle.init(LibraryLoaderLifecycle.java:55) ~[rdkit-index-1.2.0-4.2.jar:?]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:403) ~[neo4j-common-4.4.3.jar:4.4.3]
at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:65) ~[neo4j-common-4.4.3.jar:4.4.3]
at org.neo4j.kernel.extension.AbstractExtensions.init(AbstractExtensions.java:77) ~[neo4j-kernel-4.4.3.jar:4.4.3]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:403) ~[neo4j-common-4.4.3.jar:4.4.3]
at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:65) ~[neo4j-common-4.4.3.jar:4.4.3]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:101) ~[neo4j-common-4.4.3.jar:4.4.3]
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:219) ~[neo4j-4.4.3.jar:4.4.3]`

error with docker ne4j / community edition

I attempt the following commands to start neo4j 4.1.3 CE with latest rdkit & apoc plugin

rm -r ~/docker_vols_neo4j_4.1.3

mkdir ~/docker_vols_neo4j_4.1.3
mkdir ~/docker_vols_neo4j_4.1.3/plugins
mkdir ~/docker_vols_neo4j_4.1.3/deb
mkdir ~/docker_vols_neo4j_4.1.3/data

cp ~/Downloads/neo4j_rdkit_docker/plugins/apoc-4.1.0.2-all.jar ~/docker_vols_neo4j_4.1.3/plugins/
cp ~/Downloads/neo4j_rdkit_docker/plugins/rdkit-index-1.1.0-SNAPSHOT-4.1.jar ~/docker_vols_neo4j_4.1.3/plugins/
cp ~/Downloads/neo4j_rdkit_docker/deb/libpng16-16_1.6.36-6_amd64.deb ~/docker_vols_neo4j_4.1.3/deb/
cp ~/Downloads/neo4j_rdkit_docker/deb/libfreetype6_2.9.1-3+deb10u2_amd64.deb ~/docker_vols_neo4j_4.1.3/deb/
cp ~/Downloads/neo4j_rdkit_docker/deb/install_debs.sh ~/docker_vols_neo4j_4.1.3/deb/

chmod 644 ~/docker_vols_neo4j_4.1.3/plugins/.jar
chmod 644 ~/docker_vols_neo4j_4.1.3/deb/
.deb
chmod 755 ~/docker_vols_neo4j_4.1.3/deb/*.sh

docker run --rm
-p 127.0.0.1:7474:7474
-p 127.0.0.1:7687:7687
-v ~/docker_vols_neo4j_4.1.3/plugins:/var/lib/neo4j/plugins
-v ~/docker_vols_neo4j_4.1.3/data:/var/lib/neo4j/data
-e NEO4J_AUTH=none
-e NEO4J_dbms_memory_pagecache_size=8G
-e NEO4J_dbms_memory_heap_max__size=16G
-e NEO4J_dbms_security_procedures_unrestricted=\*
-e EXTENSION_SCRIPT=/deb/install_debs.sh
-e NEO4J_rdkit_index_sanitize=true
--user=$(id -u):$(id -g)
neo4j:4.1.3

and receive the following error:

Directories in use:
home: /var/lib/neo4j
config: /var/lib/neo4j/conf
logs: /logs
plugins: /var/lib/neo4j/plugins
import: /var/lib/neo4j/import
data: /var/lib/neo4j/data
certificates: /var/lib/neo4j/certificates
run: /var/lib/neo4j/run
Starting Neo4j.
APOC couln't set a URLStreamHandlerFactory since some other tool already did this (e.g. tomcat). This means you cannot use s3:// or hdfs:// style URLs in APOC. This is caused by a limitation of the JVM which we cannot fix.
2020-11-03 20:12:48.858+0000 INFO Starting...
2020-11-03 20:12:51.198+0000 INFO ======== Neo4j 4.1.3 ========
2020-11-03 20:12:51.641+0000 INFO Loading libraries from JAR
2020-11-03 20:12:51.775+0000 INFO trying to load native library /tmp/rdkit-5402050139939947324/libGraphMolWrap.so
2020-11-03 20:12:51.788+0000 ERROR Failed to start Neo4j on dbms.connector.http.listen_address, a socket address. If missing port or hostname it is acquired from dbms.default_listen_address. Error starting Neo4j database server at /data/databases
java.lang.RuntimeException: Error starting Neo4j database server at /data/databases
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:198)
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:158)
at org.neo4j.server.CommunityBootstrapper.createNeo(CommunityBootstrapper.java:36)
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:117)
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:87)
at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:35)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.rdkit.neo4j.bin.LibraryLoaderLifecycle@4c361f63' failed to initialize. Please see the attached cause exception "/tmp/rdkit-5402050139939947324/libGraphMolWrap.so: libfreetype.so.6: cannot open shared object file: No such file or directory".
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:424)
at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:65)
at org.neo4j.kernel.extension.AbstractExtensions.init(AbstractExtensions.java:76)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:403)
at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:65)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:101)
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:189)
... 5 more
Caused by: java.lang.UnsatisfiedLinkError: /tmp/rdkit-5402050139939947324/libGraphMolWrap.so: libfreetype.so.6: cannot open shared object file: No such file or directory
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442)
at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498)
at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2627)
at java.base/java.lang.Runtime.load0(Runtime.java:768)
at java.base/java.lang.System.load(System.java:1837)
at org.rdkit.neo4j.bin.LibraryLoaderLifecycle.lambda$loadNativeLibraries$0(LibraryLoaderLifecycle.java:78)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.rdkit.neo4j.bin.LibraryLoaderLifecycle.loadNativeLibraries(LibraryLoaderLifecycle.java:76)
at org.rdkit.neo4j.bin.LibraryLoaderLifecycle.init(LibraryLoaderLifecycle.java:58)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:403)
... 11 more
2020-11-03 20:12:51.789+0000 INFO Neo4j Server shutdown initiated by request

modification of behaviour when a new structure node is created and output of a structure search ("preferred name" / "name"))

CREATE (n:Entity:Chemical:Compound:Structure {
luri: 'test1',
preferred_name: 'chloro benzene',
smiles: 'ClC1=CC=CC=C1'})
creates a node the chemical structure for chloro benzene:

The query
CALL org.rdkit.search.exact.smiles(['Chemical', 'Structure'], 'ClC1=CC=CC=C1')
yields:

{ "columns" : [ "name", "luri", "canonical_smiles" ], "data" : [ [ "chloro benzene", "test1", "Clc1ccccc1" ] ] }

in CREATE the property "preferred_name" was set, query delivers a property "name". Suggestion: eliminate "name" from output of any search query (org.rdkit.search.exact.smiles, org.rdkit.search.exact.mol, org.rdkit.search.substructure.smiles, org.rdkit.search.substructure.mol). treat preferred_name in CREATE statement as any other property

Release for Neo4j 5.x

Would it be possible to update this for Neo4j 5.x?

I believe some full-text indexing commands also need to fixed to be compatible with the new version.

add support for sanitize=false in MolFromSmiles

For example, a 5 coordinate neutral carbon will generate errors if you attempt to sanitize it normally, but can be handled if you turn off the appropriate pieces. For example:

In [2]: m = Chem.MolFromSmiles('ClC(C)(C)Br')
[04:56:25] Explicit valence for atom # 1 C, 5, is greater than permitted

In [3]: m = Chem.MolFromSmiles('ClC(C)(C)Br',sanitize=False)

In [4]: Chem.SanitizeMol(m,Chem.SanitizeFlags.SANITIZE_ALL^Chem.SanitizeFlags.SANITIZE_PROPERTIES)
Out[4]: rdkit.Chem.rdmolops.SanitizeFlags.SANITIZE_NONE

In [5]: m.HasSubstructMatch(Chem.MolFromSmarts('ClCBr'))
Out[5]: True

change node creation behaviour ("luri")

CREATE (n:Entity:Chemical:Compound:Structure {
luri: 'test1',
preferred_name: 'chloro benzene',
smiles: 'ClC1=CC=CC=C1'})
creates a node the chemical structure for chloro benzene:

The property "luri" is supposed to be a unique resource identifier for the node (originally: legacy uri). I believe it makes sense to have such resource identifier on nodes bearing structures. Suggestion: if luri-attribute is not deliberately set by user upon data ingestion the plugin should create the luri-property and assign a UUID to it

The query
CALL org.rdkit.search.exact.smiles(['Chemical', 'Structure'], 'ClC1=CC=CC=C1')
yields:

{ "columns" : [ "name", "luri", "canonical_smiles" ], "data" : [ [ "chloro benzene", "test1", "Clc1ccccc1" ] ] }

in CREATE the property "preferred_name" was set, query delivers a property "name". Suggestion: eliminate "name" from output of any search query (org.rdkit.search.exact.smiles, org.rdkit.search.exact.mol, org.rdkit.search.substructure.smiles, org.rdkit.search.substructure.mol). treat preferred_name in CREATE statement as any other property

error on CALL org.rdkit.search.createIndex(['Structure', 'Chemical'])

CALL org.rdkit.search.createIndex(['Structure', 'Chemical'])

yields:

Neo.ClientError.Procedure.ProcedureCallFailed

Failed to invoke procedure org.rdkit.search.createIndex: Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.rdkit.neo4j.procedures.SubstructureSearch

did the syntax change from 3.5 to 4.1?

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.