mailr17983 - in /branches/frame_order_testing: ./ generic_fns/ test_suite/system_tests/ test_suite/system_tests/scripts/n_state_...


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

Header


Content

Posted by edward on November 15, 2012 - 09:29:
Author: bugman
Date: Thu Nov 15 09:29:48 2012
New Revision: 17983

URL: http://svn.gna.org/viewcvs/relax?rev=17983&view=rev
Log:
Merged revisions 17979-17982 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk

........
  r17979 | bugman | 2012-11-14 19:07:06 +0100 (Wed, 14 Nov 2012) | 5 lines
  
  Modified the RDC and PCS data copying system test script to check 
overwriting.
  
  The rdc.copy and pcs.copy user function should support the overwriting of 
existent values.
........
  r17980 | bugman | 2012-11-15 09:17:20 +0100 (Thu, 15 Nov 2012) | 3 lines
  
  The rdc.copy and pcs.copy user functions now support overwriting 
pre-existing data.
........
  r17981 | bugman | 2012-11-15 09:27:09 +0100 (Thu, 15 Nov 2012) | 3 lines
  
  Removed some debugging printouts.
........
  r17982 | bugman | 2012-11-15 09:27:40 +0100 (Thu, 15 Nov 2012) | 3 lines
  
  The N_state_model.test_data_copying system test now checks the spin RDC and 
PCS data.
........

Modified:
    branches/frame_order_testing/   (props changed)
    branches/frame_order_testing/generic_fns/pcs.py
    branches/frame_order_testing/generic_fns/rdc.py
    branches/frame_order_testing/test_suite/system_tests/n_state_model.py
    
branches/frame_order_testing/test_suite/system_tests/scripts/n_state_model/data_copying.py

Propchange: branches/frame_order_testing/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Nov 15 09:29:48 2012
@@ -1,1 +1,1 @@
-/trunk:1-17976
+/trunk:1-17982

Modified: branches/frame_order_testing/generic_fns/pcs.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/generic_fns/pcs.py?rev=17983&r1=17982&r2=17983&view=diff
==============================================================================
--- branches/frame_order_testing/generic_fns/pcs.py (original)
+++ branches/frame_order_testing/generic_fns/pcs.py Thu Nov 15 09:29:48 2012
@@ -261,14 +261,10 @@
 
     # Loop over the align IDs.
     for align_id in align_ids:
-        # Test if PCS ID string exists for pipe_to.
-        if align_id in dp_to.pcs_ids:
-            raise RelaxPCSError(align_id)
-
         # Copy the global data.
-        if align_id not in dp_to.align_ids:
+        if align_id not in dp_to.align_ids and align_id not in 
dp_to.align_ids:
             dp_to.align_ids.append(align_id)
-        if align_id in dp_from.pcs_ids:
+        if align_id in dp_from.pcs_ids and align_id not in dp_to.pcs_ids:
             dp_to.pcs_ids.append(align_id)
 
         # Spin loop.
@@ -288,8 +284,6 @@
                 spin_to.pcs_err = {}
 
             # Copy the value and error from pipe_from.
-            print spin_from
-            print spin_to
             if hasattr(spin_from, 'pcs'):
                 spin_to.pcs[align_id] = spin_from.pcs[align_id]
             if hasattr(spin_from, 'pcs_err'):

Modified: branches/frame_order_testing/generic_fns/rdc.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/generic_fns/rdc.py?rev=17983&r1=17982&r2=17983&view=diff
==============================================================================
--- branches/frame_order_testing/generic_fns/rdc.py (original)
+++ branches/frame_order_testing/generic_fns/rdc.py Thu Nov 15 09:29:48 2012
@@ -210,14 +210,10 @@
 
     # Loop over the align IDs.
     for align_id in align_ids:
-        # Test if RDC ID string exists for pipe_to.
-        if align_id in dp_to.rdc_ids:
-            raise RelaxRDCError(align_id)
-
         # Copy the global data.
