mailr9807 - in /branches/bmrb/bmrblib/kinetics: general_relaxation.py heteronucl_NOEs.py heteronucl_NOEs_v3_2.py relax_base.py


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

Header


Content

Posted by edward on October 27, 2009 - 16:14:
Author: bugman
Date: Tue Oct 27 16:14:33 2009
New Revision: 9807

URL: http://svn.gna.org/viewcvs/relax?rev=9807&view=rev
Log:
All the relaxation data saveframes now contain all the equivalent data as in 
general relaxation.


Modified:
    branches/bmrb/bmrblib/kinetics/general_relaxation.py
    branches/bmrb/bmrblib/kinetics/heteronucl_NOEs.py
    branches/bmrb/bmrblib/kinetics/heteronucl_NOEs_v3_2.py
    branches/bmrb/bmrblib/kinetics/relax_base.py

Modified: branches/bmrb/bmrblib/kinetics/general_relaxation.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/bmrblib/kinetics/general_relaxation.py?rev=9807&r1=9806&r2=9807&view=diff
==============================================================================
--- branches/bmrb/bmrblib/kinetics/general_relaxation.py (original)
+++ branches/bmrb/bmrblib/kinetics/general_relaxation.py Tue Oct 27 16:14:33 
2009
@@ -71,6 +71,8 @@
         @type data_type:                    str
         @keyword frq:                       The spectrometer proton 
frequency, in Hz.
         @type frq:                          float
+        @keyword details:                   The details tag.
+        @type details:                      None or str
         @keyword assembly_atom_ids:         The assembly atom ID numbers.
         @type assembly_atom_ids:            list of int
         @keyword entity_assembly_ids:       The entity assembly ID numbers.
@@ -95,11 +97,10 @@
         @type temp_calibration:             str
         @keyword temp_control:              The temperature control method.
         @type temp_control:                 str
-        @keyword details:                   The details tag.
-        @type details:                      None or str
         """
 
         # Check the ID info.
+        no_missing(entity_ids, 'entity ID numbers of the ' + 
repr(int(frq*1e-6)) + ' MHz NOE data')
         no_missing(res_nums, 'residue numbers of the %s MHz %s relaxation 
data' % (int(frq*1e-6), data_type))
         no_missing(res_names, 'residue names of the %s MHz %s relaxation 
data' % (int(frq*1e-6), data_type))
         no_missing(atom_names, 'atom names of the %s MHz %s relaxation data' 
% (int(frq*1e-6), data_type))
@@ -362,8 +363,8 @@
             ['AtomID',                  'atom_names'],
             ['AtomType',                'atom_types'],
             ['AtomIsotopeNumber',       'isotope'],
-            ['Val',    'data'],
-            ['ValErr', 'errors'],
+            ['Val',                     'data'],
+            ['ValErr',                  'errors'],
             ['RexVal',                  'rex_val'],
             ['RexErr',                  'rex_err'],
             ['GeneralRelaxationListID', 'rx_inc_list']

Modified: branches/bmrb/bmrblib/kinetics/heteronucl_NOEs.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/bmrblib/kinetics/heteronucl_NOEs.py?rev=9807&r1=9806&r2=9807&view=diff
==============================================================================
--- branches/bmrb/bmrblib/kinetics/heteronucl_NOEs.py (original)
+++ branches/bmrb/bmrblib/kinetics/heteronucl_NOEs.py Tue Oct 27 16:14:33 2009
@@ -58,25 +58,37 @@
         self.add_tag_categories()
 
 
-    def add(self, frq=None, entity_ids=None, res_nums=None, res_names=None, 
atom_names=None, isotope=None, data=None, errors=None):
+    def add(self, sample_cond_list_id=None, 
sample_cond_list_label='$conditions_1', frq=None, details=None, 
assembly_atom_ids=None, entity_assembly_ids=None, entity_ids=None, 
res_nums=None, seq_id=None, res_names=None, atom_names=None, atom_types=None, 
isotope=None, data=None, errors=None):
         """Add relaxation data to the data nodes.
 
