Author: bugman
Date: Thu Jan 15 16:23:13 2009
New Revision: 8474

URL: http://svn.gna.org/viewcvs/relax?rev=8474&view=rev
Log:
Merged revisions 8356,8436,8470-8471 via svnmerge from 
svn+ssh://[email protected]/svn/relax/1.3

........
  r8356 | semor | 2009-01-10 02:28:29 +0100 (Sat, 10 Jan 2009) | 3 lines
  
  Corrected a typo found while coding in the 'relax_disp' branch.
........
  r8436 | semor | 2009-01-13 20:23:13 +0100 (Tue, 13 Jan 2009) | 7 lines
  
  Corrected a typo.
  
  This was discussed in a thread starting at:
  https://mail.gna.org/public/relax-devel/2009-01/msg00087.html
  (Message-id: <[email protected]>)
........
  r8470 | bugman | 2009-01-15 13:52:12 +0100 (Thu, 15 Jan 2009) | 6 lines
  
  Modified parse_token() to allow for '-' characters in molecule names (derived 
from file names, etc.)
  
  Instead of throwing a RelaxError if an invalid range is found, it is assumed 
that the '-' character
  does not signify a range and is treated as a string character which is part 
of the token.
........
  r8471 | bugman | 2009-01-15 14:01:40 +0100 (Thu, 15 Jan 2009) | 6 lines
  
  Deletion of the test_parse_token_range_failx() unit test.
  
  parse_token() no longer raises RelaxErrors with invalid range tokens (as they 
are assumed to be
  standard string characters instead).
........

Modified:
    branches/multi_structure/   (props changed)
    branches/multi_structure/docs/latex/fetch_docstrings.py
    branches/multi_structure/generic_fns/mol_res_spin.py
    branches/multi_structure/specific_fns/relax_fit.py
    
branches/multi_structure/test_suite/unit_tests/_generic_fns/test_mol_res_spin.py

Propchange: branches/multi_structure/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Jan 15 16:23:13 2009
@@ -1,1 +1,1 @@
-/1.3:1-8331
+/1.3:1-8471

Modified: branches/multi_structure/docs/latex/fetch_docstrings.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/multi_structure/docs/latex/fetch_docstrings.py?rev=8474&r1=8473&r2=8474&view=diff
==============================================================================
--- branches/multi_structure/docs/latex/fetch_docstrings.py (original)
+++ branches/multi_structure/docs/latex/fetch_docstrings.py Thu Jan 15 16:23:13 
2009
@@ -367,7 +367,7 @@
 
         # R1 and R2.
         string = self.safe_replacement(string, 'R1', 'R$_1$')
-        string = self.safe_replacement(string, 'R2', 'R$_1$')
+        string = self.safe_replacement(string, 'R2', 'R$_2$')
 
 
         # Model-free parameters.

Modified: branches/multi_structure/generic_fns/mol_res_spin.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/multi_structure/generic_fns/mol_res_spin.py?rev=8474&r1=8473&r2=8474&view=diff
==============================================================================
--- branches/multi_structure/generic_fns/mol_res_spin.py (original)
+++ branches/multi_structure/generic_fns/mol_res_spin.py Thu Jan 15 16:23:13 
2009
@@ -1483,25 +1483,34 @@
                 indices.append(i)
 
         # Range.
+        valid_range = True
         if indices:
             # Invalid range element, only one range char '-' and one negative 
sign is allowed.
             if len(indices) > 2:
-                raise RelaxError, "The range element " + `element` + " is 
invalid."
+                print "The range element " + `element` + " is invalid.  
Assuming the '-' character does not specify a range."
+                valid_range = False
 
             # Convert the two numbers to integers.
             try:
                 start = int(element[:indices[0]])
                 end = int(element[indices[0]+1:])
             except ValueError:
-                raise RelaxError, "The range element " + `element` + " is 
invalid as either the start or end of the range are not integers."
+                print "The range element " + `element` + " is invalid as 
either the start or end of the range are not integers.  Assuming the '-' 
character does not specify a range."
+                valid_range = False
 
             # Test that the starting number is less than the end.
-            if start >= end:
-                raise RelaxError, "The starting number of the range element " 
+ `element` + " needs to be less than the end number."
+            if valid_range and start >= end:
+                print "The starting number of the range element " + `element` 
+ " needs to be less than the end number.  Assuming the '-' character does not 
specify a range."
+                valid_range = False
 
             # Create the range and append it to the list.
-            for i in range(start, end+1):
-                list.append(i)
+            if valid_range:
+                for i in range(start, end+1):
+                    list.append(i)
+
+            # Just append the string (even though it might be junk).
+            else:
+                list.append(element)
 
         # Number or name.
         else:

Modified: branches/multi_structure/specific_fns/relax_fit.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/multi_structure/specific_fns/relax_fit.py?rev=8474&r1=8473&r2=8474&view=diff
==============================================================================
--- branches/multi_structure/specific_fns/relax_fit.py (original)
+++ branches/multi_structure/specific_fns/relax_fit.py Thu Jan 15 16:23:13 2009
@@ -954,7 +954,7 @@
         elif object_name == 'iinf':
             grace_string = '\\qI\\sinf\\Q'
 
-        # Intensity at infinity.
+        # Relaxation period times (series).
         elif object_name == 'relax_times':
             grace_string = '\\qRelaxation time period (s)\\Q'
 

Modified: 
branches/multi_structure/test_suite/unit_tests/_generic_fns/test_mol_res_spin.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/multi_structure/test_suite/unit_tests/_generic_fns/test_mol_res_spin.py?rev=8474&r1=8473&r2=8474&view=diff
==============================================================================
--- 
branches/multi_structure/test_suite/unit_tests/_generic_fns/test_mol_res_spin.py
 (original)
+++ 
branches/multi_structure/test_suite/unit_tests/_generic_fns/test_mol_res_spin.py
 Thu Jan 15 16:23:13 2009
@@ -985,20 +985,6 @@
         self.assertEqual(list[5], 'Gly')
 
 
-    def test_parse_token_range_fail1(self):
-        """Failure of the generic_fns.mol_res_spin.parse_token() function on 
the string '1-5-7'."""
-
-        # Parse the invalid token.
-        self.assertRaises(RelaxError, mol_res_spin.parse_token, '1-5-7')
-
-
-    def test_parse_token_range_fail2(self):
-        """Failure of the generic_fns.mol_res_spin.parse_token() function on 
the string '1--3'."""
-
-        # Parse the invalid token.
-        self.assertRaises(RelaxError, mol_res_spin.parse_token, '1--3')
-
-
     def test_residue_loop(self):
         """Test the proper operation of the residue loop with residue 
selection.
 


_______________________________________________
relax (http://nmr-relax.com)

This is the relax-commits mailing list
[email protected]

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits

Reply via email to