mailr27747 - /trunk/pipe_control/pcs.py


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

Header


Content

Posted by edward on March 03, 2015 - 15:09:
Author: bugman
Date: Tue Mar  3 15:09:00 2015
New Revision: 27747

URL: http://svn.gna.org/viewcvs/relax?rev=27747&view=rev
Log:
Modified the pcs.copy user function to handle different spin sequence between 
data pipes.


Modified:
    trunk/pipe_control/pcs.py

Modified: trunk/pipe_control/pcs.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/pipe_control/pcs.py?rev=27747&r1=27746&r2=27747&view=diff
==============================================================================
--- trunk/pipe_control/pcs.py   (original)
+++ trunk/pipe_control/pcs.py   Tue Mar  3 15:09:00 2015
@@ -328,10 +328,14 @@
 
         # Spin loop.
         data = []
-        for mol_index, res_index, spin_index in spin_index_loop():
-            # Alias the spin containers.
-            spin_from = 
dp_from.mol[mol_index].res[res_index].spin[spin_index]
-            spin_to = dp_to.mol[mol_index].res[res_index].spin[spin_index]
+        for spin_from, spin_id in spin_loop(return_id=True):
+            # Find the matching spin container in the target data pipe.
+            spin_to = return_spin(spin_id, pipe=pipe_to)
+
+            # No matching spin container.
+            if spin_to == None:
+                warn(RelaxWarning("The spin container for the spin '%s' 
cannot be found in the target data pipe." % spin_id))
+                continue
 
             # No data or errors.
             if (not hasattr(spin_from, 'pcs') or not align_id in 
spin_from.pcs) and (not hasattr(spin_from, 'pcs_err') or not align_id in 
spin_from.pcs_err):
@@ -360,7 +364,7 @@
                 spin_to.pcs_err[align_id] = error
 
             # Append the data for printout.
-            data.append([spin_from._spin_ids[0]])
+            data.append([spin_id])
             if is_float(value):
                 data[-1].append("%20.15f" % value)
             else:




Related Messages


Powered by MHonArc, Updated Tue Mar 03 15:20:02 2015