-        @keyword frq:               The spectrometer proton frequency, in Hz.
-        @type frq:                  float
-        @keyword entity_ids:        The entity ID numbers.
-        @type entity_ids:           int
-        @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 sample_cond_list_id:       The sample conditions list ID 
number.
+        @type sample_cond_list_id:          str
+        @keyword sample_cond_list_label:    The sample conditions list label.
+        @type sample_cond_list_label:       str
+        @keyword frq:                       The spectrometer proton 
frequency, in Hz.
+        @type frq:                          float
+        @keyword details:                   The details tag.
+        @type details:                      None or str
+        @keyword assembly_atom_ids:         The assembly atom ID numbers.
+        @type assembly_atom_ids:            list of int
+        @keyword entity_assembly_ids:       The entity assembly ID numbers.
+        @type entity_assembly_ids:          list of int
+        @keyword entity_ids:                The entity ID numbers.
+        @type entity_ids:                   int
+        @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 atom_types:                The atom types as IUPAC element 
abbreviations.
+        @type atom_types:                   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
         """
 
         # Check the ID info.
@@ -89,14 +101,26 @@
         self.N = len(res_nums)
 
         # Place the args into the namespace.
+        self.sample_cond_list_id = translate(sample_cond_list_id)
+        self.sample_cond_list_label = translate(sample_cond_list_label)
         self.frq = frq
-        self.entity_ids = translate(entity_ids)
-        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)
+        self.details = translate(details)
+
+        # Convert to lists and check the lengths.
+        for name in ['assembly_atom_ids', 'entity_assembly_ids', 
'entity_ids', 'res_nums', 'seq_id', 'res_names', 'atom_names', 'atom_types', 
'isotope', 'data', 'errors']:
+            # Get the object.
+            obj = locals()[name]
+
+            # None objects.
+            if obj == None:
+                obj = [None] * self.N
+
+            # Check the length.
+            if len(obj) != self.N:
+                raise NameError("The number of elements in the '%s' arg does 
not match that of 'res_nums'." % name)
+
+            # Place the args into the namespace, translating for BMRB.
+            setattr(self, name, translate(obj))
 
         # Set up the NOE specific variables.
         self.noe_inc = self.noe_inc + 1
@@ -143,10 +167,12 @@
             self.sf.frame.tagtables.append(TagTable(free=True, 
tagnames=[self.tag_names_full['HeteronuclNOEListID']], 
tagvalues=[[str(self.sf.noe_inc)]]))
 
         # Sample info.
+        self.sf.frame.tagtables.append(TagTable(free=True, 
tagnames=[self.tag_names_full['SampleConditionListID']], 
tagvalues=[[self.sf.sample_cond_list_id]]))
         self.sf.frame.tagtables.append(TagTable(free=True, 
tagnames=[self.tag_names_full['SampleConditionListLabel']], 
tagvalues=[['$conditions_1']]))
 
         # NMR info.
         self.sf.frame.tagtables.append(TagTable(free=True, 
tagnames=[self.tag_names_full['SpectrometerFrequency1H']], 
tagvalues=[[str(self.sf.frq/1e6)]]))
+        self.sf.frame.tagtables.append(TagTable(free=True, 
tagnames=[self.tag_names_full['Details']], tagvalues=[[self.sf.details]]))
 
 
     def tag_setup(self, tag_category_label=None, sep=None):
@@ -163,8 +189,10 @@
 
         # Tag names for the relaxation data.
         self.tag_names['SfCategory'] = 'Saveframe_category'
+        self.tag_names['SampleConditionListID'] = 'Sample_condition_list_ID'
         self.tag_names['SampleConditionListLabel'] = 
'Sample_conditions_label'
         self.tag_names['SpectrometerFrequency1H'] = 
'Spectrometer_frequency_1H'
+        self.tag_names['Details'] = 'Details'
 
 
 class HeteronuclNOEExperiment(TagCategory):

Modified: branches/bmrb/bmrblib/kinetics/heteronucl_NOEs_v3_2.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/bmrblib/kinetics/heteronucl_NOEs_v3_2.py?rev=9807&r1=9806&r2=9807&view=diff
==============================================================================
--- branches/bmrb/bmrblib/kinetics/heteronucl_NOEs_v3_2.py (original)
+++ branches/bmrb/bmrblib/kinetics/heteronucl_NOEs_v3_2.py Tue Oct 27 
16:14:33 2009
@@ -35,29 +35,41 @@
 class HeteronuclNOESaveframe_v3_2(HeteronuclNOESaveframe_v3_1):
     """The v3.2 Heteronuclear NOE data saveframe class."""
 
-    def add(self, frq=None, entity_ids=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, sample_cond_list_id=None, 
sample_cond_list_label='$conditions_1', frq=None, details=None, 
assembly_atom_ids=None, entity_assembly_ids=None, entity_ids=None, 
res_nums=None, seq_id=None, res_names=None, atom_names=None, atom_types=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 entity_ids:        The entity ID numbers.
-        @type entity_ids:           int
-        @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
+        @keyword sample_cond_list_id:       The sample conditions list ID 
number.
+        @type sample_cond_list_id:          str
+        @keyword sample_cond_list_label:    The sample conditions list label.
+        @type sample_cond_list_label:       str
+        @keyword frq:                       The spectrometer proton 
frequency, in Hz.
+        @type frq:                          float
+        @keyword details:                   The details tag.
+        @type details:                      None or str
+        @keyword assembly_atom_ids:         The assembly atom ID numbers.
+        @type assembly_atom_ids:            list of int
+        @keyword entity_assembly_ids:       The entity assembly ID numbers.
+        @type entity_assembly_ids:          list of int
+        @keyword entity_ids:                The entity ID numbers.
+        @type entity_ids:                   int
+        @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 atom_types:                The atom types as IUPAC element 
abbreviations.
+        @type atom_types:                   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.
@@ -99,12 +111,14 @@
             self.sf.frame.tagtables.append(TagTable(free=True, 
tagnames=[self.tag_names_full['HeteronuclNOEListID']], 
tagvalues=[[str(self.sf.noe_inc)]]))
 
         # Sample info.
+        self.sf.frame.tagtables.append(TagTable(free=True, 
tagnames=[self.tag_names_full['SampleConditionListID']], 
tagvalues=[[self.sf.sample_cond_list_id]]))
         self.sf.frame.tagtables.append(TagTable(free=True, 
tagnames=[self.tag_names_full['SampleConditionListLabel']], 
tagvalues=[['$conditions_1']]))
 
         # NMR info.
         self.sf.frame.tagtables.append(TagTable(free=True, 
tagnames=[self.tag_names_full['TempCalibrationMethod']], 
tagvalues=[[self.sf.temp_calibration]]))
         self.sf.frame.tagtables.append(TagTable(free=True, 
tagnames=[self.tag_names_full['TempControlMethod']], 
tagvalues=[[self.sf.temp_control]]))
         self.sf.frame.tagtables.append(TagTable(free=True, 
tagnames=[self.tag_names_full['SpectrometerFrequency1H']], 
tagvalues=[[str(self.sf.frq/1e6)]]))
+        self.sf.frame.tagtables.append(TagTable(free=True, 
tagnames=[self.tag_names_full['Details']], tagvalues=[[self.sf.details]]))
 
 
     def tag_setup(self, tag_category_label=None, sep=None):

Modified: branches/bmrb/bmrblib/kinetics/relax_base.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/bmrblib/kinetics/relax_base.py?rev=9807&r1=9806&r2=9807&view=diff
==============================================================================
--- branches/bmrb/bmrblib/kinetics/relax_base.py (original)
+++ branches/bmrb/bmrblib/kinetics/relax_base.py Tue Oct 27 16:14:33 2009
@@ -106,10 +106,14 @@
         # Keys and objects.
         info = [
             ['RxID',                'data_ids'],
+            ['AssemblyAtomID',      'assembly_atom_ids'],
+            ['EntityAssemblyID',    'entity_assembly_ids'],
             ['EntityID',            'entity_ids'],
             ['CompIndexID',         'res_nums'],
+            ['SeqID',               'seq_id'],
             ['CompID',              'res_names'],
             ['AtomID',              'atom_names'],
+            ['AtomType',            'atom_types'],
             ['AtomIsotopeNumber',   'isotope'],
             ['Val',                 'data'],
             ['ValErr',              'errors'],
@@ -171,10 +175,14 @@
 
         # Tag names for the relaxation data.
         self.tag_names['RxID'] = None
+        self.tag_names['AssemblyAtomID'] = 'Assembly_atom_ID'
+        self.tag_names['EntityAssemblyID'] = 'Entity_assembly_ID'
         self.tag_names['EntityID'] = 'Entity_ID'
         self.tag_names['CompIndexID'] = 'Residue_seq_code'
+        self.tag_names['SeqID'] = 'Seq_ID'
         self.tag_names['CompID'] = 'Residue_label'
         self.tag_names['AtomID'] = 'Atom_name'
+        self.tag_names['AtomType'] = 'Atom_type'
         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 Oct 27 16:40:03 2009