mailr5264 - /1.3/prompt/molmol.py


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

Header


Content

Posted by sebastien . morin . 1 on April 03, 2008 - 17:47:
Author: semor
Date: Thu Apr  3 17:47:42 2008
New Revision: 5264

URL: http://svn.gna.org/viewcvs/relax?rev=5264&view=rev
Log:
More removal of the run argument as part of the moving to the new design.


Modified:
    1.3/prompt/molmol.py

Modified: 1.3/prompt/molmol.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/prompt/molmol.py?rev=5264&r1=5263&r2=5264&view=diff
==============================================================================
--- 1.3/prompt/molmol.py (original)
+++ 1.3/prompt/molmol.py Thu Apr  3 17:47:42 2008
@@ -55,14 +55,12 @@
         self.__relax__.generic.molmol.clear_history()
 
 
-    def command(self, run=None, command=None):
+    def command(self, command=None):
         """Function for executing a user supplied Molmol command.
 
         Keyword Arguments
         ~~~~~~~~~~~~~~~~~
 
-        run:  The name of the run.
-
         command:  The Molmol command to execute.
 
 
@@ -76,37 +74,30 @@
         Example
         ~~~~~~~
 
-        To reinitialise the Molmol instance for the run 'aic', type:
-
-        relax> molmol.command("aic", "InitAll yes")
+        To reinitialise the Molmol instance:
+
+        relax> molmol.command("InitAll yes")
         """
 
         # Function intro text.
         if self.__relax__.interpreter.intro:
             text = sys.ps3 + "molmol.command("
-            text = text + "run=" + `run`
-            text = text + ", command=" + `command` + ")"
-            print text
-
-        # The run name.
-        if type(run) != str:
-            raise RelaxStrError, ('run', run)
+            text = text + "command=" + `command` + ")"
+            print text
 
         # The command argument.
         if type(command) != str:
             raise RelaxStrError, ('command', command)
 
         # Execute the functional code.
-        self.__relax__.generic.molmol.command(run=run, command=command)
-
-
-    def macro_exec(self, run=None, data_type=None, style="classic", 
colour_start=None, colour_end=None, colour_list=None):
+        molmol_obj.command(command=command)
+
+
+    def macro_exec(self, data_type=None, style="classic", colour_start=None, 
colour_end=None, colour_list=None):
         """Function for executing Molmol macros.
 
         Keyword Arguments
         ~~~~~~~~~~~~~~~~~
-
-        run:  The name of the run.
 
         data_type:  The data type to map to the structure.
 
@@ -148,28 +139,23 @@
         Examples
         ~~~~~~~~
 
-        To map the order parameter values, S2, of the run 'final' onto the 
structure using the
+        To map the order parameter values, S2, onto the structure using the
         classic style, type:
 
-        relax> molmol.macro_exec('final', 'S2')
-        relax> molmol.macro_exec('final', data_type='S2')
-        relax> molmol.macro_exec('final', data_type='S2', style="classic")
+        relax> molmol.macro_exec('S2')
+        relax> molmol.macro_exec(data_type='S2')
+        relax> molmol.macro_exec(data_type='S2', style="classic")
         """
 
         # Function intro text.
         if self.__relax__.interpreter.intro:
             text = sys.ps3 + "molmol.macro_exec("
-            text = text + "run=" + `run`
-            text = text + ", data_type=" + `data_type`
+            text = text + "data_type=" + `data_type`
             text = text + ", style=" + `style`
             text = text + ", colour_start=" + `colour_start`
             text = text + ", colour_end=" + `colour_end`
             text = text + ", colour_list=" + `colour_list` + ")"
             print text
-
-        # The run name.
-        if type(run) != str:
-            raise RelaxStrError, ('run', run)
 
         # Data type for mapping to the structure.
         if type(data_type) != str:
