  The effect of zinc substitution on the local electronic structure of several
cuprates is investigated using first-principles cluster calculations. Clusters
comprising 5, 9, and 13 copper atoms in the cuprate plane of La$_2$CuO$_4$,
YBa$_2$Cu$_3$O$_7$, and YBa$_2$Cu$_4$O$_8$ are used. Spin polarized
calculations with different multiplicities in the framework of density
functional theory enable a detailed study of the changes in the charge and spin
density distribution induced by Zn substitution. Furthermore, doping with
charge carriers in the above materials is simulated and the resulting changes
in the charge distribution are compared to the changes induced by Zn
impurities. These differences are then discussed in terms of a phenomenological
model related to properties expected from the generic phase diagram. The
effects of zinc substitution are rather local and as expected the absolute
values of the Mulliken charges at both nearest and next nearest neighbor
oxygens to Zn are larger than in the unsubstituted clusters. The calculated
electric field gradient at Cu sites that are nearest neighbor to Zn is found to
be somewhat larger than in the unsubstituted cluster whereas that of next
nearest neighbors is about 5% smaller. We conclude that the satellite peak in
the Cu NQR spectrum occurring upon Zn substitution in YBa$_2$Cu$_3$O$_7$ and
YBa$_2$Cu$_4$O$_8$ has its origin at Cu that are next nearest neighbors to Zn.
