Hi @kbisikalo
If I understood well, you are trying to calculate the intraset list of 1NN for a dataset of molecules. This can be easily achieved using the RDKit nodes. Please find attached an alternative workflow, at least for the beginning of what you had implemented (I didn’t analyze further but please let us know if you need extra help).
20210428_Pikairos_Similarity_Distance_RDKIT_Alternative.knwf (28.1 KB)
The workflow takes a couple of minutes to run in a good laptop (12 cores) on the whole 41K molecules data set.
Hope this helps.
Best
Ael