How to determine Maximum distance

Dear all;

Do you know that how to set the Maximum distance between two points within a pair,triplet,quadruplet and obtain a Reasonable structure?

This is a big problem.It is connected to clusters.I do not understand it too though I have some materials.