Functional significance of evolving protein sequence in dihydrofolate reductase from bacteria to humans