mailr11190 - in /branches/bieri_gui: ./ generic_fns/ generic_fns/structure/ specific_fns/ test_suite/system_tests/


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

Header


Content

Posted by michael . bieri on May 19, 2010 - 01:01:
Author: michaelbieri
Date: Wed May 19 01:01:07 2010
New Revision: 11190

URL: http://svn.gna.org/viewcvs/relax?rev=11190&view=rev
Log:
Merged revisions 11185-11189 via svnmerge from 
svn+ssh://michaelbieri@xxxxxxxxxxx/svn/relax/1.3

........
  r11185 | bugman | 2010-05-12 00:48:07 +1000 (Wed, 12 May 2010) | 3 lines
  
  Added some checks to properly inform the user as to what data is missing.
........
  r11186 | bugman | 2010-05-14 23:53:21 +1000 (Fri, 14 May 2010) | 3 lines
  
  Docstring fix for the vect_dist_spherical_angles() function.
........
  r11187 | bugman | 2010-05-18 22:15:13 +1000 (Tue, 18 May 2010) | 5 lines
  
  Added a check for the RDC RMS based Q-factor.
  
  This is to check that relax matches both of Pales' Q-factors - which it 
does.
........
  r11188 | bugman | 2010-05-19 01:54:30 +1000 (Wed, 19 May 2010) | 3 lines
  
  Broke some nasty circular import caused by importing the generic_fns.grace 
module.
........
  r11189 | bugman | 2010-05-19 02:32:14 +1000 (Wed, 19 May 2010) | 3 lines
  
  Set names are now only written if they are not None.
........

Modified:
    branches/bieri_gui/   (props changed)
    branches/bieri_gui/generic_fns/grace.py
    branches/bieri_gui/generic_fns/structure/geometric.py
    branches/bieri_gui/specific_fns/n_state_model.py
    branches/bieri_gui/test_suite/system_tests/n_state_model.py

Propchange: branches/bieri_gui/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed May 19 01:01:07 2010
@@ -1,1 +1,1 @@
-/1.3:1-11176
+/1.3:1-11189

Modified: branches/bieri_gui/generic_fns/grace.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/generic_fns/grace.py?rev=11190&r1=11189&r2=11190&view=diff
==============================================================================
--- branches/bieri_gui/generic_fns/grace.py (original)
+++ branches/bieri_gui/generic_fns/grace.py Wed May 19 01:01:07 2010
@@ -35,7 +35,7 @@
 from relax_errors import RelaxError, RelaxNoSequenceError, RelaxNoSimError
 from relax_io import get_file_path, open_write_file, test_binary
 from relax_warnings import RelaxWarning
-from specific_fns.setup import get_specific_fn
+import specific_fns
 
 
 def determine_seq_type(spin_id=None):
@@ -89,8 +89,8 @@
     data_list = False
 
     # Specific x and y value returning functions.
-    x_return_value = y_return_value = get_specific_fn('return_value', 
pipes.get_type())
-    x_return_conversion_factor = y_return_conversion_factor = 
get_specific_fn('return_conversion_factor', pipes.get_type())
+    x_return_value = y_return_value = 
specific_fns.setup.get_specific_fn('return_value', pipes.get_type())
+    x_return_conversion_factor = y_return_conversion_factor = 
specific_fns.setup.get_specific_fn('return_conversion_factor', 
pipes.get_type())
 
     # Test if the X-axis data type is a minimisation statistic.
     if x_data_type != 'spin' and 
generic_fns.minimise.return_data_name(x_data_type):
@@ -474,8 +474,8 @@
             analysis_spec = True
 
             # Specific value and error, conversion factor, and units 
returning functions.
-            return_units = get_specific_fn('return_units', pipes.get_type())
-            return_grace_string = get_specific_fn('return_grace_string', 
pipes.get_type())
+            return_units = 
specific_fns.setup.get_specific_fn('return_units', pipes.get_type())
+            return_grace_string = 
specific_fns.setup.get_specific_fn('return_grace_string', pipes.get_type())
 
             # Test if the axis data type is a minimisation statistic.
             if data_type[i] and data_type[i] != 'spin' and 
generic_fns.minimise.return_data_name(data_type[i]):
@@ -598,5 +598,5 @@
             file.write("@    s%i line color %s\n" % (i, set_colours[i]))
 
         # Legend.
