Author: bugman Date: Thu Jun 21 10:01:59 2012 New Revision: 17009 URL: http://svn.gna.org/viewcvs/relax?rev=17009&view=rev Log: Bug fox for the generic_fns.mol_res_spin.return_spin_indices() function. The selection object was using the wrong variable name, and the look up table fallback was always on! Modified: trunk/generic_fns/mol_res_spin.py Modified: trunk/generic_fns/mol_res_spin.py URL: http://svn.gna.org/viewcvs/relax/trunk/generic_fns/mol_res_spin.py?rev=17009&r1=17008&r2=17009&view=diff ============================================================================== --- trunk/generic_fns/mol_res_spin.py (original) +++ trunk/generic_fns/mol_res_spin.py Thu Jun 21 10:01:59 2012 @@ -2532,7 +2532,7 @@ # No spin ID, so switch to selection matching. if not dp.mol.lookup_table.has_key(spin_id): # Parse the selection string. - select_obj = Selection(selection) + select_obj = Selection(spin_id) # Loop over the molecules. for i in range(len(dp.mol)): @@ -2565,7 +2565,8 @@ break # The indices from the look up table. - mol_index, res_index, spin_index = dp.mol.lookup_table[spin_id] + else: + mol_index, res_index, spin_index = dp.mol.lookup_table[spin_id] # Return the data. return mol_index, res_index, spin_index