Architecture and energy of spaces