-        if set_names:
+        if set_names and set_names[i]:
             file.write("@    s%i legend \"%s\"\n" % (i, set_names[i]))

Modified: branches/bieri_gui/generic_fns/structure/geometric.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/generic_fns/structure/geometric.py?rev=11190&r1=11189&r2=11190&view=diff
==============================================================================
--- branches/bieri_gui/generic_fns/structure/geometric.py (original)
+++ branches/bieri_gui/generic_fns/structure/geometric.py Wed May 19 01:01:07 
2010
@@ -1062,7 +1062,7 @@
     @keyword distribution:  The type of point distribution to use.  This can 
be 'uniform' or 'regular'.
     @type distribution:     str
     @return:                The distribution of vectors on a sphere.
-    @rtype:                 list of rank-1, 3D numpy arrays, array of float, 
array of float
+    @rtype:                 list of rank-1, 3D numpy arrays
     """
 
     # Get the polar and azimuthal angles for the distribution.

Modified: branches/bieri_gui/specific_fns/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/specific_fns/n_state_model.py?rev=11190&r1=11189&r2=11190&view=diff
==============================================================================
--- branches/bieri_gui/specific_fns/n_state_model.py (original)
+++ branches/bieri_gui/specific_fns/n_state_model.py Wed May 19 01:01:07 2010
@@ -48,7 +48,7 @@
 from maths_fns.potential import quad_pot
 from maths_fns.rotation_matrix import two_vect_to_R, euler_to_R_zyz
 from physical_constants import dipolar_constant, g1H, pcs_constant, 
return_gyromagnetic_ratio
-from relax_errors import RelaxError, RelaxInfError, RelaxModelError, 
RelaxNaNError, RelaxNoModelError, RelaxNoTensorError
+from relax_errors import RelaxError, RelaxInfError, RelaxModelError, 
RelaxNaNError, RelaxNoModelError, RelaxNoTensorError, RelaxNoValueError, 
RelaxProtonTypeError, RelaxSpinTypeError
 from relax_io import open_write_file
 from relax_warnings import RelaxWarning, RelaxDeselectWarning
 
@@ -888,6 +888,14 @@
             else:
                 unit_vect.append(vect)
 
+            # Checks.
+            if not hasattr(spin, 'heteronuc_type'):
+                raise RelaxSpinTypeError
+            if not hasattr(spin, 'proton_type'):
+                raise RelaxProtonTypeError
+            if not hasattr(spin, 'r'):
+                raise RelaxNoValueError("bond length")
+
             # Gyromagnetic ratios.
             gx = return_gyromagnetic_ratio(spin.heteronuc_type)
             gh = return_gyromagnetic_ratio(spin.proton_type)
@@ -907,6 +915,10 @@
             # Check.
             if unit_vect[i] != None and len(unit_vect[i]) != num:
                 raise RelaxError, "The number of bond vectors for all spins 
do no match:\n%s" % unit_vect
+
+        # Missing unit vectors.
+        if num == None:
+            raise RelaxError, "No bond vectors could be found."
 
         # Update None entries.
         for i in range(len(unit_vect)):

Modified: branches/bieri_gui/test_suite/system_tests/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/test_suite/system_tests/n_state_model.py?rev=11190&r1=11189&r2=11190&view=diff
==============================================================================
--- branches/bieri_gui/test_suite/system_tests/n_state_model.py (original)
+++ branches/bieri_gui/test_suite/system_tests/n_state_model.py Wed May 19 
01:01:07 2010
@@ -266,6 +266,7 @@
         self.assertAlmostEqual(cdp.align_tensors[0].Ayz, -0.00015125)
         self.assertAlmostEqual(cdp.chi2, 23.5877482365)                 # 
Pales: 23.709
         self.assertAlmostEqual(cdp.q_rdc, 0.078460000413257444)       # 
Pales (Q Saupe): 0.079
+        self.assertAlmostEqual(cdp.q_rdc_norm2, 0.14049691097282743)       # 
Pales (Q RDC_RMS): 0.141
 
 
     def test_lactose_n_state_fixed(self):




Related Messages


Powered by MHonArc, Updated Wed May 19 01:40:02 2010