Update pair.py

add calc_distance