mailr9783 - in /branches/bmrb/bmrblib/kinetics: heteronucl_NOEs.py heteronucl_NOEs_v3_2.py relaxation.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 - 15:26:
Author: bugman
Date: Mon Oct 26 15:26:13 2009
New Revision: 9783

URL: http://svn.gna.org/viewcvs/relax?rev=9783&view=rev
Log:
The HeteronuclNOE saveframe now only has the temp control and calibration 
tags for v3.2.


Added:
    branches/bmrb/bmrblib/kinetics/heteronucl_NOEs_v3_2.py
      - copied, changed from r9782, 
branches/bmrb/bmrblib/kinetics/heteronucl_NOEs_v3_1.py
Modified:
    branches/bmrb/bmrblib/kinetics/heteronucl_NOEs.py
    branches/bmrb/bmrblib/kinetics/relaxation.py

Modified: branches/bmrb/bmrblib/kinetics/heteronucl_NOEs.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/bmrblib/kinetics/heteronucl_NOEs.py?rev=9783&r1=9782&r2=9783&view=diff
==============================================================================
--- branches/bmrb/bmrblib/kinetics/heteronucl_NOEs.py (original)
+++ branches/bmrb/bmrblib/kinetics/heteronucl_NOEs.py Mon Oct 26 15:26:13 2009
@@ -58,7 +58,7 @@
         self.add_tag_categories()
 
 
