From 46ecd2cd3eac2cf2d38882dbfea1ccc6fd51ebda Mon Sep 17 00:00:00 2001 From: Jonathan Karp Date: Thu, 11 Jun 2020 20:31:31 -0400 Subject: [PATCH] look at the mesh of each shell of Sigma_imp, not just the first shell --- python/sumk_dft.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/python/sumk_dft.py b/python/sumk_dft.py index e90d2144..288b2225 100644 --- a/python/sumk_dft.py +++ b/python/sumk_dft.py @@ -647,9 +647,11 @@ class SumkDFT(object): if isinstance(Sigma_imp[0].mesh, MeshReFreq): if self.min_band_energy is None or self.max_band_energy is None: self.calculate_min_max_band_energies() - Sigma_mesh = numpy.array([i for i in Sigma_imp[0].mesh.values()]) - if Sigma_mesh[0] > (self.min_band_energy - self.chemical_potential) or Sigma_mesh[-1] < (self.max_band_energy - self.chemical_potential): - warn('The given Sigma is on a mesh which does not cover the band energy range. The Sigma MeshReFreq runs from %f to %f, while the band energy (minus the chemical potential) runs from %f to %f'%(Sigma_mesh[0], Sigma_mesh[-1], self.min_band_energy, self.max_band_energy)) + for gf in Sigma_imp: + Sigma_mesh = numpy.array([i for i in gf.mesh.values()]) + if Sigma_mesh[0] > (self.min_band_energy - self.chemical_potential) or Sigma_mesh[-1] < (self.max_band_energy - self.chemical_potential): + warn('The given Sigma is on a mesh which does not cover the band energy range. The Sigma MeshReFreq runs from %f to %f, while the band energy (minus the chemical potential) runs from %f to %f'%(Sigma_mesh[0], Sigma_mesh[-1], self.min_band_energy, self.max_band_energy)) + def transform_to_sumk_blocks(self, Sigma_imp, Sigma_out=None): r""" transform Sigma from solver to sumk space