Аннотация:To solve the problem of the secondary protein structure recognition, an algorithm for amino-acid subsequences clustering is developed. To reviel clusters it uses the pairwise distances between the subsequences. The algorithm does not require the complete pairwise matrix. This main distinction of it implies the reduction of the computational complexity. To run the clustering, it needs no more than the ranks of the distances between subsequences. The algorithm is illustrated using synthetic data along with the amino-acid sequences from the UniProt KB Database.