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 clearSavedPositions(self): pmi.call(self.pmiobject, 'clearSavedPositions')
def restorePositions(self): pmi.call(self.pmiobject, 'restorePositions')
def savePositions(self, idList): pmi.call(self.pmiobject, 'clearSavedPositions') pmi.call(self.pmiobject, 'savePositions', idList)
def modifyParticle(self, pid, property, value): if (self.particleExists(pid)): pmi.call(self.pmiobject, 'modifyParticle', pid, property, value) else: print "WARNING: Particle ", pid, " does not exist and was not modified"