  Using first principles calculations, we analyze structural and magnetic
trends as a function of charge doping and pressure in BaFe$_2$As$_2$, and
compare to experimentally established facts. We find that density functional
theory, while accurately reproducing the structural and magnetic ordering at
ambient pressure, fails to reproduce some structural trends as pressure is
increased. Most notably, the Fe-As bondlength which is a gauge of the magnitude
of the magnetic moment, $\mu$, is rigid in experiment, but soft in calculation,
indicating residual local Coulomb interactions. By calculating the magnitude of
the magnetic ordering energy, we show that the disruption of magnetic order as
a function of pressure or doping can be qualitatively reproduced, but that in
calculation, it is achieved through diminishment of $|\mu|$, and therefore
likely does not reflect the same physics as detected in experiment. We also
find that the strength of the stripe order as a function of doping is strongly
site-dependent: magnetism decreases monotonically with the number of electrons
doped at the Fe site, but increases monotonically with the number of electrons
doped at the Ba site. Intra-planar magnetic ordering energy (the difference
between checkerboard and stripe orderings) and interplanar coupling both follow
a similar trend. We also investigate the evolution of the orthorhombic
distortion, $e=(a-b)/(a+b),$ as a function of $\mu$, and find that in the
regime where experiment finds a linear relationship, our calculations are
impossible to converge, indicating that in density functional theory, the
transition is first order, signalling anomalously large higher order terms in
the Landau functional.
