Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix cwd patch in newer ASE version #318

Merged
merged 2 commits into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ipsuite/calculators/cp2k.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()

Expand Down
Loading