How to use a group loop and a recursive loop together?


I am trying to make a group loop and a recursive loop working together but without success.

Below is what I would like to achieve.

In my table, I have a column containing 20'000 molecules (unique),  a second column containing 4 different scaffold numbers (this means 5'000 molecules per scaffold) and a third column containing the building blocks used on each scaffold to make the final molecules.

I would like to make a diverse selections of 100 compounds per scaffold (using RDKit Diversity Picker) but I do not want to use twice the same building blocks across the selections. Finally, I should get 400 molecules from 4 different scaffolds and always decorated with a unique building block.

I tried with 2 loops. A group loop; in order to group molecules per scaffold number. And since I need the recursive info (selected building blocks at each iteration), I tried to use the recursive loop node as well. Unfortunately, it does not work, it seems that I would need a combination of both loops (group loop with a recursive option) in one single loop and maybe that should work.

Any idea better idea?

Thank you.


Hi Julien,


this is actually not possible. Recursive Loops can only works with themselves. Hence you need to consider loops as brackets.There must always be a matching loop start and a loop end node.

Hence, you need to exchange the order of the recursive and the loop end node.

Best wishes, Iris

1 Like