Skip to content

Commit

Permalink
Merge pull request #1039 from e-kwsm/fix-1034
Browse files Browse the repository at this point in the history
clarify error messages of chargeScripts when antechamber or xtb is unavailable
  • Loading branch information
ghutchis authored Jul 21, 2022
2 parents 4c1fb90 + aaaeee3 commit be74ad9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,11 @@ def potential():
if args["metadata"]:
print(json.dumps(getMetaData()))
elif args["display_name"]:
print(getMetaData()["name"])
name = getMetaData().get("name")
if name:
print(name)
else:
raise RuntimeError("antechamber is unavailable")
elif args["charges"]:
print(charges())
elif args["potential"]:
Expand Down
6 changes: 5 additions & 1 deletion avogadro/qtplugins/scriptcharges/chargeScripts/xtb.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ def potential():
if args["metadata"]:
print(json.dumps(getMetaData()))
elif args["display_name"]:
print(getMetaData()["name"])
name = getMetaData().get("name")
if name:
print(name)
else:
raise RuntimeError("xtb is unavailable")
elif args["charges"]:
print(charges())
elif args["potential"]:
Expand Down

0 comments on commit be74ad9

Please sign in to comment.