  Spin fluctuations have a substantial influence on the electron and lattice
behaviors in magnetic materials, which, however, is difficult to be tracked
properly by prevalent first-principles methods. We propose a versatile
self-adaptive spin-constrained density functional theory formalism. Applying it
to the simulation of itinerant ferromagnetic Fe, we present the potential
energy surface comprising longitudinal and transverse variations of
magnetization. Moreover, this method enables us to identify the delicate
coupling between the magnetic moments and other degrees of freedom by following
energy variation. As manifestations, magnetic interaction, electronic band
structure, and phonon dispersion curves are illustrated for single-layered
CrI$_3$ with excited magnetic configuration. All the above information can be
obtained not only for spin fluctuations but also for non-collinear spin
configurations with arbitrarily modulations; thus, it holds promise for future
applications in condensed-matter physics research.
