Skip to content

Commit 8c6adc6

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent ff7c01d commit 8c6adc6

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

src/aiida_sssp_workflow/calculations/calculate_bands_distance.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ def calculate_eta_and_max_diff(
119119
weight_a = bandsdata_a.get("weights")
120120
weight_b = bandsdata_b.get("weights")
121121
weight = weight_a
122-
assert np.allclose(
123-
weight_a, weight_b
124-
), "Different weight of kpoints of two calculation."
122+
assert np.allclose(weight_a, weight_b), (
123+
"Different weight of kpoints of two calculation."
124+
)
125125

126126
bands_a = bandsdata_a.get("bands")
127127
bands_b = bandsdata_b.get("bands")
@@ -205,10 +205,11 @@ def get_bands_distance(
205205
# swap to make sure a is less electrons pseudo
206206
bandsdata_a, bandsdata_b = bandsdata_b, bandsdata_a
207207

208-
assert (
209-
int(bandsdata_b["number_of_electrons"])
210-
>= int(bandsdata_a["number_of_electrons"])
211-
), f"Need to be less num_bands in a {bandsdata_a['number_of_electrons']} than b {bandsdata_b['number_of_electrons']}"
208+
assert int(bandsdata_b["number_of_electrons"]) >= int(
209+
bandsdata_a["number_of_electrons"]
210+
), (
211+
f"Need to be less num_bands in a {bandsdata_a['number_of_electrons']} than b {bandsdata_b['number_of_electrons']}"
212+
)
212213

213214
num_electrons_a = int(bandsdata_a["number_of_electrons"])
214215
num_electrons_b = int(bandsdata_b["number_of_electrons"])
@@ -238,9 +239,9 @@ def get_bands_distance(
238239

239240
# after cut and align in retrive band, the shapes are same now
240241
# import ipdb; ipdb.set_trace()
241-
assert np.shape(bandsdata_a["bands"]) == np.shape(
242-
bandsdata_b["bands"]
243-
), f'{np.shape(bandsdata_a["bands"])} != {np.shape(bandsdata_b["bands"])}'
242+
assert np.shape(bandsdata_a["bands"]) == np.shape(bandsdata_b["bands"]), (
243+
f"{np.shape(bandsdata_a['bands'])} != {np.shape(bandsdata_b['bands'])}"
244+
)
244245

245246
# eta_v
246247
fermi_shift_v = 0.0

src/aiida_sssp_workflow/cli/inspect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ def inspect(node, output):
469469

470470
color = "red" if wfc_scan_healthy != 1 or rho_scan_healthy != 1 else "green"
471471
click.secho(
472-
f"Convergence scan healthy check for {property}: wavefunction scan = {round(wfc_scan_healthy*100, 2)}%, charge density scan = {round(rho_scan_healthy*100, 2)}%",
472+
f"Convergence scan healthy check for {property}: wavefunction scan = {round(wfc_scan_healthy * 100, 2)}%, charge density scan = {round(rho_scan_healthy * 100, 2)}%",
473473
fg=color,
474474
)
475475

src/aiida_sssp_workflow/utils/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def get_magnetic_inputs(structure: orm.StructureData):
164164
if kind_name in ["Mn", "O", "Cr"]:
165165
for i, site in enumerate(structure.sites):
166166
mag_structure.append_atom(
167-
position=site.position, symbols=kind_name, name=f"{kind_name}{i+1}"
167+
position=site.position, symbols=kind_name, name=f"{kind_name}{i + 1}"
168168
)
169169

170170
if kind_name == "Mn":

0 commit comments

Comments
 (0)