script to calculate pairwise distances
slightly modified from PyMOL wiki