mailr8947 - /branches/bmrb/bmrblib/kinetics/


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:26:
Author: bugman
Date: Tue Mar 10 11:26:10 2009
New Revision: 8947

URL: http://svn.gna.org/viewcvs/relax?rev=8947&view=rev
Log:
Added the isotope arg to the relaxation data API parts.

The tag_setup() method has been abstracted back into the 
kinetics.relax_base.Rx base class.


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/bmrblib/kinetics/relax_base.py

Modified: branches/bmrb/bmrblib/kinetics/heteronucl_NOEs.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/bmrblib/kinetics/heteronucl_NOEs.py?rev=8947&r1=8946&r2=8947&view=diff
==============================================================================
--- branches/bmrb/bmrblib/kinetics/heteronucl_NOEs.py (original)
+++ branches/bmrb/bmrblib/kinetics/heteronucl_NOEs.py Tue Mar 10 11:26:10 2009
@@ -58,7 +58,7 @@
         self.add_tag_categories()
 
 
-    def add(self, frq=None, res_nums=None, res_names=None, atom_names=None, 
data=None, errors=None):
+    def add(self, frq=None, res_nums=None, res_names=None, atom_names=None, 
isotope=None, data=None, errors=None):
         """Add relaxation data to the data nodes.
 
         @keyword frq:           The spectrometer proton frequency, in Hz.
@@ -69,6 +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 data:          The relaxation data.
         @type data:             list of float
         @keyword errors:        The errors associated with the relaxation 
data.
@@ -85,6 +87,7 @@
         self.res_nums = translate(res_nums)
         self.res_names = translate(res_names)
         self.atom_names = translate(atom_names)
+        self.isotope = translate(isotope)
         self.data = translate(data)
         self.errors = translate(errors)
 
@@ -187,22 +190,3 @@
 
 class HeteronuclNOE(Rx):
     """Base class for the HeteronuclNOE tag category."""
-
-    def tag_setup(self, tag_category_label=None, sep=None):
-        """Replacement method for setting up the tag names.
-
-        @keyword tag_category_label:    The tag name prefix specific for the 
tag category.
-        @type tag_category_label:       None or str
-        @keyword sep:                   The string separating the tag name 
prefix and suffix.
-        @type sep:                      str
-        """
-
-        # Execute the base class tag_setup() method.
-        TagCategory.tag_setup(self, tag_category_label=tag_category_label, 
sep=sep)
-
-        # Tag names for the relaxation data.
-        self.tag_names['CompIndexID'] = 'Residue_seq_code'
-        self.tag_names['CompID'] = 'Residue_label'
-        self.tag_names['AtomID'] = 'Atom_name'
-        self.tag_names['Val'] = self.sf.label+'_value'
-        self.tag_names['ValErr'] = self.sf.label+'_value_error'

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=8947&r1=8946&r2=8947&view=diff
==============================================================================
--- branches/bmrb/bmrblib/kinetics/heteronucl_T1_relaxation.py (original)
+++ branches/bmrb/bmrblib/kinetics/heteronucl_T1_relaxation.py Tue Mar 10 
11:26:10 2009
@@ -58,7 +58,7 @@
         self.add_tag_categories()
 
 
-    def add(self, frq=None, res_nums=None, res_names=None, atom_names=None, 
data=None, errors=None):
+    def add(self, frq=None, res_nums=None, res_names=None, atom_names=None, 
isotope=None, data=None, errors=None):
         """Add relaxation data to the data nodes.
 
         @keyword frq:           The spectrometer proton frequency, in Hz.
@@ -69,6 +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 data:          The relaxation data.
         @type data:             list of float
         @keyword errors:        The errors associated with the relaxation 
data.
@@ -85,6 +87,7 @@
         self.res_nums = translate(res_nums)
         self.res_names = translate(res_names)
         self.atom_names = translate(atom_names)
+        self.isotope = translate(isotope)
         self.data = translate(data)
         self.errors = translate(errors)
 
@@ -197,21 +200,3 @@
 class T1(Rx):
     """Base class for the T1 tag category."""
 
