mailr4574 - in /branches/N_state_model: ./ dx/ generic_fns/ prompt/


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

Header


Content

Posted by edward on January 09, 2008 - 18:21:
Author: bugman
Date: Wed Jan  9 18:21:28 2008
New Revision: 4574

URL: http://svn.gna.org/viewcvs/relax?rev=4574&view=rev
Log:
Merged revisions 4567-4572 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/1.3

........
  r4567 | semor | 2008-01-09 17:51:14 +0100 (Wed, 09 Jan 2008) | 3 lines
  
  Changed all instances of the 'print_flag' arg to 'verbosity' in the prompt 
for tab_completion.
........
  r4569 | semor | 2008-01-09 17:54:26 +0100 (Wed, 09 Jan 2008) | 3 lines
  
  Changed 1 instance of the 'print_flag' arg to 'verbosity' in the OpenDX 
code for 3D isosurfaces.
........
  r4571 | semor | 2008-01-09 18:02:54 +0100 (Wed, 09 Jan 2008) | 3 lines
  
  Changed all instances of the 'print_flag' arg to 'verbosity' in the generic 
directory.
........
  r4572 | bugman | 2008-01-09 18:13:20 +0100 (Wed, 09 Jan 2008) | 3 lines
  
  Updated the RelaxNoTensorError class to allow for the tensor label to be 
printed in the traceback.
........

Modified:
    branches/N_state_model/   (props changed)
    branches/N_state_model/dx/isosurface_3D.py
    branches/N_state_model/generic_fns/dasha.py
    branches/N_state_model/generic_fns/palmer.py
    branches/N_state_model/generic_fns/results.py
    branches/N_state_model/generic_fns/structure.py
    branches/N_state_model/prompt/tab_completion.py
    branches/N_state_model/relax_errors.py

Propchange: branches/N_state_model/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: branches/N_state_model/dx/isosurface_3D.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/dx/isosurface_3D.py?rev=4574&r1=4573&r2=4574&view=diff
==============================================================================
--- branches/N_state_model/dx/isosurface_3D.py (original)
+++ branches/N_state_model/dx/isosurface_3D.py Wed Jan  9 18:21:28 2008
@@ -103,7 +103,7 @@
                     self.relax.generic.value.set(run=self.run, value=values, 
param=self.params, res_num=self.res_num, force=1)
 
                     # Calculate the function values.
-                    self.calculate(run=self.run, res_num=self.res_num, 
print_flag=0)
+                    self.calculate(run=self.run, res_num=self.res_num, 
verbosity=0)
 
                     # Get the minimisation statistics for the model.
                     k, n, chi2 = self.model_stats(run=self.run, 
instance=self.index)

Modified: branches/N_state_model/generic_fns/dasha.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/generic_fns/dasha.py?rev=4574&r1=4573&r2=4574&view=diff
==============================================================================
--- branches/N_state_model/generic_fns/dasha.py (original)
+++ branches/N_state_model/generic_fns/dasha.py Wed Jan  9 18:21:28 2008
@@ -80,7 +80,7 @@
         # Directory creation.
         if self.dir == None:
             self.dir = self.run
-        self.relax.IO.mkdir(self.dir, print_flag=0)
+        self.relax.IO.mkdir(self.dir, verbosity=0)
 
         # Number of field strengths and values.
         self.num_frq = 0

Modified: branches/N_state_model/generic_fns/palmer.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/generic_fns/palmer.py?rev=4574&r1=4573&r2=4574&view=diff
==============================================================================
--- branches/N_state_model/generic_fns/palmer.py (original)
+++ branches/N_state_model/generic_fns/palmer.py Wed Jan  9 18:21:28 2008
@@ -78,7 +78,7 @@
         # Directory creation.
         if dir == None:
             dir = run
-        self.relax.IO.mkdir(dir, print_flag=0)
+        self.relax.IO.mkdir(dir, verbosity=0)
 
         # Place the arguments into 'self'.
         self.run = run

Modified: branches/N_state_model/generic_fns/results.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/generic_fns/results.py?rev=4574&r1=4573&r2=4574&view=diff
==============================================================================
--- branches/N_state_model/generic_fns/results.py (original)
+++ branches/N_state_model/generic_fns/results.py Wed Jan  9 18:21:28 2008
@@ -87,7 +87,7 @@
         self.write_function(sys.stdout, run)
 
 
-    def read(self, run=None, file='results', directory=None, file_data=None, 
format='columnar', print_flag=1):
+    def read(self, run=None, file='results', directory=None, file_data=None, 
format='columnar', verbosity=1):
         """Function for reading the data out of a file."""
 
         # Test if the run exists.
@@ -138,10 +138,10 @@
             raise RelaxFileEmptyError
 
         # Read the results.
-        self.read_function(run, file_data, print_flag)
+        self.read_function(run, file_data, verbosity)
 
 
-    def write(self, run=None, file="results", directory=None, force=0, 
format='columnar', compress_type=1, print_flag=1):
+    def write(self, run=None, file="results", directory=None, force=0, 
format='columnar', compress_type=1, verbosity=1):
         """Create the results file."""
 
         # Test if the run exists.
@@ -169,7 +169,7 @@
             raise RelaxError, "The " + format + " format is not currently 
supported for " + self.relax.specific_setup.get_string(function_type) + "."
 
         # Open the file for writing.
-        results_file = self.relax.IO.open_write_file(file_name=file, 
dir=directory, force=force, compress_type=compress_type, 
print_flag=print_flag)
+        results_file = self.relax.IO.open_write_file(file_name=file, 
dir=directory, force=force, compress_type=compress_type, verbosity=verbosity)
 
         # Write the results.
         self.write_function(results_file, run)

