New/Updated RDKit sample workflows

Dear all,

I finally managed to update and upload the RDKit sample workflows. You can find the new workflows in folder 99_Community/03_RDKit on the EXAMPLES server.

These were built and validated using the most recent nightly of the RDKit nodes and v3.3 of the KNIME Analytics Platform but some may work with older versions as well.

Any feedback or questions are welcome as are suggestions for additional workflows that would be helpful.





I was having a look at the Working_In_3D workflow you uploaded amd cannot seem to get the python scripting node to work.  I've downloaded RDKit via Conda and have set the Knime preferences to point to the Python exe in the Conda env.  Knime seems to be Ok with this and doesn't complain.  I then try and run the workflow and get the following error in the console;

ERROR Python Script (1⇒1)  2:7        Execute failed: Error while loading python type extension RDKitMolDeserializer
Cause: DLL load failed: The specified module could not be found.
ERROR PythonKernel                    Traceback (most recent call last):
  File "D:\Knime_3_1\KNIME\plugins\org.knime.python_3.3.0.v201611242050\py\", line 1047, in <module>
  File "D:\Knime_3_1\KNIME\plugins\org.knime.python_3.3.0.v201611242050\py\", line 128, in run
    raise e
ImportError: Error while loading python type extension RDKitMolDeserializer
Cause: DLL load failed: The specified module could not be found.

I'm using a Win7 64 bit, Knime 3.3.1 and the latest conda build of RDKit python2.7

Any ideas what may be going wrong?




Hi Angus,

Do the RDKit KNIME nodes work for you if you don't use the python scripting node? I assume that the answer to this is "yes", but I have to ask anyway.

Next thing to try: if you launch the version of Python that you are running from inside of KNIME (start a cmd.exe window and run exactly the same commend that you provided in the KNIME preferences), can you import the RDKit there? You can test this by just doing: "from rdkit import Chem" from within that python shell.

If you get an error while doing that, please paste it in and we'll try and figure it out from there.





Hi Greg,

Thanks for getting back to me.  Normal RDKit nodes seem fine and work as expected.  I tried as you suggested and get the following error when trying 'from rdkit import Chem".

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

Python 2.7.13 |Anaconda 4.3.0 (64-bit)| (default, Dec 19 2016, 13:29:36) [MSC v.
1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: and
>>> from rdkit import Chem
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "d:\Anaconda\Install2\envs\py27\lib\site-packages\rdkit\", lin
e 2, in <module>
    from .rdBase import rdkitVersion as __version__
ImportError: DLL load failed: The specified module could not be found.

As an aside, if I first activate the enviroment in the cmd line (in my case 'activate py27'), then run python (using d:\Anaconda\Install2\envs\py27\python.exe), the rdkit commands are accepted with no issues.  I tried running the workflow with the enviroment activated but got the same error.





It makes sense that you need to activate the environment in order to use the RDKit python code. Setting up the environment has the side effect of setting your PATH properly so that the RDKit's DLLs can be found. Unfortunately the online walkthroughs that I have found for using conda with KNIME don't include this step (they all just use the python.exe from the environment directly).

The *easiest* solution is to not create a separate conda environment for using the RDKit and KNIME: you can just run `conda install` in the root environment and everything will work. This is frowned upon in the conda community, but I do it pretty frequently with software I need all the time like the RDKit.

I don't have easy access to a windows machine at the moment, but what you could try doing is setting up a "knime_python.bat" file that first activates the python environment and then calls python with the appropriate arguments. There are instructions that work for linux and the mac here:, but those won't be directly helpful under Windows.

If you give this a try and it works, please let me know, otherwise I will try to set something up when I am back at my windows machine tomorrow.







Hi Greg,

Many thanks for this suggestion, I've swapped my RDKit builds around so that the py3.5 version I had previously installed now runs in an enviroment.  Pointed knime to py2.7 in the 'root?' directly and this now works fine and runs the python script.

With regard to your second suggestion this sounds far too complex for a medicinal chemist to figure out!

Thanks again,



Glad to hear that it works now.


p.s. writing batch scripts is nowhere near as complicated as doing lead optimization. :-)