  Using ab-initio density functional theory for superconductors (SCDFT), we
systematically study the quaternary borocarbides $RM_2$B$_2$C. Treating the
retarded (frequency-dependent) interaction $W(\omega)$ within the random-phase
approximation (RPA), we find good agreement with experiments for the calculated
superconducting critical temperature $T_c$ in the nonmagnetic Ni- and Pd-based
compounds. We argue that the problem of accurately placing the $f$-bands within
DFT, and possibly the lack of an explicit magnetic pair-breaking mechanism,
explain the difficulties of SCDFT in reproducing $T_c$ in members of the
magnetic $R$Ni$_2$B$_2$C series ($R$ rare-earth with partially filled $4f$).
While the calculated $T_c$ is overestimated, SCDFT qualitatively captures the
experimentally observed trend along the rare-earth series, which indicates that
the electron-phonon couplings and dynamically screened interactions have a
significant effect on $T_c$.
