mailr8924 - in /branches/bmrb: generic_fns/relax_data.py specific_fns/model_free/bmrb.py


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

Header


Content

Posted by edward on March 06, 2009 - 19:17:
Author: bugman
Date: Fri Mar  6 19:17:03 2009
New Revision: 8924

URL: http://svn.gna.org/viewcvs/relax?rev=8924&view=rev
Log:
Start of the reading of relaxation data from the BMRB NMR-STAR files.


Modified:
    branches/bmrb/generic_fns/relax_data.py
    branches/bmrb/specific_fns/model_free/bmrb.py

Modified: branches/bmrb/generic_fns/relax_data.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/generic_fns/relax_data.py?rev=8924&r1=8923&r2=8924&view=diff
==============================================================================
--- branches/bmrb/generic_fns/relax_data.py (original)
+++ branches/bmrb/generic_fns/relax_data.py Fri Mar  6 19:17:03 2009
@@ -203,6 +203,25 @@
 
         # Update all data structures.
         update_data_structures_spin(spin, ri_label, frq_label, frq, value)
+
+
+def bmrb_read(star):
+    """Read the relaxation data from the NMR-STAR dictionary object.
+
+    @param star:    The NMR-STAR dictionary object.
+    @type star:     NMR_STAR instance
+    """
+
+    # Get the R1 relaxation data.
+    for frq, res_nums, res_names, spin_names, val, err in 
star.heteronucl_T1_relaxation.loop():
+        # Create the labels.
+        ri_label = 'R1'
+        frq_label = str(int(frq*1e-6))
+
+        # Test if relaxation data corresponding to 'ri_label' and 
'frq_label' already exists.
+        if test_labels(ri_label, frq_label):
+            raise RelaxRiError, (ri_label, frq_label)
+
 
 
 def bmrb_write(star):

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=8924&r1=8923&r2=8924&view=diff
==============================================================================
--- branches/bmrb/specific_fns/model_free/bmrb.py (original)
+++ branches/bmrb/specific_fns/model_free/bmrb.py Fri Mar  6 19:17:03 2009
@@ -42,8 +42,11 @@
         # Read the contents of the STAR formatted file.
         star.read()
 
-        # Generate the molecule and residue containers.
+        # Generate the molecule and residue containers from the entity 
records.
         mol_res_spin.bmrb_read(star)
+
+        # Read the relaxation data saveframes.
+        relax_data.bmrb_read(star)
 
 
     def bmrb_write(self, file_path):




Related Messages


Powered by MHonArc, Updated Fri Mar 06 19:40:04 2009