Skip to content

Commit

Permalink
maint: raise type error if isopointal_proto input is not str
Browse files Browse the repository at this point in the history
  • Loading branch information
CompRhys committed Jul 8, 2024
1 parent 4f10075 commit f2c41cd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions aviary/wren/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,11 @@ def get_aflow_strs_from_iso_and_composition(
chemical systems that can be generated from combinations of the
input isopointal_proto and composition.
"""
if not isinstance(isopointal_proto, str):
raise TypeError(
f"Invalid isopointal_proto: {isopointal_proto} ({type(isopointal_proto)})"
)

anonymous_formula, pearson, spg, *wyckoffs = isopointal_proto.split("_")

ele_amt_dict = composition.get_el_amt_dict()
Expand Down

0 comments on commit f2c41cd

Please sign in to comment.