fix: only allow irregularly spaced configs in hadrons input if idl is

specified.
This commit is contained in:
Fabian Joswig 2022-03-04 17:25:30 +00:00
parent c446898932
commit a7ff26ed9c

View file

@ -45,9 +45,11 @@ def _get_files(path, filestem, idl):
raise Exception("Unsorted files")
if len(dc) == 1:
idx = range(cnfg_numbers[0], cnfg_numbers[-1] + dc[0], dc[0])
else:
elif idl:
idx = idl
warnings.warn("Configurations are not evenly spaced.", RuntimeWarning)
else:
raise Exception("Configurations are not evenly spaced.")
return filtered_files, idx