Skip to content

Commit 54445e5

Browse files
committed
add check if file exists to read_top
1 parent 9bd64fa commit 54445e5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/gmx_top4py/parsing.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ def read_top(
238238
"angle_restraints_z",
239239
"orientation_restraints",
240240
)
241-
241+
if not path.is_file():
242+
raise FileNotFoundError(f"topology file {path} not found")
242243
gmx_builtin_ffs = None
243244
if use_gmx_dir:
244245
gmxdir = get_gmx_dir()

0 commit comments

Comments
 (0)