Skip to content

Commit

Permalink
Update cp2k.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy6M authored Jun 27, 2024
1 parent d3728fe commit 74e6dd7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fpop/cp2k.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class PrepCp2k(PrepFp):
def prep_task(
self,
conf_frame: dpdata.System,
cp2k_inputs: Cp2kInputs,
inputs: Cp2kInputs,
prepare_image_config: Optional[Dict] = None,
optional_input: Optional[Dict] = None,
optional_artifact: Optional[Dict] = None,
Expand All @@ -86,7 +86,7 @@ def prep_task(
----------
conf_frame : dpdata.System
One frame of configuration in the dpdata format.
cp2k_inputs: Cp2kInputs
inputs: Cp2kInputs
The Cp2kInputs object handles the input file of the task.
prepare_image_config: Dict, optional
Definition of runtime parameters in the process of preparing tasks.
Expand Down Expand Up @@ -116,7 +116,7 @@ def prep_task(
file.write(f"C {cell_params[2,0]:14.8f} {cell_params[2,1]:14.8f} {cell_params[2,2]:14.8f}\n")

# Write the CP2K input file content
Path('input.inp').write_text(cp2k_inputs.inp_template)
Path('input.inp').write_text(inputs.inp_template)

# Copy optional files to the working directory
if optional_artifact:
Expand Down Expand Up @@ -188,7 +188,7 @@ def run_task(
kwargs.pop("command", None)

# Execute command
ret, out, err = run_command(command, raise_error=False, **kwargs)
ret, out, err = run_command(command, raise_error=False, **kwargs) # type: ignore
if ret != 0:
raise TransientError(
"cp2k failed\n", "out msg", out, "\n", "err msg", err, "\n"
Expand Down

0 comments on commit 74e6dd7

Please sign in to comment.