code: def selections_cleanup(self):
          
  
          if not len(self.plcomplex.unpaired_hba_idx) == 0:
              self.select_by_ids('Unpaired-HBA', self.plcomplex.unpaired_hba_idx, selection_exists=True)
          if not len(self.plcomplex.unpaired_hbd_idx) == 0:
              self.select_by_ids('Unpaired-HBD', self.plcomplex.unpaired_hbd_idx, selection_exists=True)
          if not len(self.plcomplex.unpaired_hal_idx) == 0:
              self.select_by_ids('Unpaired-HAL', self.plcomplex.unpaired_hal_idx, selection_exists=True)
  
          selections = cmd.get_names("selections")
          for selection in selections:
              try:
                  empty = len(cmd.get_model(selection).atom) == 0
              except:
                  empty = True
              if empty:
                  cmd.delete(selection)
          cmd.deselect()
          cmd.delete('tmp*')
          cmd.delete('ps-*')
docs: Cleans up non-used selections