mailr12485 - /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 February 01, 2011 - 16:26:
Author: bugman
Date: Tue Feb  1 16:26:23 2011
New Revision: 12485

URL: http://svn.gna.org/viewcvs/relax?rev=12485&view=rev
Log:
The isotope number is now being guessed from the atom name if not given in 
the BMRB file.


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=12485&r1=12484&r2=12485&view=diff
==============================================================================
--- branches/bmrb/specific_fns/model_free/bmrb.py (original)
+++ branches/bmrb/specific_fns/model_free/bmrb.py Tue Feb  1 16:26:23 2011
@@ -196,7 +196,16 @@
 
                 # Heteronucleus type.
                 if'atom_types' in keys and data['atom_types'] != None and 
'isotope' in keys and data['isotope'] != None:
-                    setattr(spin, 'heteronuc_type', str(data['isotope'][i]) 
+ data['atom_types'][i])
+                    # The isotope number.
+                    iso_num = data['isotope'][i]
+
+                    # No isotope number.
+                    iso_table = {'C': 13, 'N': 15}
+                    if not data['isotope'][i]:
+                        iso_num = iso_table[data['atom_types'][i]]
+
+                    # Set the type.
+                    setattr(spin, 'heteronuc_type', str(iso_num) + 
data['atom_types'][i])
 
 
     def _sf_csa_read(self, star):




Related Messages


Powered by MHonArc, Updated Tue Feb 01 17:00:02 2011