From 269283bf70f3d455719b3a495e671ba11d03df76 Mon Sep 17 00:00:00 2001 From: Ruihao Bi Date: Wed, 27 Apr 2022 19:03:11 +0800 Subject: [PATCH] fix quick_plot_rks bug, caused by the deprecated 'ldos' attribute of class 'Pdos' --- cp2kdata/pdos.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cp2kdata/pdos.py b/cp2kdata/pdos.py index 7f1ee80..80429f4 100644 --- a/cp2kdata/pdos.py +++ b/cp2kdata/pdos.py @@ -445,10 +445,11 @@ def quick_plot_rks(pdos_dir): rks_dos = [] for i in pdos_files: tmp = Pdos(i) - if tmp.ldos == False: - rks_dos.append(tmp) - else: - pass + rks_dos.append(tmp) + #if tmp.ldos == False: + # rks_dos.append(tmp) + #else: + # pass # plot ax_num = len(rks_dos) + 1 @@ -470,7 +471,7 @@ def quick_plot_rks(pdos_dir): for i in range(1, ax_num): ax = fig.add_subplot(gs[i]) dos_obj = rks_dos[i-1] - typical_orb = typical_orbital(dos_obj.element) + typical_orb = typical_orbital.get(dos_obj.element) dos, ener = dos_obj.get_dos(dos_type=typical_orb) ax.plot(ener, dos, label = dos_obj.element + " " + typical_orb, color = "C{0}".format(int(i)), lw=lw) if i == ax_num - 1: