From 66266dcabfbbc0c44c478d47a3f90f2f41acb7df Mon Sep 17 00:00:00 2001 From: PythonFZ Date: Thu, 25 Jul 2024 13:40:52 +0200 Subject: [PATCH 1/2] fix cwd patch in newer ASE version --- ipsuite/calculators/cp2k.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ipsuite/calculators/cp2k.py b/ipsuite/calculators/cp2k.py index 6b63bce9..167804ce 100644 --- a/ipsuite/calculators/cp2k.py +++ b/ipsuite/calculators/cp2k.py @@ -77,7 +77,7 @@ def _update_paths(cp2k_input_dict) -> dict: ) -def _update_cmd(cp2k_cmd: str, env="IPSUITE_CP2K_SHELL") -> str: +def _update_cmd(cp2k_cmd: str|None, env="IPSUITE_CP2K_SHELL") -> str: """Update the shell command to run cp2k.""" if cp2k_cmd is None: # Load from environment variable IPSUITE_CP2K_SHELL @@ -259,7 +259,7 @@ def get_calculator(self, directory: str = None): shutil.copy(restart_wfn, directory / "cp2k-RESTART.wfn") patch( - "ase.calculators.cp2k.Popen", + "ase.calculators.cp2k.subprocess.Popen", wraps=functools.partial(subprocess.Popen, cwd=directory), ).start() From 4f900b25d77ec17f4635d5b30819061b77ee3268 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 13:43:24 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- ipsuite/calculators/cp2k.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipsuite/calculators/cp2k.py b/ipsuite/calculators/cp2k.py index 167804ce..f33d3544 100644 --- a/ipsuite/calculators/cp2k.py +++ b/ipsuite/calculators/cp2k.py @@ -77,7 +77,7 @@ def _update_paths(cp2k_input_dict) -> dict: ) -def _update_cmd(cp2k_cmd: str|None, env="IPSUITE_CP2K_SHELL") -> str: +def _update_cmd(cp2k_cmd: str | None, env="IPSUITE_CP2K_SHELL") -> str: """Update the shell command to run cp2k.""" if cp2k_cmd is None: # Load from environment variable IPSUITE_CP2K_SHELL