A fast algorithm to calculate shortest distances between linear segments and angular averages for soft repulsive potentials depending on shortest dista