Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarify error messages of chargeScripts when antechamber or xtb is unavailable #1039

Merged
merged 1 commit into from
Jul 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")

Check notice

Code scanning

Constant name "name" doesn't conform to UPPER_CASE naming style

Constant name "name" doesn't conform to UPPER_CASE naming style
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")

Check notice

Code scanning

Constant name "name" doesn't conform to UPPER_CASE naming style

Constant name "name" doesn't conform to UPPER_CASE naming style
if name:
print(name)
else:
raise RuntimeError("xtb is unavailable")
elif args["charges"]:
print(charges())
elif args["potential"]:
Expand Down