mailr18097 - /trunk/generic_fns/interatomic.py


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

Header


Content

Posted by edward on December 10, 2012 - 18:33:
Author: bugman
Date: Mon Dec 10 18:33:29 2012
New Revision: 18097

URL: http://svn.gna.org/viewcvs/relax?rev=18097&view=rev
Log:
Added a test for the presence of target sequence data in 
generic_fns.interatomic.copy().


Modified:
    trunk/generic_fns/interatomic.py

Modified: trunk/generic_fns/interatomic.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/generic_fns/interatomic.py?rev=18097&r1=18096&r2=18097&view=diff
==============================================================================
--- trunk/generic_fns/interatomic.py (original)
+++ trunk/generic_fns/interatomic.py Mon Dec 10 18:33:29 2012
@@ -29,7 +29,7 @@
 
 # relax module imports.
 from generic_fns import pipes
-from generic_fns.mol_res_spin import Selection, count_spins, return_spin
+from generic_fns.mol_res_spin import Selection, count_spins, return_spin, 
spin_loop
 from relax_errors import RelaxError, RelaxInteratomError, 
RelaxNoInteratomError, RelaxNoSpinError
 from relax_io import write_data
 
@@ -73,6 +73,12 @@
         if count_spins(selection=spin_id2, pipe=pipe_to, skip_desel=False) 
== 0:
             raise RelaxNoSpinError(spin_id2, pipe_to)
 
+    # Check for the sequence data in the target pipe if no spin IDs are 
given.
+    if not spin_id1 and not spin_id2:
+        for spin, spin_id in spin_loop(pipe=pipe_from, return_id=True):
+            if not return_spin(spin_id, pipe=pipe_to):
+                raise RelaxNoSpinError(spin_id, pipe_to)
+
     # Test if pipe_from contains interatomic data (skipping the rest of the 
function if it is missing).
     if not exists_data(pipe_from):
         return




Related Messages


Powered by MHonArc, Updated Mon Dec 10 18:40:02 2012