Skip to content

Commit 7bf7a0f

Browse files
authored
support showing version info in the preferences page (#96)
show chirality labels in the renderers bump nodes version
1 parent ac522de commit 7bf7a0f

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

org.rdkit.knime.nodes/src/org/rdkit/knime/nodes/highlighting/RDKitHighlightingNodeModel.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
import org.RDKit.DrawColour;
6161
import org.RDKit.Int_Vect;
6262
import org.RDKit.MolDraw2DSVG;
63+
import org.RDKit.MolDrawOptions;
6364
import org.RDKit.ROMol;
6465
import org.knime.base.data.xml.SvgCell;
6566
import org.knime.base.data.xml.SvgCellFactory;
@@ -417,6 +418,8 @@ public DataCell[] process(final InputDataInfo[] arrInputDataInfo, final DataRow
417418
}
418419

419420
final MolDraw2DSVG molDrawing = markForCleanup(new MolDraw2DSVG(300, 300), lUniqueWaveId);
421+
MolDrawOptions opts = molDrawing.drawOptions();
422+
opts.setAddStereoAnnotation(true);
420423
molDrawing.drawMolecule(mol, "", ivAtoms, ivBonds, mapRdkitAtomColors, mapRdkitBondColors);
421424
molDrawing.finishDrawing();
422425

org.rdkit.knime.nodes/src/org/rdkit/knime/nodes/preferences/RDKitNodesPreferencePage.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
import java.lang.reflect.Field;
5555
import java.lang.reflect.Method;
5656

57+
import org.RDKit.RDKFuncs;
5758
import org.eclipse.core.runtime.IConfigurationElement;
5859
import org.eclipse.core.runtime.IExtension;
5960
import org.eclipse.core.runtime.IExtensionPoint;
@@ -137,7 +138,7 @@ public ImageData getImageData() {
137138

138139
// We use the pref store of the UI plugin
139140
setPreferenceStore(RDKitNodePlugin.getDefault().getPreferenceStore());
140-
setDescription("This section contains sub sections to control preferences for RDKit Nodes.");
141+
setDescription("This section contains sub sections to control preferences for the RDKit Nodes.\nThe nodes are using version "+RDKFuncs.getRdkitVersion()+" of the RDKit backend.");
141142
}
142143

143144
/** {@inheritDoc} */

org.rdkit.knime.types/rdkit-chemsrc/org/rdkit/knime/types/RDKitMolValueRenderer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ else if (value instanceof SmartsValue) {
275275
MolDrawOptions opts = molDrawing.drawOptions();
276276
// we've already prepared the molecule appropriately, so don't try again:
277277
opts.setPrepareMolsBeforeDrawing(false);
278+
opts.setAddStereoAnnotation(true);
278279
molDrawing.drawMolecule((ROMol)mol);
279280
molDrawing.finishDrawing();
280281

0 commit comments

Comments
 (0)