Measuring evolutionary rates of proteins in a structural context