  The wave-vector q and doping (x,y) dependences of the magnetic energy, iron
moment, and effective exchange interactions in LaFeAsO{1-x}F{x} and
Ba{1-2y}K{2y}Fe2As2 are studied by self-consistent LSDA calculations for
co-planar spin spirals. For the undoped compounds (x=0, y=0), the minimum of
the calculated total energy, E(q), is for q corresponding to stripe
antiferromagnetic order. Already at low levels of electron doping (x), this
minimum becomes flat in LaFeAsO{1-x}F{x} and for x>=5, it shifts to an
incommensurate q. In Ba{1-2y}K{2y}Fe2As2, stripe order remains stable for hole
doping up to y=0.3. These results are explained in terms of the band structure.
The magnetic interactions cannot be accurately described by a simple classical
Heisenberg model and the effective exchange interactions fitted to E(q) depend
strongly on doping. The doping dependence of the E(q) curves is compared with
that of the noninteracting magnetic susceptibility for which similar trends are
found.
