  The YNiO$_3$ nickelate is a paradigm d-electron oxide that manifests the
intriguing temperature-mediated sequence of three phases transitions from (i)
magnetically ordered insulator to (ii) paramagnetic (PM) insulator and then to
(iii) PM metal. Such phenomena raised the question of the nature of the
association of magnetism and structural symmetry breaking with the appearance
in (i) and (ii) and disappearance in (iii) of insulating band gaps. It is
demonstrated here that first-principles mean-field-like density functional
theory (DFT), driven by molecular dynamics temperature evolution, can describe
not only the origin of the magnetically long-range ordered insulating phase
(i), but also the creation of an insulating paramagnet (ii) that lacks
spin-long-range order, and of a metallic paramagnet (iii) as temperature rises.
This approach provides the patterns of structural and magnetic symmetry
breaking at different temperatures, in parallel with band gaps obtained when
the evolving geometries are used as input to DFT electronic band structure
calculations. This disentangles the complex interplay among spin, charge and
orbital degrees of freedom. Analysis shows that the success in describing the
rise and fall of the insulating band gaps along the phase transition sequence
is enabled by allowing sufficient flexibility in describing diverse local
structural and magnetic motifs as input to DFT. This entails using sufficiently
large supercells that allow expressing structural disproportionation of
octahedra, as well as a description of PM phases as a distribution of local
magnetic moments. It appears that the historic dismissal of mean-field-like DFT
as being unable to describe such Mott-like transitions was premature, as it was
based on consideration of averaged crystallographic unit cells, a description
that washes out local symmetry-breaking motifs.
