mailr14384 - in /branches/gui_testing/gui: menu.py user_functions/__init__.py user_functions/pymol.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on August 16, 2011 - 11:22:
Author: bugman
Date: Tue Aug 16 11:22:05 2011
New Revision: 14384

URL: http://svn.gna.org/viewcvs/relax?rev=14384&view=rev
Log:
Implemented all the PyMOL user function GUI pages and menu entries.

A number of these do not exist in the front or backend yet - this is simply a 
direct copy of all the
molmol user functions.


Added:
    branches/gui_testing/gui/user_functions/pymol.py
      - copied, changed from r14379, 
branches/gui_testing/gui/user_functions/molmol.py
Modified:
    branches/gui_testing/gui/menu.py
    branches/gui_testing/gui/user_functions/__init__.py

Modified: branches/gui_testing/gui/menu.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/menu.py?rev=14384&r1=14383&r2=14384&view=diff
==============================================================================
--- branches/gui_testing/gui/menu.py (original)
+++ branches/gui_testing/gui/menu.py Tue Aug 16 11:22:05 2011
@@ -223,6 +223,15 @@
                 [wx.NewId(), "&hybridise", paths.icon_16x16.pipe_hybrid, 
self.gui.user_functions.pipe.hybridise],
                 [wx.NewId(), "&switch", paths.icon_16x16.pipe_switch, 
self.gui.user_functions.pipe.switch]
             ]],
