Entropy-driven partitioning of the hierarchical protein space