Skip to content

Commit

Permalink
Merge branch 'fix_calc_min_max_band_energies' into bse_only_chiloc
Browse files Browse the repository at this point in the history
  • Loading branch information
j-otsuki committed Mar 13, 2023
2 parents e59c27e + 47c9889 commit c88e8d4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/dcore/sumkdft_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,7 @@ def eff_atomic_levels(self):
eff_atlevels = None
return mpi.bcast(eff_atlevels)

# This replacement does not work when np_mpi > nk
def calculate_min_max_band_energies(self):
# hop = self.hopping
# diag_hop = numpy.zeros(hop.shape[:-1])
Expand All @@ -871,6 +872,16 @@ def calculate_min_max_band_energies(self):
self.max_band_energy = max_band_energy
return min_band_energy, max_band_energy

# Simply set 0
def calculate_min_max_band_energies(self):
if mpi.is_master_node():
warn("Set min_band_energy=0 and max_band_energy=0 when hopping_part is used.")
min_band_energy = 0
max_band_energy = 0
self.min_band_energy = min_band_energy
self.max_band_energy = max_band_energy
return min_band_energy, max_band_energy

# This method is not used for the moment.
# Actually, replacement is simple.
def calc_density_correction(self, filename=None, dm_type='wien2k'):
Expand Down

0 comments on commit c88e8d4

Please sign in to comment.