Skip to content

Commit

Permalink
Merge pull request #139 from JuDFTteam/fix_issue_138
Browse files Browse the repository at this point in the history
Fix error plot_kkr
  • Loading branch information
PhilippRue authored Nov 8, 2023
2 parents 2aa35aa + 73defc9 commit 9e46c4b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions aiida_kkr/tools/plot_kkr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1141,12 +1141,14 @@ def make_kkrimp_rmsplot(self, rms_all, stot_all, pks_all, rms_goal, ptitle, **kw
# plotting of convergence properties (rms etc.)
if len(rms_all) > 0:
# sort rms values and flatten array
reorder_rms = array(pks_all).argsort()
reorder_rms = array(pks_all).argsort()[::-1]
rms, niter_calcs, stot = [], [0], []
for i in array(rms_all)[reorder_rms]:
rms_all_sorted = [rms_all[i] for i in reorder_rms]
for i in rms_all_sorted:
rms += list(i)
niter_calcs.append(len(i) - 0.5)
for i in array(stot_all)[reorder_rms]:
stot_sorted = [stot_all[i] for i in reorder_rms]
for i in stot_sorted:
if i is not None:
stot += list(i)
# now plot
Expand Down

0 comments on commit 9e46c4b

Please sign in to comment.