A theoretical study of the catalytic mechanism of formate dehydrogenase.