Author: bugman Date: Mon Sep 2 10:46:44 2013 New Revision: 20736 URL: http://svn.gna.org/viewcvs/relax?rev=20736&view=rev Log: Fix for bug #21081 (https://gna.org/bugs/?21081) - the failure of a dispersion cluster analysis. The problem was that the specific_analyses.relax_disp.disp_data.loop_cluster() generator method was not taking the spin.select flag into account. Now all deselected spins are excluded from the spin clusters and the free spins. Modified: branches/relax_disp/specific_analyses/relax_disp/disp_data.py Modified: branches/relax_disp/specific_analyses/relax_disp/disp_data.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp/disp_data.py?rev=20736&r1=20735&r2=20736&view=diff ============================================================================== --- branches/relax_disp/specific_analyses/relax_disp/disp_data.py (original) +++ branches/relax_disp/specific_analyses/relax_disp/disp_data.py Mon Sep 2 10:46:44 2013 @@ -253,6 +253,12 @@ # Create the spin ID lists. spin_id_list = [] for spin_id in cdp.clustering[key]: + # Skip deselected spins. + spin = return_spin(spin_id) + if not spin.select: + continue + + # Add the spin ID. spin_id_list.append(spin_id) # Yield the cluster. @@ -260,6 +266,11 @@ # The free spins. for spin_id in cdp.clustering['free spins']: + # Skip deselected spins. + spin = return_spin(spin_id) + if not spin.select: + continue + # Yield each spin individually. yield [spin_id]