@@ -196,16 +182,11 @@
                     raise RelaxListNumError, ('ending colour of the linear 
gradient', colour_end)
 
         # Execute the functional code.
-        self.__relax__.generic.molmol.macro_exec(run=run, 
data_type=data_type, style=style, colour_start=colour_start, 
colour_end=colour_end, colour_list=colour_list)
-
-
-    def ribbon(self, run=None):
+        molmol_obj.macro_exec(data_type=data_type, style=style, 
colour_start=colour_start, colour_end=colour_end, colour_list=colour_list)
+
+
+    def ribbon(self):
         """Apply the Molmol ribbon style.
-
-        Keyword Arguments
-        ~~~~~~~~~~~~~~~~~
-
-        run:  The name of the run.
 
 
         Description
@@ -223,44 +204,36 @@
         Example
         ~~~~~~~
 
-        To apply the ribbon style to the PDB file loaded for the run 
'final', type:
-
-        relax> molmol.ribbon("final")
-        """
-
-        # Function intro text.
-        if self.__relax__.interpreter.intro:
-            text = sys.ps3 + "molmol.ribbon("
-            text = text + "run=" + `run` + ")"
-            print text
-
-        # The run name.
-        if type(run) != str:
-            raise RelaxStrError, ('run', run)
-
-        # Execute the functional code.
-        self.__relax__.generic.molmol.ribbon(run=run)
-
-
-    def tensor_pdb(self, run=None, file=None):
+        To apply the ribbon style to the PDB file loaded, type:
+
+        relax> molmol.ribbon()
+        """
+
+        # Function intro text.
+        if self.__relax__.interpreter.intro:
+            text = sys.ps3 + "molmol.ribbon()"
+            print text
+
+        # Execute the functional code.
+        molmol_obj.ribbon()
+
+
+    def tensor_pdb(self, file=None):
         """Function displaying the diffusion tensor PDB geometric object 
over the loaded PDB.
 
         Keyword Arguments
         ~~~~~~~~~~~~~~~~~
 
-        run:  The name of the run.
-
         file:  The name of the PDB file containing the tensor geometric 
object.
 
 
         Description
         ~~~~~~~~~~~
 
-        In executing this user function, a PDB file must have previously 
been loaded into this run,
-        a geometric object or polygon representing the Brownian rotational 
diffusion tensor will be
-        overlain with the loaded PDB file and displayed within Molmol.  The 
PDB file containing the
-        geometric object must be created using the complementary 
'pdb.create_diff_tensor_pdb()' user
-        function.
+        In executing this user function, a PDB file must have previously 
been loaded , a geometric
+        object or polygon representing the Brownian rotational diffusion 
tensor will be overlain
+        with the loaded PDB file and displayed within Molmol.  The PDB file 
containing the geometric
+        object must be created using the complementary 
'pdb.create_diff_tensor_pdb()' user function.
 
         To display the diffusion tensor, the multiple commands will be 
executed.  To overlay the
         structure with the diffusion tensor, everything will be selected and 
reoriented and moved to
@@ -300,59 +273,41 @@
         # Function intro text.
         if self.__relax__.interpreter.intro:
             text = sys.ps3 + "molmol.tensor_pdb("
-            text = text + "run=" + `run`
-            text = text + ", file=" + `file` + ")"
-            print text
-
-        # The run name.
-        if type(run) != str:
-            raise RelaxStrError, ('run', run)
+            text = text + "file=" + `file` + ")"
+            print text
 
         # The file name.
         if type(file) != str:
             raise RelaxStrError, ('file name', file)
 
         # Execute the functional code.
-        self.__relax__.generic.molmol.tensor_pdb(run=run, file=file)
-
-
-    def view(self, run=None):
+        molmol_obj.tensor_pdb(file=file)
+
+
+    def view(self):
         """Function for viewing the collection of molecules extracted from 
the PDB file.
+
+        Example
+        ~~~~~~~
+
+        relax> molmol.view()
+        relax> molmol.view()
+        """
+
+        # Function intro text.
+        if self.__relax__.interpreter.intro:
+            text = sys.ps3 + "molmol.view()"
+            print text
+
+        # Execute the functional code.
+        molmol_obj.view()
+
+
+    def write(self, data_type=None, style="classic", colour_start=None, 
colour_end=None, colour_list=None, file=None, dir='molmol', force=0):
+        """Function for creating Molmol macros.
 
         Keyword Arguments
         ~~~~~~~~~~~~~~~~~
-
-        run:  The name of the run which the PDB belongs to.
-
-
-        Example
-        ~~~~~~~
-
-        relax> molmol.view('m1')
-        relax> molmol.view(run='pdb')
-        """
-
-        # Function intro text.
-        if self.__relax__.interpreter.intro:
-            text = sys.ps3 + "molmol.view("
-            text = text + "run=" + `run` + ")"
-            print text
-
-        # The run argument.
-        if type(run) != str:
-            raise RelaxStrError, ('run', run)
-
-        # Execute the functional code.
-        self.__relax__.generic.molmol.view(run=run)
-
-
-    def write(self, run=None, data_type=None, style="classic", 
colour_start=None, colour_end=None, colour_list=None, file=None, 
dir='molmol', force=0):
-        """Function for creating Molmol macros.
-
-        Keyword Arguments
-        ~~~~~~~~~~~~~~~~~
-
-        run:  The name of the run.
 
         data_type:  The data type to map to the structure.
 
@@ -402,19 +357,18 @@
         Examples
         ~~~~~~~~
 
-        To create a Molmol macro mapping the order parameter values, S2, of 
the run 'final' onto the
-        structure using the classic style, type:
-
-        relax> molmol.write('final', 'S2')
-        relax> molmol.write('final', data_type='S2')
-        relax> molmol.write('final', data_type='S2', style="classic", 
file='s2.mac', dir='molmol')
+        To create a Molmol macro mapping the order parameter values, S2, 
onto the structure using
+        the classic style, type:
+
+        relax> molmol.write('S2')
+        relax> molmol.write(data_type='S2')
+        relax> molmol.write(data_type='S2', style="classic", file='s2.mac', 
dir='molmol')
         """
 
         # Function intro text.
         if self.__relax__.interpreter.intro:
             text = sys.ps3 + "molmol.write("
-            text = text + "run=" + `run`
-            text = text + ", data_type=" + `data_type`
+            text = text + "data_type=" + `data_type`
             text = text + ", style=" + `style`
             text = text + ", colour_start=" + `colour_start`
             text = text + ", colour_end=" + `colour_end`
@@ -424,10 +378,6 @@
             text = text + ", force=" + `force` + ")"
             print text
 
-        # The run name.
-        if type(run) != str:
-            raise RelaxStrError, ('run', run)
-
         # Data type for mapping to the structure.
         if type(data_type) != str:
             raise RelaxStrError, ('data type', data_type)
@@ -465,7 +415,7 @@
             raise RelaxBinError, ('force flag', force)
 
         # Execute the functional code.
-        self.__relax__.generic.molmol.write(run=run, data_type=data_type, 
style=style, colour_start=colour_start, colour_end=colour_end, 
colour_list=colour_list, file=file, dir=dir, force=force)
+        molmol_obj.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)
 
 
 




Related Messages


Powered by MHonArc, Updated Thu Apr 03 18:00:18 2008