  We present a fully first-principles method for superconducting thin films.
The layer dependent phonon spectrum is calculated to determine the layer
dependence of the electron-phonon coupling for such systems, which is coupled
to the Kohn-Sham-Bogoliubov-de Gennes equations, and it is solved in a
parameter free way. The theory is then applied to different surface facets of
niobium slabs and to niobium-gold heterostructures. We investigate the
dependence of the transition temperature on the thickness of the slabs and the
inverse proximity effect observed in thin superconducting heterostructures.
