mailr8948 - in /branches/bmrb: bmrblib/kinetics/ generic_fns/


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

Header


Content

Posted by edward on March 10, 2009 - 11:35:
Author: bugman
Date: Tue Mar 10 11:35:50 2009
New Revision: 8948

URL: http://svn.gna.org/viewcvs/relax?rev=8948&view=rev
Log:
relax now dumps the spin isotope number into the Rx BMRB sections.


Modified:
    branches/bmrb/bmrblib/kinetics/heteronucl_NOEs.py
    branches/bmrb/bmrblib/kinetics/heteronucl_T1_relaxation.py
    branches/bmrb/bmrblib/kinetics/heteronucl_T2_relaxation.py
    branches/bmrb/generic_fns/relax_data.py

Modified: branches/bmrb/bmrblib/kinetics/heteronucl_NOEs.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/bmrblib/kinetics/heteronucl_NOEs.py?rev=8948&r1=8947&r2=8948&view=diff
==============================================================================
--- branches/bmrb/bmrblib/kinetics/heteronucl_NOEs.py (original)
+++ branches/bmrb/bmrblib/kinetics/heteronucl_NOEs.py Tue Mar 10 11:35:50 2009
@@ -69,8 +69,8 @@
         @type res_names:        list of str
         @keyword atom_names:    The atom name list.
         @type atom_names:       list of str
-        @keyword isotope:       The isotope type list, ie '15N', '1H', 
'13C', '2H', etc.
-        @type isotope:          list of str
+        @keyword isotope:       The isotope type list, ie 15 for '15N'.
+        @type isotope:          list of int
         @keyword data:          The relaxation data.
         @type data:             list of float
         @keyword errors:        The errors associated with the relaxation 
data.

Modified: branches/bmrb/bmrblib/kinetics/heteronucl_T1_relaxation.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/bmrblib/kinetics/heteronucl_T1_relaxation.py?rev=8948&r1=8947&r2=8948&view=diff
==============================================================================
--- branches/bmrb/bmrblib/kinetics/heteronucl_T1_relaxation.py (original)
+++ branches/bmrb/bmrblib/kinetics/heteronucl_T1_relaxation.py Tue Mar 10 
11:35:50 2009
@@ -69,8 +69,8 @@
         @type res_names:        list of str
         @keyword atom_names:    The atom name list.
         @type atom_names:       list of str
-        @keyword isotope:       The isotope type list, ie '15N', '1H', 
'13C', '2H', etc.
-        @type isotope:          list of str
+        @keyword isotope:       The isotope type list, ie 15 for '15N'.
+        @type isotope:          list of int
         @keyword data:          The relaxation data.
         @type data:             list of float
         @keyword errors:        The errors associated with the relaxation 
data.

Modified: branches/bmrb/bmrblib/kinetics/heteronucl_T2_relaxation.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/bmrblib/kinetics/heteronucl_T2_relaxation.py?rev=8948&r1=8947&r2=8948&view=diff
==============================================================================
--- branches/bmrb/bmrblib/kinetics/heteronucl_T2_relaxation.py (original)
+++ branches/bmrb/bmrblib/kinetics/heteronucl_T2_relaxation.py Tue Mar 10 
11:35:50 2009
@@ -69,8 +69,8 @@
         @type res_names:        list of str
         @keyword atom_names:    The atom name list.
         @type atom_names:       list of str
-        @keyword isotope:       The isotope type list, ie '15N', '1H', 
'13C', '2H', etc.
-        @type isotope:          list of str
+        @keyword isotope:       The isotope type list, ie 15 for '15N'.
+        @type isotope:          list of int
         @keyword data:          The relaxation data.
         @type data:             list of float
         @keyword errors:        The errors associated with the relaxation 
data.

Modified: branches/bmrb/generic_fns/relax_data.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/generic_fns/relax_data.py?rev=8948&r1=8947&r2=8948&view=diff
==============================================================================
--- branches/bmrb/generic_fns/relax_data.py (original)
+++ branches/bmrb/generic_fns/relax_data.py Tue Mar 10 11:35:50 2009
@@ -25,6 +25,7 @@
 
 # Python module imports.
 from copy import deepcopy
+import string
 import sys
 
 # relax module imports.
@@ -247,6 +248,7 @@
     res_num_list = []
     res_name_list = []
     atom_name_list = []
+    isotope_list = []
     relax_data_list = []
     relax_error_list = []
     for i in range(cdp.num_ri):
@@ -270,6 +272,8 @@
             raise RelaxError, "For the BMRB, the residue of spin '%s' must 
be named." % spin_id
         if spin.name == None:
             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
 
         # The molecule/residue/spin info.
         res_num_list.append(str(res_num))
@@ -281,14 +285,17 @@
             relax_data_list[i].append(str(spin.relax_data[i]))
             relax_error_list[i].append(str(spin.relax_error[i]))
 
+        # Other info.
+        isotope_list.append(int(string.strip(spin.heteronuc_type, 
string.ascii_letters)))
+
     # Add the relaxation data.
     for i in range(cdp.num_ri):
         if cdp.ri_labels[i] == 'R1':
-            
star.heteronucl_T1_relaxation.add(frq=cdp.frq[cdp.remap_table[i]], 
res_nums=res_num_list, res_names=res_name_list, atom_names=atom_name_list, 
data=relax_data_list[i], errors=relax_error_list[i])
+            
star.heteronucl_T1_relaxation.add(frq=cdp.frq[cdp.remap_table[i]], 
res_nums=res_num_list, res_names=res_name_list, atom_names=atom_name_list, 
isotope=isotope_list, data=relax_data_list[i], errors=relax_error_list[i])
         elif cdp.ri_labels[i] == 'R2':
-            
star.heteronucl_T2_relaxation.add(frq=cdp.frq[cdp.remap_table[i]], 
res_nums=res_num_list, res_names=res_name_list, atom_names=atom_name_list, 
data=relax_data_list[i], errors=relax_error_list[i])
+            
star.heteronucl_T2_relaxation.add(frq=cdp.frq[cdp.remap_table[i]], 
res_nums=res_num_list, res_names=res_name_list, atom_names=atom_name_list, 
isotope=isotope_list, data=relax_data_list[i], errors=relax_error_list[i])
         elif cdp.ri_labels[i] == 'NOE':
-            star.heteronucl_NOEs.add(frq=cdp.frq[cdp.remap_table[i]], 
res_nums=res_num_list, res_names=res_name_list, atom_names=atom_name_list, 
data=relax_data_list[i], errors=relax_error_list[i])
+            star.heteronucl_NOEs.add(frq=cdp.frq[cdp.remap_table[i]], 
res_nums=res_num_list, res_names=res_name_list, atom_names=atom_name_list, 
isotope=isotope_list, data=relax_data_list[i], errors=relax_error_list[i])
 
 
 def copy(pipe_from=None, pipe_to=None, ri_label=None, frq_label=None):




Related Messages


Powered by MHonArc, Updated Tue Mar 10 12:00:11 2009