mailr17575 - /trunk/generic_fns/bruker.py


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

Header


Content

Posted by edward on September 27, 2012 - 16:29:
Author: bugman
Date: Thu Sep 27 16:29:40 2012
New Revision: 17575

URL: http://svn.gna.org/viewcvs/relax?rev=17575&view=rev
Log:
Fix for bug #20201 (https://gna.org/bugs/?20201).

The bruker.read user function can now handle the situation where multiple 
spins per residue are
already loaded prior to the user function call.  The isotope value from the 
DC file is now
translated to the element name and this is used as part of the spin ID string.


Modified:
    trunk/generic_fns/bruker.py

Modified: trunk/generic_fns/bruker.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/generic_fns/bruker.py?rev=17575&r1=17574&r2=17575&view=diff
==============================================================================
--- trunk/generic_fns/bruker.py (original)
+++ trunk/generic_fns/bruker.py Thu Sep 27 16:29:40 2012
@@ -34,6 +34,7 @@
 from generic_fns.relax_data import pack_data, peak_intensity_type
 from relax_errors import RelaxError, RelaxNoSequenceError
 from relax_io import open_read_file
+from physical_constants import element_from_isotope
 
 
 def convert_relax_data(data):
@@ -189,8 +190,11 @@
 
         # The labelling.
         elif row[0] == 'Labelling:':
+            # Store the isotope for later use.
+            isotope = row[1]
+
             # Set the isotope value.
-            set_spin_isotope(isotope=row[1], force=None)
+            set_spin_isotope(isotope=isotope, force=None)
 
             # Name the spins.
             name = split('([A-Z]+)', row[1])[1]
@@ -206,6 +210,11 @@
             if row[1] == 'area integral':
                 int_type = 'volume'
 
+    # Modify the residue numbers by adding the heteronucleus name.
+    atom_name = element_from_isotope(isotope)
+    for i in range(len(res_nums)):
+        res_nums[i] += '@' + atom_name
+
     # Pack the data.
     pack_data(ri_id, ri_type, frq, values, errors, spin_ids=res_nums)
 




Related Messages


Powered by MHonArc, Updated Thu Sep 27 19:20:02 2012