# Periodic boundary condition and the long-range interaction, compatible?

Suppose we have $N$ particles in a box of size $L \times L \times L$. The interaction between the particles is of the form

$$V_{ij} = f (r_i - r_j ) .$$

For example, the function might be the coulomb function or the Lenard-Jones potential.

The problem is, for two particles, because of the periodic boundary condition, the distance between them is not well defined. So, the periodic boundary condition and a long-range interaction is not compatible with each other?

• Why do you say that the distance is not well defined? – valerio Nov 19 '16 at 23:03

It can be made compatible by rewriting: $$f(|\vec{r}_i-\vec{r}_j|)\to f\left(\frac{L}{2\pi}\sqrt{\sin^2\left(2\pi\frac{x_i-x_j}{L}\right)+\sin^2\left(2\pi\frac{y_i-y_j}{L}\right)+\sin^2\left(2\pi\frac{z_i-z_j}{L}\right)}\right),$$ for $\vec{r}_i=(x_i,y_i,z_i)$. This enforces the periodicity explicity.