-        if align_id not in dp_to.align_ids:
+        if align_id not in dp_to.align_ids and align_id not in 
dp_to.align_ids:
             dp_to.align_ids.append(align_id)
-        if align_id in dp_from.rdc_ids:
+        if align_id in dp_from.rdc_ids and align_id not in dp_to.rdc_ids:
             dp_to.rdc_ids.append(align_id)
 
         # Spin loop.

Modified: 
branches/frame_order_testing/test_suite/system_tests/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/test_suite/system_tests/n_state_model.py?rev=17983&r1=17982&r2=17983&view=diff
==============================================================================
--- branches/frame_order_testing/test_suite/system_tests/n_state_model.py 
(original)
+++ branches/frame_order_testing/test_suite/system_tests/n_state_model.py Thu 
Nov 15 09:29:48 2012
@@ -30,7 +30,7 @@
 from data import Relax_data_store; ds = Relax_data_store()
 from generic_fns.align_tensor import calc_chi_tensor
 from generic_fns.interatomic import interatomic_loop, return_interatom
-from generic_fns.mol_res_spin import return_spin, spin_loop
+from generic_fns.mol_res_spin import return_spin, spin_index_loop, spin_loop
 from generic_fns.pipes import get_pipe
 from status import Status; status = Status()
 from test_suite.system_tests.base_classes import SystemTestCase
@@ -395,6 +395,32 @@
         self.assertEqual(orig.pcs_ids, new.pcs_ids)
         self.assertEqual(orig.align_ids, new.align_ids)
 
+        # Check the spin data.
+        for mol_index, res_index, spin_index in spin_index_loop():
+            # Alias the spin containers.
+            spin_orig = orig.mol[mol_index].res[res_index].spin[spin_index]
+            spin_new = new.mol[mol_index].res[res_index].spin[spin_index]
+
+            # Loop over the alignments.
+            for id in orig.align_ids:
+                # RDC checks.
+                if hasattr(spin_orig, 'rdc'):
+                    # Check the keys.
+                    self.assertEqual(spin_orig.rdc.keys(), 
spin_new.rdc.keys())
+
+                    # Check the values.
+                    if id in spin_orig.rdc:
+                        self.assertEqual(spin_orig.rdc[id], spin_new.rdc[id])
+
+                # PCS checks.
+                if hasattr(spin_orig, 'pcs'):
+                    # Check the keys.
+                    self.assertEqual(spin_orig.pcs.keys(), 
spin_new.pcs.keys())
+
+                    # Check the values.
+                    if id in spin_orig.pcs:
+                        self.assertEqual(spin_orig.pcs[id], spin_new.pcs[id])
+
 
     def test_lactose_n_state_fixed(self):
         """The 4-state model analysis of lactose using RDCs and PCSs."""

Modified: 
branches/frame_order_testing/test_suite/system_tests/scripts/n_state_model/data_copying.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/test_suite/system_tests/scripts/n_state_model/data_copying.py?rev=17983&r1=17982&r2=17983&view=diff
==============================================================================
--- 
branches/frame_order_testing/test_suite/system_tests/scripts/n_state_model/data_copying.py
 (original)
+++ 
branches/frame_order_testing/test_suite/system_tests/scripts/n_state_model/data_copying.py
 Thu Nov 15 09:29:48 2012
@@ -66,3 +66,7 @@
 self._execute_uf(uf_name='sequence.copy', pipe_from='orig', pipe_to='new')
 self._execute_uf(uf_name='rdc.copy', pipe_from='orig', pipe_to='new')
 self._execute_uf(uf_name='pcs.copy', pipe_from='orig', pipe_to='new')
+
+# Copy the data again (test that data can be overwritten).
+self._execute_uf(uf_name='rdc.copy', pipe_from='orig', pipe_to='new')
+self._execute_uf(uf_name='pcs.copy', pipe_from='orig', pipe_to='new')




Related Messages


Powered by MHonArc, Updated Thu Nov 15 10:40:01 2012