Added the calc_ave_dist() method.
This doesn't work yet and has been cut and paste from an external relax script.
Authored by: bugman 2009-04-10
Parent: [r9006]
Child: [r9008]