mailr20126 - /trunk/pipe_control/rdc.py


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

Header


Content

Posted by edward on June 14, 2013 - 18:07:
Author: bugman
Date: Fri Jun 14 18:07:44 2013
New Revision: 20126

URL: http://svn.gna.org/viewcvs/relax?rev=20126&view=rev
Log:
Fix for the pipe_control.rdc.q_factors() for T = J+D type data.

The Q factor normalisation was incorrect, as the J coupling should be 
subtracted from T first.


Modified:
    trunk/pipe_control/rdc.py

Modified: trunk/pipe_control/rdc.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/pipe_control/rdc.py?rev=20126&r1=20125&r2=20126&view=diff
==============================================================================
--- trunk/pipe_control/rdc.py (original)
+++ trunk/pipe_control/rdc.py Fri Jun 14 18:07:44 2013
@@ -39,7 +39,7 @@
 from pipe_control.mol_res_spin import exists_mol_res_spin_data, return_spin
 from lib.alignment.rdc import ave_rdc_tensor
 from lib.physical_constants import dipolar_constant, 
return_gyromagnetic_ratio
-from lib.errors import RelaxError, RelaxNoAlignError, RelaxNoRDCError, 
RelaxNoSequenceError, RelaxSpinTypeError
+from lib.errors import RelaxError, RelaxNoAlignError, RelaxNoJError, 
RelaxNoRDCError, RelaxNoSequenceError, RelaxSpinTypeError
 from lib.io import extract_data, open_write_file, strip, write_data
 from lib.warnings import RelaxWarning
 
@@ -468,6 +468,11 @@
                 rdc_data = True
             if hasattr(interatom, 'rdc_bc') and align_id in interatom.rdc_bc:
                 rdc_bc_data = True
+            j_flag = True
+            if align_id in cdp.rdc_data_types and 
cdp.rdc_data_types[align_id] == 'T':
+                j_flag = True
+                if not hasattr(interatom, 'j_coupling'):
+                    raise RelaxNoJError
 
             # Skip containers without RDC data.
             if not hasattr(interatom, 'rdc') or not hasattr(interatom, 
'rdc_bc') or not align_id in interatom.rdc or interatom.rdc[align_id] == None 
or not align_id in interatom.rdc_bc or interatom.rdc_bc[align_id] == None:
@@ -481,7 +486,10 @@
             sse = sse + (interatom.rdc[align_id] - 
interatom.rdc_bc[align_id])**2
 
             # Sum the RDCs squared (for one type of normalisation).
-            D2_sum = D2_sum + interatom.rdc[align_id]**2
+            if j_flag:
+                D2_sum = D2_sum + (interatom.rdc[align_id] - 
interatom.j_coupling)**2
+            else:
+                D2_sum = D2_sum + interatom.rdc[align_id]**2
 
             # Gyromagnetic ratios.
             g1 = return_gyromagnetic_ratio(spin1.isotope)




Related Messages


Powered by MHonArc, Updated Fri Jun 14 18:20:02 2013