mailr14484 - in /1.3/gui/user_functions: molmol.py pymol.py


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

Header


Content

Posted by edward on August 26, 2011 - 13:49:
Author: bugman
Date: Fri Aug 26 13:49:12 2011
New Revision: 14484

URL: http://svn.gna.org/viewcvs/relax?rev=14484&view=rev
Log:
Renamed the PyMOL and Molmol macro user functions to match the back end.


Modified:
    1.3/gui/user_functions/molmol.py
    1.3/gui/user_functions/pymol.py

Modified: 1.3/gui/user_functions/molmol.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/user_functions/molmol.py?rev=14484&r1=14483&r2=14484&view=diff
==============================================================================
--- 1.3/gui/user_functions/molmol.py (original)
+++ 1.3/gui/user_functions/molmol.py Fri Aug 26 13:49:12 2011
@@ -66,16 +66,30 @@
         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'))
-        page = Macro_exec_page(wizard, self.gui)
+    def macro_apply(self, event):
+        """The molmol.macro_apply 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_apply'))
+        page = Macro_apply_page(wizard, self.gui)
+        wizard.add_page(page)
+        wizard.run()
+
+
+    def macro_write(self, event):
+        """The molmol.macro_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', 'macro_write'))
+        page = Macro_write_page(wizard, self.gui)
         wizard.add_page(page)
         wizard.run()
 
@@ -122,20 +136,6 @@
         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'))
-        page = Write_page(wizard, self.gui)
-        wizard.add_page(page)
-        wizard.run()
-
-
 
 class Clear_history_page(UF_page):
     """The molmol.clear_history() user function page."""
@@ -189,12 +189,12 @@
 
 
 
-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']
+class Macro_apply_page(UF_page):
+    """The molmol.macro_apply() user function page."""
+
+    # Some class variables.
+    image_path = WIZARD_IMAGE_PATH + 'molmol' + sep + 'molmol_logo.png'
+    uf_path = ['molmol', 'macro_apply']
     height_desc = 450
 
     def add_contents(self, sizer):
@@ -232,96 +232,16 @@
         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)
-
-
-
-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')
-
-
-
-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']
-    height_desc = 450
-
-    def add_contents(self, sizer):
-        """Add the specific GUI elements.
-
-        @param sizer:   A sizer object.
-        @type sizer:    wx.Sizer instance
-        """
-
-        # Add a file selection.
-        self.file = self.file_selection(sizer, "The tensor PDB file:", 
message="Tensor PDB file selection", wildcard="PDB files 
(*.pdb)|*.pdb;*.PDB", style=wx.FD_OPEN, 
tooltip=self.uf._doc_args_dict['file'])
-
-
-    def on_execute(self):
-        """Execute the user function."""
-
-        # The file name.
-        file = gui_to_str(self.file.GetValue())
-
-        # No file.
-        if not file:
-            return
-
-        # Execute the user function.
-        self.gui.interpreter.queue('molmol.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')
-
-
-
-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']
+        self.gui.interpreter.queue('molmol.macro_apply', 
data_type=data_type, style=style, colour_start=colour_start, 
colour_end=colour_end, colour_list=colour_list)
+
+
+
+class Macro_write_page(UF_page):
+    """The molmol.macro_write() user function page."""
+
+    # Some class variables.
+    image_path = WIZARD_IMAGE_PATH + 'molmol' + sep + 'molmol_logo.png'
+    uf_path = ['molmol', 'macro_write']
     height_desc = 400
 
     def add_contents(self, sizer):
@@ -373,4 +293,84 @@
         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, dir=dir, force=force)