+            [wx.NewId(), "&pymol", paths.icon_16x16.pymol, None, [
+                [wx.NewId(), "clear_&history", None, 
self.gui.user_functions.pymol.clear_history],
+                [wx.NewId(), "&command", None, 
self.gui.user_functions.pymol.command],
+                [wx.NewId(), "&macro_exec", paths.icon_16x16.pymol, 
self.gui.user_functions.pymol.macro_exec],
+                [wx.NewId(), "&ribbon", None, 
self.gui.user_functions.pymol.ribbon],
+                [wx.NewId(), "&tensor_pdb", None, 
self.gui.user_functions.pymol.tensor_pdb],
+                [wx.NewId(), "&view", None, 
self.gui.user_functions.pymol.view],
+                [wx.NewId(), "&write", paths.icon_16x16.save, 
self.gui.user_functions.pymol.write]
+            ]],
             [wx.NewId(), "&relax_data", paths.icon_16x16.relax_data, None, [
                 [wx.NewId(), "&delete", paths.icon_16x16.remove, 
self.gui.user_functions.relax_data.delete],
                 [wx.NewId(), "&read",   paths.icon_16x16.open, 
self.gui.user_functions.relax_data.read]

Modified: branches/gui_testing/gui/user_functions/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/user_functions/__init__.py?rev=14384&r1=14383&r2=14384&view=diff
==============================================================================
--- branches/gui_testing/gui/user_functions/__init__.py (original)
+++ branches/gui_testing/gui/user_functions/__init__.py Tue Aug 16 11:22:05 
2011
@@ -34,6 +34,7 @@
 from molmol import Molmol
 from noe import Noe
 from pipe import Pipe
+from pymol import Pymol
 from residue import Residue
 from results import Results
 from relax_data import Relax_data
@@ -56,6 +57,7 @@
            'molmol',
            'noe',
            'pipe',
+           'pymol',
            'residue',
            'results',
            'relax_data',
@@ -89,6 +91,7 @@
         self.molmol = Molmol(self.gui)
         self.noe = Noe(self.gui)
         self.pipe = Pipe(self.gui)
+        self.pymol = Pymol(self.gui)
         self.residue = Residue(self.gui)
         self.results = Results(self.gui)
         self.relax_data = Relax_data(self.gui)
@@ -113,6 +116,7 @@
         self.molmol.destroy()
         self.noe.destroy()
         self.pipe.destroy()
+        self.pymol.destroy()
         self.residue.destroy()
         self.results.destroy()
         self.relax_data.destroy()

Copied: branches/gui_testing/gui/user_functions/pymol.py (from r14379, 
branches/gui_testing/gui/user_functions/molmol.py)
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/user_functions/pymol.py?p2=branches/gui_testing/gui/user_functions/pymol.py&p1=branches/gui_testing/gui/user_functions/molmol.py&r1=14379&r2=14384&rev=14384&view=diff
==============================================================================
--- branches/gui_testing/gui/user_functions/molmol.py (original)
+++ branches/gui_testing/gui/user_functions/pymol.py Tue Aug 16 11:22:05 2011
@@ -21,7 +21,7 @@
 
###############################################################################
 
 # Module docstring.
-"""The molmol user function GUI elements."""
+"""The pymol user function GUI elements."""
 
 # Python module imports.
 from os import sep
@@ -35,102 +35,102 @@
 
 
 # The container class.
-class Molmol(UF_base):
+class Pymol(UF_base):
     """The container class for holding all GUI elements."""
 
     def clear_history(self, event):
-        """The molmol.clear_history user function.
-
-        @param event:       The wx event.
-        @type event:        wx event
-        """
-
-        # Execute the wizard.
-        wizard = Wiz_window(size_x=600, size_y=300, 
title=self.get_title('molmol', 'clear_history'))
+        """The pymol.clear_history user function.
+
+        @param event:       The wx event.
+        @type event:        wx event
+        """
+
+        # Execute the wizard.
+        wizard = Wiz_window(size_x=600, size_y=300, 
title=self.get_title('pymol', 'clear_history'))
         page = Clear_history_page(wizard, self.gui)
         wizard.add_page(page, apply_button=False)
         wizard.run()
 
 
     def command(self, event):
-        """The molmol.command user function.
-
-        @param event:       The wx event.
-        @type event:        wx event
-        """
-
-        # Execute the wizard.
-        wizard = Wiz_window(size_x=700, size_y=400, 
title=self.get_title('molmol', 'command'))
+        """The pymol.command user function.
+
+        @param event:       The wx event.
+        @type event:        wx event
+        """
+
+        # Execute the wizard.
+        wizard = Wiz_window(size_x=700, size_y=400, 
title=self.get_title('pymol', 'command'))
         page = Command_page(wizard, self.gui)
         wizard.add_page(page)
         wizard.run()
 
 
     def macro_exec(self, event):
-        """The molmol.macro_exec user function.
-
-        @param event:       The wx event.
-        @type event:        wx event
-        """
-
-        # Execute the wizard.
-        wizard = Wiz_window(size_x=1000, size_y=750, 
title=self.get_title('molmol', 'macro_exec'))
+        """The pymol.macro_exec user function.
+
+        @param event:       The wx event.
+        @type event:        wx event
+        """
+
+        # Execute the wizard.
+        wizard = Wiz_window(size_x=1000, size_y=750, 
title=self.get_title('pymol', 'macro_exec'))
         page = Macro_exec_page(wizard, self.gui)
         wizard.add_page(page)
         wizard.run()
 
 
     def ribbon(self, event):
-        """The molmol.ribbon user function.
-
-        @param event:       The wx event.
-        @type event:        wx event
-        """
-
-        # Execute the wizard.
-        wizard = Wiz_window(size_x=700, size_y=400, 
title=self.get_title('molmol', 'ribbon'))
+        """The pymol.ribbon user function.
+
+        @param event:       The wx event.
+        @type event:        wx event
+        """
+
+        # Execute the wizard.
+        wizard = Wiz_window(size_x=700, size_y=400, 
title=self.get_title('pymol', 'ribbon'))
         page = Ribbon_page(wizard, self.gui)
         wizard.add_page(page, apply_button=False)
         wizard.run()
 
 
     def tensor_pdb(self, event):
-        """The molmol.tensor_pdb user function.
-
-        @param event:       The wx event.
-        @type event:        wx event
-        """
-
-        # Execute the wizard.
-        wizard = Wiz_window(size_x=1000, size_y=700, 
title=self.get_title('molmol', 'tensor_pdb'))
+        """The pymol.tensor_pdb user function.
+
+        @param event:       The wx event.
+        @type event:        wx event
+        """
+
+        # Execute the wizard.
+        wizard = Wiz_window(size_x=1000, size_y=700, 
title=self.get_title('pymol', 'tensor_pdb'))
         page = Tensor_pdb_page(wizard, self.gui)
         wizard.add_page(page, apply_button=False)
         wizard.run()
 
 
     def view(self, event):
-        """The molmol.view user function.
-
-        @param event:       The wx event.
-        @type event:        wx event
-        """
-
-        # Execute the wizard.
-        wizard = Wiz_window(size_x=600, size_y=300, 
title=self.get_title('molmol', 'view'))
+        """The pymol.view user function.
+
+        @param event:       The wx event.
+        @type event:        wx event
+        """
+
+        # Execute the wizard.
+        wizard = Wiz_window(size_x=600, size_y=300, 
title=self.get_title('pymol', 'view'))
         page = View_page(wizard, self.gui)
         wizard.add_page(page, apply_button=False)
         wizard.run()
 
 
     def write(self, event):
-        """The molmol.write user function.
-
-        @param event:       The wx event.
-        @type event:        wx event
-        """
-
-        # Execute the wizard.
-        wizard = Wiz_window(size_x=1000, size_y=750, 
title=self.get_title('molmol', 'write'))
+        """The pymol.write user function.
+
+        @param event:       The wx event.
+        @type event:        wx event
+        """
+
+        # Execute the wizard.
+        wizard = Wiz_window(size_x=1000, size_y=750, 
title=self.get_title('pymol', 'write'))
         page = Write_page(wizard, self.gui)
         wizard.add_page(page)
         wizard.run()
@@ -138,34 +138,34 @@
 
 
 class Clear_history_page(UF_page):
-    """The molmol.clear_history() user function page."""
-
-    # Some class variables.
-    image_path = WIZARD_IMAGE_PATH + 'molmol' + sep + 'molmol_logo.png'
-    uf_path = ['molmol', 'clear_history']
-
-    def add_contents(self, sizer):
-        """Add the specific GUI elements.
-
-        @param sizer:   A sizer object.
-        @type sizer:    wx.Sizer instance
-        """
-
-
-    def on_execute(self):
-        """Execute the user function."""
-
-        # Execute the user function.
-        self.gui.interpreter.queue('molmol.clear_history')
+    """The pymol.clear_history() user function page."""
+
+    # Some class variables.
+    image_path = WIZARD_IMAGE_PATH + 'pymol' + sep + 'pymol.png'
+    uf_path = ['pymol', 'clear_history']
+
+    def add_contents(self, sizer):
+        """Add the specific GUI elements.
+
+        @param sizer:   A sizer object.
+        @type sizer:    wx.Sizer instance
+        """
+
+
+    def on_execute(self):
+        """Execute the user function."""
+
+        # Execute the user function.
+        self.gui.interpreter.queue('pymol.clear_history')
 
 
 
 class Command_page(UF_page):
-    """The molmol.command() user function page."""
-
-    # Some class variables.
-    image_path = WIZARD_IMAGE_PATH + 'molmol' + sep + 'molmol_logo.png'
-    uf_path = ['molmol', 'command']
+    """The pymol.command() user function page."""
+
+    # Some class variables.
+    image_path = WIZARD_IMAGE_PATH + 'pymol' + sep + 'pymol.png'
+    uf_path = ['pymol', 'command']
 
     def add_contents(self, sizer):
         """Add the specific GUI elements.
@@ -175,7 +175,7 @@
         """
 
         # The command.
-        self.command = self.input_field(sizer, "The Molmol command:", 
tooltip=self.uf._doc_args_dict['command'])
+        self.command = self.input_field(sizer, "The PyMOL command:", 
tooltip=self.uf._doc_args_dict['command'])
 
 
     def on_execute(self):
@@ -185,16 +185,16 @@
         command = gui_to_str(self.command.GetValue())
 
         # Execute the user function.
-        self.gui.interpreter.queue('molmol.command', command=command)
+        self.gui.interpreter.queue('pymol.command', command=command)
 
 
 
 class Macro_exec_page(UF_page):
-    """The molmol.macro_exec() user function page."""
-
-    # Some class variables.
-    image_path = WIZARD_IMAGE_PATH + 'molmol' + sep + 'molmol_logo.png'
-    uf_path = ['molmol', 'macro_exec']
+    """The pymol.macro_exec() user function page."""
+
+    # Some class variables.
+    image_path = WIZARD_IMAGE_PATH + 'pymol' + sep + 'pymol.png'
+    uf_path = ['pymol', 'macro_exec']
     height_desc = 450
 
     def add_contents(self, sizer):
@@ -232,39 +232,39 @@
         colour_list = gui_to_str(self.colour_list.GetValue())
 
         # Execute the user function.
-        self.gui.interpreter.queue('molmol.macro_exec', data_type=data_type, 
style=style, colour_start=colour_start, colour_end=colour_end, 
colour_list=colour_list)
+        self.gui.interpreter.queue('pymol.macro_exec', data_type=data_type, 
style=style, colour_start=colour_start, colour_end=colour_end, 
colour_list=colour_list)
 
 
 
 class Ribbon_page(UF_page):
-    """The molmol.ribbon() user function page."""
-
-    # Some class variables.
-    image_path = WIZARD_IMAGE_PATH + 'molmol' + sep + 'molmol_logo.png'
-    uf_path = ['molmol', 'ribbon']
-
-    def add_contents(self, sizer):
-        """Add the specific GUI elements.
-
-        @param sizer:   A sizer object.
-        @type sizer:    wx.Sizer instance
-        """
-
-
-    def on_execute(self):
-        """Execute the user function."""
-
-        # Execute the user function.
-        self.gui.interpreter.queue('molmol.ribbon')
+    """The pymol.ribbon() user function page."""
+
+    # Some class variables.
+    image_path = WIZARD_IMAGE_PATH + 'pymol' + sep + 'pymol.png'
+    uf_path = ['pymol', 'ribbon']
+
+    def add_contents(self, sizer):
+        """Add the specific GUI elements.
+
+        @param sizer:   A sizer object.
+        @type sizer:    wx.Sizer instance
+        """
+
+
+    def on_execute(self):
+        """Execute the user function."""
+
+        # Execute the user function.
+        self.gui.interpreter.queue('pymol.ribbon')
 
 
 
 class Tensor_pdb_page(UF_page):
-    """The molmol.tensor_pdb() user function page."""
-
-    # Some class variables.
-    image_path = WIZARD_IMAGE_PATH + 'molmol' + sep + 'molmol_logo.png'
-    uf_path = ['molmol', 'tensor_pdb']
+    """The pymol.tensor_pdb() user function page."""
+
+    # Some class variables.
+    image_path = WIZARD_IMAGE_PATH + 'pymol' + sep + 'pymol.png'
+    uf_path = ['pymol', 'tensor_pdb']
     height_desc = 450
 
     def add_contents(self, sizer):
@@ -289,39 +289,39 @@
             return
 
         # Execute the user function.
-        self.gui.interpreter.queue('molmol.tensor_pdb', file=file)
+        self.gui.interpreter.queue('pymol.tensor_pdb', file=file)
 
 
 
 class View_page(UF_page):
-    """The molmol.view() user function page."""
-
-    # Some class variables.
-    image_path = WIZARD_IMAGE_PATH + 'molmol' + sep + 'molmol_logo.png'
-    uf_path = ['molmol', 'view']
-
-    def add_contents(self, sizer):
-        """Add the specific GUI elements.
-
-        @param sizer:   A sizer object.
-        @type sizer:    wx.Sizer instance
-        """
-
-
-    def on_execute(self):
-        """Execute the user function."""
-
-        # Execute the user function.
-        self.gui.interpreter.queue('molmol.view')
+    """The pymol.view() user function page."""
+
+    # Some class variables.
+    image_path = WIZARD_IMAGE_PATH + 'pymol' + sep + 'pymol.png'
+    uf_path = ['pymol', 'view']
+
+    def add_contents(self, sizer):
+        """Add the specific GUI elements.
+
+        @param sizer:   A sizer object.
+        @type sizer:    wx.Sizer instance
+        """
+
+
+    def on_execute(self):
+        """Execute the user function."""
+
+        # Execute the user function.
+        self.gui.interpreter.queue('pymol.view')
 
 
 
 class Write_page(UF_page):
-    """The molmol.write() user function page."""
-
-    # Some class variables.
-    image_path = WIZARD_IMAGE_PATH + 'molmol' + sep + 'molmol_logo.png'
-    uf_path = ['molmol', 'write']
+    """The pymol.write() user function page."""
+
+    # Some class variables.
+    image_path = WIZARD_IMAGE_PATH + 'pymol' + sep + 'pymol.png'
+    uf_path = ['pymol', 'write']
     height_desc = 400
 
     def add_contents(self, sizer):
@@ -332,7 +332,7 @@
         """
 
         # Add a file selection.
-        self.file = self.file_selection(sizer, "The macro file:", 
message="Molmol macro file selection", wildcard="Molmol macro files 
(*.mac)|*.mac;*.MAC", style=wx.FD_SAVE, 
tooltip=self.uf._doc_args_dict['file'])
+        self.file = self.file_selection(sizer, "The macro file:", 
message="PyMOL macro file selection", wildcard="PyMOL macro files 
(*.mac)|*.mac;*.MAC", style=wx.FD_SAVE, 
tooltip=self.uf._doc_args_dict['file'])
 
         # The force flag.
         self.force = self.boolean_selector(sizer, "Force flag:", 
tooltip=self.uf._doc_args_dict['force'], default=False)
@@ -373,4 +373,4 @@
         colour_list = gui_to_str(self.colour_list.GetValue())
 
         # Execute the user function.
-        self.gui.interpreter.queue('molmol.write', data_type=data_type, 
style=style, colour_start=colour_start, colour_end=colour_end, 
colour_list=colour_list, file=file, force=force)
+        self.gui.interpreter.queue('pymol.write', data_type=data_type, 
style=style, colour_start=colour_start, colour_end=colour_end, 
colour_list=colour_list, file=file, force=force)




Related Messages


Powered by MHonArc, Updated Tue Aug 16 11:40:02 2011