Made Unittest for periodic boundary conditions. Corrected getMinDistance to fulfill minimum image convention.