Skip to content

Commit

Permalink
Prettier cjson formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
matterhorn103 committed Dec 11, 2023
1 parent 854ac4e commit 7b09f3b
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 50 deletions.
2 changes: 1 addition & 1 deletion conformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def run_crest(command, geom_file, charge=0, multiplicity=1):

# Save result
with open(calc_dir / "result.cjson", "w", encoding="utf-8") as save_file:
json.dump(result["cjson"], save_file)
json.dump(result["cjson"], save_file, indent=2)

# If user specified a save location, copy calculation directory to there
if Path(avo_input["save_dir"]) != calc_dir:
Expand Down
45 changes: 0 additions & 45 deletions debug.py

This file was deleted.

2 changes: 1 addition & 1 deletion freq.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,6 @@ def frequencies(geom_file, charge=0, multiplicity=1):

# Save result
with open(calc_dir / "result.cjson", "w", encoding="utf-8") as save_file:
json.dump(result["cjson"], save_file)
json.dump(result["cjson"], save_file, indent=2)
# Pass back to Avogadro
print(json.dumps(result))
2 changes: 1 addition & 1 deletion ohess.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,6 @@ def opt_freq(geom_file, charge=0, multiplicity=1):

# Save result
with open(calc_dir / "result.cjson", "w", encoding="utf-8") as save_file:
json.dump(result["cjson"], save_file)
json.dump(result["cjson"], save_file, indent=2)
# Pass back to Avogadro
print(json.dumps(result))
2 changes: 1 addition & 1 deletion opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,6 @@ def optimize(geom_file, charge=0, multiplicity=1):

# Save result
with open(calc_dir / "result.cjson", "w", encoding="utf-8") as save_file:
json.dump(result["cjson"], save_file)
json.dump(result["cjson"], save_file, indent=2)
# Pass back to Avogadro
print(json.dumps(result))
2 changes: 1 addition & 1 deletion run.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def parse_energy(output_string):

# Save result
with open(calc_dir / "result.cjson", "w", encoding="utf-8") as save_file:
json.dump(result["cjson"], save_file)
json.dump(result["cjson"], save_file, indent=2)

# If user specified a save location, copy calculation directory to there
if Path(avo_input["save_dir"]) != calc_dir:
Expand Down

0 comments on commit 7b09f3b

Please sign in to comment.