make PyLammps() constructor take the same arguments as lammps() and forward them as needed

This commit is contained in:
Axel Kohlmeyer
2016-07-18 21:15:51 -04:00
parent 052de8440f
commit fcd4d7ceb7

View File

@ -387,9 +387,12 @@ class PyLammps(object):
See examples/ipython for usage
"""
def __init__(self, lmp=lammps()):
def __init__(self,name="",cmdargs=None,ptr=None,comm=None):
if ptr:
self.lmp = ptr
else:
self.lmp = lammps(name=name,cmdargs=cmdargs,ptr=None,comm=comm)
print("LAMMPS output is captured by PyLammps wrapper")
self.lmp = lmp
@property
def atoms(self):