mailr4101 - /1.3/generic_fns/spin.py


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

Header


Content

Posted by edward on November 28, 2007 - 10:59:
Author: bugman
Date: Wed Nov 28 10:59:58 2007
New Revision: 4101

URL: http://svn.gna.org/viewcvs/relax?rev=4101&view=rev
Log:
Bug fix for the generic_fns.spin.copy() function.


Modified:
    1.3/generic_fns/spin.py

Modified: 1.3/generic_fns/spin.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/spin.py?rev=4101&r1=4100&r2=4101&view=diff
==============================================================================
--- 1.3/generic_fns/spin.py (original)
+++ 1.3/generic_fns/spin.py Wed Nov 28 10:59:58 2007
@@ -23,7 +23,7 @@
 # relax module imports.
 from data import Data as relax_data_store
 from relax_errors import RelaxError, RelaxNoPipeError, 
RelaxSpinSelectDisallowError
-from selection import parse_token, residue_loop, return_residue, 
return_spin, return_single_spin_info, spin_loop, tokenise
+from selection import exists_spin_data, parse_token, residue_loop, 
return_residue, return_spin, return_single_spin_info, spin_loop, tokenise
 
 
 # Module doc.
@@ -65,8 +65,10 @@
     mol_to_token, res_to_token, spin_to_token = tokenise(spin_to)
 
     # Test if the spin number already exists.
-    if return_spin(spin_to, pipe_to):
-        raise RelaxError, "The spin " + `spin_to` + " already exists in the 
" + `pipe_from` + " data pipe."
+    if spin_to_token:
+        spin_to_cont = return_spin(spin_to, pipe_to)
+        if spin_to_cont and exists_spin_data(spin_to_cont):
+            raise RelaxError, "The spin " + `spin_to` + " already exists in 
the " + `pipe_from` + " data pipe."
 
     # No residue to copy data from.
     if not return_residue(spin_from, pipe_from):




Related Messages


Powered by MHonArc, Updated Wed Nov 28 11:20:15 2007