-    def add(self, frq=None, res_nums=None, res_names=None, atom_names=None, 
isotope=None, data=None, errors=None, temp_calibration=None, 
temp_control=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.
@@ -75,22 +75,12 @@
         @type data:                 list of float
         @keyword errors:            The errors associated with the 
relaxation data.
         @type errors:               list of float
-        @keyword temp_calibration:  The temperature calibration method.
-        @type temp_calibration:     str
-        @keyword temp_control:      The temperature control method.
-        @type temp_control:         str
         """
 
         # Check the ID info.
         no_missing(res_nums, 'residue numbers of the ' + repr(int(frq*1e-6)) 
+ ' MHz NOE data')
         no_missing(res_names, 'residue names of the ' + repr(int(frq*1e-6)) 
+ ' MHz NOE data')
         no_missing(atom_names, 'atom names of the ' + repr(int(frq*1e-6)) + 
' MHz NOE data')
-
-        # Check the args.
-        if not temp_calibration:
-            raise NameError("The temperature calibration method has not been 
specified.")
-        if not temp_control:
-            raise NameError("The temperature control method has not been 
specified.")
 
         # The number of elements.
         self.N = len(res_nums)
@@ -103,8 +93,6 @@
         self.isotope = translate(isotope)
         self.data = translate(data)
         self.errors = translate(errors)
-        self.temp_calibration = translate(temp_calibration)
-        self.temp_control = translate(temp_control)
 
         # Set up the NOE specific variables.
         self.noe_inc = self.noe_inc + 1

Copied: branches/bmrb/bmrblib/kinetics/heteronucl_NOEs_v3_2.py (from r9782, 
branches/bmrb/bmrblib/kinetics/heteronucl_NOEs_v3_1.py)
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/bmrblib/kinetics/heteronucl_NOEs_v3_2.py?p2=branches/bmrb/bmrblib/kinetics/heteronucl_NOEs_v3_2.py&p1=branches/bmrb/bmrblib/kinetics/heteronucl_NOEs_v3_1.py&r1=9782&r2=9783&rev=9783&view=diff
==============================================================================
--- branches/bmrb/bmrblib/kinetics/heteronucl_NOEs_v3_1.py (original)
+++ branches/bmrb/bmrblib/kinetics/heteronucl_NOEs_v3_2.py Mon Oct 26 
15:26:13 2009
@@ -21,92 +21,61 @@
 
###############################################################################
 
 # Module docstring.
-"""The v3.1 Heteronuclear NOE data saveframe category.
+"""The v3.2 Heteronuclear NOE data saveframe category.
 
-See 
http://www.bmrb.wisc.edu/dictionary/3.1html/SaveFramePage.html#heteronucl_NOEs.
+See 
http://www.bmrb.wisc.edu/dictionary/3.2html/SaveFramePage.html#heteronucl_NOEs.
 """
 
 # relax module imports.
 from bmrblib.misc import translate
-from bmrblib.kinetics.heteronucl_NOEs import HeteronuclNOESaveframe, 
HeteronuclNOEList, HeteronuclNOEExperiment, HeteronuclNOESoftware, 
HeteronuclNOE
+from bmrblib.kinetics.heteronucl_NOEs_v3_1 import 
HeteronuclNOESaveframe_v3_1, HeteronuclNOEList_v3_1, 
HeteronuclNOEExperiment_v3_1, HeteronuclNOESoftware_v3_1, HeteronuclNOE_v3_1
 
 
-class HeteronuclNOESaveframe_v3_1(HeteronuclNOESaveframe):
-    """The v3.1 Heteronuclear NOE data saveframe class."""
+class HeteronuclNOESaveframe_v3_2(HeteronuclNOESaveframe_v3_1):
+    """The v3.2 Heteronuclear NOE data saveframe class."""
+
+    def add(self, frq=None, res_nums=None, res_names=None, atom_names=None, 
isotope=None, data=None, errors=None, temp_calibration=None, 
temp_control=None):
+        """Add relaxation data to the data nodes.
+
+        @keyword frq:               The spectrometer proton frequency, in Hz.
+        @type frq:                  float
+        @keyword res_nums:          The residue number list.
+        @type res_nums:             list of int
+        @keyword res_names:         The residue name list.
+        @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 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.
+        @type errors:               list of float
+        @keyword temp_calibration:  The temperature calibration method.
+        @type temp_calibration:     str
+        @keyword temp_control:      The temperature control method.
+        @type temp_control:         str
+        """
+
+        # Check the args.
+        if not temp_calibration:
+            raise NameError("The temperature calibration method has not been 
specified.")
+        if not temp_control:
+            raise NameError("The temperature control method has not been 
specified.")
+
+        # Place the args into the namespace.
+        self.temp_calibration = translate(temp_calibration)
+        self.temp_control = translate(temp_control)
+
+        # Execute the v3.1 add method.
+        HeteronuclNOESaveframe_v3_1.add(self, frq=frq, res_nums=res_nums, 
res_names=res_names, atom_names=atom_names, isotope=isotope, data=data, 
errors=errors)
+
 
     def add_tag_categories(self):
-        """Create the v3.1 tag categories."""
+        """Create the v3.2 tag categories."""
 
         # The tag category objects.
         self.heteronuclRxlist = HeteronuclNOEList_v3_1(self)
         self.heteronuclRxexperiment = HeteronuclNOEExperiment_v3_1(self)
         self.heteronuclRxsoftware = HeteronuclNOESoftware_v3_1(self)
         self.Rx = HeteronuclNOE_v3_1(self)
-
-
-    def specific_setup(self):
-        """Method called by self.add() to set up any version specific 
data."""
-
-        # The category name.
-        self.cat_name = ['heteronucl_NOEs']
-
-
-class HeteronuclNOEList_v3_1(HeteronuclNOEList):
-    """v3.1 HeteronuclNOEList tag category."""
-
-    def tag_setup(self, tag_category_label=None, sep=None):
-        """Set 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.
-        HeteronuclNOEList.tag_setup(self, 
tag_category_label='Heteronucl_NOE_list', sep=sep)
-
-        # Tag names for the relaxation data.
-        self.tag_names['SfCategory'] = 'Sf_category'
-        self.tag_names['HeteronuclNOEListID'] = 'ID'
-        self.tag_names['SampleConditionListLabel'] = 
'Sample_condition_list_label'
-
-
-class HeteronuclNOEExperiment_v3_1(HeteronuclNOEExperiment):
-    """v3.1 HeteronuclNOEExperiment tag category."""
-
-    def tag_setup(self, tag_category_label=None, sep=None):
-        # Execute the base class tag_setup() method.
-        HeteronuclNOEExperiment.tag_setup(self, 
tag_category_label='Heteronucl_NOE_experiment', sep=sep)
-
-
-class HeteronuclNOESoftware_v3_1(HeteronuclNOESoftware):
-    """v3.1 HeteronuclNOESoftware tag category."""
-
-    def tag_setup(self, tag_category_label=None, sep=None):
-        # Execute the base class tag_setup() method.
-        HeteronuclNOESoftware.tag_setup(self, 
tag_category_label='Heteronucl_NOE_software', sep=sep)
-
-
-class HeteronuclNOE_v3_1(HeteronuclNOE):
-    """v3.1 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.
-        HeteronuclNOE.tag_setup(self, tag_category_label='Heteronucl_NOE', 
sep=sep)
-
-        # Tag names for the relaxation data.
-        self.tag_names['RxID'] = 'ID'
-        self.tag_names['CompIndexID'] = 'Comp_index_ID'
-        self.tag_names['CompID'] = 'Comp_ID'
-        self.tag_names['AtomID'] = 'Atom_ID'
-        self.tag_names['Val'] = 'Val'
-        self.tag_names['ValErr'] = 'Val_err'

Modified: branches/bmrb/bmrblib/kinetics/relaxation.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/bmrblib/kinetics/relaxation.py?rev=9783&r1=9782&r2=9783&view=diff
==============================================================================
--- branches/bmrb/bmrblib/kinetics/relaxation.py (original)
+++ branches/bmrb/bmrblib/kinetics/relaxation.py Mon Oct 26 15:26:13 2009
@@ -28,6 +28,7 @@
 from bmrblib.kinetics.general_relaxation import GeneralRelaxationSaveframe
 from bmrblib.kinetics.heteronucl_NOEs import HeteronuclNOESaveframe
 from bmrblib.kinetics.heteronucl_NOEs_v3_1 import HeteronuclNOESaveframe_v3_1
+from bmrblib.kinetics.heteronucl_NOEs_v3_2 import HeteronuclNOESaveframe_v3_2
 from bmrblib.kinetics.heteronucl_T1_relaxation import HeteronuclT1Saveframe
 from bmrblib.kinetics.heteronucl_T1_relaxation_v3_1 import 
HeteronuclT1Saveframe_v3_1
 from bmrblib.kinetics.heteronucl_T2_relaxation import HeteronuclT2Saveframe
@@ -50,7 +51,7 @@
         self.heteronucl_T2_relaxation = HeteronuclT2Saveframe(datanodes)
 
 
-    def add(self, data_type=None, frq=None, res_nums=None, res_names=None, 
atom_names=None, isotope=None, data=None, errors=None, temp_calibration=None, 
temp_control=None):
+    def add(self, data_type=None, 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 data_type:         The relaxation data type (one of 'NOE', 
'R1', or 'R2').
@@ -69,10 +70,6 @@
         @type data:                 list of float
         @keyword errors:            The errors associated with the 
relaxation data.
         @type errors:               list of float
-        @keyword temp_calibration:  The temperature calibration method.
-        @type temp_calibration:     str
-        @keyword temp_control:      The temperature control method.
-        @type temp_control:         str
         """
 
         # Pack specific the data.
@@ -147,6 +144,7 @@
         Relaxation_v3_1.__init__(self, datanodes)
 
         # Initialise the kinetic saveframe supergroups.
+        self.heteronucl_NOEs = HeteronuclNOESaveframe_v3_2(datanodes)
         self.general_relaxation = GeneralRelaxationSaveframe(datanodes)
 
 




Related Messages


Powered by MHonArc, Updated Mon Oct 26 17:20:02 2009