Periodic boundary for particles