Structural transitions of transmembrane helix 6 in the formation of metarhodopsin I.