예제 #1
0
 def set_rep_command(self, rep_command):
     # If nothing is selected, select everything
     if len(model.selected_atoms) < 1:
         command.select("*")
     # Turn off other representations
     for rep in (command.backbone, command.ball_and_stick, command.spacefill, command.sticks, command.wireframe):
         if rep is not rep_command:
             rep(False)
     rep_command(True)
     command.refresh()
예제 #2
0
 def load_pdb_file(self, file_name):
     try:
         self.statusBar().showMessage("Loading PDB file " + file_name + "...", 0)
         command.zap()
         command.load(file_name)
         self.statusBar().showMessage("Finished loading PDB file " + file_name, 2000)
         command.refresh()
         self.recent_files.add_file(file_name)
     except:
         self.statusBar().showMessage("Error loading PDB file " + file_name, 2000)
         raise
예제 #3
0
 def on_actionReset_center_triggered(self, checked):
     command.center("*")
     command.refresh()