Merge pull request #4135 from yuhldr/develop

pylammps small changes and bugfixes
This commit is contained in:
Axel Kohlmeyer
2024-04-15 14:13:20 -04:00
committed by GitHub

View File

@ -196,7 +196,7 @@ class Atom(object):
:type: float
"""
return self.get("mass", self.index)
return self.get("mass", self.type)
@property
def radius(self):
@ -532,6 +532,18 @@ class PyLammps(object):
"""
self._cmd_history = []
def append_cmd_history(self, cmd):
"""
Commands will be added to the command history but not executed.
Add `commands` only to the command history, but do not execute them, so that you can
conveniently create Lammps input files, using
:py:meth:`PyLammps.write_script()`.
"""
self._cmd_history.append(cmd)
def command(self, cmd):
"""
Execute LAMMPS command