Flexibility modulates the catalytic activity of a thermostable enzyme: key information from optical spectroscopy and molecular dynamics simulation.