I just uploaded a new RDKit node called "RDKit Molecule Extractor", which comes in handy when it is necessary to split up multiple disconnected molecules contained in a mol block, e.g. a result from a Molecule Sketcher. It uses the RDKit method getMolFrags(...) to do the work and is very flexible in handling all types of situations.
Node Description:
Splits up disconnected fragment molecules contained in a single RDKit molecule and extracts these molecules into separate cells. If the input molecule contains only one fragment or if the input cell is empty (missing), the input cell will be used as result with the appropriate reference column. It can either be used with an input table or based on flow variable input for the molecules and their format. Supported molecule formats are RDKit Mol cells (when connecting an input table), SMILES, MOL and SDF.
Please be aware that auto-conversion (e.g for SMILES input) may fail when connecting an input table.
The Advanced Tab offers different options to treat conversion failures, empty input cells and zero-atom molecules (empty molecules). You may configure the node to fail, to generate empty cells with or without warning, or to skip the input with or without warning.
The node can be used for instance after a Quickform Molecule Input node, which brings up a sketcher in the KNIME Web Portal. When the user draws multiple molecules at once this node will split up the users input into multiple molecules.
Check it out, and if you find any bugs or anything strange, please let me know. It will be available in the next nightly build.
Kind regards,
Manuel Schwarze