  We derive the effective single-band Hamiltonian in the flat NiO$_2$ planes
for nickelate compounds Nd$_{1-x}$Sr$_x$NiO$_2$. We first implement the
first-principles calculation to study electronic structures of nickelates using
the Heyd-Scuseria-Ernzerhof hybrid density functional and derive a three-band
Hubbard model for Ni-O $pd\sigma$ bands of Ni$^+$ $3d_{x^2-y^2}$ and O$^{2-}$
$2p_{x/y}$ orbitals in the NiO$_2$ planes. To obtain the effective one-band
$t$-$t'$-$J$ model Hamiltonian, we perform the exact diagonalization of the
three-band Hubbard model for the Ni$_5$O$_{16}$ cluster and map the low-energy
spectra onto the effective one-band models. We find that the undoped NiO$_2$
plane is a Hubbard Mott insulator, and the doped holes primarily locate on Ni
sites. The physics of the NiO$_2$ plane is a doped Mott insulator, described by
the one-band $t$-$t'$-$J$ model with $t=265$~meV, $t'=-21$~meV and
$J=28.6$~meV. We also discuss the electronic structure for the "self-doping"
effect and heavy fermion behavior of electron pockets of Nd$^{3+}$ $5d$
character in Nd$_{1-x}$Sr$_x$NiO$_2$.
