Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions notebooks/lammps_local.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"lmp = LammpsLibrary(cores=2, mode=\"local\")"
"lmp = LammpsLibrary(cores=2)"
]
},
{
Expand Down
3 changes: 0 additions & 3 deletions pylammpsmpi/wrapper/extended.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ class LammpsLibrary:
oversubscribe (bool): Whether to oversubscribe CPU cores (default: False)
working_directory (str): Path to the working directory (default: ".")
client: Client object for distributed computing (default: None)
mode (str): Mode of operation (default: "local")
cmdargs: Additional command line arguments for Lammps (default: None)
"""

Expand All @@ -255,14 +254,12 @@ def __init__(
oversubscribe: bool = False,
working_directory: str = ".",
client: Any = None,
mode: str = "local",
cmdargs: Optional[list[str]] = None,
) -> None:
self.cores = cores
self.working_directory = working_directory
self.oversubscribe = oversubscribe
self.client = client
self.mode = mode
self.lmp = LammpsConcurrent(
cores=self.cores,
oversubscribe=self.oversubscribe,
Expand Down
12 changes: 6 additions & 6 deletions tests/test_ase_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_static(self):
comm=None,
logger=logging.getLogger("TestStaticLogger"),
log_file=None,
library=LammpsLibrary(cores=2, mode="local"),
library=LammpsLibrary(cores=2),
disable_log_file=True,
)
structure = bulk("Al", cubic=True).repeat([2, 2, 2])
Expand Down Expand Up @@ -84,7 +84,7 @@ def test_small_displacement(self):
comm=None,
logger=logging.getLogger("TestStaticLogger"),
log_file=None,
library=LammpsLibrary(cores=2, mode="local"),
library=LammpsLibrary(cores=2),
disable_log_file=True,
)
structure = bulk("Al", cubic=True)
Expand Down Expand Up @@ -128,7 +128,7 @@ def test_small_displacement_skewed(self):
comm=None,
logger=logging.getLogger("TestStaticLogger"),
log_file=None,
library=LammpsLibrary(cores=2, mode="local"),
library=LammpsLibrary(cores=2),
disable_log_file=True,
)
structure = bulk("Al").repeat([2, 2, 2])
Expand Down Expand Up @@ -417,7 +417,7 @@ def test_individual_calculation(self):
comm=None,
logger=logging.getLogger("TestStaticLogger"),
log_file=None,
library=LammpsLibrary(cores=2, mode="local"),
library=LammpsLibrary(cores=2),
disable_log_file=True,
)
lmp.interactive_structure_setter(
Expand All @@ -442,7 +442,7 @@ def test_interactive_calculation(self):
comm=None,
logger=logging.getLogger("TestStaticLogger"),
log_file=None,
library=LammpsLibrary(cores=2, mode="local"),
library=LammpsLibrary(cores=2),
disable_log_file=True,
)
for structure in self.structure_lst:
Expand All @@ -468,7 +468,7 @@ def test_interactive_calculation_inverse(self):
comm=None,
logger=logging.getLogger("TestStaticLogger"),
log_file=None,
library=LammpsLibrary(cores=2, mode="local"),
library=LammpsLibrary(cores=2),
disable_log_file=True,
)
for structure in self.structure_lst[::-1]:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_exception.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def test_overlapping_atoms(self):
with open("in.error", "w") as f:
f.writelines(lmp_str)
with self.assertRaises(Exception):
lmp = LammpsLibrary(cores=2, mode="local")
lmp = LammpsLibrary(cores=2)
lmp.file("in.error")

def tearDown(self):
Expand Down
4 changes: 1 addition & 3 deletions tests/test_pylammpsmpi_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ def setUpClass(cls):
cls.execution_path = os.path.dirname(os.path.abspath(__file__))
cls.citation_file = os.path.join(cls.execution_path, "citations.txt")
cls.lammps_file = os.path.join(cls.execution_path, "in.simple")
cls.lmp = LammpsLibrary(
cores=2, mode="local", cmdargs=["-cite", cls.citation_file]
)
cls.lmp = LammpsLibrary(cores=2, cmdargs=["-cite", cls.citation_file])
cls.lmp.file(cls.lammps_file)

@classmethod
Expand Down
Loading