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 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")
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 close(self): pmi.call(self.pmiobject, "close") # Sort file if flag is set to true. if self.pmiobject.do_sort: h5 = h5py.File(self.pmiobject.filename, 'r+') print('Sorting file, please wait...') sort_file(h5) print('File sorted') h5.close()
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 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 fxxx(self): pmi.call(self.pmiobject, 'fxxx')
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"