Skip to content

Commit

Permalink
Merge pull request #628 from RandomDefaultUser/large_ldos_sampling
Browse files Browse the repository at this point in the history
Fixed parser to allow for sampling LDOS with over 1000 cube files
  • Loading branch information
RandomDefaultUser authored Dec 13, 2024
2 parents 74b56f5 + 27aa15d commit 6b42e3b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mala/targets/ldos.py
Original file line number Diff line number Diff line change
Expand Up @@ -1609,7 +1609,14 @@ def _read_from_qe_files(

for i in range(start_index, end_index):
tmp_file_name = path_scheme
tmp_file_name = tmp_file_name.replace("*", str(i).zfill(digits))
if digits < 4:
tmp_file_name = tmp_file_name.replace(
"*", str(i).zfill(digits)
)
else:
# For some reason, there are no leading zeros above 3 digits
# in QE.
tmp_file_name = tmp_file_name.replace("*", str(i).zfill(3))

# Open the cube file
if file_type == ".cube":
Expand Down

0 comments on commit 6b42e3b

Please sign in to comment.