mailr20134 - in /branches/relax_disp: ./ specific_analyses/n_state_model/__init__.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:50:
Author: bugman
Date: Fri Jun 14 18:50:54 2013
New Revision: 20134

URL: http://svn.gna.org/viewcvs/relax?rev=20134&view=rev
Log:
Merged revisions 20133 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk

........
  r20133 | bugman | 2013-06-14 18:50:00 +0200 (Fri, 14 Jun 2013) | 5 lines
  
  Errors are now handled correctly for the N-state model when T = J+D values 
are used for the RDCs.
  
  The error is the square root of the average variance of the RDC error and J 
coupling error.
........

Modified:
    branches/relax_disp/   (props changed)
    branches/relax_disp/specific_analyses/n_state_model/__init__.py

Propchange: branches/relax_disp/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Jun 14 18:50:54 2013
@@ -1,1 +1,1 @@
-/trunk:1-20131
+/trunk:1-20133

Modified: branches/relax_disp/specific_analyses/n_state_model/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/n_state_model/__init__.py?rev=20134&r1=20133&r2=20134&view=diff
==============================================================================
--- branches/relax_disp/specific_analyses/n_state_model/__init__.py (original)
+++ branches/relax_disp/specific_analyses/n_state_model/__init__.py Fri Jun 
14 18:50:54 2013
@@ -30,7 +30,7 @@
 
 # Python module imports.
 from copy import deepcopy
-from math import acos, cos, pi
+from math import acos, cos, pi, sqrt
 from minfx.generic import generic_minimise
 from minfx.grid import grid
 from numpy import array, dot, float64, ones, zeros
@@ -588,8 +588,11 @@
                     continue
 
                 # Check for J couplings if the RDC data type is T = J+D.
-                if align_id in cdp.rdc_data_types and 
cdp.rdc_data_types[align_id] == 'T' and not hasattr(interatom, 'j_coupling'):
-                    continue
+                j_flag = False
+                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'):
+                        continue
 
                 # Defaults of None.
                 value = None
@@ -611,7 +614,13 @@
 
                     # The error.
                     if hasattr(interatom, 'rdc_err') and align_id in 
interatom.rdc_err.keys():
-                        error = -3.0 * interatom.rdc_err[align_id]
+                        # T values.
+                        if j_flag:
+                            error = -3.0 * 
sqrt(interatom.rdc_err[align_id]**2 + interatom.j_coupling_err**2)
+
+                        # D values.
+                        else:
+                            error = -3.0 * interatom.rdc_err[align_id]
 
                 # Normal set up.
                 elif align_id in interatom.rdc.keys():
@@ -623,7 +632,13 @@
 
                     # The error.
                     if hasattr(interatom, 'rdc_err') and align_id in 
interatom.rdc_err.keys():
-                        error = interatom.rdc_err[align_id]
+                        # T values.
+                        if j_flag:
+                            error = sqrt(interatom.rdc_err[align_id]**2 + 
interatom.j_coupling_err**2)
+
+                        # D values.
+                        else:
+                            error = interatom.rdc_err[align_id]
 
                 # Append the RDCs to the list.
                 rdc[-1].append(value)




Related Messages


Powered by MHonArc, Updated Fri Jun 14 19:20:01 2013