Author: bugman Date: Tue Aug 12 10:38:00 2008 New Revision: 7163 URL: http://svn.gna.org/viewcvs/relax?rev=7163&view=rev Log: Modified the setup of the RDC data. Spins missing RDC data but other data now have rows of None appended to the data structures. Modified: branches/rdc_analysis/specific_fns/n_state_model.py Modified: branches/rdc_analysis/specific_fns/n_state_model.py URL: http://svn.gna.org/viewcvs/relax/branches/rdc_analysis/specific_fns/n_state_model.py?rev=7163&r1=7162&r2=7163&view=diff ============================================================================== --- branches/rdc_analysis/specific_fns/n_state_model.py (original) +++ branches/rdc_analysis/specific_fns/n_state_model.py Tue Aug 12 10:38:00 2008 @@ -487,11 +487,25 @@ # Skip spins without RDC data or unit XH bond vectors. if not hasattr(spin, 'rdc'): + # Add rows of None if other data exists. + if hasattr(spin, 'pcs'): + rdcs.append([None]*len(cdp.align_tensors)) + xh_vectors.append([None]*3) + + # Jump to the next spin. continue # RDC data exists but the XH bond vectors are missing? if not hasattr(spin, 'xh_vect'): + # Throw a warning. warn(RelaxWarning("RDC data exists but the XH bond vectors are missing, skipping spin " + spin_id)) + + # Add rows of None if other data exists. + if hasattr(spin, 'pcs'): + rdcs.append([None]*len(cdp.align_tensors)) + xh_vectors.append([None]*3) + + # Jump to the next spin. continue # Append the RDC and XH vectors to the lists.