I have generated a set of 3-dimensional structures of the peptide AGAGAG with different structures. Total number of PDB files are 300. I need to cluster the peptide structures based on their similarity. Is it possible to do Kmeans clustering and get the total number of clusters in Python? The issue is that the RMSD-based distance matrix requires reference PDB which is not available here. Kmeans does not do clustering based on the distance matrix.
First, there are versions of k-means that can handle k-medoids from distance data.
Second, there are plenty of clustering methods that are fine with distances (see e.g. hierarchical clustering). Is there a reason you don't want to use this?
Third, is there a reason that you need to cluster them based on their similarity?
Fourth, you may be interested in approaches like FoldSeek that describe differences between structures using a structural alphabet to yield a sequence, making it a lot easier to do structural comparisons. Your example is admittedly a lot simpler than what they are trying to do with full proteins, but nonetheless may hold some points of interest. It is being used for larger-scale protein clustering tools like ProteinCartography.