From 011de632d529333179ff58491a7d15832084e218 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 23:38:23 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../workflows/convergence/cohesive_energy.py | 25 ++++++++++--------- .../workflows/transferability/eos.py | 4 ++- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/aiida_sssp_workflow/workflows/convergence/cohesive_energy.py b/src/aiida_sssp_workflow/workflows/convergence/cohesive_energy.py index 99513f3..c795769 100644 --- a/src/aiida_sssp_workflow/workflows/convergence/cohesive_energy.py +++ b/src/aiida_sssp_workflow/workflows/convergence/cohesive_energy.py @@ -189,7 +189,7 @@ def compute_xy( reference_node = orm.load_node(report.reference.uuid) output_parameters_r: orm.Dict = reference_node.outputs.output_parameters - y_ref = output_parameters_r['cohesive_energy_per_atom'] + y_ref = output_parameters_r["cohesive_energy_per_atom"] xs = [] ys = [] @@ -198,24 +198,25 @@ def compute_xy( if node_point.exit_status != 0: # TODO: log to a warning file for where the node is not finished_okay continue - + x = node_point.wavefunction_cutoff xs.append(x) node = orm.load_node(node_point.uuid) output_parameters_p: orm.Dict = node.outputs.output_parameters - y = (output_parameters_p['cohesive_energy_per_atom'] - y_ref) / y_ref * 100 + y = (output_parameters_p["cohesive_energy_per_atom"] - y_ref) / y_ref * 100 ys.append(y) - ys_cohesive_energy_per_atom.append(output_parameters_p['cohesive_energy_per_atom']) + ys_cohesive_energy_per_atom.append( + output_parameters_p["cohesive_energy_per_atom"] + ) return { - 'xs': xs, - 'ys': ys, - 'ys_relative_diff': ys, - 'ys_cohesive_energy_per_atom': ys_cohesive_energy_per_atom, - 'metadata': { - 'unit': '%', - } + "xs": xs, + "ys": ys, + "ys_relative_diff": ys, + "ys_cohesive_energy_per_atom": ys_cohesive_energy_per_atom, + "metadata": { + "unit": "%", + }, } - diff --git a/src/aiida_sssp_workflow/workflows/transferability/eos.py b/src/aiida_sssp_workflow/workflows/transferability/eos.py index ea60d05..c77f3b8 100644 --- a/src/aiida_sssp_workflow/workflows/transferability/eos.py +++ b/src/aiida_sssp_workflow/workflows/transferability/eos.py @@ -472,7 +472,9 @@ def extract_eos( continue raw_eos[k] = point_node.outputs.eos.output_volume_energy.get_dict() - birch_murnaghan_fit[k] = point_node.outputs.eos.output_birch_murnaghan_fit.get_dict() + birch_murnaghan_fit[k] = ( + point_node.outputs.eos.output_birch_murnaghan_fit.get_dict() + ) metric_dict[k] = point_node.outputs.output_parameters.get_dict() return raw_eos, birch_murnaghan_fit, metric_dict