Hi Tim, Unfortunately I don't have decent example code for using the standardizer from Java. Normally I reference the tests, but in this case they are extremely minimal: https://github.com/rdkit/rdkit/blob/master/Code/JavaWrappers/gmwrapper/src-test/org/RDKit/MolStandardizeTest.java
I will try to make some time to improve the situation here with the goal of a) have better tests b) making it more obvious how to use the code from Java -greg On Thu, Dec 26, 2019 at 4:55 PM Tim Dudgeon <tdudgeon...@gmail.com> wrote: > I'm trying to get my head round using the new standardizer code from Java. > Looks like this should be accessible from the RDKFuncs class, but I'm > failing at stage 1. > > Simple example is: > > package org.exmple; > import org.RDKit.RDKFuncs;import org.RDKit.RWMol; > public class Simple { > > static { > System.loadLibrary("GraphMolWrap"); > } > > public static void main(String[] args) { > RWMol mol1 = RWMol.MolFromSmiles("CC"); > try { > RWMol mol2 = RDKFuncs.cleanup(mol1); > System.out.println(mol2.MolToSmiles()); > } catch (Exception ex) { > System.out.println("Exception! " + ex.getMessage()); > ex.printStackTrace(); > } > } > } > > Result is: > > Exception! null > org.RDKit.GenericRDKitException > at org.RDKit.RDKFuncsJNI.cleanup__SWIG_1(Native Method) > at org.RDKit.RDKFuncs.cleanup(RDKFuncs.java:5173) > at org.squonk.fragnet.Simple.main(Simple.java:15) > > Exception doesn't give much to go on! > > This is running against code on RDKit Release_2019_09 branch and using Java > 11. > > Has anyone got this working? > > Tim > > _______________________________________________ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss