def addAdrATParticle(self, pid, *args): if (self.particleExists(pid)): print "WARNING: Particle ", pid, " already exists. Therefore it was not added." return None else: pmi.call(self.pmiobject, 'addAdrATParticle', pid, *args) return Particle(pid, self)
def addParticle(self, pid, pos, checkexist=True): if checkexist: if (self.particleExists(pid)): print "WARNING: Particle ", pid, " already exists. Therefore it was not added." return None else: pmi.call(self.pmiobject, 'addParticle', pid, pos) return Particle(pid, self) else: pmi.call(self.pmiobject, 'addParticle', pid, pos)
def getParticle(self, pid): if (self.particleExists(pid)): return Particle(pid, self) else: print("WARNING: Particle ", pid, " does not exist") return None