mailr7320 - in /1.3: generic_fns/model_selection.py generic_fns/sequence.py specific_fns/model_free/main.py


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

Header


Content

Posted by edward on September 25, 2008 - 22:17:
Author: bugman
Date: Thu Sep 25 22:17:12 2008
New Revision: 7320

URL: http://svn.gna.org/viewcvs/relax?rev=7320&view=rev
Log:
Prevented the sequence data to be printed out during model selection.


Modified:
    1.3/generic_fns/model_selection.py
    1.3/generic_fns/sequence.py
    1.3/specific_fns/model_free/main.py

Modified: 1.3/generic_fns/model_selection.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/model_selection.py?rev=7320&r1=7319&r2=7320&view=diff
==============================================================================
--- 1.3/generic_fns/model_selection.py (original)
+++ 1.3/generic_fns/model_selection.py Thu Sep 25 22:17:12 2008
@@ -307,7 +307,7 @@
             switch(best_model)
 
             # Duplicate.
-            duplicate_data[best_model](pipe_from=best_model, 
pipe_to=modsel_pipe, model_index=i, global_stats=global_stats)
+            duplicate_data[best_model](pipe_from=best_model, 
pipe_to=modsel_pipe, model_index=i, global_stats=global_stats, verbose=False)
 
     # Switch to the model selection pipe.
     switch(modsel_pipe)

Modified: 1.3/generic_fns/sequence.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/sequence.py?rev=7320&r1=7319&r2=7320&view=diff
==============================================================================
--- 1.3/generic_fns/sequence.py (original)
+++ 1.3/generic_fns/sequence.py Thu Sep 25 22:17:12 2008
@@ -36,15 +36,18 @@
 
 
 
-def copy(pipe_from=None, pipe_to=None):
+def copy(pipe_from=None, pipe_to=None, verbose=True):
     """Copy the molecule, residue, and spin sequence data from one data pipe 
to another.
 
-    @param pipe_from:   The data pipe to copy the sequence data from.  This 
defaults to the current
+    @keyword pipe_from: The data pipe to copy the sequence data from.  This 
defaults to the current
                         data pipe.
     @type pipe_from:    str
-    @param pipe_to:     The data pipe to copy the sequence data to.  This 
defaults to the current
+    @keyword pipe_to:   The data pipe to copy the sequence data to.  This 
defaults to the current
                         data pipe.
     @type pipe_to:      str
+    @keyword verbose:   A flag which if True will cause info about each spin 
to be printed out as
+                        the sequence is generated.
+    @type verbose:      bool
     """
 
     # Defaults.
@@ -70,7 +73,7 @@
     # Loop over the spins of the pipe_from data pipe.
     for spin, mol_name, res_num, res_name in spin_loop(pipe=pipe_from, 
full_info=True):
         # Generate the new sequence.
-        generate(mol_name, res_num, res_name, spin.num, spin.name, pipe_to)
+        generate(mol_name, res_num, res_name, spin.num, spin.name, pipe_to, 
verbose)
 
 
 def display(sep=None, mol_name_flag=False, res_num_flag=False, 
res_name_flag=False, spin_num_flag=False, spin_name_flag=False):
@@ -106,7 +109,7 @@
     write_body(file=sys.stdout, sep=sep, mol_name_flag=mol_name_flag, 
res_num_flag=res_num_flag, res_name_flag=res_name_flag, 
spin_num_flag=spin_num_flag, spin_name_flag=spin_name_flag)
 
 
-def generate(mol_name=None, res_num=None, res_name=None, spin_num=None, 
spin_name=None, pipe=None):
+def generate(mol_name=None, res_num=None, res_name=None, spin_num=None, 
spin_name=None, pipe=None, verbose=True):
     """Generate the sequence item-by-item by adding a single 
molecule/residue/spin container as necessary.
 
     @keyword mol_name:  The molecule name.
@@ -119,9 +122,12 @@
     @type spin_num:     bool
     @keyword spin_name: The spin name.
     @type spin_name:    bool
-    @param pipe:        The data pipe in which to generate the sequence.  
This defaults to the
+    @keyword pipe:      The data pipe in which to generate the sequence.  
This defaults to the
                         current data pipe.
     @type pipe:         str
+    @keyword verbose:   A flag which if True will cause info about each spin 
to be printed out as
+                        the sequence is generated.
+    @type verbose:      bool
     """
 
     # The current data pipe.
@@ -155,7 +161,8 @@
         curr_res.spin.add_item(spin_name=spin_name, spin_num=spin_num)
 
     # Print out of all the spins.
-    write_line(sys.stdout, mol_name, res_num, res_name, spin_num, spin_name, 
mol_name_flag=True, res_num_flag=True, res_name_flag=True, 
spin_num_flag=True, spin_name_flag=True)
+    if verbose:
+        write_line(sys.stdout, mol_name, res_num, res_name, spin_num, 
spin_name, mol_name_flag=True, res_num_flag=True, res_name_flag=True, 
spin_num_flag=True, spin_name_flag=True)
 
 
 def read(file=None, dir=None, mol_name_col=None, res_num_col=0, 
res_name_col=1, spin_num_col=None, spin_name_col=None, sep=None):

Modified: 1.3/specific_fns/model_free/main.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/model_free/main.py?rev=7320&r1=7319&r2=7320&view=diff
==============================================================================
--- 1.3/specific_fns/model_free/main.py (original)
+++ 1.3/specific_fns/model_free/main.py Thu Sep 25 22:17:12 2008
@@ -951,7 +951,7 @@
             return 'all'
 
 
-    def duplicate_data(self, pipe_from=None, pipe_to=None, model_index=None, 
global_stats=False):
+    def duplicate_data(self, pipe_from=None, pipe_to=None, model_index=None, 
global_stats=False, verbose=True):
         """Duplicate the data specific to a single model-free model.
 
         @keyword pipe_from:     The data pipe to copy the data from.
@@ -963,6 +963,9 @@
         @type model_index:      int
         @keyword global_stats:  The global statistics flag
         @type global_stats:     bool
+        @keyword verbose:       A flag which if True will cause info about 
each spin to be printed
+                                out as the sequence is generated.
+        @type verbose:          bool
         """
 
         # First create the pipe_to data pipe, if it doesn't exist (restoring 
the current pipe at the end).
@@ -1033,7 +1036,7 @@
         if model_type == 'mf' or (model_type == 'local_tm' and not 
global_stats):
             # Duplicate the sequence data if it doesn't exist.
             if ds[pipe_to].mol.is_empty():
-                sequence.copy(pipe_from=pipe_from, pipe_to=pipe_to)
+                sequence.copy(pipe_from=pipe_from, pipe_to=pipe_to, 
verbose=verbose)
 
             # Get the spin container indices.
             mol_index, res_index, spin_index = 
convert_from_global_index(global_index=model_index, pipe=pipe_from)




Related Messages


Powered by MHonArc, Updated Thu Sep 25 22:40:06 2008