Skip to content

Commit

Permalink
Add an error message if the species == 0
Browse files Browse the repository at this point in the history
  • Loading branch information
arm61 committed Aug 10, 2022
1 parent d59e03a commit 16ad8a8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kinisi/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ def get_indices(
indices.append(i)
else:
framework_indices.append(i)
if len(indices) == 0:
raise ValueError("There are no species selected to calculate the mean-squared displacement of.")
return indices, framework_indices


Expand Down

0 comments on commit 16ad8a8

Please sign in to comment.