The electronic structure of RNi2B2C (R = Y, La, Pr-Tm, Lu) is systematicall
y studied using density functional theory (DFT). The partially occupied 4f
states are assumed to be localized for both the light and heavy rare earths
(R = Pr, Nd, Sm, Tb,Dy,Ho, Ei, Tm) and treated in tthe ''open core approxi
mation.'' In the case of Gd (Lu) the 4f states are treated both as itineran
t and as part of the atomiclike core states. The calculations of the electr
onic density of states (DOS) show that the Fermi energy E-f is located in a
pronounced peak for R = Y, Dy, Ho, Er, Tm, and Lu. This peak starts to be
broadened for R = Tb, Gd, and Sm and finally disappears is located in a pro
nounced peak for R = Y, Dy, Ho, Er, Tm, and Lu. This peak starts to be broa
dened for R for R = Pr, Nd. This reduction is large enough to explain the d
epression of superconductivity to below 3 K in the light rare-earth borocar
bides. Additional calculations of the Hopfield parameters support this conc
lusion. The charge density distribution and general features of the bonding
mechanism are discussed. The relations between the DOS in the vicinity of
E-f and the lattice parameters d,c and the free internal structural paramet
er z(B) of boron are studied using the DFT total energy and force calculati
ons. The total energy is very sensitive to the cia ratio and the optimum DF
T values of cia and z(B) are close to those observed in the experiment. The
electric field gradients (EFG) on the Gd- (GdNi2B2C) and B-site (YNi2B2C)
are calculated and agree with experimental data. We also point out that the
physical origin of this relatively large EFG on the Gd site results from a
strong cancellation between positive 6p-6p and negative 5p-5p contribution
s.