  We use DFT to compute core structures of $a_0[100](010)$ edge,
$a_0[100](011)$ edge, $a_0/2[\bar{1}\bar{1}1](1\bar{1}0)$ edge, and
$a_0/2[111](1\bar{1}0)$ $71^{\circ}$ mixed dislocations in bcc Fe. The
calculations use flexible boundary conditions (FBC), which allow dislocations
to relax as isolated defects by coupling the core to an infinite harmonic
lattice through the lattice Green function (LGF). We use LGFs of dislocated
geometries in contrast to previous FBC-based dislocation calculations that use
the bulk crystal LGF. Dislocation LGFs account for changes in topology in the
core as well as strain throughout the lattice. A bulk-like approximation for
the force constants in a dislocated geometry leads to LGFs that optimize the
cores of the $a_0[100](010)$ edge, $a_0[100](011)$ edge, and
$a_0/2[111](1\bar{1}0)$ $71^{\circ}$ mixed dislocations. This approximation
fails for the $a_0/2[\bar{1}\bar{1}1](1\bar{1}0)$ dislocation, so here we
derive the LGF using accurate force constants from a Gaussian approximation
potential. The standard deviations of dislocation Nye tensor distributions
quantify the widths of the cores. The relaxed cores are compact, and the
magnetic moments on the Fe atoms closely follow the volumetric strain
distributions in the cores. We also compute the core structures of these
dislocations using eight different classical interatomic potentials, and
quantify symmetry differences between the cores using the Fourier coefficients
of their Nye tensor distributions. Most of the core structures computed using
the classical potentials agree well with DFT results. The DFT geometries
provide benchmarking for classical potential studies of work-hardening, as well
as substitutional and interstitial sites for computing solute-dislocation
interactions that serve as inputs for mesoscale models of solute strengthening
and solute diffusion near dislocations.
