Author: tlinnet Date: Mon Oct 6 17:07:57 2014 New Revision: 26170 URL: http://svn.gna.org/viewcvs/relax?rev=26170&view=rev Log: Initial try to fix unit test test_value_set_r1_rit(). The problem is, that no spin-id can be generated, since the spins are created manually, " File "/sbinlab2/tlinnet/software/NMR-relax/relax_trunk/pipe_control/mol_res_spin.py", line 1498, in generate_spin_id_unique if res and res.name != None and mol._res_name_count[res.name] > 1: AttributeError: 'MoleculeContainer' object has no attribute '_res_name_count' " Bug #22754 (https://gna.org/bugs/index.php?22754): The minimise.calculate() does not calculate chi2 value for clustered residues. Modified: trunk/specific_analyses/relax_disp/api.py Modified: trunk/specific_analyses/relax_disp/api.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/api.py?rev=26170&r1=26169&r2=26170&view=diff ============================================================================== --- trunk/specific_analyses/relax_disp/api.py (original) +++ trunk/specific_analyses/relax_disp/api.py Mon Oct 6 17:07:57 2014 @@ -851,20 +851,31 @@ """ # Loop over individual spins for the R2eff model. - if cdp.model_type == MODEL_R2EFF: - # The spin loop. - for spin, spin_id in spin_loop(return_id=True): - # Skip deselected spins - if not spin.select: - continue - - # Yield the spin ID as a list. - yield [spin_id] - - # The cluster loop. - else: - for spin_ids in loop_cluster(skip_desel=False): - yield spin_ids + if hasattr(cdp, 'model_type'): + if cdp.model_type == MODEL_R2EFF: + # The spin loop. + for spin, spin_id in spin_loop(return_id=True): + # Skip deselected spins + if not spin.select: + continue + + # Yield the spin ID as a list. + yield [spin_id] + + # The cluster loop. + else: + for spin_ids in loop_cluster(skip_desel=False): + yield spin_ids + + # If no model is present, then set the values. + # The spin loop. + for spin, spin_id in spin_loop(return_id=True): + # Skip deselected spins + if not spin.select: + continue + + # Yield the spin ID as a list. + yield [spin_id] def model_statistics(self, model_info=None, spin_id=None, global_stats=None):