periodic boundaries in new class; inlining of Particle getters and
setters for better performance