# Problems with threshold parameter of RDKit MCS node

**URL:** <https://forum.knime.com/t/problems-with-threshold-parameter-of-rdkit-mcs-node/70738>\
**Category:** Cheminformatics\
**Created:** [July 18, 2023, 12:46pm UTC](https://forum.knime.com/t/problems-with-threshold-parameter-of-rdkit-mcs-node/70738 "2023-07-18T12:46:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gcincilla](https://forum-cdn.knime.com/user_avatar/forum.knime.com/gcincilla/32/41083_2.png) [@gcincilla](https://forum.knime.com/u/gcincilla)\
**Post date:** [July 18, 2023, 12:46pm UTC](https://forum.knime.com/t/problems-with-threshold-parameter-of-rdkit-mcs-node/70738/1 "2023-07-18T12:46:23Z")

</div>

Dear KNIME and RDKit users,

I have a problem with the threshold parameter of the RDKit MCS node. In principle this parameter sets the fraction of molecules that the Maximum Common Substructure (MCS) must cover and ranges between 0.0 and 1.0.

As you can see from the **attached example workflow below** , if I run this node on a compound set having a common MCS of 28 atoms, it works as expected both if I run it with a threshold = 1.0 or a threshold = 0.5. If I run it with the same compound set where a couple of different compounds have been added, when I run it with a threshold = 1.0 I obtain an empty output. This is expected as I set up a threshold = 1.0, asking that MCS should cover all the compounds. Nevertheless, if l set the threshold to 0.5 I would expect to retrieve the MCS highlighted above, because more than 90% of the molecules share it. Unfortunately, I don’t retrieve any MCS in that case as the node gives an empty cell as output.

Am I missing something or is this a bug?

Thanks in advance for any help!

[rdkit\_mcs\_threshold\_problem.knwf](https://forum.knime.com/uploads/short-url/d8QVso8dZnJbRzsCDlr5gK4Sl4D.knwf) (78.5 KB)

---

<div class="post-metadata">

**Author:** ![ScottF](https://forum-cdn.knime.com/user_avatar/forum.knime.com/scottf/32/61316_2.png) [@ScottF](https://forum.knime.com/u/ScottF)\
**Post date:** [July 26, 2023, 8:39pm UTC](https://forum.knime.com/t/problems-with-threshold-parameter-of-rdkit-mcs-node/70738/2 "2023-07-26T20:39:10Z")

</div>

Hi @gcincilla -

Let me ask internally about this one (I’m not a chemist).

---

<div class="post-metadata">

**Author:** ![s.roughley](https://forum-cdn.knime.com/user_avatar/forum.knime.com/s.roughley/32/366_2.png) [@s.roughley](https://forum.knime.com/u/s.roughley)\
**Post date:** [July 27, 2023, 8:05am UTC](https://forum.knime.com/t/problems-with-threshold-parameter-of-rdkit-mcs-node/70738/3 "2023-07-27T08:05:06Z")

</div>

Possibly a question for @greglandrum or @manuelschwarze - it looks like either a bug in the RDKit node/library or a behaviour that isn’t intended to do what it sounds like it is intended to do.

Steve

---

<div class="post-metadata">

**Author:** ![greglandrum](https://forum-cdn.knime.com/user_avatar/forum.knime.com/greglandrum/32/680_2.png) [@greglandrum](https://forum.knime.com/u/greglandrum)\
**Post date:** [July 27, 2023, 12:29pm UTC](https://forum.knime.com/t/problems-with-threshold-parameter-of-rdkit-mcs-node/70738/4 "2023-07-27T12:29:41Z")

</div>

@gcincilla, this appears to be a bug in the underlying RDKit MCS code.  
I’ve filed the issue here: [partial MCS failure · Issue #6578 · rdkit/rdkit · GitHub](https://github.com/rdkit/rdkit/issues/6578)

Hopefully we’ll be able to get it fixed.

-greg

---

<div class="post-metadata">

**Author:** ![gcincilla](https://forum-cdn.knime.com/user_avatar/forum.knime.com/gcincilla/32/41083_2.png) [@gcincilla](https://forum.knime.com/u/gcincilla)\
**Post date:** [July 27, 2023, 12:55pm UTC](https://forum.knime.com/t/problems-with-threshold-parameter-of-rdkit-mcs-node/70738/5 "2023-07-27T12:55:39Z")

</div>

@greglandrum, thank you very much for checking that and for filing the issue on GitHub.  
Gio

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [October 25, 2023, 12:56pm UTC](https://forum.knime.com/t/problems-with-threshold-parameter-of-rdkit-mcs-node/70738/6 "2023-10-25T12:56:30Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
