Author: bugman Date: Tue Jul 17 15:50:35 2012 New Revision: 17271 URL: http://svn.gna.org/viewcvs/relax?rev=17271&view=rev Log: Fixes for the branch specific _store_bc_data() frame order method for the interatomic data design. Modified: branches/frame_order_testing/specific_fns/frame_order.py Modified: branches/frame_order_testing/specific_fns/frame_order.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/specific_fns/frame_order.py?rev=17271&r1=17270&r2=17271&view=diff ============================================================================== --- branches/frame_order_testing/specific_fns/frame_order.py (original) +++ branches/frame_order_testing/specific_fns/frame_order.py Tue Jul 17 15:50:35 2012 @@ -1121,7 +1121,6 @@ # Spin loop over the domain. id = cdp.domain[self._domain_moving()] pcs_index = 0 - rdc_index = 0 for spin in spin_loop(id): # Skip deselected spins. if not spin.select: @@ -1139,17 +1138,26 @@ # Increment the index. pcs_index += 1 - # Spins with RDC data. - if rdc_flag and hasattr(spin, 'rdc'): - # Initialise the data structure. - if not hasattr(spin, 'rdc_bc'): - spin.rdc_bc = {} - - # Store the back-calculated value. - spin.rdc_bc[align_id] = target_fn.rdc_theta[i, rdc_index] - - # Increment the index. - rdc_index += 1 + # Interatomic data container loop. + rdc_index = 0 + for interatom in interatomic_loop(id): + # Get the spins. + spin1 = return_spin(interatom.spin_id1) + spin2 = return_spin(interatom.spin_id2) + + # RDC checks. + if not self._check_rdcs(interatom, spin1, spin2): + continue + + # Initialise the data structure. + if not hasattr(interatom, 'rdc_bc'): + interatom.rdc_bc = {} + + # Store the back-calculated value. + interatom.rdc_bc[align_id] = target_fn.rdc_theta[i, rdc_index] + + # Increment the index. + rdc_index += 1 def _target_fn_setup(self, sim_index=None, scaling=True):