The effect of nonmagnetic cap layers on the periods, amplitudes, and p
hases of the oscillations of the interlayer exchange coupling (IEC) is
studied theoretically using ab initio methods. We employ the spin-pol
arized surface Green function technique within a tight-binding linear
muffin-tin orbital method and the Lloyd formulation of the IEC. Applic
ation is made to Co/Cu/Co(001) trilayers with a Cu cap interfacing vac
uum through the dipole barrier. We investigate in detail both an asymm
etric case with one semi-infinite Co slab and the other Co slab being
five monolayers thick and a symmetric case with Co slabs of monolayer
thickness. In all cases we have found a pronounced oscillatory behavio
r of the amplitudes and the phases of the IEC oscillations as a functi
on of the thickness of the cap. The case of different spacer and cap m
aterials is also studied. The results for different spacer and differe
nt cap thicknesses are analyzed in terms of a discrete Fourier transfo
rmation as well as in real space, and found to confirm predictions by
the electron confinement model on an ab initio level.