Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 13, 2025
1 parent b50fae4 commit e1b9ae8
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 28 deletions.
24 changes: 12 additions & 12 deletions notebooks/integration/InteractiveOutputTest.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@
],
"source": [
"for i in range(10):\n",
" assert (\n",
" j.output.forces.shape[0] == i + 1\n",
" ), \"Forces shape does not match number of taken steps\"\n",
" assert (\n",
" j.output.cells.shape[0] == i + 1\n",
" ), \"Cells shape does not match number of taken steps\"\n",
" assert j.output.forces.shape[0] == i + 1, (\n",
" \"Forces shape does not match number of taken steps\"\n",
" )\n",
" assert j.output.cells.shape[0] == i + 1, (\n",
" \"Cells shape does not match number of taken steps\"\n",
" )\n",
" j.structure.positions[0, :] += [0.1, 0.1, 0.1]\n",
" j.run()"
]
Expand Down Expand Up @@ -213,12 +213,12 @@
"metadata": {},
"outputs": [],
"source": [
"assert (\n",
" j.output.forces.shape == jl.output.forces.shape\n",
"), \"Forces shape not identical after re-loading the job\"\n",
"assert (\n",
" j.output.cells.shape == jl.output.cells.shape\n",
"), \"Cells shape not identical after re-loading the job\""
"assert j.output.forces.shape == jl.output.forces.shape, (\n",
" \"Forces shape not identical after re-loading the job\"\n",
")\n",
"assert j.output.cells.shape == jl.output.cells.shape, (\n",
" \"Cells shape not identical after re-loading the job\"\n",
")"
]
}
],
Expand Down
24 changes: 12 additions & 12 deletions pyiron_atomistics/sphinx/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1032,15 +1032,15 @@ def set_convergence_precision(
ionic_force_tolerance = ionic_forces
if ionic_energy is not None:
ionic_energy_tolerance = ionic_energy
assert (
ionic_energy_tolerance is None or ionic_energy_tolerance > 0
), "ionic_energy_tolerance must be a positive float"
assert (
ionic_force_tolerance is None or ionic_force_tolerance > 0
), "ionic_force_tolerance must be a positive float"
assert (
electronic_energy is None or electronic_energy > 0
), "electronic_energy must be a positive float"
assert ionic_energy_tolerance is None or ionic_energy_tolerance > 0, (
"ionic_energy_tolerance must be a positive float"
)
assert ionic_force_tolerance is None or ionic_force_tolerance > 0, (
"ionic_force_tolerance must be a positive float"
)
assert electronic_energy is None or electronic_energy > 0, (
"electronic_energy must be a positive float"
)
if ionic_energy_tolerance is not None or ionic_force_tolerance is not None:
# self.input["dE"] = ionic_energy_tolerance
# self.input["dF"] = ionic_force_tolerance
Expand Down Expand Up @@ -1312,9 +1312,9 @@ def _get_potential_path(
potential_path = potentials.find_potential_file(
path=potentials.find_default(new_element)["Filename"].values[0][0]
)
assert os.path.isfile(
potential_path
), "such a file does not exist in the pp directory"
assert os.path.isfile(potential_path), (
"such a file does not exist in the pp directory"
)
elif elem in modified_elements.keys():
new_element = modified_elements[elem]
if os.path.isabs(new_element):
Expand Down
4 changes: 2 additions & 2 deletions pyiron_atomistics/sphinx/output_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,8 @@ def get_psi_rec(self, i, ispin, ik, compact=False):
ispin = np.arange(self.n_spin)[ispin]

off = self._n_gk[ik] * (i + ispin * self.n_states)
psire = self.wfile[f"psi-{ik+1}.re"][off : off + self._n_gk[ik]]
psiim = self.wfile[f"psi-{ik+1}.im"][off : off + self._n_gk[ik]]
psire = self.wfile[f"psi-{ik + 1}.re"][off : off + self._n_gk[ik]]
psiim = self.wfile[f"psi-{ik + 1}.im"][off : off + self._n_gk[ik]]
compact_wave = psire + 1j * psiim
if compact:
return compact_wave
Expand Down
2 changes: 1 addition & 1 deletion tests/atomic/master/test_murnaghan.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def test_fitting_routines(self):
ax=ax,
plot_kwargs={"color": "black", "label": f"plot{i}", "marker": "x"},
)
ax.set_title(f"Axis {i+1}")
ax.set_title(f"Axis {i + 1}")
self.assertEqual(len(ax.lines), 2)
with self.subTest(msg="standard polynomial fit"):
self.assertAlmostEqual(-90.71969974284912, murn.equilibrium_energy)
Expand Down
2 changes: 1 addition & 1 deletion tests/vasp/test_vasp.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ def test_kspacing(self):
self.assertNotIn(
"KPOINTS",
job_kspace.files.list(),
"'KPOINTS' file written even when " "KPACING tag is present in INCAR",
"'KPOINTS' file written even when KPACING tag is present in INCAR",
)

self.assertTrue(len(w) <= 2)
Expand Down

0 comments on commit e1b9ae8

Please sign in to comment.