Structural energetics and the order-disorder transition