  The thermodynamics of the discrete nonlinear Schr\"odinger equation in the
vicinity of infinite temperature is explicitly solved in the microcanonical
ensemble by means of large-deviation techniques. A first-order phase transition
between a thermalized phase and a condensed (localized) one occurs at the
infinite-temperature line. Inequivalence between statistical ensembles
characterizes the condensed phase, where the grand-canonical representation
does not apply. The control over finite size corrections of the microcanonical
partition function allows to design an experimental test of delocalized
negative-temperature states in lattices of cold atoms.
