mailr9689 - in /branches/bmrb: bmrblib/ bmrblib/kinetics/ specific_fns/model_free/ test_suite/system_tests/scripts/


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

Header


Content

Posted by edward on October 09, 2009 - 13:10:
Author: bugman
Date: Fri Oct  9 13:10:03 2009
New Revision: 9689

URL: http://svn.gna.org/viewcvs/relax?rev=9689&view=rev
Log:
A number of changes to create the infrastructure for v3.0 and lower of the 
NMR-STAR dictionary format.


Modified:
    branches/bmrb/bmrblib/kinetics/relaxation.py
    branches/bmrb/bmrblib/nmr_star_dict.py
    branches/bmrb/specific_fns/model_free/bmrb.py
    branches/bmrb/test_suite/system_tests/scripts/bmrb_rw.py

Modified: branches/bmrb/bmrblib/kinetics/relaxation.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/bmrblib/kinetics/relaxation.py?rev=9689&r1=9688&r2=9689&view=diff
==============================================================================
--- branches/bmrb/bmrblib/kinetics/relaxation.py (original)
+++ branches/bmrb/bmrblib/kinetics/relaxation.py Fri Oct  9 13:10:03 2009
@@ -50,6 +50,36 @@
         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):
+        """Add relaxation data to the data nodes.
+
+        @keyword data_type:     The relaxation data type (one of 'NOE', 
'R1', or 'R2').
+        @type data_type:        str
+        @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
+        """
+
+        # Pack specific the data.
+        if data_type == 'R1':
+            self.heteronucl_T1_relaxation.add(frq=frq, res_nums=res_nums, 
res_names=res_names, atom_names=atom_names, isotope=isotope, data=data, 
errors=errors)
+        elif data_type == 'R2':
+            self.heteronucl_T2_relaxation.add(frq=frq, res_nums=res_nums, 
res_names=res_names, atom_names=atom_names, isotope=isotope, data=data, 
errors=errors)
+        elif data_type == 'NOE':
+            self.heteronucl_NOEs.add(frq=frq, res_nums=res_nums, 
res_names=res_names, atom_names=atom_names, isotope=isotope, data=data, 
errors=errors)
+
+
     def loop(self):
         """Generator method for looping over and returning all relaxation 
data."""
 
@@ -97,36 +127,6 @@
         self.heteronucl_NOEs = HeteronuclNOESaveframe_v3_1(datanodes)
         self.heteronucl_T1_relaxation = HeteronuclT1Saveframe_v3_1(datanodes)
         self.heteronucl_T2_relaxation = HeteronuclT2Saveframe_v3_1(datanodes)
-
-
-    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').
-        @type data_type:        str
-        @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
-        """
-
-        # Pack specific the data.
-        if data_type == 'R1':
-            self.heteronucl_T1_relaxation.add(frq=frq, res_nums=res_nums, 
res_names=res_names, atom_names=atom_names, isotope=isotope, data=data, 
errors=errors)
-        elif data_type == 'R2':
-            self.heteronucl_T2_relaxation.add(frq=frq, res_nums=res_nums, 
res_names=res_names, atom_names=atom_names, isotope=isotope, data=data, 
errors=errors)
-        elif data_type == 'NOE':
-            self.heteronucl_NOEs.add(frq=frq, res_nums=res_nums, 
res_names=res_names, atom_names=atom_names, isotope=isotope, data=data, 
errors=errors)
 
 
 class Relaxation_v3_2(Relaxation_v3_1):

Modified: branches/bmrb/bmrblib/nmr_star_dict.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/bmrblib/nmr_star_dict.py?rev=9689&r1=9688&r2=9689&view=diff
==============================================================================
--- branches/bmrb/bmrblib/nmr_star_dict.py (original)
+++ branches/bmrb/bmrblib/nmr_star_dict.py Fri Oct  9 13:10:03 2009
@@ -29,6 +29,7 @@
 
 # relax module imports.
 from bmrblib.assembly_supercategory.entity import EntitySaveframe
+from bmrblib.kinetics.relaxation import Relaxation
 from bmrblib.NMR_parameters.chem_shift_anisotropy import ChemShiftAnisotropy
 from bmrblib.thermodynamics.order_parameters import OrderParameterSaveframe
 from pystarlib.File import File

Modified: branches/bmrb/specific_fns/model_free/bmrb.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/specific_fns/model_free/bmrb.py?rev=9689&r1=9688&r2=9689&view=diff
==============================================================================
--- branches/bmrb/specific_fns/model_free/bmrb.py (original)
+++ branches/bmrb/specific_fns/model_free/bmrb.py Fri Oct  9 13:10:03 2009
@@ -25,6 +25,7 @@
 import string
 
 # relax module imports.
+from bmrblib.nmr_star_dict import NMR_STAR
 from bmrblib.nmr_star_dict_v3_1 import NMR_STAR_v3_1
 from bmrblib.nmr_star_dict_v3_2 import NMR_STAR_v3_2
 from generic_fns import mol_res_spin, pipes, relax_data
@@ -46,6 +47,8 @@
             star = NMR_STAR_v3_2('relax_model_free_results', file_path)
         elif version == '3.1':
             star = NMR_STAR_v3_1('relax_model_free_results', file_path)
+        else:
+            star = NMR_STAR('relax_model_free_results', file_path)
 
         # Read the contents of the STAR formatted file.
         star.read()
@@ -74,6 +77,8 @@
             star = NMR_STAR_v3_2('relax_model_free_results', file_path)
         elif version == '3.1':
             star = NMR_STAR_v3_1('relax_model_free_results', file_path)
+        else:
+            star = NMR_STAR('relax_model_free_results', file_path)
 
         # Generate the entity saveframe.
         mol_res_spin.bmrb_write_entity(star)

Modified: branches/bmrb/test_suite/system_tests/scripts/bmrb_rw.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/test_suite/system_tests/scripts/bmrb_rw.py?rev=9689&r1=9688&r2=9689&view=diff
==============================================================================
--- branches/bmrb/test_suite/system_tests/scripts/bmrb_rw.py (original)
+++ branches/bmrb/test_suite/system_tests/scripts/bmrb_rw.py Fri Oct  9 
13:10:03 2009
@@ -10,7 +10,7 @@
 # Missing temp file (allow this script to run outside of the system test 
framework).
 if not hasattr(ds, 'tmpfile'):
     ds.tmpfile = 'temp_bmrb'
-    ds.version = '3.2'
+    ds.version = '3.0'
 
 # Create the data pipe.
 pipe.create(pipe_name='results', pipe_type='mf')




Related Messages


Powered by MHonArc, Updated Fri Oct 09 13:20:02 2009