Conformational diversity analysis reveals three functional mechanisms in proteins