Clustering algorithms typically require inter-sample distances. Calculating this distance is an expensive O(𝑛 2 ) operation in terms of dataset size. The similarity matrix is internally converted to a distance matrix using linear operations for the molecule set to avoid this computational cost. This distance matrix is used by the clustering algorithm. AIMSim automatically detects the clustering algorithm. A non-Euclidean clustering method is chosen for binary fingerprints and the Euclidean method is chosen for arbitrary fingerprints. This task generates an output file containing the names of molecules in the different clusters in a serialized format (JSON). Additionally, if the molecule set is initialized with molecular properties, it generates a plot of the distribution of molecular properties in the different clusters. This plot enables visual comparison of the efficacy of the clustering. Ideally, a separation of the distributions in the molecular properties is desired.