grantham_distance function

Grantham distance