  Recent discovery of superconductivity in the doped infinite-layer nickelates
has renewed interest in understanding the nature of high-temperature
superconductivity more generally. The low-energy electronic structure of the
parent compound NdNiO$_{2}$, the role of electronic correlations in driving
superconductivity, and the possible relationship betweeen the cuprates and the
nickelates are still open questions. Here, by comparing LaNiO$_2$ and NdNiO$_2$
systematically within a parameter-free density functional framework,
all-electron first-principles framework, we reveal the role Nd 4$f$ electrons
in shaping the ground state of pristine NdNiO$_2$. Strong similarities are
found between the electronic structures of LaNiO$_2$ and NdNiO$_2$, except for
the effects of the 4$f$-electrons. Hybridization between the Nd 4$f$ and Ni
3$d$ orbitals is shown to significantly modify the Fermi surfaces of various
magnetic states. In contrast, the competition between the magnetically ordered
phases depends mainly on the gaps in the Ni $d_{x2-y2}$ band, so that the
ground state in LaNiO$_2$ and NdNiO$_2$ turns out to be striking similarity to
that of the cuprates. The $d-p$ band-splitting is found to be much larger while
the intralayer 3$d$ ion-exchange coupling is smaller in the nickelates compared
to the cuprates. Our estimated value of the on-site Hubbard $U$ is similar to
that in the cuprates, but the value of the Hund's coupling $J_H$ is found to be
sensitive to the Nd magnetic moment. The exchange coupling $J$ in NdNiO$_2$ is
only half as large as in the curpates, which may explain why $T_c$ in the
nickelates is half as large as the cuprates.
