mailr8805 - /1.3/generic_fns/spectrum.py


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

Header


Content

Posted by edward on February 15, 2009 - 19:05:
Author: bugman
Date: Sun Feb 15 19:05:15 2009
New Revision: 8805

URL: http://svn.gna.org/viewcvs/relax?rev=8805&view=rev
Log:
Modified how the generic peak intensity file is detected.

The change is that if no other formats are detected, relax falls back to the 
generic format.


Modified:
    1.3/generic_fns/spectrum.py

Modified: 1.3/generic_fns/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/spectrum.py?rev=8805&r1=8804&r2=8805&view=diff
==============================================================================
--- 1.3/generic_fns/spectrum.py (original)
+++ 1.3/generic_fns/spectrum.py Sun Feb 15 19:05:15 2009
@@ -252,10 +252,6 @@
         if line != []:
             break
 
-    # Generic format.
-    if line[0] in ['mol_name', 'res_num', 'res_name', 'spin_num', 
'spin_name'] or line[0] in ['Num', 'Name']:
-        return 'generic'
-
     # Sparky format.
     if line[0] == 'Assignment':
         return 'sparky'
@@ -268,8 +264,8 @@
     if line == ['No.', 'Color', 'w1', 'w2', 'ass.', 'in', 'w1', 'ass.', 
'in', 'w2', 'Volume', 'Vol.', 'Err.', 'Method', 'Comment']:
         return 'xeasy'
 
-    # Unsupported format.
-    raise RelaxError, "The format of the peak list file cannot be 
determined.  Either the file is of a non-standard format or the format is 
unsupported."
+    # Assume a generic format.
+    return 'generic'
 
 
 def baseplane_rmsd(error=0.0, spectrum_id=None, spin_id=None):
@@ -763,6 +759,10 @@
         # Print out.
         print "Generic formatted data file.\n"
 
+        # Test that column numbers have been given.
+        if max(mol_name_col, res_num_col, res_name_col, spin_num_col, 
spin_name_col) == None:
+            raise RelaxError, "No column numbers have been supplied."
+
         # Set the intensity reading function.
         intensity_fn = intensity_generic
 




Related Messages


Powered by MHonArc, Updated Mon Feb 16 11:40:04 2009