Skip to content

Commit

Permalink
better force parsing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ekwan committed Jul 30, 2021
1 parent 2a435b0 commit 2da985e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cctk/parse_gaussian.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,10 @@ def read_file_fast(file_text, filename, link1idx, max_len=20000, extended_opt_in

if cctk.GaussianJobType.FORCE in job_types:
assert len(molecules) == 1, "force jobs should not be combined with optimizations!"
forces = parse_forces(block_matches[7])
force_block = block_matches[7]
if len(force_block) == 0:
raise ValueError("no forces to parse!")
forces = parse_forces(force_block)
properties[0]["forces"] = forces

if cctk.GaussianJobType.POP in job_types:
Expand Down

0 comments on commit 2da985e

Please sign in to comment.