def delRep(self, rep): """ Remove the given rep from the molecule.""" repname = rep.remove_molecule(self.id) if repname: repid = molrep.repindex(self.id, repname) if repid >= 0: molrep.delrep(self.id, repid)
def cleanup(self): repid = molrep.repindex(self.molid, self.gray_rep) if repid != -1: molrep.delrep(self.molid, repid) repid = molrep.repindex(self.molid, self.color_rep) if repid != -1: molrep.delrep(self.molid, repid) labels = label.listall(label.BOND) for l in labels: label.delete(label.BOND, l) if self.fig is not None: plt.close(self.fig) self.tk.unregister(self)
def clearReps(self): """ Removes all reps from this molecule.""" for i in range(molrep.num(self.id)): molrep.delrep(self.id, 0)