  The work describes a first-principles-based computational strategy for
studying structural phase transitions, and in particular, for determination of
the so-called Landau-Devonshire potential - the classical zero-temperature
limit of the Gibbs energy, expanded in terms of order parameters. It exploits
the configuration space attached to the eigenvectors of the modes frozen in the
ground state, rather than the space spanned by the unstable modes of the
high-symmetry phase, as done usually. This allows us to carefully probe the
part of the energy surface in the vicinity of the ground state, which is most
relevant for the properties of the ordered phase. We apply this procedure to
BiFeO$_3$ and perform ab-initio calculations in order to determine potential
energy contributions associated with strain, polarization and oxygen octahedra
tilt degrees of freedom, compatible with its two-formula unit cell periodic
boundary conditions.
