def unmask_Objects(lstexc): lstobj = cmd.get_names('objects') for obj in lstobj: if lstexc.count(str(obj)) == 0: try: type = cmd.get_type(str(obj)) if type == 'object:molecule' or type == 'selection': cmd.unmask(str(obj)) except: continue
def unmaskedman(event): try: if len(maskent.get()) < 1: showinfo("Error", 'Please enter the name of an object.') interior.mainloop() else: cmd.unmask(maskent.get()) except: showinfo("Error", 'That object is not present') interior.mainloop()
def testMask(self): cmd.fragment('ala') cmd.mask('elem C') self.assertEqual(3, cmd.count_atoms('masked')) cmd.unmask('name CA') self.assertEqual(2, cmd.count_atoms('masked'))