  We examine the application of short-circuit electrical boundary conditions in
density functional theory calculations of ferroelectric thin films. Modeling
PbTiO$_3$ films with Pt electrodes, we demonstrate that under periodic boundary
conditions of supercells, short-circuit conditions for the electrodes are
equivalently satisfied in two repeated slab geometries: a PbTiO$_3$/metal
superlattice geometry and a periodic metal/PbTiO$_3$/metal/vacuum geometry,
where the metal is Pt or SrRuO$_3$. We discuss the benefits of each geometry in
the study of ferroelectricity in thin films.
