Updated the collision algorithm. Only sorting atomID now.