Skip to content

Commit

Permalink
Merge branch 'copilot' of github.com:pyiron/pylammpsmpi into copilot
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Aug 2, 2024
2 parents 09ee52d + bbfead9 commit 764de40
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
23 changes: 18 additions & 5 deletions pylammpsmpi/wrapper/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Distributed under the terms of "New BSD License", see the LICENSE file.

from typing import List, Union

from pylammpsmpi.wrapper.concurrent import LammpsConcurrent

__author__ = "Sarath Menon, Jan Janssen"
Expand Down Expand Up @@ -178,8 +179,13 @@ def reset_box(self, *args) -> None:
_ = super().reset_box(*args).result()

def generate_atoms(
self, ids: List[int] = None, type: List[int] = None, x: List[float] = None,
v: List[float] = None, image: List[int] = None, shrinkexceed: bool = False
self,
ids: List[int] = None,
type: List[int] = None,
x: List[float] = None,
v: List[float] = None,
image: List[int] = None,
shrinkexceed: bool = False,
) -> None:
"""
Create atoms on all procs
Expand Down Expand Up @@ -215,9 +221,16 @@ def generate_atoms(
.result()
)

def create_atoms(self, n: int, id: List[int], type: List[int], x: List[float],
v: List[float] = None, image: List[int] = None,
shrinkexceed: bool = False) -> None:
def create_atoms(
self,
n: int,
id: List[int],
type: List[int],
x: List[float],
v: List[float] = None,
image: List[int] = None,
shrinkexceed: bool = False,
) -> None:
"""
Create atoms on all procs
Expand Down
6 changes: 4 additions & 2 deletions pylammpsmpi/wrapper/concurrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import sys
from concurrent.futures import Future
from queue import Queue
from typing import Optional, List, Any
from typing import Any, List, Optional

from executorlib.shared import (
MpiExecInterface,
Expand Down Expand Up @@ -315,7 +315,9 @@ def generate_atoms(
ids=ids, type=type, x=x, v=v, image=image, shrinkexceed=shrinkexceed
)

def create_atoms(self, n, id, type, x, v=None, image=None, shrinkexceed=False) -> Future:
def create_atoms(
self, n, id, type, x, v=None, image=None, shrinkexceed=False
) -> Future:
"""
Create atoms on all processors.
Expand Down
1 change: 1 addition & 0 deletions pylammpsmpi/wrapper/extended.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Distributed under the terms of "New BSD License", see the LICENSE file.

from typing import Any, List, Optional

from pylammpsmpi.wrapper.base import LammpsConcurrent

__author__ = "Sarath Menon, Jan Janssen"
Expand Down

0 comments on commit 764de40

Please sign in to comment.