Molecular simulations of mutually exclusive folding in a two-domain protein switch.