Author: bugman Date: Sun Apr 13 12:01:27 2008 New Revision: 5616 URL: http://svn.gna.org/viewcvs/relax?rev=5616&view=rev Log: Added checks for the heteronucleus and attached proton type to the model-free minimise() method. Modified: 1.3/specific_fns/model_free/mf_minimise.py Modified: 1.3/specific_fns/model_free/mf_minimise.py URL: http://svn.gna.org/viewcvs/relax/1.3/specific_fns/model_free/mf_minimise.py?rev=5616&r1=5615&r2=5616&view=diff ============================================================================== --- 1.3/specific_fns/model_free/mf_minimise.py (original) +++ 1.3/specific_fns/model_free/mf_minimise.py Sun Apr 13 12:01:27 2008 @@ -34,7 +34,7 @@ from maths_fns.mf import Mf from minfx.generic import generic_minimise from physical_constants import h_bar, mu0, return_gyromagnetic_ratio -from relax_errors import RelaxError, RelaxInfError, RelaxLenError, RelaxNaNError, RelaxNoModelError, RelaxNoPdbError, RelaxNoResError, RelaxNoSequenceError, RelaxNoTensorError, RelaxNoValueError, RelaxNoVectorsError, RelaxNucleusError +from relax_errors import RelaxError, RelaxInfError, RelaxLenError, RelaxNaNError, RelaxNoModelError, RelaxNoPdbError, RelaxNoResError, RelaxNoSequenceError, RelaxNoTensorError, RelaxNoValueError, RelaxNoVectorsError, RelaxNucleusError, RelaxProtonTypeError, RelaxSpinTypeError @@ -803,9 +803,13 @@ if not hasattr(spin, 'xh_vect'): raise RelaxNoVectorsError - # Test if the nucleus type has been set. - if not hasattr(spin, 'nucleus'): - raise RelaxNucleusError + # 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 # Test if the model-free parameter values are set for minimising diffusion tensor parameters by themselves. if param_set == 'diff':