mailr9789 - /branches/bmrb/specific_fns/model_free/bmrb.py


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

Header


Content

Posted by edward on October 26, 2009 - 18:36:
Author: bugman
Date: Mon Oct 26 18:36:35 2009
New Revision: 9789

URL: http://svn.gna.org/viewcvs/relax?rev=9789&view=rev
Log:
Added a check to see if the element type has been specified.


Modified:
    branches/bmrb/specific_fns/model_free/bmrb.py

Modified: branches/bmrb/specific_fns/model_free/bmrb.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/specific_fns/model_free/bmrb.py?rev=9789&r1=9788&r2=9789&view=diff
==============================================================================
--- branches/bmrb/specific_fns/model_free/bmrb.py (original)
+++ branches/bmrb/specific_fns/model_free/bmrb.py Mon Oct 26 18:36:35 2009
@@ -157,6 +157,8 @@
                 raise RelaxError("For the BMRB, the spin '%s' must be 
named." % spin_id)
             if spin.heteronuc_type == None:
                 raise RelaxError("For the BMRB, the spin isotope type of 
'%s' must be specified." % spin_id)
+            if not hasattr(spin, 'element') or spin.element == None:
+                raise RelaxError("For the BMRB, the spin element type of 
'%s' must be specified.  Please use the spin user function for setting the 
element type." % spin_id)
 
             # The molecule/residue/spin info.
             res_num_list.append(res_num)
@@ -167,10 +169,7 @@
             csa_list.append(spin.csa * 1e6)    # In ppm.
             r_list.append(spin.r)
             isotope_list.append(int(string.strip(spin.heteronuc_type, 
string.ascii_letters)))
-            if hasattr(spin, 'element'):
-                element_list.append(spin.element)
-            else:
-                element_list.append(None)
+            element_list.append(spin.element)
 
             # Diffusion tensor.
             local_tm_list.append(spin.local_tm)




Related Messages


Powered by MHonArc, Updated Mon Oct 26 19:00:02 2009