Skip to content

Commit ff40d39

Browse files
committed
2 parents 7433231 + 19be40f commit ff40d39

File tree

1 file changed

+7
-2
lines changed
  • src/aiidalab_qe_vibroscopy/utils/phonons

1 file changed

+7
-2
lines changed

src/aiidalab_qe_vibroscopy/utils/phonons/result.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,13 @@ def export_phononworkchain_data(node, fermi_energy=None):
9292
)
9393

9494
for atom_contribution in index_dict[atom][:]:
95-
dos_dict[atom] += pdos.get_y()[atom_contribution][1]
96-
dos_dict["total_dos"] += pdos.get_y()[atom_contribution][1]
95+
if len(pdos.get_y()) <= atom_contribution:
96+
# I need this as for Al4, only one pdos tuple is provided...
97+
# for Si2, actually, two are provided...
98+
break
99+
else:
100+
dos_dict[atom] += pdos.get_y()[atom_contribution][1]
101+
dos_dict["total_dos"] += pdos.get_y()[atom_contribution][1]
97102

98103
dos = []
99104
# The total dos parsed

0 commit comments

Comments
 (0)