Metal binding dictates conformation and function of the amyloid precursor protein (APP) E2 domain.