1: \begin{abstract}
2: Noncollinear magnets are notoriously difficult to describe within first-principles approaches based on density-functional theory (DFT) because of the presence of low-lying spin excitations.
3: %
4: At the level of ground-state calculations, several methods exist to constrain the magnetic moments to a predetermined configuration, and thereby accelerate convergence towards self-consistency. Their use in a perturbative context, however, remains very limited.
5: %
6: Here we present a general methodological framework to achieve parametric control over the local spin moments at the linear-response level.
7: %
8: Our strategy builds on the concept of Legendre transform to switch between various flavors of magnetic functionals,
9: and to relate their second derivatives via simple linear-algebra operations.
10: %
11: Thereby, we can address an arbitrary response function at the time-dependent DFT level of theory with optimal accuracy and minimal computational effort.
12: %
13: In the low frequency limit, we identify the leading correction to the existing adiabatic formulation of the problem [S. Ren \emph{et al.}, Phys. Rev. X {\bf 14}, 011041 (2024)], consisting in a renormalization of the phonon and magnon masses due to electron inertia.
14: %
15: As a demonstration, we apply our methodology to the study of the THz optical response in bulk CrI$_3$, where we identify a hybrid electromagnon with mixed spin-lattice character.
16:
17: \end{abstract}
18: