Skip to content

Commit

Permalink
fixed filenames (#149)
Browse files Browse the repository at this point in the history
The filename-specifier `f'.pdos_atm#{atom.index+1}*`' for example also includes atom numbers 10-19 when we only want to get atom number 1. Adding a bracket `f'.pdos_atm#{atom.index+1}(*'` should fix this issue.
  • Loading branch information
schuyann authored Jun 24, 2022
1 parent cbba3b3 commit c24edf2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion koopmans/calculators/_projwfc.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def generate_dos(self) -> GridDOSCollection:
"""
dos_list = []
for atom in self.atoms:
filenames = sorted(self.directory.glob(self.parameters.filpdos + f'.pdos_atm#{atom.index+1}*'))
filenames = sorted(self.directory.glob(self.parameters.filpdos + f'.pdos_atm#{atom.index+1}(*'))
# The filename does not encode the principal quantum number n. In order to recover this number, we compare
# the reported angular momentum quantum number l against the list of expected orbitals, and infer n
# assuming only that the file corresponding to nl will come before (n+1)l
Expand Down

0 comments on commit c24edf2

Please sign in to comment.