  Investigation of magnetic materials at realistic conditions with
first-principles methods is a challenging task due to the interplay of
vibrational and magnetic degrees of freedom. The most difficult contribution to
include in simulations is represented by the longitudinal magnetic degrees of
freedom (LSF) due to their inherent many-body nature; nonetheless, schemes that
enable to take into account this effect on a semiclassical level have been
proposed and employed in the investigation of magnetic systems. However,
assessment of the effect of vibrations on LSF is lacking in the literature. For
this reason, in this work we develop a supercell approach within the framework
of constrained density functional theory to calculate self-consistently the
size of local-environment-dependent magnetic moments in the paramagnetic,
high-temperature state in presence of lattice vibrations and for liquid Fe in
different conditions. First, we consider the case of bcc Fe at the Curie
temperature and ambient pressure. Then, we perform a similar analysis on bcc Fe
at Earth's inner core conditions, and we find that LSF stabilize non-zero
moments which affect atomic forces and electronic density of states of the
system. Finally, we employ the present scheme on liquid Fe at the melting point
at ambient pressure, and at Earth's outer core conditions ($p \approx 200$ GPa,
$T \approx 6000$ K). In both cases, we obtain local magnetic moments of sizes
comparable to the solid-state counterparts.