-    def tag_setup(self, tag_category_label=None, sep=None):
-        """Replacement method for setting up the tag names.
-
-        @keyword tag_category_label:    The tag name prefix specific for the 
tag category.
-        @type tag_category_label:       None or str
-        @keyword sep:                   The string separating the tag name 
prefix and suffix.
-        @type sep:                      str
-        """
-
-        # Execute the base class tag_setup() method.
-        TagCategory.tag_setup(self, tag_category_label=tag_category_label, 
sep=sep)
-
-        # Tag names for the relaxation data.
-        self.tag_names['CompIndexID'] = 'Residue_seq_code'
-        self.tag_names['CompID'] = 'Residue_label'
-        self.tag_names['AtomID'] = 'Atom_name'
-        self.tag_names['Val'] = self.sf.label+'_value'
-        self.tag_names['ValErr'] = self.sf.label+'_value_error'

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=8947&r1=8946&r2=8947&view=diff
==============================================================================
--- branches/bmrb/bmrblib/kinetics/heteronucl_T2_relaxation.py (original)
+++ branches/bmrb/bmrblib/kinetics/heteronucl_T2_relaxation.py Tue Mar 10 
11:26:10 2009
@@ -58,7 +58,7 @@
         self.add_tag_categories()
 
 
-    def add(self, frq=None, res_nums=None, res_names=None, atom_names=None, 
data=None, errors=None):
+    def add(self, frq=None, res_nums=None, res_names=None, atom_names=None, 
isotope=None, data=None, errors=None):
         """Add relaxation data to the data nodes.
 
         @keyword frq:           The spectrometer proton frequency, in Hz.
@@ -69,6 +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 data:          The relaxation data.
         @type data:             list of float
         @keyword errors:        The errors associated with the relaxation 
data.
@@ -85,6 +87,7 @@
         self.res_nums = translate(res_nums)
         self.res_names = translate(res_names)
         self.atom_names = translate(atom_names)
+        self.isotope = translate(isotope)
         self.data = translate(data)
         self.errors = translate(errors)
 
@@ -196,22 +199,3 @@
 
 class T2(Rx):
     """Base class for the T2 tag category."""
-
-    def tag_setup(self, tag_category_label=None, sep=None):
-        """Replacement method for setting up the tag names.
-
-        @keyword tag_category_label:    The tag name prefix specific for the 
tag category.
-        @type tag_category_label:       None or str
-        @keyword sep:                   The string separating the tag name 
prefix and suffix.
-        @type sep:                      str
-        """
-
-        # Execute the base class tag_setup() method.
-        TagCategory.tag_setup(self, tag_category_label=tag_category_label, 
sep=sep)
-
-        # Tag names for the relaxation data.
-        self.tag_names['CompIndexID'] = 'Residue_seq_code'
-        self.tag_names['CompID'] = 'Residue_label'
-        self.tag_names['AtomID'] = 'Atom_name'
-        self.tag_names['Val'] = self.sf.label+'_value'
-        self.tag_names['ValErr'] = self.sf.label+'_value_error'

Modified: branches/bmrb/bmrblib/kinetics/relax_base.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/bmrblib/kinetics/relax_base.py?rev=8947&r1=8946&r2=8947&view=diff
==============================================================================
--- branches/bmrb/bmrblib/kinetics/relax_base.py (original)
+++ branches/bmrb/bmrblib/kinetics/relax_base.py Tue Mar 10 11:26:10 2009
@@ -93,11 +93,12 @@
 
         # Keys and objects.
         info = [
-            ['CompIndexID', 'res_nums'],
-            ['CompID',      'res_names'],
-            ['AtomID',      'atom_names'],
-            ['Val',         'data'],
-            ['ValErr',      'errors']
+            ['CompIndexID',         'res_nums'],
+            ['CompID',              'res_names'],
+            ['AtomID',              'atom_names'],
+            ['AtomIsotopeNumber',   'isotope'],
+            ['Val',                 'data'],
+            ['ValErr',              'errors']
         ]
 
         # Get the TabTable.
@@ -132,3 +133,24 @@
 
         # Return the data.
         return res_nums, res_names, atom_names, values, errors
+
+
+    def tag_setup(self, tag_category_label=None, sep=None):
+        """Replacement method for setting up the tag names.
+
+        @keyword tag_category_label:    The tag name prefix specific for the 
tag category.
+        @type tag_category_label:       None or str
+        @keyword sep:                   The string separating the tag name 
prefix and suffix.
+        @type sep:                      str
+        """
+
+        # Execute the base class tag_setup() method.
+        TagCategory.tag_setup(self, tag_category_label=tag_category_label, 
sep=sep)
+
+        # Tag names for the relaxation data.
+        self.tag_names['CompIndexID'] = 'Residue_seq_code'
+        self.tag_names['CompID'] = 'Residue_label'
+        self.tag_names['AtomID'] = 'Atom_name'
+        self.tag_names['AtomIsotopeNumber'] = 'Atom_isotope_number'
+        self.tag_names['Val'] = self.sf.label+'_value'
+        self.tag_names['ValErr'] = self.sf.label+'_value_error'




Related Messages


Powered by MHonArc, Updated Tue Mar 10 11:40:04 2009