Commit e05b969d authored by Eric Hermes's avatar Eric Hermes

alternate fix suggested by jensj and a new test

parent 912bfc95
......@@ -69,7 +69,7 @@ class Eigensolver:
if kpt.f_n is None: # no eigenvalues yet
weight_n[:] = np.inf
else:
weight_n[:] = kpt.f_n
weight_n[:] = np.abs(kpt.f_n)
else:
# Converge state with energy up to CBM + delta:
assert self.nbands_converge.startswith('CBM+')
......@@ -137,7 +137,7 @@ class Eigensolver:
wfs.orthonormalize(kpt)
wfs.orthonormalized = True
self.error = np.abs(self.band_comm.sum(self.kpt_comm.sum(error)))
self.error = self.band_comm.sum(self.kpt_comm.sum(error))
def iterate_one_k_point(self, ham, kpt):
"""Implemented in subclasses."""
......
from gpaw import GPAW, PW, MethfesselPaxton
from ase.spacegroup import crystal
graphite = crystal(symbols=['C', 'C'],
basis=[[0, 0, 1/4], [1/3, 2/3, 1/4]],
spacegroup="P63/mmc",
cellpar=[2.464, 2.464, 6.711, 90, 90, 120])
graphite.calc = GPAW(mode=PW(400),
occupations=MethfesselPaxton(5.0, 1),
nbands=20,
kpts=(3, 3, 3))
graphite.get_potential_energy()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment