Commit 79dc90d3 authored by Eric Hermes's avatar Eric Hermes

ensure eigensolver error is positive

parent 2267387c
......@@ -137,7 +137,7 @@ class Eigensolver:
wfs.orthonormalize(kpt)
wfs.orthonormalized = True
self.error = self.band_comm.sum(self.kpt_comm.sum(error))
self.error = np.abs(self.band_comm.sum(self.kpt_comm.sum(error)))
def iterate_one_k_point(self, ham, kpt):
"""Implemented in subclasses."""
......
......@@ -153,7 +153,7 @@ class SCFLoop:
header = header[:l2] + 'force ' + header[l2:]
log(header)
if eigerr <= 0.0 or np.isinf(eigerr):
if eigerr == 0.0 or np.isinf(eigerr):
eigerr = ''
else:
eigerr = '%+.2f' % (ln(eigerr) / ln(10))
......
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