mailr17011 - /branches/interatomic/generic_fns/mol_res_spin.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on June 21, 2012 - 10:11:
Author: bugman
Date: Thu Jun 21 10:11:13 2012
New Revision: 17011

URL: http://svn.gna.org/viewcvs/relax?rev=17011&view=rev
Log:
Bug fix for the return_spin_from_selection() function for the 'multi' flag.

This function needs to handle the case of no spins matching the selection!


Modified:
    branches/interatomic/generic_fns/mol_res_spin.py

Modified: branches/interatomic/generic_fns/mol_res_spin.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/interatomic/generic_fns/mol_res_spin.py?rev=17011&r1=17010&r2=17011&view=diff
==============================================================================
--- branches/interatomic/generic_fns/mol_res_spin.py (original)
+++ branches/interatomic/generic_fns/mol_res_spin.py Thu Jun 21 10:11:13 2012
@@ -2481,8 +2481,10 @@
         return mol_names[0], res_nums[0], res_names[0], spins[0]
     elif multi:
         return spins
+    elif len(spins):
+        return spins[0]
     else:
-        return spins[0]
+        return None
 
 
 def return_spin_from_index(global_index=None, pipe=None, 
return_spin_id=False):




Related Messages


Powered by MHonArc, Updated Thu Jun 21 10:20:02 2012