# Periodic boundary conditions and ambiguous dipoles

An isolated, charge-neutral, system has a dipole moment which is independent of the origin chosen. However, this is not the case for an infinitely periodic system. In the above diagram of a periodic system, two possible unit cells are outlined as "a" and "b". One has a small dipole moment, the other a large one. One has the dipole pointing to the left, the other to the right. Other unit cells are possible, and there are two which yield a zero dipole moment.

So which is correct? The slightly worrying answer is that one can tell only after looking at the boundary conditions at infinity. One's prejudice might be to say that cell "a" shows the system of interest at its centre, and a large vacuum gap separating it from its fictious periodic neighbours, but that sort of prejudice arises simply from studying aperiodic systems after reluctantly imposing periodic boundary conditions.

If there is a correct answer to the above problem, it is that the system shown consists of cell "b" repeated nine times, and we know this by looking at the boundaries at "infinity." It does not consist of cell "a" repeated, but rather cell "a" repeated eight times, and then an extra charge at each end.

There is another way of thinking about the possible boundary conditions at infinity. What is the potential? There are three leading contenders: The first two are staircases which give infinite potentials at infinity. The third is a periodic potential, and gives a potential of zero at infinity. This is what periodic simulation codes will produce by default, for it is the solution which gives a periodic potential, rather than one with a linear trend. The staircases correspond most naturally to cells "a" and "b", whereas the periodic potential corresponds most naturally to one of the unit cell choices which yields no dipole moment.

One might argue that a physical crystal will interact with its surroundings, attracting stray charges until its surfaces are all at approximately zero potential, and therefore the third possibility best reflects physical reality. This argument precludes studying piezoelectricity.

If, instead, one wished to study an aperiodic system, the physical boundary condition is more likely to be that the potential is constant in the vacuum region, and different on the two sides of the system, e.g. a charged parallel plate capacitor. None of the above three reflect this situation well, and one is left wanting to put a correcting discontinuity in the potential so as to make the potential periodic, as the simulation code will require, but also keeping the potential in the vacuum constant (except at the discontinuity). The vertical discontinuities keep the potential as close as possible to that in the first of the three examples above (same slopes in the two different regions) whilst restoring periodicity. This is the sort of thing that the self-consistent dipole corrections for studying isolated systems in periodic boundary conditions do.