def rem(self, ids): def select(location, id, ids, locations): if id in ids: locations.append(str(location)) locations = [] Molecule.foreach( self, lambda data: select(data[0][1], data[1][1], ids, locations) ) Molecule.rem(self, ",".join(locations))
def foreachId(self, sink): Molecule.foreach(self, lambda data: sink(data[0][1]))
def foreachRecord(self, columns, sink): Molecule.foreach( self, lambda data: sink(data[0][1], self.fetchRecord(data[0][1], columns)))
def foreachStructure(self, sink, download=None, other=None): Molecule.foreach( self, lambda data: self.fetch(data[0][1], sink, download, other))
def foreachRecord(self, columns, sink): colist = columns.split(',') Molecule.foreach( self, lambda data: sink(data[1][1], self.fetchRecord(data[1][1], columns, colist) ) )