Technically the Hamiltonian (110) is of the general form for McPhase [37], with single ion and interaction terms. The corresponding mean field procedure can be done by an internal single ion module ”epsilon”, which represents not an ion, but the strain. Given and and appropriate interaction constants to the ”epsilon” from (95) and (106), respectively, the right side in (112) can be evaluated in each mean field loop in module ”epsilon” function Icalc. Then elastic constants in (112) can be used to calculate a new strain , a six component vector. Via the aforementioned appropriate interaction constants (from (96) and (108)) the strain will produce mean fields on lattice displacements and magnetic ions charge density (crystal field) and so on ... The free energy returned by the module ”epsilon” correspond to the elastic energy per unit cell given by equation (94).
For the dynamics the ”epsilon” module does not yield any single ion excitations. The excitations can be calculated without taking into account the term , because this is linear in the displacement operators and in the harmonic approximation the spectrum of the harmonic Einstein oscillator will not change with such an internal force. The strain has only to be taken into account as a linear modification of the crystal field parameters in the first term of equation (106). This is done automatically by creating the file mcphas.mf with the ”epsilon” module, i.e. the option ”-doeps” of mcphas, see section 12.11.