Author: bugman Date: Tue Jan 24 19:25:14 2012 New Revision: 15236 URL: http://svn.gna.org/viewcvs/relax?rev=15236&view=rev Log: More speed ups for the Selection.__contains_mol_res_spin_containers() method. Certain unnecessary tests are now skipped. Modified: 1.3/generic_fns/mol_res_spin.py Modified: 1.3/generic_fns/mol_res_spin.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/mol_res_spin.py?rev=15236&r1=15235&r2=15236&view=diff ============================================================================== --- 1.3/generic_fns/mol_res_spin.py (original) +++ 1.3/generic_fns/mol_res_spin.py Tue Jan 24 19:25:14 2012 @@ -223,6 +223,10 @@ # No molecule container sent in, therefore the molecule is assumed to match. select_mol = True + # Quick exit. + if not select_mol: + return False + # Residue container. if res: # No residues in selection object, therefore default to a match. @@ -235,6 +239,10 @@ else: # No residue container sent in, therefore the residue is assumed to match. select_res = True + + # Quick exit. + if not select_res: + return False # Spin container. if spin: