Determining the structure of energy in heterostructures with diffuse interfaces