Skip to content

Commit c234516

Browse files
committed
support empty lines in .xyz files
1 parent c5d3baa commit c234516

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

prism_pruner/conformer_ensemble.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ def from_xyz(cls, file: Path | str, read_energies: bool = False) -> Self:
2626
energies = []
2727
with Path(file).open() as f:
2828
for num in f:
29+
if not num.strip():
30+
continue
31+
2932
if read_energies:
3033
energy = next(re.finditer(r"-*\d+\.\d+", next(f))).group()
3134
energies.append(float(energy))

0 commit comments

Comments
 (0)