patch-rmmdiis.diff 1.56 KB
 Martti Louhivuori committed Apr 16, 2019 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 ``````commit 761cba649d58e2d2f24c0a1e2fdad917b5929679 Author: Martti Louhivuori Date: Thu May 18 10:56:07 2017 +0300 Remove obsolete error calculation from DIIS step diff --git a/gpaw/eigensolvers/rmmdiis.py b/gpaw/eigensolvers/rmmdiis.py index 7d60553..d182713 100644 --- a/gpaw/eigensolvers/rmmdiis.py +++ b/gpaw/eigensolvers/rmmdiis.py @@ -299,23 +299,6 @@ class RMMDIIS(Eigensolver): P_axi, kpt.eps_n[n_x], R_xG, n_x, calculate_change=True) self.timer.stop('Calculate residuals') - self.timer.start('Calculate errors') - errors_new_x = np.zeros(B) - # errors_x[:] = 0.0 - for n in range(n1, n2): - if kpt.f_n is None: - weight = kpt.weight - else: - weight = kpt.f_n[n] - if self.nbands_converge != 'occupied': - if wfs.bd.global_index(n) < self.nbands_converge: - weight = kpt.weight - else: - weight = 0.0 - errors_new_x[n-n1] += weight * integrate(R_xG[n - n1], - R_xG[n - n1]) - comm.sum(errors_x) - self.timer.stop('Calculate errors') self.timer.stop('DIIS step') # Final trial step``````