Modified: branches/N_state_model/generic_fns/structure.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/generic_fns/structure.py?rev=4574&r1=4573&r2=4574&view=diff
==============================================================================
--- branches/N_state_model/generic_fns/structure.py (original)
+++ branches/N_state_model/generic_fns/structure.py Wed Jan  9 18:21:28 2008
@@ -46,7 +46,7 @@
         self.relax = relax
 
         # Print flag.
-        self.print_flag = 1
+        self.verbosity = 1
 
 
     def atom_add(self, atom_id=None, record_name='', atom_name='', 
res_name='', chain_id='', res_num=None, pos=[None, None, None], 
segment_id='', element=''):
@@ -827,7 +827,7 @@
                 relax_data_store.pdb[self.run].structures = 
relax_data_store.pdb[run].structures
 
                 # Print out.
-                if self.print_flag:
+                if self.verbosity:
                     print "Using the structures from the run " + `run` + "."
                     for i in 
xrange(len(relax_data_store.pdb[self.run].structures)):
                         print relax_data_store.pdb[self.run].structures[i]
@@ -841,7 +841,7 @@
         # Load the structure i from the PDB file.
         if type(self.model) == int:
             # Print out.
-            if self.print_flag:
+            if self.verbosity:
                 print "Loading structure " + `self.model` + " from the PDB 
file."
 
             # Load the structure into 'str'.
@@ -852,7 +852,7 @@
                 raise RelaxPdbLoadError, self.file_path
 
             # Print the PDB info.
-            if self.print_flag:
+            if self.verbosity:
                 print str
 
             # Place the structure in 'relax_data_store.pdb[self.run]'.
@@ -862,7 +862,7 @@
         # Load all structures.
         else:
             # Print out.
-            if self.print_flag:
+            if self.verbosity:
                 print "Loading all structures from the PDB file."
 
             # First model.
@@ -885,7 +885,7 @@
                     break
 
                 # Print the PDB info.
-                if self.print_flag:
+                if self.verbosity:
                     print str
 
                 # Place the structure in 'relax_data_store.pdb[self.run]'.
@@ -895,7 +895,7 @@
                 i = i + 1
 
 
-    def read_pdb(self, run=None, file=None, dir=None, model=None, 
load_seq=1, fail=1, print_flag=1):
+    def read_pdb(self, run=None, file=None, dir=None, model=None, 
load_seq=1, fail=1, verbosity=1):
         """The pdb loading function."""
 
         # Arguments.
@@ -905,7 +905,7 @@
         self.model = model
         self.load_seq = load_seq
         self.fail = fail
-        self.print_flag = print_flag
+        self.verbosity = verbosity
 
         # Tests.
         ########
@@ -1004,7 +1004,7 @@
         num_str = len(relax_data_store.pdb[self.run].structures)
 
         # Print out.
-        if self.print_flag:
+        if self.verbosity:
             if num_str > 1:
                 print "\nCalculating and averaging the unit XH vectors from 
all structures."
             else:

Modified: branches/N_state_model/prompt/tab_completion.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/prompt/tab_completion.py?rev=4574&r1=4573&r2=4574&view=diff
==============================================================================
--- branches/N_state_model/prompt/tab_completion.py (original)
+++ branches/N_state_model/prompt/tab_completion.py Wed Jan  9 18:21:28 2008
@@ -25,11 +25,11 @@
 
 
 class Tab_completion:
-    def __init__(self, name_space={}, print_flag=0):
+    def __init__(self, name_space={}, verbosity=0):
         """Function for tab completion."""
 
         self.name_space = name_space
-        self.print_flag = print_flag
+        self.verbosity = verbosity
 
 
     def create_list(self):
@@ -71,7 +71,7 @@
             if match(list[-1], name):
                 self.options.append(module + '.' + name)
 
-        if self.print_flag:
+        if self.verbosity:
             print "List: " + `list`
             print "Module: " + `module`
             print "self.list: " + `self.list`
@@ -86,24 +86,24 @@
 
         # Create a list of all possible options.
         # Find a list of options by matching the input with self.list
-        if self.print_flag:
+        if self.verbosity:
             print "\nInput: " + `self.input`
         if not "." in self.input:
-            if self.print_flag:
+            if self.verbosity:
                 print "Creating list."
             self.create_list()
-            if self.print_flag:
+            if self.verbosity:
                 print "\tOk."
         else:
-            if self.print_flag:
+            if self.verbosity:
                 print "Creating sublist."
             self.create_sublist()
-            if self.print_flag:
+            if self.verbosity:
                 print "\tOk."
 
 
         # Return the options if self.options[state] exists, or return None 
otherwise.
-        if self.print_flag:
+        if self.verbosity:
             print "Returning options."
         if self.state < len(self.options):
             return self.options[self.state]

Modified: branches/N_state_model/relax_errors.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/relax_errors.py?rev=4574&r1=4573&r2=4574&view=diff
==============================================================================
--- branches/N_state_model/relax_errors.py (original)
+++ branches/N_state_model/relax_errors.py Wed Jan  9 18:21:28 2008
@@ -503,8 +503,11 @@
 
 # No tensor data exists.
 class RelaxNoTensorError(BaseError):
-    def __init__(self, tensor_type):
-        self.text = "No " + tensor_type + " tensor data exists."
+    def __init__(self, tensor_type, tensor_label=None):
+        if not tensor_label:
+            self.text = "No " + tensor_type + " tensor data exists."
+        else:
+            self.text = "No " + tensor_type + " tensor data exists for the 
tensor " + `tensor_label` + "."
         if Debug:
             self.save_state()
 




Related Messages


Powered by MHonArc, Updated Wed Jan 09 19:40:09 2008