From 3e812e963ba0f685681c789d1ae20573a20e5e84 Mon Sep 17 00:00:00 2001 From: Brittany Watterson Date: Mon, 11 Nov 2024 13:18:28 -0500 Subject: [PATCH] troubleshooting my code with git hook errors --- .../analysis_tools/hydrogen_bonding_tools.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mdagent/tools/base_tools/analysis_tools/hydrogen_bonding_tools.py b/mdagent/tools/base_tools/analysis_tools/hydrogen_bonding_tools.py index 3b97c65e..7f75c1dd 100644 --- a/mdagent/tools/base_tools/analysis_tools/hydrogen_bonding_tools.py +++ b/mdagent/tools/base_tools/analysis_tools/hydrogen_bonding_tools.py @@ -181,7 +181,7 @@ def _run( freq: str = "0.1", ) -> str: if self.path_registry is None: - raise ValueError("PathRegistry is not set") + return "PathRegistry is not set" try: print("Loading trajectory...") @@ -216,7 +216,7 @@ def _run( plot_file_id = plot_and_save_hb_plot( hb_counts, title=f"{method.capitalize()} Time Series", - plot_type="time Series", + plot_type="time_series", method=method, path_registry=self.path_registry, ylabel="Count", @@ -248,7 +248,7 @@ def _run( ) return ( - "Succeeded. Analysis completed, results saved to file and plot" + "Succeeded. Analysis completed, results saved to file and plot " "saved. " f"Results file: {result_file_id}, " f"Histogram or Time series plot: {plot_file_id}, " @@ -283,7 +283,7 @@ def __init__(self, path_registry: PathRegistry): def _run(self, traj_file: str, top_file: str | None = None) -> str: if self.path_registry is None: - raise ValueError("PathRegistry is not set") + return "PathRegistry is not set" try: if not top_file: top_file = self.top_file(traj_file) @@ -313,10 +313,10 @@ def _run(self, traj_file: str, top_file: str | None = None) -> str: ) return ( - "Succeeded. Kabsch-Sander analysis completed, results saved to file" - "and plot saved" - f"Results file:{result_file_id}," - f"Plot file: {plot_time_series_file_id}," + "Succeeded. Kabsch-Sander analysis completed, results saved to file " + "and plot saved. " + f"Results file:{result_file_id}, " + f"Plot file: {plot_time_series_file_id}, " ) except Exception as e: