Skip to content

Commit

Permalink
Fix molecular disappearing when docs are opened
Browse files Browse the repository at this point in the history
  • Loading branch information
matterhorn103 committed Mar 1, 2024
1 parent bf7b083 commit 9ea4530
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import argparse
import json
import sys
import webbrowser

if __name__ == "__main__":
Expand All @@ -25,9 +26,15 @@
print("Extensions|Semi-empirical (xtb){10}")

if args.run_command:
# Still have to read input from Avogadro and pass cjson back
# Otherwise molecule disappears
avo_input = json.loads(sys.stdin.read())

webbrowser.open("https://xtb-docs.readthedocs.io/en/latest/commandline.html")
result = {
"message": "The xtb documentation should have opened in your browser."
"message": "The xtb documentation should have opened in your browser.",
"moleculeFormat": "cjson",
"cjson": avo_input["cjson"],
}
# Pass back to Avogadro
print(json.dumps(result))

0 comments on commit 9ea4530

Please sign in to comment.