pylammps: append_cmd_history

This commit is contained in:
yuhldr
2024-04-14 17:17:36 +08:00
parent db1598fb08
commit cc721816df

View File

@ -532,6 +532,18 @@ class PyLammps(object):
"""
self._cmd_history = []
def append_cmd_history(self, cmd):
"""
Commands will be recorded but not execute
Add `run steps` only to the command history, but do not execute the run command.
Convenient batch create Lammps script files, use
:py:meth:`PyLammps.write_script()`.
"""
self._cmd_history.append(cmd)
def command(self, cmd):
"""
Execute LAMMPS command