Skip to content

Commit

Permalink
Merge pull request #488 from pyiron/lmp_logfile
Browse files Browse the repository at this point in the history
give possibility of setting log_file in LAMMPS
  • Loading branch information
samwaseda committed Jan 6, 2022
2 parents 2667079 + 5fe772b commit e297aa8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyiron_atomistics/lammps/interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def __init__(self, project, job_name):
self._interactive_grand_canonical = True
self._interactive_water_bonds = False
self._user_fix_external = None
self._log_file = None
if "stress" in self.interactive_output_functions.keys():
del self.interactive_output_functions["stress"]

Expand Down Expand Up @@ -229,8 +230,9 @@ def interactive_initialize_interface(self):
self._create_working_directory()
if self.server.run_mode.interactive and self.server.cores == 1:
lammps = getattr(importlib.import_module("lammps"), "lammps")
log_file = os.path.join(self.working_directory, "log.lammps")
self._interactive_library = lammps(cmdargs=["-screen", "none", "-log", log_file])
if self._log_file is None:
self._log_file = os.path.join(self.working_directory, "log.lammps")
self._interactive_library = lammps(cmdargs=["-screen", "none", "-log", self._log_file])
else:
self._interactive_library = LammpsLibrary(
cores=self.server.cores,
Expand Down

0 comments on commit e297aa8

Please sign in to comment.