I have a question about the calculation of center of mass (COM) in systems with periodic boundary conditions. There is a method introduced here:
https://en.wikipedia.org/wiki/Center_of_mass#Systems_with_periodic_boundary_conditions
But by this method the COM can't be calculated properly, see the image bellow, because the system is extended over the whole box and not only the lower right corner but also the upper right one is considered as periodic image. Is there a straightforward way for calculating COM in systems like this?