From 37de9213803270f64bf60d674f0c5099f51d0bb9 Mon Sep 17 00:00:00 2001 From: finlayclark Date: Mon, 17 Jun 2024 11:02:00 +0100 Subject: [PATCH] Remove redundant is_equilibrated method --- a3fe/run/_simulation_runner.py | 26 ++------------------------ a3fe/run/lambda_window.py | 20 -------------------- 2 files changed, 2 insertions(+), 44 deletions(-) diff --git a/a3fe/run/_simulation_runner.py b/a3fe/run/_simulation_runner.py index b20baa5..b7d5ff7 100644 --- a/a3fe/run/_simulation_runner.py +++ b/a3fe/run/_simulation_runner.py @@ -697,30 +697,6 @@ def failed_simulations(self) -> _List[SimulationRunner]: for failure in sub_sim_runner.failed_simulations ] - def is_equilibrated(self, run_nos: _Optional[_List[int]] = None) -> bool: - f""" - Whether the {self.__class__.__name__} is equilibrated. This updates - the _equilibrated and _equil_time attributes of the lambda windows, - which are accessed by the equilibrated and equil_time properties. - - Parameters - ---------- - run_nos : List[int], Optional, default=None - A list of the run numbers to check for equilibration. If None, all runs are analysed. - - Returns - ------- - equilibrated : bool - Whether the {self.__class__.__name__} is equilibrated. - """ - run_nos = self._get_valid_run_nos(run_nos) - return all( - [ - sub_sim_runner.is_equilibrated(run_nos=run_nos) - for sub_sim_runner in self._sub_sim_runners - ] - ) - @property def equilibrated(self) -> float: f"""Whether the {self.__class__.__name__} is equilibrated.""" @@ -807,6 +783,8 @@ def recursively_set_attr( attr=attr, value=value, force=force, silent=silent ) + def set_ + def update_paths(self, old_sub_path: str, new_sub_path: str) -> None: """ Replace the old sub-path with the new sub-path in the base, input, and output directory diff --git a/a3fe/run/lambda_window.py b/a3fe/run/lambda_window.py index 40bdce7..65aab7c 100644 --- a/a3fe/run/lambda_window.py +++ b/a3fe/run/lambda_window.py @@ -260,26 +260,6 @@ def get_tot_gpu_time(self, run_nos: _Optional[_List[int]] = None) -> float: run_nos = self._get_valid_run_nos(run_nos) return sum([self.sims[run_no - 1].get_tot_gpu_time() for run_no in run_nos]) - def is_equilibrated(self, run_nos: _Optional[_List[int]] = None) -> bool: - """ - Check if the ensemble of simulations at the lambda window is - equilibrated, based on the run numbers specified and the - equilibration detection method. Store the equilibration status - and time in private variables if so. - - Parameters - ---------- - run_nos : List[int], Optional, default: None - The run numbers to equilibration detection. If None, all runs will be used. - - Returns - ------- - equilibrated : bool - True if the simulation is equilibrated, False otherwise. - """ - self._equilibrated, self._equil_time = self.check_equil(self, run_nos=run_nos) - return self._equilibrated - @property def equilibrated(self) -> bool: """Whether equilibration has been achieved."""