Hi,
I would like to build a node that will run the Clean3D function on a molecule that I feed into it. I have found some sample code at https://www.chemaxon.com/forum/ftopic8409.html which I have adapted and entered into the 'Method body' pane of a Java snippet node. In the code below, $Molecule$ is the name of the column in which the structure is specified. The code is:
Dreiding d = new Dreiding();
d.init($Molecule$);
GradientOptimization g = new GradientOptimization(d);
g.setGradientRMSLimit(1e-3);
g.run();
if (!g.isOptimizationConverged()) {
throw new IllegalStateException("Optimization was not converged");
}
return d.getMoleculeWithLastUsedCoordinates();
The node won't compile though, because it cannot resolve the Dreiding and GradientOptimization data types.
How can I make these available to the Java snippet? I have tried adding knime-marvin.jar and jchemlib.jar to the list of additional libraries, to no avail.
Any help would be gratefully received.
Thanks in advance,
Chris