A computational study of protein dynamics, structure ensembles, and functional mechanisms