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 Feb 5, 2025
1 parent 52b9123 commit 450593a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pylammpsmpi/mpi/lmpmpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def gather_atoms(job, funct_args):
# number of atoms - first dimension
val = list(val)
dim = atom_properties[name]["dim"]
data = [val[x:x + dim] for x in range(0, len(val), dim)] if dim > 1 else list(val)
data = [val[x : x + dim] for x in range(0, len(val), dim)] if dim > 1 else list(val)
return np.array(data)


Expand All @@ -230,7 +230,7 @@ def gather_atoms_concat(job, funct_args):
# number of atoms - first dimension
val = list(val)
dim = atom_properties[name]["dim"]
data = [val[x:x + dim] for x in range(0, len(val), dim)] if dim > 1 else list(val)
data = [val[x : x + dim] for x in range(0, len(val), dim)] if dim > 1 else list(val)
return np.array(data)


Expand Down Expand Up @@ -264,7 +264,7 @@ def gather_atoms_subset(job, funct_args):
# number of atoms - first dimension
val = list(val)
dim = atom_properties[name]["dim"]
data = [val[x:x + dim] for x in range(0, len(val), dim)] if dim > 1 else list(val)
data = [val[x : x + dim] for x in range(0, len(val), dim)] if dim > 1 else list(val)
return np.array(data)


Expand Down
6 changes: 4 additions & 2 deletions pylammpsmpi/wrapper/ase.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ def interactive_cells_setter(self, cell: np.ndarray) -> None:
lx, ly, lz, xy, xz, yz = self._prism.get_lammps_prism()
if not _check_ortho_prism(prism=self._prism):
warnings.warn(
"Warning: setting upper trangular matrix might slow down the calculation", stacklevel=2
"Warning: setting upper trangular matrix might slow down the calculation",
stacklevel=2,
)

is_skewed = cell_is_skewed(cell=cell, tolerance=1.0e-8)
Expand Down Expand Up @@ -221,7 +222,8 @@ def interactive_structure_setter(
self._prism = Prism(structure.cell)
if not _check_ortho_prism(prism=self._prism):
warnings.warn(
"Warning: setting upper trangular matrix might slow down the calculation", stacklevel=2
"Warning: setting upper trangular matrix might slow down the calculation",
stacklevel=2,
)
xhi, yhi, zhi, xy, xz, yz = self._prism.get_lammps_prism()
if self._prism.is_skewed():
Expand Down

0 comments on commit 450593a

Please sign in to comment.