Text this: Algorithm based on the Thomson problem for determination of equilibrium structures of metal nanoclusters