File tree Expand file tree Collapse file tree 4 files changed +41
-5
lines changed
Expand file tree Collapse file tree 4 files changed +41
-5
lines changed Original file line number Diff line number Diff line change @@ -84,13 +84,20 @@ Run the Java image like this:
8484
8585The CLASSPATH environment variable is already defined to include the RDKit library.
8686You'll need to add your own classes and/or libraries to the CLASSPATH.
87- To do a simple test with the java image using a simple Java class that can be found in the java_src directory:
87+ To do a simple test with the java image using simple Java classes that can be found in the java_src directory first compile
88+ the classes like this:
8889```
89- docker run -it --rm -v $PWD/java_src:/example:Z -u root informaticsmatters/rdkit-java-debian:<tag_name> sh -c 'cd /example && ./run.sh'
90- RDKit version: 2018.03.1.dev1
90+ $ docker run -it --rm -v $PWD/java_src:/example:Z informaticsmatters/rdkit-build-debian:<tag_name> sh -c 'cd /example && ./compile.sh'
91+ ```
92+ Then run like this:
93+ ```
94+ $ docker run -it --rm -v $PWD/java_src:/example:Z informaticsmatters/rdkit-java-debian:<tag_name> sh -c 'cd /example && ./run.sh'
95+ RDKit version: 2020.09.3
9196Read smiles: c1ccccc1 Number of atoms: 6
92- RDKit version: 2020.03.1
93- Mol: org.RDKit.RWMol@77459877
97+ RDKit version: 2020.09.3
98+ Mol: org.RDKit.RWMol@5b2133b1
99+ RDKit version: 2020.09.3
100+ MorganFP: 4294967295
94101```
95102
96103Javadocs are built into ` /rdkit/Code/JavaWrappers/gmwrapper/doc ` . Since the 2019_09 release a ` javadocs.tgz ` file is created in the
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ export CLASSPATH=.:$CLASSPATH
4+
5+ javac foo/* .java
6+
Original file line number Diff line number Diff line change 1+ package foo ;
2+
3+ import org .RDKit .*;
4+
5+ public class MorganFP {
6+
7+ public static void main (String [] args ) {
8+
9+ System .loadLibrary ("GraphMolWrap" );
10+
11+ System .out .println ("RDKit version: " + RDKFuncs .getRdkitVersion ());
12+
13+ String smiles = "Cc1ccccc1" ;
14+ RWMol m = RWMol .MolFromSmiles (smiles );
15+
16+
17+ SparseIntVectu32 fp = RDKFuncs .MorganFingerprintMol (m , 2 );
18+
19+ System .out .println ("MorganFP: " + fp .size ());
20+ }
21+ }
Original file line number Diff line number Diff line change @@ -5,3 +5,5 @@ export CLASSPATH=.:$CLASSPATH
55java foo/Example1
66
77java foo/Standardize
8+
9+ java foo/MorganFP
You can’t perform that action at this time.
0 commit comments