+        self.gui.interpreter.queue('molmol.macro_write', 
data_type=data_type, style=style, colour_start=colour_start, 
colour_end=colour_end, colour_list=colour_list, file=file, dir=dir, 
force=force)
+
+
+
+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')
+
+
+
+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']
+    height_desc = 450
+
+    def add_contents(self, sizer):
+        """Add the specific GUI elements.
+
+        @param sizer:   A sizer object.
+        @type sizer:    wx.Sizer instance
+        """
+
+        # Add a file selection.
+        self.file = self.file_selection(sizer, "The tensor PDB file:", 
message="Tensor PDB file selection", wildcard="PDB files 
(*.pdb)|*.pdb;*.PDB", style=wx.FD_OPEN, 
tooltip=self.uf._doc_args_dict['file'])
+
+
+    def on_execute(self):
+        """Execute the user function."""
+
+        # The file name.
+        file = gui_to_str(self.file.GetValue())
+
+        # No file.
+        if not file:
+            return
+
+        # Execute the user function.
+        self.gui.interpreter.queue('molmol.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')

Modified: 1.3/gui/user_functions/pymol.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/user_functions/pymol.py?rev=14484&r1=14483&r2=14484&view=diff
==============================================================================
--- 1.3/gui/user_functions/pymol.py (original)
+++ 1.3/gui/user_functions/pymol.py Fri Aug 26 13:49:12 2011
@@ -66,16 +66,30 @@
         wizard.run()
 
 
-    def macro_exec(self, event):
-        """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)
+    def macro_apply(self, event):
+        """The pymol.macro_apply 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_apply'))
+        page = Macro_apply_page(wizard, self.gui)
+        wizard.add_page(page)
+        wizard.run()
+
+
+    def macro_write(self, event):
+        """The pymol.macro_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', 'macro_write'))
+        page = Write_page(wizard, self.gui)
         wizard.add_page(page)
         wizard.run()
 
@@ -122,20 +136,6 @@
         wizard.run()
 
 
-    def write(self, event):
-        """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()
-
-
 
 class Clear_history_page(UF_page):
     """The pymol.clear_history() user function page."""
@@ -189,12 +189,12 @@
 
 
 
-class Macro_exec_page(UF_page):
-    """The pymol.macro_exec() user function page."""
-
-    # Some class variables.
-    image_path = WIZARD_IMAGE_PATH + 'pymol' + sep + 'pymol.png'
-    uf_path = ['pymol', 'macro_exec']
+class Macro_apply_page(UF_page):
+    """The pymol.macro_apply() user function page."""
+
+    # Some class variables.
+    image_path = WIZARD_IMAGE_PATH + 'pymol' + sep + 'pymol.png'
+    uf_path = ['pymol', 'macro_apply']
     height_desc = 450
 
     def add_contents(self, sizer):
@@ -232,7 +232,7 @@
         colour_list = gui_to_str(self.colour_list.GetValue())
 
         # Execute the user function.
-        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)
+        self.gui.interpreter.queue('pymol.macro_apply', data_type=data_type, 
style=style, colour_start=colour_start, colour_end=colour_end, 
colour_list=colour_list)
 
 
 
@@ -317,11 +317,11 @@
 
 
 class Write_page(UF_page):
-    """The pymol.write() user function page."""
-
-    # Some class variables.
-    image_path = WIZARD_IMAGE_PATH + 'pymol' + sep + 'pymol.png'
-    uf_path = ['pymol', 'write']
+    """The pymol.macro_write() user function page."""
+
+    # Some class variables.
+    image_path = WIZARD_IMAGE_PATH + 'pymol' + sep + 'pymol.png'
+    uf_path = ['pymol', 'macro_write']
     height_desc = 400
 
     def add_contents(self, sizer):
@@ -373,4 +373,4 @@
         colour_list = gui_to_str(self.colour_list.GetValue())
 
         # Execute the user function.
-        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, dir=None, force=force)
+        self.gui.interpreter.queue('pymol.macro_write', data_type=data_type, 
style=style, colour_start=colour_start, colour_end=colour_end, 
colour_list=colour_list, file=file, dir=None, force=force)




Related Messages


Powered by MHonArc, Updated Fri Aug 26 14:00:02 2011