Skip to content

Commit 2a610ad

Browse files
committed
Format black
1 parent bcd19e6 commit 2a610ad

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

structuretoolkit/analyse/snap.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -545,9 +545,9 @@ def _extract_computes_snap(
545545
np.ndarray: Output of the LAMMPS compute command
546546
"""
547547
lmp_atom_ids = lmp.numpy.extract_atom_iarray("id", num_atoms).flatten()
548-
assert np.all(lmp_atom_ids == 1 + np.arange(num_atoms)), (
549-
"LAMMPS seems to have lost atoms"
550-
)
548+
assert np.all(
549+
lmp_atom_ids == 1 + np.arange(num_atoms)
550+
), "LAMMPS seems to have lost atoms"
551551

552552
# Extract types
553553
lmp_types = lmp.numpy.extract_atom_iarray(name="type", nelem=num_atoms).flatten()
@@ -569,16 +569,16 @@ def _extract_computes_snap(
569569

570570
lmp_dbarr = _extract_compute_np(lmp, "db", 1, 2, (num_atoms, num_types, 3, n_coeff))
571571
lmp_dbsum = _extract_compute_np(lmp, "db_sum", 0, 1, (num_types, 3, n_coeff))
572-
assert np.allclose(lmp_dbsum, lmp_dbarr.sum(axis=0), rtol=1e-12, atol=1e-12), (
573-
"db_sum doesn't match sum of db"
574-
)
572+
assert np.allclose(
573+
lmp_dbsum, lmp_dbarr.sum(axis=0), rtol=1e-12, atol=1e-12
574+
), "db_sum doesn't match sum of db"
575575
db_atom = np.transpose(lmp_dbarr, (0, 2, 1, 3))
576576

577577
lmp_vbarr = _extract_compute_np(lmp, "vb", 1, 2, (num_atoms, num_types, 6, n_coeff))
578578
lmp_vbsum = _extract_compute_np(lmp, "vb_sum", 0, 1, (num_types, 6, n_coeff))
579-
assert np.allclose(lmp_vbsum, lmp_vbarr.sum(axis=0), rtol=1e-12, atol=1e-12), (
580-
"vb_sum doesn't match sum of vb"
581-
)
579+
assert np.allclose(
580+
lmp_vbsum, lmp_vbarr.sum(axis=0), rtol=1e-12, atol=1e-12
581+
), "vb_sum doesn't match sum of vb"
582582
vb_sum = np.transpose(lmp_vbsum, (1, 0, 2)) / lmp_volume * eV_div_A3_to_bar
583583

584584
dbatom_shape = db_atom.shape

0 commit comments

Comments
 (0)