mailr17004 - /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 20, 2012 - 14:16:
Author: bugman
Date: Wed Jun 20 14:16:38 2012
New Revision: 17004

URL: http://svn.gna.org/viewcvs/relax?rev=17004&view=rev
Log:
The return_spin_from_selection() function now lists all matching spins in 
RelaxMultiSpinIDError.


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=17004&r1=17003&r2=17004&view=diff
==============================================================================
--- branches/interatomic/generic_fns/mol_res_spin.py (original)
+++ branches/interatomic/generic_fns/mol_res_spin.py Wed Jun 20 14:16:38 2012
@@ -2440,6 +2440,7 @@
     mol_names = []
     res_nums = []
     res_names = []
+    spin_ids = []
     for mol in dp.mol:
         # Skip the molecule if there is no match to the selection.
         if mol not in select_obj:
@@ -2466,9 +2467,12 @@
                 # Increment the spin number counter.
                 spin_num = spin_num + 1
 
+                # Generate as store the spin ID.
+                spin_ids.append(generate_spin_id(mol_name=mol.name, 
res_num=res.num, res_name=res.name, spin_num=spin.num, spin_name=spin.name))
+
     # No unique identifier.
     if not multi and spin_num > 1:
-        raise RelaxMultiSpinIDError(selection)
+        raise RelaxMultiSpinIDError(selection, spin_ids)
 
     # Return the spin container.
     if full_info and multi:




Related Messages


Powered by MHonArc, Updated Wed Jun 20 15:40:02 2012