Author: bugman Date: Wed Nov 13 14:18:01 2013 New Revision: 21418 URL: http://svn.gna.org/viewcvs/relax?rev=21418&view=rev Log: J couplings for the N-state analysis are now properly handled for pseudo-atoms. The measured J couplings for the members of the pseudo-atom should not be used, but rather that of the pseudo-atom spin itself (as the former does not exist). Modified: trunk/specific_analyses/n_state_model/data.py Modified: trunk/specific_analyses/n_state_model/data.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/n_state_model/data.py?rev=21418&r1=21417&r2=21418&view=diff ============================================================================== --- trunk/specific_analyses/n_state_model/data.py (original) +++ trunk/specific_analyses/n_state_model/data.py Wed Nov 13 14:18:01 2013 @@ -553,7 +553,6 @@ # Loop over the atoms of the pseudo-atom, storing the data. pseudo_unit_vect = [] pseudo_rdc_const = [] - pseudo_j_couplings = [] for spin, spin_id in pseudoatom_loop(pseudospin, return_id=True): # Get the corresponding interatomic data container. @@ -572,17 +571,12 @@ # Calculate the RDC dipolar constant (in Hertz, and the 3 comes from the alignment tensor), and append it to the list. pseudo_rdc_const.append(3.0/(2.0*pi) * dipolar_constant(g1, g2, pseudo_interatom.r)) - # Store the J coupling. - if opt_uses_j_couplings(): - pseudo_j_couplings.append(pseudo_interatom.j_coupling) - # Reorder the unit vectors so that the structure and pseudo-atom dimensions are swapped. pseudo_unit_vect = transpose(array(pseudo_unit_vect, float64), (1, 0, 2)) # Block append the pseudo-data. unit_vect.append(pseudo_unit_vect) rdc_const.append(pseudo_rdc_const) - j_couplings.append(pseudo_j_couplings) # Normal atom. else: @@ -598,9 +592,9 @@ # Calculate the RDC dipolar constant (in Hertz, and the 3 comes from the alignment tensor), and append it to the list. rdc_const.append(3.0/(2.0*pi) * dipolar_constant(g1, g2, interatom.r)) - # Store the J coupling. - if opt_uses_j_couplings(): - j_couplings.append(interatom.j_coupling) + # Store the measured J coupling. + if opt_uses_j_couplings(): + j_couplings.append(interatom.j_coupling) # Fix the unit vector data structure. num = None @@ -737,9 +731,7 @@ rdc_weight = array(rdc_weight, float64) absolute = array(absolute, int32) T_flags = array(T_flags, int32) - if opt_uses_j_couplings(): - j_couplings = array(j_couplings, float64) - else: + if not opt_uses_j_couplings(): j_couplings = None pseudo_flags = array(pseudo_flags, int32)