Author: bugman Date: Wed Mar 10 18:27:06 2010 New Revision: 10967 URL: http://svn.gna.org/viewcvs/relax?rev=10967&view=rev Log: Fix for the back_calc_ri() API method. Spins are now skipped if no bond vector information is present (for the spheroids and ellipsoids). Modified: 1.3/specific_fns/model_free/main.py Modified: 1.3/specific_fns/model_free/main.py URL: http://svn.gna.org/viewcvs/relax/1.3/specific_fns/model_free/main.py?rev=10967&r1=10966&r2=10967&view=diff ============================================================================== --- 1.3/specific_fns/model_free/main.py (original) +++ 1.3/specific_fns/model_free/main.py Wed Mar 10 18:27:06 2010 @@ -444,6 +444,14 @@ @return: The back calculated relaxation data value corresponding to the index. @rtype: float """ + + # Get the spin container. + spin, spin_id = return_spin_from_index(global_index=spin_index, return_spin_id=True) + + # Missing structural data. + if hasattr(cdp, 'diff_tensor') and (cdp.diff_tensor.type == 'spheroid' or cdp.diff_tensor.type == 'ellipsoid') and not hasattr(spin, 'xh_vect') or not spin.xh_vect: + warn(RelaxDeselectWarning(spin_id, 'missing structural data')) + return # Get the relaxation value from the minimise function. value = self.minimise(min_algor='back_calc', min_options=(spin_index, ri_label, frq_label, frq))