From fcd4d7ceb70964a4419e2ab56324cb5658615dc3 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 18 Jul 2016 21:15:51 -0400 Subject: [PATCH] make PyLammps() constructor take the same arguments as lammps() and forward them as needed --- python/lammps.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/lammps.py b/python/lammps.py index 168aa8fab0..23ba28a599 100644 --- a/python/lammps.py +++ b/python/lammps.py @@ -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):