An activity transition from NADH dehydrogenase to NADH oxidase during protein denaturation