Author: bugman Date: Tue Apr 15 23:13:34 2008 New Revision: 5743 URL: http://svn.gna.org/viewcvs/relax?rev=5743&view=rev Log: Improved testing in the spectral density mapping calculate() method. Modified: 1.3/specific_fns/jw_mapping.py Modified: 1.3/specific_fns/jw_mapping.py URL: http://svn.gna.org/viewcvs/relax/1.3/specific_fns/jw_mapping.py?rev=5743&r1=5742&r2=5743&view=diff ============================================================================== --- 1.3/specific_fns/jw_mapping.py (original) +++ 1.3/specific_fns/jw_mapping.py Tue Apr 15 23:13:34 2008 @@ -54,18 +54,25 @@ # Test if the CSA and bond length values have been set. for spin in spin_loop(spin_id): - # Skip unselected residues. if not spin.select: continue - # CSA value. + # Test if the CSA value has been set. if not hasattr(spin, 'csa') or spin.csa == None: raise RelaxNoValueError, "CSA" - # Bond length value. + # Test if the bond length has been set. if not hasattr(spin, 'r') or spin.r == None: raise RelaxNoValueError, "bond length" + + # Test if the spin type has been set. + if not hasattr(spin, 'heteronuc_type'): + raise RelaxSpinTypeError + + # Test if the type attached proton has been set. + if not hasattr(spin, 'proton_type'): + raise RelaxProtonTypeError # Frequency index. if cdp.jw_frq not in cdp.frq: