I have a matrix of descriptors and I want to use GetEuclideanDistMat to get the pairwise Euclidean distances. Once I compute it, I need to create a full matrix (number of compounds x number of compounds) from the 1D vector. I’m currently using
lower = GetEuclideanDistMat(descriptors.values) n = int(np.sqrt(len(lower)*2)) + 1 mask = np.tri(n, dtype=bool, k=-1) distances = np.zeros((n, n), dtype=float) distances[mask] = lower It seems to be working but I’m getting some weird results (very small distances for very different compounds), so I’m guessing I’m doing something wrong with the code above. Any suggestion?
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss