Energetic basis for the molecular-scale organization of bone