@@ -545,9 +545,9 @@ def _extract_computes_snap(
545
545
np.ndarray: Output of the LAMMPS compute command
546
546
"""
547
547
lmp_atom_ids = lmp .numpy .extract_atom_iarray ("id" , num_atoms ).flatten ()
548
- assert np .all (
549
- lmp_atom_ids == 1 + np . arange ( num_atoms )
550
- ), "LAMMPS seems to have lost atoms"
548
+ assert np .all (lmp_atom_ids == 1 + np . arange ( num_atoms )), (
549
+ "LAMMPS seems to have lost atoms"
550
+ )
551
551
552
552
# Extract types
553
553
lmp_types = lmp .numpy .extract_atom_iarray (name = "type" , nelem = num_atoms ).flatten ()
@@ -569,16 +569,16 @@ def _extract_computes_snap(
569
569
570
570
lmp_dbarr = _extract_compute_np (lmp , "db" , 1 , 2 , (num_atoms , num_types , 3 , n_coeff ))
571
571
lmp_dbsum = _extract_compute_np (lmp , "db_sum" , 0 , 1 , (num_types , 3 , n_coeff ))
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"
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
+ )
575
575
db_atom = np .transpose (lmp_dbarr , (0 , 2 , 1 , 3 ))
576
576
577
577
lmp_vbarr = _extract_compute_np (lmp , "vb" , 1 , 2 , (num_atoms , num_types , 6 , n_coeff ))
578
578
lmp_vbsum = _extract_compute_np (lmp , "vb_sum" , 0 , 1 , (num_types , 6 , n_coeff ))
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"
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
+ )
582
582
vb_sum = np .transpose (lmp_vbsum , (1 , 0 , 2 )) / lmp_volume * eV_div_A3_to_bar
583
583
584
584
dbatom_shape = db_atom .shape
0 commit comments