  We present a theoretical first-principles method to calculate the free energy
of a magnetic system in its high-temperature paramagnetic phase, including
vibrational, electronic, and magnetic contributions. The method for calculating
free energies is based on ab-initio molecular dynamics and combines a treatment
of disordered magnetism using disordered local moments molecular dynamics
(DLM-MD) with the temperature dependent effective potential (TDEP) method to
obtain the vibrational contribution to the free energy. We illustrate the
applicability of the method by obtaining the anharmonic free energy for the
paramagnetic cubic and the antiferromagnetic orthorhombic phases of chromium
nitride. The influence of lattice dynamics on the transition between the two
phases is demonstrated by constructing the temperature-pressure phase diagram.
