diff options
author | Mark Sims <mark@nanorex.com> | 2008-12-22 02:18:57 +0000 |
---|---|---|
committer | Mark Sims <mark@nanorex.com> | 2008-12-22 02:18:57 +0000 |
commit | 33bddf0891338973556f01abe91ee2e678f77e3d (patch) | |
tree | 7cc9570b08f0d00e8c69ea67a7147fb15fd450ad | |
parent | dcd7bc35fafd8987d1754bdcc88316cc6f78d26a (diff) | |
download | nanoengineer-theirix-33bddf0891338973556f01abe91ee2e678f77e3d.tar.gz nanoengineer-theirix-33bddf0891338973556f01abe91ee2e678f77e3d.zip |
-rw-r--r-- | cad/src/commandSequencer/builtin_command_loaders.py | 4 | ||||
-rwxr-xr-x | cad/src/ne1_ui/MWsemantics.py | 10 | ||||
-rw-r--r-- | cad/src/ne1_ui/ToolTipText_for_CommandToolbars.py | 2 | ||||
-rw-r--r-- | cad/src/ne1_ui/WhatsThisText_for_CommandToolbars.py | 8 | ||||
-rw-r--r-- | cad/src/ne1_ui/toolbars/Ui_ProteinFlyout.py | 28 | ||||
-rw-r--r-- | cad/src/protein/ProteinSequenceEditor/ProteinSequenceEditor.py | 4 | ||||
-rw-r--r-- | cad/src/protein/commands/EditProtein/EditProtein_Command.py (renamed from cad/src/protein/commands/EditRotamers/EditRotamers_Command.py) | 18 | ||||
-rw-r--r-- | cad/src/protein/commands/EditProtein/EditProtein_PropertyManager.py (renamed from cad/src/protein/commands/EditRotamers/EditRotamers_PropertyManager.py) | 25 | ||||
-rw-r--r-- | cad/src/protein/commands/EditProtein/__init__.py (renamed from cad/src/protein/commands/EditRotamers/__init__.py) | 0 | ||||
-rw-r--r-- | cad/src/protein/model/Protein.py | 6 | ||||
-rw-r--r-- | cad/src/protein/model/Residue.py | 2 | ||||
-rw-r--r-- | cad/src/ui/actions/Command Toolbar/BuildProtein/EditProtein.png | bin | 0 -> 333 bytes |
12 files changed, 55 insertions, 52 deletions
diff --git a/cad/src/commandSequencer/builtin_command_loaders.py b/cad/src/commandSequencer/builtin_command_loaders.py index 6ba93a48f..b894c4596 100644 --- a/cad/src/commandSequencer/builtin_command_loaders.py +++ b/cad/src/commandSequencer/builtin_command_loaders.py @@ -82,7 +82,7 @@ from dna.commands.ConvertDna.ConvertDna_Command import ConvertDna_Command # Protein commands from protein.commands.InsertPeptide.InsertPeptide_EditCommand import InsertPeptide_EditCommand from protein.commands.ProteinDisplayStyle.ProteinDisplayStyle_Command import ProteinDisplayStyle_Command -from protein.commands.EditRotamers.EditRotamers_Command import EditRotamers_Command +from protein.commands.EditProtein.EditProtein_Command import EditProtein_Command from protein.commands.EditResidues.EditResidues_Command import EditResidues_Command from protein.commands.CompareProteins.CompareProteins_Command import CompareProteins_Command @@ -171,7 +171,7 @@ def preloaded_command_classes(): InsertPeptide_EditCommand, ProteinDisplayStyle_Command, LightingScheme_Command, - EditRotamers_Command, + EditProtein_Command, EditResidues_Command, CompareProteins_Command, ModelProtein_Command, diff --git a/cad/src/ne1_ui/MWsemantics.py b/cad/src/ne1_ui/MWsemantics.py index 34529f67e..1633bd870 100755 --- a/cad/src/ne1_ui/MWsemantics.py +++ b/cad/src/ne1_ui/MWsemantics.py @@ -1414,7 +1414,7 @@ class MWsemantics(QMainWindow, """ protein = "" if self.commandSequencer.currentCommand.commandName == 'BUILD_PROTEIN' or \ - self.commandSequencer.currentCommand.commandName == 'EDIT_ROTAMERS' or \ + self.commandSequencer.currentCommand.commandName == 'EDIT_PROTEIN' or \ self.commandSequencer.currentCommand.commandName == 'EDIT_RESIDUES': protein = self.commandSequencer.currentCommand.propMgr.current_protein @@ -1662,15 +1662,15 @@ class MWsemantics(QMainWindow, self.enterOrExitTemporaryCommand('EDIT_PROTEIN_DISPLAY_STYLE') - def enterEditRotamersCommand(self, isChecked = False): + def enterEditProteinCommand(self, isChecked = False): """ Enter edit rotamers command - @param isChecked: If enterEditRotamersCommand button in the + @param isChecked: If enterEditProteinCommand button in the Protein Flyout toolbar is - checked, enter enterEditRotamersMode. + checked, enter enterEditProteinMode. @type isChecked: bool """ - self.enterOrExitTemporaryCommand('EDIT_ROTAMERS') + self.enterOrExitTemporaryCommand('EDIT_PROTEIN') def enterEditResiduesCommand(self, isChecked = False): diff --git a/cad/src/ne1_ui/ToolTipText_for_CommandToolbars.py b/cad/src/ne1_ui/ToolTipText_for_CommandToolbars.py index def794aa5..fd2c27ff5 100644 --- a/cad/src/ne1_ui/ToolTipText_for_CommandToolbars.py +++ b/cad/src/ne1_ui/ToolTipText_for_CommandToolbars.py @@ -45,7 +45,7 @@ def toolTipTextForProteinCommandToolbar(commandToolbar): commandToolbar.simulateProteinAction.setToolTip("Simulate Protein using Rosetta") commandToolbar.buildPeptideAction.setToolTip("Insert Peptide") - commandToolbar.editRotamersAction.setToolTip("Edit Rotamers") + commandToolbar.editProteinAction.setToolTip("Edit Protein") commandToolbar.compareProteinsAction.setToolTip("Compare Proteins") commandToolbar.displayProteinStyleAction.setToolTip("Edit Protein Display Style") diff --git a/cad/src/ne1_ui/WhatsThisText_for_CommandToolbars.py b/cad/src/ne1_ui/WhatsThisText_for_CommandToolbars.py index c4ec7bde7..34e88785b 100644 --- a/cad/src/ne1_ui/WhatsThisText_for_CommandToolbars.py +++ b/cad/src/ne1_ui/WhatsThisText_for_CommandToolbars.py @@ -266,11 +266,11 @@ def whatsThisTextForProteinCommandToolbar(commandToolbar): in the <a href=Property_Manager>property manager</a>. </p>""") - commandToolbar.editRotamersAction.setWhatsThis( - """<b>Edit Rotamers</b> + commandToolbar.editProteinAction.setWhatsThis( + """<b>Edit Protein</b> <p> - <img source=\"ui/actions/Command Toolbar/BuildProtein/Rotamers.png\"><br> - Edit rotamers in a peptide chain. + <img source=\"ui/actions/Command Toolbar/BuildProtein/EditProtein.png\"><br> + Edit the selected protein. </p>""") commandToolbar.compareProteinsAction.setWhatsThis( diff --git a/cad/src/ne1_ui/toolbars/Ui_ProteinFlyout.py b/cad/src/ne1_ui/toolbars/Ui_ProteinFlyout.py index fc498924d..74f75e03b 100644 --- a/cad/src/ne1_ui/toolbars/Ui_ProteinFlyout.py +++ b/cad/src/ne1_ui/toolbars/Ui_ProteinFlyout.py @@ -86,7 +86,7 @@ class ProteinFlyout(Ui_AbstractFlyout): #Command list for the subcontrol area button 'Model Proteins Tool' modelProteinsCmdLst = [] modelProteinsCmdLst.append(self.buildPeptideAction) - modelProteinsCmdLst.append(self.editRotamersAction) + modelProteinsCmdLst.append(self.editProteinAction) modelProteinsCmdLst.append(self.compareProteinsAction) modelProteinsCmdLst.append(self.displayProteinStyleAction) commandActionLists[2].extend(modelProteinsCmdLst) @@ -103,7 +103,7 @@ class ProteinFlyout(Ui_AbstractFlyout): else: modelProteinsCmdLst = [] modelProteinsCmdLst.append(self.buildPeptideAction) - modelProteinsCmdLst.append(self.editRotamersAction) + modelProteinsCmdLst.append(self.editProteinAction) modelProteinsCmdLst.append(self.compareProteinsAction) modelProteinsCmdLst.append(self.displayProteinStyleAction) commandActionLists[0].extend(modelProteinsCmdLst) @@ -191,12 +191,12 @@ class ProteinFlyout(Ui_AbstractFlyout): self.buildPeptideAction.setIcon( geticon("ui/actions/Command Toolbar/BuildProtein/InsertPeptide.png")) - self.editRotamersAction = \ + self.editProteinAction = \ NE1_QWidgetAction(self.subControlActionGroupForModelProtein, win = self.win) - self.editRotamersAction.setText("Rotamers") - self.editRotamersAction.setCheckable(True) - self.editRotamersAction.setIcon( - geticon("ui/actions/Command Toolbar/BuildProtein/EditRotamers.png")) + self.editProteinAction.setText("Protein") + self.editProteinAction.setCheckable(True) + self.editProteinAction.setIcon( + geticon("ui/actions/Command Toolbar/BuildProtein/EditProtein.png")) self.compareProteinsAction = \ NE1_QWidgetAction(self.subControlActionGroupForModelProtein, win = self.win) @@ -215,7 +215,7 @@ class ProteinFlyout(Ui_AbstractFlyout): self.subControlActionGroupForModelProtein.addAction(self.buildPeptideAction) self.subControlActionGroupForModelProtein.addAction(self.displayProteinStyleAction) self.subControlActionGroupForModelProtein.addAction(self.compareProteinsAction) - self.subControlActionGroupForModelProtein.addAction(self.editRotamersAction) + self.subControlActionGroupForModelProtein.addAction(self.editProteinAction) return def _createSimulateProteinsActions(self, parentWidget): @@ -313,9 +313,9 @@ class ProteinFlyout(Ui_AbstractFlyout): SIGNAL("triggered(bool)"), self.activateInsertPeptide_EditCommand) - change_connect(self.editRotamersAction, + change_connect(self.editProteinAction, SIGNAL("triggered(bool)"), - self.activateEditRotamers_EditCommand) + self.activateEditProtein_EditCommand) change_connect(self.editResiduesAction, SIGNAL("triggered(bool)"), self.activateEditResidues_EditCommand) @@ -412,15 +412,15 @@ class ProteinFlyout(Ui_AbstractFlyout): if action is not self.buildPeptideAction and action.isChecked(): action.setChecked(False) - def activateEditRotamers_EditCommand(self, isChecked): + def activateEditProtein_EditCommand(self, isChecked): """ - Slot for B{EditRotamers} action. + Slot for B{EditProtein} action. """ - self.win.enterEditRotamersCommand(isChecked) + self.win.enterEditProteinCommand(isChecked) for action in self.subControlActionGroupForModelProtein.actions(): - if action is not self.editRotamersAction and action.isChecked(): + if action is not self.editProteinAction and action.isChecked(): action.setChecked(False) def activateEditResidues_EditCommand(self, isChecked): diff --git a/cad/src/protein/ProteinSequenceEditor/ProteinSequenceEditor.py b/cad/src/protein/ProteinSequenceEditor/ProteinSequenceEditor.py index 7a6c91d44..068813554 100644 --- a/cad/src/protein/ProteinSequenceEditor/ProteinSequenceEditor.py +++ b/cad/src/protein/ProteinSequenceEditor/ProteinSequenceEditor.py @@ -612,14 +612,14 @@ class ProteinSequenceEditor(Ui_ProteinSequenceEditor): # Provide amino acid info as cursor position changes env.history.statusbar_msg("") current_command = self.win.commandSequencer.currentCommand - commandSet = ('EDIT_ROTAMERS', 'EDIT_RESIDUES') + commandSet = ('EDIT_PROTEIN', 'EDIT_RESIDUES') if current_command.commandName not in commandSet: return aa_index = min(cursorPos, self.getSequenceLength() - 1) - if current_command.commandName == 'EDIT_ROTAMERS': + if current_command.commandName == 'EDIT_PROTEIN': current_command.propMgr.setCurrentAminoAcid(aa_index) if current_command.commandName == 'EDIT_RESIDUES': current_command.propMgr._sequenceTableCellChanged(aa_index, 0) diff --git a/cad/src/protein/commands/EditRotamers/EditRotamers_Command.py b/cad/src/protein/commands/EditProtein/EditProtein_Command.py index 18552f053..a0763a8d5 100644 --- a/cad/src/protein/commands/EditRotamers/EditRotamers_Command.py +++ b/cad/src/protein/commands/EditProtein/EditProtein_Command.py @@ -9,31 +9,31 @@ import foundation.changes as changes from commands.SelectChunks.SelectChunks_GraphicsMode import SelectChunks_GraphicsMode from command_support.EditCommand import EditCommand from utilities.constants import red -from protein.commands.EditRotamers.EditRotamers_PropertyManager import EditRotamers_PropertyManager +from protein.commands.EditProtein.EditProtein_PropertyManager import EditProtein_PropertyManager # == GraphicsMode part _superclass_for_GM = SelectChunks_GraphicsMode -class EditRotamers_GraphicsMode(SelectChunks_GraphicsMode ): +class EditProtein_GraphicsMode(SelectChunks_GraphicsMode ): """ - Graphics mode for Edit Rotamers command. + Graphics mode for Edit Protein command. """ pass # == Command part -class EditRotamers_Command(EditCommand): +class EditProtein_Command(EditCommand): """ """ # class constants - GraphicsMode_class = EditRotamers_GraphicsMode + GraphicsMode_class = EditProtein_GraphicsMode - PM_class = EditRotamers_PropertyManager + PM_class = EditProtein_PropertyManager - commandName = 'EDIT_ROTAMERS' - featurename = "Edit Rotamers" + commandName = 'EDIT_PROTEIN' + featurename = "Edit Protein" from utilities.constants import CL_SUBCOMMAND command_level = CL_SUBCOMMAND command_parent = 'BUILD_PROTEIN' @@ -48,7 +48,7 @@ class EditRotamers_Command(EditCommand): See superclass for documentation. @see: self.command_update_flyout() """ - flyoutActionToCheck = 'editRotamersAction' + flyoutActionToCheck = 'editProteinAction' parentCommandName = 'BUILD_PROTEIN' return flyoutActionToCheck, parentCommandName diff --git a/cad/src/protein/commands/EditRotamers/EditRotamers_PropertyManager.py b/cad/src/protein/commands/EditProtein/EditProtein_PropertyManager.py index ce5a69b5f..0e3fc4e98 100644 --- a/cad/src/protein/commands/EditRotamers/EditRotamers_PropertyManager.py +++ b/cad/src/protein/commands/EditProtein/EditProtein_PropertyManager.py @@ -1,9 +1,9 @@ # Copyright 2008 Nanorex, Inc. See LICENSE file for details. """ -EditRotamers_PropertyManager.py +EditProtein_PropertyManager.py -The EditRotamers_PropertyManager class provides a Property Manager -for the B{Edit Rotamers} command on the flyout toolbar in the +The EditProtein_PropertyManager class provides a Property Manager +for the B{Edit Protein} command on the flyout toolbar in the Build > Protein mode. @author: Piotr, Mark @@ -11,20 +11,23 @@ Build > Protein mode. @copyright: 2008 Nanorex, Inc. See LICENSE file for details. TODO: -- Rename "Edit Rotamers" to "Edit Proteins". - Better messages, especially when selecting different peptides. - Need to implement a validator for the Name line edit field. NICETOHAVE: -- Dim everything in the current protein except the atoms in the current aa. +- Some way of showing the current rotamer when all rotamers are displayed. + Ideas include: + - Dim all rotamers in the current protein except the atoms in the current rotamer. + - Highlight atoms in current rotamer for 1 second (when switching rotamers). - Include "Show entire model" checkbox in PM (checked by default). - Show residue label in GA of current residue, including AA and # (i.e. SER[14]). +- "Show adjacent rotamers" checkbox. REFACTORING: Things to discuss with Bruce include an asterisk: - Should current_protein be renamed to command.struct everywhere? * -- Move some methods to EditRotamers_Command or EditCommand class. * - - add setStructureName(name) in EditRotamers_Command or in superclass EditCommand? +- Move some methods to EditProtein_Command or EditCommand class. * + - add setStructureName(name) in EditProtein_Command or in superclass EditCommand? - other methods that edit the current protein. """ import os, time, fnmatch, string @@ -63,10 +66,10 @@ from PyQt4.Qt import QTextCursor from command_support.Command_PropertyManager import Command_PropertyManager _superclass = Command_PropertyManager -class EditRotamers_PropertyManager(Command_PropertyManager): +class EditProtein_PropertyManager(Command_PropertyManager): """ The ProteinDisplayStyle_PropertyManager class provides a Property Manager - for the B{Edit Rotamers} command on the Build Protein command toolbar. + for the B{Edit Protein} command on the Build Protein command toolbar. The selected peptide/protein is displayed in the protein reduced display style. The user can select individual rotamers and edit their chi angles. @@ -85,9 +88,9 @@ class EditRotamers_PropertyManager(Command_PropertyManager): @type iconPath: str """ - title = "Edit Rotamers" + title = "Edit Protein" pmName = title - iconPath = "ui/actions/Command Toolbar/BuildProtein/EditRotamers.png" + iconPath = "ui/actions/Command Toolbar/BuildProtein/EditProtein.png" current_protein = None # The currently selected peptide. previous_protein = None # The last peptide selected. diff --git a/cad/src/protein/commands/EditRotamers/__init__.py b/cad/src/protein/commands/EditProtein/__init__.py index e69de29bb..e69de29bb 100644 --- a/cad/src/protein/commands/EditRotamers/__init__.py +++ b/cad/src/protein/commands/EditProtein/__init__.py diff --git a/cad/src/protein/model/Protein.py b/cad/src/protein/model/Protein.py index 245d1017c..eade6919a 100644 --- a/cad/src/protein/model/Protein.py +++ b/cad/src/protein/model/Protein.py @@ -106,7 +106,7 @@ class Protein: # in the following format: "1abc" self.pdbId = "" - # Index of "current" amino acid (used by Edit Rotamers command). + # Index of "current" amino acid (used by Edit Protein command). self.current_aa_idx = 0 # Display list for expanded rotamers, used by ProteinChunk.draw_realtime @@ -537,7 +537,7 @@ class Protein: # General comment regarding the "current residue" mechanism. The purpose # of the "current_aa_idx" attribute is to have a mechanism for selecting # and focusing on an individual amino acid. Currently, this mechanism - # is only used by "Edit Rotamers" command and probably the "Edit Rotamers" + # is only used by "Edit Protein" command and probably the "Edit Protein" # command should keep track of the current residue. It would be # better if this attribute was removed from the Protein class. # -- piotr 080902 @@ -635,7 +635,7 @@ class Protein: the actual model. Maybe we'll take care of that when we move to the new model """ - win.commandSequencer.userEnterCommand('EDIT_ROTAMERS') + win.commandSequencer.userEnterCommand('EDIT_PROTEIN') return pass # end of class Protein diff --git a/cad/src/protein/model/Residue.py b/cad/src/protein/model/Residue.py index e8694c3a2..f754701df 100644 --- a/cad/src/protein/model/Residue.py +++ b/cad/src/protein/model/Residue.py @@ -438,7 +438,7 @@ class Residue: # protein display style. self.expanded = False - # Rotamer color, used by "Edit Rotamers" command. + # Rotamer color, used by "Edit Protein" command. self.color = None # These Rosetta-related attributes should be probably moved from this diff --git a/cad/src/ui/actions/Command Toolbar/BuildProtein/EditProtein.png b/cad/src/ui/actions/Command Toolbar/BuildProtein/EditProtein.png Binary files differnew file mode 100644 index 000000000..ab62409b9 --- /dev/null +++ b/cad/src/ui/actions/Command Toolbar/BuildProtein/EditProtein.png |