DBSCAN in domains with periodic boundary conditions